0001-misc-don-t-autosave-untouched-geolocalized-fields-33.patch
wcs/qommon/static/js/qommon.forms.js | ||
---|---|---|
26 | 26 |
} |
27 | 27 |
autosave_timeout_id = window.setTimeout(autosave, 5000); |
28 | 28 |
$('#tracking-code a').on('click', autosave); |
29 |
$(document).on('wcs:set-last-auto-save', function() { |
|
30 |
last_auto_save = $('form[data-has-draft]').serialize(); |
|
31 |
}); |
|
29 | 32 |
} |
30 | 33 |
$('.date-pick').each(function() { |
31 | 34 |
var $date_input = $(this); |
wcs/qommon/static/js/qommon.geolocation.js | ||
---|---|---|
42 | 42 |
geoloc_prefill('postcode', data.address.postcode); |
43 | 43 |
geoloc_prefill('city', data.address.village || data.address.town || data.address.city || data.address.county); |
44 | 44 |
geoloc_prefill('country', data.address.country); |
45 |
$(document).trigger('wcs:set-last-auto-save'); |
|
45 | 46 |
set_sync_callback() |
46 | 47 |
}); |
47 | 48 |
}); |
wcs/qommon/static/js/qommon.map.js | ||
---|---|---|
78 | 78 |
map.marker.setLatLng(coords); |
79 | 79 |
hidden.val(coords.lat + ';' + coords.lng); |
80 | 80 |
hidden.trigger('change'); |
81 |
$(document).trigger('wcs:set-last-auto-save'); |
|
81 | 82 |
}); |
82 | 83 |
$map_widget.on('qommon:invalidate', function() { |
83 | 84 |
map.invalidateSize(); |
84 |
- |