diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
commit | 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch) | |
tree | af68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /extensions/Vector/modules | |
parent | af4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff) |
Update to MediaWiki 1.22.0
Diffstat (limited to 'extensions/Vector/modules')
17 files changed, 0 insertions, 895 deletions
diff --git a/extensions/Vector/modules/ext.vector.collapsibleNav.css b/extensions/Vector/modules/ext.vector.collapsibleNav.css deleted file mode 100644 index b9c27355..00000000 --- a/extensions/Vector/modules/ext.vector.collapsibleNav.css +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Stylesheet for collapsible nav - * NOTE: Please remove all the h5 selectors at some point as they are only for - * backwards-compatibility due to html caching. --2012-11-28 - */ - -#mw-panel.collapsible-nav .portal { - /* @embed */ - background: url(images/portal-break.png) left top no-repeat; - padding: 0.25em 0 !important; - margin: -11px 9px 10px 11px; -} - -#mw-panel.collapsible-nav .portal h3, -#mw-panel.collapsible-nav .portal h5 { - color: #4D4D4D; - font-weight: normal; - /* @embed */ - background: url(images/open.png) left center no-repeat; - padding: 4px 0 3px 1.5em; - margin-bottom: 0; -} - -#mw-panel.collapsible-nav .portal h3:hover, -#mw-panel.collapsible-nav .portal h5:hover { - cursor: pointer; - text-decoration: none; -} - -#mw-panel.collapsible-nav .portal h3 a, -#mw-panel.collapsible-nav .portal h5 a { - color: #4D4D4D; - text-decoration: none; -} - -#mw-panel.collapsible-nav .portal .body { - background: none !important; - padding-top: 0; - display: none; -} - -#mw-panel.collapsible-nav .portal .body ul li { - padding: 0.25em 0; -} - -/* First */ -#mw-panel.collapsible-nav .portal.first h3, -#mw-panel.collapsible-nav .portal.first h5 { - display: none; -} - -#mw-panel.collapsible-nav .portal.first { - background-image: none; - margin-top: 0; -} - -/* Persistent */ - -#mw-panel.collapsible-nav .portal.persistent .body { - display: block; -} - -#mw-panel.collapsible-nav .portal.persistent h3, -#mw-panel.collapsible-nav .portal.persistent h5 { - background: none !important; - padding-left: 0.7em; - cursor: default; -} - -#mw-panel.collapsible-nav .portal.persistent .body { - margin-left: 0.5em; -} - -/* Collapsed */ - -#mw-panel.collapsible-nav .portal.collapsed h3, -#mw-panel.collapsible-nav .portal.collapsed h5 { - color: #0645AD; - /* @embed */ - background: url(images/closed-ltr.png) left center no-repeat; - margin-bottom: 0; -} - -#mw-panel.collapsible-nav .portal.collapsed h3 a, -#mw-panel.collapsible-nav .portal.collapsed h5 a { - color: #0645AD; -} - -#mw-panel.collapsible-nav .portal.collapsed h3:hover, -#mw-panel.collapsible-nav .portal.collapsed h5:hover { - text-decoration: underline; -} diff --git a/extensions/Vector/modules/ext.vector.collapsibleNav.js b/extensions/Vector/modules/ext.vector.collapsibleNav.js deleted file mode 100644 index 28a85676..00000000 --- a/extensions/Vector/modules/ext.vector.collapsibleNav.js +++ /dev/null @@ -1,253 +0,0 @@ -/** - * Collapisble navigation for Vector - */ -( function ( mw, $ ) { - "use strict"; - var map, version; - - // Use the same function for all navigation headings - don't repeat - function toggle( $element ) { - $.cookie( - 'vector-nav-' + $element.parent().attr( 'id' ), - $element.parent().is( '.collapsed' ), - { 'expires': 30, 'path': '/' } - ); - $element - .parent() - .toggleClass( 'expanded' ) - .toggleClass( 'collapsed' ) - .find( '.body' ) - .slideToggle( 'fast' ); - } - - /* Browser Support */ - - map = { - // Left-to-right languages - ltr: { - // Collapsible Nav is broken in Opera < 9.6 and Konqueror < 4 - opera: [['>=', 9.6]], - konqueror: [['>=', 4.0]], - blackberry: false, - ipod: false, - iphone: false, - ps3: false - }, - // Right-to-left languages - rtl: { - opera: [['>=', 9.6]], - konqueror: [['>=', 4.0]], - blackberry: false, - ipod: false, - iphone: false, - ps3: false - } - }; - if ( !$.client.test( map ) ) { - return true; - } - - /* Bucket Testing */ - - // Fallback to old version - version = 1; - // Allow new version override - if ( mw.config.get( 'wgCollapsibleNavForceNewVersion' ) ) { - version = 2; - } else { - // Make bucket testing optional - if ( mw.config.get( 'wgCollapsibleNavBucketTest' ) ) { - // This is be determined randomly, and then stored in a cookie - version = $.cookie( 'vector-nav-pref-version' ); - // If the cookie didn't exist, or the value is out of range, generate a new one and save it - if ( version === null ) { - // 50% of the people will get the new version - version = Math.round( Math.random() + 1 ); - $.cookie( 'vector-nav-pref-version', version, { - expires: 30, - path: '/' - }); - } - } - } - - $( function ( $ ) { - var limit, threshold, languages, acceptLangCookie, - $primary, $secondary, - i, $link, count, - $headings, tabIndex; - - /* Special Language Portal Handling */ - - // Language portal splitting feature (if it's turned on) - if ( version === 2 ) { - // How many links to show in the primary languages portal - limit = 5; - // How many links there must be in the secondary portal to justify having a secondary portal - threshold = 3; - // Make the interwiki language links list a secondary list, and create a new list before it as primary list - $( '#p-lang ul' ).addClass( 'secondary' ).before( '<ul class="primary"></ul>' ); - // This is a list of languages in order of Wikipedia project size. This is the lowest fallback for choosing - // which links to show in the primary list. Ideally the browser's accept-language headers should steer this - // list, and we should fallback on a site configured (MediaWiki:Common.js) list of prefered languages. - languages = [ - 'en', 'fr', 'de', 'es', 'pt', 'it', 'ru', 'ja', 'nl', 'pl', 'zh', 'sv', 'ar', 'tr', 'uk', 'fi', 'no', 'ca', - 'ro', 'hu', 'ksh', 'id', 'he', 'cs', 'vi', 'ko', 'sr', 'fa', 'da', 'eo', 'sk', 'th', 'lt', 'vo', 'bg', - 'sl', 'hr', 'hi', 'et', 'mk', 'simple', 'new', 'ms', 'nn', 'gl', 'el', 'eu', 'ka', 'tl', 'bn', 'lv', 'ml', - 'bs', 'te', 'la', 'az', 'sh', 'war', 'br', 'is', 'mr', 'be-x-old', 'sq', 'cy', 'lb', 'ta', 'zh-classical', - 'an', 'jv', 'ht', 'oc', 'bpy', 'ceb', 'ur', 'zh-yue', 'pms', 'scn', 'be', 'roa-rup', 'qu', 'af', 'sw', - 'nds', 'fy', 'lmo', 'wa', 'ku', 'hy', 'su', 'yi', 'io', 'os', 'ga', 'ast', 'nap', 'vec', 'gu', 'cv', - 'bat-smg', 'kn', 'uz', 'zh-min-nan', 'si', 'als', 'yo', 'li', 'gan', 'arz', 'sah', 'tt', 'bar', 'gd', 'tg', - 'kk', 'pam', 'hsb', 'roa-tara', 'nah', 'mn', 'vls', 'gv', 'mi', 'am', 'ia', 'co', 'ne', 'fo', 'nds-nl', - 'glk', 'mt', 'ang', 'wuu', 'dv', 'km', 'sco', 'bcl', 'mg', 'my', 'diq', 'tk', 'szl', 'ug', 'fiu-vro', 'sc', - 'rm', 'nrm', 'ps', 'nv', 'hif', 'bo', 'se', 'sa', 'pnb', 'map-bms', 'lad', 'lij', 'crh', 'fur', 'kw', 'to', - 'pa', 'jbo', 'ba', 'ilo', 'csb', 'wo', 'xal', 'krc', 'ckb', 'pag', 'ln', 'frp', 'mzn', 'ce', 'nov', 'kv', - 'eml', 'gn', 'ky', 'pdc', 'lo', 'haw', 'mhr', 'dsb', 'stq', 'tpi', 'arc', 'hak', 'ie', 'so', 'bh', 'ext', - 'mwl', 'sd', 'ig', 'myv', 'ay', 'iu', 'na', 'cu', 'pi', 'kl', 'ty', 'lbe', 'ab', 'got', 'sm', 'as', 'mo', - 'ee', 'zea', 'av', 'ace', 'kg', 'bm', 'cdo', 'cbk-zam', 'kab', 'om', 'chr', 'pap', 'udm', 'ks', 'zu', 'rmy', - 'cr', 'ch', 'st', 'ik', 'mdf', 'kaa', 'aa', 'fj', 'srn', 'tet', 'or', 'pnt', 'bug', 'ss', 'ts', 'pcd', - 'pih', 'za', 'sg', 'lg', 'bxr', 'xh', 'ak', 'ha', 'bi', 've', 'tn', 'ff', 'dz', 'ti', 'ki', 'ny', 'rw', - 'chy', 'tw', 'sn', 'tum', 'ng', 'rn', 'mh', 'ii', 'cho', 'hz', 'kr', 'ho', 'mus', 'kj' - ]; - // If the user has an Accept-Language cookie, use it. Otherwise, set it asynchronously but keep the default - // behavior for this page view. - acceptLangCookie = $.cookie( 'accept-language' ); - if ( acceptLangCookie !== null ) { - // Put the user's accepted languages before the list ordered by wiki size - if ( acceptLangCookie !== '' ) { - languages = acceptLangCookie.split( ',' ).concat( languages ); - } - } else { - $.getJSON( - mw.util.wikiScript( 'api' ), - 'format=json&action=query&meta=userinfo&uiprop=acceptlang', - function ( data ) { - var langs = [], j, len, lang; - if ( data.query && - data.query.userinfo && - data.query.userinfo.acceptlang !== undefined - ) { - for ( j = 0, lang = data.query.userinfo.acceptlang, len = lang.length; j < len; j++ ) { - if ( lang[j].q !== 0 ) { - langs.push( lang[j]['*'] ); - } - } - } - $.cookie( 'accept-language', langs.join( ',' ), { - path: '/', - expires: 30 - }); - } - ); - } - // Shortcuts to the two lists - $primary = $( '#p-lang ul.primary' ); - $secondary = $( '#p-lang ul.secondary' ); - // Adjust the limit based on the threshold - if ( $secondary.children().length < limit + threshold ) { - limit += threshold; - } - // Move up to 5 of the links into the primary list, based on the priorities set forth in the languages list - count = 0; - for ( i = 0; i < languages.length; i++ ) { - $link = $secondary.find( '.interwiki-' + languages[i] ); - if ( $link.length ) { - if ( count++ < limit ) { - $link.appendTo( $primary ); - } else { - break; - } - } - } - // If there's still links in the secondary list and we havn't filled the primary list to it's limit yet, move - // links into the primary list in order of appearance - if ( count < limit ) { - $secondary.children().each( function () { - if ( count++ < limit ) { - $(this).appendTo( $primary ); - } else { - return false; - } - } ); - } - // Hide the more portal if it's now empty, otherwise make the list into it's very own portal - if ( $secondary.children().length === 0 ) { - $secondary.remove(); - } else { - $( '#p-lang' ).after( '<div id="p-lang-more" class="portal"><h3></h3><div class="body"></div></div>' ); - $( '#p-lang-more h3' ).text( mw.msg( 'vector-collapsiblenav-more' ) ); - $secondary.appendTo( $( '#p-lang-more .body' ) ); - } - // Always show the primary interwiki language portal - $( '#p-lang' ).addClass( 'persistent' ); - } - - /* General Portal Modification */ - - // Always show the first portal - $( '#mw-panel > .portal:first' ).addClass( 'first persistent' ); - // Apply a class to the entire panel to activate styles - $( '#mw-panel' ).addClass( 'collapsible-nav' ); - // Use cookie data to restore preferences of what to show and hide - $( '#mw-panel > .portal:not(.persistent)' ) - .each( function ( i ) { - var id = $(this).attr( 'id' ), - state = $.cookie( 'vector-nav-' + id ); - // Add anchor tag to heading for better accessibility - $( this ).find( 'h3, h5' ).wrapInner( $( '<a href="#"></a>' ).click( false ) ); - // In the case that we are not showing the new version, let's show the languages by default - if ( - state === 'true' || - ( state === null && i < 1 ) || - ( state === null && version === 1 && id === 'p-lang' ) - ) { - $(this) - .addClass( 'expanded' ) - .removeClass( 'collapsed' ) - .find( '.body' ) - .hide() // bug 34450 - .show(); - } else { - $(this) - .addClass( 'collapsed' ) - .removeClass( 'expanded' ); - } - // Re-save cookie - if ( state !== null ) { - $.cookie( 'vector-nav-' + $(this).attr( 'id' ), state, { 'expires': 30, 'path': '/' } ); - } - } ); - - /* Tab Indexing */ - - $headings = $( '#mw-panel > .portal:not(.persistent) > h3, #mw-panel > .portal:not(.persistent) > h5' ); - - // Get the highest tab index - tabIndex = $( document ).lastTabIndex() + 1; - - // Fix the search not having a tabindex - $( '#searchInput' ).attr( 'tabindex', tabIndex++ ); - - // Make it keyboard accessible - $headings.attr( 'tabindex', function () { - return tabIndex++; - }); - - // Toggle the selected menu's class and expand or collapse the menu - $( '#mw-panel' ) - .delegate( '.portal:not(.persistent) > h3, .portal:not(.persistent) > h5', 'keydown', function ( e ) { - // Make the space and enter keys act as a click - if ( e.which === 13 /* Enter */ || e.which === 32 /* Space */ ) { - toggle( $(this) ); - } - } ) - .delegate( '.portal:not(.persistent) > h3, .portal:not(.persistent) > h5', 'mousedown', function ( e ) { - if ( e.which !== 3 ) { // Right mouse click - toggle( $(this) ); - $(this).blur(); - } - return false; - } ); - }); - -}( mediaWiki, jQuery ) ); diff --git a/extensions/Vector/modules/ext.vector.collapsibleTabs.js b/extensions/Vector/modules/ext.vector.collapsibleTabs.js deleted file mode 100644 index 439a1995..00000000 --- a/extensions/Vector/modules/ext.vector.collapsibleTabs.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Collapsible tabs for Vector - */ -jQuery( function ( $ ) { - var $cactions = $( '#p-cactions' ); - - // Bind callback functions to animate our drop down menu in and out - // and then call the collapsibleTabs function on the menu - $( '#p-views ul' ) - .bind( 'beforeTabCollapse', function () { - // If the dropdown was hidden, show it - if ( $cactions.hasClass( 'emptyPortlet' ) ) { - $cactions - .removeClass( 'emptyPortlet' ) - .find( 'h3, h5' ) - .css( 'width', '1px' ).animate( { 'width': '24px' }, 390 ); - } - } ) - .bind( 'beforeTabExpand', function () { - // If we're removing the last child node right now, hide the dropdown - if ( $cactions.find( 'li' ).length === 1 ) { - $cactions.find( 'h3, h5' ).animate( { 'width': '1px' }, 390, function () { - $( this ).attr( 'style', '' ) - .parent().addClass( 'emptyPortlet' ); - }); - } - } ) - .collapsibleTabs(); -} ); diff --git a/extensions/Vector/modules/ext.vector.expandableSearch.css b/extensions/Vector/modules/ext.vector.expandableSearch.css deleted file mode 100644 index 8b33bbb1..00000000 --- a/extensions/Vector/modules/ext.vector.expandableSearch.css +++ /dev/null @@ -1,11 +0,0 @@ -.expandableField { - display: block; -} - -#simpleSearch { - overflow: auto; -} - -#searchButton { - margin-top: 0.2em !important; -} diff --git a/extensions/Vector/modules/ext.vector.expandableSearch.js b/extensions/Vector/modules/ext.vector.expandableSearch.js deleted file mode 100644 index b4910647..00000000 --- a/extensions/Vector/modules/ext.vector.expandableSearch.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Expandable search for Vector - */ -jQuery( document ).ready( function ( $ ) { - - /* Browser Support */ - - var map = { - // Left-to-right languages - ltr: { - // Collapsible Nav is broken in Opera < 9.6 and Konqueror < 4 - msie: [['>=', 8]], - blackberry: false, - ipod: false, - iphone: false, - ps3: false - }, - // Right-to-left languages - rtl: { - msie: [['>=', 8]], - blackberry: false, - ipod: false, - iphone: false, - ps3: false - } - }; - if ( !$.client.test( map ) ) { - return true; - } - - $( '#searchInput' ) - .expandableField( { - beforeExpand: function ( context ) { - // Animate the containers border - $( this ) - .parent() - .animate( { - borderTopColor: '#a0d8ff', - borderLeftColor: '#a0d8ff', - borderRightColor: '#a0d8ff', - borderBottomColor: '#a0d8ff' - }, 'fast' ); - }, - beforeCondense: function ( context ) { - // Animate the containers border - $( this ) - .parent() - .animate( { - borderTopColor: '#aaaaaa', - borderLeftColor: '#aaaaaa', - borderRightColor: '#aaaaaa', - borderBottomColor: '#aaaaaa' - }, 'fast' ); - }, - afterExpand: function ( context ) { - // Trigger the collapsible tabs resize handler - if ( $.collapsibleTabs ) { - $.collapsibleTabs.handleResize(); - } - }, - afterCondense: function ( context ) { - // Trigger the collapsible tabs resize handler - if ( $.collapsibleTabs ) { - $.collapsibleTabs.handleResize(); - } - }, - expandToLeft: !$( 'body' ).hasClass( 'rtl' ) - } ) - .css( 'float', $( 'body' ).hasClass( 'rtl' ) ? 'right' : 'left' ) - .siblings( 'button' ) - .css( 'float', $( 'body' ).hasClass( 'rtl' ) ? 'right' : 'left' ); -} ); diff --git a/extensions/Vector/modules/ext.vector.footerCleanup.css b/extensions/Vector/modules/ext.vector.footerCleanup.css deleted file mode 100644 index a361346b..00000000 --- a/extensions/Vector/modules/ext.vector.footerCleanup.css +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Footer cleanup - */ - -/* General layout */ -#wpTextbox1 { - margin: 0; - display: block; -} - -.editOptions { - background-color: #F0F0F0; - border: 1px solid silver; - border-top: none; - padding: 1em 1em 1.5em 1em; - margin-bottom: 2em; -} - -/* Styles for collapsible lists of templates used and hidden categories */ -.collapsible-list { - display: inline; - cursor: pointer; - min-width: 400px; -} - -.collapsible-list span { - float: left; - /* @embed */ - background-image: url(./images/open.png); - background-repeat: no-repeat; - background-position: 50% 50%; - display: block; - height: 16px; - width: 16px; -} - -.collapsible-list span.collapsed { - /* @embed */ - background-image: url(./images/closed-ltr.png); -} - -.hiddencats ul, .templatesUsed ul { - margin-bottom: 1em; - margin-left: 2.5em; -} - -/* Adjustments to edit form elements */ -.editCheckboxes { - margin-bottom: 1em; -} - -.editCheckboxes input:first-child { - margin-left: 0; -} - -.cancelLink { - margin-left: 0.5em; -} - -#editpage-copywarn { - font-size: 0.9em; -} - -#wpSummary { - display: block; - margin-top: 0; - margin-bottom: 0.5em; -} - -.editButtons input:first-child { - margin-left: .1em; -} diff --git a/extensions/Vector/modules/ext.vector.footerCleanup.js b/extensions/Vector/modules/ext.vector.footerCleanup.js deleted file mode 100644 index 5881014d..00000000 --- a/extensions/Vector/modules/ext.vector.footerCleanup.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Footer cleanup for Vector - */ -( function ( $ ) { - // Wait for onload to remove edit help and "|" after cancel link. - $( window ).load( function () { - // Only if advanced editor is found. - if ( 'wikiEditor' in $ ) { - $( '.editButtons' ).find( '.editHelp' ).remove(); - // Remove the "|" from after the cancelLink. - var $cancelLink = $( '#mw-editform-cancel' ); - $cancelLink.parent().empty().append( $cancelLink ); - // Adjustment for proper right side alignment with WikiEditor. - $( '.editOptions, #editpage-specialchars' ).css( 'margin-right', '-2px' ); - } - } ); - // Waiting until dom ready as the module is loaded in the head. - $( document ).ready( function () { - // Make "Templates used" a collapsible list. - $( '.templatesUsed' ).footerCollapsibleList( { - name: 'templates-used-list', - title: mw.msg( 'vector-footercleanup-templates' ) - } ); - - // Make "Hidden categories" a collapsible list. - $( '.hiddencats' ).footerCollapsibleList( { - name: 'hidden-categories-list', - title: mw.msg( 'vector-footercleanup-categories' ) - } ); - } ); -} ( jQuery ) ); diff --git a/extensions/Vector/modules/ext.vector.sectionEditLinks.css b/extensions/Vector/modules/ext.vector.sectionEditLinks.css deleted file mode 100644 index 07df70aa..00000000 --- a/extensions/Vector/modules/ext.vector.sectionEditLinks.css +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Section edit links - */ - -span.vector-editLink { - float: none; - display: inline-block; -} - -span.vector-editLink a { - padding-left: 18px; - /* @embed */ - background: url(images/edit-faded.png) left top no-repeat; -} - -span.vector-editLink a:hover { - /* @embed */ - background-image: url(images/edit.png); -} diff --git a/extensions/Vector/modules/ext.vector.sectionEditLinks.js b/extensions/Vector/modules/ext.vector.sectionEditLinks.js deleted file mode 100644 index 62bde9e6..00000000 --- a/extensions/Vector/modules/ext.vector.sectionEditLinks.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Section Edit Links for Vector - */ -( function ( $, mw ) { - -var eventBase = 'ext.vector.sectionEditLinks-bucket:'; -var cookieBase = 'ext.vector.sectionEditLinks-'; -var bucket = null; - -if ( mw.config.get( 'wgVectorSectionEditLinksBucketTest', false ) ) { - // If the version in the client's cookie doesn't match wgVectorSectionEditLinksExperiment, then - // we need to disregard the bucket they may already be in to ensure accurate redistribution - var currentExperiment = $.cookie( cookieBase + 'experiment' ); - var experiment = Number( mw.config.get( 'wgVectorSectionEditLinksExperiment', 0 ) ); - if ( currentExperiment === null || Number( currentExperiment ) != experiment ) { - $.cookie( cookieBase + 'experiment', experiment ); - } else { - bucket = $.cookie( cookieBase + 'bucket' ); - } - if ( bucket === null ) { - // Percentage chance of being tracked - var odds = Math.min( 100, Math.max( 0, - Number( mw.config.get( 'wgVectorSectionEditLinksLotteryOdds', 0 ) ) - ) ); - // 0 = not tracked, 1 = tracked with old version, 2 = tracked with new version - bucket = ( Math.random() * 100 ) < odds ? Number( Math.random() < 0.5 ) + 1 : 0; - $.cookie( cookieBase + 'bucket', bucket, { 'path': '/', 'expires': 30 } ); - // If we are going to track this person from now on, let's also track which bucket we put - // them into and when - if ( bucket > 0 && 'trackAction' in $ ) { - $.trackAction( eventBase + bucket + '@' + experiment ); - } - } -} - -if ( bucket <= 0 ) { - return; -} - -$(document).ready( function () { - if ( bucket == 2 ) { - // Move the link over to be next to the heading text and style it with an icon - $( 'span.mw-headline' ).each( function () { - $(this) - .after( - $( '<span class="editsection vector-editLink"></span>' ) - .append( - $(this) - .prev( 'span.editsection' ) - .find( 'a' ) - .each( function () { - var text = $(this).text(); - $(this).text( - text.substr( 0, 1 ).toUpperCase() + text.substr( 1 ) - ); - } ) - .detach() - ) - ) - .prev( 'span.editsection' ) - .remove(); - } ); - } -} ); - -} )( jQuery, mediaWiki ); diff --git a/extensions/Vector/modules/images/closed-ltr.png b/extensions/Vector/modules/images/closed-ltr.png Binary files differdeleted file mode 100644 index 063ac6f7..00000000 --- a/extensions/Vector/modules/images/closed-ltr.png +++ /dev/null diff --git a/extensions/Vector/modules/images/closed-rtl.png b/extensions/Vector/modules/images/closed-rtl.png Binary files differdeleted file mode 100644 index c3462182..00000000 --- a/extensions/Vector/modules/images/closed-rtl.png +++ /dev/null diff --git a/extensions/Vector/modules/images/edit-faded.png b/extensions/Vector/modules/images/edit-faded.png Binary files differdeleted file mode 100644 index 1e2e5d83..00000000 --- a/extensions/Vector/modules/images/edit-faded.png +++ /dev/null diff --git a/extensions/Vector/modules/images/edit.png b/extensions/Vector/modules/images/edit.png Binary files differdeleted file mode 100644 index fe281252..00000000 --- a/extensions/Vector/modules/images/edit.png +++ /dev/null diff --git a/extensions/Vector/modules/images/open.png b/extensions/Vector/modules/images/open.png Binary files differdeleted file mode 100644 index 0221028e..00000000 --- a/extensions/Vector/modules/images/open.png +++ /dev/null diff --git a/extensions/Vector/modules/images/portal-break.png b/extensions/Vector/modules/images/portal-break.png Binary files differdeleted file mode 100644 index 10cd7f83..00000000 --- a/extensions/Vector/modules/images/portal-break.png +++ /dev/null diff --git a/extensions/Vector/modules/jquery.collapsibleTabs.js b/extensions/Vector/modules/jquery.collapsibleTabs.js deleted file mode 100644 index 1e6b7af5..00000000 --- a/extensions/Vector/modules/jquery.collapsibleTabs.js +++ /dev/null @@ -1,206 +0,0 @@ -/** - * Collapsible tabs jQuery Plugin - */ -( function ( $ ) { - var rtl = $( 'body' ).is( '.rtl' ); - $.fn.collapsibleTabs = function ( options ) { - // return if the function is called on an empty jquery object - if ( !this.length ) { - return this; - } - // Merge options into the defaults - var $settings = $.extend( {}, $.collapsibleTabs.defaults, options ); - - this.each( function () { - var $el = $( this ); - // add the element to our array of collapsible managers - $.collapsibleTabs.instances = ( $.collapsibleTabs.instances.length === 0 ? - $el : $.collapsibleTabs.instances.add( $el ) ); - // attach the settings to the elements - $el.data( 'collapsibleTabsSettings', $settings ); - // attach data to our collapsible elements - $el.children( $settings.collapsible ).each( function () { - $.collapsibleTabs.addData( $( this ) ); - } ); - } ); - - // if we haven't already bound our resize hanlder, bind it now - if ( !$.collapsibleTabs.boundEvent ) { - $( window ) - .delayedBind( '500', 'resize', function ( ) { - $.collapsibleTabs.handleResize(); - } ); - } - // call our resize handler to setup the page - $.collapsibleTabs.handleResize(); - return this; - }; - /** - * Returns the amount of horizontal distance between the two tabs groups - * (#left-navigation and #right-navigation), in pixels. If negative, this - * means that the tabs overlap, and the value is the width of overlapping - * parts. - * - * Used in default expandCondition and collapseCondition. - * - * @return {Numeric} distance/overlap in pixels - */ - function calculateTabDistance() { - var $tabsArray, $leftTab, $rightTab, leftEnd, rightStart; - - // In RTL, #right-navigation is actually on the left and vice versa. - // Hooray for descriptive naming. - if ( !rtl ) { - $leftTab = $( '#left-navigation' ); - $rightTab = $( '#right-navigation' ); - } else { - $leftTab = $( '#right-navigation' ); - $rightTab = $( '#left-navigation' ); - } - - leftEnd = $leftTab.offset().left + $leftTab.width(); - rightStart = $rightTab.offset().left; - - return rightStart - leftEnd; - } - $.collapsibleTabs = { - instances: [], - boundEvent: null, - defaults: { - expandedContainer: '#p-views ul', - collapsedContainer: '#p-cactions ul', - collapsible: 'li.collapsible', - shifting: false, - expandCondition: function ( eleWidth ) { - // If there's at least eleWidth pixels free space, expand. - return calculateTabDistance() >= eleWidth; - }, - collapseCondition: function () { - // If there's an overlap, collapse. - return calculateTabDistance() < 0; - } - }, - addData: function ( $collapsible ) { - var $settings = $collapsible.parent().data( 'collapsibleTabsSettings' ); - if ( $settings !== null ) { - $collapsible.data( 'collapsibleTabsSettings', { - expandedContainer: $settings.expandedContainer, - collapsedContainer: $settings.collapsedContainer, - expandedWidth: $collapsible.width(), - prevElement: $collapsible.prev() - } ); - } - }, - getSettings: function ( $collapsible ) { - var $settings = $collapsible.data( 'collapsibleTabsSettings' ); - if ( $settings === undefined ) { - $.collapsibleTabs.addData( $collapsible ); - $settings = $collapsible.data( 'collapsibleTabsSettings' ); - } - return $settings; - }, - /** - * @param {jQuery.Event} e - */ - handleResize: function () { - $.collapsibleTabs.instances.each( function () { - var $el = $( this ), - data = $.collapsibleTabs.getSettings( $el ); - - if ( data.shifting ) { - return; - } - - // if the two navigations are colliding - if ( $el.children( data.collapsible ).length > 0 && data.collapseCondition() ) { - - $el.trigger( 'beforeTabCollapse' ); - // move the element to the dropdown menu - $.collapsibleTabs.moveToCollapsed( $el.children( data.collapsible + ':last' ) ); - } - - // if there are still moveable items in the dropdown menu, - // and there is sufficient space to place them in the tab container - if ( $( data.collapsedContainer + ' ' + data.collapsible ).length > 0 - && data.expandCondition( $.collapsibleTabs.getSettings( $( data.collapsedContainer ).children( - data.collapsible + ':first' ) ).expandedWidth ) ) { - //move the element from the dropdown to the tab - $el.trigger( 'beforeTabExpand' ); - $.collapsibleTabs - .moveToExpanded( data.collapsedContainer + ' ' + data.collapsible + ':first' ); - } - }); - }, - moveToCollapsed: function ( ele ) { - var $moving = $( ele ); - - var data = $.collapsibleTabs.getSettings( $moving ); - if ( !data ) { - return; - } - var expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) ); - if ( !expContainerSettings ) { - return; - } - expContainerSettings.shifting = true; - - // Remove the element from where it's at and put it in the dropdown menu - var target = data.collapsedContainer; - $moving.css( 'position', 'relative' ) - .css( ( rtl ? 'left' : 'right' ), 0 ) - .animate( { width: '1px' }, 'normal', function () { - var data; - $( this ).hide(); - // add the placeholder - $( '<span class="placeholder" style="display: none;"></span>' ).insertAfter( this ); - // XXX: 'data' is undefined here, should the 'data' from the outer scope have - // a different name? - $( this ).detach().prependTo( target ).data( 'collapsibleTabsSettings', data ); - $( this ).attr( 'style', 'display: list-item;' ); - data = $.collapsibleTabs.getSettings( $( ele ) ); - if ( data ) { - var expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) ); - if ( expContainerSettings ) { - expContainerSettings.shifting = false; - $.collapsibleTabs.handleResize(); - } - } - } ); - }, - moveToExpanded: function ( ele ) { - var $moving = $( ele ); - var data = $.collapsibleTabs.getSettings( $moving ); - if ( !data ) { - return; - } - var expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) ); - if ( !expContainerSettings ) { - return; - } - expContainerSettings.shifting = true; - - // grab the next appearing placeholder so we can use it for replacing - var $target = $( data.expandedContainer ).find( 'span.placeholder:first' ); - var expandedWidth = data.expandedWidth; - $moving.css( 'position', 'relative' ).css( ( rtl ? 'right' : 'left' ), 0 ).css( 'width', '1px' ); - $target.replaceWith( - $moving - .detach() - .css( 'width', '1px' ) - .data( 'collapsibleTabsSettings', data ) - .animate( { width: expandedWidth + 'px' }, 'normal', function () { - $( this ).attr( 'style', 'display: block;' ); - var data = $.collapsibleTabs.getSettings( $( this ) ); - if ( data ) { - var expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) ); - if ( expContainerSettings ) { - expContainerSettings.shifting = false; - $.collapsibleTabs.handleResize(); - } - } - } ) - ); - } - }; - -}( jQuery ) ); diff --git a/extensions/Vector/modules/jquery.footerCollapsibleList.js b/extensions/Vector/modules/jquery.footerCollapsibleList.js deleted file mode 100644 index 7b9b5bcb..00000000 --- a/extensions/Vector/modules/jquery.footerCollapsibleList.js +++ /dev/null @@ -1,44 +0,0 @@ -( function( $ ) { - // Small jQuery plugin to handle the toggle function & cookie for state - // For collapsible items in the footer - $.fn.footerCollapsibleList = function( config ) { - if ( !( 'title' in config ) || !( 'name' in config ) ) { - return; - } - - return this.each( function () { - var $container, $ul, $explanation, $icon; - - $container = $( this ); - $ul = $container.find( 'ul' ); - $explanation = $container.find( '.mw-templatesUsedExplanation, .mw-hiddenCategoriesExplanation' ); - - $icon = $( '<span>' ); - $ul.before( - $( '<a>' ) - .addClass( 'collapsible-list' ) - .text( config.title ) - .append( $icon ) - .on( 'click', function( e ) { - // Modify state cookie. - var state = ( $.cookie( config.name ) !== 'expanded' ) ? 'expanded' : 'collapsed'; - $.cookie( config.name, state ); - - // Modify DOM. - $ul.slideToggle(); - $icon.toggleClass( 'collapsed' ); - - e.preventDefault(); - } ) - ); - - $explanation.remove(); - - // Check cookie and collapse. - if( $.cookie( config.name ) === null || $.cookie( config.name ) === 'collapsed' ) { - $ul.hide(); - $icon.addClass( 'collapsed' ); - } - } ); - }; -}( jQuery ) ); |