Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392899 )

Change subject: Drop the never-finished "Labs" publish and preview features
......................................................................

Drop the never-finished "Labs" publish and preview features

These features were ideas in the Usability Initiative but were never
finished to the level that they would be deployed on Wikimedia wikis
and have been marked as "going to be removed" for years. Now is time
to act on that promise.

Change-Id: Ia1eb91d2dfb1979518d97badc1477146b4606f7c
---
M WikiEditor.hooks.php
M extension.json
M i18n/en.json
M i18n/qqq.json
D modules/ext.wikiEditor.preview.js
D modules/ext.wikiEditor.publish.js
M modules/jquery.wikiEditor.dialogs.config.less
D modules/jquery.wikiEditor.preview.js
D modules/jquery.wikiEditor.preview.less
D modules/jquery.wikiEditor.publish.js
10 files changed, 0 insertions(+), 518 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor 
refs/changes/99/392899/1

diff --git a/WikiEditor.hooks.php b/WikiEditor.hooks.php
index 8bf742b..1cba9db 100644
--- a/WikiEditor.hooks.php
+++ b/WikiEditor.hooks.php
@@ -38,39 +38,6 @@
                                'ext.wikiEditor.styles',
                        ],
                ],
-
-               /* Labs Features */
-
-               'preview' => [
-                       'preferences' => [
-                               'wikieditor-preview' => [
-                                       'type' => 'toggle',
-                                       'label-message' => 
'wikieditor-preview-preference',
-                                       'section' => 'editing/labs',
-                               ],
-                       ],
-                       'requirements' => [
-                               'wikieditor-preview' => true,
-                       ],
-                       'modules' => [
-                               'ext.wikiEditor.preview',
-                       ],
-               ],
-               'publish' => [
-                       'preferences' => [
-                               'wikieditor-publish' => [
-                                       'type' => 'toggle',
-                                       'label-message' => 
'wikieditor-publish-preference',
-                                       'section' => 'editing/labs',
-                               ],
-                       ],
-                       'requirements' => [
-                               'wikieditor-publish' => true,
-                       ],
-                       'modules' => [
-                               'ext.wikiEditor.publish',
-                       ],
-               ]
        ];
 
        /* Static Methods */
diff --git a/extension.json b/extension.json
index d604f3c..0726873 100644
--- a/extension.json
+++ b/extension.json
@@ -120,23 +120,6 @@
                                "dialogReplace.html": 
"templates/dialogReplace.html"
                        }
                },
-               "jquery.wikiEditor.preview": {
-                       "group": "ext.wikiEditor",
-                       "scripts": "jquery.wikiEditor.preview.js",
-                       "styles": "jquery.wikiEditor.preview.less",
-                       "dependencies": [
-                               "jquery.wikiEditor.core",
-                               "mediawiki.api"
-                       ]
-               },
-               "jquery.wikiEditor.publish": {
-                       "group": "ext.wikiEditor",
-                       "scripts": "jquery.wikiEditor.publish.js",
-                       "dependencies": [
-                               "jquery.wikiEditor.core",
-                               "jquery.wikiEditor.dialogs"
-                       ]
-               },
                "jquery.wikiEditor.toolbar": {
                        "group": "ext.wikiEditor",
                        "scripts": "jquery.wikiEditor.toolbar.js",
@@ -364,37 +347,6 @@
                                "jquery.wikiEditor.dialogs.config"
                        ]
                },
-               "ext.wikiEditor.preview": {
-                       "group": "ext.wikiEditor",
-                       "scripts": "ext.wikiEditor.preview.js",
-                       "dependencies": [
-                               "ext.wikiEditor.core",
-                               "jquery.wikiEditor.preview"
-                       ],
-                       "messages": [
-                               "wikieditor-preview-tab",
-                               "wikieditor-preview-changes-tab",
-                               "wikieditor-preview-loading"
-                       ]
-               },
-               "ext.wikiEditor.publish": {
-                       "group": "ext.wikiEditor",
-                       "scripts": "ext.wikiEditor.publish.js",
-                       "dependencies": [
-                               "ext.wikiEditor.core",
-                               "jquery.wikiEditor.publish"
-                       ],
-                       "messages": [
-                               "wikieditor-publish-button-publish",
-                               "wikieditor-publish-button-cancel",
-                               "wikieditor-publish-dialog-title",
-                               "wikieditor-publish-dialog-summary",
-                               "wikieditor-publish-dialog-minor",
-                               "wikieditor-publish-dialog-watch",
-                               "wikieditor-publish-dialog-publish",
-                               "wikieditor-publish-dialog-goback"
-                       ]
-               },
                "ext.wikiEditor.toolbar": {
                        "group": "ext.wikiEditor",
                        "scripts": "ext.wikiEditor.toolbar.js",
@@ -416,14 +368,6 @@
                                "user": true
                        },
                        "dialogs": {
-                               "global": false,
-                               "user": true
-                       },
-                       "preview": {
-                               "global": false,
-                               "user": true
-                       },
-                       "publish": {
                                "global": false,
                                "user": true
                        },
diff --git a/i18n/en.json b/i18n/en.json
index ef00d57..5af04fc 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,19 +8,6 @@
        "wikieditor-desc": "Provides an extendable wikitext editing interface 
and many feature-providing modules",
        "wikieditor-wikitext-tab": "Wikitext",
        "wikieditor-loading": "Loading...",
-       "wikieditor-preview-preference": "Enable side-by-side preview",
-       "wikieditor-preview-tab": "Preview",
-       "wikieditor-preview-changes-tab": "Changes",
-       "wikieditor-preview-loading": "Loading...",
-       "wikieditor-publish-preference": "Enable step-by-step publishing",
-       "wikieditor-publish-button-publish": "Publish",
-       "wikieditor-publish-button-cancel": "Cancel",
-       "wikieditor-publish-dialog-title": "Publish to {{SITENAME}}",
-       "wikieditor-publish-dialog-summary": "Edit summary (briefly describe 
the changes you have made):",
-       "wikieditor-publish-dialog-minor": "Minor edit",
-       "wikieditor-publish-dialog-watch": "Watch this page",
-       "wikieditor-publish-dialog-publish": "Publish",
-       "wikieditor-publish-dialog-goback": "Go back",
        "wikieditor-toolbar": "Editing toolbar",
        "wikieditor-toolbar-desc": "Edit page toolbar with enhanced usability",
        "wikieditor-toolbar-preference": "Enable enhanced editing toolbar",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 401ed69..51f8b2c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -32,19 +32,6 @@
        "wikieditor-desc": "{{desc|name=Wiki 
Editor|url=https://www.mediawiki.org/wiki/Extension:WikiEditor}}\nI guess that 
\"feature-providing modules\" means the same as \"modules providing 
features\".",
        "wikieditor-wikitext-tab": "Caption of the tab containing the edit box",
        "wikieditor-loading": "Explanatory text for the temporary cover placed 
over the wikieditor while it's being assembled.\n{{Identical|Loading}}",
-       "wikieditor-preview-preference": "Option in [[Special:Preferences]], 
tab ''{{int:prefs-editing}}''",
-       "wikieditor-preview-tab": "Caption of the tab containing the 
preview\n\n{{Identical|Preview}}",
-       "wikieditor-preview-changes-tab": "Caption of the tab containing a diff 
of the user's changes, à la ''{{int:Showdiff}}'' 
({{msg-mw|Showdiff|notext=1}}).\n\n{{Identical|Change}}",
-       "wikieditor-preview-loading": "Alt text for spinner displayed while 
preview is being loaded\n{{Identical|Loading}}",
-       "wikieditor-publish-preference": "Option in [[Special:Preferences]], 
tab ''{{int:prefs-editing}}''",
-       "wikieditor-publish-button-publish": "Button to the right of the 
Edit/Preview tabs that opens a dialog window that lets the user save their 
edit\n\n{{Identical|Publish}}",
-       "wikieditor-publish-button-cancel": "Button to the right of the 
Edit/Preview tabs that has the same effect as the {{msg-mw|Cancel}} link below 
the edit box.\n\n{{Identical|Cancel}}",
-       "wikieditor-publish-dialog-title": "Title of the dialog that opens when 
the user clicks the Publish button",
-       "wikieditor-publish-dialog-summary": "Label for the edit summary 
textbox in the dialog that opens when the user clicks the Publish button. See 
also {{msg-mw|Summary}}.",
-       "wikieditor-publish-dialog-minor": "Label for the minor edit checkbox 
in the dialog that opens when the user clicks the Publish button.\n\nSee 
also:\n* {{msg-mw|Minoredit}}\n{{Identical|Minor edit}}",
-       "wikieditor-publish-dialog-watch": "Label for the watch checkbox in the 
dialog that opens when the user clicks the Publish button\n\n{{Identical|Watch 
this page}}",
-       "wikieditor-publish-dialog-publish": "Button that saves the user's edit 
in the dialog that opens when the user clicks the Publish 
button\n\n{{Identical|Publish}}",
-       "wikieditor-publish-dialog-goback": "Button that closes the dialog that 
opens when the user clicks the Publish button.\n{{Identical|Go back}}",
        "wikieditor-toolbar": "A customizable toolbar for the WikiEditor.\nFor 
more information, see 
https://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization";,
        "wikieditor-toolbar-desc": "Unused at this time.",
        "wikieditor-toolbar-preference": "Option in [[Special:Preferences]]",
diff --git a/modules/ext.wikiEditor.preview.js 
b/modules/ext.wikiEditor.preview.js
deleted file mode 100644
index 0551e41..0000000
--- a/modules/ext.wikiEditor.preview.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * JavaScript for WikiEditor Preview module
- */
-jQuery( function ( $ ) {
-       // Add preview module
-       $( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'preview' );
-} );
diff --git a/modules/ext.wikiEditor.publish.js 
b/modules/ext.wikiEditor.publish.js
deleted file mode 100644
index 5e0b30d..0000000
--- a/modules/ext.wikiEditor.publish.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * JavaScript for WikiEditor Publish module
- */
-jQuery( function ( $ ) {
-       // Add publish module
-       $( '#wpTextbox1' ).wikiEditor( 'addModule', 'publish' );
-} );
diff --git a/modules/jquery.wikiEditor.dialogs.config.less 
b/modules/jquery.wikiEditor.dialogs.config.less
index e42025d..f95a7c2 100644
--- a/modules/jquery.wikiEditor.dialogs.config.less
+++ b/modules/jquery.wikiEditor.dialogs.config.less
@@ -243,16 +243,3 @@
 .wikiEditor-dialog-editoptions {
        margin-top: 15px;
 }
-
-/* Publish dialog */
-.wikiEditor-publish-dialog-copywarn {
-       margin-top: 0.5em;
-}
-
-.wikiEditor-publish-dialog-summary {
-       margin-top: 1.5em;
-}
-
-.wikiEditor-publish-dialog-options {
-       margin-top: 1.5em;
-}
diff --git a/modules/jquery.wikiEditor.preview.js 
b/modules/jquery.wikiEditor.preview.js
deleted file mode 100644
index 7b67272..0000000
--- a/modules/jquery.wikiEditor.preview.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/* Preview module for wikiEditor */
-( function ( $, mw ) {
-       $.wikiEditor.modules.preview = {
-
-               /**
-                * Compatibility map
-                */
-               browsers: {
-                       // Left-to-right languages
-                       ltr: {
-                               msie: [ [ '>=', 9 ] ],
-                               firefox: [ [ '>=', 4 ] ],
-                               opera: [ [ '>=', '10.5' ] ],
-                               safari: [ [ '>=', 5 ] ],
-                               chrome: [ [ '>=', 5 ] ]
-                       },
-                       // Right-to-left languages
-                       rtl: {
-                               msie: [ [ '>=', 9 ] ],
-                               firefox: [ [ '>=', 4 ] ],
-                               opera: [ [ '>=', '10.5' ] ],
-                               safari: [ [ '>=', 5 ] ],
-                               chrome: [ [ '>=', 5 ] ]
-                       }
-               },
-
-               /**
-                * Internally used functions
-                */
-               fn: {
-                       /**
-                        * Creates a preview module within a wikiEditor
-                        *
-                        * @param {Object} context Context object of editor to 
create module in
-                        */
-                       create: function ( context ) {
-                               var loadingMsg,
-                                       api = new mw.Api();
-
-                               if ( 'initialized' in context.modules.preview ) 
{
-                                       return;
-                               }
-                               context.modules.preview = {
-                                       initialized: true,
-                                       previewText: null,
-                                       changesText: null
-                               };
-                               context.modules.preview.$preview = 
context.fn.addView( {
-                                       name: 'preview',
-                                       titleMsg: 'wikieditor-preview-tab',
-                                       init: function ( context ) {
-                                               // Gets the latest copy of the 
wikitext
-                                               var wikitext = 
context.$textarea.textSelection( 'getContents' );
-                                               // Aborts when nothing has 
changed since the last preview
-                                               if ( 
context.modules.preview.previewText === wikitext ) {
-                                                       return;
-                                               }
-                                               
context.modules.preview.$preview.find( '.wikiEditor-preview-contents' ).empty();
-                                               
context.modules.preview.$preview.find( '.wikiEditor-preview-loading' ).show();
-                                               api.post( {
-                                                       formatversion: 2,
-                                                       action: 'parse',
-                                                       title: mw.config.get( 
'wgPageName' ),
-                                                       text: wikitext,
-                                                       pst: '',
-                                                       prop: 
'text|modules|jsconfigvars',
-                                                       preview: true,
-                                                       disableeditsection: 
true,
-                                                       useskin: mw.config.get( 
'skin' ),
-                                                       uselang: mw.config.get( 
'wgUserLanguage' )
-                                               } ).always( function () {
-                                                       
context.modules.preview.$preview.find( '.wikiEditor-preview-loading' ).hide();
-                                               } ).done( function ( data ) {
-                                                       var loadmodules, 
$content;
-                                                       if ( !data.parse || 
!data.parse.text ) {
-                                                               return;
-                                                       }
-
-                                                       if ( 
data.parse.jsconfigvars ) {
-                                                               mw.config.set( 
data.parse.jsconfigvars );
-                                                       }
-                                                       loadmodules = 
data.parse.modules.concat(
-                                                               
data.parse.modulescripts,
-                                                               
data.parse.modulestyles
-                                                       );
-                                                       mw.loader.load( 
loadmodules );
-
-                                                       
context.modules.preview.previewText = wikitext;
-                                                       $content = 
context.modules.preview.$preview.find( '.wikiEditor-preview-contents' )
-                                                               .detach()
-                                                               .html( 
data.parse.text );
-                                                       $content.append( '<div 
class="visualClear"></div>' )
-                                                               .find( 
'a:not([href^="#"])' )
-                                                               .click( false );
-
-                                                       mw.hook( 
'wikipage.content' ).fire( $content );
-                                                       
context.modules.preview.$preview.append( $content );
-                                               } );
-                                       }
-                               } );
-
-                               context.$changesTab = context.fn.addView( {
-                                       name: 'changes',
-                                       titleMsg: 
'wikieditor-preview-changes-tab',
-                                       init: function ( context ) {
-                                               // Gets the latest copy of the 
wikitext
-                                               var section, postdata, 
postPromise,
-                                                       wikitext = 
context.$textarea.textSelection( 'getContents' );
-                                               // Aborts when nothing has 
changed since the last time
-                                               if ( 
context.modules.preview.changesText === wikitext ) {
-                                                       return;
-                                               }
-                                               context.$changesTab.find( 
'table.diff tbody' ).empty();
-                                               context.$changesTab.find( 
'.wikiEditor-preview-loading' ).show();
-
-                                               section = $( 
'[name="wpSection"]' ).val();
-                                               postdata = {
-                                                       formatversion: 2,
-                                                       action: 'query',
-                                                       prop: 'revisions',
-                                                       titles: mw.config.get( 
'wgPageName' ),
-                                                       rvdifftotext: wikitext,
-                                                       rvdifftotextpst: true,
-                                                       rvprop: '',
-                                                       rvsection: section === 
'' ? undefined : section
-                                               };
-                                               postPromise = api.post( 
postdata );
-
-                                               $.when( postPromise, 
mw.loader.using( 'mediawiki.diff.styles' ) ).always( function () {
-                                                       
context.$changesTab.find( '.wikiEditor-preview-loading' ).hide();
-                                               } ).done( function ( postResult 
) {
-                                                       var diff;
-                                                       try {
-                                                               diff = 
postResult[ 0 ].query.pages[ 0 ]
-                                                                       
.revisions[ 0 ].diff.body;
-
-                                                               
context.$changesTab.find( 'table.diff tbody' )
-                                                                       .html( 
diff )
-                                                                       
.append( '<div class="visualClear"></div>' );
-                                                               mw.hook( 
'wikipage.diff' )
-                                                                       .fire( 
context.$changesTab.find( 'table.diff' ) );
-                                                               
context.modules.preview.changesText = wikitext;
-                                                       } catch ( e ) {
-                                                               // "data.blah 
is undefined" error, ignore
-                                                       }
-                                               } );
-                                       }
-                               } );
-
-                               loadingMsg = mw.msg( 
'wikieditor-preview-loading' );
-                               context.modules.preview.$preview
-                                       .add( context.$changesTab )
-                                       .append( $( '<div>' )
-                                               .addClass( 
'wikiEditor-preview-loading' )
-                                               .append( $( '<img>' )
-                                                       .addClass( 
'wikiEditor-preview-spinner' )
-                                                       .attr( {
-                                                               src: 
$.wikiEditor.imgPath + 'dialogs/loading.gif',
-                                                               valign: 
'absmiddle',
-                                                               alt: loadingMsg,
-                                                               title: 
loadingMsg
-                                                       } )
-                                               )
-                                               .append(
-                                                       $( '<span>' ).text( 
loadingMsg )
-                                               )
-                                       )
-                                       .append( $( '<div>' )
-                                               .addClass( 
'wikiEditor-preview-contents' )
-                                       );
-                               context.$changesTab.find( 
'.wikiEditor-preview-contents' )
-                                       .html( '<table class="diff"><col 
class="diff-marker"/><col class="diff-content"/>' +
-                                               '<col class="diff-marker"/><col 
class="diff-content"/><tbody/></table>' );
-                       }
-               }
-
-       };
-
-}( jQuery, mediaWiki ) );
diff --git a/modules/jquery.wikiEditor.preview.less 
b/modules/jquery.wikiEditor.preview.less
deleted file mode 100644
index 9d733d5..0000000
--- a/modules/jquery.wikiEditor.preview.less
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * CSS for WikiEditor Preview jQuery plugin
- */
-
-.wikiEditor-preview-loading {
-       padding: 1em;
-       background-color: #fff;
-
-       span {
-               color: #54595d;
-       }
-}
-
-.wikiEditor-preview-spinner {
-       padding-right: 1em;
-}
-
-.wikiEditor-preview-contents {
-       padding: 1em;
-       background-color: #fff;
-}
-
-/* FIXME: This only works for the first wikiEditor on the page! */
-/* stylelint-disable-next-line selector-max-id */
-#wikiEditor-0-preview-dialog .wikiEditor-ui-loading {
-       overflow: hidden;
-       border: 0;
-}
-
-.ui-dialog .ui-dialog-buttonpane {
-       // stylelint-disable-next-line declaration-no-important
-       margin: 0 !important;
-}
diff --git a/modules/jquery.wikiEditor.publish.js 
b/modules/jquery.wikiEditor.publish.js
deleted file mode 100644
index b2ec8c6..0000000
--- a/modules/jquery.wikiEditor.publish.js
+++ /dev/null
@@ -1,164 +0,0 @@
-/* Publish module for wikiEditor */
-( function ( $, mw ) {
-
-       $.wikiEditor.modules.publish = {
-
-               /**
-                * Compatibility map
-                */
-               browsers: {
-                       // Left-to-right languages
-                       ltr: {
-                               msie: [ [ '>=', 9 ] ],
-                               firefox: [ [ '>=', 4 ] ],
-                               opera: [ [ '>=', '10.5' ] ],
-                               safari: [ [ '>=', 5 ] ],
-                               chrome: [ [ '>=', 5 ] ]
-                       },
-                       // Right-to-left languages
-                       rtl: {
-                               msie: [ [ '>=', 9 ] ],
-                               firefox: [ [ '>=', 4 ] ],
-                               opera: [ [ '>=', '10.5' ] ],
-                               safari: [ [ '>=', 5 ] ],
-                               chrome: [ [ '>=', 5 ] ]
-                       }
-               },
-
-               /**
-                * Internally used functions
-                */
-               fn: {
-                       /**
-                        * Creates a publish module within a wikiEditor
-                        *
-                        * @param {Object} context Context object of editor to 
create module in
-                        */
-                       create: function ( context ) {
-                               // Build the dialog behind the Publish button
-                               var dialogID = 'wikiEditor-' + context.instance 
+ '-dialog';
-                               $.wikiEditor.modules.dialogs.fn.create(
-                                       context,
-                                       {
-                                               previewsave: {
-                                                       id: dialogID,
-                                                       titleMsg: 
'wikieditor-publish-dialog-title',
-                                                       html:
-                                                               '<div 
class="wikiEditor-publish-dialog-copywarn"></div>' +
-                                                               '<div 
class="wikiEditor-publish-dialog-editoptions">' +
-                                                                       '<form 
id="wikieditor-' + context.instance + '-publish-dialog-form">' +
-                                                                               
'<div class="wikiEditor-publish-dialog-summary">' +
-                                                                               
        '<label for="wikiEditor-' + context.instance + '-dialog-summary"' +
-                                                                               
                'rel="wikieditor-publish-dialog-summary"></label>' +
-                                                                               
        '<br />' +
-                                                                               
        '<input type="text" id="wikiEditor-' + context.instance + 
'-dialog-summary"' +
-                                                                               
                'style="width: 100%;" />' +
-                                                                               
'</div>' +
-                                                                               
'<div class="wikiEditor-publish-dialog-options">' +
-                                                                               
        '<input type="checkbox"' +
-                                                                               
                'id="wikiEditor-' + context.instance + '-dialog-minor" />' +
-                                                                               
        '<label for="wikiEditor-' + context.instance + '-dialog-minor"' +
-                                                                               
                'rel="wikieditor-publish-dialog-minor"></label>' +
-                                                                               
        '<input type="checkbox"' +
-                                                                               
                'id="wikiEditor-' + context.instance + '-dialog-watch" />' +
-                                                                               
        '<label for="wikiEditor-' + context.instance + '-dialog-watch"' +
-                                                                               
                'rel="wikieditor-publish-dialog-watch"></label>' +
-                                                                               
'</div>' +
-                                                                       
'</form>' +
-                                                               '</div>',
-                                                       init: function () {
-                                                               var i, 
copyWarnHTML, copyWarnStatements, copyWarnStatement,
-                                                                       
newCopyWarnHTML;
-
-                                                               $( this ).find( 
'[rel]' ).each( function () {
-                                                                       $( this 
).text( mw.msg( $( this ).attr( 'rel' ) ) );
-                                                               } );
-
-                                                               /* REALLY DIRTY 
HACK! */
-                                                               // Reformat the 
copyright warning stuff, if available
-                                                               if ( $( 
'#editpage-copywarn p' ).length ) {
-                                                                       
copyWarnHTML = $( '#editpage-copywarn p' ).html();
-                                                                       // 
TODO: internationalize by splitting on other characters that end statements
-                                                                       
copyWarnStatements = copyWarnHTML.split( '. ' );
-                                                                       
newCopyWarnHTML = '<ul>';
-                                                                       for ( i 
= 0; i < copyWarnStatements.length; i++ ) {
-                                                                               
if ( copyWarnStatements[ i ] !== '' ) {
-                                                                               
        copyWarnStatement = $.trim( copyWarnStatements[ i ] ).replace( /\.*$/, 
'' );
-                                                                               
        newCopyWarnHTML += '<li>' + copyWarnStatement + '.</li>';
-                                                                               
}
-                                                                       }
-                                                                       
newCopyWarnHTML += '</ul>';
-                                                                       // No 
list if there's only one element
-                                                                       $( this 
).find( '.wikiEditor-publish-dialog-copywarn' ).html(
-                                                                               
copyWarnStatements.length > 1 ? newCopyWarnHTML : copyWarnHTML
-                                                                       );
-                                                               }
-                                                               /* END OF 
REALLY DIRTY HACK */
-
-                                                               if ( $( 
'#wpMinoredit' ).length === 0 ) {
-                                                                       $( 
'#wikiEditor-' + context.instance + '-dialog-minor' ).hide();
-                                                               } else if ( $( 
'#wpMinoredit' ).prop( 'checked' ) ) {
-                                                                       $( 
'#wikiEditor-' + context.instance + '-dialog-minor' )
-                                                                               
.prop( 'checked', true );
-                                                               }
-                                                               if ( $( 
'#wpWatchthis' ).length === 0 ) {
-                                                                       $( 
'#wikiEditor-' + context.instance + '-dialog-watch' ).hide();
-                                                               } else if ( $( 
'#wpWatchthis' ).prop( 'checked' ) ) {
-                                                                       $( 
'#wikiEditor-' + context.instance + '-dialog-watch' )
-                                                                               
.prop( 'checked', true );
-                                                               }
-
-                                                               $( this ).find( 
'form' ).submit( function ( e ) {
-                                                                       $( this 
).closest( '.ui-dialog' ).find( 'button:first' ).click();
-                                                                       
e.preventDefault();
-                                                               } );
-                                                       },
-                                                       immediateCreate: true,
-                                                       dialog: {
-                                                               buttons: {
-                                                                       
'wikieditor-publish-dialog-publish': function () {
-                                                                               
var minorChecked = $( '#wikiEditor-' + context.instance +
-                                                                               
        '-dialog-minor' ).is( ':checked' ),
-                                                                               
        watchChecked = $( '#wikiEditor-' + context.instance +
-                                                                               
        '-dialog-watch' ).is( ':checked' );
-                                                                               
$( '#wpMinoredit' ).prop( 'checked', minorChecked );
-                                                                               
$( '#wpWatchthis' ).prop( 'checked', watchChecked );
-                                                                               
$( '#wpSummary' ).val( $( '#wikiEditor-' + context.instance +
-                                                                               
        '-dialog-summary' ).val() );
-                                                                               
$( '#editform' ).submit();
-                                                                       },
-                                                                       
'wikieditor-publish-dialog-goback': function () {
-                                                                               
$( this ).dialog( 'close' );
-                                                                       }
-                                                               },
-                                                               open: function 
() {
-                                                                       $( 
'#wikiEditor-' + context.instance + '-dialog-summary' ).focus();
-                                                               },
-                                                               width: 500
-                                                       },
-                                                       resizeme: false
-                                               }
-                                       }
-                               );
-
-                               context.fn.addButton( {
-                                       captionMsg: 
'wikieditor-publish-button-publish',
-                                       action: function () {
-                                               $( '#' + dialogID ).dialog( 
'open' );
-                                               return false;
-                                       }
-                               } );
-
-                               context.fn.addButton( {
-                                       captionMsg: 
'wikieditor-publish-button-cancel',
-                                       action: function () {
-                                               window.location.href = $( 
'#mw-editform-cancel' ).attr( 'href' );
-                                               return false;
-                                       }
-                               } );
-                       }
-               }
-
-       };
-
-}( jQuery, mediaWiki ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1eb91d2dfb1979518d97badc1477146b4606f7c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to