From 5a195e96270450c8f595fa0ca33ef030c4254b77 Mon Sep 17 00:00:00 2001
From: Tom Kirkpatrick <tom@systemseed.com>
Date: Fri, 26 Aug 2011 15:22:35 +0200
Subject: [PATCH] My squashed commits

---
 modules/color/color-rtl.css       |   18 -------------
 modules/color/color.css           |   32 -----------------------
 modules/color/color.js            |   50 +------------------------------------
 modules/color/images/hook-rtl.png |  Bin 116 -> 0 bytes
 modules/color/images/hook.png     |  Bin 116 -> 0 bytes
 modules/color/images/lock.png     |  Bin 230 -> 0 bytes
 6 files changed, 1 insertions(+), 99 deletions(-)
 delete mode 100644 modules/color/images/hook-rtl.png
 delete mode 100644 modules/color/images/hook.png
 delete mode 100644 modules/color/images/lock.png

diff --git a/modules/color/color-rtl.css b/modules/color/color-rtl.css
index bfbcd49..d30451c 100644
--- a/modules/color/color-rtl.css
+++ b/modules/color/color-rtl.css
@@ -21,24 +21,6 @@
   margin-right: 0;
   margin-left: 5px;
 }
-#palette .hook {
-  float: right;
-}
-#palette .down,
-#palette .up,
-#palette .both {
-  background: url(images/hook-rtl.png) no-repeat 0 0;
-}
-#palette .up {
-  background-position: 0 -27px;
-}
-#palette .both {
-  background-position: 0 -54px;
-}
-#palette .lock {
-  float: right;
-  right: -10px;
-}
 html.js #preview {
   float: right;
 }
diff --git a/modules/color/color.css b/modules/color/color.css
index e513dad..03dcc58 100644
--- a/modules/color/color.css
+++ b/modules/color/color.css
@@ -31,38 +31,6 @@
   margin-right: 5px; /* LTR */
   cursor: pointer;
 }
-
-#palette .hook {
-  float: left; /* LTR */
-  margin-top: 3px;
-  width: 16px;
-  height: 16px;
-}
-#palette .down,
-#palette .up,
-#palette .both {
-  background: url(images/hook.png) no-repeat 100% 0; /* LTR */
-}
-#palette .up {
-  background-position: 100% -27px; /* LTR */
-}
-#palette .both {
-  background-position: 100% -54px; /* LTR */
-}
-
-#palette .lock {
-  float: left; /* LTR */
-  position: relative;
-  top: -1.4em;
-  left: -10px; /* LTR */
-  width: 20px;
-  height: 25px;
-  background: url(images/lock.png) no-repeat 50% 2px;
-  cursor: pointer;
-}
-#palette .unlocked {
-  background-position: 50% -22px;
-}
 #palette .form-item {
   width: 20em;
 }
diff --git a/modules/color/color.js b/modules/color/color.js
index 43099ad..e2f7bb4 100644
--- a/modules/color/color.js
+++ b/modules/color/color.js
@@ -9,8 +9,6 @@ Drupal.behaviors.color = {
       return;
     }
     var inputs = [];
-    var hooks = [];
-    var locks = [];
     var focused = null;
 
     // Add Farbtastic.
@@ -133,21 +131,8 @@ Drupal.behaviors.color = {
       if ($(input).val() && $(input).val() != color) {
         $(input).val(color);
 
-        // Update locked values.
+        // Update preview.
         if (propagate) {
-          i = input.i;
-          for (j = i + 1; ; ++j) {
-            if (!locks[j - 1] || $(locks[j - 1]).is('.unlocked')) break;
-            matched = shift_color(color, reference[input.key], reference[inputs[j].key]);
-            callback(inputs[j], matched, false);
-          }
-          for (j = i - 1; ; --j) {
-            if (!locks[j] || $(locks[j]).is('.unlocked')) break;
-            matched = shift_color(color, reference[input.key], reference[inputs[j].key]);
-            callback(inputs[j], matched, false);
-          }
-
-          // Update preview.
           preview();
         }
 
@@ -192,39 +177,6 @@ Drupal.behaviors.color = {
       // Link to color picker temporarily to initialize.
       farb.linkTo(function () {}).setColor('#000').linkTo(this);
 
-      // Add lock.
-      var i = inputs.length;
-      if (inputs.length) {
-        var lock = $('<div class="lock"></div>').toggle(
-          function () {
-            $(this).addClass('unlocked');
-            $(hooks[i - 1]).attr('class',
-              locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook up' : 'hook'
-            );
-            $(hooks[i]).attr('class',
-              locks[i] && $(locks[i]).is(':not(.unlocked)') ? 'hook down' : 'hook'
-            );
-          },
-          function () {
-            $(this).removeClass('unlocked');
-            $(hooks[i - 1]).attr('class',
-              locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook both' : 'hook down'
-            );
-            $(hooks[i]).attr('class',
-              locks[i] && $(locks[i]).is(':not(.unlocked)') ? 'hook both' : 'hook up'
-            );
-          }
-        );
-        $(this).after(lock);
-        locks.push(lock);
-      };
-
-      // Add hook.
-      var hook = $('<div class="hook"></div>');
-      $(this).after(hook);
-      hooks.push(hook);
-
-      $(this).parent().find('.lock').click();
       this.i = i;
       inputs.push(this);
     })
diff --git a/modules/color/images/hook-rtl.png b/modules/color/images/hook-rtl.png
deleted file mode 100644
index a26b211e126c298b68a23bef312d8a6dd68f9f29..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 116
zcmeAS@N?(olHy`uVBq!ia0vp^96%h%$P6T}I+T6~QfvV}A+Age3@$D%RWpnNfFg_~
zL4Lsu4$p3+0XZ_BE{-7_Gm{e>82?L31t{n>ta@edSNfw=Fjbr(|C+$R=?YfIf$A7M
MUHx3vIVCg!0H}H$<p2Nx

diff --git a/modules/color/images/hook.png b/modules/color/images/hook.png
deleted file mode 100644
index dc1897370f928a8de70f257cc4786f9e79cf3c57..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 116
zcmeAS@N?(olHy`uVBq!ia0vp^96%h%$P6T}I+T6~QfvV}A+G=b|95e5IsWzME1(Et
zNswPKgTu2MX+VyQr;B3<$IRpe2gd)B5`hYO4Xa++`<4DE6-*UpkoRGhx^8b41ysl2
M>FVdQ&MBb@0PV6N4FCWD

diff --git a/modules/color/images/lock.png b/modules/color/images/lock.png
deleted file mode 100644
index 9e1e00e5efd11ffcf50d13257fd935b92804f840..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 230
zcmeAS@N?(olHy`uVBq!ia0vp@Ky1Xp3?w&5E;IvD>H$6>t}hukBqk>A+`04P$B%~&
z9s2wC@7=q1fsz$v>Hq)k`+uMD*RNk&w{C6I)wBhQGL{7S1v5B2yO9Ru<a)X|hE&`-
zdiEk;g91nELk`}J_x@KpAM3n&>(jdb$7)ZM{Pc1Y-?hq&k#F}a$H0#_yH$+eNWJyV
zS+9Izn}U6*lkVi>_5a-$bGOb6XENKZ<(Ty8=4y_vped4C?pNbf^*A=^p75V{Vb;aJ
c`|GV4`>omJ4i$SG16s`B>FVdQ&MBb@0I4ToN&o-=

-- 
1.7.3.1

