Skip to content

Commit 5e870c6

Browse files
committed
v1.2.16
1 parent fe1c5a9 commit 5e870c6

File tree

1,675 files changed

+202690
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,675 files changed

+202690
-0
lines changed

1.2.16/angular-1.2.16.zip

7.82 MB
Binary file not shown.

1.2.16/angular-animate.js

+1,616
Large diffs are not rendered by default.

1.2.16/angular-animate.min.js

+27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

1.2.16/angular-animate.min.js.map

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

1.2.16/angular-cookies.js

+196
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
/**
2+
* @license AngularJS v1.2.16
3+
* (c) 2010-2014 Google, Inc. http://angularjs.org
4+
* License: MIT
5+
*/
6+
(function(window, angular, undefined) {'use strict';
7+
8+
/**
9+
* @ngdoc module
10+
* @name ngCookies
11+
* @description
12+
*
13+
* # ngCookies
14+
*
15+
* The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
16+
*
17+
*
18+
* <div doc-module-components="ngCookies"></div>
19+
*
20+
* See {@link ngCookies.$cookies `$cookies`} and
21+
* {@link ngCookies.$cookieStore `$cookieStore`} for usage.
22+
*/
23+
24+
25+
angular.module('ngCookies', ['ng']).
26+
/**
27+
* @ngdoc service
28+
* @name $cookies
29+
*
30+
* @description
31+
* Provides read/write access to browser's cookies.
32+
*
33+
* Only a simple Object is exposed and by adding or removing properties to/from this object, new
34+
* cookies are created/deleted at the end of current $eval.
35+
* The object's properties can only be strings.
36+
*
37+
* Requires the {@link ngCookies `ngCookies`} module to be installed.
38+
*
39+
* @example
40+
<example>
41+
<file name="index.html">
42+
<script>
43+
function ExampleController($cookies) {
44+
// Retrieving a cookie
45+
var favoriteCookie = $cookies.myFavorite;
46+
// Setting a cookie
47+
$cookies.myFavorite = 'oatmeal';
48+
}
49+
</script>
50+
</file>
51+
</example>
52+
*/
53+
factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
54+
var cookies = {},
55+
lastCookies = {},
56+
lastBrowserCookies,
57+
runEval = false,
58+
copy = angular.copy,
59+
isUndefined = angular.isUndefined;
60+
61+
//creates a poller fn that copies all cookies from the $browser to service & inits the service
62+
$browser.addPollFn(function() {
63+
var currentCookies = $browser.cookies();
64+
if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
65+
lastBrowserCookies = currentCookies;
66+
copy(currentCookies, lastCookies);
67+
copy(currentCookies, cookies);
68+
if (runEval) $rootScope.$apply();
69+
}
70+
})();
71+
72+
runEval = true;
73+
74+
//at the end of each eval, push cookies
75+
//TODO: this should happen before the "delayed" watches fire, because if some cookies are not
76+
// strings or browser refuses to store some cookies, we update the model in the push fn.
77+
$rootScope.$watch(push);
78+
79+
return cookies;
80+
81+
82+
/**
83+
* Pushes all the cookies from the service to the browser and verifies if all cookies were
84+
* stored.
85+
*/
86+
function push() {
87+
var name,
88+
value,
89+
browserCookies,
90+
updated;
91+
92+
//delete any cookies deleted in $cookies
93+
for (name in lastCookies) {
94+
if (isUndefined(cookies[name])) {
95+
$browser.cookies(name, undefined);
96+
}
97+
}
98+
99+
//update all cookies updated in $cookies
100+
for(name in cookies) {
101+
value = cookies[name];
102+
if (!angular.isString(value)) {
103+
value = '' + value;
104+
cookies[name] = value;
105+
}
106+
if (value !== lastCookies[name]) {
107+
$browser.cookies(name, value);
108+
updated = true;
109+
}
110+
}
111+
112+
//verify what was actually stored
113+
if (updated){
114+
updated = false;
115+
browserCookies = $browser.cookies();
116+
117+
for (name in cookies) {
118+
if (cookies[name] !== browserCookies[name]) {
119+
//delete or reset all cookies that the browser dropped from $cookies
120+
if (isUndefined(browserCookies[name])) {
121+
delete cookies[name];
122+
} else {
123+
cookies[name] = browserCookies[name];
124+
}
125+
updated = true;
126+
}
127+
}
128+
}
129+
}
130+
}]).
131+
132+
133+
/**
134+
* @ngdoc service
135+
* @name $cookieStore
136+
* @requires $cookies
137+
*
138+
* @description
139+
* Provides a key-value (string-object) storage, that is backed by session cookies.
140+
* Objects put or retrieved from this storage are automatically serialized or
141+
* deserialized by angular's toJson/fromJson.
142+
*
143+
* Requires the {@link ngCookies `ngCookies`} module to be installed.
144+
*
145+
* @example
146+
*/
147+
factory('$cookieStore', ['$cookies', function($cookies) {
148+
149+
return {
150+
/**
151+
* @ngdoc method
152+
* @name $cookieStore#get
153+
*
154+
* @description
155+
* Returns the value of given cookie key
156+
*
157+
* @param {string} key Id to use for lookup.
158+
* @returns {Object} Deserialized cookie value.
159+
*/
160+
get: function(key) {
161+
var value = $cookies[key];
162+
return value ? angular.fromJson(value) : value;
163+
},
164+
165+
/**
166+
* @ngdoc method
167+
* @name $cookieStore#put
168+
*
169+
* @description
170+
* Sets a value for given cookie key
171+
*
172+
* @param {string} key Id for the `value`.
173+
* @param {Object} value Value to be stored.
174+
*/
175+
put: function(key, value) {
176+
$cookies[key] = angular.toJson(value);
177+
},
178+
179+
/**
180+
* @ngdoc method
181+
* @name $cookieStore#remove
182+
*
183+
* @description
184+
* Remove given cookie
185+
*
186+
* @param {string} key Id of the key-value pair to delete.
187+
*/
188+
remove: function(key) {
189+
delete $cookies[key];
190+
}
191+
};
192+
193+
}]);
194+
195+
196+
})(window, window.angular);

1.2.16/angular-cookies.min.js

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

1.2.16/angular-cookies.min.js.map

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

1.2.16/angular-csp.css

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* Include this file in your html if you are using the CSP mode. */
2+
3+
@charset "UTF-8";
4+
5+
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
6+
.ng-cloak, .x-ng-cloak,
7+
.ng-hide {
8+
display: none !important;
9+
}
10+
11+
ng\:form {
12+
display: block;
13+
}
14+
15+
.ng-animate-block-transitions {
16+
transition:0s all!important;
17+
-webkit-transition:0s all!important;
18+
}

0 commit comments

Comments
 (0)