diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/offline.js | 2 | ||||
-rw-r--r-- | web/js/fixmystreet-admin.js | 18 |
2 files changed, 17 insertions, 3 deletions
diff --git a/web/cobrands/fixmystreet/offline.js b/web/cobrands/fixmystreet/offline.js index 7b9be4c6c..0fdad1279 100644 --- a/web/cobrands/fixmystreet/offline.js +++ b/web/cobrands/fixmystreet/offline.js @@ -322,7 +322,7 @@ fixmystreet.offline = (function() { if (savedForm) { savedForm.replace(/\+/g, '%20').split('&').forEach(function(kv) { kv = kv.split('=', 2); - if (kv[0] != 'save_inspected' && kv[0] != 'public_update' && kv[0] != 'save') { + if (kv[0] != 'include_update' && kv[0] != 'public_update' && kv[0] != 'save') { $('[name=' + kv[0] + ']').val(decodeURIComponent(kv[1])); } }); diff --git a/web/js/fixmystreet-admin.js b/web/js/fixmystreet-admin.js index 884ad1c09..02eb30766 100644 --- a/web/js/fixmystreet-admin.js +++ b/web/js/fixmystreet-admin.js @@ -66,6 +66,18 @@ $(function(){ }); } + // On some cobrands the datepicker ends up beneath items in the header, e.g. + // the logo. + // This function sets an appropriate z-index when the datepicker is shown. + // Sadly there's no way to set the z-index when creating the datepicker, so + // we have to run this little helper using the datepicker beforeShow + // handler. + function fixZIndex() { + setTimeout(function() { + $('.ui-datepicker').css('z-index', 10); + }, 0); + } + $( "#start_date" ).datepicker({ defaultDate: "-1w", changeMonth: true, @@ -73,7 +85,8 @@ $(function(){ // This sets the other fields minDate to our date onClose: function( selectedDate ) { $( "#end_date" ).datepicker( "option", "minDate", selectedDate ); - } + }, + beforeShow: fixZIndex }); $( "#end_date" ).datepicker({ /// defaultDate: "+1w", @@ -81,7 +94,8 @@ $(function(){ dateFormat: 'dd/mm/yy' , onClose: function( selectedDate ) { $( "#start_date" ).datepicker( "option", "maxDate", selectedDate ); - } + }, + beforeShow: fixZIndex }); // On user edit page, hide the area/categories fields if body changes |