Merge "Follow naming convention for static methods"

This commit is contained in:
jenkins-bot 2022-01-28 15:06:24 +00:00 committed by Gerrit Code Review
commit d63cbf86f7
2 changed files with 4 additions and 3 deletions

View file

@ -35,10 +35,11 @@ ve.ui.MWConfirmationDialog.static.size = 'small';
/** /**
* Open a confirmation dialog * Open a confirmation dialog
* *
* @static
* @param {string} prompt message key to show as dialog content * @param {string} prompt message key to show as dialog content
* @param {Function} successCmd callback if continue action is chosen * @param {Function} successCmd callback if continue action is chosen
*/ */
ve.ui.MWConfirmationDialog.confirm = function ( prompt, successCmd ) { ve.ui.MWConfirmationDialog.static.confirm = function ( prompt, successCmd ) {
var windowManager = new OO.ui.WindowManager(); var windowManager = new OO.ui.WindowManager();
$( document.body ).append( windowManager.$element ); $( document.body ).append( windowManager.$element );
var dialog = new ve.ui.MWConfirmationDialog(); var dialog = new ve.ui.MWConfirmationDialog();

View file

@ -427,7 +427,7 @@ ve.ui.MWTransclusionDialog.prototype.getActionProcess = function ( action ) {
case 'back': case 'back':
return new OO.ui.Process( function () { return new OO.ui.Process( function () {
if ( willLoseProgress ) { if ( willLoseProgress ) {
ve.ui.MWConfirmationDialog.confirm( ve.ui.MWConfirmationDialog.static.confirm(
'visualeditor-dialog-transclusion-back-confirmation-prompt', 'visualeditor-dialog-transclusion-back-confirmation-prompt',
this.resetDialog.bind( this ) this.resetDialog.bind( this )
); );
@ -443,7 +443,7 @@ ve.ui.MWTransclusionDialog.prototype.getActionProcess = function ( action ) {
// close action // close action
if ( willLoseProgress ) { if ( willLoseProgress ) {
return new OO.ui.Process( function () { return new OO.ui.Process( function () {
ve.ui.MWConfirmationDialog.confirm( ve.ui.MWConfirmationDialog.static.confirm(
'visualeditor-dialog-transclusion-close-confirmation-prompt', 'visualeditor-dialog-transclusion-close-confirmation-prompt',
this.close.bind( this ) ); this.close.bind( this ) );
}, this ); }, this );