mediawiki.debug: Move internal footHovzer to the same module
authorTimo Tijhof <krinklemail@gmail.com>
Sun, 20 May 2018 13:25:40 +0000 (15:25 +0200)
committerKrinkle <krinklemail@gmail.com>
Tue, 22 May 2018 22:55:03 +0000 (22:55 +0000)
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

RELEASE-NOTES-1.32
resources/Resources.php
resources/src/jquery/jquery.footHovzer.css [deleted file]
resources/src/jquery/jquery.footHovzer.js [deleted file]
resources/src/mediawiki.debug/jquery.footHovzer.css [new file with mode: 0644]
resources/src/mediawiki.debug/jquery.footHovzer.js [new file with mode: 0644]

index 33ef49b..b92c2ba 100644 (file)
@@ -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
index 42f5637..9e285d3 100644 (file)
@@ -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 (file)
index 77d9514..0000000
+++ /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 (file)
index e601ddb..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @class jQuery.plugin.footHovzer
- */
-( function ( $ ) {
-       var $hovzer, footHovzer, $spacer;
-
-       function getHovzer() {
-               if ( $hovzer === undefined ) {
-                       $hovzer = $( '<div id="jquery-foot-hovzer"></div>' ).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 = $( '<div>' ).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 (file)
index 0000000..77d9514
--- /dev/null
@@ -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 (file)
index 0000000..091aa25
--- /dev/null
@@ -0,0 +1,67 @@
+/**
+ * @private
+ * @class jQuery.plugin.footHovzer
+ */
+( function ( $ ) {
+       var $hovzer, footHovzer, $spacer;
+
+       function getHovzer() {
+               if ( $hovzer === undefined ) {
+                       $hovzer = $( '<div id="jquery-foot-hovzer"></div>' ).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 = $( '<div>' ).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 ) );