From c270c45d2e3767a72cff9ca053b5b08a097ecfec Mon Sep 17 00:00:00 2001 From: Alex Legler Date: Sat, 20 Sep 2014 22:10:53 +0200 Subject: Rework notice selection JS * Use =~ instead of =* to capture words as intended * Quote strings to allow fancy characters --- public/assets/js/infra-status.js | 4 ++-- 1 file 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'); -- cgit v1.2.3-65-gdbad