aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/nms-search.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/nms-search.js')
-rw-r--r--web/js/nms-search.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/web/js/nms-search.js b/web/js/nms-search.js
index 41e5397..0726bb4 100644
--- a/web/js/nms-search.js
+++ b/web/js/nms-search.js
@@ -171,18 +171,31 @@ nmsSearch.search = function() {
nmsMap.disableHighlights();
}
if(nmsSearch.matches.length == 0) {
+ document.getElementById("searchbox-submit").classList.remove("btn-success");
+ document.getElementById("searchbox-submit").classList.remove("btn-primary");
+ }
+ else if(nmsSearch.matches.length == 1) {
+ document.getElementById("searchbox-submit").classList.add("btn-success");
document.getElementById("searchbox-submit").classList.remove("btn-primary");
- document.getElementById("searchbox").dataset.match = '';
}
+ else {
+ document.getElementById("searchbox-submit").classList.add("btn-primary");
+ document.getElementById("searchbox-submit").classList.remove("btn-success");
+ }
+
};
nmsSearch.runSearch = function() {
if(nmsSearch.matches.length == 1) {
nmsInfoBox.showWindow("switchInfo",nmsSearch.matches[0]);
}
- else {
+ else if(nmsSearch.matches.length > 1) {
nmsInfoBox.showWindow('searchResults',nmsSearch.matches.length);
}
+ else {
+ document.getElementById("searchbox-submit").classList.remove("btn-primary");
+ document.getElementById("searchbox").dataset.match = '';
+ }
};
nmsSearch._searchKeyListener = function(e) {