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
c18448ee
Commit
c18448ee
authored
May 31, 2013
by
Stephen Sawchuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
closes #584 - backbone_marionette footer issues.
parent
ff32a65f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
11 deletions
+15
-11
labs/architecture-examples/backbone_marionette/.jshintignore
labs/architecture-examples/backbone_marionette/.jshintignore
+0
-1
labs/architecture-examples/backbone_marionette/index.html
labs/architecture-examples/backbone_marionette/index.html
+6
-2
labs/architecture-examples/backbone_marionette/js/TodoMVC.Layout.js
...tecture-examples/backbone_marionette/js/TodoMVC.Layout.js
+8
-7
labs/architecture-examples/backbone_marionette/js/TodoMVC.TodoList.Views.js
...examples/backbone_marionette/js/TodoMVC.TodoList.Views.js
+1
-1
No files found.
labs/architecture-examples/backbone_marionette/.jshintignore
deleted
100644 → 0
View file @
ff32a65f
js/lib
labs/architecture-examples/backbone_marionette/index.html
View file @
c18448ee
...
...
@@ -23,7 +23,9 @@
<p>
Further variations on the Backbone.Marionette app are also
<a
href=
"https://github.com/marionettejs/backbone.marionette/wiki/Projects-and-websites-using-marionette"
>
available
</a>
.
</p>
</footer>
<script
type=
"text/html"
id=
"template-footer"
>
<
span
id
=
"
todo-count
"
><
strong
><
/strong><span></
span
><
/span
>
<
span
id
=
"
todo-count
"
>
<
strong
><%=
activeCount
%><
/strong> <%= activeCountLabel
()
%
>
<
/span
>
<
ul
id
=
"
filters
"
>
<
li
>
<
a
href
=
"
#
"
>
All
<
/a
>
...
...
@@ -35,7 +37,9 @@
<
a
href
=
"
#completed
"
>
Completed
<
/a
>
<
/li
>
<
/ul
>
<
button
id
=
"
clear-completed
"
><
/button
>
<
button
id
=
"
clear-completed
"
<%
if
(
!
completedCount
)
{
%>
class
=
"
hidden
"
<%
}
%>>
Clear
completed
(
<%=
completedCount
%>
)
<
/button
>
</script>
<script
type=
"text/html"
id=
"template-header"
>
<
h1
>
todos
<
/h1
>
...
...
labs/architecture-examples/backbone_marionette/js/TodoMVC.Layout.js
View file @
c18448ee
...
...
@@ -50,7 +50,7 @@ TodoMVC.module('Layout', function (Layout, App, Backbone) {
},
templateHelpers
:
{
activeCountLabel
:
function
()
{
activeCountLabel
:
function
()
{
return
(
this
.
activeCount
===
1
?
'
item
'
:
'
items
'
)
+
'
left
'
;
}
},
...
...
@@ -59,25 +59,26 @@ TodoMVC.module('Layout', function (Layout, App, Backbone) {
this
.
listenTo
(
App
.
vent
,
'
todoList:filter
'
,
this
.
updateFilterSelection
,
this
);
},
serializeData
:
function
()
{
serializeData
:
function
()
{
var
active
=
this
.
collection
.
getActive
().
length
;
var
total
=
this
.
collection
.
length
;
return
{
activeCount
:
active
,
totalCount
:
total
,
completedCount
:
total
-
active
activeCount
:
active
,
totalCount
:
total
,
completedCount
:
total
-
active
};
},
onRender
:
function
()
{
this
.
$el
.
parent
().
toggle
(
this
.
collection
.
length
>
0
);
this
.
updateFilterSelection
();
},
updateFilterSelection
:
function
(
filter
)
{
updateFilterSelection
:
function
()
{
this
.
ui
.
filters
.
removeClass
(
'
selected
'
)
.
filter
(
'
[href="
#
'
+
filter
+
'
"]
'
)
.
filter
(
'
[href="
'
+
(
location
.
hash
||
'
#
'
)
+
'
"]
'
)
.
addClass
(
'
selected
'
);
},
...
...
labs/architecture-examples/backbone_marionette/js/TodoMVC.TodoList.Views.js
View file @
c18448ee
...
...
@@ -94,7 +94,7 @@ TodoMVC.module('TodoList.Views', function (Views, App, Backbone, Marionette, $)
},
collectionEvents
:
{
'
all
'
:
'
update
'
'
all
'
:
'
update
'
},
onRender
:
function
()
{
...
...
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