From 783096cef942a275f23f7c7cb63bbca175cff0ba Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Mon, 14 Mar 2016 18:17:36 +0000 Subject: NMS: Tweak search with blinking pink! I'm proud of this silliness. --- web/nms.gathering.org/js/nms-info-box.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'web/nms.gathering.org/js') diff --git a/web/nms.gathering.org/js/nms-info-box.js b/web/nms.gathering.org/js/nms-info-box.js index 2ef4c3b..58beea5 100644 --- a/web/nms.gathering.org/js/nms-info-box.js +++ b/web/nms.gathering.org/js/nms-info-box.js @@ -150,14 +150,24 @@ nmsInfoBox._search = function() { id = el.value; } if (id && nmsData.switches.switches[id] != undefined) { - nmsMap.setSwitchColor(id, "pink"); + nmsMap.setSwitchColor(id, "red"); + window.setTimeout(function(){ + nmsMap.setSwitchColor(id, "pink"); + window.setTimeout(function(){ + nmsMap.setSwitchColor(id, "red"); + window.setTimeout(function(){ + nmsMap.setSwitchColor(id, "pink"); + window.setTimeout(function(){ + nmsMap.setSwitchColor(id, "red"); + window.setTimeout(function(){ + nmsMap.setSwitchColor(id, "pink"); + },300); + },300); + },300); + },300); + },300); el.parentElement.classList.remove("has-error"); el.parentElement.classList.add("has-success"); - setTimeout(function(){ - nmsInfoBox.show(id); - var el = document.getElementById("searchbox"); - el.parentElement.classList.remove("has-success"); - },1000); } else { el.parentElement.classList.add("has-error"); } -- cgit v1.2.3