[Pkg-javascript-commits] [jquery-minicolors] 04/13: prevent fadeOut for each ever opend panels
David Prévot
taffit at moszumanska.debian.org
Wed Mar 19 18:59:10 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository jquery-minicolors.
commit 43ec0c51f43604dd4da207255113d53fb39ae376
Author: mboehlke <mboehlke at t-online.de>
Date: Fri Dec 20 17:23:42 2013 +0100
prevent fadeOut for each ever opend panels
We have a side with many (40+) instances of this great MiniColors
plugin. After a while, when opening different instances it becomes very
slow.
---
jquery.minicolors.js | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/jquery.minicolors.js b/jquery.minicolors.js
index 474a84c..c3aa829 100644
--- a/jquery.minicolors.js
+++ b/jquery.minicolors.js
@@ -227,19 +227,14 @@ if(jQuery) (function($) {
// Hides all dropdown panels
function hide() {
- $('.minicolors-input').each( function() {
-
- var input = $(this),
- settings = input.data('minicolors-settings'),
- minicolors = input.parent();
-
- // Don't hide inline controls
- if( settings.inline ) return;
-
+ $('.minicolors-focus').each( function() {
+
+ var minicolors = $(this),
+ input = minicolors.find('.minicolors-input'),
+ settings = input.data('minicolors-settings');
+
minicolors.find('.minicolors-panel').fadeOut(settings.hideSpeed, function() {
- if(minicolors.hasClass('minicolors-focus')) {
- if( settings.hide ) settings.hide.call(input.get(0));
- }
+ if( settings.hide ) settings.hide.call(input.get(0));
minicolors.removeClass('minicolors-focus');
});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/jquery-minicolors.git
More information about the Pkg-javascript-commits
mailing list