summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2015-04-14 16:14:22 (GMT)
committerAlex Pott2015-04-14 16:14:22 (GMT)
commit4b0b2c0524736c0e98f015bbaabf97f0c0dc9e73 (patch)
treeb6a103f3ffc888e769c960a49c0e170f419661b9
parent168a859175f5af00f684d8665f635ac2067ceecc (diff)
Issue #2409653 by MathieuSpil: The color module lock/unlock link is not accessible
-rw-r--r--core/modules/color/color.js7
-rw-r--r--core/modules/color/css/color.admin.css1
2 files changed, 5 insertions, 3 deletions
diff --git a/core/modules/color/color.js b/core/modules/color/color.js
index f9eebf2..a44f49f 100644
--- a/core/modules/color/color.js
+++ b/core/modules/color/color.js
@@ -210,9 +210,10 @@
i = inputs.length;
if (inputs.length) {
var toggleClick = true;
- var lock = $('<div class="lock"></div>').on('click', function () {
+ var lock = $('<button class="lock link">' + Drupal.t('Unlock') + '</button>').on('click', function (e) {
+ e.preventDefault();
if (toggleClick) {
- $(this).addClass('unlocked');
+ $(this).addClass('unlocked').html(Drupal.t('Lock'));
$(hooks[i - 1]).attr('class',
locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook up' : 'hook'
);
@@ -221,7 +222,7 @@
);
}
else {
- $(this).removeClass('unlocked');
+ $(this).removeClass('unlocked').html(Drupal.t('Unlock'));
$(hooks[i - 1]).attr('class',
locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook both' : 'hook down'
);
diff --git a/core/modules/color/css/color.admin.css b/core/modules/color/css/color.admin.css
index 5da8c35..e904c85 100644
--- a/core/modules/color/css/color.admin.css
+++ b/core/modules/color/css/color.admin.css
@@ -63,6 +63,7 @@
height: 19px;
background: url(../images/lock.png) no-repeat 50% 0;
cursor: pointer;
+ text-indent: -9999px;
}
[dir="rtl"] #palette .lock {
float: right;