diff options
author | Alex Legler <alex@a3li.li> | 2014-09-20 22:10:53 +0200 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2014-09-20 22:10:53 +0200 |
commit | c270c45d2e3767a72cff9ca053b5b08a097ecfec (patch) | |
tree | ffbca5a2534e8e6c686e2fdd1e12b71e6c38545f /public/assets/js/infra-status.js | |
parent | Be more resilient to bad notices (diff) | |
download | infra-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
Diffstat (limited to 'public/assets/js/infra-status.js')
-rw-r--r-- | public/assets/js/infra-status.js | 4 |
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'); |