diff options
Diffstat (limited to 'plugins/CoreHome/angularjs/activity-indicator/activityindicator.directive.js')
-rw-r--r-- | plugins/CoreHome/angularjs/activity-indicator/activityindicator.directive.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/CoreHome/angularjs/activity-indicator/activityindicator.directive.js b/plugins/CoreHome/angularjs/activity-indicator/activityindicator.directive.js new file mode 100644 index 0000000000..4417cea7ac --- /dev/null +++ b/plugins/CoreHome/angularjs/activity-indicator/activityindicator.directive.js @@ -0,0 +1,31 @@ +/*! + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +/** + * Shows a general loading message while [loading] is set to true. + * + * @param {Boolean} loading If true, the activity indicator is shown, otherwise the indicator is hidden. + * + * Example: + * <div piwik-activity-indicator loading="true|false"></div> + */ +(function () { + angular.module('piwikApp').directive('piwikActivityIndicator', piwikActivityIndicator); + + piwikActivityIndicator.$inject = ['piwik']; + + function piwikActivityIndicator(piwik){ + return { + restrict: 'A', + transclude: true, + scope: { + loading: '=' + }, + templateUrl: 'plugins/CoreHome/angularjs/activity-indicator/activityindicator.html?cb=' + piwik.cacheBuster + }; + } +})();
\ No newline at end of file |