Robert Vogel has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/247269

Change subject: Load 'ext.bluespice.extjs' RL module on demand
......................................................................

Load 'ext.bluespice.extjs' RL module on demand

Changed various extensions to load the 'ext.bluespice.extjs' RL module
only if required by an user action.

This change is a follow up of 'ExtJS RL module implementation'. See
https://gerrit.wikimedia.org/r/#/c/239079

Change-Id: I6df1c0f003e73ab37c9474c9d1c1b29b6d32c751
---
M Checklist/Checklist.setup.php
M Checklist/resources/bluespice.checklist.js
M Dashboards/Dashboards.setup.php
D Dashboards/resources/bluespice.dashboards.js
A Dashboards/resources/bluespice.dashboards.main.js
A Dashboards/resources/bluespice.dashboards.portletcatalog.js
M InsertCategory/resources/bluespice.insertCategory.js
M InsertLink/resources/bluespice.insertLink.js
M InsertMagic/resources/bluespice.insertMagic.js
M InterWikiLinks/InterWikiLinks.setup.php
M InterWikiLinks/resources/bluespice.interWikiLinks.js
M ResponsibleEditors/resources/bluespice.responsibleEditors.js
M Review/Review.setup.php
M Review/resources/bluespice.review.js
14 files changed, 187 insertions(+), 170 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/69/247269/1

diff --git a/Checklist/Checklist.setup.php b/Checklist/Checklist.setup.php
index 5431c00..377a6ce 100644
--- a/Checklist/Checklist.setup.php
+++ b/Checklist/Checklist.setup.php
@@ -13,8 +13,6 @@
 
 $wgResourceModules['ext.bluespice.checklist'] = array(
        'scripts' => array(
-               'BS.Checklist/Checklist.js',
-               'BS.Checklist/ChecklistBoxSelect.js',
                'bluespice.checklist.js',
        ),
        'messages' => array(
@@ -53,4 +51,4 @@
 
 $wgLogTypes[] = 'bs-checklist';
 $wgFilterLogTypes['bs-checklist'] = true;
-$wgLogActionsHandlers['bs-checklist/*'] = 'LogFormatter';
\ No newline at end of file
+$wgLogActionsHandlers['bs-checklist/*'] = 'LogFormatter';
diff --git a/Checklist/resources/bluespice.checklist.js 
b/Checklist/resources/bluespice.checklist.js
index dad25e6..2fbad46 100644
--- a/Checklist/resources/bluespice.checklist.js
+++ b/Checklist/resources/bluespice.checklist.js
@@ -272,15 +272,16 @@
                onclick: function() {
                        // Open window
                        var me = this;
+                       mw.loader.using('ext.bluespice.extjs').done(function() {
+                               Ext.require('BS.Checklist.Window', function(){
+                                       BS.Checklist.Window.on('ok', 
function(sender, data){
+                                               BsChecklist.lastCommand = 
'mceBsSelectbox';
+                                               BsChecklist.lastCommandKey = 
data;
+                                               
ed.execCommand('mceBsSelectbox', false, data);
 
-                       Ext.require('BS.Checklist.Window', function(){
-                               BS.Checklist.Window.on('ok', function(sender, 
data){
-                                       BsChecklist.lastCommand = 
'mceBsSelectbox';
-                                       BsChecklist.lastCommandKey = data;
-                                       ed.execCommand('mceBsSelectbox', false, 
data);
-
+                                       });
+                                       BS.Checklist.Window.show( me );
                                });
-                               BS.Checklist.Window.show( me );
                        });
                }
        });
diff --git a/Dashboards/Dashboards.setup.php b/Dashboards/Dashboards.setup.php
index f2d913e..16ec896 100644
--- a/Dashboards/Dashboards.setup.php
+++ b/Dashboards/Dashboards.setup.php
@@ -33,19 +33,27 @@
 
 $wgResourceModules['ext.bluespice.dashboards'] = array(
        'scripts' => array(
-               'bluespice.dashboards.js',
+               'bluespice.dashboards.main.js',
+       ),
+       'messages' => array(
+               'tooltip-p-logo'
+       )
+) + $aResourceModuleTemplate;
+
+$wgResourceModules['ext.bluespice.dashboards.portletCatalog'] = array(
+       'scripts' => array(
+               'bluespice.dashboards.portletcatalog.js'
        ),
        'styles' => array(
                'bluespice.dashboards.css'
        ),
+       'dependencies' => array(
+               'ext.bluespice.extjs'
+       ),
        'messages' => array(
-               'tooltip-p-logo',
                'bs-dashboards-addportlet',
                'bs-dashboards-portlets',
                'bs-extjs-rssfeeder-rss-title'
-       ),
-       'dependencies' => array(
-               'ext.bluespice.extjs.BS.portal'
        )
 ) + $aResourceModuleTemplate;
 
@@ -57,7 +65,7 @@
                
//'extensions/BlueSpiceExtensions/Dashboards/resources/bluespice.dashboards.css',
        ),
        'dependencies' => array(
-               'ext.bluespice.dashboards'
+               'ext.bluespice.dashboards.portletCatalog'
        ),
        'messages' => array(
                //Default portlets user
@@ -74,7 +82,7 @@
                
//'extensions/BlueSpiceExtensions/Dashboards/resources/bluespice.dashboards.css',
        ),
        'dependencies' => array(
-               'ext.bluespice.dashboards'
+               'ext.bluespice.dashboards.portletCatalog'
        ),
        'messages' => array(
        )
diff --git a/Dashboards/resources/bluespice.dashboards.js 
b/Dashboards/resources/bluespice.dashboards.js
deleted file mode 100644
index 80aba65..0000000
--- a/Dashboards/resources/bluespice.dashboards.js
+++ /dev/null
@@ -1,34 +0,0 @@
-mw.loader.using('ext.bluespice.dashboards', function(){
-       if ( mw.user.options.get( 'MW::Dashboards::UserDashboardOnLogo', false 
) == true ) {
-               //MediaWiki Skin
-               var logoAnchor = $('#p-logo a').first();
-
-               if( logoAnchor.length == 0 ) {
-                       //Maybe BlueSpice Skin
-                       logoAnchor = $('#bs-logo a').first();
-               }
-
-               if( logoAnchor.length == 0 ) {
-                       //Okay, now we're desperate
-                       logoAnchor = 
$('a[title="'+mw.message('tooltip-p-logo').plain()+'"]');
-               }
-
-               logoAnchor.attr(
-                       'href',
-                       mw.util.wikiGetlink('Special:UserDashboard')
-               );
-       }
-
-       if ( typeof bsPortalConfigLocation !== 'undefined' ) {
-               var image = '<img src="' + mw.config.get( "wgScriptPath" ) + 
'/extensions/BlueSpiceFoundation/resources/bluespice/images/bs-m_add.png" />';
-               var text = $( 'h1.firstHeading' ).html();
-               var anchor = $( 'h1.firstHeading' ).html( 
-                       text + '<a href="#" id="bs-dashboard-add">' + image + 
'</a>'
-               );
-               $(anchor).children('#bs-dashboard-add').on( 'click', function() 
{
-                       Ext.require( 'BS.Dashboards.PortletCatalog', function() 
{
-                               BS.Dashboards.PortletCatalog.show();
-                       } );
-               } );
-       }
-});
\ No newline at end of file
diff --git a/Dashboards/resources/bluespice.dashboards.main.js 
b/Dashboards/resources/bluespice.dashboards.main.js
new file mode 100644
index 0000000..a4fdfaa
--- /dev/null
+++ b/Dashboards/resources/bluespice.dashboards.main.js
@@ -0,0 +1,17 @@
+$(function(){
+       if ( mw.user.options.get( 'MW::Dashboards::UserDashboardOnLogo', false 
) == true ) {
+
+               var $logoAnchor = $('#p-logo a').first(); //MediaWiki Skin
+               if( $logoAnchor.length == 0 ) {
+                       $logoAnchor = $('#bs-logo a').first(); //Maybe 
BlueSpice Skin
+               }
+               if( $logoAnchor.length == 0 ) { //Okay, now we're desperate
+                       $logoAnchor = 
$('a[title="'+mw.message('tooltip-p-logo').plain()+'"]');
+               }
+
+               $logoAnchor.attr(
+                       'href',
+                       mw.util.wikiGetlink('Special:UserDashboard')
+               );
+       }
+});
diff --git a/Dashboards/resources/bluespice.dashboards.portletcatalog.js 
b/Dashboards/resources/bluespice.dashboards.portletcatalog.js
new file mode 100644
index 0000000..ba8a19c
--- /dev/null
+++ b/Dashboards/resources/bluespice.dashboards.portletcatalog.js
@@ -0,0 +1,12 @@
+if ( mw.config.get('bsPortalConfigLocation') !== null ) {
+       var image = '<img src="' + mw.config.get( "wgScriptPath" ) + 
'/extensions/BlueSpiceFoundation/resources/bluespice/images/bs-m_add.png" />';
+       var text = $( 'h1.firstHeading' ).html();
+       var anchor = $( 'h1.firstHeading' ).html(
+               text + '<a href="#" id="bs-dashboard-add">' + image + '</a>'
+       );
+       $(anchor).children('#bs-dashboard-add').on( 'click', function() {
+               Ext.require( 'BS.Dashboards.PortletCatalog', function() {
+                       BS.Dashboards.PortletCatalog.show();
+               } );
+       } );
+}
\ No newline at end of file
diff --git a/InsertCategory/resources/bluespice.insertCategory.js 
b/InsertCategory/resources/bluespice.insertCategory.js
index bf12770..36b83ee 100644
--- a/InsertCategory/resources/bluespice.insertCategory.js
+++ b/InsertCategory/resources/bluespice.insertCategory.js
@@ -30,17 +30,19 @@
                        events.preventDefault();
                        var me = this;
 
-                       Ext.require('BS.InsertCategory.Dialog', function(){
-                               BS.InsertCategory.Dialog.clearListeners();
-                               BS.InsertCategory.Dialog.on('ok', 
function(sender, data){
-                                       if ( BS.InsertCategory.Dialog.isDirty ) 
{
-                                               
BsInsertCategoryWysiwygEditorHelper.setCategories( data );
-                                       }
+                       mw.loader.using( 'ext.bluespice.extjs' 
).done(function(){
+                               Ext.require('BS.InsertCategory.Dialog', 
function(){
+                                       
BS.InsertCategory.Dialog.clearListeners();
+                                       BS.InsertCategory.Dialog.on('ok', 
function(sender, data){
+                                               if ( 
BS.InsertCategory.Dialog.isDirty ) {
+                                                       
BsInsertCategoryWysiwygEditorHelper.setCategories( data );
+                                               }
+                                       });
+                                       BS.InsertCategory.Dialog.setData(
+                                               
BsInsertCategoryWysiwygEditorHelper.getCategories()
+                                       );
+                                       BS.InsertCategory.Dialog.show( me );
                                });
-                               BS.InsertCategory.Dialog.setData(
-                                       
BsInsertCategoryWysiwygEditorHelper.getCategories()
-                               );
-                               BS.InsertCategory.Dialog.show( me );
                        });
                }
        });
@@ -52,18 +54,20 @@
        $('#ca-insert_category').find('a').on( 'click', function( e ) {
                e.preventDefault();
                var me = this;
-               Ext.require('BS.InsertCategory.Dialog', function(){
-                       BS.InsertCategory.Dialog.clearListeners();
-                       BS.InsertCategory.Dialog.on( 'ok', function ( sender, 
data ) {
-                               if ( BS.InsertCategory.Dialog.isDirty ) {
-                                       
BsInsertCategoryViewHelper.setCategories( data );
-                                       return false;
-                               }
-                       } );
-                       BS.InsertCategory.Dialog.setData(
-                               BsInsertCategoryViewHelper.getCategories()
-                       );
-                       BS.InsertCategory.Dialog.show( me );
+               mw.loader.using( 'ext.bluespice.extjs' ).done(function(){
+                       Ext.require('BS.InsertCategory.Dialog', function(){
+                               BS.InsertCategory.Dialog.clearListeners();
+                               BS.InsertCategory.Dialog.on( 'ok', function ( 
sender, data ) {
+                                       if ( BS.InsertCategory.Dialog.isDirty ) 
{
+                                               
BsInsertCategoryViewHelper.setCategories( data );
+                                               return false;
+                                       }
+                               } );
+                               BS.InsertCategory.Dialog.setData(
+                                       
BsInsertCategoryViewHelper.getCategories()
+                               );
+                               BS.InsertCategory.Dialog.show( me );
+                       });
                });
        });
 
@@ -71,18 +75,19 @@
        $('#bs-editbutton-insertcategory').on( 'click', function( e ) {
                e.preventDefault();
                var me = this;
-
-               Ext.require('BS.InsertCategory.Dialog', function(){
-                       BS.InsertCategory.Dialog.clearListeners();
-                       BS.InsertCategory.Dialog.on('ok', function(sender, 
data){
-                               if ( BS.InsertCategory.Dialog.isDirty ) {
-                                       
BsInsertCategoryWikiEditorHelper.setCategories( data );
-                               }
+               mw.loader.using( 'ext.bluespice.extjs' ).done(function(){
+                       Ext.require('BS.InsertCategory.Dialog', function(){
+                               BS.InsertCategory.Dialog.clearListeners();
+                               BS.InsertCategory.Dialog.on('ok', 
function(sender, data){
+                                       if ( BS.InsertCategory.Dialog.isDirty ) 
{
+                                               
BsInsertCategoryWikiEditorHelper.setCategories( data );
+                                       }
+                               });
+                               BS.InsertCategory.Dialog.setData(
+                                       
BsInsertCategoryWikiEditorHelper.getCategories()
+                               );
+                               BS.InsertCategory.Dialog.show( me );
                        });
-                       BS.InsertCategory.Dialog.setData(
-                               BsInsertCategoryWikiEditorHelper.getCategories()
-                       );
-                       BS.InsertCategory.Dialog.show( me );
                });
        });
 
@@ -95,21 +100,23 @@
        },
 
        setCategories: function( categories ) {
-               Ext.Ajax.request({
-                       url: bs.util.getAjaxDispatcherUrl( 
'InsertCategory::addCategoriesToArticle', [ mw.config.get( "wgArticleId" ) ] ),
-                       success: function( response, opts ) {
-                               var obj = Ext.decode(response.responseText);
-                               if ( obj.success ) {
-                                       bs.util.alert( 'ICsuc', { textMsg: 
'bs-insertcategory-success', titleMsg: 'bs-extjs-title-success' }, { ok: 
BsInsertCategoryViewHelper.onSetCategoriesOk } );
-                               } else {
-                                       bs.util.alert( 'ICsuc', { textMsg: 
obj.msg, titleMsg: 'bs-extjs-title-warning' }, { ok: 
BsInsertCategoryViewHelper.onSetCategoriesFailure } );
+               mw.loader.using( 'ext.bluespice.extjs' ).done(function(){
+                       Ext.Ajax.request({
+                               url: bs.util.getAjaxDispatcherUrl( 
'InsertCategory::addCategoriesToArticle', [ mw.config.get( "wgArticleId" ) ] ),
+                               success: function( response, opts ) {
+                                       var obj = 
Ext.decode(response.responseText);
+                                       if ( obj.success ) {
+                                               bs.util.alert( 'ICsuc', { 
textMsg: 'bs-insertcategory-success', titleMsg: 'bs-extjs-title-success' }, { 
ok: BsInsertCategoryViewHelper.onSetCategoriesOk } );
+                                       } else {
+                                               bs.util.alert( 'ICsuc', { 
textMsg: obj.msg, titleMsg: 'bs-extjs-title-warning' }, { ok: 
BsInsertCategoryViewHelper.onSetCategoriesFailure } );
+                                       }
+                               },
+                               failure: function() {},
+                               params: {
+                                       page_name: mw.config.get( "wgPageName" 
),
+                                       categories: categories.join(',')
                                }
-                       },
-                       failure: function() {},
-                       params: {
-                               page_name: mw.config.get( "wgPageName" ),
-                               categories: categories.join(',')
-                       }
+                       });
                });
        },
        onSetCategoriesOk: function () {
diff --git a/InsertLink/resources/bluespice.insertLink.js 
b/InsertLink/resources/bluespice.insertLink.js
index 0b1a00d..1c52902 100644
--- a/InsertLink/resources/bluespice.insertLink.js
+++ b/InsertLink/resources/bluespice.insertLink.js
@@ -22,16 +22,18 @@
 $(document).ready(function() {
        $('#bs-editbutton-insertlink').on('click', function() {
                var me = this;
-               Ext.require('BS.InsertLink.Window', function() {
-                       BS.InsertLink.Window.resetData();
-                       BS.InsertLink.Window.clearListeners();
-                       BS.InsertLink.Window.on('ok', 
BsInsertLinkWikiTextConnector.applyData, this);
-                       BS.InsertLink.Window.on('cancel', 
bs.util.selection.reset);
-                       BsInsertLinkWikiTextConnector.getData();
-                       BS.InsertLink.Window.setData(
-                               BsInsertLinkWikiTextConnector.getData()
-                       );
-                       BS.InsertLink.Window.show(me);
+               mw.loader.using( 'ext.bluespice.extjs' ).done(function(){
+                       Ext.require('BS.InsertLink.Window', function() {
+                               BS.InsertLink.Window.resetData();
+                               BS.InsertLink.Window.clearListeners();
+                               BS.InsertLink.Window.on('ok', 
BsInsertLinkWikiTextConnector.applyData, this);
+                               BS.InsertLink.Window.on('cancel', 
bs.util.selection.reset);
+                               BsInsertLinkWikiTextConnector.getData();
+                               BS.InsertLink.Window.setData(
+                                       BsInsertLinkWikiTextConnector.getData()
+                               );
+                               BS.InsertLink.Window.show(me);
+                       });
                });
        });
 });
@@ -86,16 +88,18 @@
                commandId: 'mceBsLink',
                commandCallback: function() {
                        var editor = tinyMCE.activeEditor;
-
-                       Ext.require('BS.InsertLink.Window', function() {
-                               BS.InsertLink.Window.clearListeners();
-                               BS.InsertLink.Window.on('ok', 
BsInsertLinkVisualEditorConnector.applyData, this, plugin, editor);
-                               BS.InsertLink.Window.resetData();
-                               BS.InsertLink.Window.setData(
-                                               
BsInsertLinkVisualEditorConnector.getData(plugin, editor)
-                                               );
-                               BS.InsertLink.Window.show('bslink');
-                       }, this);
+                       var me = this;
+                       mw.loader.using( 'ext.bluespice.extjs' 
).done(function(){
+                               Ext.require('BS.InsertLink.Window', function() {
+                                       BS.InsertLink.Window.clearListeners();
+                                       BS.InsertLink.Window.on('ok', 
BsInsertLinkVisualEditorConnector.applyData, this, plugin, editor);
+                                       BS.InsertLink.Window.resetData();
+                                       BS.InsertLink.Window.setData(
+                                                       
BsInsertLinkVisualEditorConnector.getData(plugin, editor)
+                                                       );
+                                       BS.InsertLink.Window.show('bslink');
+                               }, me);
+                       });
                }
        });
 });
diff --git a/InsertMagic/resources/bluespice.insertMagic.js 
b/InsertMagic/resources/bluespice.insertMagic.js
index 0a8a2f5..2f4974e 100644
--- a/InsertMagic/resources/bluespice.insertMagic.js
+++ b/InsertMagic/resources/bluespice.insertMagic.js
@@ -1,16 +1,16 @@
 $(document).ready(function(){
-       Ext.Loader.setPath( 'BS.InsertMagic', mw.config.get( "wgScriptPath" ) + 
'/extensions/BlueSpiceExtensions/InsertMagic/resources/BS.InsertMagic' );
-
        $('a#bs-editbutton-insertmagic').on('click', function(){
                var me = this;
-               Ext.require('BS.InsertMagic.Window', function(){
-                       BS.InsertMagic.Window.clearListeners();
-                       BS.InsertMagic.Window.on( 'ok', 
BsInsertMagicWikiTextConnector.applyData );
+               mw.loader.using( 'ext.bluespice.extjs' ).done(function(){
+                       Ext.require('BS.InsertMagic.Window', function(){
+                               BS.InsertMagic.Window.clearListeners();
+                               BS.InsertMagic.Window.on( 'ok', 
BsInsertMagicWikiTextConnector.applyData );
 
-                       BS.InsertMagic.Window.setData(
-                               BsInsertMagicWikiTextConnector.getData()
-                       );
-                       BS.InsertMagic.Window.show( me );
+                               BS.InsertMagic.Window.setData(
+                                       BsInsertMagicWikiTextConnector.getData()
+                               );
+                               BS.InsertMagic.Window.show( me );
+                       });
                });
        });
 });
@@ -38,16 +38,19 @@
        commands.push({
                commandId: 'mceBsMagic',
                commandCallback: function() {
-                       Ext.require('BS.InsertMagic.Window', function(){
-                               BS.InsertMagic.Window.clearListeners();
-                               BsInsertMagicVisualEditorConnector.caller = 
this;
-                               BS.InsertMagic.Window.on( 'ok', 
BsInsertMagicVisualEditorConnector.applyData );
+                       var me = this;
+                       mw.loader.using( 'ext.bluespice.extjs' 
).done(function(){
+                               Ext.require('BS.InsertMagic.Window', function(){
+                                       BS.InsertMagic.Window.clearListeners();
+                                       
BsInsertMagicVisualEditorConnector.caller = this;
+                                       BS.InsertMagic.Window.on( 'ok', 
BsInsertMagicVisualEditorConnector.applyData );
 
-                               BS.InsertMagic.Window.setData(
-                                       
BsInsertMagicVisualEditorConnector.getData()
-                               );
-                               BS.InsertMagic.Window.show( 'bsmagic' );
-                       }, this);
+                                       BS.InsertMagic.Window.setData(
+                                               
BsInsertMagicVisualEditorConnector.getData()
+                                       );
+                                       BS.InsertMagic.Window.show( 'bsmagic' );
+                               }, me);
+                       });
                }
        });
 });
diff --git a/InterWikiLinks/InterWikiLinks.setup.php 
b/InterWikiLinks/InterWikiLinks.setup.php
index aac268f..0494a85 100644
--- a/InterWikiLinks/InterWikiLinks.setup.php
+++ b/InterWikiLinks/InterWikiLinks.setup.php
@@ -9,7 +9,6 @@
 
 $wgResourceModules['ext.bluespice.interWikiLinks'] = array(
        'scripts' => 
'extensions/BlueSpiceExtensions/InterWikiLinks/resources/bluespice.interWikiLinks.js',
-       'dependencies' => 'ext.bluespice.extjs',
        'messages' => array(
                'bs-interwikilinks-headerprefix',
                'bs-interwikilinks-headerurl',
@@ -25,7 +24,6 @@
 );
 $wgResourceModules['bluespice.insertLink.interWikiLinks'] = array(
        'scripts' => 
'extensions/BlueSpiceExtensions/InterWikiLinks/resources/bluespice.insertLink.interWikiLinks.js',
-       'dependencies' => 'ext.bluespice.extjs',
        'messages' => array(
                'bs-interwikilinks-insertlink-tabtitle',
                'bs-interwikilinks-insertlink-labelprefix',
diff --git a/InterWikiLinks/resources/bluespice.interWikiLinks.js 
b/InterWikiLinks/resources/bluespice.interWikiLinks.js
index 3f02a95..6e7de24 100644
--- a/InterWikiLinks/resources/bluespice.interWikiLinks.js
+++ b/InterWikiLinks/resources/bluespice.interWikiLinks.js
@@ -9,13 +9,14 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
  * @filesource
  */
- 
+
  /* Changelog
   * v0.1
   * - initial commit
   */
- 
 
-Ext.create( 'BS.InterWikiLinks.Panel', {
-       renderTo: 'InterWikiLinksGrid'
-} );
\ No newline at end of file
+mw.loader.using( 'ext.bluespice.extjs' ).done(function(){
+       Ext.create( 'BS.InterWikiLinks.Panel', {
+               renderTo: 'InterWikiLinksGrid'
+       } );
+});
\ No newline at end of file
diff --git a/ResponsibleEditors/resources/bluespice.responsibleEditors.js 
b/ResponsibleEditors/resources/bluespice.responsibleEditors.js
index 4f3c4c2..9a61847 100644
--- a/ResponsibleEditors/resources/bluespice.responsibleEditors.js
+++ b/ResponsibleEditors/resources/bluespice.responsibleEditors.js
@@ -2,16 +2,17 @@
        $('#ca-respeditors').find('a').on( 'click', function( e ) {
                e.preventDefault();
                var me = this;
-
-               Ext.require( 'BS.ResponsibleEditors.AssignmentDialog', 
function(){
-                       BS.ResponsibleEditors.AssignmentDialog.clearListeners();
-                       BS.ResponsibleEditors.AssignmentDialog.on( 'ok', 
function( btn, data ){
-                               window.location.reload();
+               mw.loader.using('ext.bluespice.extjs').done(function(){
+                       Ext.require( 'BS.ResponsibleEditors.AssignmentDialog', 
function(){
+                               
BS.ResponsibleEditors.AssignmentDialog.clearListeners();
+                               BS.ResponsibleEditors.AssignmentDialog.on( 
'ok', function( btn, data ){
+                                       window.location.reload();
+                               });
+                               BS.ResponsibleEditors.AssignmentDialog.setData(
+                                       mw.config.get('bsResponsibleEditors')
+                               );
+                               BS.ResponsibleEditors.AssignmentDialog.show( me 
);
                        });
-                       BS.ResponsibleEditors.AssignmentDialog.setData( 
-                               mw.config.get('bsResponsibleEditors')
-                       );
-                       BS.ResponsibleEditors.AssignmentDialog.show( me );
                });
 
                return false;
diff --git a/Review/Review.setup.php b/Review/Review.setup.php
index fbedb5c..9344a7f 100644
--- a/Review/Review.setup.php
+++ b/Review/Review.setup.php
@@ -18,8 +18,8 @@
 
 $wgResourceModules['ext.bluespice.review'] = array(
        'scripts' => 'bluespice.review.js',
-       'dependencies' => 'ext.bluespice.extjs',
        'messages' => array(
+               'bs-review-review',
                'bs-review-btnmoveup',
                'bs-review-btnmovedown',
                'bs-review-colstatus',
diff --git a/Review/resources/bluespice.review.js 
b/Review/resources/bluespice.review.js
index 1aac0fd..8160b89 100644
--- a/Review/resources/bluespice.review.js
+++ b/Review/resources/bluespice.review.js
@@ -21,25 +21,26 @@
        $('#ca-review').find('a').on( 'click', function( e ) {
                e.preventDefault();
                var me = this;
+               mw.loader.using('ext.bluespice.extjs').done(function(){
+                       Ext.require( 'BS.Review.Dialog', function(){
+                               BS.Review.Dialog.clearListeners();
+                               BS.Review.Dialog.on( 'ok', function( btn, data 
){
+                                       window.location.reload();
+                               });
 
-               Ext.require( 'BS.Review.Dialog', function(){
-                       BS.Review.Dialog.clearListeners();
-                       BS.Review.Dialog.on( 'ok', function( btn, data ){
-                               window.location.reload();
+                               var data = {
+                                       page_id: mw.config.get('wgArticleId'),
+                                       steps: []
+                               };
+                               var bsReview = mw.config.get( 'bsReview' );
+                               if( typeof bsReview != 'undefined' ) {
+                                       data = bsReview;
+                               }
+                               data.userCanEdit = 
mw.config.get('bsReviewUserCanEdit');
+
+                               BS.Review.Dialog.setData( data );
+                               BS.Review.Dialog.show( me );
                        });
-
-                       var data = {
-                               page_id: mw.config.get('wgArticleId'),
-                               steps: []
-                       };
-                       var bsReview = mw.config.get( 'bsReview' );
-                       if( typeof bsReview != 'undefined' ) {
-                               data = bsReview;
-                       }
-                       data.userCanEdit = mw.config.get('bsReviewUserCanEdit');
-
-                       BS.Review.Dialog.setData( data );
-                       BS.Review.Dialog.show( me );
                });
 
                return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6df1c0f003e73ab37c9474c9d1c1b29b6d32c751
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <[email protected]>

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

Reply via email to