4 * Build number ad58c6f4f8f8fd7f04ac457f95d76f09
9 (function(angular, window){
10 angular.module("att.gridster", ["att.gridster.tpls", "att.gridster.utilities","att.gridster.gridster"]);
11 angular.module("att.gridster.tpls", ["template/gridster/gridster.html","template/gridster/gridsterItem.html","template/gridster/gridsterItemBody.html","template/gridster/gridsterItemFooter.html","template/gridster/gridsterItemHeader.html"]);
12 angular.module('att.gridster.utilities', [])
13 .factory('$extendObj', [function() {
14 var _extendDeep = function(dst) {
15 angular.forEach(arguments, function(obj) {
17 angular.forEach(obj, function(value, key) {
18 if (dst[key] && dst[key].constructor && dst[key].constructor === Object) {
19 _extendDeep(dst[key], value);
29 extendDeep: _extendDeep
33 angular.module('att.gridster.gridster', ['attGridsterLib', 'att.gridster.utilities'])
34 .config(['$compileProvider', function($compileProvider) {
35 $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|javascript):/);
37 .constant('attGridsterConfig',
49 .directive('attGridster', ['attGridsterConfig', '$extendObj', function(attGridsterConfig, $extendObj) {
53 attGridsterOptions: '=?'
55 templateUrl: 'template/gridster/gridster.html',
58 controller: [function() {}],
59 link: function(scope) {
60 if (angular.isDefined(scope.attGridsterOptions)) {
61 attGridsterConfig = $extendObj.extendDeep(attGridsterConfig, scope.attGridsterOptions);
63 scope.attGridsterConfig = attGridsterConfig;
67 .directive('attGridsterItem', ['$timeout', function($timeout) {
70 require: ['^attGridster'],
74 templateUrl: 'template/gridster/gridsterItem.html',
77 controller: [function() {}]
80 .directive('attGridsterItemHeader', [function() {
83 require: ['^attGridsterItem'],
88 templateUrl: 'template/gridster/gridsterItemHeader.html',
91 link: function(scope, element) {
92 if (angular.isDefined(scope.subHeaderText) && scope.subHeaderText) {
93 angular.element(element[0].querySelector('span.gridster-item-sub-header-content')).attr("tabindex", "0");
94 angular.element(element[0].querySelector('span.gridster-item-sub-header-content')).attr("aria-label", scope.subHeaderText);
99 .directive('attGridsterItemBody', [function() {
102 require: ['^attGridsterItem'],
104 templateUrl: 'template/gridster/gridsterItemBody.html',
109 .directive('attGridsterItemFooter', ['$location', function($location) {
112 require: ['^attGridsterItem'],
114 attGridsterItemFooterLink: '@?'
116 templateUrl: 'template/gridster/gridsterItemFooter.html',
119 controller: ['$scope', function($scope) {
120 $scope.clickOnFooterLink = function(evt) {
121 evt.preventDefault();
122 evt.stopPropagation();
123 if ($scope.attGridsterItemFooterLink) {
124 $location.url($scope.attGridsterItemFooterLink);
128 link: function(scope, element) {
129 if (angular.isDefined(scope.attGridsterItemFooterLink) && scope.attGridsterItemFooterLink) {
130 element.attr("role", "link");
135 angular.module("template/gridster/gridster.html", []).run(["$templateCache", function($templateCache) {
136 $templateCache.put("template/gridster/gridster.html",
137 "<div gridster='attGridsterConfig'><div ng-transclude></div></div>");
140 angular.module("template/gridster/gridsterItem.html", []).run(["$templateCache", function($templateCache) {
141 $templateCache.put("template/gridster/gridsterItem.html",
142 "<div gridster-item='attGridsterItem' class=\"gridster-item-container\" ng-transclude></div>");
145 angular.module("template/gridster/gridsterItemBody.html", []).run(["$templateCache", function($templateCache) {
146 $templateCache.put("template/gridster/gridsterItemBody.html",
147 "<div class=\"gridster-item-body\" ng-transclude></div>");
150 angular.module("template/gridster/gridsterItemFooter.html", []).run(["$templateCache", function($templateCache) {
151 $templateCache.put("template/gridster/gridsterItemFooter.html",
152 "<div class=\"gridster-item-footer\" ng-click=\"clickOnFooterLink($event)\" tabindex=\"0\" ng-keydown=\"(($event.keyCode && $event.keyCode === 13) || ($event.which && $event.which === 13)) && clickOnFooterLink($event)\" >\n" +
153 " <span class=\"gridster-item-footer-content\" ng-transclude></span>\n" +
157 angular.module("template/gridster/gridsterItemHeader.html", []).run(["$templateCache", function($templateCache) {
158 $templateCache.put("template/gridster/gridsterItemHeader.html",
159 "<div class=\"gridster-item-header\">\n" +
160 " <img gridster-item-drag src=\"static/fusion/images/att_angular_gridster/grips.png\" alt=\"||\" aria-label=\"Tap/Click to move\" class=\"gridster-item-handle\" />\n" +
161 " <span class=\"gridster-item-header-content\" tabindex=\"0\" role=\"presentation\" aria-label=\"{{headerText}}\">{{headerText}}</span>\n" +
162 " <span class=\"gridster-item-sub-header-content\" role=\"presentation\">{{subHeaderText}}</span>\n" +
163 " <div class=\"gridster-item-header-buttons-container\" ng-transclude></div>\n" +