[Pkg-javascript-commits] [jquery-minicolors] 16/28: Consolidated internal refresh method into updateFromInput; removed firstRun argument since it's no longer needed

David Prévot taffit at alioth.debian.org
Sun Sep 8 14:57:29 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository jquery-minicolors.

commit c53b7a0c97a8208952550850cd5ada794be065d3
Author: Cory LaViska <cory at abeautifulsite.net>
Date:   Tue Aug 20 12:01:02 2013 -0400

    Consolidated internal refresh method into updateFromInput; removed firstRun argument since it's no longer needed
---
 jquery.minicolors.js |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/jquery.minicolors.js b/jquery.minicolors.js
index fe0913b..e11f83b 100644
--- a/jquery.minicolors.js
+++ b/jquery.minicolors.js
@@ -55,7 +55,7 @@ if(jQuery) (function($) {
 					} else {
 						// Setter
 						$(this).each( function() {
-							refresh($(this).attr('data-opacity', data));
+							updateFromInput($(this).attr('data-opacity', data));
 						});
 						return $(this);
 					}
@@ -96,7 +96,7 @@ if(jQuery) (function($) {
 					} else {
 						// Setter
 						$(this).each( function() {
-							refresh($(this).val(data));
+							updateFromInput($(this).val(data));
 						});
 						return $(this);
 					}
@@ -176,7 +176,7 @@ if(jQuery) (function($) {
 		// Inline controls
 		if( settings.inline ) input.parent().addClass('minicolors-inline');
 		
-		updateFromInput(input, false, true);
+		updateFromInput(input, false);
 		
 		// Populate lastChange to prevent change event from firing initially
 		input.data('minicolors-lastChange', {
@@ -203,11 +203,6 @@ if(jQuery) (function($) {
 		
 	}
 	
-	// Refresh the specified control
-	function refresh(input) {
-		updateFromInput(input);
-	}
-	
 	// Shows the specified dropdown panel
 	function show(input) {
 		
@@ -469,7 +464,7 @@ if(jQuery) (function($) {
 	}
 	
 	// Sets the color picker values from the input
-	function updateFromInput(input, preserveInputValue, firstRun) {
+	function updateFromInput(input, preserveInputValue) {
 		
 		var hex,
 			hsb,
@@ -596,9 +591,6 @@ if(jQuery) (function($) {
 				
 		}
 		
-		// Handle change event
-		if( !firstRun ) doChange(input, hex, opacity);
-		
 	}
 	
 	// Runs the change and changeDelay callbacks

-- 
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