[TASK] Minimize fading animations in IRRE 72/43872/2
authorBenjamin Mack <benni@typo3.org>
Tue, 6 Oct 2015 21:04:03 +0000 (23:04 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 7 Oct 2015 10:12:21 +0000 (12:12 +0200)
Limit all animations to 200ms for IRRE actions.

Resolves: #55145
Releases: master
Change-Id: I22e6e2b4540ad4ae343915ae2548c8f67538190b
Reviewed-on: http://review.typo3.org/43872
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Josef Glatz <jousch@gmail.com>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.inline.js

index b557fa6..2740884 100644 (file)
@@ -952,7 +952,7 @@ var inline = {
                        // If the record already exists in storage, mark it to be deleted on clicking the save button:
                } else {
                        document.getElementsByName('cmd' + shortName + '[delete]')[0].disabled = false;
-                       TYPO3.jQuery('#' + objectId + '_div').fadeOut();
+                       TYPO3.jQuery('#' + objectId + '_div').fadeOut(200);
                }
 
                var recordCount = this.memorizeRemoveRecord(
@@ -1207,18 +1207,16 @@ var inline = {
        },
 
        hideElementsWithClassName: function (selector, parentElement) {
-               TYPO3.jQuery('#' + parentElement).find(selector).fadeOut();
+               TYPO3.jQuery('#' + parentElement).find(selector).fadeOut(200);
        },
 
        showElementsWithClassName: function (selector, parentElement) {
-               TYPO3.jQuery('#' + parentElement).find(selector).fadeIn();
+               TYPO3.jQuery('#' + parentElement).find(selector).fadeIn(200);
        },
 
+       // sets the opacity to 0.2 and then fades in to opacity 1
        fadeOutFadeIn: function (objectId) {
-               objectId = this.escapeObjectId(objectId);
-               TYPO3.jQuery('#' + objectId).fadeTo(500, 0.5, 'linear', function () {
-                       TYPO3.jQuery('#' + objectId).fadeTo(500, 1, 'linear');
-               });
+               TYPO3.jQuery('#' + this.escapeObjectId(objectId)).css({opacity: 0.2}).fadeTo(200, 1, 'linear');
        },
 
        isNewRecord: function (objectId) {
@@ -1249,7 +1247,7 @@ var inline = {
        },
 
        fadeAndRemove: function (element) {
-               TYPO3.jQuery('#' + this.escapeObjectId(element)).fadeOut(500, function () {
+               TYPO3.jQuery('#' + this.escapeObjectId(element)).fadeOut(200, function () {
                        TYPO3.jQuery(this).remove();
                });
        },