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
2e3e07ea
Commit
2e3e07ea
authored
Sep 28, 2015
by
TasteBot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update the build files for gh-pages [ci skip]
parent
32347d3c
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
231 additions
and
82 deletions
+231
-82
examples/mithril/js/models/todo.js
examples/mithril/js/models/todo.js
+8
-0
examples/mithril/js/views/main-view.js
examples/mithril/js/views/main-view.js
+2
-1
examples/mithril/node_modules/mithril/mithril.js
examples/mithril/node_modules/mithril/mithril.js
+212
-77
examples/mithril/node_modules/todomvc-common/base.js
examples/mithril/node_modules/todomvc-common/base.js
+7
-2
examples/mithril/package.json
examples/mithril/package.json
+2
-2
No files found.
examples/mithril/js/models/todo.js
View file @
2e3e07ea
...
...
@@ -2,9 +2,17 @@
/*global m */
var
app
=
app
||
{};
var
uniqueId
=
(
function
()
{
var
count
=
0
;
return
function
()
{
return
++
count
;
};
}());
// Todo Model
app
.
Todo
=
function
(
data
)
{
this
.
title
=
m
.
prop
(
data
.
title
);
this
.
completed
=
m
.
prop
(
data
.
completed
||
false
);
this
.
editing
=
m
.
prop
(
data
.
editing
||
false
);
this
.
key
=
uniqueId
();
};
examples/mithril/js/views/main-view.js
View file @
2e3e07ea
...
...
@@ -51,7 +51,8 @@ app.view = (function () {
classes
+=
task
.
completed
()
?
'
completed
'
:
''
;
classes
+=
task
.
editing
()
?
'
editing
'
:
''
;
return
classes
;
})()
})(),
key
:
task
.
key
},
[
m
(
'
.view
'
,
[
m
(
'
input.toggle[type=checkbox]
'
,
{
...
...
examples/mithril/node_modules/mithril/mithril.js
View file @
2e3e07ea
This diff is collapsed.
Click to expand it.
examples/mithril/node_modules/todomvc-common/base.js
View file @
2e3e07ea
...
...
@@ -114,7 +114,12 @@
})({});
if
(
location
.
hostname
===
'
todomvc.com
'
)
{
window
.
_gaq
=
[[
'
_setAccount
'
,
'
UA-31081062-1
'
],[
'
_trackPageview
'
]];(
function
(
d
,
t
){
var
g
=
d
.
createElement
(
t
),
s
=
d
.
getElementsByTagName
(
t
)[
0
];
g
.
src
=
'
//www.google-analytics.com/ga.js
'
;
s
.
parentNode
.
insertBefore
(
g
,
s
)}(
document
,
'
script
'
));
(
function
(
i
,
s
,
o
,
g
,
r
,
a
,
m
){
i
[
'
GoogleAnalyticsObject
'
]
=
r
;
i
[
r
]
=
i
[
r
]
||
function
(){
(
i
[
r
].
q
=
i
[
r
].
q
||
[]).
push
(
arguments
)},
i
[
r
].
l
=
1
*
new
Date
();
a
=
s
.
createElement
(
o
),
m
=
s
.
getElementsByTagName
(
o
)[
0
];
a
.
async
=
1
;
a
.
src
=
g
;
m
.
parentNode
.
insertBefore
(
a
,
m
)
})(
window
,
document
,
'
script
'
,
'
https://www.google-analytics.com/analytics.js
'
,
'
ga
'
);
ga
(
'
create
'
,
'
UA-31081062-1
'
,
'
auto
'
);
ga
(
'
send
'
,
'
pageview
'
);
}
/* jshint ignore:end */
...
...
@@ -228,7 +233,7 @@
xhr
.
onload
=
function
(
e
)
{
var
parsedResponse
=
JSON
.
parse
(
e
.
target
.
responseText
);
if
(
parsedResponse
instanceof
Array
)
{
var
count
=
parsedResponse
.
length
var
count
=
parsedResponse
.
length
;
if
(
count
!==
0
)
{
issueLink
.
innerHTML
=
'
This app has
'
+
count
+
'
open issues
'
;
document
.
getElementById
(
'
issue-count
'
).
style
.
display
=
'
inline
'
;
...
...
examples/mithril/package.json
View file @
2e3e07ea
{
"private"
:
true
,
"dependencies"
:
{
"mithril"
:
"^0.1.20"
,
"todomvc-common"
:
"^1.0.1"
,
"todomvc-app-css"
:
"^1.0.1"
"todomvc-app-css"
:
"^1.0.1"
,
"mithril"
:
"~0.2.0"
}
}
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