diff options
Diffstat (limited to 'plugins/CoreHome/angularjs/progressbar/progressbar.directive.js')
-rw-r--r-- | plugins/CoreHome/angularjs/progressbar/progressbar.directive.js | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/plugins/CoreHome/angularjs/progressbar/progressbar.directive.js b/plugins/CoreHome/angularjs/progressbar/progressbar.directive.js deleted file mode 100644 index 4c5cdaa488..0000000000 --- a/plugins/CoreHome/angularjs/progressbar/progressbar.directive.js +++ /dev/null @@ -1,54 +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 - */ - -/** - * Usage: - * <div piwik-progressbar> - */ -(function () { - angular.module('piwikApp').directive('piwikProgressbar', piwikProgressbar); - - piwikProgressbar.$inject = ['piwik']; - - function piwikProgressbar(piwik){ - var defaults = { - label: '', - progress: 0 - }; - - return { - restrict: 'A', - scope: { - progress: '=', - label: '=' - }, - templateUrl: 'plugins/CoreHome/angularjs/progressbar/progressbar.directive.html?cb=' + piwik.cacheBuster, - compile: function (element, attrs) { - - for (var index in defaults) { - if (defaults.hasOwnProperty(index) && attrs[index] === undefined) { - attrs[index] = defaults[index]; - } - } - - return function (scope, element, attrs) { - - scope.$watch('progress', function (val, oldVal) { - if (val !== oldVal) { - if (val > 100) { - scope.progress = 100; - } else if (val < 0) { - scope.progress = 0; - } - } - }); - - }; - } - }; - } -})();
\ No newline at end of file |