Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CoreHome/angularjs/common/directives')
-rw-r--r--plugins/CoreHome/angularjs/common/directives/autocomplete-matched.js2
-rw-r--r--plugins/CoreHome/angularjs/common/directives/field-condition.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/CoreHome/angularjs/common/directives/autocomplete-matched.js b/plugins/CoreHome/angularjs/common/directives/autocomplete-matched.js
index 5bf1a9a6bb..995950ef2d 100644
--- a/plugins/CoreHome/angularjs/common/directives/autocomplete-matched.js
+++ b/plugins/CoreHome/angularjs/common/directives/autocomplete-matched.js
@@ -46,7 +46,7 @@
var startTerm = content.toLowerCase().indexOf(searchTerm.toLowerCase());
if (-1 !== startTerm) {
- var word = content.substr(startTerm, searchTerm.length);
+ var word = content.slice(startTerm, startTerm + searchTerm.length);
var escapedword = $sanitize(piwik.helper.htmlEntities(word));
content = content.replace(word, '<span class="autocompleteMatched">' + escapedword + '</span>');
element.html(content);
diff --git a/plugins/CoreHome/angularjs/common/directives/field-condition.js b/plugins/CoreHome/angularjs/common/directives/field-condition.js
index 3ff3116cf0..5c4c33ff8e 100644
--- a/plugins/CoreHome/angularjs/common/directives/field-condition.js
+++ b/plugins/CoreHome/angularjs/common/directives/field-condition.js
@@ -38,7 +38,7 @@
} else if (element.prop('tagName').toLowerCase() === 'select') {
var name = element.val();
if (name.indexOf('string:') === 0) {
- return name.substr('string:'.length);
+ return name.slice('string:'.length);
}
return name;