ng-angularjs-rails 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/README.md +25 -0
  4. data/lib/ng/angularjs/rails.rb +11 -0
  5. data/lib/ng/angularjs/rails/version.rb +7 -0
  6. data/vendor/assets/javascripts/angular-bootstrap-prettify.js +1833 -0
  7. data/vendor/assets/javascripts/angular-bootstrap.js +166 -0
  8. data/vendor/assets/javascripts/angular-cookies.js +183 -0
  9. data/vendor/assets/javascripts/angular-loader.js +276 -0
  10. data/vendor/assets/javascripts/angular-mocks.js +1764 -0
  11. data/vendor/assets/javascripts/angular-resource.js +445 -0
  12. data/vendor/assets/javascripts/angular-sanitize.js +535 -0
  13. data/vendor/assets/javascripts/angular-scenario.js +26195 -0
  14. data/vendor/assets/javascripts/angular.js +14733 -0
  15. data/vendor/assets/javascripts/i18n/angular-locale_am-et.js +4 -0
  16. data/vendor/assets/javascripts/i18n/angular-locale_am.js +4 -0
  17. data/vendor/assets/javascripts/i18n/angular-locale_ar-eg.js +4 -0
  18. data/vendor/assets/javascripts/i18n/angular-locale_ar.js +4 -0
  19. data/vendor/assets/javascripts/i18n/angular-locale_bg-bg.js +4 -0
  20. data/vendor/assets/javascripts/i18n/angular-locale_bg.js +4 -0
  21. data/vendor/assets/javascripts/i18n/angular-locale_bn-bd.js +4 -0
  22. data/vendor/assets/javascripts/i18n/angular-locale_bn.js +4 -0
  23. data/vendor/assets/javascripts/i18n/angular-locale_ca-es.js +4 -0
  24. data/vendor/assets/javascripts/i18n/angular-locale_ca.js +4 -0
  25. data/vendor/assets/javascripts/i18n/angular-locale_cs-cz.js +4 -0
  26. data/vendor/assets/javascripts/i18n/angular-locale_cs.js +4 -0
  27. data/vendor/assets/javascripts/i18n/angular-locale_da-dk.js +4 -0
  28. data/vendor/assets/javascripts/i18n/angular-locale_da.js +4 -0
  29. data/vendor/assets/javascripts/i18n/angular-locale_de-at.js +4 -0
  30. data/vendor/assets/javascripts/i18n/angular-locale_de-be.js +4 -0
  31. data/vendor/assets/javascripts/i18n/angular-locale_de-ch.js +4 -0
  32. data/vendor/assets/javascripts/i18n/angular-locale_de-de.js +4 -0
  33. data/vendor/assets/javascripts/i18n/angular-locale_de-lu.js +4 -0
  34. data/vendor/assets/javascripts/i18n/angular-locale_de.js +4 -0
  35. data/vendor/assets/javascripts/i18n/angular-locale_el-gr.js +4 -0
  36. data/vendor/assets/javascripts/i18n/angular-locale_el-polyton.js +4 -0
  37. data/vendor/assets/javascripts/i18n/angular-locale_el.js +4 -0
  38. data/vendor/assets/javascripts/i18n/angular-locale_en-as.js +4 -0
  39. data/vendor/assets/javascripts/i18n/angular-locale_en-au.js +4 -0
  40. data/vendor/assets/javascripts/i18n/angular-locale_en-dsrt-us.js +4 -0
  41. data/vendor/assets/javascripts/i18n/angular-locale_en-dsrt.js +4 -0
  42. data/vendor/assets/javascripts/i18n/angular-locale_en-gb.js +4 -0
  43. data/vendor/assets/javascripts/i18n/angular-locale_en-gu.js +4 -0
  44. data/vendor/assets/javascripts/i18n/angular-locale_en-ie.js +4 -0
  45. data/vendor/assets/javascripts/i18n/angular-locale_en-in.js +4 -0
  46. data/vendor/assets/javascripts/i18n/angular-locale_en-iso.js +4 -0
  47. data/vendor/assets/javascripts/i18n/angular-locale_en-mh.js +4 -0
  48. data/vendor/assets/javascripts/i18n/angular-locale_en-mp.js +4 -0
  49. data/vendor/assets/javascripts/i18n/angular-locale_en-sg.js +4 -0
  50. data/vendor/assets/javascripts/i18n/angular-locale_en-um.js +4 -0
  51. data/vendor/assets/javascripts/i18n/angular-locale_en-us.js +4 -0
  52. data/vendor/assets/javascripts/i18n/angular-locale_en-vi.js +4 -0
  53. data/vendor/assets/javascripts/i18n/angular-locale_en-za.js +4 -0
  54. data/vendor/assets/javascripts/i18n/angular-locale_en-zz.js +4 -0
  55. data/vendor/assets/javascripts/i18n/angular-locale_en.js +4 -0
  56. data/vendor/assets/javascripts/i18n/angular-locale_es-es.js +4 -0
  57. data/vendor/assets/javascripts/i18n/angular-locale_es.js +4 -0
  58. data/vendor/assets/javascripts/i18n/angular-locale_et-ee.js +4 -0
  59. data/vendor/assets/javascripts/i18n/angular-locale_et.js +4 -0
  60. data/vendor/assets/javascripts/i18n/angular-locale_eu-es.js +4 -0
  61. data/vendor/assets/javascripts/i18n/angular-locale_eu.js +4 -0
  62. data/vendor/assets/javascripts/i18n/angular-locale_fa-ir.js +4 -0
  63. data/vendor/assets/javascripts/i18n/angular-locale_fa.js +4 -0
  64. data/vendor/assets/javascripts/i18n/angular-locale_fi-fi.js +4 -0
  65. data/vendor/assets/javascripts/i18n/angular-locale_fi.js +4 -0
  66. data/vendor/assets/javascripts/i18n/angular-locale_fil-ph.js +4 -0
  67. data/vendor/assets/javascripts/i18n/angular-locale_fil.js +4 -0
  68. data/vendor/assets/javascripts/i18n/angular-locale_fr-bl.js +4 -0
  69. data/vendor/assets/javascripts/i18n/angular-locale_fr-ca.js +4 -0
  70. data/vendor/assets/javascripts/i18n/angular-locale_fr-fr.js +4 -0
  71. data/vendor/assets/javascripts/i18n/angular-locale_fr-gp.js +4 -0
  72. data/vendor/assets/javascripts/i18n/angular-locale_fr-mc.js +4 -0
  73. data/vendor/assets/javascripts/i18n/angular-locale_fr-mf.js +4 -0
  74. data/vendor/assets/javascripts/i18n/angular-locale_fr-mq.js +4 -0
  75. data/vendor/assets/javascripts/i18n/angular-locale_fr-re.js +4 -0
  76. data/vendor/assets/javascripts/i18n/angular-locale_fr.js +4 -0
  77. data/vendor/assets/javascripts/i18n/angular-locale_gl-es.js +4 -0
  78. data/vendor/assets/javascripts/i18n/angular-locale_gl.js +4 -0
  79. data/vendor/assets/javascripts/i18n/angular-locale_gsw-ch.js +4 -0
  80. data/vendor/assets/javascripts/i18n/angular-locale_gsw.js +4 -0
  81. data/vendor/assets/javascripts/i18n/angular-locale_gu-in.js +4 -0
  82. data/vendor/assets/javascripts/i18n/angular-locale_gu.js +4 -0
  83. data/vendor/assets/javascripts/i18n/angular-locale_he-il.js +4 -0
  84. data/vendor/assets/javascripts/i18n/angular-locale_he.js +4 -0
  85. data/vendor/assets/javascripts/i18n/angular-locale_hi-in.js +4 -0
  86. data/vendor/assets/javascripts/i18n/angular-locale_hi.js +4 -0
  87. data/vendor/assets/javascripts/i18n/angular-locale_hr-hr.js +4 -0
  88. data/vendor/assets/javascripts/i18n/angular-locale_hr.js +4 -0
  89. data/vendor/assets/javascripts/i18n/angular-locale_hu-hu.js +4 -0
  90. data/vendor/assets/javascripts/i18n/angular-locale_hu.js +4 -0
  91. data/vendor/assets/javascripts/i18n/angular-locale_id-id.js +4 -0
  92. data/vendor/assets/javascripts/i18n/angular-locale_id.js +4 -0
  93. data/vendor/assets/javascripts/i18n/angular-locale_in.js +4 -0
  94. data/vendor/assets/javascripts/i18n/angular-locale_is-is.js +4 -0
  95. data/vendor/assets/javascripts/i18n/angular-locale_is.js +4 -0
  96. data/vendor/assets/javascripts/i18n/angular-locale_it-it.js +4 -0
  97. data/vendor/assets/javascripts/i18n/angular-locale_it.js +4 -0
  98. data/vendor/assets/javascripts/i18n/angular-locale_iw.js +4 -0
  99. data/vendor/assets/javascripts/i18n/angular-locale_ja-jp.js +4 -0
  100. data/vendor/assets/javascripts/i18n/angular-locale_ja.js +4 -0
  101. data/vendor/assets/javascripts/i18n/angular-locale_kn-in.js +4 -0
  102. data/vendor/assets/javascripts/i18n/angular-locale_kn.js +4 -0
  103. data/vendor/assets/javascripts/i18n/angular-locale_ko-kr.js +4 -0
  104. data/vendor/assets/javascripts/i18n/angular-locale_ko.js +4 -0
  105. data/vendor/assets/javascripts/i18n/angular-locale_ln-cd.js +4 -0
  106. data/vendor/assets/javascripts/i18n/angular-locale_ln.js +4 -0
  107. data/vendor/assets/javascripts/i18n/angular-locale_lt-lt.js +4 -0
  108. data/vendor/assets/javascripts/i18n/angular-locale_lt.js +4 -0
  109. data/vendor/assets/javascripts/i18n/angular-locale_lv-lv.js +4 -0
  110. data/vendor/assets/javascripts/i18n/angular-locale_lv.js +4 -0
  111. data/vendor/assets/javascripts/i18n/angular-locale_ml-in.js +4 -0
  112. data/vendor/assets/javascripts/i18n/angular-locale_ml.js +4 -0
  113. data/vendor/assets/javascripts/i18n/angular-locale_mo.js +4 -0
  114. data/vendor/assets/javascripts/i18n/angular-locale_mr-in.js +4 -0
  115. data/vendor/assets/javascripts/i18n/angular-locale_mr.js +4 -0
  116. data/vendor/assets/javascripts/i18n/angular-locale_ms-my.js +4 -0
  117. data/vendor/assets/javascripts/i18n/angular-locale_ms.js +4 -0
  118. data/vendor/assets/javascripts/i18n/angular-locale_mt-mt.js +4 -0
  119. data/vendor/assets/javascripts/i18n/angular-locale_mt.js +4 -0
  120. data/vendor/assets/javascripts/i18n/angular-locale_nl-nl.js +4 -0
  121. data/vendor/assets/javascripts/i18n/angular-locale_nl.js +4 -0
  122. data/vendor/assets/javascripts/i18n/angular-locale_no.js +4 -0
  123. data/vendor/assets/javascripts/i18n/angular-locale_or-in.js +4 -0
  124. data/vendor/assets/javascripts/i18n/angular-locale_or.js +4 -0
  125. data/vendor/assets/javascripts/i18n/angular-locale_pl-pl.js +4 -0
  126. data/vendor/assets/javascripts/i18n/angular-locale_pl.js +4 -0
  127. data/vendor/assets/javascripts/i18n/angular-locale_pt-br.js +4 -0
  128. data/vendor/assets/javascripts/i18n/angular-locale_pt-pt.js +4 -0
  129. data/vendor/assets/javascripts/i18n/angular-locale_pt.js +4 -0
  130. data/vendor/assets/javascripts/i18n/angular-locale_ro-ro.js +4 -0
  131. data/vendor/assets/javascripts/i18n/angular-locale_ro.js +4 -0
  132. data/vendor/assets/javascripts/i18n/angular-locale_ru-ru.js +4 -0
  133. data/vendor/assets/javascripts/i18n/angular-locale_ru.js +4 -0
  134. data/vendor/assets/javascripts/i18n/angular-locale_sk-sk.js +4 -0
  135. data/vendor/assets/javascripts/i18n/angular-locale_sk.js +4 -0
  136. data/vendor/assets/javascripts/i18n/angular-locale_sl-si.js +4 -0
  137. data/vendor/assets/javascripts/i18n/angular-locale_sl.js +4 -0
  138. data/vendor/assets/javascripts/i18n/angular-locale_sq-al.js +4 -0
  139. data/vendor/assets/javascripts/i18n/angular-locale_sq.js +4 -0
  140. data/vendor/assets/javascripts/i18n/angular-locale_sr-cyrl-rs.js +4 -0
  141. data/vendor/assets/javascripts/i18n/angular-locale_sr-latn-rs.js +4 -0
  142. data/vendor/assets/javascripts/i18n/angular-locale_sr-rs.js +4 -0
  143. data/vendor/assets/javascripts/i18n/angular-locale_sr.js +4 -0
  144. data/vendor/assets/javascripts/i18n/angular-locale_sv-se.js +4 -0
  145. data/vendor/assets/javascripts/i18n/angular-locale_sv.js +4 -0
  146. data/vendor/assets/javascripts/i18n/angular-locale_sw-tz.js +4 -0
  147. data/vendor/assets/javascripts/i18n/angular-locale_sw.js +4 -0
  148. data/vendor/assets/javascripts/i18n/angular-locale_ta-in.js +4 -0
  149. data/vendor/assets/javascripts/i18n/angular-locale_ta.js +4 -0
  150. data/vendor/assets/javascripts/i18n/angular-locale_te-in.js +4 -0
  151. data/vendor/assets/javascripts/i18n/angular-locale_te.js +4 -0
  152. data/vendor/assets/javascripts/i18n/angular-locale_th-th.js +4 -0
  153. data/vendor/assets/javascripts/i18n/angular-locale_th.js +4 -0
  154. data/vendor/assets/javascripts/i18n/angular-locale_tl-ph.js +4 -0
  155. data/vendor/assets/javascripts/i18n/angular-locale_tl.js +4 -0
  156. data/vendor/assets/javascripts/i18n/angular-locale_tr-tr.js +4 -0
  157. data/vendor/assets/javascripts/i18n/angular-locale_tr.js +4 -0
  158. data/vendor/assets/javascripts/i18n/angular-locale_uk-ua.js +4 -0
  159. data/vendor/assets/javascripts/i18n/angular-locale_uk.js +4 -0
  160. data/vendor/assets/javascripts/i18n/angular-locale_ur-pk.js +4 -0
  161. data/vendor/assets/javascripts/i18n/angular-locale_ur.js +4 -0
  162. data/vendor/assets/javascripts/i18n/angular-locale_vi-vn.js +4 -0
  163. data/vendor/assets/javascripts/i18n/angular-locale_vi.js +4 -0
  164. data/vendor/assets/javascripts/i18n/angular-locale_zh-cn.js +4 -0
  165. data/vendor/assets/javascripts/i18n/angular-locale_zh-hans-cn.js +4 -0
  166. data/vendor/assets/javascripts/i18n/angular-locale_zh-hans.js +4 -0
  167. data/vendor/assets/javascripts/i18n/angular-locale_zh-hk.js +4 -0
  168. data/vendor/assets/javascripts/i18n/angular-locale_zh-tw.js +4 -0
  169. data/vendor/assets/javascripts/i18n/angular-locale_zh.js +4 -0
  170. data/vendor/assets/javascripts/jstd-scenario-adapter-config.js +6 -0
  171. data/vendor/assets/javascripts/jstd-scenario-adapter.js +185 -0
  172. data/vendor/assets/javascripts/version.json +7 -0
  173. metadata +243 -0
@@ -0,0 +1,166 @@
1
+ /**
2
+ * @license AngularJS v1.0.5
3
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
4
+ * License: MIT
5
+ */
6
+ (function(window, angular, undefined) {
7
+ 'use strict';
8
+
9
+ var directive = {};
10
+
11
+ directive.dropdownToggle =
12
+ ['$document', '$location', '$window',
13
+ function ($document, $location, $window) {
14
+ var openElement = null, close;
15
+ return {
16
+ restrict: 'C',
17
+ link: function(scope, element, attrs) {
18
+ scope.$watch(function dropdownTogglePathWatch(){return $location.path();}, function dropdownTogglePathWatchAction() {
19
+ close && close();
20
+ });
21
+
22
+ element.parent().bind('click', function(event) {
23
+ close && close();
24
+ });
25
+
26
+ element.bind('click', function(event) {
27
+ event.preventDefault();
28
+ event.stopPropagation();
29
+
30
+ var iWasOpen = false;
31
+
32
+ if (openElement) {
33
+ iWasOpen = openElement === element;
34
+ close();
35
+ }
36
+
37
+ if (!iWasOpen){
38
+ element.parent().addClass('open');
39
+ openElement = element;
40
+
41
+ close = function (event) {
42
+ event && event.preventDefault();
43
+ event && event.stopPropagation();
44
+ $document.unbind('click', close);
45
+ element.parent().removeClass('open');
46
+ close = null;
47
+ openElement = null;
48
+ }
49
+
50
+ $document.bind('click', close);
51
+ }
52
+ });
53
+ }
54
+ };
55
+ }];
56
+
57
+
58
+ directive.tabbable = function() {
59
+ return {
60
+ restrict: 'C',
61
+ compile: function(element) {
62
+ var navTabs = angular.element('<ul class="nav nav-tabs"></ul>'),
63
+ tabContent = angular.element('<div class="tab-content"></div>');
64
+
65
+ tabContent.append(element.contents());
66
+ element.append(navTabs).append(tabContent);
67
+ },
68
+ controller: ['$scope', '$element', function($scope, $element) {
69
+ var navTabs = $element.contents().eq(0),
70
+ ngModel = $element.controller('ngModel') || {},
71
+ tabs = [],
72
+ selectedTab;
73
+
74
+ ngModel.$render = function() {
75
+ var $viewValue = this.$viewValue;
76
+
77
+ if (selectedTab ? (selectedTab.value != $viewValue) : $viewValue) {
78
+ if(selectedTab) {
79
+ selectedTab.paneElement.removeClass('active');
80
+ selectedTab.tabElement.removeClass('active');
81
+ selectedTab = null;
82
+ }
83
+ if($viewValue) {
84
+ for(var i = 0, ii = tabs.length; i < ii; i++) {
85
+ if ($viewValue == tabs[i].value) {
86
+ selectedTab = tabs[i];
87
+ break;
88
+ }
89
+ }
90
+ if (selectedTab) {
91
+ selectedTab.paneElement.addClass('active');
92
+ selectedTab.tabElement.addClass('active');
93
+ }
94
+ }
95
+
96
+ }
97
+ };
98
+
99
+ this.addPane = function(element, attr) {
100
+ var li = angular.element('<li><a href></a></li>'),
101
+ a = li.find('a'),
102
+ tab = {
103
+ paneElement: element,
104
+ paneAttrs: attr,
105
+ tabElement: li
106
+ };
107
+
108
+ tabs.push(tab);
109
+
110
+ attr.$observe('value', update)();
111
+ attr.$observe('title', function(){ update(); a.text(tab.title); })();
112
+
113
+ function update() {
114
+ tab.title = attr.title;
115
+ tab.value = attr.value || attr.title;
116
+ if (!ngModel.$setViewValue && (!ngModel.$viewValue || tab == selectedTab)) {
117
+ // we are not part of angular
118
+ ngModel.$viewValue = tab.value;
119
+ }
120
+ ngModel.$render();
121
+ }
122
+
123
+ navTabs.append(li);
124
+ li.bind('click', function(event) {
125
+ event.preventDefault();
126
+ event.stopPropagation();
127
+ if (ngModel.$setViewValue) {
128
+ $scope.$apply(function() {
129
+ ngModel.$setViewValue(tab.value);
130
+ ngModel.$render();
131
+ });
132
+ } else {
133
+ // we are not part of angular
134
+ ngModel.$viewValue = tab.value;
135
+ ngModel.$render();
136
+ }
137
+ });
138
+
139
+ return function() {
140
+ tab.tabElement.remove();
141
+ for(var i = 0, ii = tabs.length; i < ii; i++ ) {
142
+ if (tab == tabs[i]) {
143
+ tabs.splice(i, 1);
144
+ }
145
+ }
146
+ };
147
+ }
148
+ }]
149
+ };
150
+ };
151
+
152
+
153
+ directive.tabPane = function() {
154
+ return {
155
+ require: '^tabbable',
156
+ restrict: 'C',
157
+ link: function(scope, element, attrs, tabsCtrl) {
158
+ element.bind('$remove', tabsCtrl.addPane(element, attrs));
159
+ }
160
+ };
161
+ };
162
+
163
+
164
+ angular.module('bootstrap', []).directive(directive);
165
+
166
+ })(window, window.angular);
@@ -0,0 +1,183 @@
1
+ /**
2
+ * @license AngularJS v1.0.5
3
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
4
+ * License: MIT
5
+ */
6
+ (function(window, angular, undefined) {
7
+ 'use strict';
8
+
9
+ /**
10
+ * @ngdoc overview
11
+ * @name ngCookies
12
+ */
13
+
14
+
15
+ angular.module('ngCookies', ['ng']).
16
+ /**
17
+ * @ngdoc object
18
+ * @name ngCookies.$cookies
19
+ * @requires $browser
20
+ *
21
+ * @description
22
+ * Provides read/write access to browser's cookies.
23
+ *
24
+ * Only a simple Object is exposed and by adding or removing properties to/from
25
+ * this object, new cookies are created/deleted at the end of current $eval.
26
+ *
27
+ * @example
28
+ <doc:example>
29
+ <doc:source>
30
+ <script>
31
+ function ExampleController($cookies) {
32
+ // Retrieving a cookie
33
+ var favoriteCookie = $cookies.myFavorite;
34
+ // Setting a cookie
35
+ $cookies.myFavorite = 'oatmeal';
36
+ }
37
+ </script>
38
+ </doc:source>
39
+ </doc:example>
40
+ */
41
+ factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
42
+ var cookies = {},
43
+ lastCookies = {},
44
+ lastBrowserCookies,
45
+ runEval = false,
46
+ copy = angular.copy,
47
+ isUndefined = angular.isUndefined;
48
+
49
+ //creates a poller fn that copies all cookies from the $browser to service & inits the service
50
+ $browser.addPollFn(function() {
51
+ var currentCookies = $browser.cookies();
52
+ if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
53
+ lastBrowserCookies = currentCookies;
54
+ copy(currentCookies, lastCookies);
55
+ copy(currentCookies, cookies);
56
+ if (runEval) $rootScope.$apply();
57
+ }
58
+ })();
59
+
60
+ runEval = true;
61
+
62
+ //at the end of each eval, push cookies
63
+ //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
64
+ // strings or browser refuses to store some cookies, we update the model in the push fn.
65
+ $rootScope.$watch(push);
66
+
67
+ return cookies;
68
+
69
+
70
+ /**
71
+ * Pushes all the cookies from the service to the browser and verifies if all cookies were stored.
72
+ */
73
+ function push() {
74
+ var name,
75
+ value,
76
+ browserCookies,
77
+ updated;
78
+
79
+ //delete any cookies deleted in $cookies
80
+ for (name in lastCookies) {
81
+ if (isUndefined(cookies[name])) {
82
+ $browser.cookies(name, undefined);
83
+ }
84
+ }
85
+
86
+ //update all cookies updated in $cookies
87
+ for(name in cookies) {
88
+ value = cookies[name];
89
+ if (!angular.isString(value)) {
90
+ if (angular.isDefined(lastCookies[name])) {
91
+ cookies[name] = lastCookies[name];
92
+ } else {
93
+ delete cookies[name];
94
+ }
95
+ } else if (value !== lastCookies[name]) {
96
+ $browser.cookies(name, value);
97
+ updated = true;
98
+ }
99
+ }
100
+
101
+ //verify what was actually stored
102
+ if (updated){
103
+ updated = false;
104
+ browserCookies = $browser.cookies();
105
+
106
+ for (name in cookies) {
107
+ if (cookies[name] !== browserCookies[name]) {
108
+ //delete or reset all cookies that the browser dropped from $cookies
109
+ if (isUndefined(browserCookies[name])) {
110
+ delete cookies[name];
111
+ } else {
112
+ cookies[name] = browserCookies[name];
113
+ }
114
+ updated = true;
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }]).
120
+
121
+
122
+ /**
123
+ * @ngdoc object
124
+ * @name ngCookies.$cookieStore
125
+ * @requires $cookies
126
+ *
127
+ * @description
128
+ * Provides a key-value (string-object) storage, that is backed by session cookies.
129
+ * Objects put or retrieved from this storage are automatically serialized or
130
+ * deserialized by angular's toJson/fromJson.
131
+ * @example
132
+ */
133
+ factory('$cookieStore', ['$cookies', function($cookies) {
134
+
135
+ return {
136
+ /**
137
+ * @ngdoc method
138
+ * @name ngCookies.$cookieStore#get
139
+ * @methodOf ngCookies.$cookieStore
140
+ *
141
+ * @description
142
+ * Returns the value of given cookie key
143
+ *
144
+ * @param {string} key Id to use for lookup.
145
+ * @returns {Object} Deserialized cookie value.
146
+ */
147
+ get: function(key) {
148
+ return angular.fromJson($cookies[key]);
149
+ },
150
+
151
+ /**
152
+ * @ngdoc method
153
+ * @name ngCookies.$cookieStore#put
154
+ * @methodOf ngCookies.$cookieStore
155
+ *
156
+ * @description
157
+ * Sets a value for given cookie key
158
+ *
159
+ * @param {string} key Id for the `value`.
160
+ * @param {Object} value Value to be stored.
161
+ */
162
+ put: function(key, value) {
163
+ $cookies[key] = angular.toJson(value);
164
+ },
165
+
166
+ /**
167
+ * @ngdoc method
168
+ * @name ngCookies.$cookieStore#remove
169
+ * @methodOf ngCookies.$cookieStore
170
+ *
171
+ * @description
172
+ * Remove given cookie
173
+ *
174
+ * @param {string} key Id of the key-value pair to delete.
175
+ */
176
+ remove: function(key) {
177
+ delete $cookies[key];
178
+ }
179
+ };
180
+
181
+ }]);
182
+
183
+ })(window, window.angular);
@@ -0,0 +1,276 @@
1
+ /**
2
+ * @license AngularJS v1.0.5
3
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
4
+ * License: MIT
5
+ */
6
+
7
+ (
8
+
9
+ /**
10
+ * @ngdoc interface
11
+ * @name angular.Module
12
+ * @description
13
+ *
14
+ * Interface for configuring angular {@link angular.module modules}.
15
+ */
16
+
17
+ function setupModuleLoader(window) {
18
+
19
+ function ensure(obj, name, factory) {
20
+ return obj[name] || (obj[name] = factory());
21
+ }
22
+
23
+ return ensure(ensure(window, 'angular', Object), 'module', function() {
24
+ /** @type {Object.<string, angular.Module>} */
25
+ var modules = {};
26
+
27
+ /**
28
+ * @ngdoc function
29
+ * @name angular.module
30
+ * @description
31
+ *
32
+ * The `angular.module` is a global place for creating and registering Angular modules. All
33
+ * modules (angular core or 3rd party) that should be available to an application must be
34
+ * registered using this mechanism.
35
+ *
36
+ *
37
+ * # Module
38
+ *
39
+ * A module is a collocation of services, directives, filters, and configuration information. Module
40
+ * is used to configure the {@link AUTO.$injector $injector}.
41
+ *
42
+ * <pre>
43
+ * // Create a new module
44
+ * var myModule = angular.module('myModule', []);
45
+ *
46
+ * // register a new service
47
+ * myModule.value('appName', 'MyCoolApp');
48
+ *
49
+ * // configure existing services inside initialization blocks.
50
+ * myModule.config(function($locationProvider) {
51
+ 'use strict';
52
+ * // Configure existing providers
53
+ * $locationProvider.hashPrefix('!');
54
+ * });
55
+ * </pre>
56
+ *
57
+ * Then you can create an injector and load your modules like this:
58
+ *
59
+ * <pre>
60
+ * var injector = angular.injector(['ng', 'MyModule'])
61
+ * </pre>
62
+ *
63
+ * However it's more likely that you'll just use
64
+ * {@link ng.directive:ngApp ngApp} or
65
+ * {@link angular.bootstrap} to simplify this process for you.
66
+ *
67
+ * @param {!string} name The name of the module to create or retrieve.
68
+ * @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the
69
+ * the module is being retrieved for further configuration.
70
+ * @param {Function} configFn Optional configuration function for the module. Same as
71
+ * {@link angular.Module#config Module#config()}.
72
+ * @returns {module} new module with the {@link angular.Module} api.
73
+ */
74
+ return function module(name, requires, configFn) {
75
+ if (requires && modules.hasOwnProperty(name)) {
76
+ modules[name] = null;
77
+ }
78
+ return ensure(modules, name, function() {
79
+ if (!requires) {
80
+ throw Error('No module: ' + name);
81
+ }
82
+
83
+ /** @type {!Array.<Array.<*>>} */
84
+ var invokeQueue = [];
85
+
86
+ /** @type {!Array.<Function>} */
87
+ var runBlocks = [];
88
+
89
+ var config = invokeLater('$injector', 'invoke');
90
+
91
+ /** @type {angular.Module} */
92
+ var moduleInstance = {
93
+ // Private state
94
+ _invokeQueue: invokeQueue,
95
+ _runBlocks: runBlocks,
96
+
97
+ /**
98
+ * @ngdoc property
99
+ * @name angular.Module#requires
100
+ * @propertyOf angular.Module
101
+ * @returns {Array.<string>} List of module names which must be loaded before this module.
102
+ * @description
103
+ * Holds the list of modules which the injector will load before the current module is loaded.
104
+ */
105
+ requires: requires,
106
+
107
+ /**
108
+ * @ngdoc property
109
+ * @name angular.Module#name
110
+ * @propertyOf angular.Module
111
+ * @returns {string} Name of the module.
112
+ * @description
113
+ */
114
+ name: name,
115
+
116
+
117
+ /**
118
+ * @ngdoc method
119
+ * @name angular.Module#provider
120
+ * @methodOf angular.Module
121
+ * @param {string} name service name
122
+ * @param {Function} providerType Construction function for creating new instance of the service.
123
+ * @description
124
+ * See {@link AUTO.$provide#provider $provide.provider()}.
125
+ */
126
+ provider: invokeLater('$provide', 'provider'),
127
+
128
+ /**
129
+ * @ngdoc method
130
+ * @name angular.Module#factory
131
+ * @methodOf angular.Module
132
+ * @param {string} name service name
133
+ * @param {Function} providerFunction Function for creating new instance of the service.
134
+ * @description
135
+ * See {@link AUTO.$provide#factory $provide.factory()}.
136
+ */
137
+ factory: invokeLater('$provide', 'factory'),
138
+
139
+ /**
140
+ * @ngdoc method
141
+ * @name angular.Module#service
142
+ * @methodOf angular.Module
143
+ * @param {string} name service name
144
+ * @param {Function} constructor A constructor function that will be instantiated.
145
+ * @description
146
+ * See {@link AUTO.$provide#service $provide.service()}.
147
+ */
148
+ service: invokeLater('$provide', 'service'),
149
+
150
+ /**
151
+ * @ngdoc method
152
+ * @name angular.Module#value
153
+ * @methodOf angular.Module
154
+ * @param {string} name service name
155
+ * @param {*} object Service instance object.
156
+ * @description
157
+ * See {@link AUTO.$provide#value $provide.value()}.
158
+ */
159
+ value: invokeLater('$provide', 'value'),
160
+
161
+ /**
162
+ * @ngdoc method
163
+ * @name angular.Module#constant
164
+ * @methodOf angular.Module
165
+ * @param {string} name constant name
166
+ * @param {*} object Constant value.
167
+ * @description
168
+ * Because the constant are fixed, they get applied before other provide methods.
169
+ * See {@link AUTO.$provide#constant $provide.constant()}.
170
+ */
171
+ constant: invokeLater('$provide', 'constant', 'unshift'),
172
+
173
+ /**
174
+ * @ngdoc method
175
+ * @name angular.Module#filter
176
+ * @methodOf angular.Module
177
+ * @param {string} name Filter name.
178
+ * @param {Function} filterFactory Factory function for creating new instance of filter.
179
+ * @description
180
+ * See {@link ng.$filterProvider#register $filterProvider.register()}.
181
+ */
182
+ filter: invokeLater('$filterProvider', 'register'),
183
+
184
+ /**
185
+ * @ngdoc method
186
+ * @name angular.Module#controller
187
+ * @methodOf angular.Module
188
+ * @param {string} name Controller name.
189
+ * @param {Function} constructor Controller constructor function.
190
+ * @description
191
+ * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
192
+ */
193
+ controller: invokeLater('$controllerProvider', 'register'),
194
+
195
+ /**
196
+ * @ngdoc method
197
+ * @name angular.Module#directive
198
+ * @methodOf angular.Module
199
+ * @param {string} name directive name
200
+ * @param {Function} directiveFactory Factory function for creating new instance of
201
+ * directives.
202
+ * @description
203
+ * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
204
+ */
205
+ directive: invokeLater('$compileProvider', 'directive'),
206
+
207
+ /**
208
+ * @ngdoc method
209
+ * @name angular.Module#config
210
+ * @methodOf angular.Module
211
+ * @param {Function} configFn Execute this function on module load. Useful for service
212
+ * configuration.
213
+ * @description
214
+ * Use this method to register work which needs to be performed on module loading.
215
+ */
216
+ config: config,
217
+
218
+ /**
219
+ * @ngdoc method
220
+ * @name angular.Module#run
221
+ * @methodOf angular.Module
222
+ * @param {Function} initializationFn Execute this function after injector creation.
223
+ * Useful for application initialization.
224
+ * @description
225
+ * Use this method to register work which should be performed when the injector is done
226
+ * loading all modules.
227
+ */
228
+ run: function(block) {
229
+ runBlocks.push(block);
230
+ return this;
231
+ }
232
+ };
233
+
234
+ if (configFn) {
235
+ config(configFn);
236
+ }
237
+
238
+ return moduleInstance;
239
+
240
+ /**
241
+ * @param {string} provider
242
+ * @param {string} method
243
+ * @param {String=} insertMethod
244
+ * @returns {angular.Module}
245
+ */
246
+ function invokeLater(provider, method, insertMethod) {
247
+ return function() {
248
+ invokeQueue[insertMethod || 'push']([provider, method, arguments]);
249
+ return moduleInstance;
250
+ }
251
+ }
252
+ });
253
+ };
254
+ });
255
+
256
+ }
257
+ )(window);
258
+
259
+ /**
260
+ * Closure compiler type information
261
+ *
262
+ * @typedef { {
263
+ * requires: !Array.<string>,
264
+ * invokeQueue: !Array.<Array.<*>>,
265
+ *
266
+ * service: function(string, Function):angular.Module,
267
+ * factory: function(string, Function):angular.Module,
268
+ * value: function(string, *):angular.Module,
269
+ *
270
+ * filter: function(string, Function):angular.Module,
271
+ *
272
+ * init: function(Function):angular.Module
273
+ * } }
274
+ */
275
+ angular.Module;
276
+