mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 19:20:05 -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:
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
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) {
|
return function(params) {
|
||||||
|
|
||||||
var scope = params.scope;
|
var scope = params.scope;
|
||||||
@@ -132,14 +132,8 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
|||||||
scope[iterator + 'HideSearchType'] = false;
|
scope[iterator + 'HideSearchType'] = false;
|
||||||
scope[iterator + 'InputHide'] = false;
|
scope[iterator + 'InputHide'] = false;
|
||||||
scope[iterator + 'InputDisable'] = false;
|
scope[iterator + 'InputDisable'] = false;
|
||||||
for (fld in list.fields) {
|
// Force removal of search keys from the URL
|
||||||
if (list.fields[fld].searchable == undefined || list.fields[fld].searchable == true) {
|
window.location = '/#' + $location.path();
|
||||||
scope[iterator + 'SearchFieldLabel'] = list.fields[fld].label;
|
|
||||||
scope[iterator + 'SearchField'] = fld;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
scope.search(iterator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
scope.setSearchType = function(iterator, type, label) {
|
scope.setSearchType = function(iterator, type, label) {
|
||||||
|
|||||||
Reference in New Issue
Block a user