dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add hook for cleaning up data that depends on purged recentchanges rows"
[lhc/web/wiklou.git]
/
resources
/
src
/
mediawiki
/
mediawiki.ForeignStructuredUpload.BookletLayout.js
diff --git
a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
index
a5cf1d8
..
7a1fa7f
100644
(file)
--- a/
resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
+++ b/
resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
@@
-46,11
+46,11
@@
return mw.ForeignStructuredUpload.BookletLayout.parent.prototype.initialize.call( this ).then(
function () {
return $.when(
return mw.ForeignStructuredUpload.BookletLayout.parent.prototype.initialize.call( this ).then(
function () {
return $.when(
- // Point the Category
Selector
to the right wiki
+ // Point the Category
MultiselectWidget
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 ) {
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, Category
Selector
calls #abort on its mw.Api instance
+ // Can't reuse the same object, Category
MultiselectWidget
calls #abort on its mw.Api instance
booklet.categoriesWidget.api = new mw.ForeignApi( api.apiUrl );
}
return $.Deferred().resolve();
booklet.categoriesWidget.api = new mw.ForeignApi( api.apiUrl );
}
return $.Deferred().resolve();
@@
-107,6
+107,9
@@
e.stopPropagation();
} );
} );
e.stopPropagation();
} );
} );
+ }, function ( errorMsg ) {
+ booklet.getPage( 'upload' ).$element.msg( errorMsg );
+ return $.Deferred().resolve();
} )
);
}
} )
);
}
@@
-125,7
+128,14
@@
* @return {mw.Upload}
*/
mw.ForeignStructuredUpload.BookletLayout.prototype.createUpload = function () {
* @return {mw.Upload}
*/
mw.ForeignStructuredUpload.BookletLayout.prototype.createUpload = function () {
- return new mw.ForeignStructuredUpload( this.target );
+ return new mw.ForeignStructuredUpload( this.target, {
+ parameters: {
+ errorformat: 'html',
+ errorlang: mw.config.get( 'wgUserLanguage' ),
+ errorsuselocal: 1,
+ formatversion: 2
+ }
+ } );
};
/* Form renderers */
};
/* Form renderers */
@@
-226,13
+236,12
@@
required: true,
validate: /.+/
} );
required: true,
validate: /.+/
} );
- this.descriptionWidget = new OO.ui.TextInputWidget( {
+ this.descriptionWidget = new OO.ui.
Multiline
TextInputWidget( {
required: true,
validate: /\S+/,
required: true,
validate: /\S+/,
- multiline: true,
autosize: true
} );
autosize: true
} );
- this.categoriesWidget = new mw.widgets.Category
Selector
( {
+ this.categoriesWidget = new mw.widgets.Category
MultiselectWidget
( {
// Can't be done here because we don't know the target wiki yet... done in #initialize.
// api: new mw.ForeignApi( ... ),
$overlay: this.$overlay
// Can't be done here because we don't know the target wiki yet... done in #initialize.
// api: new mw.ForeignApi( ... ),
$overlay: this.$overlay