Skip to content
This repository was archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
upgrade to AngularJS 1.0.3 bouncy-thunder
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMinar committed Nov 27, 2012
1 parent 5c742c3 commit 4b5b468
Show file tree
Hide file tree
Showing 14 changed files with 735 additions and 461 deletions.
2 changes: 1 addition & 1 deletion app/lib/angular/angular-cookies.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license AngularJS v1.0.2
* @license AngularJS v1.0.3
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion app/lib/angular/angular-cookies.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
AngularJS v1.0.2
AngularJS v1.0.3
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
*/
Expand Down
10 changes: 5 additions & 5 deletions app/lib/angular/angular-loader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license AngularJS v1.0.2
* @license AngularJS v1.0.3
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
Expand Down Expand Up @@ -36,7 +36,7 @@ function setupModuleLoader(window) {
*
* # Module
*
* A module is a collocation of services, directives, filters, and configure information. Module
* A module is a collocation of services, directives, filters, and configuration information. Module
* is used to configure the {@link AUTO.$injector $injector}.
*
* <pre>
Expand Down Expand Up @@ -67,7 +67,7 @@ function setupModuleLoader(window) {
* @param {!string} name The name of the module to create or retrieve.
* @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the
* the module is being retrieved for further configuration.
* @param {Function} configFn Option configuration function for the module. Same as
* @param {Function} configFn Optional configuration function for the module. Same as
* {@link angular.Module#config Module#config()}.
* @returns {module} new module with the {@link angular.Module} api.
*/
Expand Down Expand Up @@ -222,8 +222,8 @@ function setupModuleLoader(window) {
* @param {Function} initializationFn Execute this function after injector creation.
* Useful for application initialization.
* @description
* Use this method to register work which needs to be performed when the injector with
* with the current module is finished loading.
* Use this method to register work which should be performed when the injector is done
* loading all modules.
*/
run: function(block) {
runBlocks.push(block);
Expand Down
2 changes: 1 addition & 1 deletion app/lib/angular/angular-loader.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
AngularJS v1.0.2
AngularJS v1.0.3
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
*/
Expand Down
21 changes: 14 additions & 7 deletions app/lib/angular/angular-resource.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license AngularJS v1.0.2
* @license AngularJS v1.0.3
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
Expand Down Expand Up @@ -231,7 +231,7 @@ angular.module('ngResource', ['ng']).
};

/**
* We need our custom mehtod because encodeURIComponent is too agressive and doesn't follow
* We need our custom mehtod because encodeURIComponent is too aggressive and doesn't follow
* http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
* segments:
* segment = *pchar
Expand Down Expand Up @@ -285,12 +285,18 @@ angular.module('ngResource', ['ng']).
url: function(params) {
var self = this,
url = this.template,
val,
encodedVal;

params = params || {};
forEach(this.urlParams, function(_, urlParam){
encodedVal = encodeUriSegment(params[urlParam] || self.defaults[urlParam] || "");
url = url.replace(new RegExp(":" + urlParam + "(\\W)"), encodedVal + "$1");
val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
if (angular.isDefined(val) && val !== null) {
encodedVal = encodeUriSegment(val);
url = url.replace(new RegExp(":" + urlParam + "(\\W)", "g"), encodedVal + "$1");
} else {
url = url.replace(new RegExp("/?:" + urlParam + "(\\W)", "g"), '$1');
}
});
url = url.replace(/\/?#$/, '');
var query = [];
Expand All @@ -311,9 +317,10 @@ angular.module('ngResource', ['ng']).

actions = extend({}, DEFAULT_ACTIONS, actions);

function extractParams(data){
function extractParams(data, actionParams){
var ids = {};
forEach(paramDefaults || {}, function(value, key){
actionParams = extend({}, paramDefaults, actionParams);
forEach(actionParams, function(value, key){
ids[key] = value.charAt && value.charAt(0) == '@' ? getter(data, value.substr(1)) : value;
});
return ids;
Expand Down Expand Up @@ -367,7 +374,7 @@ angular.module('ngResource', ['ng']).
var value = this instanceof Resource ? this : (action.isArray ? [] : new Resource(data));
$http({
method: action.method,
url: route.url(extend({}, extractParams(data), action.params || {}, params)),
url: route.url(extend({}, extractParams(data, action.params || {}), params)),
data: data
}).then(function(response) {
var data = response.data;
Expand Down
12 changes: 6 additions & 6 deletions app/lib/angular/angular-resource.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/lib/angular/angular-sanitize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license AngularJS v1.0.2
* @license AngularJS v1.0.3
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
Expand Down Expand Up @@ -416,7 +416,7 @@ angular.module('ngSanitize', []).value('$sanitize', $sanitize);
angular.module('ngSanitize').directive('ngBindHtml', ['$sanitize', function($sanitize) {
return function(scope, element, attr) {
element.addClass('ng-binding').data('$binding', attr.ngBindHtml);
scope.$watch(attr.ngBindHtml, function(value) {
scope.$watch(attr.ngBindHtml, function ngBindHtmlWatchAction(value) {
value = $sanitize(value);
element.html(value || '');
});
Expand Down
2 changes: 1 addition & 1 deletion app/lib/angular/angular-sanitize.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4b5b468

Please sign in to comment.