aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/admin.js2
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js33
2 files changed, 18 insertions, 17 deletions
diff --git a/web/cobrands/fixmystreet/admin.js b/web/cobrands/fixmystreet/admin.js
index 02eb30766..f7fcaf276 100644
--- a/web/cobrands/fixmystreet/admin.js
+++ b/web/cobrands/fixmystreet/admin.js
@@ -48,6 +48,8 @@ $(function(){
}
});
+ $("select.js-multiple[multiple]").make_multi();
+
// on a body's page, hide/show deleted contact categories
var $table_with_deleted_contacts = $('table tr.is-deleted td.contact-category').closest('table');
if ($table_with_deleted_contacts.length == 1) {
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index c09eeb803..e92395661 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -109,6 +109,20 @@ function isR2L() {
$drawer.hide();
});
});
+ },
+
+ make_multi: function() {
+ var $this = $(this),
+ all = $this.data('all');
+ $this.multiSelect({
+ allText: all,
+ noneText: all,
+ positionMenuWithin: $('#side'),
+ presets: [{
+ name: all,
+ options: []
+ }]
+ });
}
});
@@ -535,23 +549,8 @@ $.extend(fixmystreet.set_up, {
// to refresh the map when the filter inputs are changed.
$(".report-list-filters [type=submit]").hide();
- function make_multi(id) {
- var $id = $('#' + id),
- all = $id.data('all'),
- none = $id.data('none') || all,
- allOpts = $id.data('allOptions') || [];
- $id.multiSelect({
- allText: all,
- noneText: none,
- positionMenuWithin: $('#side'),
- presets: [{
- name: all,
- options: allOpts
- }]
- });
- }
- make_multi('statuses');
- make_multi('filter_categories');
+ $('#statuses').make_multi();
+ $('#filter_categories').make_multi();
},
mobile_ui_tweaks: function() {