Skip to content

Commit 699919c

Browse files
committed
miqHideSearchClearButton is unused as of 450960c
1 parent 490e863 commit 699919c

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

app/javascript/oldjs/.eslintrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"globals": {
3-
"GitImport": true, // local git_import.js
4-
"miqHideSearchClearButton": true // local miq_application.js
3+
"GitImport": true // local git_import.js
54
},
65
"rules": {
76
"key-spacing": ["error", {

app/javascript/oldjs/miq_application.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,29 +1309,6 @@ window.miqInitMainContent = function() {
13091309
$('#main-content').css('height', `calc(100% - ${height}px)`);
13101310
};
13111311

1312-
window.miqHideSearchClearButton = function(explorer) {
1313-
// Hide the clear button if the search input is empty
1314-
$('.search-pf .has-clear .clear').each(function() {
1315-
if (!$(this).prev('.form-control').val()) {
1316-
$(this).hide();
1317-
}
1318-
});
1319-
// Show the clear button upon entering text in the search input
1320-
$('.search-pf .has-clear .form-control').keyup(function() {
1321-
const t = $(this);
1322-
t.nextAll('button.clear').toggle(Boolean(t.val()));
1323-
});
1324-
// Upon clicking the clear button, empty the entered text and hide the clear button
1325-
$('.search-pf .has-clear .clear').click(function() {
1326-
$(this).prev('.form-control').val('').focus();
1327-
$(this).hide();
1328-
// Clear Search text values as well
1329-
const url = `/${ManageIQ.controller}/search_clear` + `?in_explorer=${explorer}`;
1330-
ManageIQ.gridChecks = [];
1331-
miqJqueryRequest(url);
1332-
});
1333-
};
1334-
13351312
window.toggle_expansion = function(link) {
13361313
link = $(link);
13371314
link.find('i').toggleClass('fa-angle-right fa-angle-down');

0 commit comments

Comments
 (0)