1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added search clear button.

This commit is contained in:
Ylian Saint-Hilaire 2021-02-18 14:27:41 -08:00
parent 9a4a9791ee
commit 44eada0888
4 changed files with 6 additions and 5 deletions

BIN
public/images/x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

BIN
public/images/x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -27860,7 +27860,7 @@
"xloc": [ "xloc": [
"default-mobile.handlebars->container->page_content->column_l->p2->xdevicesBar->1->5", "default-mobile.handlebars->container->page_content->column_l->p2->xdevicesBar->1->5",
"default.handlebars->31->578", "default.handlebars->31->578",
"default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->9->1" "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->11->1"
] ]
}, },
{ {
@ -28044,7 +28044,7 @@
"zh-cht": "線上", "zh-cht": "線上",
"xloc": [ "xloc": [
"default-mobile.handlebars->container->page_content->column_l->p2->xdevicesBar->1->7", "default-mobile.handlebars->container->page_content->column_l->p2->xdevicesBar->1->7",
"default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->11->1", "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->13->1",
"default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->DevFilterSelect->3" "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->DevFilterSelect->3"
] ]
}, },
@ -28107,7 +28107,7 @@
"zh-chs": "仅显示在线设备", "zh-chs": "仅显示在线设备",
"zh-cht": "只顯示在線裝置", "zh-cht": "只顯示在線裝置",
"xloc": [ "xloc": [
"default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->11" "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->13"
] ]
}, },
{ {
@ -35798,7 +35798,7 @@
"zh-chs": "显示设备操作系统名称", "zh-chs": "显示设备操作系统名称",
"zh-cht": "顯示裝置操作系統名稱", "zh-cht": "顯示裝置操作系統名稱",
"xloc": [ "xloc": [
"default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->9" "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->11"
] ]
}, },
{ {

View file

@ -248,7 +248,7 @@
&nbsp;&nbsp;<input type="button" id="SelectAllButton" onclick="selectallButtonFunction();" value="Select All" />&nbsp; &nbsp;&nbsp;<input type="button" id="SelectAllButton" onclick="selectallButtonFunction();" value="Select All" />&nbsp;
<input type=button id=GroupActionButton disabled="disabled" value="Group Action" onclick=groupActionFunction() />&nbsp; <input type=button id=GroupActionButton disabled="disabled" value="Group Action" onclick=groupActionFunction() />&nbsp;
<input id=SearchInput type=search autocomplete=off placeholder=Filter onchange=onDeviceSearchChanged(event) onkeyup=onDeviceSearchChanged(event) onfocus=onSearchFocus(1) onblur=onSearchFocus(0) />&nbsp; <input id=SearchInput type=search autocomplete=off placeholder=Filter onchange=onDeviceSearchChanged(event) onkeyup=onDeviceSearchChanged(event) onfocus=onSearchFocus(1) onblur=onSearchFocus(0) />&nbsp;
<span id=SearchInputClearButton 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>
<select id=DevFilterSelect onchange=onOnlineCheckBox(event) title="Device Filter"> <select id=DevFilterSelect onchange=onOnlineCheckBox(event) title="Device Filter">
<option value=0>All</option> <option value=0>All</option>
<option value=1>Online</option> <option value=1>Online</option>
@ -4819,6 +4819,7 @@
function onSearchInputChanged() { function onSearchInputChanged() {
var x = Q('SearchInput').value.toLowerCase().trim(); putstore('_search', Q('SearchInput').value); var x = Q('SearchInput').value.toLowerCase().trim(); putstore('_search', Q('SearchInput').value);
QV('SearchInputClearButton', x != '');
var userSearch = null, ipSearch = null, groupSearch = null, tagSearch = null, agentTagSearch = null, wscSearch = null; var userSearch = null, ipSearch = null, groupSearch = null, tagSearch = null, agentTagSearch = null, wscSearch = null;
if (x.startsWith("user:".toLowerCase())) { userSearch = x.substring("user:".length); } if (x.startsWith("user:".toLowerCase())) { userSearch = x.substring("user:".length); }
else if (x.startsWith("u:".toLowerCase())) { userSearch = x.substring("u:".length); } else if (x.startsWith("u:".toLowerCase())) { userSearch = x.substring("u:".length); }