[TASK] Remove loadmask plugin from Extension Manager 03/45903/2
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 12 Jan 2016 19:38:53 +0000 (20:38 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 14 Jan 2016 21:30:27 +0000 (22:30 +0100)
Resolves: #72632
Releases: master,7.6
Change-Id: I68112a832551084dae90e816cd974eb7b994b08a
Reviewed-on: https://review.typo3.org/45903
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/extensionmanager/Resources/Private/Layouts/Main.html
typo3/sysext/extensionmanager/Resources/Public/Contrib/LoadMask/jquery.loadmask.css [deleted file]
typo3/sysext/extensionmanager/Resources/Public/Contrib/LoadMask/jquery.loadmask.js [deleted file]
typo3/sysext/extensionmanager/Resources/Public/Contrib/LoadMask/jquery.loadmask.min.js [deleted file]
typo3/sysext/extensionmanager/Resources/Public/JavaScript/Main.js

index 8fdba97..3027de4 100644 (file)
@@ -3,12 +3,6 @@
 <f:be.pageRenderer
        loadJQuery="true"
        jQueryNamespace="none"
-       includeCssFiles="{
-               0:'{f:uri.resource(path:\'Contrib/LoadMask/jquery.loadmask.css\')}'
-       }"
-       includeJsFiles="{
-               0:'{f:uri.resource(path:\'Contrib/LoadMask/jquery.loadmask.js\')}'
-       }"
        includeRequireJsModules="{
                0:'TYPO3/CMS/Extensionmanager/Main'
        }"
diff --git a/typo3/sysext/extensionmanager/Resources/Public/Contrib/LoadMask/jquery.loadmask.css b/typo3/sysext/extensionmanager/Resources/Public/Contrib/LoadMask/jquery.loadmask.css
deleted file mode 100644 (file)
index dd0faf1..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-.loadmask {\r
-    z-index: 100;\r
-    position: absolute;\r
-    top:0;\r
-    left:0;\r
-    -moz-opacity: 0.75;\r
-    opacity: .75;\r
-    filter: alpha(opacity=75);\r
-    background-color: #FFF;\r
-    width: 100%;\r
-    height: 100%;\r
-    zoom: 1;\r
-}\r
-\r
-.x-mask-loading {\r
-       position: absolute;\r
-       z-index: 150;\r
-}\r
-\r
-.masked {\r
-    overflow: hidden !important;\r
-}\r
-.masked-relative {\r
-    position: relative !important;\r
-}\r
-.masked-hidden {\r
-    visibility: hidden !important;\r
-}
\ No newline at end of file
diff --git a/typo3/sysext/extensionmanager/Resources/Public/Contrib/LoadMask/jquery.loadmask.js b/typo3/sysext/extensionmanager/Resources/Public/Contrib/LoadMask/jquery.loadmask.js
deleted file mode 100644 (file)
index 20acd18..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/**\r
- * Copyright (c) 2009 Sergiy Kovalchuk (serg472@gmail.com)\r
- * \r
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)\r
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\r
- *  \r
- * Following code is based on Element.mask() implementation from ExtJS framework (http://extjs.com/)\r
- *\r
- */\r
-;(function($){\r
-       \r
-       /**\r
-        * Displays loading mask over selected element(s). Accepts both single and multiple selectors.\r
-        *\r
-        * @param label Text message that will be displayed on top of the mask besides a spinner (optional). \r
-        *                              If not provided only mask will be displayed without a label or a spinner.       \r
-        * @param delay Delay in milliseconds before element is masked (optional). If unmask() is called \r
-        *              before the delay times out, no mask is displayed. This can be used to prevent unnecessary \r
-        *              mask display for quick processes.       \r
-        */\r
-       $.fn.mask = function(label, delay){\r
-               $(this).each(function() {\r
-                       if(delay !== undefined && delay > 0) {\r
-                       var element = $(this);\r
-                       element.data("_mask_timeout", setTimeout(function() { $.maskElement(element, label)}, delay));\r
-                       } else {\r
-                               $.maskElement($(this), label);\r
-                       }\r
-               });\r
-       };\r
-       \r
-       /**\r
-        * Removes mask from the element(s). Accepts both single and multiple selectors.\r
-        */\r
-       $.fn.unmask = function(){\r
-               $(this).each(function() {\r
-                       $.unmaskElement($(this));\r
-               });\r
-       };\r
-       \r
-       /**\r
-        * Checks if a single element is masked. Returns false if mask is delayed or not displayed. \r
-        */\r
-       $.fn.isMasked = function(){\r
-               return this.hasClass("masked");\r
-       };\r
-\r
-       $.maskElement = function(element, label){\r
-               //if this element has delayed mask scheduled then remove it and display the new one\r
-               if (element.data("_mask_timeout") !== undefined) {\r
-                       clearTimeout(element.data("_mask_timeout"));\r
-                       element.removeData("_mask_timeout");\r
-               }\r
-\r
-               if(element.isMasked()) {\r
-                       $.unmaskElement(element);\r
-               }\r
-               \r
-               if(element.css("position") == "static") {\r
-                       element.addClass("masked-relative");\r
-               }\r
-               \r
-               element.addClass("masked");\r
-               \r
-               var maskDiv = $('<div class="loadmask"></div>');\r
-               \r
-               //auto height fix for IE\r
-               if(navigator.userAgent.toLowerCase().indexOf("msie") > -1){\r
-                       maskDiv.height(element.height() + parseInt(element.css("padding-top")) + parseInt(element.css("padding-bottom")));\r
-                       maskDiv.width(element.width() + parseInt(element.css("padding-left")) + parseInt(element.css("padding-right")));\r
-               }\r
-               \r
-               element.append(maskDiv);\r
-               \r
-               var maskMsgDiv = $('<div class="x-mask-loading" style="display:none;"></div>');\r
-               maskMsgDiv.append('<div></div>');\r
-               element.append(maskMsgDiv);\r
-\r
-               //calculate center position\r
-               maskMsgDiv.css("top", Math.round(element.height() / 2 - (maskMsgDiv.height() - parseInt(maskMsgDiv.css("padding-top")) - parseInt(maskMsgDiv.css("padding-bottom"))) / 2)+"px");\r
-               maskMsgDiv.css("left", Math.round(element.width() / 2 - (maskMsgDiv.width() - parseInt(maskMsgDiv.css("padding-left")) - parseInt(maskMsgDiv.css("padding-right"))) / 2)+"px");\r
-\r
-               maskMsgDiv.show();\r
-               \r
-       };\r
-       \r
-       $.unmaskElement = function(element){\r
-               //if this element has delayed mask scheduled then remove it\r
-               if (element.data("_mask_timeout") !== undefined) {\r
-                       clearTimeout(element.data("_mask_timeout"));\r
-                       element.removeData("_mask_timeout");\r
-               }\r
-               \r
-               element.find(".x-mask-loading,.loadmask").remove();\r
-               element.removeClass("masked");\r
-               element.removeClass("masked-relative");\r
-               element.find("select").removeClass("masked-hidden");\r
-       };\r
\r
-})(jQuery);
\ No newline at end of file
diff --git a/typo3/sysext/extensionmanager/Resources/Public/Contrib/LoadMask/jquery.loadmask.min.js b/typo3/sysext/extensionmanager/Resources/Public/Contrib/LoadMask/jquery.loadmask.min.js
deleted file mode 100644 (file)
index d77373c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/**\r
- * Copyright (c) 2009 Sergiy Kovalchuk (serg472@gmail.com)\r
- * \r
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)\r
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\r
- *  \r
- * Following code is based on Element.mask() implementation from ExtJS framework (http://extjs.com/)\r
- *\r
- */\r
-(function(a){a.fn.mask=function(c,b){a(this).each(function(){if(b!==undefined&&b>0){var d=a(this);d.data("_mask_timeout",setTimeout(function(){a.maskElement(d,c)},b))}else{a.maskElement(a(this),c)}})};a.fn.unmask=function(){a(this).each(function(){a.unmaskElement(a(this))})};a.fn.isMasked=function(){return this.hasClass("masked")};a.maskElement=function(d,c){if(d.data("_mask_timeout")!==undefined){clearTimeout(d.data("_mask_timeout"));d.removeData("_mask_timeout")}if(d.isMasked()){a.unmaskElement(d)}if(d.css("position")=="static"){d.addClass("masked-relative")}d.addClass("masked");var e=a('<div class="loadmask"></div>');if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){e.height(d.height()+parseInt(d.css("padding-top"))+parseInt(d.css("padding-bottom")));e.width(d.width()+parseInt(d.css("padding-left"))+parseInt(d.css("padding-right")))}if(navigator.userAgent.toLowerCase().indexOf("msie 6")>-1){d.find("select").addClass("masked-hidden")}d.append(e);if(c!==undefined){var b=a('<div class="loadmask-msg" style="display:none;"></div>');b.append("<div>"+c+"</div>");d.append(b);b.css("top",Math.round(d.height()/2-(b.height()-parseInt(b.css("padding-top"))-parseInt(b.css("padding-bottom")))/2)+"px");b.css("left",Math.round(d.width()/2-(b.width()-parseInt(b.css("padding-left"))-parseInt(b.css("padding-right")))/2)+"px");b.show()}};a.unmaskElement=function(b){if(b.data("_mask_timeout")!==undefined){clearTimeout(b.data("_mask_timeout"));b.removeData("_mask_timeout")}b.find(".loadmask-msg,.loadmask").remove();b.removeClass("masked");b.removeClass("masked-relative");b.find("select").removeClass("masked-hidden")}})(jQuery);
\ No newline at end of file
index df5892a..98764d0 100644 (file)
@@ -36,8 +36,7 @@ define([
        var ExtensionManager = {
                identifier: {
                        extensionlist: '#typo3-extension-list',
-                       searchField: '#Tx_Extensionmanager_extensionkey',
-                       extensionManager: '.typo3-extension-manager'
+                       searchField: '#Tx_Extensionmanager_extensionkey'
                }
        };
 
@@ -128,8 +127,6 @@ define([
         * @param {Object} $extension
         */
        ExtensionManager.removeExtensionFromDisk = function($extension) {
-               var $extManager = $(Repository.identifier.extensionManager);
-               $extManager.mask();
                $.ajax({
                        url: $extension.data('href'),
                        beforeSend: function() {
@@ -138,9 +135,6 @@ define([
                        success: function() {
                                location.reload();
                        },
-                       error: function() {
-                               $extManager.unmask();
-                       },
                        complete: function() {
                                NProgress.done();
                        }
@@ -257,9 +251,7 @@ define([
                });
                message += '</form>';
 
-               var $extManager = $(ExtensionManager.identifier.extensionManager);
                NProgress.done();
-               $extManager.unmask();
 
                Modal.confirm(
                        TYPO3.lang['extensionList.updateConfirmation.questionVersionComments'],
@@ -286,7 +278,6 @@ define([
                                                        },
                                                        dataType: 'json',
                                                        beforeSend: function() {
-                                                               $extManager.mask();
                                                                NProgress.start();
                                                        },
                                                        complete: function() {
@@ -375,13 +366,10 @@ define([
 
        /**
         *
-        * @type {{downloadPath: string, identifier: {extensionManager: string}}}
+        * @type {{downloadPath: string}}
         */
        var Repository = {
-               downloadPath: '',
-               identifier: {
-                       extensionManager: '.typo3-extension-manager'
-               }
+               downloadPath: ''
        };
 
        /**
@@ -452,7 +440,6 @@ define([
                                url: url,
                                dataType: 'json',
                                beforeSend: function() {
-                                       $(Repository.identifier.extensionManager).mask();
                                        NProgress.start();
                                },
                                success: Repository.getDependencies
@@ -466,9 +453,7 @@ define([
         * @returns {Boolean}
         */
        Repository.getDependencies = function(data) {
-               var $extManager = $(Repository.identifier.extensionManager);
                NProgress.done();
-               $extManager.unmask();
                if (data.hasDependencies) {
                        Modal.confirm(data.title, data.message, top.TYPO3.Severity.info, [
                                {
@@ -502,12 +487,10 @@ define([
         * @param {String} url
         */
        Repository.getResolveDependenciesAndInstallResult = function(url) {
-               var $extManager = $(Repository.identifier.extensionManager);
                $.ajax({
                        url: url,
                        dataType: 'json',
                        beforeSend: function() {
-                               $extManager.mask();
                                NProgress.start();
                        },
                        success: function (data) {
@@ -551,7 +534,6 @@ define([
                        },
                        complete: function() {
                                NProgress.done();
-                               $extManager.unmask();
                        }
                });
        };
@@ -704,7 +686,6 @@ define([
                        $me.attr('href', '#');
                        $me.click(function() {
                                var $terTableWrapper = $(ExtensionManager.Update.identifier.terTableWrapper);
-                               $terTableWrapper.mask();
                                NProgress.start();
                                $.ajax({
                                        url: $(this).data('href'),
@@ -715,7 +696,6 @@ define([
                                        },
                                        complete: function() {
                                                NProgress.done();
-                                               $terTableWrapper.unmask();
                                        }
                                });
                        });
@@ -761,7 +741,6 @@ define([
                var dataTable = ExtensionManager.manageExtensionListing();
 
                $(document).on('click', '.onClickMaskExtensionManager', function() {
-                       $(ExtensionManager.identifier.extensionManager).mask();
                        NProgress.start();
                }).on('click', 'a[data-action=update-extension]', function(e) {
                        e.preventDefault();
@@ -769,7 +748,6 @@ define([
                                url: $(this).attr('href'),
                                dataType: 'json',
                                beforeSend: function() {
-                                       $(ExtensionManager.identifier.extensionManager).mask();
                                        NProgress.start();
                                },
                                success: ExtensionManager.updateExtension
@@ -786,7 +764,7 @@ define([
                });
 
                $(document).on('click', '.t3-button-action-installdistribution', function() {
-                       $(ExtensionManager.identifier.extensionManager).mask();
+                       NProgress.start();
                });
 
                ExtensionManager.configurationFieldSupport();