--- a/integration/v2/js/keyword-mosaic.js Thu Jun 27 16:36:57 2013 +0200
+++ b/integration/v2/js/keyword-mosaic.js Thu Jun 27 16:44:21 2013 +0200
@@ -70,15 +70,18 @@
li.append(texta);
kw.li = li;
li.click(function() {
- if (kw.enabled) {
+ var allothersdisabled = keywordslist.reduce(function(mem, k) {
+ return mem && (k === kw || !k.enabled);
+ }, true);
+ if (allothersdisabled) {
+ keywordslist.forEach(function(k) {
+ k.enabled = true;
+ });
+ } else {
keywordslist.forEach(function(k) {
k.enabled = false;
});
kw.enabled = true;
- } else {
- keywordslist.forEach(function(k) {
- k.enabled = true;
- });
}
updateKeywords();
return false;