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
2b680e1f
Commit
2b680e1f
authored
Jun 01, 2013
by
Stephen Sawchuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maria uses bower for all dependencies.
parent
c18448ee
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
172 additions
and
208 deletions
+172
-208
architecture-examples/maria/bower.json
architecture-examples/maria/bower.json
+3
-1
architecture-examples/maria/bower_components/aristocrat-bower/aristocrat.js
...les/maria/bower_components/aristocrat-bower/aristocrat.js
+2
-2
architecture-examples/maria/bower_components/maria-bower/maria.js
...ture-examples/maria/bower_components/maria-bower/maria.js
+143
-195
architecture-examples/maria/index.html
architecture-examples/maria/index.html
+2
-2
architecture-examples/maria/js/models/TodosModel.js
architecture-examples/maria/js/models/TodosModel.js
+21
-7
architecture-examples/maria/js/views/TodosView.js
architecture-examples/maria/js/views/TodosView.js
+1
-1
No files found.
architecture-examples/maria/bower.json
View file @
2b680e1f
...
...
@@ -3,6 +3,8 @@
"version"
:
"0.0.0"
,
"dependencies"
:
{
"todomvc-common"
:
"~0.1.4"
,
"director"
:
"~1.2.0"
"director"
:
"~1.2.0"
,
"maria-bower"
:
"~1.0.0"
,
"aristocrat-bower"
:
"~1.0.1"
}
}
architecture-examples/maria/
lib/aristocrat
/aristocrat.js
→
architecture-examples/maria/
bower_components/aristocrat-bower
/aristocrat.js
View file @
2b680e1f
/*
Aristocrat version
2
Aristocrat version
1.0.1
Copyright (c) 2012, Peter Michaux
All rights reserved.
Licensed under the Simplified BSD License.
...
...
@@ -78,7 +78,7 @@ aristocrat.removeClass(document.body, 'king');
var
re
=
getRegExp
(
className
);
while
(
re
.
test
(
el
.
className
))
{
// in case multiple occurrences
el
.
className
=
el
.
className
.
replace
(
re
,
'
'
);
}
}
};
/**
...
...
architecture-examples/maria/
lib/maria
/maria.js
→
architecture-examples/maria/
bower_components/maria-bower
/maria.js
View file @
2b680e1f
This diff is collapsed.
Click to expand it.
architecture-examples/maria/index.html
View file @
2b680e1f
...
...
@@ -15,8 +15,8 @@
<script
src=
"bower_components/todomvc-common/base.js"
></script>
<script
src=
"bower_components/director/build/director.js"
></script>
<script
src=
"
lib/maria
/maria.js"
></script>
<script
src=
"
lib/aristocrat
/aristocrat.js"
></script>
<script
src=
"
bower_components/maria-bower
/maria.js"
></script>
<script
src=
"
bower_components/aristocrat-bower
/aristocrat.js"
></script>
<script
src=
"js/namespace.js"
></script>
<script
src=
"js/util.js"
></script>
...
...
architecture-examples/maria/js/models/TodosModel.js
View file @
2b680e1f
...
...
@@ -30,19 +30,31 @@ maria.SetModel.subclass(checkit, 'TodosModel', {
},
getCompleted
:
function
()
{
return
this
.
filter
(
function
(
todo
)
{
return
todo
.
isCompleted
();
var
completeTodos
=
[];
this
.
forEach
(
function
(
todo
)
{
if
(
todo
.
isCompleted
())
{
completeTodos
.
push
(
todo
);
}
});
return
completeTodos
;
},
getIncompleted
:
function
()
{
return
this
.
filter
(
function
(
todo
)
{
return
!
todo
.
isCompleted
();
var
incompleteTodos
=
[];
this
.
forEach
(
function
(
todo
)
{
if
(
!
todo
.
isCompleted
())
{
incompleteTodos
.
push
(
todo
);
}
});
return
incompleteTodos
;
},
isAllCompleted
:
function
()
{
return
(
this
.
length
>
0
)
&&
(
this
.
getCompleted
().
length
===
this
.
length
);
return
(
this
.
size
>
0
)
&&
(
this
.
getCompleted
().
length
===
this
.
size
);
},
isEmpty
:
function
()
{
return
this
.
size
===
0
;
},
markAllCompleted
:
function
()
{
...
...
@@ -62,9 +74,11 @@ maria.SetModel.subclass(checkit, 'TodosModel', {
},
toJSON
:
function
()
{
return
this
.
map
(
function
(
todo
)
{
return
todo
.
toJSON
();
var
todoJSON
=
[];
this
.
forEach
(
function
(
todo
)
{
todoJSON
.
push
(
todo
.
toJSON
());
});
return
todoJSON
;
}
}
});
...
...
architecture-examples/maria/js/views/TodosView.js
View file @
2b680e1f
...
...
@@ -12,7 +12,7 @@ maria.SetView.subclass(checkit, 'TodosAppView', {
buildData
:
function
()
{
var
model
=
this
.
getModel
();
var
length
=
model
.
length
;
var
length
=
model
.
size
;
this
.
find
(
'
#main
'
).
style
.
display
=
(
length
>
0
)
?
''
:
'
none
'
;
this
.
find
(
'
#footer
'
).
style
.
display
=
(
length
>
0
)
?
''
:
'
none
'
;
...
...
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