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": [
"default-mobile.handlebars->container->page_content->column_l->p2->xdevicesBar->1->5",
"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": "線上",
"xloc": [
"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"
]
},
@ -28107,7 +28107,7 @@
"zh-chs": "仅显示在线设备",
"zh-cht": "只顯示在線裝置",
"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-cht": "顯示裝置操作系統名稱",
"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;
<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;
<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">
<option value=0>All</option>
<option value=1>Online</option>
@ -4819,6 +4819,7 @@
function onSearchInputChanged() {
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;
if (x.startsWith("user:".toLowerCase())) { userSearch = x.substring("user:".length); }
else if (x.startsWith("u:".toLowerCase())) { userSearch = x.substring("u:".length); }