summaryrefslogtreecommitdiff
path: root/resources/mediawiki.action
diff options
context:
space:
mode:
Diffstat (limited to 'resources/mediawiki.action')
-rw-r--r--resources/mediawiki.action/images/green-checkmark.pngbin681 -> 0 bytes
-rw-r--r--resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.css17
-rw-r--r--resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.js54
-rw-r--r--resources/mediawiki.action/mediawiki.action.edit.editWarning.js56
-rw-r--r--resources/mediawiki.action/mediawiki.action.edit.js204
-rw-r--r--resources/mediawiki.action/mediawiki.action.edit.preview.js136
-rw-r--r--resources/mediawiki.action/mediawiki.action.edit.styles.css44
-rw-r--r--resources/mediawiki.action/mediawiki.action.history.diff.css94
-rw-r--r--resources/mediawiki.action/mediawiki.action.history.js126
-rw-r--r--resources/mediawiki.action/mediawiki.action.view.dblClickEdit.js12
-rw-r--r--resources/mediawiki.action/mediawiki.action.view.metadata.js43
-rw-r--r--resources/mediawiki.action/mediawiki.action.view.postEdit.css77
-rw-r--r--resources/mediawiki.action/mediawiki.action.view.postEdit.js76
-rw-r--r--resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js26
14 files changed, 0 insertions, 965 deletions
diff --git a/resources/mediawiki.action/images/green-checkmark.png b/resources/mediawiki.action/images/green-checkmark.png
deleted file mode 100644
index 8ec604ea..00000000
--- a/resources/mediawiki.action/images/green-checkmark.png
+++ /dev/null
Binary files differ
diff --git a/resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.css b/resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.css
deleted file mode 100644
index 1af4a7a0..00000000
--- a/resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.css
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Styles for collapsible lists of templates used and hidden categories */
-.mw-editfooter-toggler {
- cursor: pointer;
- background-position: left center;
- padding-left: 16px;
-}
-
-.mw-editfooter-list {
- margin-bottom: 1em;
- margin-left: 2.5em;
-}
-
-/* Show/hide animation is incorrect if the table has a margin set. Extra
- * "table.wikitable" is needed in the selector for CSS specificity. */
-table.wikitable.preview-limit-report {
- margin: 0;
-}
diff --git a/resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.js b/resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.js
deleted file mode 100644
index 7ae51aba..00000000
--- a/resources/mediawiki.action/mediawiki.action.edit.collapsibleFooter.js
+++ /dev/null
@@ -1,54 +0,0 @@
-jQuery( document ).ready( function ( $ ) {
- var collapsibleLists, i, handleOne;
-
- // Collapsible lists of categories and templates
- collapsibleLists = [
- {
- $list: $( '.templatesUsed ul' ),
- $toggler: $( '.mw-templatesUsedExplanation' ),
- cookieName: 'templates-used-list'
- },
- {
- $list: $( '.hiddencats ul' ),
- $toggler: $( '.mw-hiddenCategoriesExplanation' ),
- cookieName: 'hidden-categories-list'
- },
- {
- $list: $( '.preview-limit-report-wrapper' ),
- $toggler: $( '.mw-limitReportExplanation' ),
- cookieName: 'preview-limit-report'
- }
- ];
-
- handleOne = function ( $list, $toggler, cookieName ) {
- var isCollapsed = $.cookie( cookieName ) !== 'expanded';
-
- // Style the toggler with an arrow icon and add a tabIndex and a role for accessibility
- $toggler.addClass( 'mw-editfooter-toggler' ).prop( 'tabIndex', 0 ).attr( 'role', 'button' );
- $list.addClass( 'mw-editfooter-list' );
-
- $list.makeCollapsible( {
- $customTogglers: $toggler,
- linksPassthru: true,
- plainMode: true,
- collapsed: isCollapsed
- } );
-
- $toggler.addClass( isCollapsed ? 'mw-icon-arrow-collapsed' : 'mw-icon-arrow-expanded' );
-
- $list.on( 'beforeExpand.mw-collapsible', function () {
- $toggler.removeClass( 'mw-icon-arrow-collapsed' ).addClass( 'mw-icon-arrow-expanded' );
- $.cookie( cookieName, 'expanded' );
- } );
-
- $list.on( 'beforeCollapse.mw-collapsible', function () {
- $toggler.removeClass( 'mw-icon-arrow-expanded' ).addClass( 'mw-icon-arrow-collapsed' );
- $.cookie( cookieName, 'collapsed' );
- } );
- };
-
- for ( i = 0; i < collapsibleLists.length; i++ ) {
- // Pass to a function for iteration-local variables
- handleOne( collapsibleLists[i].$list, collapsibleLists[i].$toggler, collapsibleLists[i].cookieName );
- }
-} );
diff --git a/resources/mediawiki.action/mediawiki.action.edit.editWarning.js b/resources/mediawiki.action/mediawiki.action.edit.editWarning.js
deleted file mode 100644
index 89bb64df..00000000
--- a/resources/mediawiki.action/mediawiki.action.edit.editWarning.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Javascript for module editWarning
- */
-( function ( mw, $ ) {
- $( function () {
- // Check if EditWarning is enabled and if we need it
- if ( $( '#wpTextbox1' ).length === 0 ) {
- return true;
- }
- // Get the original values of some form elements
- $( '#wpTextbox1, #wpSummary' ).each( function () {
- $( this ).data( 'origtext', $( this ).val() );
- });
- var savedWindowOnBeforeUnload;
- $( window )
- .on( 'beforeunload.editwarning', function () {
- var retval;
-
- // Check if the current values of some form elements are the same as
- // the original values
- if (
- mw.config.get( 'wgAction' ) === 'submit' ||
- $( '#wpTextbox1' ).data( 'origtext' ) !== $( '#wpTextbox1' ).val() ||
- $( '#wpSummary' ).data( 'origtext' ) !== $( '#wpSummary' ).val()
- ) {
- // Return our message
- retval = mw.msg( 'editwarning-warning' );
- }
-
- // Unset the onbeforeunload handler so we don't break page caching in Firefox
- savedWindowOnBeforeUnload = window.onbeforeunload;
- window.onbeforeunload = null;
- if ( retval !== undefined ) {
- // ...but if the user chooses not to leave the page, we need to rebind it
- setTimeout( function () {
- window.onbeforeunload = savedWindowOnBeforeUnload;
- }, 1 );
- return retval;
- }
- } )
- .on( 'pageshow.editwarning', function () {
- // Re-add onbeforeunload handler
- if ( !window.onbeforeunload ) {
- window.onbeforeunload = savedWindowOnBeforeUnload;
- }
- } );
-
- // Add form submission handler
- $( '#editform' ).submit( function () {
- // Unbind our handlers
- $( window ).off( '.editwarning' );
- } );
- } );
-
-}( mediaWiki, jQuery ) );
-
diff --git a/resources/mediawiki.action/mediawiki.action.edit.js b/resources/mediawiki.action/mediawiki.action.edit.js
deleted file mode 100644
index ba711aae..00000000
--- a/resources/mediawiki.action/mediawiki.action.edit.js
+++ /dev/null
@@ -1,204 +0,0 @@
-/**
- * Interface for the classic edit toolbar.
- *
- * @class mw.toolbar
- * @singleton
- */
-( function ( mw, $ ) {
- var toolbar, isReady, $toolbar, queue, slice, $currentFocused;
-
- /**
- * Internal helper that does the actual insertion of the button into the toolbar.
- *
- * See #addButton for parameter documentation.
- *
- * @private
- */
- function insertButton( b, speedTip, tagOpen, tagClose, sampleText, imageId ) {
- // Backwards compatibility
- if ( typeof b !== 'object' ) {
- b = {
- imageFile: b,
- speedTip: speedTip,
- tagOpen: tagOpen,
- tagClose: tagClose,
- sampleText: sampleText,
- imageId: imageId
- };
- }
- var $image = $( '<img>' ).attr( {
- width : 23,
- height: 22,
- src : b.imageFile,
- alt : b.speedTip,
- title : b.speedTip,
- id : b.imageId || undefined,
- 'class': 'mw-toolbar-editbutton'
- } ).click( function () {
- toolbar.insertTags( b.tagOpen, b.tagClose, b.sampleText );
- return false;
- } );
-
- $toolbar.append( $image );
- }
-
- isReady = false;
- $toolbar = false;
- /**
- * @private
- * @property {Array}
- * Contains button objects (and for backwards compatibilty, it can
- * also contains an arguments array for insertButton).
- */
- queue = [];
- slice = queue.slice;
-
- toolbar = {
-
- /**
- * Add buttons to the toolbar.
- *
- * Takes care of race conditions and time-based dependencies
- * by placing buttons in a queue if this method is called before
- * the toolbar is created.
- *
- * For compatiblity, passing the properties listed below as separate arguments
- * (in the listed order) is also supported.
- *
- * @param {Object} button Object with the following properties:
- * @param {string} button.imageFile
- * @param {string} button.speedTip
- * @param {string} button.tagOpen
- * @param {string} button.tagClose
- * @param {string} button.sampleText
- * @param {string} [button.imageId]
- */
- addButton: function () {
- if ( isReady ) {
- insertButton.apply( toolbar, arguments );
- } else {
- // Convert arguments list to array
- queue.push( slice.call( arguments ) );
- }
- },
- /**
- * Example usage:
- * addButtons( [ { .. }, { .. }, { .. } ] );
- * addButtons( { .. }, { .. } );
- *
- * @param {Object|Array} [buttons...] An array of button objects or the first
- * button object in a list of variadic arguments.
- */
- addButtons: function ( buttons ) {
- if ( !$.isArray( buttons ) ) {
- buttons = slice.call( arguments );
- }
- if ( isReady ) {
- $.each( buttons, function () {
- insertButton( this );
- } );
- } else {
- // Push each button into the queue
- queue.push.apply( queue, buttons );
- }
- },
-
- /**
- * Apply tagOpen/tagClose to selection in currently focused textarea.
- *
- * Uses `sampleText` if selection is empty.
- *
- * @param {string} tagOpen
- * @param {string} tagClose
- * @param {string} sampleText
- */
- insertTags: function ( tagOpen, tagClose, sampleText ) {
- if ( $currentFocused && $currentFocused.length ) {
- $currentFocused.textSelection(
- 'encapsulateSelection', {
- pre: tagOpen,
- peri: sampleText,
- post: tagClose
- }
- );
- }
- },
-
- // For backwards compatibility,
- // Called from EditPage.php, maybe in other places as well.
- init: function () {}
- };
-
- // Legacy (for compatibility with the code previously in skins/common.edit.js)
- window.addButton = toolbar.addButton;
- window.insertTags = toolbar.insertTags;
-
- // Explose API publicly
- mw.toolbar = toolbar;
-
- $( function () {
- var i, b, $iframe, editBox, scrollTop, $editForm;
-
- // currentFocus is used to determine where to insert tags
- $currentFocused = $( '#wpTextbox1' );
-
- // Populate the selector cache for $toolbar
- $toolbar = $( '#toolbar' );
-
- for ( i = 0; i < queue.length; i++ ) {
- b = queue[i];
- if ( $.isArray( b ) ) {
- // Forwarded arguments array from mw.toolbar.addButton
- insertButton.apply( toolbar, b );
- } else {
- // Raw object from mw.toolbar.addButtons
- insertButton( b );
- }
- }
-
- // Clear queue
- queue.length = 0;
-
- // This causes further calls to addButton to go to insertion directly
- // instead of to the queue.
- // It is important that this is after the one and only loop through
- // the the queue
- isReady = true;
-
- // Make sure edit summary does not exceed byte limit
- $( '#wpSummary' ).byteLimit( 255 );
-
- // Restore the edit box scroll state following a preview operation,
- // and set up a form submission handler to remember this state.
- editBox = document.getElementById( 'wpTextbox1' );
- scrollTop = document.getElementById( 'wpScrolltop' );
- $editForm = $( '#editform' );
- if ( $editForm.length && editBox && scrollTop ) {
- if ( scrollTop.value ) {
- editBox.scrollTop = scrollTop.value;
- }
- $editForm.submit( function () {
- scrollTop.value = editBox.scrollTop;
- });
- }
-
- // Apply to dynamically created textboxes as well as normal ones
- $( document ).on( 'focus', 'textarea, input:text', function () {
- $currentFocused = $( this );
- } );
-
- // HACK: make $currentFocused work with the usability iframe
- // With proper focus detection support (HTML 5!) this'll be much cleaner
- // TODO: Get rid of this WikiEditor code from MediaWiki core!
- $iframe = $( '.wikiEditor-ui-text iframe' );
- if ( $iframe.length > 0 ) {
- $( $iframe.get( 0 ).contentWindow.document )
- // for IE
- .add( $iframe.get( 0 ).contentWindow.document.body )
- .focus( function () {
- $currentFocused = $iframe;
- } );
- }
- });
-
-}( mediaWiki, jQuery ) );
diff --git a/resources/mediawiki.action/mediawiki.action.edit.preview.js b/resources/mediawiki.action/mediawiki.action.edit.preview.js
deleted file mode 100644
index c5cd61ef..00000000
--- a/resources/mediawiki.action/mediawiki.action.edit.preview.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * Live edit preview.
- */
-( function ( mw, $ ) {
-
- /**
- * @param {jQuery.Event} e
- */
- function doLivePreview( e ) {
- var $wikiPreview, $editform, copySelectors, $copyElements, $spinner,
- targetUrl, postData, $previewDataHolder;
-
- e.preventDefault();
-
- // Deprecated: Use mw.hook instead
- $( mw ).trigger( 'LivePreviewPrepare' );
-
- $wikiPreview = $( '#wikiPreview' );
- $editform = $( '#editform' );
-
- // Show #wikiPreview if it's hidden to be able to scroll to it
- // (if it is hidden, it's also empty, so nothing changes in the rendering)
- $wikiPreview.show();
-
- // Jump to where the preview will appear
- $wikiPreview[0].scrollIntoView();
-
- // List of selectors matching elements that we will
- // update from from the ajax-loaded preview page.
- copySelectors = [
- // Main
- '#wikiPreview',
- '#wikiDiff',
- '#catlinks',
- '.hiddencats',
- '#p-lang',
- // Editing-related
- '.templatesUsed',
- '.limitreport',
- '.mw-summary-preview'
- ];
- $copyElements = $( copySelectors.join( ',' ) );
-
- // Not shown during normal preview, to be removed if present
- $( '.mw-newarticletext' ).remove();
-
- $spinner = $.createSpinner( {
- size: 'large',
- type: 'block'
- });
- $wikiPreview.before( $spinner );
- $spinner.css( {
- marginTop: $spinner.height()
- } );
-
- // Can't use fadeTo because it calls show(), and we might want to keep some elements hidden
- // (e.g. empty #catlinks)
- $copyElements.animate( { opacity: 0.4 }, 'fast' );
-
- $previewDataHolder = $( '<div>' );
- targetUrl = $editform.attr( 'action' );
-
- // Gather all the data from the form
- postData = $editform.formToArray();
- postData.push( {
- name: e.target.name,
- value: ''
- } );
-
- // Load new preview data.
- // TODO: This should use the action=parse API instead of loading the entire page,
- // although that requires figuring out how to convert that raw data into proper HTML.
- $previewDataHolder.load( targetUrl + ' ' + copySelectors.join( ',' ), postData, function () {
- var i, $from;
-
- // Copy the contents of the specified elements from the loaded page to the real page.
- // Also copy their class attributes.
- for ( i = 0; i < copySelectors.length; i++ ) {
- $from = $previewDataHolder.find( copySelectors[i] );
-
- $( copySelectors[i] )
- .empty()
- .append( $from.contents() )
- .attr( 'class', $from.attr( 'class' ) );
- }
-
- // Deprecated: Use mw.hook instead
- $( mw ).trigger( 'LivePreviewDone', [copySelectors] );
-
- mw.hook( 'wikipage.content' ).fire( $wikiPreview );
-
- $spinner.remove();
- $copyElements.animate( {
- opacity: 1
- }, 'fast' );
- } );
- }
-
- $( function () {
- // 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 ) {
- return;
- }
-
- // The following elements can change in a preview but are not output
- // by the server when they're empty until the preview response.
- // TODO: Make the server output these always (in a hidden state), so we don't
- // have to fish and (hopefully) put them in the right place (since skins
- // can change where they are output).
-
- if ( !document.getElementById( 'p-lang' ) && document.getElementById( 'p-tb' ) ) {
- $( '#p-tb' ).after(
- $( '<div>' ).attr( 'id', 'p-lang' )
- );
- }
-
- if ( !$( '.mw-summary-preview' ).length ) {
- $( '.editCheckboxes' ).before(
- $( '<div>' ).addClass( 'mw-summary-preview' )
- );
- }
-
- if ( !document.getElementById( 'wikiDiff' ) && document.getElementById( 'wikiPreview' ) ) {
- $( '#wikiPreview' ).after(
- $( '<div>' ).attr( 'id', 'wikiDiff' )
- );
- }
-
- // This should be moved down to '#editform', but is kept on the body for now
- // because the LiquidThreads extension is re-using this module with only half
- // the EditPage (doesn't include #editform presumably, bug 55463).
- $( document.body ).on( 'click', '#wpPreview, #wpDiff', doLivePreview );
- } );
-
-}( mediaWiki, jQuery ) );
diff --git a/resources/mediawiki.action/mediawiki.action.edit.styles.css b/resources/mediawiki.action/mediawiki.action.edit.styles.css
deleted file mode 100644
index 4a2bab3d..00000000
--- a/resources/mediawiki.action/mediawiki.action.edit.styles.css
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Styles for elements of the editing form.
- */
-
-/* General layout */
-#wpTextbox1 {
- margin: 0;
- display: block;
-}
-
-.editOptions {
- background-color: #F0F0F0;
- border: 1px solid silver;
- border-top: none;
- padding: 1em 1em 1.5em 1em;
- margin-bottom: 2em;
-}
-
-/* Adjustments to edit form elements */
-.editCheckboxes {
- margin-bottom: 1em;
-}
-
-.editCheckboxes input:first-child {
- margin-left: 0;
-}
-
-.cancelLink {
- margin-left: 0.5em;
-}
-
-#editpage-copywarn {
- font-size: 0.9em;
-}
-
-#wpSummary {
- display: block;
- margin-top: 0;
- margin-bottom: 0.5em;
-}
-
-.editButtons input:first-child {
- margin-left: .1em;
-}
diff --git a/resources/mediawiki.action/mediawiki.action.history.diff.css b/resources/mediawiki.action/mediawiki.action.history.diff.css
deleted file mode 100644
index 31ca1078..00000000
--- a/resources/mediawiki.action/mediawiki.action.history.diff.css
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-** Diff rendering
-*/
-table.diff {
- background-color: white;
- border: none;
- border-spacing: 4px;
- margin: 0;
- width: 100%;
- /* Ensure that colums are of equal width */
- table-layout: fixed;
-}
-
-table.diff td {
- padding: 0.33em 0.5em;
-}
-
-table.diff td.diff-marker {
- /* Compensate padding for increased font-size */
- padding: 0.25em;
-}
-
-table.diff col.diff-marker {
- width: 2%;
-}
-
-table.diff col.diff-content {
- width: 48%;
-}
-
-table.diff td div {
- /* Force-wrap very long lines such as URLs or page-widening char strings */
- word-wrap: break-word;
-}
-
-td.diff-otitle,
-td.diff-ntitle {
- text-align: center;
-}
-
-td.diff-lineno {
- font-weight: bold;
-}
-
-td.diff-marker {
- text-align: right;
- font-weight: bold;
- font-size: 1.25em;
-}
-
-td.diff-addedline,
-td.diff-deletedline,
-td.diff-context {
- font-size: 88%;
- vertical-align: top;
- white-space: -moz-pre-wrap;
- white-space: pre-wrap;
- border-style: solid;
- border-width: 1px 1px 1px 4px;
- border-radius: 0.33em;
-}
-
-td.diff-addedline {
- border-color: #a3d3ff;
-}
-
-td.diff-deletedline {
- border-color: #ffe49c;
-}
-
-td.diff-context {
- background: #f9f9f9;
- border-color: #e6e6e6;
- color: #333333;
-}
-
-.diffchange {
- font-weight: bold;
- text-decoration: none;
-}
-
-td.diff-addedline .diffchange,
-td.diff-deletedline .diffchange {
- border-radius: 0.33em;
- padding: 0.25em 0;
-}
-
-td.diff-addedline .diffchange {
- background: #d8ecff;
-}
-
-td.diff-deletedline .diffchange {
- background: #feeec8;
-}
diff --git a/resources/mediawiki.action/mediawiki.action.history.js b/resources/mediawiki.action/mediawiki.action.history.js
deleted file mode 100644
index 04f045a5..00000000
--- a/resources/mediawiki.action/mediawiki.action.history.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * JavaScript for History action
- */
-jQuery( function ( $ ) {
- var $historyCompareForm = $( '#mw-history-compare' ),
- $historySubmitter,
- $lis = $( '#pagehistory > li' );
-
- /**
- * @context {Element} input
- * @param e {jQuery.Event}
- */
- function updateDiffRadios() {
- var diffLi = false, // the li where the diff radio is checked
- oldLi = false; // the li where the oldid radio is checked
-
- if ( !$lis.length ) {
- return true;
- }
-
- $lis
- .removeClass( 'selected' )
- .each( function () {
- var $li = $(this),
- $inputs = $li.find( 'input[type="radio"]' ),
- $oldidRadio = $inputs.filter( '[name="oldid"]' ).eq(0),
- $diffRadio = $inputs.filter( '[name="diff"]' ).eq(0);
-
- if ( !$oldidRadio.length || !$diffRadio.length ) {
- return true;
- }
-
- if ( $oldidRadio.prop( 'checked' ) ) {
- oldLi = true;
- $li.addClass( 'selected' );
- $oldidRadio.css( 'visibility', 'visible' );
- $diffRadio.css( 'visibility', 'hidden' );
-
- } else if ( $diffRadio.prop( 'checked' ) ) {
- diffLi = true;
- $li.addClass( 'selected' );
- $oldidRadio.css( 'visibility', 'hidden' );
- $diffRadio.css( 'visibility', 'visible' );
-
- // This list item has neither checked
- } else {
- // We're below the selected radios
- if ( diffLi && oldLi ) {
- $oldidRadio.css( 'visibility', 'visible' );
- $diffRadio.css( 'visibility', 'hidden' );
-
- // We're between the selected radios
- } else if ( diffLi ) {
- $diffRadio.css( 'visibility', 'visible' );
- $oldidRadio.css( 'visibility', 'visible' );
-
- // We're above the selected radios
- } else {
- $diffRadio.css( 'visibility', 'visible' );
- $oldidRadio.css( 'visibility', 'hidden' );
- }
- }
- });
-
- return true;
- }
-
- $lis.find( 'input[name="diff"], input[name="oldid"]' ).click( updateDiffRadios );
-
- // Set initial state
- updateDiffRadios();
-
-
- // Prettify url output for HistoryAction submissions,
- // to cover up action=historysubmit construction.
-
- // Ideally we'd use e.target instead of $historySubmitter, but e.target points
- // to the form element for submit actions, so.
- $historyCompareForm.find( '.historysubmit' ).click( function () {
- $historySubmitter = $(this);
- } );
-
- // On submit we clone the form element, remove unneeded fields in the clone
- // that pollute the query parameter with stuff from the other "use case",
- // and then submit the clone.
- // Without the cloning we'd be changing the real form, which is slower, could make
- // the page look broken for a second in slow browsers and might show the form broken
- // again when coming back from a "next" page.
- $historyCompareForm.submit( function ( e ) {
- var $copyForm, $copyRadios, $copyAction;
-
- if ( $historySubmitter ) {
- $copyForm = $historyCompareForm.clone();
- $copyRadios = $copyForm.find( '#pagehistory > li' ).find( 'input[name="diff"], input[name="oldid"]' );
- $copyAction = $copyForm.find( '> [name="action"]');
-
- // Remove action=historysubmit and ids[..]=..
- if ( $historySubmitter.hasClass( 'mw-history-compareselectedversions-button' ) ) {
- $copyAction.remove();
- $copyForm.find( 'input[name^="ids["]:checked' ).prop( 'checked', false );
-
- // Remove diff=&oldid=, change action=historysubmit to revisiondelete, remove revisiondelete
- } else if ( $historySubmitter.hasClass( 'mw-history-revisiondelete-button' ) ) {
- $copyRadios.remove();
- $copyAction.val( $historySubmitter.attr( 'name' ) );
- $copyForm.find( ':submit' ).remove();
- }
-
- // IE7 doesn't do submission from an off-DOM clone, so insert hidden into document first
- // Also remove potentially conflicting id attributes that we don't need anyway
- $copyForm
- .css( 'display', 'none' )
- .find('[id]')
- .removeAttr('id')
- .end()
- .insertAfter( $historyCompareForm )
- .submit();
-
- e.preventDefault();
- return false; // Because the submit is special, return false as well.
- }
-
- // Continue natural browser handling other wise
- return true;
- } );
-} );
diff --git a/resources/mediawiki.action/mediawiki.action.view.dblClickEdit.js b/resources/mediawiki.action/mediawiki.action.view.dblClickEdit.js
deleted file mode 100644
index 727a5251..00000000
--- a/resources/mediawiki.action/mediawiki.action.view.dblClickEdit.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * This module enables double-click-to-edit functionality.
- */
-( function ( mw, $ ) {
- $( function () {
- mw.util.$content.dblclick( function ( e ) {
- e.preventDefault();
- // Trigger native HTMLElement click instead of opening URL (bug 43052)
- $( '#ca-edit a' ).get( 0 ).click();
- } );
- } );
-}( mediaWiki, jQuery ) );
diff --git a/resources/mediawiki.action/mediawiki.action.view.metadata.js b/resources/mediawiki.action/mediawiki.action.view.metadata.js
deleted file mode 100644
index ce3c674b..00000000
--- a/resources/mediawiki.action/mediawiki.action.view.metadata.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Exif metadata display for MediaWiki file uploads
- *
- * Add an expand/collapse link and collapse by default if set to
- * (with JS disabled, user will see all items)
- */
-( function ( mw, $ ) {
- $( function () {
- var $row, $col, $link,
- showText = mw.msg( 'metadata-expand' ),
- hideText = mw.msg( 'metadata-collapse' ),
- $table = $( '#mw_metadata' ),
- $tbody = $table.find( 'tbody' );
-
- if ( !$tbody.length ) {
- return;
- }
-
- $row = $( '<tr class="mw-metadata-show-hide-extended"></tr>' );
- $col = $( '<td colspan="2"></td>' );
-
- $link = $( '<a>', {
- text: showText,
- href: '#'
- }).click(function () {
- if ( $table.hasClass( 'collapsed' ) ) {
- $( this ).text( hideText );
- } else {
- $( this ).text( showText );
- }
- $table.toggleClass( 'expanded collapsed' );
- return false;
- });
-
- $col.append( $link );
- $row.append( $col );
- $tbody.append( $row );
-
- // And collapse!
- $table.addClass( 'collapsed' );
- } );
-
-}( mediaWiki, jQuery ) ); \ No newline at end of file
diff --git a/resources/mediawiki.action/mediawiki.action.view.postEdit.css b/resources/mediawiki.action/mediawiki.action.view.postEdit.css
deleted file mode 100644
index be88337e..00000000
--- a/resources/mediawiki.action/mediawiki.action.view.postEdit.css
+++ /dev/null
@@ -1,77 +0,0 @@
-.postedit-container {
- margin: 0 auto;
- position: fixed;
- top: 0;
- height: 0;
- left: 50%;
- z-index: 1000;
- font-size: 13px;
-}
-
-.postedit-container:hover {
- cursor: pointer;
-}
-
-.postedit {
- position: relative;
- top: 0.6em;
- left: -50%;
- padding: .6em 3.6em .6em 1.1em;
- line-height: 1.5625em;
- color: #626465;
- background-color: #f4f4f4;
- border: 1px solid #dcd9d9;
- text-shadow: 0 0.0625em 0 rgba(255, 255, 255, 0.5);
- border-radius: 5px;
- -webkit-box-shadow: 0 2px 5px 0 #ccc;
- box-shadow: 0 2px 5px 0 #ccc;
- -webkit-transition: all 0.25s ease-in-out;
- -moz-transition: all 0.25s ease-in-out;
- -ms-transition: all 0.25s ease-in-out;
- -o-transition: all 0.25s ease-in-out;
- transition: all 0.25s ease-in-out;
-}
-
-.skin-monobook .postedit {
- top: 6em !important;
-}
-
-.postedit-faded {
- opacity: 0;
-}
-
-.postedit-icon {
- padding-left: 41px; /* 25 + 8 + 8 */
- /* like min-height, but old IE compatible and keeps text vertically aligned, too */
- line-height: 25px;
- background-repeat: no-repeat;
- background-position: 8px 50%;
-}
-
-.postedit-icon-checkmark {
- /* @embed */
- background-image: url(images/green-checkmark.png);
- background-position: left;
-}
-
-.postedit-close {
- position: absolute;
- padding: 0 .8em;
- right: 0;
- top: 0;
- font-size: 1.25em;
- font-weight: bold;
- line-height: 2.3em;
- color: black;
- text-shadow: 0 0.0625em 0 white;
- text-decoration: none;
- opacity: 0.2;
- filter: alpha(opacity=20);
-}
-
-.postedit-close:hover {
- color: black;
- text-decoration: none;
- opacity: 0.4;
- filter: alpha(opacity=40);
-}
diff --git a/resources/mediawiki.action/mediawiki.action.view.postEdit.js b/resources/mediawiki.action/mediawiki.action.view.postEdit.js
deleted file mode 100644
index 6e4df9f0..00000000
--- a/resources/mediawiki.action/mediawiki.action.view.postEdit.js
+++ /dev/null
@@ -1,76 +0,0 @@
-( function ( mw, $ ) {
- 'use strict';
-
- /**
- * @event postEdit
- * @member mw.hook
- * @param {Object} [data] Optional data
- * @param {string|jQuery|Array} [data.message] Message that listeners
- * should use when displaying notifications. String for plain text,
- * use array or jQuery object to pass actual nodes.
- * @param {string|mw.user} [data.user=mw.user] User that made the edit.
- */
-
- /**
- * After the listener for #postEdit removes the notification.
- *
- * @event postEdit_afterRemoval
- * @member mw.hook
- */
-
- var config = mw.config.get( [ 'wgAction', 'wgCookiePrefix', 'wgCurRevisionId' ] ),
- // This should match EditPage::POST_EDIT_COOKIE_KEY_PREFIX:
- cookieKey = config.wgCookiePrefix + 'PostEditRevision' + config.wgCurRevisionId,
- $div, id;
-
- function showConfirmation( data ) {
- data = data || {};
- if ( data.message === undefined ) {
- data.message = $.parseHTML( mw.message( 'postedit-confirmation', data.user || mw.user ).escaped() );
- }
-
- $div = $(
- '<div class="postedit-container">' +
- '<div class="postedit">' +
- '<div class="postedit-icon postedit-icon-checkmark postedit-content"></div>' +
- '<a href="#" class="postedit-close">&times;</a>' +
- '</div>' +
- '</div>'
- );
-
- if ( typeof data.message === 'string' ) {
- $div.find( '.postedit-content' ).text( data.message );
- } else if ( typeof data.message === 'object' ) {
- $div.find( '.postedit-content' ).append( data.message );
- }
-
- $div
- .click( fadeOutConfirmation )
- .prependTo( 'body' );
-
- id = setTimeout( fadeOutConfirmation, 3000 );
- }
-
- function fadeOutConfirmation() {
- clearTimeout( id );
- $div.find( '.postedit' ).addClass( 'postedit postedit-faded' );
- setTimeout( removeConfirmation, 500 );
-
- return false;
- }
-
- function removeConfirmation() {
- $div.remove();
- mw.hook( 'postEdit.afterRemoval' ).fire();
- }
-
- mw.hook( 'postEdit' ).add( showConfirmation );
-
- if ( config.wgAction === 'view' && $.cookie( cookieKey ) === '1' ) {
- $.cookie( cookieKey, null, { path: '/' } );
- mw.config.set( 'wgPostEdit', true );
-
- mw.hook( 'postEdit' ).fire();
- }
-
-} ( mediaWiki, jQuery ) );
diff --git a/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js b/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js
deleted file mode 100644
index 93befe3a..00000000
--- a/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * JavaScript to enable right click edit functionality.
- * When the user right-clicks in a heading, it will open the
- * edit screen.
- */
-jQuery( function ( $ ) {
- // Select all h1-h6 elements that contain editsection links
- // Don't use the ":has:(.mw-editsection a)" selector because it performs very bad.
- // http://jsperf.com/jq-1-7-2-vs-jq-1-8-1-performance-of-mw-has/2
- $( document ).on( 'contextmenu', 'h1, h2, h3, h4, h5, h6', function ( e ) {
- var $edit = $( this ).find( '.mw-editsection a' );
- if ( !$edit.length ) {
- return;
- }
-
- // Headings can contain rich text.
- // Make sure to not block contextmenu events on (other) anchor tags
- // inside the heading (e.g. to do things like copy URL, open in new tab, ..).
- // e.target can be the heading, but it can also be anything inside the heading.
- if ( e.target.nodeName.toLowerCase() !== 'a' ) {
- // Trigger native HTMLElement click instead of opening URL (bug 43052)
- e.preventDefault();
- $edit.get( 0 ).click();
- }
- } );
-} );