summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2014-09-20 22:10:53 +0200
committerAlex Legler <alex@a3li.li>2014-09-20 22:10:53 +0200
commitc270c45d2e3767a72cff9ca053b5b08a097ecfec (patch)
treeffbca5a2534e8e6c686e2fdd1e12b71e6c38545f
parentBe more resilient to bad notices (diff)
downloadinfra-status-c270c45d2e3767a72cff9ca053b5b08a097ecfec.tar.gz
infra-status-c270c45d2e3767a72cff9ca053b5b08a097ecfec.tar.bz2
infra-status-c270c45d2e3767a72cff9ca053b5b08a097ecfec.zip
Rework notice selection JS
* Use =~ instead of =* to capture words as intended * Quote strings to allow fancy characters
-rw-r--r--public/assets/js/infra-status.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/assets/js/infra-status.js b/public/assets/js/infra-status.js
index f13ffc5..5b31df8 100644
--- a/public/assets/js/infra-status.js
+++ b/public/assets/js/infra-status.js
@@ -38,10 +38,10 @@ jQuery(function($) {
return false;
} else {
- var affected_notices = $("div.notice[data-services*=" + $(this).data('service') +"]");
+ var affected_notices = $("div.notice[data-services~='" + $(this).data('service') +"']");
if (affected_notices.length > 0) {
- $("div.notice:not([data-services*=" + $(this).data('service') +"])").hide(400);
+ $("div.notice:not([data-services~='" + $(this).data('service') +"'])").hide(400);
affected_notices.show(400);
$('#notices-for').html('for ' + $(this).data('service-name'));
$('a.notice-link.active').removeClass('active');