mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
AC-559 Changed reset filter to clear the search and remove search keys from the URL displayed in the browser. Removing search keys from URL requires resetting window.location, which does to a page refresh. O'well.
This commit is contained in:
parent
be74d9d932
commit
6c2ea0a7bb
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
||||
.factory('SearchInit', ['Alert', 'Rest', 'Refresh', function(Alert, Rest, Refresh) {
|
||||
.factory('SearchInit', ['Alert', 'Rest', 'Refresh', '$location', function(Alert, Rest, Refresh, $location) {
|
||||
return function(params) {
|
||||
|
||||
var scope = params.scope;
|
||||
@ -132,14 +132,8 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
||||
scope[iterator + 'HideSearchType'] = false;
|
||||
scope[iterator + 'InputHide'] = false;
|
||||
scope[iterator + 'InputDisable'] = false;
|
||||
for (fld in list.fields) {
|
||||
if (list.fields[fld].searchable == undefined || list.fields[fld].searchable == true) {
|
||||
scope[iterator + 'SearchFieldLabel'] = list.fields[fld].label;
|
||||
scope[iterator + 'SearchField'] = fld;
|
||||
break;
|
||||
}
|
||||
}
|
||||
scope.search(iterator);
|
||||
// Force removal of search keys from the URL
|
||||
window.location = '/#' + $location.path();
|
||||
}
|
||||
|
||||
scope.setSearchType = function(iterator, type, label) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user