From: Timo Tijhof Date: Sat, 18 Mar 2017 00:11:53 +0000 (-0700) Subject: Remove unused 'jquery.arrowSteps' (deprecated in 1.28) X-Git-Tag: 1.31.0-rc.0~3770 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=f53fd6fd477f71706de41da43d82280df4dabee8;p=lhc%2Fweb%2Fwiklou.git Remove unused 'jquery.arrowSteps' (deprecated in 1.28) Was only used by UploadWizard, and no-where else in Wikimedia Git. UploadWizard has its own copy as of last year. (T144974) Change-Id: I3d426f67f8ba061d10434469f261cb725bd672d6 --- diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index 8eb1f896a3..ce3ae0d421 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -256,9 +256,9 @@ changes to languages because of Phabricator reports. signature). Subclasses are likely to call at least doMainQuery (possibly both), but other classes might too, because they were public. - Also, some related hooks were deprecated, but this is not yet a breaking change. +* Removed 'jquery.arrowSteps' module. (deprecated since 1.28) == Compatibility == diff --git a/jsduck.json b/jsduck.json index 228c5c4696..f7771d1a74 100644 --- a/jsduck.json +++ b/jsduck.json @@ -20,7 +20,6 @@ "resources/src/mediawiki.toolbar", "resources/src/mediawiki.widgets", "resources/src/jquery/jquery.accessKeyLabel.js", - "resources/src/jquery/jquery.arrowSteps.js", "resources/src/jquery/jquery.autoEllipsis.js", "resources/src/jquery/jquery.badge.js", "resources/src/jquery/jquery.byteLength.js", diff --git a/resources/Resources.php b/resources/Resources.php index 7ba1edc933..2ed1489645 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -156,12 +156,6 @@ return [ ], 'scripts' => 'resources/lib/jquery/jquery.appear.js', ], - 'jquery.arrowSteps' => [ - 'deprecated' => true, - 'scripts' => 'resources/src/jquery/jquery.arrowSteps.js', - 'styles' => 'resources/src/jquery/jquery.arrowSteps.css', - 'targets' => [ 'desktop', 'mobile' ], - ], 'jquery.async' => [ 'scripts' => 'resources/lib/jquery/jquery.async.js', ], diff --git a/resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png b/resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png deleted file mode 100644 index 84ed2a2d63..0000000000 Binary files a/resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png and /dev/null differ diff --git a/resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png b/resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png deleted file mode 100644 index c212aeb7c3..0000000000 Binary files a/resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png and /dev/null differ diff --git a/resources/src/jquery/images/jquery.arrowSteps.head-ltr.png b/resources/src/jquery/images/jquery.arrowSteps.head-ltr.png deleted file mode 100644 index e6546bfd10..0000000000 Binary files a/resources/src/jquery/images/jquery.arrowSteps.head-ltr.png and /dev/null differ diff --git a/resources/src/jquery/images/jquery.arrowSteps.head-rtl.png b/resources/src/jquery/images/jquery.arrowSteps.head-rtl.png deleted file mode 100644 index 2af30b9614..0000000000 Binary files a/resources/src/jquery/images/jquery.arrowSteps.head-rtl.png and /dev/null differ diff --git a/resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png b/resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png deleted file mode 100644 index 3ad990b6ba..0000000000 Binary files a/resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png and /dev/null differ diff --git a/resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png b/resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png deleted file mode 100644 index 1d3048ef73..0000000000 Binary files a/resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png and /dev/null differ diff --git a/resources/src/jquery/jquery.arrowSteps.css b/resources/src/jquery/jquery.arrowSteps.css deleted file mode 100644 index 92c6c43c97..0000000000 --- a/resources/src/jquery/jquery.arrowSteps.css +++ /dev/null @@ -1,45 +0,0 @@ -.arrowSteps { - list-style-type: none; - list-style-image: none; - border: 1px solid #666; - position: relative; -} - -.arrowSteps li { - float: left; - padding: 0; - margin: 0; - border: 0; -} - -.arrowSteps li div { - padding: 0.5em; - text-align: center; - white-space: nowrap; - overflow: hidden; -} - -.arrowSteps li.arrow div { - /* @embed */ - background: url( images/jquery.arrowSteps.divider-ltr.png ) no-repeat right center; -} - -/* applied to the element preceding the highlighted step */ -.arrowSteps li.arrow.tail div { - /* @embed */ - background: url( images/jquery.arrowSteps.tail-ltr.png ) no-repeat right center; -} - -/* this applies to all highlighted, including the last */ -.arrowSteps li.head div { - /* @embed */ - background: url( images/jquery.arrowSteps.head-ltr.png ) no-repeat left center; - font-weight: bold; -} - -/* this applies to all highlighted arrows except the last */ -.arrowSteps li.arrow.head div { - /* TODO: eliminate duplication of jquery.arrowSteps.head.png embedding */ - /* @embed */ - background: url( images/jquery.arrowSteps.head-ltr.png ) no-repeat right center; -} diff --git a/resources/src/jquery/jquery.arrowSteps.js b/resources/src/jquery/jquery.arrowSteps.js deleted file mode 100644 index b0c36c6548..0000000000 --- a/resources/src/jquery/jquery.arrowSteps.js +++ /dev/null @@ -1,98 +0,0 @@ -/*! - * jQuery arrowSteps plugin - * Copyright Neil Kandalgaonkar, 2010 - * - * This work is licensed under the terms of the GNU General Public License, - * version 2 or later. - * (see http://www.fsf.org/licensing/licenses/gpl.html). - * Derivative works and later versions of the code must be free software - * licensed under the same or a compatible license. - */ - -/** - * @class jQuery.plugin.arrowSteps - */ -( function ( $ ) { - /** - * Show users their progress through a series of steps, via a row of items that fit - * together like arrows. One item can be highlighted at a time. - * - * - * - * - * - * @return {jQuery} - * @chainable - */ - $.fn.arrowSteps = function () { - var $steps, width, arrowWidth, $stepDiv, - $el = this, - paddingSide = $( 'body' ).hasClass( 'rtl' ) ? 'padding-left' : 'padding-right'; - - $el.addClass( 'arrowSteps' ); - $steps = $el.find( 'li' ); - - width = parseInt( 100 / $steps.length, 10 ); - $steps.css( 'width', width + '%' ); - - // Every step except the last one has an arrow pointing forward: - // at the right hand side in LTR languages, and at the left hand side in RTL. - // Also add in the padding for the calculated arrow width. - $stepDiv = $steps.filter( ':not(:last-child)' ).addClass( 'arrow' ).find( 'div' ); - - // Execute when complete page is fully loaded, including all frames, objects and images - $( window ).on( 'load', function () { - arrowWidth = parseInt( $el.outerHeight(), 10 ); - $stepDiv.css( paddingSide, arrowWidth.toString() + 'px' ); - } ); - - $el.data( 'arrowSteps', $steps ); - - return this; - }; - - /** - * Highlights the element selected by the selector. - * - * $( '#robin-hood-daffy' ).arrowStepsHighlight( '#guard' ); - * // 'Guard!' is highlighted. - * - * // ... user completes the 'guard' step ... - * - * $( '#robin-hood-daffy' ).arrowStepsHighlight( '#turn' ); - * // 'Turn!' is highlighted. - * - * @param {string} selector - */ - $.fn.arrowStepsHighlight = function ( selector ) { - var $previous, - $steps = this.data( 'arrowSteps' ); - $.each( $steps, function ( i, step ) { - var $step = $( step ); - if ( $step.is( selector ) ) { - if ( $previous ) { - $previous.addClass( 'tail' ); - } - $step.addClass( 'head' ); - } else { - $step.removeClass( 'head tail lasthead' ); - } - $previous = $step; - } ); - }; - - /** - * @class jQuery - * @mixins jQuery.plugin.arrowSteps - */ -}( jQuery ) );