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
Hide 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 @@
"version"
:
"0.0.0"
,
"dependencies"
:
{
"todomvc-common"
:
"~0.1.4"
,
"
knockout.js"
:
"~3.0
.0"
,
"
component-knockout-passy"
:
"~3.1
.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).
// Version 1.
1.9
// Generated on
Fri Dec 27 2013 12:02:11
GMT-0500 (EST) by Nodejitsu, Inc (Using Codesurgeon).
// Version 1.
2.2
//
(
function
(
exports
)
{
/*
* browser.js: Browser specific functionality for director.
*
...
...
@@ -201,7 +200,7 @@ Router.prototype.init = function (r) {
this
.
handler
=
function
(
onChangeEvent
)
{
var
newURL
=
onChangeEvent
&&
onChangeEvent
.
newURL
||
window
.
location
.
hash
;
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
);
...
...
@@ -210,7 +209,7 @@ Router.prototype.init = function (r) {
if
(
dlocHashEmpty
()
&&
r
)
{
dloc
.
hash
=
r
;
}
else
if
(
!
dlocHashEmpty
())
{
self
.
dispatch
(
'
on
'
,
dloc
.
hash
.
replace
(
/^#
/
,
''
));
self
.
dispatch
(
'
on
'
,
'
/
'
+
dloc
.
hash
.
replace
(
/^
(
#
\/
|#|
\/)
/
,
''
));
}
}
else
{
...
...
@@ -363,11 +362,16 @@ function regifyString(str, params) {
out
+=
str
.
substr
(
0
,
matches
.
index
)
+
matches
[
0
];
}
str
=
out
+=
str
.
substr
(
last
);
var
captures
=
str
.
match
(
/:
([^\/]
+
)
/ig
),
length
;
var
captures
=
str
.
match
(
/:
([^\/]
+
)
/ig
),
capture
,
length
;
if
(
captures
)
{
length
=
captures
.
length
;
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
;
...
...
@@ -485,20 +489,22 @@ Router.prototype.dispatch = function(method, path, callback) {
Router
.
prototype
.
invoke
=
function
(
fns
,
thisArg
,
callback
)
{
var
self
=
this
;
var
apply
;
if
(
this
.
async
)
{
_asyncEverySeries
(
fns
,
function
apply
(
fn
,
next
)
{
apply
=
function
(
fn
,
next
)
{
if
(
Array
.
isArray
(
fn
))
{
return
_asyncEverySeries
(
fn
,
apply
,
next
);
}
else
if
(
typeof
fn
==
"
function
"
)
{
fn
.
apply
(
thisArg
,
fns
.
captures
.
concat
(
next
));
}
},
function
()
{
};
_asyncEverySeries
(
fns
,
apply
,
function
()
{
if
(
callback
)
{
callback
.
apply
(
thisArg
,
arguments
);
}
});
}
else
{
_every
(
fns
,
function
apply
(
fn
)
{
apply
=
function
(
fn
)
{
if
(
Array
.
isArray
(
fn
))
{
return
_every
(
fn
,
apply
);
}
else
if
(
typeof
fn
===
"
function
"
)
{
...
...
@@ -506,7 +512,8 @@ Router.prototype.invoke = function(fns, thisArg, callback) {
}
else
if
(
typeof
fn
===
"
string
"
&&
self
.
resource
)
{
self
.
resource
[
fn
].
apply
(
thisArg
,
fns
.
captures
||
[]);
}
});
};
_every
(
fns
,
apply
);
}
};
...
...
@@ -686,7 +693,7 @@ Router.prototype.mount = function(routes, path) {
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
;
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
();
}
if
(
isRoute
&&
routeType
===
"
object
"
&&
!
Array
.
isArray
(
routes
[
route
]))
{
...
...
architecture-examples/knockoutjs/index.html
View file @
c5e53bc8
...
...
@@ -52,7 +52,7 @@
<p>
Part of
<a
href=
"http://todomvc.com"
>
TodoMVC
</a></p>
</footer>
<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=
"js/app.js"
></script>
</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