aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/fixmystreet-admin.js
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-02-15 17:42:25 +0000
committerDave Arter <davea@mysociety.org>2017-02-15 17:42:25 +0000
commit957f2d968c17a34a6fa95bea6cb6a4eace229aa6 (patch)
tree28ff117ae830534ccd37d3bdc70c8e5dba7f53e9 /web/js/fixmystreet-admin.js
parent54af489f0fe985dfc433f0b8a3ab226a470a6023 (diff)
parent4d44ea5530a7dc25122e5135c19d89b4cebc5f40 (diff)
Merge branch 'issues/forcouncils/127-exor-rdi-csv-output'
Diffstat (limited to 'web/js/fixmystreet-admin.js')
-rw-r--r--web/js/fixmystreet-admin.js18
1 files changed, 16 insertions, 2 deletions
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