Clicking the style name now toggles it as well

This commit is contained in:
Jaroslav Petrnoušek 2014-10-03 22:32:49 +02:00
parent 01e705aef0
commit 9574adeaeb

View File

@ -35,10 +35,10 @@ function createStyleElement(style) {
editLink.addEventListener("click", openLink, false); editLink.addEventListener("click", openLink, false);
if (checkbox.checked == true) { if (checkbox.checked == true) {
(checkbox).addEventListener("click", function() { enable(event, false); }, false); (checkbox, styleName).addEventListener("click", function() { enable(event, false); }, false);
} }
else { else {
(checkbox).addEventListener("click", function() { enable(event, true); }, false); (checkbox, styleName).addEventListener("click", function() { enable(event, true); }, false);
} }
e.querySelector(".delete").addEventListener("click", function() { doDelete(event, false); }, false); e.querySelector(".delete").addEventListener("click", function() { doDelete(event, false); }, false);
return e; return e;
@ -99,4 +99,3 @@ tE("find-styles-link", "findStylesForSite");
document.getElementById("find-styles-link").addEventListener("click", openLink, false); document.getElementById("find-styles-link").addEventListener("click", openLink, false);
document.getElementById("open-manage-link").addEventListener("click", openLink, false); document.getElementById("open-manage-link").addEventListener("click", openLink, false);