' )
@@ -283,6 +283,8 @@
* applied (blue border) which is not what is wanted. And generally setting a focus on disabled
* buttons does not seem right in case of RevisionSlider's arrow buttons.
* This method removes focus from the disabled button if such case happens.
+ *
+ * @param {jQuery.Event} e
*/
arrowFocusHandler: function ( e ) {
var button = e.data.button;
@@ -307,7 +309,7 @@
$clickedRev.data( 'revid' )
);
} else {
- pOld.setPosition( parseInt( $clickedRev.attr( 'data-pos' ), 10 ) ) ;
+ pOld.setPosition( parseInt( $clickedRev.attr( 'data-pos' ), 10 ) );
view.refreshRevisions(
$clickedRev.data( 'revid' ),
view.getRevElementAtPosition( $revisions, pNew.getPosition() ).data( 'revid' )
@@ -599,11 +601,11 @@
self.addRevisionsAtEnd( $slider, revs );
- /*jshint -W024 */
- if ( data.continue === undefined ) {
+ /* jshint -W024 */
+ if ( data.continue === undefined ) { // eslint-disable-line dot-notation
self.noMoreNewerRevisions = true;
}
- /*jshint +W024 */
+ /* jshint +W024 */
} );
},
@@ -640,11 +642,11 @@
}
self.addRevisionsAtStart( $slider, revs, precedingRevisionSize );
- /*jshint -W024 */
- if ( data.continue === undefined ) {
+ /* jshint -W024 */
+ if ( data.continue === undefined ) { // eslint-disable-line dot-notation
self.noMoreOlderRevisions = true;
}
- /*jshint +W024 */
+ /* jshint +W024 */
} );
},
@@ -777,6 +779,7 @@
/**
* @param {jQuery} $slider
+ * @return {boolean}
*/
shouldExpandSlider: function ( $slider ) {
var sliderWidth = parseInt( $slider.css( 'width' ), 10 ),
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/modules/ext.RevisionSlider.DiffPage.js 2016-08-30 11:20:53.223819921 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/modules/ext.RevisionSlider.DiffPage.js 2016-09-07 13:13:31.424291616 +0000
@@ -1,4 +1,6 @@
( function ( mw, $ ) {
+ /* global wikEd */
+
/**
* Module handling diff page reloading and the RevisionSlider browser history
*
@@ -50,6 +52,7 @@
$sidePanel = $( '#mw-panel' ),
$navigation = $( '#p-views' ),
$catLinks = $( '#catlinks' ),
+ $printFooter = $( '.printfooter' ),
scrollLeft = $container.find( '.mw-revslider-revisions-container' ).scrollLeft();
$data = $( data );
@@ -57,10 +60,25 @@
$navigation.replaceWith( $data.find( '#p-views' ) );
$catLinks.replaceWith( $data.find( '#catlinks' ) );
$sidePanel.replaceWith( $data.find( '#mw-panel' ) );
+ $printFooter.replaceWith( $data.find( '.printfooter' ) );
$contentText.html( $data.find( '#mw-content-text' ) )
.find( '.mw-revslider-revisions-container' ).scrollLeft( scrollLeft );
mw.hook( 'wikipage.content' ).fire( $contentText );
+
+ // In order to correctly interact with third-party code (extensions and gadgets)
+ // Revision slider should trigger some general (core) hook that other parties listen too
+ // Following wikEdDiff.js-specific code is deprecated and will be removed in the future.
+ // WikEdDiff should be updated to use a hook.
+ if ( self.wikEdDiffDetected() ) {
+ self.reInitWikEdDiff();
+ }
+
+ // Following code is deprecated and will be removed soon. Revision Slider should
+ // trigger general (core) hook instead of its own hook. Extensions do not have to
+ // be aware of Revision Slider to interact properly with it.
+ mw.hook( 'revslider.diffreload' ).fire( $contentText );
+
}, function ( xhr ) {
$( 'table.diff[data-mw="interface"]' ).removeClass( 'mw-revslider-diff-loading' );
if ( xhr.statusText !== 'abort' ) {
@@ -76,6 +94,16 @@
} );
},
+ wikEdDiffDetected: function () {
+ return typeof wikEd !== 'undefined' && $( 'meta[name=wikEdDiffSetupFlag]' ).length !== 0;
+ },
+
+ reInitWikEdDiff: function () {
+ $( 'meta[name=wikEdDiffSetupFlag]' ).remove();
+ $( 'meta[name=wikEdDiffStartupFlag]' ).remove();
+ wikEd.DiffSetup();
+ },
+
/**
* Replaces the current state in the history stack
*
@@ -118,6 +146,7 @@
* @param {number} revId1
* @param {number} revId2
* @param {SliderView} sliderView
+ * @return {Object}
*/
getStateObject: function ( revId1, revId2, sliderView ) {
return {
@@ -134,6 +163,7 @@
*
* @param {number} revId1
* @param {number} revId2
+ * @return {string}
*/
getStateUrl: function ( revId1, revId2 ) {
var url = mw.util.wikiScript( 'index' ) + '?diff=' + Math.max( revId1, revId2 ) + '&oldid=' + Math.min( revId1, revId2 ),
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/modules/ext.RevisionSlider.init.js 2016-08-30 11:20:53.223819921 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/modules/ext.RevisionSlider.init.js 2016-09-06 16:29:46.113705307 +0000
@@ -1,9 +1,13 @@
( function ( mw, $ ) {
- var expanded = false,
+ var autoExpand = mw.user.options.get( 'userjs-revslider-autoexpand' ) === '1',
+ expanded = autoExpand,
initialized = false,
- /*jshint -W024 */
+ autoExpandButton,
+ /* eslint-disable dot-notation */
+ /* jshint -W024 */
toggleButton = OO.ui.ButtonWidget.static.infuse( $( '.mw-revslider-toggle-button' ) ),
- /*jshint +W024 */
+ /* jshint +W024 */
+ /* eslint-enable dot-notation */
initialize = function () {
var startTime = mw.now(),
api = new mw.libs.revisionSlider.Api( mw.util.wikiScript( 'api' ) );
@@ -61,6 +65,36 @@
mw.track( 'counter.MediaWiki.RevisionSlider.event.load' );
+ autoExpandButton = new OO.ui.ToggleButtonWidget( {
+ icon: 'pin',
+ classes: [ 'mw-revslider-auto-expand-button' ],
+ title: mw.message( autoExpand ?
+ 'revisionslider-turn-off-auto-expand-title' :
+ 'revisionslider-turn-on-auto-expand-title'
+ ).text(),
+ value: autoExpand
+ } );
+
+ autoExpandButton.connect( this, {
+ click: function () {
+ autoExpand = !autoExpand;
+ ( new mw.Api() ).saveOption( 'userjs-revslider-autoexpand', autoExpand ? '1' : '0' );
+ if ( autoExpand ) {
+ autoExpandButton.setTitle( mw.message( 'revisionslider-turn-off-auto-expand-title' ).text() );
+ mw.track( 'counter.MediaWiki.RevisionSlider.event.autoexpand.on' );
+ } else {
+ autoExpandButton.setTitle( mw.message( 'revisionslider-turn-on-auto-expand-title' ).text() );
+ mw.track( 'counter.MediaWiki.RevisionSlider.event.autoexpand.off' );
+ }
+ }
+ } );
+
+ $( '.mw-revslider-container' ).append( autoExpandButton.$element );
+
+ if ( autoExpand ) {
+ initialize();
+ }
+
toggleButton.connect( this, {
click: function () {
expanded = !expanded;
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/modules/ext.RevisionSlider.RevisionListView.js 2016-08-30 11:20:53.223819921 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/modules/ext.RevisionSlider.RevisionListView.js 2016-09-06 16:29:46.113705307 +0000
@@ -24,16 +24,6 @@
tooltipTimeout: -1,
/**
- * @type {OO.ui.PopupWidget}
- */
- currentTooltip: null,
-
- /**
- * @type {jQuery}
- */
- $highlightedRevisionWrapper: null,
-
- /**
* @param {number} revisionTickWidth
* @param {number} positionOffset
* @return {jQuery}
@@ -74,12 +64,13 @@
.addClass( diffSize > 0 ? 'mw-revslider-revision-up' : 'mw-revslider-revision-down' )
.append( $( '
' ).addClass( 'mw-revslider-revision-border-box' ) )
)
- .mouseover( showTooltip )
- .mouseout( hideTooltip )
+ .mouseenter( showTooltip )
+ .mouseleave( hideTooltip )
);
}
this.keepTooltipsOnHover();
+ this.closeTooltipsOnClick();
return $html;
},
@@ -105,11 +96,16 @@
* Hides the current tooltip immediately
*/
hideCurrentTooltip: function () {
- if ( this.tooltipTimeout !== -1 && this.$highlightedRevisionWrapper !== null ) {
+ var $highlightedRevisionWrapper = $( '.mw-revslider-revision-wrapper-hovered' ),
+ $currentTooltip = $( '.mw-revslider-revision-tooltip' );
+ if ( this.tooltipTimeout !== -1 ) {
window.clearTimeout( this.tooltipTimeout );
- this.$highlightedRevisionWrapper.removeClass( 'mw-revslider-revision-wrapper-hovered' );
- this.currentTooltip.toggle( false );
- this.currentTooltip.$element.remove();
+ }
+ if ( $highlightedRevisionWrapper.length !== 0 ) {
+ $highlightedRevisionWrapper.removeClass( 'mw-revslider-revision-wrapper-hovered' );
+ }
+ if ( $currentTooltip.length !== 0 ) {
+ $currentTooltip.remove();
}
},
@@ -119,14 +115,13 @@
* @param {jQuery} $rev
*/
hideTooltip: function ( $rev ) {
- var self = this;
+ var $currentTooltip = $( '.mw-revslider-revision-tooltip' );
this.tooltipTimeout = window.setTimeout( function () {
- if ( $rev !== null ) {
+ if ( $rev.length !== 0 ) {
$rev.removeClass( 'mw-revslider-revision-wrapper-hovered' );
}
- if ( self.currentTooltip !== null && self.currentTooltip.isVisible() ) {
- self.currentTooltip.toggle( false );
- self.currentTooltip.$element.remove();
+ if ( $currentTooltip.length !== 0 ) {
+ $currentTooltip.remove();
}
}, 500 );
},
@@ -144,6 +139,9 @@
if ( revision === null ) {
return;
}
+
+ this.hideCurrentTooltip();
+
tooltip = this.makeTooltip( revision );
tooltip.$element.css( {
left: $rev.offset().left + this.revisionWidth / 2 + 'px',
@@ -152,10 +150,7 @@
$( 'body' ).append( tooltip.$element );
tooltip.toggle( true );
- this.hideCurrentTooltip();
$rev.addClass( 'mw-revslider-revision-wrapper-hovered' );
- this.$highlightedRevisionWrapper = $rev;
- this.currentTooltip = tooltip;
},
/**
@@ -179,11 +174,26 @@
var self = this;
$( document )
- .on( 'mouseover', '.mw-revslider-revision-tooltip', function () {
+ .on( 'mouseenter', '.mw-revslider-revision-tooltip', function () {
window.clearTimeout( self.tooltipTimeout );
} )
- .on( 'mouseout', '.mw-revslider-revision-tooltip', function () {
- self.hideTooltip( self.$highlightedRevisionWrapper );
+ .on( 'mouseleave', '.mw-revslider-revision-tooltip', function () {
+ self.hideTooltip( $( '.mw-revslider-revision-wrapper-hovered' ) );
+ } );
+ },
+
+ /**
+ * Sets an event handler to close tooltips when clicking somewhere outside
+ */
+ closeTooltipsOnClick: function () {
+ var self = this;
+
+ $( document )
+ .on( 'click', function ( event ) {
+ if ( $( event.target ).closest( '.mw-revslider-revision-tooltip' ).length === 0 &&
+ $( event.target ).closest( '.mw-revslider-revisions-container' ).length === 0 ) {
+ self.hideCurrentTooltip();
+ }
} );
},
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/modules/ext.RevisionSlider.HelpDialog.js 2016-08-30 11:20:53.223819921 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/modules/ext.RevisionSlider.HelpDialog.js 2016-09-06 16:29:46.113705307 +0000
@@ -1,6 +1,7 @@
( function ( mw, $ ) {
+ /* eslint-disable dot-notation */
// JSHint does not like OOJS' usage of "static" and "super"
- /*jshint -W024 */
+ /* jshint -W024 */
/**
* Module containing the RevisionSlider tutorial
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/modules/ext.RevisionSlider.Revision.js 2016-08-30 11:20:53.223819921 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/modules/ext.RevisionSlider.Revision.js 2016-09-06 16:29:46.113705307 +0000
@@ -1,5 +1,5 @@
( function ( mw, $ ) {
- /*global moment:false */
+ /* global moment:false */
/**
* @param {Object} data - Containing keys `id`, `size`, `comment`, `parsedcomment`, `timestamp`, `user` and `minor`
* @constructor
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/modules/ext.RevisionSlider.Api.js 2016-08-30 11:20:53.223819921 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/modules/ext.RevisionSlider.Api.js 2016-09-06 16:29:46.109705275 +0000
@@ -20,6 +20,7 @@
* @param {number} [options.startId] Start ID
* @param {number} [options.endId] End ID
* @param {Object} [options.knownUserGenders] Known user genders
+ * @return {jQuery.Promise}
*/
fetchRevisionData: function ( pageName, options ) {
var xhr, userXhr,
@@ -31,9 +32,11 @@
xhr = this.fetchRevisions( pageName, options )
.done( function ( data ) {
var revs = data.query.pages[ 0 ].revisions,
- /*jshint -W024 */
+ /* eslint-disable dot-notation */
+ /* jshint -W024 */
revContinue = data.continue,
- /*jshint +W024 */
+ /* jshint +W024 */
+ /* eslint-enable dot-notation */
genderData = options.knownUserGenders || {},
userNames;
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/tests/qunit/RevisionSlider.Pointer.test.js 2016-08-30 11:20:53.227819952 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/tests/qunit/RevisionSlider.Pointer.test.js 2016-09-06 16:29:46.117705338 +0000
@@ -15,4 +15,4 @@
assert.equal( pointer.getPosition(), pos );
} );
-} )( mediaWiki );
+}( mediaWiki ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/tests/qunit/RevisionSlider.PointerView.test.js 2016-08-30 11:20:53.227819952 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/tests/qunit/RevisionSlider.PointerView.test.js 2016-09-06 16:29:46.117705338 +0000
@@ -24,4 +24,4 @@
pv.getElement().addClass( 'mw-revslider-pointer-upper' );
assert.equal( pv.getOffset(), 16 );
} );
-} )( mediaWiki );
+}( mediaWiki ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/tests/qunit/RevisionSlider.SliderView.test.js 2016-08-30 11:20:53.227819952 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/tests/qunit/RevisionSlider.SliderView.test.js 2016-09-06 16:29:46.117705338 +0000
@@ -51,11 +51,11 @@
mw.config.values.extRevisionSliderOldRev = null;
mw.config.values.extRevisionSliderNewRev = null;
- assert.throws(
+ assert.throws( // eslint-disable-line dot-notation
function () {
view.render( $container );
}
);
} );
-} )( mediaWiki );
+}( mediaWiki ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/tests/qunit/RevisionSlider.HelpDialog.test.js 2016-08-30 11:20:53.227819952 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/tests/qunit/RevisionSlider.HelpDialog.test.js 2016-09-06 16:29:46.117705338 +0000
@@ -40,4 +40,4 @@
);
} );
-} )( mediaWiki );
+}( mediaWiki ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/tests/qunit/RevisionSlider.Revision.test.js 2016-08-30 11:20:53.227819952 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/tests/qunit/RevisionSlider.Revision.test.js 2016-09-06 16:29:46.117705338 +0000
@@ -107,5 +107,5 @@
assert.notOk( rev.hasEmptyComment() );
} );
-} )( mediaWiki );
+}( mediaWiki ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/tests/qunit/RevisionSlider.Slider.test.js 2016-08-30 11:20:53.227819952 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/tests/qunit/RevisionSlider.Slider.test.js 2016-09-06 16:29:46.117705338 +0000
@@ -15,9 +15,9 @@
QUnit.test( 'has revisions', function ( assert ) {
var revs = new RevisionList( [
- new Revision( { revid: 1 } ),
- new Revision( { revid: 2 } )
- ] ),
+ new Revision( { revid: 1 } ),
+ new Revision( { revid: 2 } )
+ ] ),
slider = new Slider( revs );
assert.equal( slider.getRevisions(), revs );
@@ -54,4 +54,4 @@
assert.equal( slider.getFirstVisibleRevisionIndex(), 0 );
} );
-} )( mediaWiki );
+}( mediaWiki ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/tests/qunit/RevisionSlider.RevisionListView.test.js 2016-08-30 11:20:53.227819952 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/tests/qunit/RevisionSlider.RevisionListView.test.js 2016-09-06 16:29:46.117705338 +0000
@@ -189,4 +189,4 @@
assert.ok( $pageSizeLineHtml.text().match( /1,337/ ) );
} );
-} )( mediaWiki );
+}( mediaWiki ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/tests/qunit/QUnit.revisionSlider.testOrSkip.js 2016-08-30 11:20:53.227819952 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/tests/qunit/QUnit.revisionSlider.testOrSkip.js 2016-09-06 16:29:46.117705338 +0000
@@ -11,4 +11,4 @@
}
}
} );
-} )( jQuery );
+}( jQuery ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/tests/qunit/RevisionSlider.RevisionList.test.js 2016-08-30 11:20:53.227819952 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/tests/qunit/RevisionSlider.RevisionList.test.js 2016-09-06 16:29:46.117705338 +0000
@@ -39,10 +39,10 @@
QUnit.test( 'Push appends revisions to the end of the list', function ( assert ) {
var list = new RevisionList( [
- new Revision( { revid: 1, size: 5 } ),
- new Revision( { revid: 2, size: 21 } ),
- new Revision( { revid: 3, size: 13 } )
- ] ),
+ new Revision( { revid: 1, size: 5 } ),
+ new Revision( { revid: 2, size: 21 } ),
+ new Revision( { revid: 3, size: 13 } )
+ ] ),
revisions;
list.push( [
new Revision( { revid: 6, size: 19 } ),
@@ -117,7 +117,7 @@
new Revision( { revid: 3, size: 13 } ),
new Revision( { revid: 6, size: 19 } ),
new Revision( { revid: 8, size: 25 } )
- ] ),
+ ] ),
slicedList = list.slice( 1, 3 ),
revisions = slicedList.getRevisions();
@@ -148,10 +148,10 @@
QUnit.test( 'makeRevisions converts revision data into list of Revision objects', function ( assert ) {
var revs = [
- { revid: 1, size: 5, userGender: 'female' },
- { revid: 2, size: 21, userGender: 'unknown' },
- { revid: 3, size: 13 }
- ],
+ { revid: 1, size: 5, userGender: 'female' },
+ { revid: 2, size: 21, userGender: 'unknown' },
+ { revid: 3, size: 13 }
+ ],
revisions = makeRevisions( revs );
assert.equal( revisions[ 0 ].getId(), 1 );
@@ -161,4 +161,4 @@
assert.equal( revisions[ 2 ].getId(), 3 );
assert.equal( revisions[ 2 ].getSize(), 13 );
} );
-} )( mediaWiki );
+}( mediaWiki ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/tests/qunit/RevisionSlider.DiffPage.test.js 2016-08-30 11:20:53.227819952 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/tests/qunit/RevisionSlider.DiffPage.test.js 2016-09-06 16:29:46.117705338 +0000
@@ -41,4 +41,4 @@
);
} );
-} )( mediaWiki );
+}( mediaWiki ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/RevisionSlider/Gruntfile.js 2016-08-30 11:20:53.219819890 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/RevisionSlider/Gruntfile.js 2016-09-06 16:29:46.105705245 +0000
@@ -1,12 +1,20 @@
-/*jshint node:true */
+/* jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+ grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
+ eslint: {
+ all: [
+ '*.js',
+ 'tests/**/*.js',
+ 'modules/**/*.js'
+ ]
+ },
jshint: {
options: {
jshintrc: true
@@ -38,6 +46,6 @@
}
} );
- grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'stylelint', 'banana' ] );
+ grunt.registerTask( 'test', [ 'eslint', 'jshint', 'jscs', 'jsonlint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/CentralNotice/resources/subscribing/ext.centralNotice.geoIP.js 2016-08-30 11:18:35.662765405 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/CentralNotice/resources/subscribing/ext.centralNotice.geoIP.js 2016-09-08 23:37:48.340719257 +0000
@@ -1,21 +1,22 @@
/**
- * Process location data and set up window.Geo.
- * Provides mw.centralNotice.setWindowGeo().
+ * Processes location data and sets up a promise that resolves with that data.
+ * Sets the global window.Geo and provides the public mw.geoIP object.
+ * TODO Deprecate global window.Geo
* TODO Move this out of CentralNotice. See https://phabricator.wikimedia.org/T102848
*/
( function ( $, mw ) {
var COOKIE_NAME = 'GeoIP',
- GEOIP_LOOKUP_URL = '//geoiplookup.wikimedia.org/';
+ geoPromise;
/**
* Parse geo data in cookieValue and return an object with properties from
- * the fields therein. Returns null if the value couldn't be parsed.
+ * the fields therein. Returns null if the value couldn't be parsed or
+ * doesn't contain location data.
*
* The cookie will look like one of the following:
* - "US:CO:Denver:39.6762:-104.887:v4"
- * - ":::::v6"
- * - ""
+ * - ":::::v4"
*
* @param {string} cookieValue
* @return {?Object}
@@ -45,6 +46,12 @@
.concat( matches.slice( 2 ) );
}
+ // There was no info found if there's no country field, or if it's
+ // empty
+ if ( ( typeof matches[ 1 ] !== 'string' ) || ( matches[ 1 ].length === 0 ) ) {
+ return null;
+ }
+
// Return a juicy Geo object
return {
country: matches[ 1 ],
@@ -57,44 +64,21 @@
}
/**
- * Serialize geoObj to store it in the cookie.
- *
- * @param {Object} geoObj
- * @return {string}
+ * Serialize a geo object and store it in the cookie
+ * @param {Object} geo
*/
- function serializeCookieValue( geoObj ) {
-
+ function storeGeoInCookie( geo ) {
var parts = [
- geoObj.country,
- geoObj.region,
- ( geoObj.city && geoObj.city.replace( /[^a-z]/i, '_' ) ) || '',
- geoObj.lat,
- geoObj.lon,
- ( geoObj.IP && geoObj.IP.match( ':' ) ) ? 'v6' : 'v4'
- ];
-
- return parts.join( ':' );
- }
+ geo.country,
+ geo.region || '',
+ ( geo.city && geo.city.replace( /[^a-z]/i, '_' ) ) || '',
+ geo.lat || '',
+ geo.lon || '',
+ geo.af || ''
+ ],
+ cookieValue = parts.join( ':' );
- /**
- * Can we rely on this geo data?
- *
- * @param {Object} geoObj
- * @return {boolean}
- */
- function isGeoDataValid( geoObj ) {
- // - Ensure 'country' is set to detect whether the cookie was succesfully
- // parsed by parseCookieValue().
- // - Ensure 'country' is non-empty to detect empty values for when
- // geo lookup failed (typically on IPv6 connections). This check
- // is mandatory as otherwise the below code does not fallback to
- // geoiplookup.wikimedia.org (IPv4-powered).
- // - The check for geoObj.af !== 'vx' became mandatory in recent
- // refactoring to account for the temporary Geo value for during the
- // lookup request. It (or something similar) is necesssary.
- return ( typeof geoObj.country === 'string' &&
- geoObj.country.length > 0 &&
- geoObj.af !== 'vx' );
+ $.cookie( COOKIE_NAME, cookieValue, { path: '/' } );
}
/**
@@ -103,113 +87,84 @@
mw.geoIP = {
/**
- * Deferred object used to indicate when window.Geo is fully processed
- * @private
- */
- deferred: $.Deferred(),
-
- /**
- * Attempt to set window.Geo with data from the GeoIP cookie. If that fails,
- * make a background call that sets window.Geo, and attempt to set the
- * cookie.
+ * Don't call this function! It is only exposed for tests.
*
+ * Set a promise that resolves with geo. First try to get data from the
+ * GeoIP cookie. If that fails, and if a background lookup callback
+ * module is configured, try the background lookup.
* @private
*/
- setWindowGeo: function () {
+ makeGeoWithPromise: function () {
var cookieValue = $.cookie( COOKIE_NAME ),
- geoObj;
+ geo, deferred, lookupModule;
// Were we able to read the cookie?
if ( cookieValue ) {
- geoObj = parseCookieValue( cookieValue );
+ geo = parseCookieValue( cookieValue );
- // All good? Set window.Geo and get outta here.
- if ( geoObj && isGeoDataValid( geoObj ) ) {
- window.Geo = geoObj;
- mw.geoIP.deferred.resolve();
+ // All good? Resolve with geo and get outta here.
+ if ( geo ) {
+ deferred = $.Deferred();
+ geoPromise = deferred.promise();
+ deferred.resolve( geo );
return;
}
}
// Handle no geo data from the cookie.
- // First, set window.Geo to signal the lack of geo data.
- // TODO Is this really how we want to do this?
- // Note: This should coordinate with check for af !== 'vx' in
- // isGeoDataValid().
- window.Geo = {
- country: '',
- region: '',
- city: '',
- lat: '',
- lon: '',
- af: 'vx'
- };
-
- // Try to get geo data via a background request.
- // The WMF host used for this has no IPv6 address, so the request will
- // force dual-stack users to fall back to IPv4. This is intentional;
- // IPv4 lookups may succeed when a IPv6 one fails.
- $.ajax( {
- url: GEOIP_LOOKUP_URL,
- dataType: 'script',
- cache: true
- } ).always( function () {
-
- // The script should set window.Geo itself. Regardless of what
- // happened, we'll store the contents of window.Geo in a cookie...
- // If the call was unsuccessful, we'll just be storing the
- // invalid data, which should trigger another attempt next
- // time around. If it was successful and we have good data,
- // subsequent page views should trigger neither an IP lookup in
- // Varnish nor an AJAX request get the data.
-
- // Sanity check
- if ( !window.Geo || typeof window.Geo !== 'object' ) {
-
- mw.log.warn( 'window.Geo cleared or ' +
- 'incorrectly set by GeoIP lookup.' );
-
- mw.geoIP.deferred.reject();
- return;
- }
-
- if ( !isGeoDataValid( window.Geo ) ) {
- mw.geoIP.deferred.reject();
- return;
- }
-
- cookieValue = serializeCookieValue( window.Geo );
-
- // Update the cookie so we don't need to fetch it next time.
- // FIXME: This doesn't work in WMF production, because Varnish sets its initial
- // Geo cookie with a wildcard domain (e.g. '.wikipedia.org'). This avoids sending
- // the client a cookie for each domain. But, doesn't work with this function
- // because cookies vary on path and domain. This doesn't update the '.wikipedia.org'
- // cookie but creates a new 'en.wikipedia.org' cookie.
- // TODO: Update retreival code above to bypass $.cookie() and use document.cookie
- // directly to find the better entry instead of the first one. Both cookies will
- // be available through document.cookie.
- // http://blog.jasoncust.com/2012/01/problem-with-documentcookie.html
- $.cookie( COOKIE_NAME, cookieValue, { path: '/' } );
-
- mw.geoIP.deferred.resolve();
- } );
+ // If there's a background lookup to fall back to, do that
+ lookupModule =
+ mw.config.get( 'wgCentralNoticeGeoIPBackgroundLookupModule' );
+
+ if ( lookupModule ) {
+
+ geoPromise = mw.loader.using( lookupModule )
+
+ // require arg needed for debug mode to work TODO fixed?
+ .then( function ( require ) {
+ var lookupCallback = require( lookupModule );
+
+ // Chaining lookup: here, return the promise provided by
+ // lookupCallback(), so it controls the result of the
+ // new promise we get from then(). Also, the geo object
+ // returned by the lookup promise's then() handler will
+ // be passed on as an argument to the new promise's
+ // done() handlers.
+ return lookupCallback();
+ } );
+
+ // If the lookup was successful, store geo in a cookie
+ geoPromise.done( function ( geo ) {
+ storeGeoInCookie( geo );
+ } );
+
+ // If no background lookup is available, we don't have geo data
+ } else {
+ deferred = $.Deferred();
+ geoPromise = deferred.promise();
+ deferred.reject();
+ }
},
/**
- * Returns a promise that resolves when window.Geo is available. While
+ * Returns a promise that resolves with geo when it's available. While
* it's usually available right away, it may not be if a background
- * call is needed.
+ * call is performed.
*
* @return {jQuery.Promise}
*/
getPromise: function () {
- return mw.geoIP.deferred.promise();
+ return geoPromise;
}
};
- mw.geoIP.setWindowGeo();
+ mw.geoIP.makeGeoWithPromise();
+
+ // For legacy code, set global window.Geo TODO: deprecate
+ geoPromise.done( function ( geo ) {
+ window.Geo = geo;
+ } );
} )( jQuery, mediaWiki );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/CentralNotice/resources/subscribing/ext.centralNotice.display.state.js 2016-08-30 11:18:35.662765405 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/CentralNotice/resources/subscribing/ext.centralNotice.display.state.js 2016-09-08 23:37:48.340719257 +0000
@@ -108,10 +108,9 @@
state.data.uselang = mw.config.get( 'wgUserLanguage' );
state.data.device = urlParams.device || getDeviceCode();
- // data.country may already have been set, if setInvalidGeoData() was
- // called
+ // data.country should already have been set
state.data.country = urlParams.country || state.data.country ||
- ( window.Geo && window.Geo.country ) || UNKNOWN_COUNTRY_CODE;
+ UNKNOWN_COUNTRY_CODE;
// Some parameters should get through even if they have falsey values
state.data.debug = urlParams.debug !== undefined ? true : false;
@@ -176,8 +175,16 @@
banner: null,
/**
+ * Call this with geo data before calling setUp() or
+ * setUpForTestingBanner().
+ */
+ setGeoData: function ( geo ) {
+ state.data.country = ( geo && geo.country );
+ },
+
+ /**
* Call this before calling setUp() or setUpForTestingBanner()
- * if window.Geo is known to be invalid.
+ * if valid geo data is not available.
*/
setInvalidGeoData: function () {
state.data.country = UNKNOWN_COUNTRY_CODE;
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/CentralNotice/resources/subscribing/ext.centralNotice.display.js 2016-08-30 11:18:35.662765405 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/CentralNotice/resources/subscribing/ext.centralNotice.display.js 2016-09-08 23:37:48.340719257 +0000
@@ -504,6 +504,7 @@
mw.geoIP.getPromise()
.fail( cn.internal.state.setInvalidGeoData )
+ .done( cn.internal.state.setGeoData )
.always( reallyChooseAndMaybeDisplay );
},
@@ -513,6 +514,7 @@
// campaign and banner.
mw.geoIP.getPromise()
.fail( cn.internal.state.setInvalidGeoData )
+ .done( cn.internal.state.setGeoData )
.always( function () {
cn.internal.state.setUpForTestingBanner();
setUpDataProperty();
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/CentralNotice/tests/qunit/subscribing/ext.centralNotice.display.tests.js 2016-08-30 11:18:35.666765436 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/CentralNotice/tests/qunit/subscribing/ext.centralNotice.display.tests.js 2016-09-08 23:37:48.340719257 +0000
@@ -3,7 +3,6 @@
'use strict';
var realAjax = $.ajax,
- realWindowGeo = window.Geo,
realGeoIP = mw.geoIP,
realBucketCookie = $.cookie( 'CN' ),
realHideCookie = $.cookie( 'centralnotice_hide_fundraising' ),
@@ -146,12 +145,12 @@
'
'
);
- // Mock window.Geo object and mw.geoIP
- window.Geo = {};
+ // Mock mw.geoIP
mw.geoIP = {
getPromise: function () {
var deferred = $.Deferred();
- deferred.resolve();
+ // Resolve with minimal valid geo object
+ deferred.resolve( { country: 'AQ' } );
return deferred.promise();
}
};
@@ -164,10 +163,6 @@
mw.centralNotice.internal.state.data = {};
mw.centralNotice.internal.state.campaign = null;
mw.centralNotice.internal.state.banner = null;
-
- if ( typeof realWindowGeo !== 'undefined' ) {
- window.Geo = realWindowGeo;
- }
}
} ) );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/CentralNotice/tests/qunit/subscribing/ext.centralNotice.geoIP.tests.js 2016-08-30 11:18:35.666765436 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/CentralNotice/tests/qunit/subscribing/ext.centralNotice.geoIP.tests.js 2016-09-08 23:37:48.340719257 +0000
@@ -4,7 +4,7 @@
var
COOKIE_NAME = 'GeoIP',
BAD_COOKIE = 'asdfasdf',
- UNKNOWN_IPV6_COOKIE = ':::::v6',
+ UNKNOWN_COOKIE = ':::::v4',
GOOD_COOKIE = 'US:CO:Denver:39.6762:-104.887:v4',
GOOD_GEO = {
af: 'v4',
@@ -14,94 +14,49 @@
lon: -104.887,
region: 'CO'
},
- realAjax = $.ajax,
- realCookie = $.cookie( COOKIE_NAME ),
- realDeferred = mw.geoIP.deferred,
- realGeo = window.Geo;
+ realCookie = $.cookie( COOKIE_NAME );
QUnit.module( 'ext.centralNotice.geoIP', QUnit.newMwEnvironment( {
teardown: function () {
- $.ajax = realAjax;
// This cookie is always set to '/' in prod and should be here too.
// If a cookie of the same name is set without a path it may be
// found first by the jquery getter and will screw some behaviors
// up until it is removed.
$.cookie( COOKIE_NAME, realCookie, { path: '/' } );
- mw.geoIP.deferred = realDeferred;
- window.Geo = realGeo;
}
} ) );
- QUnit.test( 'parse geo from valid cookie', 2, function ( assert ) {
- var madeAjaxCall = false;
+ QUnit.test( 'parse geo from valid cookie', 1, function ( assert ) {
$.cookie( COOKIE_NAME, GOOD_COOKIE, { path: '/' } );
- mw.geoIP.deferred = $.Deferred();
- window.Geo = null;
- $.ajax = function () {
- madeAjaxCall = true;
- return $.Deferred().resolve().promise();
- };
-
- mw.geoIP.setWindowGeo();
- mw.geoIP.getPromise().then( function () {
- assert.equal( madeAjaxCall, false, 'no ajax call if cookie was valid' );
- assert.deepEqual( window.Geo, GOOD_GEO, 'good geo was set' );
+ mw.geoIP.makeGeoWithPromise();
+ return mw.geoIP.getPromise().then( function ( geo ) {
+ assert.deepEqual( geo, GOOD_GEO, 'parsed geo' );
+ }, function () {
+ // Message to show when promise fails
+ return 'geo not retrieved';
} );
} );
- QUnit.test( 'restore geo if cookie is invalid', 3, function ( assert ) {
- // Break the cookie. This should kill window.Geo
+ QUnit.test( 'cookie invalid', 1, function ( assert ) {
$.cookie( COOKIE_NAME, BAD_COOKIE, { path: '/' } );
- mw.geoIP.deferred = $.Deferred();
- window.Geo = null;
- // setWindowGeo() should make an ajax call that restores window.Geo
- $.ajax = function () {
- assert.equal( window.Geo.af, 'vx', 'geo filled with vx' );
- window.Geo = GOOD_GEO;
- return $.Deferred().resolve().promise();
- };
-
- mw.geoIP.setWindowGeo();
- mw.geoIP.getPromise().then( function () {
- assert.equal( $.cookie( COOKIE_NAME ), GOOD_COOKIE, 'cookie was restored' );
- assert.deepEqual( window.Geo, GOOD_GEO, 'good geo was restored' );
+ mw.geoIP.makeGeoWithPromise();
+ mw.geoIP.getPromise().fail( function () {
+ assert.ok( true, 'geoIP promise fails' );
+ } ).done( function () {
+ assert.ok( false, 'geoIP promise fails' );
} );
} );
- QUnit.test( 'geo info unavailable', 2, function ( assert ) {
- $.cookie( COOKIE_NAME, BAD_COOKIE, { path: '/' } );
- mw.geoIP.deferred = $.Deferred();
- window.Geo = null;
-
- $.ajax = function () {
- // Mock failed call, don't reset geo.
- return $.Deferred().reject().promise();
- };
+ QUnit.test( 'cookie valid but unknown location', 1, function ( assert ) {
+ $.cookie( COOKIE_NAME, UNKNOWN_COOKIE, { path: '/' } );
- mw.geoIP.setWindowGeo();
+ mw.geoIP.makeGeoWithPromise();
mw.geoIP.getPromise().fail( function () {
- assert.equal( $.cookie( COOKIE_NAME ), BAD_COOKIE, 'cookie unchanged' );
- assert.equal( window.Geo.af, 'vx', 'vx geo was set' );
- } );
- } );
-
- QUnit.test( 'unknown ipv6 cookie', 3, function ( assert ) {
- $.cookie( COOKIE_NAME, UNKNOWN_IPV6_COOKIE, { path: '/' } );
- mw.geoIP.deferred = $.Deferred();
- window.Geo = null;
-
- $.ajax = function () {
- assert.equal( window.Geo.af, 'vx', 'geo filled with vx' );
- window.Geo = GOOD_GEO;
- return $.Deferred().resolve().promise();
- };
-
- mw.geoIP.setWindowGeo();
- mw.geoIP.getPromise().done( function () {
- assert.equal( $.cookie( COOKIE_NAME ), GOOD_COOKIE, 'cookie updated' );
- assert.deepEqual( window.Geo, GOOD_GEO, 'good geo was loaded' );
+ assert.ok( true, 'geoIP promise fails' );
+ } ).done( function () {
+ assert.ok( false, 'geoIP promise fails' );
} );
} );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 2016-08-30 11:22:17.184463561 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 2016-09-06 16:31:20.166430859 +0000
@@ -194,13 +194,38 @@
*/
ve.init.mw.ArticleTarget.prototype.setMode = function ( mode ) {
if ( mode !== this.mode ) {
- $( '#ca-ve-edit' ).toggleClass( 'selected', mode === 'visual' );
- $( '#ca-edit' ).toggleClass( 'selected', mode === 'source' );
this.mode = mode;
+ this.updateTabs( true );
}
};
/**
+ * Update state of editing tabs
+ */
+ve.init.mw.ArticleTarget.prototype.updateTabs = function ( editing ) {
+ var selectVe = false,
+ selectEdit = false;
+
+ // Deselect current mode (e.g. "view" or "history"). In skins like monobook that don't have
+ // separate tab sections for content actions and namespaces the below is a no-op.
+ $( '#p-views' ).find( 'li.selected' ).removeClass( 'selected' );
+
+ if ( editing ) {
+ if ( $( '#ca-ve-edit' ).length ) {
+ selectVe = this.mode === 'visual';
+ selectEdit = this.mode === 'source';
+ } else {
+ // Single edit tab
+ selectEdit = true;
+ }
+ } else {
+ $( '#ca-view' ).addClass( 'selected' );
+ }
+ $( '#ca-ve-edit' ).toggleClass( 'selected', selectVe );
+ $( '#ca-edit' ).toggleClass( 'selected', selectEdit );
+};
+
+/**
* Handle response to a successful load request.
*
* This method is called within the context of a target instance. If successful the DOM from the
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js 2016-08-30 11:22:17.184463561 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js 2016-09-06 16:31:20.166430859 +0000
@@ -113,7 +113,7 @@
}
},
- requestParsoidData: function ( pageName, oldid, targetName, modified ) {
+ requestParsoidData: function ( pageName, oldid, targetName, modified, wikitext ) {
var start, apiXhr, restbaseXhr, apiPromise, restbasePromise, dataPromise, pageHtmlUrl,
switched = false,
fromEditedState = false,
@@ -151,7 +151,7 @@
ve.track( 'trace.restbaseLoad.enter' );
if (
conf.fullRestbaseUrl &&
- $( '#wpTextbox1' ).textSelection( 'getContents' ) &&
+ ( wikitext || ( wikitext = $( '#wpTextbox1' ).textSelection( 'getContents' ) ) ) &&
!$( '[name=wpSection]' ).val()
) {
switched = true;
@@ -166,7 +166,7 @@
data: {
title: pageName,
oldid: oldid,
- wikitext: $( '#wpTextbox1' ).textSelection( 'getContents' ),
+ wikitext: wikitext,
stash: 'true'
},
// Should be synchronised with ApiVisualEditor.php
@@ -196,9 +196,6 @@
duration: ve.now() - start,
targetName: targetName
} );
- mw.track( 'event.VET135171', {
- msg: 'getResponseHeader: ' + jqxhr.getResponseHeader( 'etag' )
- } );
return [ data, jqxhr.getResponseHeader( 'etag' ) ];
},
function ( response ) {
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 2016-08-30 11:22:17.180463531 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 2016-09-06 16:31:20.162430827 +0000
@@ -24,6 +24,9 @@
pageCanLoadVE, init, targetPromise, enable, tempdisable, autodisable,
tabPreference, userPrefEnabled, userPrefPreferShow, initialWikitext, oldid,
onlyTabIsVE, isLoading,
+ editModes = {
+ edit: 'visual'
+ },
active = false,
targetLoaded = false,
progressStep = 0,
@@ -34,6 +37,10 @@
],
plugins = [];
+ if ( mw.config.get( 'wgVisualEditorConfig' ).enableWikitext ) {
+ editModes.editsource = 'source';
+ }
+
function showLoading() {
var $content, contentRect, offsetTop, windowHeight, top, bottom, middle;
@@ -152,18 +159,6 @@
target = ve.init.mw.targetFactory.create(
conf.contentModels[ mw.config.get( 'wgPageContentModel' ) ]
);
- target.connect( this, {
- transformPage: function () {
- if ( onlyTabIsVE ) {
- $( '#ca-edit' ).addClass( 'selected' );
- }
- },
- restorePage: function () {
- if ( onlyTabIsVE ) {
- $( '#ca-edit' ).removeClass( 'selected' );
- }
- }
- } );
target.setContainer( $( '#content' ) );
targetLoaded = true;
return target;
@@ -188,7 +183,7 @@
trackActivateStart( { type: 'page', mechanism: 'click' } );
if ( !active ) {
- if ( uri.query.action !== 'edit' && uri.query.veaction !== 'edit' && uri.query.veaction !== 'editsource' ) {
+ if ( uri.query.action !== 'edit' && !( uri.query.veaction in editModes ) ) {
if ( history.pushState ) {
// Replace the current state with one that is tagged as ours, to prevent the
// back button from breaking when used to exit VE. FIXME: there should be a better
@@ -648,7 +643,7 @@
trackActivateStart( { type: 'section', mechanism: 'click' } );
- if ( history.pushState && uri.query.veaction !== 'edit' && uri.query.veaction !== 'editsource' ) {
+ if ( history.pushState && !( uri.query.veaction in editModes ) ) {
// Replace the current state with one that is tagged as ours, to prevent the
// back button from breaking when used to exit VE. FIXME: there should be a better
// way to do this. See also similar code in the DesktopArticleTarget constructor.
@@ -782,7 +777,7 @@
) {
if (
// … if on a ?veaction=edit page
- ( isViewPage && ( uri.query.veaction === 'edit' || uri.query.veaction === 'editsource' ) ) ||
+ ( isViewPage && uri.query.veaction in editModes ) ||
// … or if on ?action=edit in single edit mode and the user wants it
(
isEditPage &&
@@ -812,7 +807,7 @@
type: uri.query.vesection === undefined ? 'page' : 'section',
mechanism: 'url'
} );
- activateTarget( uri.query.veaction === 'editsource' ? 'source' : 'visual' );
+ activateTarget( editModes[ uri.query.veaction ] );
} else if ( pageCanLoadVE && userPrefEnabled ) {
// Page can be edited in VE, parameters are good, user prefs are mostly good
// but have visualeditor-tabs=prefer-wt? Add a keyboard shortcut to go to
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js 2016-08-30 11:22:17.184463561 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js 2016-09-06 16:31:20.166430859 +0000
@@ -43,16 +43,6 @@
/**
* @inheritdoc
*/
-ve.init.mw.DesktopWikitextArticleTarget.prototype.restorePage = function () {
- $( '#ca-edit' ).removeClass( 'selected' );
-
- // Parent method
- ve.init.mw.DesktopWikitextArticleTarget.super.prototype.restorePage.apply( this, arguments );
-};
-
-/**
- * @inheritdoc
- */
ve.init.mw.DesktopWikitextArticleTarget.prototype.switchToWikitextEditor = function ( discardChanges, modified ) {
var dataPromise,
target = this;
@@ -75,19 +65,68 @@
this.reloadSurface( dataPromise );
};
+/**
+ * Switch to the visual editor.
+ */
ve.init.mw.DesktopWikitextArticleTarget.prototype.switchToVisualEditor = function () {
+ var dataPromise;
+
this.setMode( 'visual' );
- this.reloadSurface();
+
+ dataPromise = mw.libs.ve.targetLoader.requestParsoidData(
+ this.pageName,
+ this.revid,
+ this.constructor.name,
+ this.edited,
+ this.getWikitextFromDocument( this.getSurface().getDom() )
+ );
+
+ this.reloadSurface( dataPromise );
+};
+
+/**
+ * @inheritdoc
+ */
+ve.init.mw.DesktopWikitextArticleTarget.prototype.onWindowPopState = function ( e ) {
+ var veaction, mode;
+
+ if ( !this.verifyPopState( e.state ) ) {
+ return;
+ }
+
+ // Parent method
+ ve.init.mw.DesktopWikitextArticleTarget.super.prototype.onWindowPopState.apply( this, arguments );
+
+ veaction = this.currentUri.query.veaction;
+ mode = veaction === 'editsource' ? 'source' : 'visual';
+
+ if ( this.active ) {
+ if ( veaction === 'editsource' && this.mode === 'visual' ) {
+ this.actFromPopState = true;
+ this.switchToWikitextEditor();
+ } else if ( veaction === 'edit' && this.mode === 'source' ) {
+ this.actFromPopState = true;
+ this.switchToVisualEditor();
+ }
+ }
};
+/**
+ * Reload the target surface in the new editor mode
+ */
ve.init.mw.DesktopWikitextArticleTarget.prototype.reloadSurface = function ( dataPromise ) {
var target = this;
// Create progress - will be discarded when surface is destroyed.
- this.getSurface().createProgress( $.Deferred().promise() );
+ this.getSurface().createProgress(
+ $.Deferred().promise(),
+ ve.msg( this.mode === 'source' ? 'visualeditor-mweditmodesource-progress' : 'visualeditor-mweditmodeve-progress' ),
+ true /* non-cancellable */
+ );
this.activating = true;
this.activatingDeferred = $.Deferred();
this.load( dataPromise );
this.activatingDeferred.done( function () {
+ target.updateHistoryState();
target.afterActivate();
target.setupTriggerListeners();
} );
@@ -228,7 +267,7 @@
if ( this.mode === 'source' ) {
data = ve.extendObject( {}, options, { format: 'json' } );
- data.wikitext = Array.prototype.map.call( doc.body.children, function ( p ) { return p.innerText; } ).join( '\n' );
+ data.wikitext = this.getWikitextFromDocument( doc );
return new mw.Api().post( data, { contentType: 'multipart/form-data' } );
} else {
@@ -237,6 +276,16 @@
}
};
+/**
+ * Get wikitext for the whole document
+ *
+ * @param {ve.dm.Document} doc Document
+ * @return {string} Wikitext
+ */
+ve.init.mw.DesktopWikitextArticleTarget.prototype.getWikitextFromDocument = function ( doc ) {
+ return Array.prototype.map.call( doc.body.children, function ( p ) { return p.innerText; } ).join( '\n' );
+};
+
/* Registration */
ve.init.mw.targetFactory.register( ve.init.mw.DesktopWikitextArticleTarget );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 2016-08-30 11:22:17.184463561 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 2016-09-06 16:31:20.166430859 +0000
@@ -765,8 +765,9 @@
* Add the redirect header when a redirect is inserted into the page.
*
* @param {ve.dm.MetaItem} metaItem Item that was inserted
+ * @param {boolean} [loading=false] Whether VE is loading.
*/
-ve.init.mw.DesktopArticleTarget.prototype.onMetaItemInserted = function ( metaItem ) {
+ve.init.mw.DesktopArticleTarget.prototype.onMetaItemInserted = function ( metaItem, loading ) {
var title, target, $link;
if ( metaItem.getType() === 'mwRedirect' ) {
target = this;
@@ -776,6 +777,10 @@
.text( title );
ve.init.platform.linkCache.styleElement( title, $link );
+ if ( loading ) {
+ this.$originalRedirectMsg = $( '.redirectMsg' ).clone();
+ this.$originalRedirectSub = $( '#redirectsub, #redirectsub + br' ).clone();
+ }
// Add redirect target header
if ( !$( '#redirectsub' ).length ) {
$( '#contentSub' ).append(
@@ -785,7 +790,6 @@
$( '
' )
);
}
- this.$originalContent.find( '.redirectMsg' ).remove();
$( '
' )
// Bit of a hack: Make sure any redirect note is styled
.addClass( 'redirectMsg mw-content-' + $( 'html' ).attr( 'dir' ) )
@@ -1173,12 +1177,9 @@
* Page modifications for switching to edit mode.
*/
ve.init.mw.DesktopArticleTarget.prototype.transformPage = function () {
- var uri, $content;
+ var $content;
- // Deselect current mode (e.g. "view" or "history"). In skins like monobook that don't have
- // separate tab sections for content actions and namespaces the below is a no-op.
- $( '#p-views' ).find( 'li.selected' ).removeClass( 'selected' );
- $( '#ca-ve-edit' ).addClass( 'selected' );
+ this.updateTabs( true );
this.emit( 'transformPage' );
mw.hook( 've.activate' ).fire();
@@ -1196,13 +1197,22 @@
// Support IE9: Disable links
$( '.ve-init-mw-desktopArticleTarget-uneditableContent' ).on( 'click.ve-target', function () { return false; } );
- // Push veaction=edit url in history (if not already. If we got here by a veaction=edit
+ this.updateHistoryState();
+};
+
+/**
+ * Update the history state based on the editor mode
+ */
+ve.init.mw.DesktopArticleTarget.prototype.updateHistoryState = function () {
+ var uri,
+ veaction = this.mode === 'visual' ? 'edit' : 'editsource';
+
+ // Push veaction=edit(source) url in history (if not already. If we got here by a veaction=edit(source)
// permalink then it will be there already and the constructor called #activate)
if (
!this.actFromPopState &&
history.pushState &&
- this.currentUri.query.veaction !== 'edit' &&
- this.currentUri.query.veaction !== 'editsource' &&
+ this.currentUri.query.veaction !== veaction &&
this.currentUri.query.action !== 'edit'
) {
// Set the current URL
@@ -1215,7 +1225,7 @@
uri.query.action = 'edit';
mw.config.set( 'wgAction', 'edit' );
} else {
- uri.query.veaction = 'edit';
+ uri.query.veaction = veaction;
delete uri.query.action;
mw.config.set( 'wgAction', 'view' );
}
@@ -1234,11 +1244,21 @@
// Skins like monobook don't have a tab for view mode and instead just have the namespace tab
// selected. We didn't deselect the namespace tab, so we're ready after deselecting #ca-ve-edit.
// In skins having #ca-view (like Vector), select that.
- $( '#ca-ve-edit' ).removeClass( 'selected' );
- $( '#ca-view' ).addClass( 'selected' );
+ this.updateTabs( false );
// Remove any VE-added redirectMsg
- $( '.mw-body-content > .ve-redirect-header' ).remove();
+ if ( $( '.mw-body-content > .ve-redirect-header' ).length ) {
+ $( '.mw-body-content > .ve-redirect-header' ).remove();
+ $( '#contentSub #redirectSub, #contentSub #redirectSub + br' ).remove();
+ }
+
+ // Restore any previous redirectMsg/redirectsub
+ if ( this.$originalRedirectMsg ) {
+ this.$originalRedirectMsg.prependTo( $( '#mw-content-text' ) );
+ this.$originalRedirectSub.prependTo( $( '#contentSub' ) );
+ this.$originalRedirectMsg = undefined;
+ this.$originalRedirectSub = undefined;
+ }
mw.hook( 've.deactivate' ).fire();
this.emit( 'restorePage' );
@@ -1271,14 +1291,13 @@
history.pushState( this.popState, document.title, uri );
}
}
- this.actFromPopState = false;
};
/**
* @param {Event} e Native event object
*/
ve.init.mw.DesktopArticleTarget.prototype.onWindowPopState = function ( e ) {
- var newUri;
+ var newUri, veaction;
if ( !this.verifyPopState( e.state ) ) {
// Ignore popstate events fired for states not created by us
@@ -1287,12 +1306,13 @@
}
newUri = this.currentUri = new mw.Uri( location.href );
+ veaction = newUri.query.veaction;
- if ( !this.active && newUri.query.veaction === 'edit' ) {
+ if ( !this.active && ( veaction === 'edit' || veaction === 'editsource' ) ) {
this.actFromPopState = true;
this.activate();
}
- if ( this.active && newUri.query.veaction !== 'edit' ) {
+ if ( this.active && veaction !== 'edit' && veaction !== 'editsource' ) {
this.actFromPopState = true;
this.deactivate( false, 'navigate-back' );
}
@@ -1333,6 +1353,8 @@
}
// Remove any VE-added ve-redirect-header
$( '.redirectMsg' ).removeClass( 've-redirect-header' );
+ this.$originalRedirectMsg = undefined;
+ this.$originalRedirectSub = undefined;
// Re-set any edit section handlers now that the page content has been replaced
if (
@@ -1446,7 +1468,7 @@
redirectMetaItems = this.getSurface().getModel().getMetaList().getItemsInGroup( 'mwRedirect' );
if ( redirectMetaItems.length ) {
- this.onMetaItemInserted( redirectMetaItems[ 0 ] );
+ this.onMetaItemInserted( redirectMetaItems[ 0 ], true );
windowAction = ve.ui.actionFactory.create( 'window', this.getSurface() );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ce/annotations/ve.ce.MWNowikiAnnotation.js 2016-08-30 11:22:17.124463102 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ce/annotations/ve.ce.MWNowikiAnnotation.js 2016-09-06 16:31:20.058430024 +0000
@@ -14,9 +14,9 @@
* @param {ve.dm.MWNowikiAnnotation} model Model to observe
* @param {Object} [config] Configuration options
*/
-ve.ce.MWNowikiAnnotation = function VeCeMWNowikiAnnotation( model, config ) {
+ve.ce.MWNowikiAnnotation = function VeCeMWNowikiAnnotation() {
// Parent constructor
- ve.ce.Annotation.call( this, model, config );
+ ve.ce.MWNowikiAnnotation.super.apply( this, arguments );
// DOM changes
this.$element.addClass( 've-ce-mwNowikiAnnotation' );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWSignatureNode.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWSignatureNode.js 2016-09-06 16:31:20.058430024 +0000
@@ -33,9 +33,9 @@
* @param {ve.dm.MWSignatureNode} model Model to observe
* @param {Object} [config] Configuration options
*/
-ve.ce.MWSignatureNode = function VeCeMWSignatureNode( model ) {
+ve.ce.MWSignatureNode = function VeCeMWSignatureNode() {
// Parent constructor
- ve.ce.MWTransclusionInlineNode.call( this, model );
+ ve.ce.MWSignatureNode.super.apply( this, arguments );
// DOM changes
this.$element.addClass( 've-ce-mwSignatureNode' );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWMagicLinkNode.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWMagicLinkNode.js 2016-09-06 16:31:20.058430024 +0000
@@ -15,9 +15,9 @@
* @param {ve.dm.MWMagicLinkNode} model Model to observe
* @param {Object} [config] Configuration options
*/
-ve.ce.MWMagicLinkNode = function VeCeMWMagicLinkNode( model, config ) {
+ve.ce.MWMagicLinkNode = function VeCeMWMagicLinkNode() {
// Parent constructor
- ve.ce.LeafNode.call( this, model, config );
+ ve.ce.MWMagicLinkNode.super.apply( this, arguments );
// Mixin constructors
ve.ce.FocusableNode.call( this );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWEntityNode.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWEntityNode.js 2016-09-06 16:31:20.058430024 +0000
@@ -14,9 +14,9 @@
* @param {ve.dm.MWEntityNode} model Model to observe
* @param {Object} [config] Configuration options
*/
-ve.ce.MWEntityNode = function VeCeMWEntityNode( model, config ) {
+ve.ce.MWEntityNode = function VeCeMWEntityNode() {
// Parent constructor
- ve.ce.LeafNode.call( this, model, config );
+ ve.ce.MWEntityNode.super.apply( this, arguments );
// DOM changes
this.$element.addClass( 've-ce-mwEntityNode' );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWImageCaptionNode.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWImageCaptionNode.js 2016-09-06 16:31:20.058430024 +0000
@@ -14,9 +14,9 @@
* @param {ve.dm.MWImageCaptionNode} model Model to observe
* @param {Object} [config] Configuration options
*/
-ve.ce.MWImageCaptionNode = function VeCeMWImageCaptionNode( model, config ) {
+ve.ce.MWImageCaptionNode = function VeCeMWImageCaptionNode() {
// Parent constructor
- ve.ce.BranchNode.call( this, model, config );
+ ve.ce.MWImageCaptionNode.super.apply( this, arguments );
};
/* Inheritance */
@@ -46,7 +46,7 @@
}
// Parent method
- ve.ce.BranchNode.prototype.onSplice.apply( this, arguments );
+ ve.ce.MWImageCaptionNode.super.prototype.onSplice.apply( this, arguments );
// Reset the magnify icon, prepend it to the caption
this.$magnify.prependTo( this.$element );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWPreformattedNode.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWPreformattedNode.js 2016-09-06 16:31:20.058430024 +0000
@@ -14,9 +14,9 @@
* @param {ve.dm.MWPreformattedNode} model Model to observe
* @param {Object} [config] Configuration options
*/
-ve.ce.MWPreformattedNode = function VeCeMWPreformattedNode( model, config ) {
+ve.ce.MWPreformattedNode = function VeCeMWPreformattedNode() {
// Parent constructor
- ve.ce.PreformattedNode.call( this, model, config );
+ ve.ce.MWPreformattedNode.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWInlineImageNode.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWInlineImageNode.js 2016-09-06 16:31:20.058430024 +0000
@@ -16,10 +16,10 @@
* @param {ve.dm.MWInlineImageNode} model Model to observe
* @param {Object} [config] Configuration options
*/
-ve.ce.MWInlineImageNode = function VeCeMWInlineImageNode( model, config ) {
+ve.ce.MWInlineImageNode = function VeCeMWInlineImageNode() {
var isError;
// Parent constructor
- ve.ce.LeafNode.call( this, model, config );
+ ve.ce.MWInlineImageNode.super.apply( this, arguments );
isError = this.model.getAttribute( 'isError' );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWNumberedExternalLinkNode.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWNumberedExternalLinkNode.js 2016-09-06 16:31:20.058430024 +0000
@@ -15,9 +15,9 @@
* @param {ve.dm.MWNumberedExternalLinkNode} model Model to observe
* @param {Object} [config] Configuration options
*/
-ve.ce.MWNumberedExternalLinkNode = function VeCeMWNumberedExternalLinkNode( model, config ) {
+ve.ce.MWNumberedExternalLinkNode = function VeCeMWNumberedExternalLinkNode() {
// Parent constructor
- ve.ce.LeafNode.call( this, model, config );
+ ve.ce.MWNumberedExternalLinkNode.super.apply( this, arguments );
// Mixin constructors
ve.ce.FocusableNode.call( this );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js 2016-08-30 11:22:17.124463102 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js 2016-09-06 16:31:20.058430024 +0000
@@ -16,11 +16,11 @@
* @param {ve.dm.MWBlockImageNode} model Model to observe
* @param {Object} [config] Configuration options
*/
-ve.ce.MWBlockImageNode = function VeCeMWBlockImageNode( model, config ) {
+ve.ce.MWBlockImageNode = function VeCeMWBlockImageNode() {
var type, align, isError;
// Parent constructor
- ve.ce.BranchNode.call( this, model, config );
+ ve.ce.MWBlockImageNode.super.apply( this, arguments );
type = this.model.getAttribute( 'type' );
align = this.model.getAttribute( 'align' );
@@ -256,7 +256,7 @@
*/
ve.ce.MWBlockImageNode.prototype.onSetup = function () {
// Parent method
- ve.ce.BranchNode.prototype.onSetup.call( this );
+ ve.ce.MWBlockImageNode.super.prototype.onSetup.call( this );
this.updateClasses();
};
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/models/ve.dm.MWTransclusionContentModel.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/models/ve.dm.MWTransclusionContentModel.js 2016-09-06 16:31:20.066430087 +0000
@@ -17,7 +17,7 @@
*/
ve.dm.MWTransclusionContentModel = function VeDmMWTransclusionContentModel( transclusion, value ) {
// Parent constructor
- ve.dm.MWTransclusionPartModel.call( this, transclusion );
+ ve.dm.MWTransclusionContentModel.super.call( this, transclusion );
// Properties
this.value = value || '';
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js 2016-09-06 16:31:20.066430087 +0000
@@ -19,7 +19,7 @@
*/
ve.dm.MWTemplateModel = function VeDmMWTemplateModel( transclusion, target ) {
// Parent constructor
- ve.dm.MWTransclusionPartModel.call( this, transclusion );
+ ve.dm.MWTemplateModel.super.call( this, transclusion );
// Properties
this.target = target;
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/models/ve.dm.MWTemplatePlaceholderModel.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/models/ve.dm.MWTemplatePlaceholderModel.js 2016-09-06 16:31:20.066430087 +0000
@@ -14,9 +14,9 @@
* @constructor
* @param {ve.dm.MWTransclusionModel} transclusion Transclusion
*/
-ve.dm.MWTemplatePlaceholderModel = function VeDmMWTemplatePlaceholderModel( transclusion ) {
+ve.dm.MWTemplatePlaceholderModel = function VeDmMWTemplatePlaceholderModel() {
// Parent constructor
- ve.dm.MWTransclusionPartModel.call( this, transclusion );
+ ve.dm.MWTemplatePlaceholderModel.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWIndexDisableMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWIndexDisableMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWIndexDisableMetaItem = function VeDmMWIndexDisableMetaItem( element ) {
+ve.dm.MWIndexDisableMetaItem = function VeDmMWIndexDisableMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWIndexDisableMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWRedirectMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWRedirectMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWRedirectMetaItem = function VeDmMWRedirectMetaItem( element ) {
+ve.dm.MWRedirectMetaItem = function VeDmMWRedirectMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWRedirectMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNewSectionEditDisableMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNewSectionEditDisableMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWNewSectionEditDisableMetaItem = function VeDmMWNewSectionEditDisableMetaItem( element ) {
+ve.dm.MWNewSectionEditDisableMetaItem = function VeDmMWNewSectionEditDisableMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWNewSectionEditDisableMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNewSectionEditForceMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNewSectionEditForceMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWNewSectionEditForceMetaItem = function VeDmMWNewSectionEditForceMetaItem( element ) {
+ve.dm.MWNewSectionEditForceMetaItem = function VeDmMWNewSectionEditForceMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWNewSectionEditForceMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWDisplayTitleMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWDisplayTitleMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWDisplayTitleMetaItem = function VeDmMWDisplayTitleMetaItem( element ) {
+ve.dm.MWDisplayTitleMetaItem = function VeDmMWDisplayTitleMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWDisplayTitleMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWHiddenCategoryMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWHiddenCategoryMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWHiddenCategoryMetaItem = function VeDmMWHiddenCategoryMetaItem( element ) {
+ve.dm.MWHiddenCategoryMetaItem = function VeDmMWHiddenCategoryMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWHiddenCategoryMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNoContentConvertMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNoContentConvertMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWNoContentConvertMetaItem = function VeDmMWNoContentConvertMetaItem( element ) {
+ve.dm.MWNoContentConvertMetaItem = function VeDmMWNoContentConvertMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWNoContentConvertMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWTOCForceMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWTOCForceMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWTOCForceMetaItem = function VeDmMWTOCForceMetaItem( element ) {
+ve.dm.MWTOCForceMetaItem = function VeDmMWTOCForceMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWTOCForceMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWAlienMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWAlienMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -14,9 +14,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWAlienMetaItem = function VeDmMWAlienMetaItem( element ) {
+ve.dm.MWAlienMetaItem = function VeDmMWAlienMetaItem() {
// Parent constructor
- ve.dm.AlienMetaItem.call( this, element );
+ ve.dm.MWAlienMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNoEditSectionMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNoEditSectionMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWNoEditSectionMetaItem = function VeDmMWNoEditSectionMetaItem( element ) {
+ve.dm.MWNoEditSectionMetaItem = function VeDmMWNoEditSectionMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWNoEditSectionMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWLanguageMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWLanguageMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWLanguageMetaItem = function VeDmMWLanguageMetaItem( element ) {
+ve.dm.MWLanguageMetaItem = function VeDmMWLanguageMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWLanguageMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWStaticRedirectMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWStaticRedirectMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWStaticRedirectMetaItem = function VeDmMWStaticRedirectMetaItem( element ) {
+ve.dm.MWStaticRedirectMetaItem = function VeDmMWStaticRedirectMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWStaticRedirectMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWCategoryMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWCategoryMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWCategoryMetaItem = function VeDmMWCategoryMetaItem( element ) {
+ve.dm.MWCategoryMetaItem = function VeDmMWCategoryMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWCategoryMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWIndexForceMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWIndexForceMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWIndexForceMetaItem = function VeDmMWIndexForceMetaItem( element ) {
+ve.dm.MWIndexForceMetaItem = function VeDmMWIndexForceMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWIndexForceMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWDefaultSortMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWDefaultSortMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWDefaultSortMetaItem = function VeDmMWDefaultSortMetaItem( element ) {
+ve.dm.MWDefaultSortMetaItem = function VeDmMWDefaultSortMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWDefaultSortMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNoTitleConvertMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNoTitleConvertMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWNoTitleConvertMetaItem = function VeDmMWNoTitleConvertMetaItem( element ) {
+ve.dm.MWNoTitleConvertMetaItem = function VeDmMWNoTitleConvertMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWNoTitleConvertMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNoGalleryMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWNoGalleryMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWNoGalleryMetaItem = function VeDmMWNoGalleryMetaItem( element ) {
+ve.dm.MWNoGalleryMetaItem = function VeDmMWNoGalleryMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWNoGalleryMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWTOCDisableMetaItem.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/metaitems/ve.dm.MWTOCDisableMetaItem.js 2016-09-06 16:31:20.062430056 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
-ve.dm.MWTOCDisableMetaItem = function VeDmMWTOCDisableMetaItem( element ) {
+ve.dm.MWTOCDisableMetaItem = function VeDmMWTOCDisableMetaItem() {
// Parent constructor
- ve.dm.MetaItem.call( this, element );
+ ve.dm.MWTOCDisableMetaItem.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js 2016-09-06 21:33:14.788051193 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js 2016-09-06 21:45:12.921471919 +0000
@@ -20,9 +20,9 @@
* @constructor
* @param {Object} element
*/
-ve.dm.MWExternalLinkAnnotation = function VeDmMWExternalLinkAnnotation( element ) {
+ve.dm.MWExternalLinkAnnotation = function VeDmMWExternalLinkAnnotation() {
// Parent constructor
- ve.dm.LinkAnnotation.call( this, element );
+ ve.dm.MWExternalLinkAnnotation.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/annotations/ve.dm.MWNowikiAnnotation.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/annotations/ve.dm.MWNowikiAnnotation.js 2016-09-06 16:31:20.062430056 +0000
@@ -16,9 +16,9 @@
* @constructor
* @param {Object} element [description]
*/
-ve.dm.MWNowikiAnnotation = function VeDmMWNowikiAnnotation( element ) {
+ve.dm.MWNowikiAnnotation = function VeDmMWNowikiAnnotation() {
// Parent constructor
- ve.dm.Annotation.call( this, element );
+ ve.dm.MWNowikiAnnotation.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js 2016-08-30 11:22:17.128463132 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js 2016-09-06 16:31:20.062430056 +0000
@@ -17,9 +17,9 @@
* @constructor
* @param {Object} element
*/
-ve.dm.MWInternalLinkAnnotation = function VeDmMWInternalLinkAnnotation( element ) {
+ve.dm.MWInternalLinkAnnotation = function VeDmMWInternalLinkAnnotation() {
// Parent constructor
- ve.dm.LinkAnnotation.call( this, element );
+ ve.dm.MWInternalLinkAnnotation.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -19,7 +19,7 @@
*/
ve.dm.MWBlockImageNode = function VeDmMWBlockImageNode() {
// Parent constructor
- ve.dm.BranchNode.apply( this, arguments );
+ ve.dm.MWBlockImageNode.super.apply( this, arguments );
// Mixin constructors
ve.dm.MWImageNode.call( this );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWPreformattedNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWPreformattedNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -17,7 +17,7 @@
*/
ve.dm.MWPreformattedNode = function VeDmMWPreformattedNode() {
// Parent constructor
- ve.dm.PreformattedNode.apply( this, arguments );
+ ve.dm.MWPreformattedNode.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -17,7 +17,7 @@
*/
ve.dm.MWMagicLinkNode = function VeDmMWMagicLinkNode() {
// Parent constructor
- ve.dm.LeafNode.apply( this, arguments );
+ ve.dm.MWMagicLinkNode.super.apply( this, arguments );
// Mixin constructors
ve.dm.FocusableNode.call( this );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWGalleryNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWGalleryNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -16,7 +16,7 @@
*/
ve.dm.MWGalleryNode = function VeDmMWGalleryNode() {
// Parent constructor
- ve.dm.MWBlockExtensionNode.apply( this, arguments );
+ ve.dm.MWGalleryNode.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWEntityNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWEntityNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -16,7 +16,7 @@
*/
ve.dm.MWEntityNode = function VeDmMWEntityNode() {
// Parent constructor
- ve.dm.LeafNode.apply( this, arguments );
+ ve.dm.MWEntityNode.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWSignatureNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWSignatureNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -16,9 +16,9 @@
* @constructor
* @param {Object} [element] Reference to element in linear model
*/
-ve.dm.MWSignatureNode = function VeDmMWSignatureNode( element ) {
+ve.dm.MWSignatureNode = function VeDmMWSignatureNode() {
// Parent constructor
- ve.dm.MWTransclusionInlineNode.call( this, element );
+ ve.dm.MWSignatureNode.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWNumberedExternalLinkNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWNumberedExternalLinkNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -17,7 +17,7 @@
*/
ve.dm.MWNumberedExternalLinkNode = function VeDmMWNumberedExternalLinkNode() {
// Parent constructor
- ve.dm.LeafNode.apply( this, arguments );
+ ve.dm.MWNumberedExternalLinkNode.super.apply( this, arguments );
// Mixin constructors
ve.dm.FocusableNode.call( this );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWImageCaptionNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWImageCaptionNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -17,7 +17,7 @@
*/
ve.dm.MWImageCaptionNode = function VeDmMWImageCaptionNode() {
// Parent constructor
- ve.dm.BranchNode.apply( this, arguments );
+ ve.dm.MWImageCaptionNode.super.apply( this, arguments );
};
OO.inheritClass( ve.dm.MWImageCaptionNode, ve.dm.BranchNode );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -408,7 +408,7 @@
*/
ve.dm.MWTransclusionBlockNode = function VeDmMWTransclusionBlockNode() {
// Parent constructor
- ve.dm.MWTransclusionNode.apply( this, arguments );
+ ve.dm.MWTransclusionBlockNode.super.apply( this, arguments );
};
OO.inheritClass( ve.dm.MWTransclusionBlockNode, ve.dm.MWTransclusionNode );
@@ -428,7 +428,7 @@
*/
ve.dm.MWTransclusionInlineNode = function VeDmMWTransclusionInlineNode() {
// Parent constructor
- ve.dm.MWTransclusionNode.apply( this, arguments );
+ ve.dm.MWTransclusionInlineNode.super.apply( this, arguments );
};
OO.inheritClass( ve.dm.MWTransclusionInlineNode, ve.dm.MWTransclusionNode );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWInlineImageNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWInlineImageNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -17,7 +17,7 @@
*/
ve.dm.MWInlineImageNode = function VeDmMWInlineImageNode() {
// Parent constructor
- ve.dm.LeafNode.apply( this, arguments );
+ ve.dm.MWInlineImageNode.super.apply( this, arguments );
// Mixin constructors
ve.dm.MWImageNode.call( this );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js 2016-08-30 11:22:17.132463163 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js 2016-09-06 16:31:20.066430087 +0000
@@ -238,7 +238,7 @@
}
} );
}
- // Parent method
+ // Mixin method
return ve.dm.ResizableNode.prototype.getScalable.call( this );
};
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWCategoryItemWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWCategoryItemWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -25,7 +25,7 @@
config = ve.extendObject( { indicator: 'down' }, config );
// Parent constructor
- OO.ui.ButtonWidget.call( this, config );
+ ve.ui.MWCategoryItemWidget.super.call( this, config );
// Mixin constructors
OO.ui.mixin.DraggableElement.call( this, config );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWMediaResultWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWMediaResultWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -24,7 +24,7 @@
config = config || {};
// Parent constructor
- OO.ui.OptionWidget.call( this, config );
+ ve.ui.MWMediaResultWidget.super.call( this, config );
// Properties
this.setRowHeight( config.rowHeight || 150 );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWParameterResultWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWParameterResultWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -19,7 +19,7 @@
config = ve.extendObject( { icon: 'parameter' }, config );
// Parent constructor
- OO.ui.DecoratedOptionWidget.call( this, config );
+ ve.ui.MWParameterResultWidget.super.call( this, config );
// Initialization
this.$element.addClass( 've-ui-mwParameterResultWidget' );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWNoParametersResultWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWNoParametersResultWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -16,7 +16,7 @@
*/
ve.ui.MWNoParametersResultWidget = function VeUiMWNoParametersResultWidget( config ) {
// Parent constructor
- OO.ui.OptionWidget.call( this, config );
+ ve.ui.MWNoParametersResultWidget.super.call( this, config );
// Initialization
this.$element.addClass( 've-ui-mwNoParametersResultWidget' );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -24,7 +24,7 @@
}, config );
// Parent constructor
- OO.ui.SearchWidget.call( this, config );
+ ve.ui.MWParameterSearchWidget.super.call( this, config );
// Properties
this.template = template;
@@ -62,7 +62,7 @@
*/
ve.ui.MWParameterSearchWidget.prototype.onQueryChange = function () {
// Parent method
- OO.ui.SearchWidget.prototype.onQueryChange.call( this );
+ ve.ui.MWParameterSearchWidget.super.prototype.onQueryChange.call( this );
// Populate
this.addResults();
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -25,7 +25,7 @@
config = config || {};
// Parent constructor
- OO.ui.Widget.call( this, config );
+ ve.ui.MWCategoryWidget.super.call( this, config );
// Mixin constructors
OO.ui.mixin.GroupElement.call( this, config );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -19,7 +19,7 @@
config = ve.extendObject( { autoClose: true }, config );
// Parent constructor
- OO.ui.PopupWidget.call( this, config );
+ ve.ui.MWCategoryPopupWidget.super.call( this, config );
// Properties
this.category = null;
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWMoreParametersResultWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWMoreParametersResultWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -21,7 +21,7 @@
config = ve.extendObject( { icon: 'parameter-set' }, config );
// Parent constructor
- OO.ui.DecoratedOptionWidget.call( this, config );
+ ve.ui.MWMoreParametersResultWidget.super.call( this, config );
// Initialization
this.$element.addClass( 've-ui-mwMoreParametersResultWidget' );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -18,7 +18,7 @@
ve.ui.MWTocWidget = function VeUiMWTocWidget( surface, config ) {
// Parent constructor
- OO.ui.Widget.call( this, config );
+ ve.ui.MWTocWidget.super.call( this, config );
// Properties
this.surface = surface;
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -22,7 +22,7 @@
}, config );
// Parent constructor
- OO.ui.SearchWidget.call( this, config );
+ ve.ui.MWMediaSearchWidget.super.call( this, config );
// Properties
this.providers = {};
@@ -208,7 +208,7 @@
this.searchValue = trimmed;
// Parent method
- OO.ui.SearchWidget.prototype.onQueryChange.apply( this, arguments );
+ ve.ui.MWMediaSearchWidget.super.prototype.onQueryChange.apply( this, arguments );
// Reset
this.itemCache = {};
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js 2016-08-30 11:22:17.204463715 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js 2016-09-06 16:31:20.202431136 +0000
@@ -23,7 +23,7 @@
}, config );
// Parent constructor
- OO.ui.TextInputWidget.call( this, config );
+ ve.ui.MWCategoryInputWidget.super.call( this, config );
// Mixin constructors
OO.ui.mixin.LookupElement.call( this, config );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/inspectors/ve.ui.MWAlienExtensionInspector.js 2016-08-30 11:22:17.192463623 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/inspectors/ve.ui.MWAlienExtensionInspector.js 2016-09-06 16:31:20.186431013 +0000
@@ -43,7 +43,7 @@
*/
ve.ui.MWAlienExtensionInspector.prototype.initialize = function () {
// Parent method
- ve.ui.MWExtensionInspector.prototype.initialize.apply( this, arguments );
+ ve.ui.MWAlienExtensionInspector.super.prototype.initialize.apply( this, arguments );
this.$attributes = $( '
' ).addClass( 've-ui-mwAlienExtensionInspector-attributes' );
this.form.$element.append( this.$attributes );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/inspectors/ve.ui.MWLinkNodeInspector.js 2016-08-30 11:22:17.192463623 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/inspectors/ve.ui.MWLinkNodeInspector.js 2016-09-06 16:31:20.186431013 +0000
@@ -14,9 +14,9 @@
* @constructor
* @param {Object} [config] Configuration options
*/
-ve.ui.MWLinkNodeInspector = function VeUiMWLinkNodeInspector( config ) {
+ve.ui.MWLinkNodeInspector = function VeUiMWLinkNodeInspector() {
// Parent constructor
- ve.ui.NodeInspector.call( this, config );
+ ve.ui.MWLinkNodeInspector.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/inspectors/ve.ui.MWMagicLinkNodeInspector.js 2016-08-30 11:22:17.192463623 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/inspectors/ve.ui.MWMagicLinkNodeInspector.js 2016-09-06 16:31:20.186431013 +0000
@@ -14,9 +14,9 @@
* @constructor
* @param {Object} [config] Configuration options
*/
-ve.ui.MWMagicLinkNodeInspector = function VeUiMWMagicLinkNodeInspector( config ) {
+ve.ui.MWMagicLinkNodeInspector = function VeUiMWMagicLinkNodeInspector() {
// Parent constructor
- ve.ui.NodeInspector.call( this, config );
+ ve.ui.MWMagicLinkNodeInspector.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWParameterPlaceholderPage.js 2016-08-30 11:22:17.196463653 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWParameterPlaceholderPage.js 2016-09-06 16:31:20.186431013 +0000
@@ -23,7 +23,7 @@
}, config );
// Parent constructor
- OO.ui.PageLayout.call( this, name, config );
+ ve.ui.MWParameterPlaceholderPage.super.call( this, name, config );
// Properties
this.name = name;
@@ -77,9 +77,9 @@
/**
* @inheritdoc
*/
-ve.ui.MWParameterPlaceholderPage.prototype.setOutlineItem = function ( outlineItem ) {
+ve.ui.MWParameterPlaceholderPage.prototype.setOutlineItem = function () {
// Parent method
- OO.ui.PageLayout.prototype.setOutlineItem.call( this, outlineItem );
+ ve.ui.MWParameterPlaceholderPage.super.prototype.setOutlineItem.apply( this, arguments );
if ( this.outlineItem ) {
this.outlineItem
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWTemplatePlaceholderPage.js 2016-08-30 11:22:17.196463653 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWTemplatePlaceholderPage.js 2016-09-06 16:31:20.186431013 +0000
@@ -25,7 +25,7 @@
}, config );
// Parent constructor
- OO.ui.PageLayout.call( this, name, config );
+ ve.ui.MWTemplatePlaceholderPage.super.call( this, name, config );
// Properties
this.placeholder = placeholder;
@@ -87,9 +87,9 @@
/**
* @inheritdoc
*/
-ve.ui.MWTemplatePlaceholderPage.prototype.setOutlineItem = function ( outlineItem ) {
+ve.ui.MWTemplatePlaceholderPage.prototype.setOutlineItem = function () {
// Parent method
- OO.ui.PageLayout.prototype.setOutlineItem.call( this, outlineItem );
+ ve.ui.MWTemplatePlaceholderPage.super.prototype.setOutlineItem.apply( this, arguments );
if ( this.outlineItem ) {
this.outlineItem
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js 2016-08-30 11:22:17.196463653 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js 2016-09-06 16:31:20.186431013 +0000
@@ -15,9 +15,9 @@
* @param {string} name Unique symbolic name of page
* @param {Object} [config] Configuration options
*/
-ve.ui.MWLanguagesPage = function VeUiMWLanguagesPage( name, config ) {
+ve.ui.MWLanguagesPage = function VeUiMWLanguagesPage() {
// Parent constructor
- OO.ui.PageLayout.call( this, name, config );
+ ve.ui.MWLanguagesPage.super.apply( this, arguments );
// Properties
this.languagesFieldset = new OO.ui.FieldsetLayout( {
@@ -44,9 +44,9 @@
/**
* @inheritdoc
*/
-ve.ui.MWLanguagesPage.prototype.setOutlineItem = function ( outlineItem ) {
+ve.ui.MWLanguagesPage.prototype.setOutlineItem = function () {
// Parent method
- OO.ui.PageLayout.prototype.setOutlineItem.call( this, outlineItem );
+ ve.ui.MWLanguagesPage.super.prototype.setOutlineItem.apply( this, arguments );
if ( this.outlineItem ) {
this.outlineItem
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js 2016-08-30 11:22:17.196463653 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js 2016-09-06 16:31:20.186431013 +0000
@@ -21,7 +21,7 @@
config = config || {};
// Parent constructor
- OO.ui.PageLayout.call( this, name, config );
+ ve.ui.MWCategoriesPage.super.apply( this, arguments );
// Properties
this.metaList = null;
@@ -77,9 +77,9 @@
/**
* @inheritdoc
*/
-ve.ui.MWCategoriesPage.prototype.setOutlineItem = function ( outlineItem ) {
+ve.ui.MWCategoriesPage.prototype.setOutlineItem = function () {
// Parent method
- OO.ui.PageLayout.prototype.setOutlineItem.call( this, outlineItem );
+ ve.ui.MWCategoriesPage.super.prototype.setOutlineItem.apply( this, arguments );
if ( this.outlineItem ) {
this.outlineItem
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js 2016-08-30 11:22:17.192463623 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js 2016-09-06 16:31:20.186431013 +0000
@@ -15,11 +15,11 @@
* @param {string} name Unique symbolic name of page
* @param {Object} [config] Configuration options
*/
-ve.ui.MWAdvancedSettingsPage = function VeUiMWAdvancedSettingsPage( name, config ) {
+ve.ui.MWAdvancedSettingsPage = function VeUiMWAdvancedSettingsPage() {
var advancedSettingsPage = this;
// Parent constructor
- OO.ui.PageLayout.call( this, name, config );
+ ve.ui.MWAdvancedSettingsPage.super.apply( this, arguments );
// Properties
this.metaList = null;
@@ -167,9 +167,9 @@
/**
* @inheritdoc
*/
-ve.ui.MWAdvancedSettingsPage.prototype.setOutlineItem = function ( outlineItem ) {
+ve.ui.MWAdvancedSettingsPage.prototype.setOutlineItem = function () {
// Parent method
- OO.ui.PageLayout.prototype.setOutlineItem.call( this, outlineItem );
+ ve.ui.MWAdvancedSettingsPage.super.prototype.setOutlineItem.apply( this, arguments );
if ( this.outlineItem ) {
this.outlineItem
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js 2016-08-30 11:22:17.196463653 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js 2016-09-06 16:31:20.186431013 +0000
@@ -23,7 +23,7 @@
}, config );
// Parent constructor
- OO.ui.PageLayout.call( this, name, config );
+ ve.ui.MWTransclusionContentPage.super.call( this, name, config );
// Properties
this.content = content;
@@ -63,9 +63,9 @@
/**
* @inheritdoc
*/
-ve.ui.MWTransclusionContentPage.prototype.setOutlineItem = function ( outlineItem ) {
+ve.ui.MWTransclusionContentPage.prototype.setOutlineItem = function () {
// Parent method
- OO.ui.PageLayout.prototype.setOutlineItem.call( this, outlineItem );
+ ve.ui.MWTransclusionContentPage.super.prototype.setOutlineItem.apply( this, arguments );
if ( this.outlineItem ) {
this.outlineItem
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWTemplatePage.js 2016-08-30 11:22:17.196463653 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWTemplatePage.js 2016-09-06 16:31:20.186431013 +0000
@@ -25,7 +25,7 @@
}, config );
// Parent constructor
- OO.ui.PageLayout.call( this, name, config );
+ ve.ui.MWTemplatePage.super.call( this, name, config );
// Properties
this.template = template;
@@ -95,9 +95,9 @@
/**
* @inheritdoc
*/
-ve.ui.MWTemplatePage.prototype.setOutlineItem = function ( outlineItem ) {
+ve.ui.MWTemplatePage.prototype.setOutlineItem = function () {
// Parent method
- OO.ui.PageLayout.prototype.setOutlineItem.call( this, outlineItem );
+ ve.ui.MWTemplatePage.super.prototype.setOutlineItem.apply( this, arguments );
if ( this.outlineItem ) {
this.outlineItem
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js 2016-08-30 11:22:17.196463653 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js 2016-09-07 23:29:45.797497976 +0000
@@ -25,7 +25,7 @@
}, config );
// Parent constructor
- OO.ui.PageLayout.call( this, name, config );
+ ve.ui.MWParameterPage.super.call( this, name, config );
// Properties
this.edited = false;
@@ -341,9 +341,9 @@
/**
* @inheritdoc
*/
-ve.ui.MWParameterPage.prototype.setOutlineItem = function ( outlineItem ) {
+ve.ui.MWParameterPage.prototype.setOutlineItem = function () {
// Parent method
- OO.ui.PageLayout.prototype.setOutlineItem.call( this, outlineItem );
+ ve.ui.MWParameterPage.super.prototype.setOutlineItem.apply( this, arguments );
if ( this.outlineItem ) {
this.outlineItem
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 2016-08-30 11:22:17.196463653 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 2016-09-06 16:31:20.186431013 +0000
@@ -20,7 +20,7 @@
var settingsPage = this;
// Parent constructor
- OO.ui.PageLayout.call( this, name, config );
+ ve.ui.MWSettingsPage.super.apply( this, arguments );
// Properties
this.metaList = null;
@@ -167,9 +167,9 @@
/**
* @inheritdoc
*/
-ve.ui.MWSettingsPage.prototype.setOutlineItem = function ( outlineItem ) {
+ve.ui.MWSettingsPage.prototype.setOutlineItem = function () {
// Parent method
- OO.ui.PageLayout.prototype.setOutlineItem.call( this, outlineItem );
+ ve.ui.MWSettingsPage.super.prototype.setOutlineItem.apply( this, arguments );
if ( this.outlineItem ) {
this.outlineItem
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/actions/ve.ui.MWWikitextAction.js 2016-08-30 11:22:17.192463623 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/actions/ve.ui.MWWikitextAction.js 2016-09-06 16:31:20.178430951 +0000
@@ -13,9 +13,9 @@
* @constructor
* @param {ve.ui.Surface} surface Surface to act on
*/
-ve.ui.MWWikitextAction = function VeUiMWWikitextAction( surface ) {
+ve.ui.MWWikitextAction = function VeUiMWWikitextAction() {
// Parent constructor
- ve.ui.Action.call( this, surface );
+ ve.ui.MWWikitextAction.super.apply( this, arguments );
};
/* Inheritance */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/tools/ve.ui.MWSignatureTool.js 2016-08-30 11:22:17.200463684 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/tools/ve.ui.MWSignatureTool.js 2016-09-06 16:31:20.198431104 +0000
@@ -19,9 +19,9 @@
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
-ve.ui.MWSignatureTool = function VeUiMWSignatureTool( toolGroup, config ) {
+ve.ui.MWSignatureTool = function VeUiMWSignatureTool() {
// Parent constructor
- ve.ui.MWTransclusionDialogTool.call( this, toolGroup, config );
+ ve.ui.MWSignatureTool.super.apply( this, arguments );
};
OO.inheritClass( ve.ui.MWSignatureTool, ve.ui.MWTransclusionDialogTool );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/tools/ve.ui.MWFormatTool.js 2016-08-30 11:22:17.200463684 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/tools/ve.ui.MWFormatTool.js 2016-09-06 16:31:20.198431104 +0000
@@ -14,8 +14,8 @@
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
-ve.ui.MWHeading1FormatTool = function VeUiMWHeading1FormatTool( toolGroup, config ) {
- ve.ui.Heading1FormatTool.call( this, toolGroup, config );
+ve.ui.MWHeading1FormatTool = function VeUiMWHeading1FormatTool() {
+ ve.ui.MWHeading1FormatTool.super.apply( this, arguments );
};
OO.inheritClass( ve.ui.MWHeading1FormatTool, ve.ui.Heading1FormatTool );
ve.ui.MWHeading1FormatTool.static.title =
@@ -32,8 +32,8 @@
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
-ve.ui.MWHeading2FormatTool = function VeUiMWHeading2FormatTool( toolGroup, config ) {
- ve.ui.Heading2FormatTool.call( this, toolGroup, config );
+ve.ui.MWHeading2FormatTool = function VeUiMWHeading2FormatTool() {
+ ve.ui.MWHeading2FormatTool.super.apply( this, arguments );
};
OO.inheritClass( ve.ui.MWHeading2FormatTool, ve.ui.Heading2FormatTool );
ve.ui.MWHeading2FormatTool.static.title =
@@ -50,8 +50,8 @@
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
-ve.ui.MWHeading3FormatTool = function VeUiMWHeading3FormatTool( toolGroup, config ) {
- ve.ui.Heading3FormatTool.call( this, toolGroup, config );
+ve.ui.MWHeading3FormatTool = function VeUiMWHeading3FormatTool() {
+ ve.ui.MWHeading3FormatTool.super.apply( this, arguments );
};
OO.inheritClass( ve.ui.MWHeading3FormatTool, ve.ui.Heading3FormatTool );
ve.ui.MWHeading3FormatTool.static.title =
@@ -68,8 +68,8 @@
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
-ve.ui.MWHeading4FormatTool = function VeUiMWHeading4FormatTool( toolGroup, config ) {
- ve.ui.Heading4FormatTool.call( this, toolGroup, config );
+ve.ui.MWHeading4FormatTool = function VeUiMWHeading4FormatTool() {
+ ve.ui.MWHeading4FormatTool.super.apply( this, arguments );
};
OO.inheritClass( ve.ui.MWHeading4FormatTool, ve.ui.Heading4FormatTool );
ve.ui.MWHeading4FormatTool.static.title =
@@ -86,8 +86,8 @@
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
-ve.ui.MWHeading5FormatTool = function VeUiMWHeading5FormatTool( toolGroup, config ) {
- ve.ui.Heading5FormatTool.call( this, toolGroup, config );
+ve.ui.MWHeading5FormatTool = function VeUiMWHeading5FormatTool() {
+ ve.ui.MWHeading5FormatTool.super.apply( this, arguments );
};
OO.inheritClass( ve.ui.MWHeading5FormatTool, ve.ui.Heading5FormatTool );
ve.ui.MWHeading5FormatTool.static.title =
@@ -104,8 +104,8 @@
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
-ve.ui.MWHeading6FormatTool = function VeUiMWHeading6FormatTool( toolGroup, config ) {
- ve.ui.Heading6FormatTool.call( this, toolGroup, config );
+ve.ui.MWHeading6FormatTool = function VeUiMWHeading6FormatTool() {
+ ve.ui.MWHeading6FormatTool.super.apply( this, arguments );
};
OO.inheritClass( ve.ui.MWHeading6FormatTool, ve.ui.Heading6FormatTool );
ve.ui.MWHeading6FormatTool.static.title =
@@ -134,8 +134,8 @@
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
-ve.ui.MWPreformattedFormatTool = function VeUiMWPreformattedFormatTool( toolGroup, config ) {
- ve.ui.FormatTool.call( this, toolGroup, config );
+ve.ui.MWPreformattedFormatTool = function VeUiMWPreformattedFormatTool() {
+ ve.ui.MWPreformattedFormatTool.super.apply( this, arguments );
};
OO.inheritClass( ve.ui.MWPreformattedFormatTool, ve.ui.PreformattedFormatTool );
ve.ui.MWPreformattedFormatTool.static.format = { type: 'mwPreformatted' };
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/tools/ve.ui.MWEditModeTool.js 2016-08-30 11:22:17.200463684 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/tools/ve.ui.MWEditModeTool.js 2016-09-06 16:31:20.198431104 +0000
@@ -19,7 +19,9 @@
var tool = this,
$content = $( '
' ).text( mw.msg( 'visualeditor-mweditmodewt-popup-body' ) ),
showAgainLayout, showAgainCheckbox;
- ve.ui.MWPopupTool.call( this, mw.msg( 'visualeditor-mweditmodewt-popup-title' ), toolGroup, config );
+
+ // Parent constructor
+ ve.ui.MWEditModeTool.super.call( this, mw.msg( 'visualeditor-mweditmodewt-popup-title' ), toolGroup, config );
if ( !mw.user.isAnon() ) {
showAgainCheckbox = new OO.ui.CheckboxInputWidget()
@@ -83,6 +85,7 @@
* @param {Object} [config] Config options
*/
ve.ui.MWEditModeSourceTool = function VeUiMWEditModeSourceTool() {
+ // Parent constructor
ve.ui.MWEditModeSourceTool.super.apply( this, arguments );
};
OO.inheritClass( ve.ui.MWEditModeSourceTool, ve.ui.MWEditModeTool );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/modules/ve-mw/ui/tools/ve.ui.MWLinkInspectorTool.js 2016-08-30 11:22:17.200463684 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/modules/ve-mw/ui/tools/ve.ui.MWLinkInspectorTool.js 2016-09-06 16:31:20.198431104 +0000
@@ -13,13 +13,17 @@
*
* @class
* @extends ve.ui.LinkInspectorTool
+ * @mixins ve.ui.MWEducationPopupTool
*
* @constructor
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
ve.ui.MWLinkInspectorTool = function VeUiMwLinkInspectorTool() {
+ // Parent constructor
ve.ui.MWLinkInspectorTool.super.apply( this, arguments );
+
+ // Mixin constructor
ve.ui.MWEducationPopupTool.call( this, {
title: ve.msg( 'visualeditor-linkinspector-educationpopup-title' ),
text: ve.msg( 'visualeditor-linkinspector-educationpopup-text' )
@@ -29,6 +33,7 @@
/* Inheritance */
OO.inheritClass( ve.ui.MWLinkInspectorTool, ve.ui.LinkInspectorTool );
+
OO.mixinClass( ve.ui.MWLinkInspectorTool, ve.ui.MWEducationPopupTool );
/* Static Properties */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/lib/ve/src/init/ve.init.Target.js 2016-09-01 23:45:30.404706120 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/lib/ve/src/init/ve.init.Target.js 2016-09-06 16:31:27.702488993 +0000
@@ -354,11 +354,9 @@
* Destroy and remove all surfaces from the target
*/
ve.init.Target.prototype.clearSurfaces = function () {
- if ( this.surfaces.indexOf( this.surface ) !== -1 ) {
- // We're about to destroy this.surface, so unset it for sanity
- // Otherwise, getSurface() could return a destroyed surface
- this.surface = null;
- }
+ // We're about to destroy this.surface, so unset it for sanity
+ // Otherwise, getSurface() could return a destroyed surface
+ this.surface = null;
while ( this.surfaces.length ) {
this.surfaces.pop().destroy();
}
@@ -379,6 +377,9 @@
* @param {ve.ui.Surface} surface Surface
*/
ve.init.Target.prototype.setSurface = function ( surface ) {
+ if ( this.surfaces.indexOf( surface ) === -1 ) {
+ throw new Error( 'Active surface must have been added first' );
+ }
if ( surface !== this.surface ) {
this.surface = surface;
this.setupToolbar( surface );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/lib/ve/src/ce/ve.ce.Surface.js 2016-08-30 11:22:23.588512655 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/lib/ve/src/ce/ve.ce.Surface.js 2016-09-06 16:31:27.694488930 +0000
@@ -1756,7 +1756,7 @@
* @param {jQuery.Event} e Paste event
*/
ve.ce.Surface.prototype.beforePaste = function ( e ) {
- var range, node, nodeRange, contextElement, nativeRange,
+ var range, startNode, endNode, contextElement, nativeRange,
context, leftText, rightText, textNode, textStart, textEnd,
selection = this.getModel().getSelection(),
clipboardData = e.originalEvent.clipboardData,
@@ -1765,11 +1765,8 @@
documentModel = surfaceModel.getDocument();
if ( selection instanceof ve.dm.LinearSelection ) {
- // Pasting over a linear selection? Remove first.
- fragment.removeContent();
range = fragment.getSelection().getRange();
} else if ( selection instanceof ve.dm.TableSelection ) {
- // Selection removal is handled in after paste for tables (depends on pasted content)
range = new ve.Range( selection.getRanges()[ 0 ].start );
} else {
e.preventDefault();
@@ -1798,27 +1795,27 @@
this.$pasteTarget.empty();
// Get node from cursor position
- node = documentModel.getBranchNodeFromOffset( range.start );
- if ( node.canContainContent() ) {
+ startNode = documentModel.getBranchNodeFromOffset( range.start );
+ if ( startNode.canContainContent() ) {
// If this is a content branch node, then add its DM HTML
// to the paste target to give CE some context.
textStart = textEnd = 0;
- nodeRange = node.getRange();
- contextElement = node.getClonedElement();
+ contextElement = startNode.getClonedElement();
// Make sure that context doesn't have any attributes that might confuse
// the importantElement check in afterPaste.
$( documentModel.getStore().value( contextElement.originalDomElementsIndex ) ).removeAttr( 'id typeof rel' );
context = [ contextElement ];
// If there is content to the left of the cursor, put a placeholder
// character to the left of the cursor
- if ( range.start > nodeRange.start ) {
+ if ( range.start > startNode.getRange().start ) {
leftText = '☀';
context.push( leftText );
textStart = textEnd = 1;
}
// If there is content to the right of the cursor, put a placeholder
// character to the right of the cursor
- if ( range.end < nodeRange.end ) {
+ endNode = documentModel.getBranchNodeFromOffset( range.end );
+ if ( range.end < endNode.getRange().end ) {
rightText = '☂';
context.push( rightText );
}
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/lib/ve/src/ui/ve.ui.DataTransferHandlerFactory.js 2016-08-30 11:22:23.608512808 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/lib/ve/src/ui/ve.ui.DataTransferHandlerFactory.js 2016-09-06 16:31:27.710489054 +0000
@@ -33,14 +33,33 @@
* @inheritdoc
*/
ve.ui.DataTransferHandlerFactory.prototype.register = function ( constructor ) {
- var i, j, ilen, jlen, kinds, types, extensions;
+ // Parent method
+ ve.ui.DataTransferHandlerFactory.super.prototype.register.apply( this, arguments );
+
+ this.updateIndexes( constructor, true );
+};
+/**
+ * @inheritdoc
+ */
+ve.ui.DataTransferHandlerFactory.prototype.unregister = function ( constructor ) {
// Parent method
- ve.ui.DataTransferHandlerFactory.super.prototype.register.call( this, constructor );
+ ve.ui.DataTransferHandlerFactory.super.prototype.unregister.apply( this, arguments );
- kinds = constructor.static.kinds;
- types = constructor.static.types;
- extensions = constructor.static.extensions;
+ this.updateIndexes( constructor, false );
+};
+
+/**
+ * Update indexes used for handler loopup
+ *
+ * @param {Function} constructor Handler's constructor to insert/remove
+ * @param {boolean} insert Insert the handler into the indexes, remove otherwise
+ */
+ve.ui.DataTransferHandlerFactory.prototype.updateIndexes = function ( constructor, insert ) {
+ var i, j, ilen, jlen,
+ kinds = constructor.static.kinds,
+ types = constructor.static.types,
+ extensions = constructor.static.extensions;
function ensureArray( obj, prop ) {
if ( obj[ prop ] === undefined ) {
@@ -56,23 +75,42 @@
return obj[ prop ];
}
+ function remove( arr, item ) {
+ var index;
+ if ( ( index = arr.indexOf( item ) ) !== -1 ) {
+ arr.splice( index, 1 );
+ }
+ }
+
if ( !kinds ) {
for ( j = 0, jlen = types.length; j < jlen; j++ ) {
- ensureArray( this.handlerNamesByType, types[ j ] ).unshift( constructor.static.name );
+ if ( insert ) {
+ ensureArray( this.handlerNamesByType, types[ j ] ).unshift( constructor.static.name );
+ } else {
+ remove( this.handlerNamesByType[ types[ j ] ], constructor.static.name );
+ }
}
} else {
for ( i = 0, ilen = kinds.length; i < ilen; i++ ) {
for ( j = 0, jlen = types.length; j < jlen; j++ ) {
- ensureArray(
- ensureMap( this.handlerNamesByKindAndType, kinds[ i ] ),
- types[ j ]
- ).unshift( constructor.static.name );
+ if ( insert ) {
+ ensureArray(
+ ensureMap( this.handlerNamesByKindAndType, kinds[ i ] ),
+ types[ j ]
+ ).unshift( constructor.static.name );
+ } else {
+ remove( this.handlerNamesByKindAndType[ kinds[ i ] ][ types[ j ] ], constructor.static.name );
+ }
}
}
}
if ( constructor.prototype instanceof ve.ui.FileTransferHandler ) {
for ( i = 0, ilen = extensions.length; i < ilen; i++ ) {
- ensureArray( this.handlerNamesByExtension, extensions[ i ] ).unshift( constructor.static.name );
+ if ( insert ) {
+ ensureArray( this.handlerNamesByExtension, extensions[ i ] ).unshift( constructor.static.name );
+ } else {
+ remove( this.handlerNamesByExtension[ extensions[ i ] ], constructor.static.name );
+ }
}
}
};
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/lib/ve/tests/ce/ve.ce.Surface.test.js 2016-08-30 11:22:23.616512869 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/lib/ve/tests/ce/ve.ce.Surface.test.js 2016-09-06 16:31:27.718489116 +0000
@@ -1377,6 +1377,32 @@
msg: 'Text into paragraph'
},
{
+ rangeOrSelection: new ve.Range( 4, 5 ),
+ pasteHtml: 'Bar',
+ expectedRangeOrSelection: new ve.Range( 7 ),
+ expectedOps: [
+ [
+ { type: 'retain', length: 4 },
+ {
+ type: 'replace',
+ insert: [],
+ remove: [ 'o' ]
+ },
+ { type: 'retain', length: docLen - 5 }
+ ],
+ [
+ { type: 'retain', length: 4 },
+ {
+ type: 'replace',
+ insert: [ 'B', 'a', 'r' ],
+ remove: []
+ },
+ { type: 'retain', length: docLen - 5 }
+ ]
+ ],
+ msg: 'Text into selection'
+ },
+ {
rangeOrSelection: new ve.Range( 25 ),
internalSourceRangeOrSelection: new ve.Range( 3, 6 ),
expectedRangeOrSelection: new ve.Range( 28 ),
@@ -1428,12 +1454,60 @@
bias: 'stop',
index: ve.dm.example.annIndex( 'b', 'Quux' )
},
- { type: 'retain', length: 5 }
+ { type: 'retain', length: docLen - 25 }
]
],
msg: 'External text into annotated content'
},
{
+ rangeOrSelection: new ve.Range( 23, 27 ),
+ pasteHtml: 'Foo',
+ expectedRangeOrSelection: new ve.Range( 26 ),
+ expectedOps: [
+ [
+ { type: 'retain', length: 23 },
+ {
+ type: 'replace',
+ insert: [],
+ remove: [
+ [ 'Q', [ bold ] ],
+ [ 'u', [ bold ] ],
+ [ 'u', [ bold ] ],
+ [ 'x', [ bold ] ]
+ ]
+ },
+ { type: 'retain', length: docLen - 27 }
+ ],
+ [
+ { type: 'retain', length: 23 },
+ {
+ type: 'replace',
+ insert: [ 'F', 'o', 'o' ],
+ remove: []
+ },
+ { type: 'retain', length: docLen - 27 }
+ ],
+ [
+ { type: 'retain', length: 23 },
+ {
+ type: 'annotate',
+ method: 'set',
+ bias: 'start',
+ index: ve.dm.example.annIndex( 'b', 'Quux' )
+ },
+ { type: 'retain', length: 3 },
+ {
+ type: 'annotate',
+ method: 'set',
+ bias: 'stop',
+ index: ve.dm.example.annIndex( 'b', 'Quux' )
+ },
+ { type: 'retain', length: docLen - 27 }
+ ]
+ ],
+ msg: 'External text over annotated content'
+ },
+ {
rangeOrSelection: new ve.Range( 4 ),
pasteHtml: 'Foobar',
expectedRangeOrSelection: new ve.Range( 10 ),
@@ -2656,7 +2730,7 @@
if ( model.getHistory().length ) {
txs = model.getHistory()[ 0 ].transactions;
for ( i = 0; i < txs.length; i++ ) {
- txops = txs[ i ].getOperations();
+ txops = ve.copy( txs[ i ].getOperations() );
for ( j = 0; j < txops.length; j++ ) {
if ( txops[ j ].remove ) {
ve.dm.example.postprocessAnnotations( txops[ j ].remove, doc.getStore() );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/build/screenshots.js 2016-08-30 11:22:17.124463102 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/build/screenshots.js 2016-09-06 16:31:20.054429994 +0000
@@ -28,7 +28,7 @@
driver = new chrome.Driver();
}
- driver.manage().timeouts().setScriptTimeout( 30000 );
+ driver.manage().timeouts().setScriptTimeout( 40000 );
driver.manage().window().setSize( 1200, 1000 );
driver.get( 'https://en.wikipedia.org/wiki/PageDoesNotExist?veaction=edit&uselang=' + lang );
@@ -154,7 +154,7 @@
}
} );
} ),
- 30000
+ 40000
);
}
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/VisualEditor/Gruntfile.js 2016-08-30 11:22:17.124463102 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/VisualEditor/Gruntfile.js 2016-09-06 16:31:20.050429963 +0000
@@ -59,7 +59,7 @@
'screenshots-en': {
options: {
reporter: 'spec',
- timeout: 30000,
+ timeout: 40000,
require: [
function () {
/* jshint undef:false */
@@ -72,7 +72,7 @@
'screenshots-all': {
options: {
reporter: 'spec',
- timeout: 30000,
+ timeout: 40000,
require: [
function () {
/* jshint undef:false */
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/UniversalLanguageSelector/resources/js/ext.uls.interface.js 2016-08-30 11:21:49.460251027 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/UniversalLanguageSelector/resources/js/ext.uls.interface.js 2016-09-06 16:30:50.722203720 +0000
@@ -213,14 +213,14 @@
ulsPopup.toggle( true );
ulsPopup.toggleClipping( false );
// if the mouse is over the tooltip, do not hide
- $( '.tipsy' ).on( 'mouseover', function () {
+ $( '.uls-tipsy' ).on( 'mouseover', function () {
window.clearTimeout( tipsyTimer );
} ).on( 'mouseout', function () {
tipsyTimer = window.setTimeout( hideTipsy, timeout );
} );
// hide the tooltip when clicked on it
- $( '.tipsy' ).on( 'click', hideTipsy );
+ $( '.uls-tipsy' ).on( 'click', hideTipsy );
// Event handler for links in the tooltip.
// It looks like the tipsy is always created from scratch so that
@@ -251,7 +251,7 @@
padded: true,
width: 300,
align: 'forwards',
- classes: [ 'tipsy' ],
+ classes: [ 'uls-tipsy' ],
$content: ( function () {
var link = $( '' ).text( previousAutonym )
.attr( {
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/UniversalLanguageSelector/resources/js/ext.uls.displaysettings.js 2016-08-30 11:21:49.460251027 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/UniversalLanguageSelector/resources/js/ext.uls.displaysettings.js 2016-09-06 16:30:50.722203720 +0000
@@ -153,7 +153,7 @@
* Prepare the UI language selector
*/
prepareLanguages: function () {
- var loginUri, $loginCta,
+ var $loginCta,
displaySettings = this,
SUGGESTED_LANGUAGES_NUMBER = 3,
anonsAllowed = mw.config.get( 'wgULSAnonCanChangeLanguage' ),
@@ -162,10 +162,6 @@
// Don't let anonymous users change interface language
if ( !anonsAllowed && mw.user.isAnon() ) {
- loginUri = new mw.Uri();
- loginUri.query = {
- title: 'Special:UserLogin'
- };
$loginCta = $( '' )
.attr( 'id', 'uls-display-settings-anon-log-in-cta' );
autonym = $.uls.data.getAutonym( this.contentLanguage );
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/UniversalLanguageSelector/lib/jquery.uls/src/jquery.uls.lcd.js 2016-08-30 11:21:49.452250966 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/UniversalLanguageSelector/lib/jquery.uls/src/jquery.uls.lcd.js 2016-09-08 13:42:10.117838378 +0000
@@ -24,18 +24,18 @@
var noResultsTemplate, LanguageCategoryDisplay;
- noResultsTemplate = $( '
' ).addClass( 'twelve columns uls-no-results-view hide' );
+ noResultsTemplate = $( '
' ).addClass( 'uls-no-results-view hide' );
noResultsTemplate.append(
$( '
' )
.attr( 'data-i18n', 'uls-no-results-found' )
- .addClass( 'eleven columns offset-by-one uls-no-results-found-title' )
+ .addClass( 'uls-no-results-found-title' )
.text( 'No results found' ),
$( '' )
.attr( 'id', 'uls-no-found-more' )
.addClass( 'uls-no-found-more' )
.append(
$( '
' )
- .addClass( 'ten columns offset-by-one' )
+ .addClass( '' )
.append(
$( '
' ).append(
$( '' ).text( 'You can search by language name, script name, ISO code of language or you can browse by region.' )
@@ -47,7 +47,7 @@
LanguageCategoryDisplay = function ( element, options ) {
this.$element = $( element );
this.options = $.extend( {}, $.fn.lcd.defaults, options );
- this.$element.addClass( 'lcd' );
+ this.$element.addClass( 'uls-lcd' );
this.regionLanguages = {};
this.renderTimeout = null;
this.cachedQuicklist = null;
@@ -109,8 +109,9 @@
},
render: function () {
- var $section,
+ var $section, $quicklist,
lcd = this,
+ narrowMode = this.options.columns === 1,
regions = [],
regionNames = {
// These are fallback text when i18n library not present
@@ -124,7 +125,16 @@
PA: 'Pacific'
};
- regions.push( this.buildQuicklist() );
+ $quicklist = this.buildQuicklist();
+ regions.push( $quicklist );
+
+ if ( narrowMode && $quicklist.length ) {
+ regions.push( $( '' )
+ .attr( 'data-i18n', 'uls-region-all' )
+ .addClass( 'uls-lcd-region-title' )
+ .text( 'All languages' )
+ );
+ }
$.each( $.uls.data.regiongroups, function ( regionCode ) {
lcd.regionLanguages[ regionCode ] = [];
@@ -135,14 +145,14 @@
}
$section = $( '' )
- .addClass( 'eleven columns offset-by-one uls-lcd-region-section hide' )
+ .addClass( 'uls-lcd-region-section hide' )
.attr( 'id', regionCode );
// Show a region heading, unless we are using a narrow ULS
- if ( lcd.options.columns !== 1 ) {
+ if ( !narrowMode ) {
$section.append( $( '
' )
.attr( 'data-i18n', 'uls-region-' + regionCode )
- .addClass( 'eleven columns uls-lcd-region-title' )
+ .addClass( 'uls-lcd-region-title' )
.text( regionNames[ regionCode ] )
);
}
@@ -306,7 +316,7 @@
this.options.quickList = this.options.quickList();
}
- if ( !this.options.quickList ) {
+ if ( !this.options.quickList.length ) {
this.cachedQuicklist = $( [] );
return this.cachedQuicklist;
}
@@ -317,13 +327,13 @@
quickList.sort( $.uls.data.sortByAutonym );
$quickListSection = $( '' )
- .addClass( 'eleven columns offset-by-one uls-lcd-region-section' )
+ .addClass( 'uls-lcd-region-section' )
.attr( 'id', 'uls-lcd-quicklist' );
$quickListSectionTitle = $( '
' )
.attr( 'data-i18n', 'uls-common-languages' )
- .addClass( 'eleven columns uls-lcd-region-title' )
- .text( 'Common languages' ); // This is placeholder text if jquery.i18n not present
+ .addClass( 'uls-lcd-region-title' )
+ .text( 'Suggested languages' ); // This is placeholder text if jquery.i18n not present
$quickListSection.append( $quickListSectionTitle );
this.renderRegion(
@@ -401,7 +411,8 @@
// Other supported values are 1 and 2.
// Other values will have rendering issues.
columns: 4,
- languageDecorator: null
+ languageDecorator: null,
+ quickList: []
};
$.fn.lcd.Constructor = LanguageCategoryDisplay;
--- /srv/mediawiki/php-1.28.0-wmf.17/extensions/UniversalLanguageSelector/lib/jquery.uls/src/jquery.uls.core.js 2016-08-30 11:21:49.452250966 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/extensions/UniversalLanguageSelector/lib/jquery.uls/src/jquery.uls.core.js 2016-09-08 13:42:10.117838378 +0000
@@ -91,7 +91,7 @@
this.initialized = false;
this.$languageFilter = this.$menu.find( '#uls-languagefilter' );
- this.$resultsView = this.$menu.find( 'div.uls-language-list' );
+ this.$resultsView = this.$menu.find( '.uls-language-list' );
this.render();
this.listen();
@@ -134,15 +134,25 @@
* @returns {Object}
*/
position: function () {
- var pos;
+ var pos,
+ top = this.top,
+ left = this.left;
+
+ if ( top === undefined ) {
+ pos = $.extend( {}, this.$element.offset(), {
+ height: this.$element[ 0 ].offsetHeight
+ } );
+ top = pos.top + pos.height;
+ }
+
+ if ( left === undefined ) {
+ left = $( window ).width() / 2 - this.$menu.outerWidth() / 2;
+ }
- pos = $.extend( {}, this.$element.offset(), {
- height: this.$element[ 0 ].offsetHeight
- } );
return {
- top: this.top !== undefined ? this.top : pos.top + pos.height,
- left: this.left !== undefined ? this.left : '25%'
+ top: top,
+ left: left
};
},
@@ -157,7 +167,6 @@
};
this.$menu.addClass( widthClasses[this.getMenuWidth()] );
- this.$menu.css( this.position() );
if ( !this.initialized ) {
$( 'body' ).prepend( this.$menu );
@@ -165,6 +174,7 @@
this.initialized = true;
}
+ this.$menu.css( this.position() );
this.$menu.show();
this.$menu.scrollIntoView();
this.shown = true;
@@ -250,7 +260,7 @@
languages: this.languages,
columns: columnsOptions[ this.getMenuWidth() ],
- quickList: languagesCount > 12 ? this.options.quickList : false,
+ quickList: languagesCount > 12 ? this.options.quickList : [],
clickhandler: $.proxy( this.select, this ),
source: this.$languageFilter,
showRegions: this.options.showRegions,
@@ -348,7 +358,7 @@
languagesCount = objectLength( this.options.languages );
- if ( languagesCount < 12 ) {
+ if ( languagesCount < 25 ) {
return 'narrow';
}
@@ -387,7 +397,7 @@
onSelect: null, // Callback function to be called when a language is selected
searchAPI: null, // Language search API
languages: $.uls.data.getAutonyms(), // Languages to be used for ULS, default is all languages
- quickList: null, // Array of language codes or function that returns such
+ quickList: [], // Array of language codes or function that returns such
// The options are wide (4 columns), medium (2 columns), and narrow (1 column).
// If not specified, it will be set automatically.
menuWidth: null,
--- /srv/mediawiki/php-1.28.0-wmf.17/resources/src/mediawiki/mediawiki.util.js 2016-08-30 11:17:28.762252570 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/resources/src/mediawiki/mediawiki.util.js 2016-09-06 16:25:53.867913556 +0000
@@ -512,32 +512,6 @@
mw.log.deprecate( util, 'wikiGetlink', util.getUrl, 'Use mw.util.getUrl instead.' );
/**
- * Access key prefix. Might be wrong for browsers implementing the accessKeyLabel property.
- * @property {string} tooltipAccessKeyPrefix
- * @deprecated since 1.24 Use the module jquery.accessKeyLabel instead.
- */
- mw.log.deprecate( util, 'tooltipAccessKeyPrefix', $.fn.updateTooltipAccessKeys.getAccessKeyPrefix(), 'Use jquery.accessKeyLabel instead.' );
-
- /**
- * Regex to match accesskey tooltips.
- *
- * Should match:
- *
- * - "[ctrl-option-x]"
- * - "[alt-shift-x]"
- * - "[ctrl-alt-x]"
- * - "[ctrl-x]"
- *
- * The accesskey is matched in group $6.
- *
- * Will probably not work for browsers implementing the accessKeyLabel property.
- *
- * @property {RegExp} tooltipAccessKeyRegexp
- * @deprecated since 1.24 Use the module jquery.accessKeyLabel instead.
- */
- mw.log.deprecate( util, 'tooltipAccessKeyRegexp', /\[(ctrl-)?(option-)?(alt-)?(shift-)?(esc-)?(.)\]$/, 'Use jquery.accessKeyLabel instead.' );
-
- /**
* Add the appropriate prefix to the accesskey shown in the tooltip.
*
* If the `$nodes` parameter is given, only those nodes are updated;
--- /srv/mediawiki/php-1.28.0-wmf.17/resources/src/mediawiki/page/rollback.js 2016-08-30 11:17:28.762252570 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/resources/src/mediawiki/page/rollback.js 2016-09-08 23:19:11.752172857 +0000
@@ -15,7 +15,7 @@
page = mw.util.getParamValue( 'title', url ),
user = mw.util.getParamValue( 'from', url );
- if ( !page || !user ) {
+ if ( !page || user === null ) {
// Let native browsing handle the link
return true;
}
--- /srv/mediawiki/php-1.28.0-wmf.17/resources/src/mediawiki/mediawiki.toc.js 2016-08-30 11:17:28.762252570 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/resources/src/mediawiki/mediawiki.toc.js 2016-09-06 16:25:53.863913527 +0000
@@ -10,7 +10,8 @@
$tocList = $toc.find( 'ul' ).eq( 0 );
// Hide/show the table of contents element
- function toggleToc() {
+ function toggleToc( e ) {
+ e.preventDefault();
if ( $tocList.is( ':hidden' ) ) {
$tocList.slideDown( 'fast' );
$tocToggleLink.text( mw.msg( 'hidetoc' ) );
@@ -30,11 +31,8 @@
hideToc = mw.cookie.get( 'hidetoc' ) === '1';
$tocToggleLink = $( '' )
- .text( hideToc ? mw.msg( 'showtoc' ) : mw.msg( 'hidetoc' ) )
- .click( function ( e ) {
- e.preventDefault();
- toggleToc();
- } );
+ .text( mw.msg( hideToc ? 'showtoc' : 'hidetoc' ) )
+ .click( toggleToc );
$tocTitle.append(
$tocToggleLink
--- /srv/mediawiki/php-1.28.0-wmf.17/resources/src/mediawiki/mediawiki.js 2016-08-31 02:25:32.541574055 +0000
+++ /srv/mediawiki/php-1.28.0-wmf.18/resources/src/mediawiki/mediawiki.js 2016-09-06 16:25:53.863913527 +0000
@@ -1195,7 +1195,7 @@
// Force jQuery behaviour to be for crossDomain. Otherwise jQuery would use
// XHR for a same domain request instead of