Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
todomvc
Commits
9169d37f
Commit
9169d37f
authored
Feb 15, 2014
by
Pascal Hartig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AngularJS: Upgrade to 1.2.13 romantic-transclusion
parent
d6a83291
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
47 deletions
+123
-47
architecture-examples/angularjs/bower.json
architecture-examples/angularjs/bower.json
+3
-3
architecture-examples/angularjs/bower_components/angular-route/angular-route.js
...angularjs/bower_components/angular-route/angular-route.js
+1
-1
architecture-examples/angularjs/bower_components/angular/angular.js
...re-examples/angularjs/bower_components/angular/angular.js
+119
-43
No files found.
architecture-examples/angularjs/bower.json
View file @
9169d37f
...
...
@@ -2,11 +2,11 @@
"name"
:
"todomvc-angular"
,
"version"
:
"0.0.0"
,
"dependencies"
:
{
"angular"
:
"1.2.1
2
"
,
"angular"
:
"1.2.1
3
"
,
"todomvc-common"
:
"~0.1.4"
},
"devDependencies"
:
{
"angular-mocks"
:
"1.2.1
2
"
,
"angular-route"
:
"1.2.1
2
"
"angular-mocks"
:
"1.2.1
3
"
,
"angular-route"
:
"1.2.1
3
"
}
}
architecture-examples/angularjs/bower_components/angular-route/angular-route.js
View file @
9169d37f
/**
* @license AngularJS v1.2.1
2
* @license AngularJS v1.2.1
3
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
...
...
architecture-examples/angularjs/bower_components/angular/angular.js
View file @
9169d37f
/**
* @license AngularJS v1.2.1
2
* @license AngularJS v1.2.1
3
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
...
...
@@ -68,7 +68,7 @@ function minErr(module) {
return
match
;
});
message
=
message
+
'
\n
http://errors.angularjs.org/1.2.1
2
/
'
+
message
=
message
+
'
\n
http://errors.angularjs.org/1.2.1
3
/
'
+
(
module
?
module
+
'
/
'
:
''
)
+
code
;
for
(
i
=
2
;
i
<
arguments
.
length
;
i
++
)
{
message
=
message
+
(
i
==
2
?
'
?
'
:
'
&
'
)
+
'
p
'
+
(
i
-
2
)
+
'
=
'
+
...
...
@@ -160,6 +160,7 @@ function minErr(module) {
-assertNotHasOwnProperty,
-getter,
-getBlockElements,
-hasOwnProperty,
*/
...
...
@@ -175,7 +176,7 @@ function minErr(module) {
* @returns {string} Lowercased string.
*/
var
lowercase
=
function
(
string
){
return
isString
(
string
)
?
string
.
toLowerCase
()
:
string
;};
var
hasOwnProperty
=
Object
.
prototype
.
hasOwnProperty
;
/**
* @ngdoc function
...
...
@@ -1210,6 +1211,7 @@ function encodeUriQuery(val, pctEncodeSpaces) {
<file name="index.html">
<div ng-controller="ngAppDemoController">
I can add: {{a}} + {{b}} = {{ a+b }}
</div>
</file>
<file name="script.js">
angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {
...
...
@@ -1834,11 +1836,11 @@ function setupModuleLoader(window) {
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var
version
=
{
full
:
'
1.2.1
2
'
,
// all of these placeholder strings will be replaced by grunt's
full
:
'
1.2.1
3
'
,
// all of these placeholder strings will be replaced by grunt's
major
:
1
,
// package task
minor
:
2
,
dot
:
1
2
,
codeName
:
'
cauliflower-eradicat
ion
'
dot
:
1
3
,
codeName
:
'
romantic-transclus
ion
'
};
...
...
@@ -2000,7 +2002,7 @@ function publishExternalAPI(angular){
* - [`after()`](http://api.jquery.com/after/)
* - [`append()`](http://api.jquery.com/append/)
* - [`attr()`](http://api.jquery.com/attr/)
* - [`bind()`](http://api.jquery.com/
on
/) - Does not support namespaces, selectors or eventData
* - [`bind()`](http://api.jquery.com/
bind
/) - Does not support namespaces, selectors or eventData
* - [`children()`](http://api.jquery.com/children/) - Does not support selectors
* - [`clone()`](http://api.jquery.com/clone/)
* - [`contents()`](http://api.jquery.com/contents/)
...
...
@@ -2027,7 +2029,7 @@ function publishExternalAPI(angular){
* - [`text()`](http://api.jquery.com/text/)
* - [`toggleClass()`](http://api.jquery.com/toggleClass/)
* - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.
* - [`unbind()`](http://api.jquery.com/
off
/) - Does not support namespaces
* - [`unbind()`](http://api.jquery.com/
unbind
/) - Does not support namespaces
* - [`val()`](http://api.jquery.com/val/)
* - [`wrap()`](http://api.jquery.com/wrap/)
*
...
...
@@ -2067,6 +2069,14 @@ var jqCache = JQLite.cache = {},
?
function
(
element
,
type
,
fn
)
{
element
.
removeEventListener
(
type
,
fn
,
false
);
}
:
function
(
element
,
type
,
fn
)
{
element
.
detachEvent
(
'
on
'
+
type
,
fn
);
});
/*
* !!! This is an undocumented "private" function !!!
*/
var
jqData
=
JQLite
.
_data
=
function
(
node
)
{
//jQuery always returns an object on cache miss
return
this
.
cache
[
node
[
this
.
expando
]]
||
{};
};
function
jqNextId
()
{
return
++
jqId
;
}
...
...
@@ -3414,7 +3424,7 @@ function annotate(fn) {
* var Ping = function($http) {
* this.$http = $http;
* };
*
*
* Ping.$inject = ['$http'];
*
* Ping.prototype.send = function() {
...
...
@@ -4057,6 +4067,29 @@ var $AnimateProvider = ['$provide', function($provide) {
done
&&
$timeout
(
done
,
0
,
false
);
},
/**
*
* @ngdoc function
* @name ng.$animate#setClass
* @methodOf ng.$animate
* @function
* @description Adds and/or removes the given CSS classes to and from the element.
* Once complete, the done() callback will be fired (if provided).
* @param {jQuery/jqLite element} element the element which will it's CSS classes changed
* removed from it
* @param {string} add the CSS classes which will be added to the element
* @param {string} remove the CSS class which will be removed from the element
* @param {function=} done the callback function (if provided) that will be fired after the
* CSS classes have been set on the element
*/
setClass
:
function
(
element
,
add
,
remove
,
done
)
{
forEach
(
element
,
function
(
element
)
{
jqLiteAddClass
(
element
,
add
);
jqLiteRemoveClass
(
element
,
remove
);
});
done
&&
$timeout
(
done
,
0
,
false
);
},
enabled
:
noop
};
}];
...
...
@@ -5199,7 +5232,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
var
hasDirectives
=
{},
Suffix
=
'
Directive
'
,
COMMENT_DIRECTIVE_REGEXP
=
/^
\s
*directive
\:\s
*
([\d\w\-
_
]
+
)\s
+
(
.*
)
$/
,
CLASS_DIRECTIVE_REGEXP
=
/
(([\d\w\-
_
]
+
)(?:\:([^
;
]
+
))?
;
?)
/
;
CLASS_DIRECTIVE_REGEXP
=
/
(([\d\w\-
_
]
+
)(?:\:([^
;
]
+
))?
;
?)
/
,
TABLE_CONTENT_REGEXP
=
/^<
\s
*
(
tr|th|td|tbody
)(\s
+
[^
>
]
*
)?
>/i
;
// Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes
// The assumption is that future DOM event attribute names will begin with
...
...
@@ -5386,8 +5420,16 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
* @param {string} oldClasses The former CSS className value
*/
$updateClass
:
function
(
newClasses
,
oldClasses
)
{
this
.
$removeClass
(
tokenDifference
(
oldClasses
,
newClasses
));
this
.
$addClass
(
tokenDifference
(
newClasses
,
oldClasses
));
var
toAdd
=
tokenDifference
(
newClasses
,
oldClasses
);
var
toRemove
=
tokenDifference
(
oldClasses
,
newClasses
);
if
(
toAdd
.
length
===
0
)
{
$animate
.
removeClass
(
this
.
$$element
,
toRemove
);
}
else
if
(
toRemove
.
length
===
0
)
{
$animate
.
addClass
(
this
.
$$element
,
toAdd
);
}
else
{
$animate
.
setClass
(
this
.
$$element
,
toAdd
,
toRemove
);
}
},
/**
...
...
@@ -5839,7 +5881,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
templateDirective
=
previousCompileContext
.
templateDirective
,
nonTlbTranscludeDirective
=
previousCompileContext
.
nonTlbTranscludeDirective
,
hasTranscludeDirective
=
false
,
hasElementTranscludeDirective
=
fals
e
,
hasElementTranscludeDirective
=
previousCompileContext
.
hasElementTranscludeDirectiv
e
,
$compileNode
=
templateAttrs
.
$$element
=
jqLite
(
compileNode
),
directive
,
directiveName
,
...
...
@@ -5940,9 +5982,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
if
(
directive
.
replace
)
{
replaceDirective
=
directive
;
$template
=
jqLite
(
'
<div>
'
+
trim
(
directiveValue
)
+
'
</div>
'
).
contents
();
$template
=
directiveTemplateContents
(
directiveValue
);
compileNode
=
$template
[
0
];
if
(
$template
.
length
!=
1
||
compileNode
.
nodeType
!==
1
)
{
...
...
@@ -6013,6 +6053,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
nodeLinkFn
.
scope
=
newScopeDirective
&&
newScopeDirective
.
scope
===
true
;
nodeLinkFn
.
transclude
=
hasTranscludeDirective
&&
childTranscludeFn
;
previousCompileContext
.
hasElementTranscludeDirective
=
hasElementTranscludeDirective
;
// might be normal or delayed nodeLinkFn depending on if templateUrl is present
return
nodeLinkFn
;
...
...
@@ -6340,6 +6381,28 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
function
directiveTemplateContents
(
template
)
{
var
type
;
template
=
trim
(
template
);
if
((
type
=
TABLE_CONTENT_REGEXP
.
exec
(
template
)))
{
type
=
type
[
1
].
toLowerCase
();
var
table
=
jqLite
(
'
<table>
'
+
template
+
'
</table>
'
),
tbody
=
table
.
children
(
'
tbody
'
),
leaf
=
/
(
td|th
)
/
.
test
(
type
)
&&
table
.
find
(
'
tr
'
);
if
(
tbody
.
length
&&
type
!==
'
tbody
'
)
{
table
=
tbody
;
}
if
(
leaf
&&
leaf
.
length
)
{
table
=
leaf
;
}
return
table
.
contents
();
}
return
jqLite
(
'
<div>
'
+
template
+
'
</div>
'
).
contents
();
}
function
compileTemplateUrl
(
directives
,
$compileNode
,
tAttrs
,
$rootElement
,
childTranscludeFn
,
preLinkFns
,
postLinkFns
,
previousCompileContext
)
{
var
linkQueue
=
[],
...
...
@@ -6364,7 +6427,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
content
=
denormalizeTemplate
(
content
);
if
(
origAsyncDirective
.
replace
)
{
$template
=
jqLite
(
'
<div>
'
+
trim
(
content
)
+
'
</div>
'
).
contents
(
);
$template
=
directiveTemplateContents
(
content
);
compileNode
=
$template
[
0
];
if
(
$template
.
length
!=
1
||
compileNode
.
nodeType
!==
1
)
{
...
...
@@ -6409,8 +6472,13 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
if
(
beforeTemplateLinkNode
!==
beforeTemplateCompileNode
)
{
var
oldClasses
=
beforeTemplateLinkNode
.
className
;
// it was cloned therefore we have to clone as well.
linkNode
=
jqLiteClone
(
compileNode
);
if
(
!
(
previousCompileContext
.
hasElementTranscludeDirective
&&
origAsyncDirective
.
replace
))
{
// it was cloned therefore we have to clone as well.
linkNode
=
jqLiteClone
(
compileNode
);
}
replaceWith
(
linkRootElement
,
jqLite
(
beforeTemplateLinkNode
),
linkNode
);
// Copy in CSS classes from original node
...
...
@@ -8000,7 +8068,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
// WebKit added support for the json responseType value on 09/03/2013
// https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are
// known to throw when setting the value "json" as the response type. Other older
// browsers implementing the responseType
// browsers implementing the responseType
//
// The json response type can be ignored if not supported, because JSON payloads are
// parsed on the client-side regardless.
...
...
@@ -8302,7 +8370,7 @@ function $InterpolateProvider() {
* @description
* Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
*
* Use {@link ng.$interpolateProvider#endSymbol $interpolateProvider#endSymbol} to change
* Use {@link ng.$interpolateProvider#
methods_
endSymbol $interpolateProvider#endSymbol} to change
* the symbol.
*
* @returns {string} start symbol.
...
...
@@ -9146,7 +9214,7 @@ function $LocationProvider(){
* @eventType broadcast on root scope
* @description
* Broadcasted before a URL will change. This change can be prevented by calling
* `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more
* `preventDefault` method of the event. See {@link ng.$rootScope.Scope#
methods_
$on} for more
* details about event object. Upon successful change
* {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired.
*
...
...
@@ -14066,6 +14134,15 @@ function filterFilter() {
};
}
else
{
comparator
=
function
(
obj
,
text
)
{
if
(
obj
&&
text
&&
typeof
obj
===
'
object
'
&&
typeof
text
===
'
object
'
)
{
for
(
var
objKey
in
obj
)
{
if
(
objKey
.
charAt
(
0
)
!==
'
$
'
&&
hasOwnProperty
.
call
(
obj
,
objKey
)
&&
comparator
(
obj
[
objKey
],
text
[
objKey
]))
{
return
true
;
}
}
return
false
;
}
text
=
(
''
+
text
).
toLowerCase
();
return
(
''
+
obj
).
toLowerCase
().
indexOf
(
text
)
>
-
1
;
};
...
...
@@ -14180,7 +14257,8 @@ function filterFilter() {
return;
}
element(by.model('amount')).clear();
element(by.model('amount')).sendKeys('-1234'); expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');
element(by.model('amount')).sendKeys('-1234');
expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');
expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('(USD$1,234.00)');
});
</doc:protractor>
...
...
@@ -15962,7 +16040,7 @@ var inputType = {
var text = element(by.binding('text'));
var valid = element(by.binding('myForm.input.$valid'));
var input = element(by.model('text'));
it('should initialize to model', function() {
expect(text.getText()).toContain('me@example.com');
expect(valid.getText()).toContain('true');
...
...
@@ -16076,7 +16154,7 @@ var inputType = {
expect(value1.getText()).toContain('true');
expect(value2.getText()).toContain('YES');
element(by.model('value1')).click();
element(by.model('value2')).click();
...
...
@@ -16091,7 +16169,8 @@ var inputType = {
'
hidden
'
:
noop
,
'
button
'
:
noop
,
'
submit
'
:
noop
,
'
reset
'
:
noop
'
reset
'
:
noop
,
'
file
'
:
noop
};
// A helper function to call $setValidity and return the value / undefined,
...
...
@@ -16114,6 +16193,7 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
element
.
on
(
'
compositionend
'
,
function
()
{
composing
=
false
;
listener
();
});
}
...
...
@@ -16689,6 +16769,9 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
* You can override this for input directives whose concept of being empty is different to the
* default. The `checkboxInputType` directive does this because in its case a value of `false`
* implies empty.
*
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is empty.
*/
this
.
$isEmpty
=
function
(
value
)
{
return
isUndefined
(
value
)
||
value
===
''
||
value
===
null
||
value
!==
value
;
...
...
@@ -18250,8 +18333,8 @@ forEach(
* Enables binding angular expressions to onsubmit events.
*
* Additionally it prevents the default action (which for form means sending the request to the
* server and reloading the current page)
**but only if the form does not contain an `action`
*
attribute**
.
* server and reloading the current page)
, but only if the form does not contain `action`,
*
`data-action`, or `x-action` attributes
.
*
* @element form
* @priority 0
...
...
@@ -20076,23 +20159,16 @@ var ngSwitchDefaultDirective = ngDirective({
*
*/
var
ngTranscludeDirective
=
ngDirective
({
controller
:
[
'
$element
'
,
'
$transclude
'
,
function
(
$element
,
$transclude
)
{
link
:
function
(
$scope
,
$element
,
$attrs
,
controller
,
$transclude
)
{
if
(
!
$transclude
)
{
throw
minErr
(
'
ngTransclude
'
)(
'
orphan
'
,
'
Illegal use of ngTransclude directive in the template!
'
+
'
No parent directive that requires a transclusion found.
'
+
'
Element: {0}
'
,
startingTag
(
$element
));
'
Illegal use of ngTransclude directive in the template!
'
+
'
No parent directive that requires a transclusion found.
'
+
'
Element: {0}
'
,
startingTag
(
$element
));
}
// remember the transclusion fn but call it during linking so that we don't process transclusion before directives on
// the parent element even when the transclusion replaces the current element. (we can't use priority here because
// that applies only to compile fns and not controllers
this
.
$transclude
=
$transclude
;
}],
link
:
function
(
$scope
,
$element
,
$attrs
,
controller
)
{
controller
.
$transclude
(
function
(
clone
)
{
$transclude
(
function
(
clone
)
{
$element
.
empty
();
$element
.
append
(
clone
);
});
...
...
@@ -20795,4 +20871,4 @@ var styleDirective = valueFn({
})(
window
,
document
);
!
angular
.
$$csp
()
&&
angular
.
element
(
document
).
find
(
'
head
'
).
prepend
(
'
<style type="text/css">@charset "UTF-8";[ng
\\
:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng
\\
:form{display:block;}</style>
'
);
\ No newline at end of file
!
angular
.
$$csp
()
&&
angular
.
element
(
document
).
find
(
'
head
'
).
prepend
(
'
<style type="text/css">@charset "UTF-8";[ng
\\
:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng
\\
:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}</style>
'
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment