EditPage: Remove legacy non-OOUI render mode
[lhc/web/wiklou.git] / resources / src / mediawiki.action / mediawiki.action.edit.preview.js
index c26d915..7602dae 100644 (file)
@@ -3,15 +3,13 @@
  */
 ( function ( mw, $ ) {
 
-       var oojsuieditform;
-
        /**
         * @ignore
         * @param {jQuery.Event} e
         */
        function doLivePreview( e ) {
                var isDiff, api, parseRequest, diffRequest, postData, copySelectors, section, summary,
-                       $wikiPreview, $wikiDiff, $editform, $textbox, $summary, $copyElements, $spinner, $errorBox;
+                       $wikiPreview, $wikiDiff, $editform, $textbox, $copyElements, $spinner, $errorBox;
 
                isDiff = ( e.target.name === 'wpDiff' );
                $wikiPreview = $( '#wikiPreview' );
                $editform = $( '#editform' );
                $textbox = $editform.find( '#wpTextbox1' );
 
-               if ( oojsuieditform ) {
-                       summary = OO.ui.infuse( $( '#wpSummaryWidget' ) );
-               } else {
-                       $summary = $editform.find( '#wpSummary' );
-               }
+               summary = OO.ui.infuse( $( '#wpSummaryWidget' ) );
 
                $spinner = $( '.mw-spinner-preview' );
                $errorBox = $( '.errorbox' );
@@ -86,7 +80,7 @@
                        formatversion: 2,
                        action: 'parse',
                        title: mw.config.get( 'wgPageName' ),
-                       summary: oojsuieditform ? summary.getValue() : $summary.val(),
+                       summary: summary.getValue(),
                        prop: ''
                };
 
        }
 
        $( function () {
-               oojsuieditform = $( '#editform' ).hasClass( 'mw-editform-ooui' );
-
                // Do not enable on user .js/.css pages, as there's no sane way of "previewing"
                // the scripts or styles without reloading the page.
                if ( $( '#mw-userjsyoucanpreview' ).length || $( '#mw-usercssyoucanpreview' ).length ) {
                }
 
                if ( !$( '.mw-summary-preview' ).length ) {
-                       $( oojsuieditform ? '#wpSummaryWidget' : '#wpSummary' ).after(
+                       $( '#wpSummaryWidget' ).after(
                                $( '<div>' ).addClass( 'mw-summary-preview' )
                        );
                }