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/focusif.js')
-rw-r--r--plugins/CoreHome/angularjs/common/directives/focusif.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/plugins/CoreHome/angularjs/common/directives/focusif.js b/plugins/CoreHome/angularjs/common/directives/focusif.js
deleted file mode 100644
index 8db12603b6..0000000000
--- a/plugins/CoreHome/angularjs/common/directives/focusif.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*!
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-/**
- * If the given expression evaluates to true the element will be focused
- *
- * Example:
- * <input type="text" piwik-focus-if="view.editName">
- */
-(function () {
- angular.module('piwikApp.directive').directive('piwikFocusIf', piwikFocusIf);
-
- piwikFocusIf.$inject = ['$timeout'];
-
- function piwikFocusIf($timeout) {
- return {
- restrict: 'A',
- link: function(scope, element, attrs) {
- scope.$watch(attrs.piwikFocusIf, function(newValue, oldValue) {
- if (newValue) {
- $timeout(function () {
- element[0].focus();
- }, 5);
- }
- });
- }
- };
- }
-})();