aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2016-12-07 11:39:59 +0000
committerDave Arter <davea@mysociety.org>2017-02-15 17:36:55 +0000
commit4d44ea5530a7dc25122e5135c19d89b4cebc5f40 (patch)
tree28ff117ae830534ccd37d3bdc70c8e5dba7f53e9 /web/js
parentcd7e3087567b0fa7e64f52d802e5e911708a7eb8 (diff)
[Oxfordshire] Add Exor RDI file download feature
The RDI file format encapsulates information about inspections that have taken place, and can be uploaded into Exor to create defects in bulk. This commit adds a page to the Oxfordshire cobrand's admin allowing RDI files to be generated and downloaded from FMS. For mysociety/fixmystreetforcouncils#127
Diffstat (limited to 'web/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