Skip to content

Commit 7c60380

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 0a995aa + 2574bbc commit 7c60380

5 files changed

+26
-23
lines changed

dist/angular-advanced-searchbox-tpls.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*!
1+
/*!
22
* angular-advanced-searchbox
33
* https://github.com/dnauck/angular-advanced-searchbox
44
* Copyright (c) 2015 Nauck IT KG http://www.nauck-it.de/
@@ -62,12 +62,13 @@ angular.module('angular-advanced-searchbox', [])
6262
});
6363

6464
// delete not existing search parameters from internal state array
65-
angular.forEach($scope.searchParams, function (value, key){
65+
for (var i = $scope.searchParams.length - 1; i >= 0; i--) {
66+
var value = $scope.searchParams[i];
6667
if (!$scope.model.hasOwnProperty(value.key)){
6768
var index = $scope.searchParams.map(function(e) { return e.key; }).indexOf(value.key);
6869
$scope.removeSearchParam(index);
6970
}
70-
});
71+
}
7172
}, true);
7273

7374
$scope.searchParamValueChanged = function (param) {
@@ -127,7 +128,7 @@ angular.module('angular-advanced-searchbox', [])
127128
if (!$scope.isUnsedParameter(searchParam))
128129
return;
129130

130-
var newIndex =
131+
var newIndex =
131132
$scope.searchParams.push(
132133
{
133134
key: searchParam.key,
@@ -163,7 +164,7 @@ angular.module('angular-advanced-searchbox', [])
163164
$scope.removeAll = function() {
164165
$scope.searchParams.length = 0;
165166
$scope.searchQuery = '';
166-
167+
167168
$scope.model = {};
168169

169170
$scope.$emit('advanced-searchbox:removedAllSearchParam');
@@ -292,7 +293,7 @@ angular.module('angular-advanced-searchbox', [])
292293
selection.moveStart('character', -input.value.length);
293294
return selection.text.length - selectionLength;
294295
}
295-
} catch(err) {
296+
} catch(err) {
296297
// selectionStart is not supported by HTML 5 input type, so jut ignore it
297298
}
298299

@@ -333,7 +334,7 @@ angular.module('angular-advanced-searchbox', [])
333334
},
334335
link: function($scope, $element, $attrs) {
335336
var supportedInputTypes = ['text', 'search', 'tel', 'url', 'email', 'password', 'number'];
336-
337+
337338

338339
var container = angular.element('<div style="position: fixed; top: -9999px; left: 0px;"></div>');
339340
var shadow = angular.element('<span style="white-space:pre;"></span>');

dist/angular-advanced-searchbox-tpls.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)