From: Timo Tijhof Date: Sun, 20 May 2018 13:25:40 +0000 (+0200) Subject: mediawiki.debug: Move internal footHovzer to the same module X-Git-Tag: 1.34.0-rc.0~5347^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22calendrier%22%2C%22type=semaine%22%29%20.%20%22?a=commitdiff_plain;h=e61f2628befff819ccc2874fc5ffd793c7edf8bf;p=lhc%2Fweb%2Fwiklou.git mediawiki.debug: Move internal footHovzer to the same module This is an internal dev utility used by mediawiki.debug, not used anywhere else, and probably wouldn't be supported even if it was re-used somewhere, given it's custom made for mwdebug. Bug: T192623 Change-Id: I086f7a1d06ab33d9dd9fc29fff27ddcdeb9a304b --- diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index 33ef49b5e3..b92c2ba140 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -100,6 +100,7 @@ because of Phabricator reports. by RemexHtml. * (T179624) Job::insert() and ::batchInsert(), deprecated in 1.21, were both removed. Use JobQueueGroup::singleton()->push() instead. +* The jquery.footHovzer module, for mediawiki.debug, was removed. === Deprecations in 1.32 === * Use of a StartProfiler.php file is deprecated in favour of placing diff --git a/resources/Resources.php b/resources/Resources.php index 42f5637ec1..9e285d339e 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -217,10 +217,6 @@ return [ 'styles' => 'resources/src/jquery/jquery.farbtastic.css', 'dependencies' => 'jquery.colorUtil', ], - 'jquery.footHovzer' => [ - 'scripts' => 'resources/src/jquery/jquery.footHovzer.js', - 'styles' => 'resources/src/jquery/jquery.footHovzer.css', - ], 'jquery.form' => [ 'scripts' => 'resources/lib/jquery/jquery.form.js', ], @@ -970,13 +966,14 @@ return [ ], 'mediawiki.debug' => [ 'scripts' => [ + 'resources/src/mediawiki.debug/jquery.footHovzer.js', 'resources/src/mediawiki.debug/debug.js', ], 'styles' => [ + 'resources/src/mediawiki.debug/jquery.footHovzer.css', 'resources/src/mediawiki.debug/debug.less', ], 'dependencies' => [ - 'jquery.footHovzer', 'oojs-ui-core', ], ], diff --git a/resources/src/jquery/jquery.footHovzer.css b/resources/src/jquery/jquery.footHovzer.css deleted file mode 100644 index 77d9514c22..0000000000 --- a/resources/src/jquery/jquery.footHovzer.css +++ /dev/null @@ -1,6 +0,0 @@ -#jquery-foot-hovzer { - position: fixed; - bottom: 0; - width: 100%; - z-index: 1000; -} diff --git a/resources/src/jquery/jquery.footHovzer.js b/resources/src/jquery/jquery.footHovzer.js deleted file mode 100644 index e601ddb1b6..0000000000 --- a/resources/src/jquery/jquery.footHovzer.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @class jQuery.plugin.footHovzer - */ -( function ( $ ) { - var $hovzer, footHovzer, $spacer; - - function getHovzer() { - if ( $hovzer === undefined ) { - $hovzer = $( '
' ).appendTo( 'body' ); - } - return $hovzer; - } - - /** - * Utility to stack stuff in an overlay fixed on the bottom of the page. - * - * Usage: - * - * var hovzer = $.getFootHovzer(); - * hovzer.$.append( $myCollection ); - * hovzer.update(); - * - * @static - * @inheritable - * @return {jQuery.footHovzer} - */ - $.getFootHovzer = function () { - footHovzer.$ = getHovzer(); - return footHovzer; - }; - - /** - * @private - * @class jQuery.footHovzer - */ - footHovzer = { - - /** - * @property {jQuery} $ The stack container - */ - - /** - * Update dimensions of stack to account for changes in the subtree. - */ - update: function () { - var $body; - - $body = $( 'body' ); - - if ( $spacer === undefined ) { - $spacer = $( '
' ).attr( 'id', 'jquery-foot-hovzer-spacer' ); - $spacer.appendTo( $body ); - } - // Ensure CSS is applied by browser before using .outerHeight() - setTimeout( function () { - $spacer.css( 'height', getHovzer().outerHeight( /* includeMargin = */ true ) ); - }, 0 ); - } - }; - - /** - * @class jQuery - * @mixins jQuery.plugin.footHovzer - */ - -}( jQuery ) ); diff --git a/resources/src/mediawiki.debug/jquery.footHovzer.css b/resources/src/mediawiki.debug/jquery.footHovzer.css new file mode 100644 index 0000000000..77d9514c22 --- /dev/null +++ b/resources/src/mediawiki.debug/jquery.footHovzer.css @@ -0,0 +1,6 @@ +#jquery-foot-hovzer { + position: fixed; + bottom: 0; + width: 100%; + z-index: 1000; +} diff --git a/resources/src/mediawiki.debug/jquery.footHovzer.js b/resources/src/mediawiki.debug/jquery.footHovzer.js new file mode 100644 index 0000000000..091aa2543e --- /dev/null +++ b/resources/src/mediawiki.debug/jquery.footHovzer.js @@ -0,0 +1,67 @@ +/** + * @private + * @class jQuery.plugin.footHovzer + */ +( function ( $ ) { + var $hovzer, footHovzer, $spacer; + + function getHovzer() { + if ( $hovzer === undefined ) { + $hovzer = $( '
' ).appendTo( 'body' ); + } + return $hovzer; + } + + /** + * Utility to stack stuff in an overlay fixed on the bottom of the page. + * + * Usage: + * + * var hovzer = $.getFootHovzer(); + * hovzer.$.append( $myCollection ); + * hovzer.update(); + * + * @static + * @inheritable + * @return {jQuery.footHovzer} + */ + $.getFootHovzer = function () { + footHovzer.$ = getHovzer(); + return footHovzer; + }; + + /** + * @private + * @class jQuery.footHovzer + */ + footHovzer = { + + /** + * @property {jQuery} $ The stack container + */ + + /** + * Update dimensions of stack to account for changes in the subtree. + */ + update: function () { + var $body; + + $body = $( 'body' ); + + if ( $spacer === undefined ) { + $spacer = $( '
' ).attr( 'id', 'jquery-foot-hovzer-spacer' ); + $spacer.appendTo( $body ); + } + // Ensure CSS is applied by browser before using .outerHeight() + setTimeout( function () { + $spacer.css( 'height', getHovzer().outerHeight( /* includeMargin = */ true ) ); + }, 0 ); + } + }; + + /** + * @class jQuery + * @mixins jQuery.plugin.footHovzer + */ + +}( jQuery ) );