nexus site path corrected
[portal.git] / ecomp-portal-FE / client / bower_components_external / angular-att-gridster / ui-gridster-tpls-0.0.1.js
1 angular.module("att.gridster", ["att.gridster.tpls", "att.gridster.utilities","att.gridster.gridster"]);
2 angular.module("att.gridster.tpls", ["template/gridster/gridster.html"]);
3 angular.module('att.gridster.utilities', [])
4         .factory('$extendObj', [function () {
5                 var _extendDeep = function (dst) {
6                     angular.forEach(arguments, function (obj) {
7                         if (obj !== dst) {
8                             angular.forEach(obj, function (value, key) {
9                                 if (dst[key] && dst[key].constructor && dst[key].constructor === Object) {
10                                     _extendDeep(dst[key], value);
11                                 } else {
12                                     dst[key] = value;
13                                 }
14                             });
15                         }
16                     });
17                     return dst;
18                 };
19                 return {
20                     extendDeep: _extendDeep
21                     
22                 };
23             }]);
24
25 angular.module('att.gridster.gridster', ['attGridsterLib', 'att.gridster.utilities'])
26     .constant('attGridsterConfig',
27             {
28                 columns: 3,
29                 maxRows: 3,
30                 margins: [10, 10],
31                 outerMargin: true,
32                 pushing: true,
33                 floating: false,
34                 swapping: true,
35                 draggable: {
36                         enabled: true
37                 }
38             })
39     .directive('attGridster',['attGridsterConfig', '$extendObj', function (attGridsterConfig, $extendObj) {
40     return {
41         restrict: 'EA',
42         scope: {
43             attGridsterOptions : '=?',
44             attGridsterItems : '='
45         },
46         templateUrl: 'template/gridster/gridster.html',
47         replace: false,
48         controller: ['$scope', '$attrs', function ($scope, $attrs) {
49                 
50         }],
51         link: function (scope, element, attrs, ctrl) {
52             if (angular.isDefined(scope.attGridsterOptions)) {
53                 attGridsterConfig = $extendObj.extendDeep(attGridsterConfig, scope.attGridsterOptions);
54             }
55             scope.attGridsterConfig = attGridsterConfig;
56             
57         }
58     };
59   }]);
60 angular.module("template/gridster/gridster.html", []).run(["$templateCache", function($templateCache) {
61   $templateCache.put("template/gridster/gridster.html",
62     "<div>\n" +
63     "    <div gridster='attGridsterConfig'>\n" +
64     "        <div gridster-item=\"item\" ng-repeat=\"item in attGridsterItems\" class=\"gridster-item-container\" >\n" +
65     "            <div class=\"gridster-item-header\">\n" +
66     "                <img gridster-item-drag src=\"images/grips.png\" alt='||' class=\"gridster-item-handle\" />\n" +
67     "                <span class=\"gridster-item-header-content\">Maintenance</span>\n" +
68     "                <span class=\"gridster-item-sub-header-content\">Sub Header</span>\n" +
69     "                <div class=\"gridster-item-header-buttons-container\">\n" +
70     "                    <img src=\"images/att-globe-ie8.png\" alt='AT&T' />\n" +
71     "                </div>\n" +
72     "            </div>\n" +
73     "            <div class=\"gridster-item-body\">\n" +
74     "                <div style=\" width: 100%; height: 221px; font-size: 12px;\">\n" +
75     "                    <br/>{{$index}}<center></center>\n" +
76     "                    <br>\n" +
77     "                    There are no AT&amp;T BusinessDirect tools available. To contact us for help, click the chat icon, and then click Contact Us.\n" +
78     "                </div>\n" +
79     "            </div>\n" +
80     "            <div class=\"gridster-item-footer\">\n" +
81     "                <a href='#anotherPage' class=\"gridster-item-footer-content\" >Navigate to another page</a>\n" +
82     "            </div>\n" +
83     "        </div>\n" +
84     "    </div>\n" +
85     "</div>");
86 }]);