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
Eugene Shen
todomvc
Commits
c5e53bc8
Commit
c5e53bc8
authored
Apr 26, 2014
by
Pascal Hartig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade Knockout to v3.1.0
parent
0a50f32a
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
951 additions
and
287 deletions
+951
-287
architecture-examples/knockoutjs/bower.json
architecture-examples/knockoutjs/bower.json
+1
-1
architecture-examples/knockoutjs/bower_components/component-knockout-passy/knockout.js
...tjs/bower_components/component-knockout-passy/knockout.js
+930
-273
architecture-examples/knockoutjs/bower_components/director/build/director.js
...es/knockoutjs/bower_components/director/build/director.js
+19
-12
architecture-examples/knockoutjs/index.html
architecture-examples/knockoutjs/index.html
+1
-1
No files found.
architecture-examples/knockoutjs/bower.json
View file @
c5e53bc8
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
"version"
:
"0.0.0"
,
"version"
:
"0.0.0"
,
"dependencies"
:
{
"dependencies"
:
{
"todomvc-common"
:
"~0.1.4"
,
"todomvc-common"
:
"~0.1.4"
,
"
knockout.js"
:
"~3.0
.0"
,
"
component-knockout-passy"
:
"~3.1
.0"
,
"director"
:
"~1.2.0"
"director"
:
"~1.2.0"
}
}
}
}
architecture-examples/knockoutjs/bower_components/
knockout.js/knockout.debug
.js
→
architecture-examples/knockoutjs/bower_components/
component-knockout-passy/knockout
.js
View file @
c5e53bc8
This diff is collapsed.
Click to expand it.
architecture-examples/knockoutjs/bower_components/director/build/director.js
View file @
c5e53bc8
//
//
// Generated on
Sun Dec 16 2012 22:47:05
GMT-0500 (EST) by Nodejitsu, Inc (Using Codesurgeon).
// Generated on
Fri Dec 27 2013 12:02:11
GMT-0500 (EST) by Nodejitsu, Inc (Using Codesurgeon).
// Version 1.
1.9
// Version 1.
2.2
//
//
(
function
(
exports
)
{
(
function
(
exports
)
{
/*
/*
* browser.js: Browser specific functionality for director.
* browser.js: Browser specific functionality for director.
*
*
...
@@ -201,7 +200,7 @@ Router.prototype.init = function (r) {
...
@@ -201,7 +200,7 @@ Router.prototype.init = function (r) {
this
.
handler
=
function
(
onChangeEvent
)
{
this
.
handler
=
function
(
onChangeEvent
)
{
var
newURL
=
onChangeEvent
&&
onChangeEvent
.
newURL
||
window
.
location
.
hash
;
var
newURL
=
onChangeEvent
&&
onChangeEvent
.
newURL
||
window
.
location
.
hash
;
var
url
=
self
.
history
===
true
?
self
.
getPath
()
:
newURL
.
replace
(
/.*#/
,
''
);
var
url
=
self
.
history
===
true
?
self
.
getPath
()
:
newURL
.
replace
(
/.*#/
,
''
);
self
.
dispatch
(
'
on
'
,
url
);
self
.
dispatch
(
'
on
'
,
url
.
charAt
(
0
)
===
'
/
'
?
url
:
'
/
'
+
url
);
};
};
listener
.
init
(
this
.
handler
,
this
.
history
);
listener
.
init
(
this
.
handler
,
this
.
history
);
...
@@ -210,7 +209,7 @@ Router.prototype.init = function (r) {
...
@@ -210,7 +209,7 @@ Router.prototype.init = function (r) {
if
(
dlocHashEmpty
()
&&
r
)
{
if
(
dlocHashEmpty
()
&&
r
)
{
dloc
.
hash
=
r
;
dloc
.
hash
=
r
;
}
else
if
(
!
dlocHashEmpty
())
{
}
else
if
(
!
dlocHashEmpty
())
{
self
.
dispatch
(
'
on
'
,
dloc
.
hash
.
replace
(
/^#
/
,
''
));
self
.
dispatch
(
'
on
'
,
'
/
'
+
dloc
.
hash
.
replace
(
/^
(
#
\/
|#|
\/)
/
,
''
));
}
}
}
}
else
{
else
{
...
@@ -363,11 +362,16 @@ function regifyString(str, params) {
...
@@ -363,11 +362,16 @@ function regifyString(str, params) {
out
+=
str
.
substr
(
0
,
matches
.
index
)
+
matches
[
0
];
out
+=
str
.
substr
(
0
,
matches
.
index
)
+
matches
[
0
];
}
}
str
=
out
+=
str
.
substr
(
last
);
str
=
out
+=
str
.
substr
(
last
);
var
captures
=
str
.
match
(
/:
([^\/]
+
)
/ig
),
length
;
var
captures
=
str
.
match
(
/:
([^\/]
+
)
/ig
),
capture
,
length
;
if
(
captures
)
{
if
(
captures
)
{
length
=
captures
.
length
;
length
=
captures
.
length
;
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
str
=
str
.
replace
(
captures
[
i
],
paramifyString
(
captures
[
i
],
params
));
capture
=
captures
[
i
];
if
(
capture
.
slice
(
0
,
2
)
===
"
::
"
)
{
str
=
capture
.
slice
(
1
);
}
else
{
str
=
str
.
replace
(
capture
,
paramifyString
(
capture
,
params
));
}
}
}
}
}
return
str
;
return
str
;
...
@@ -485,20 +489,22 @@ Router.prototype.dispatch = function(method, path, callback) {
...
@@ -485,20 +489,22 @@ Router.prototype.dispatch = function(method, path, callback) {
Router
.
prototype
.
invoke
=
function
(
fns
,
thisArg
,
callback
)
{
Router
.
prototype
.
invoke
=
function
(
fns
,
thisArg
,
callback
)
{
var
self
=
this
;
var
self
=
this
;
var
apply
;
if
(
this
.
async
)
{
if
(
this
.
async
)
{
_asyncEverySeries
(
fns
,
function
apply
(
fn
,
next
)
{
apply
=
function
(
fn
,
next
)
{
if
(
Array
.
isArray
(
fn
))
{
if
(
Array
.
isArray
(
fn
))
{
return
_asyncEverySeries
(
fn
,
apply
,
next
);
return
_asyncEverySeries
(
fn
,
apply
,
next
);
}
else
if
(
typeof
fn
==
"
function
"
)
{
}
else
if
(
typeof
fn
==
"
function
"
)
{
fn
.
apply
(
thisArg
,
fns
.
captures
.
concat
(
next
));
fn
.
apply
(
thisArg
,
fns
.
captures
.
concat
(
next
));
}
}
},
function
()
{
};
_asyncEverySeries
(
fns
,
apply
,
function
()
{
if
(
callback
)
{
if
(
callback
)
{
callback
.
apply
(
thisArg
,
arguments
);
callback
.
apply
(
thisArg
,
arguments
);
}
}
});
});
}
else
{
}
else
{
_every
(
fns
,
function
apply
(
fn
)
{
apply
=
function
(
fn
)
{
if
(
Array
.
isArray
(
fn
))
{
if
(
Array
.
isArray
(
fn
))
{
return
_every
(
fn
,
apply
);
return
_every
(
fn
,
apply
);
}
else
if
(
typeof
fn
===
"
function
"
)
{
}
else
if
(
typeof
fn
===
"
function
"
)
{
...
@@ -506,7 +512,8 @@ Router.prototype.invoke = function(fns, thisArg, callback) {
...
@@ -506,7 +512,8 @@ Router.prototype.invoke = function(fns, thisArg, callback) {
}
else
if
(
typeof
fn
===
"
string
"
&&
self
.
resource
)
{
}
else
if
(
typeof
fn
===
"
string
"
&&
self
.
resource
)
{
self
.
resource
[
fn
].
apply
(
thisArg
,
fns
.
captures
||
[]);
self
.
resource
[
fn
].
apply
(
thisArg
,
fns
.
captures
||
[]);
}
}
});
};
_every
(
fns
,
apply
);
}
}
};
};
...
@@ -686,7 +693,7 @@ Router.prototype.mount = function(routes, path) {
...
@@ -686,7 +693,7 @@ Router.prototype.mount = function(routes, path) {
function
insertOrMount
(
route
,
local
)
{
function
insertOrMount
(
route
,
local
)
{
var
rename
=
route
,
parts
=
route
.
split
(
self
.
delimiter
),
routeType
=
typeof
routes
[
route
],
isRoute
=
parts
[
0
]
===
""
||
!
self
.
_methods
[
parts
[
0
]],
event
=
isRoute
?
"
on
"
:
rename
;
var
rename
=
route
,
parts
=
route
.
split
(
self
.
delimiter
),
routeType
=
typeof
routes
[
route
],
isRoute
=
parts
[
0
]
===
""
||
!
self
.
_methods
[
parts
[
0
]],
event
=
isRoute
?
"
on
"
:
rename
;
if
(
isRoute
)
{
if
(
isRoute
)
{
rename
=
rename
.
slice
((
rename
.
match
(
new
RegExp
(
self
.
delimiter
))
||
[
""
])[
0
].
length
);
rename
=
rename
.
slice
((
rename
.
match
(
new
RegExp
(
"
^
"
+
self
.
delimiter
))
||
[
""
])[
0
].
length
);
parts
.
shift
();
parts
.
shift
();
}
}
if
(
isRoute
&&
routeType
===
"
object
"
&&
!
Array
.
isArray
(
routes
[
route
]))
{
if
(
isRoute
&&
routeType
===
"
object
"
&&
!
Array
.
isArray
(
routes
[
route
]))
{
...
...
architecture-examples/knockoutjs/index.html
View file @
c5e53bc8
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<p>
Part of
<a
href=
"http://todomvc.com"
>
TodoMVC
</a></p>
<p>
Part of
<a
href=
"http://todomvc.com"
>
TodoMVC
</a></p>
</footer>
</footer>
<script
src=
"bower_components/todomvc-common/base.js"
></script>
<script
src=
"bower_components/todomvc-common/base.js"
></script>
<script
src=
"bower_components/
knockout.js/knockout.debug
.js"
></script>
<script
src=
"bower_components/
component-knockout-passy/knockout
.js"
></script>
<script
src=
"bower_components/director/build/director.js"
></script>
<script
src=
"bower_components/director/build/director.js"
></script>
<script
src=
"js/app.js"
></script>
<script
src=
"js/app.js"
></script>
</body>
</body>
...
...
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