Added background color to device filter box when active.

Ylian Saint-Hilaire committed Mar 9, 2021 at 13:04 UTC 70c9252f60962b782b6b89f1e4b2b07f83a05a33
3 files changed +6 -1
db.js
+1
@@ -1555,6 +1555,7 @@ module.exports.CreateDB = function (parent, func) {
1555 // Check that we have access to MongoDump
1556 var backupPath = parent.backuppath;
1557 if (parent.config.settings.autobackup && parent.config.settings.autobackup.backuppath) { backupPath = parent.config.settings.autobackup.backuppath; }
1558 + try { parent.fs.mkdirSync(backupPath); } catch (e) { }
1559 var mongoDumpPath = 'mongodump';
1560 if (parent.config.settings.autobackup && parent.config.settings.autobackup.mongodumppath) { mongoDumpPath = parent.config.settings.autobackup.mongodumppath; }
1561 const child_process = require('child_process');
views/default-mobile.handlebars
+2 -1
@@ -662,7 +662,7 @@
662 <div id=xdevicesBar style="position:absolute;overflow-y:auto;height:34px;left:0;right:0;bottom:0px;background-color:#aaa;color:black">
663 <div style="margin:4px">
664 <span style="width:20px;display:inline-block;text-align:center;cursor:pointer;font-size:16px" onclick=clearSearchInput()><b>X</b></span>
665 - <input id=SearchInput autocomplete=off type=search placeholder=Filter onchange=onDeviceSearchChanged(event) onkeyup=onDeviceSearchChanged(event) style="padding:2px;margin:0;height:20px" />&nbsp;
665 + <input id=SearchInput autocomplete=off type=search placeholder=Filter onchange=onDeviceSearchChanged(event) onkeyup=onDeviceSearchChanged(event) style="padding:2px;margin:0;height:20px;background-color:#FFF" />&nbsp;
666 <label class=noselect><input type=checkbox id=RealNameCheckBox onclick=onRealNameCheckBox() />OS Name</label>
667 <label class=noselect><input type=checkbox id=OnlineCheckBox onclick=onOnlineCheckBox(event) />Online</label>
668 </div>
@@ -2544,6 +2544,7 @@
2544
2545 function onSearchInputChanged() {
2546 var x = Q('SearchInput').value.toLowerCase().trim(); putstore('_search', Q('SearchInput').value);
2547 + QS('SearchInput')['background-color'] = (x == '') ? '#FFFFFF' : '#FDFFBE';
2548 var userSearch = null, ipSearch = null, groupSearch = null, tagSearch = null, agentTagSearch = null, wscSearch = null, osSearch = null, amtSearch = null;
2549 if (x.startsWith("user:".toLowerCase())) { userSearch = x.substring("user:".length); }
2550 else if (x.startsWith("u:".toLowerCase())) { userSearch = x.substring("u:".length); }
views/default.handlebars
+3
@@ -270,6 +270,7 @@
270 <label><input type="checkbox" id="autoConnectDesktopCheckbox" onclick="autoConnectDesktops(event)" title="Automatic connect" />Auto&nbsp;</label>
271 <input type="button" onclick="showMultiDesktopSettings()" value="Settings" />&nbsp;
272 <input id=KvmSearchInput type=search placeholder=Filter onchange=onDeviceSearchChanged(event) onkeyup=onDeviceSearchChanged(event) autocomplete=off onfocus=onSearchFocus(1) onblur=onSearchFocus(0) />&nbsp;
273 + <span id=KvmSearchInputClearButton style="display:none;position:relative"><img src="images/x16.png" type="button" onclick="clearDeviceSearch()" style="position:absolute;cursor:pointer;left:-18px;top:-8px" srcset="images/x32.png 2x" /></span>
274 </td>
275 <td id=devMapToolbar class=style14 style="display:none">
276 &nbsp;&nbsp;<input type=search id=mapSearchLocation placeholder="Search Location" onfocus=onMapSearchFocus(1) onblur=onMapSearchFocus(0) />
@@ -4855,7 +4856,9 @@
4856
4857 function onSearchInputChanged() {
4858 var x = Q('SearchInput').value.toLowerCase().trim(); putstore('_search', Q('SearchInput').value);
4859 + QS('SearchInput')['background-color'] = QS('KvmSearchInput')['background-color'] = (x == '')?null:'#FDFFBE';
4860 QV('SearchInputClearButton', (x != '') && (navigator.userAgent.indexOf('Firefox') >= 0));
4861 + QV('KvmSearchInputClearButton', (x != '') && (navigator.userAgent.indexOf('Firefox') >= 0));
4862 var userSearch = null, ipSearch = null, groupSearch = null, tagSearch = null, agentTagSearch = null, wscSearch = null, osSearch = null, amtSearch = null;
4863 if (x.startsWith("user:".toLowerCase())) { userSearch = x.substring("user:".length); }
4864 else if (x.startsWith("u:".toLowerCase())) { userSearch = x.substring("u:".length); }