jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/368404 )

Change subject: Fix for PageForms DateImePicker
......................................................................


Fix for PageForms DateImePicker

Extension:PageForms uses 'OutputPage::addModuleScripts' to add modules ot RL.
Unfortunately this does not resolve dependencies the way
'OutputPapge::addModules' does.

This is a workaround.

NEEDS CHERRY-PICK TO REL1_27

Change-Id: I2339b259c0a3e525cd83edb5749b8542f7bef57e
---
M extension.json
M includes/BSSMWConnectorHooks.php
A resources/ext.BSSMWConnector.PageForms.DateTimePicker.fix.js
3 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index ae821eb..4e29d85 100644
--- a/extension.json
+++ b/extension.json
@@ -78,6 +78,11 @@
                                "ext.BSSMWConnector",
                                "ext.smw.api"
                        ]
+               },
+               "ext.BSSMWConnector.PageForms.DateTimePicker.fix": {
+                       "scripts": [
+                               
"ext.BSSMWConnector.PageForms.DateTimePicker.fix.js"
+                       ]
                }
        },
        "load_composer_autoloader": true,
diff --git a/includes/BSSMWConnectorHooks.php b/includes/BSSMWConnectorHooks.php
index 2ffaa8c..ef2e8c0 100644
--- a/includes/BSSMWConnectorHooks.php
+++ b/includes/BSSMWConnectorHooks.php
@@ -16,6 +16,8 @@
                        return true;
                }
 
+               $out->addModules( 
'ext.BSSMWConnector.PageForms.DateTimePicker.fix' );
+
                $oVE = BsExtensionManager::getExtension( 'VisualEditor' );
                if( $oVE instanceof BlueSpiceVisualEditor ) {
                        global $wgParser;
diff --git a/resources/ext.BSSMWConnector.PageForms.DateTimePicker.fix.js 
b/resources/ext.BSSMWConnector.PageForms.DateTimePicker.fix.js
new file mode 100644
index 0000000..a4760a1
--- /dev/null
+++ b/resources/ext.BSSMWConnector.PageForms.DateTimePicker.fix.js
@@ -0,0 +1,5 @@
+/* 2017-07-03, rvogel: "Workaround für Datepicker in Form:Termin" 
ERM5255#note-76062 */
+if( mw.config.get('wgCanonicalSpecialPageName') === "FormEdit" ) {
+    mw.loader.load( 'jquery.ui.datepicker' );
+    mw.loader.load( 'ext.pageforms.datepicker' );
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2339b259c0a3e525cd83edb5749b8542f7bef57e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceSMWConnector
Gerrit-Branch: REL1_27
Gerrit-Owner: Pwirth <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to