Robert Vogel has submitted this change and it was merged.
Change subject: Backported parts of "Fixed some issues in preferences"
......................................................................
Backported parts of "Fixed some issues in preferences"
* I52d2cf8a5c44d674e566dd1476ff599a6bf497b8
Change-Id: Iff91171afe3713ec39381232b55419080c412a22
---
M includes/html/htmlformfields/HTMLMultiSelectEx.php
M resources/Resources.php
A resources/bluespice/bluespice.html.formfields.multiselect.js
3 files changed, 19 insertions(+), 0 deletions(-)
Approvals:
Robert Vogel: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/includes/html/htmlformfields/HTMLMultiSelectEx.php
b/includes/html/htmlformfields/HTMLMultiSelectEx.php
index 9dd9a45..4d0f931 100644
--- a/includes/html/htmlformfields/HTMLMultiSelectEx.php
+++ b/includes/html/htmlformfields/HTMLMultiSelectEx.php
@@ -17,6 +17,7 @@
}
function getInputHTML( $value ) {
+ $this->mParent->getOutput()->addModules(
'ext.bluespice.html.formfields.multiselect');
$aOptions = ( isset( $this->mParams['options'] ) ) ?
$this->mParams['options'] : array();
$html = $this->formatOptions( $aOptions, $value );
diff --git a/resources/Resources.php b/resources/Resources.php
index 6cb0f5e..a799ea4 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -161,4 +161,13 @@
)
) + $aResourceModuleTemplate;
+$wgResourceModules['ext.bluespice.html.formfields.multiselect'] = array(
+ 'scripts' => array(
+ 'bluespice/bluespice.html.formfields.multiselect.js'
+ ),
+ 'dependencies' => array(
+ 'ext.bluespice.extjs'
+ )
+) + $aResourceModuleTemplate;
+
unset( $aResourceModuleTemplate );
\ No newline at end of file
diff --git a/resources/bluespice/bluespice.html.formfields.multiselect.js
b/resources/bluespice/bluespice.html.formfields.multiselect.js
new file mode 100644
index 0000000..bf97fba
--- /dev/null
+++ b/resources/bluespice/bluespice.html.formfields.multiselect.js
@@ -0,0 +1,9 @@
+( function ( mw, bs, $, undefined ) {
+ $(document).on( 'submit', 'form', function() {
+ $(this).find( '.multiselectplusadd' ).each( function( index,
item ) {
+ for( i = item.length - 1; i>=0; i-- ) {
+ item.options[i].selected = true;
+ }
+ });
+ });
+}( mediaWiki, blueSpice, jQuery ) );
\ No newline at end of file
--
To view, visit https://gerrit.wikimedia.org/r/178461
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iff91171afe3713ec39381232b55419080c412a22
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: REL1_22
Gerrit-Owner: Pwirth <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pigpen <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: Smuggli <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits