diff --git a/modules/color/color-rtl.css b/modules/color/color-rtl.css index bfbcd49..8893f6a 100644 --- a/modules/color/color-rtl.css +++ b/modules/color/color-rtl.css @@ -35,10 +35,6 @@ #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..ae31b95 100644 --- a/modules/color/color.css +++ b/modules/color/color.css @@ -49,20 +49,6 @@ #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..037a00b 100644 --- a/modules/color/color.js +++ b/modules/color/color.js @@ -10,7 +10,6 @@ Drupal.behaviors.color = { } var inputs = []; var hooks = []; - var locks = []; var focused = null; // Add Farbtastic. @@ -133,21 +132,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 +178,11 @@ 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 = $('
').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 = $(''); $(this).after(hook); hooks.push(hook); - $(this).parent().find('.lock').click(); this.i = i; inputs.push(this); }) diff --git a/modules/color/images/lock.png b/modules/color/images/lock.png deleted file mode 100644 index 9e1e00e..0000000 Binary files a/modules/color/images/lock.png and /dev/null differ