ForeignStructuredUpload.BookletLayout: Use CategoryMultiselectWidget
authorPrateek Saxena <prtksxna@gmail.com>
Fri, 24 Mar 2017 10:25:56 +0000 (15:55 +0530)
committerPrateek Saxena <prtksxna@gmail.com>
Tue, 28 Mar 2017 10:47:40 +0000 (16:17 +0530)
...instead of CategorySelector

Bug: T161285
Change-Id: Icd9bb162caa63c5a43f90e31818fc1432c6d66be

resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js

index f2b6f5f..8c80cb8 100644 (file)
                return mw.ForeignStructuredUpload.BookletLayout.parent.prototype.initialize.call( this ).then(
                        function () {
                                return $.when(
-                                       // Point the CategorySelector to the right wiki
+                                       // Point the CategoryMultiselectWidget to the right wiki
                                        booklet.upload.getApi().then( function ( api ) {
                                                // If this is a ForeignApi, it will have a apiUrl, otherwise we don't need to do anything
                                                if ( api.apiUrl ) {
-                                                       // Can't reuse the same object, CategorySelector calls #abort on its mw.Api instance
+                                                       // Can't reuse the same object, CategoryMultiselectWidget calls #abort on its mw.Api instance
                                                        booklet.categoriesWidget.api = new mw.ForeignApi( api.apiUrl );
                                                }
                                                return $.Deferred().resolve();
                        multiline: true,
                        autosize: true
                } );
-               this.categoriesWidget = new mw.widgets.CategorySelector( {
+               this.categoriesWidget = new mw.widgets.CategoryMultiselectWidget( {
                        // Can't be done here because we don't know the target wiki yet... done in #initialize.
                        // api: new mw.ForeignApi( ... ),
                        $overlay: this.$overlay