Adamw has submitted this change and it was merged.

Change subject: Fixing Multiselector Suckage
......................................................................


Fixing Multiselector Suckage

The JS that makes the fancy multiselector was running before the CSS
that gave it a good width. So now we wait for 250ms. Obviously this
is a terrible hack -- but it'll do until I rewrite the thing.

Change-Id: Ic8333f7125c6420a89c8a84618be871d2cdbb134
---
M modules/ext.centralNotice.interface/centralnotice.js
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Adamw: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ext.centralNotice.interface/centralnotice.js 
b/modules/ext.centralNotice.interface/centralnotice.js
index 859b96a..47846e9 100644
--- a/modules/ext.centralNotice.interface/centralnotice.js
+++ b/modules/ext.centralNotice.interface/centralnotice.js
@@ -109,8 +109,12 @@
                }
        );
 
-       // Do the fancy multiselector
-       $('select[multiple="multiple"]').multiselect({sortable: false, 
dividerLocation: 0.5});
+       // Do the fancy multiselector; but we have to wait for some arbitrary 
time until the
+       // CSS has been applied... Yes, this is an egregious hack until I 
rewrite the mutliselector
+       // to NOT suck -- e.g. make it dynamic... whoo...
+       setTimeout( function() {
+               $('select[multiple="multiple"]' ).multiselect({sortable: false, 
dividerLocation: 0.5});
+       }, 250);
 
        // Reveal the geoMultiSelector when the geotargetted checkbox is checked
        if( !$('#geotargeted' ).checked ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/54971
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8333f7125c6420a89c8a84618be871d2cdbb134
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Mwalker <[email protected]>
Gerrit-Reviewer: Adamw <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to