Skip to content

Commit 56cd385

Browse files
committed
add 1.2.5 singularity-expansion
1 parent 34471ee commit 56cd385

File tree

651 files changed

+141622
-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.

651 files changed

+141622
-0
lines changed

1.2.5/angular-1.2.5.zip

4.45 MB
Binary file not shown.

1.2.5/angular-animate.js

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

1.2.5/angular-animate.min.js

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

1.2.5/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.5/angular-cookies.js

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

1.2.5/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.5/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.5/angular-csp.css

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
/* The styles below ensure that the CSS transition will ALWAYS
16+
* animate and close. A nasty bug occurs with CSS transitions where
17+
* when the active class isn't set, or if the active class doesn't
18+
* contain any styles to transition to, then, if ngAnimate is used,
19+
* it will appear as if the webpage is broken due to the forever hanging
20+
* animations. The border-spacing (!ie) and zoom (ie) CSS properties are
21+
* used below since they trigger a transition without making the browser
22+
* animate anything and they're both highly underused CSS properties */
23+
.ng-animate-start { border-spacing:1px 1px; -ms-zoom:1.0001; }
24+
.ng-animate-active { border-spacing:0px 0px; -ms-zoom:1; }

0 commit comments

Comments
 (0)