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
Sven Franck
todomvc
Commits
7f9bd8d4
Commit
7f9bd8d4
authored
Aug 30, 2015
by
Stephen McKamey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applying jscs lint suggestions.
parent
3f420ea0
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
33 deletions
+31
-33
examples/duel/src/main/resources/views/Stats.duel
examples/duel/src/main/resources/views/Stats.duel
+1
-1
examples/duel/src/main/resources/views/Task.duel
examples/duel/src/main/resources/views/Task.duel
+5
-5
examples/duel/src/main/resources/views/Tasks.duel
examples/duel/src/main/resources/views/Tasks.duel
+1
-1
examples/duel/src/main/resources/views/TodoApp.duel
examples/duel/src/main/resources/views/TodoApp.duel
+1
-1
examples/duel/src/main/webapp/js/todos/controller.js
examples/duel/src/main/webapp/js/todos/controller.js
+15
-17
examples/duel/www/cdn/41614acbac7a243d667ca7ec317c4d0c81ca1d7d.js
.../duel/www/cdn/41614acbac7a243d667ca7ec317c4d0c81ca1d7d.js
+7
-7
examples/duel/www/index.html
examples/duel/www/index.html
+1
-1
No files found.
examples/duel/src/main/resources/views/Stats.duel
View file @
7f9bd8d4
...
@@ -19,5 +19,5 @@
...
@@ -19,5 +19,5 @@
<!-- Hidden if no completed items are left ↓ -->
<!-- Hidden if no completed items are left ↓ -->
<button class="clear-completed"
<button class="clear-completed"
if="<%= data.completed %>"
if="<%= data.completed %>"
onclick="<%= todos.actions.clear
_c
lick %>">Clear completed</button>
onclick="<%= todos.actions.clear
OnC
lick %>">Clear completed</button>
</footer>
</footer>
examples/duel/src/main/resources/views/Task.duel
View file @
7f9bd8d4
...
@@ -4,11 +4,11 @@
...
@@ -4,11 +4,11 @@
<li class="<%= data.completed ? 'completed' : '' %>">
<li class="<%= data.completed ? 'completed' : '' %>">
<div class="view">
<div class="view">
<input class="toggle" type="checkbox" checked="<%= data.completed %>"
<input class="toggle" type="checkbox" checked="<%= data.completed %>"
onchange="<%= todos.actions.completed
_c
hange(data.id) %>">
onchange="<%= todos.actions.completed
OnC
hange(data.id) %>">
<label ondblclick="<%= todos.actions.
content_d
blclick %>"><%= data.title %></label>
<label ondblclick="<%= todos.actions.
editOnD
blclick %>"><%= data.title %></label>
<button class="destroy" onclick="<%= todos.actions.remove
_c
lick(data.id) %>"></button>
<button class="destroy" onclick="<%= todos.actions.remove
OnC
lick(data.id) %>"></button>
</div>
</div>
<input class="edit" type="text" value="<%= data.title %>"
<input class="edit" type="text" value="<%= data.title %>"
onblur="<%= todos.actions.edit
_b
lur(data.id) %>"
onblur="<%= todos.actions.edit
OnB
lur(data.id) %>"
onkeydown="<%= todos.actions.edit
_keypress
(data.id) %>">
onkeydown="<%= todos.actions.edit
OnKeydown
(data.id) %>">
</li>
</li>
examples/duel/src/main/resources/views/Tasks.duel
View file @
7f9bd8d4
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<%-- This section should be hidden by default and shown when there are todos. --%>
<%-- This section should be hidden by default and shown when there are todos. --%>
<section class="main" if="<%= data.tasks && data.tasks.length %>">
<section class="main" if="<%= data.tasks && data.tasks.length %>">
<input class="toggle-all" type="checkbox" checked="<%= !data.stats.active %>"
<input class="toggle-all" type="checkbox" checked="<%= !data.stats.active %>"
onchange="<%= todos.actions.toggle
_c
hange %>">
onchange="<%= todos.actions.toggle
OnC
hange %>">
<label for="toggle-all">Mark all as complete</label>
<label for="toggle-all">Mark all as complete</label>
<ul class="todo-list">
<ul class="todo-list">
<for each="<%= data.tasks %>">
<for each="<%= data.tasks %>">
...
...
examples/duel/src/main/resources/views/TodoApp.duel
View file @
7f9bd8d4
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<header class="header">
<header class="header">
<h1>todos</h1>
<h1>todos</h1>
<input class="new-todo" placeholder="What needs to be done?" autofocus
<input class="new-todo" placeholder="What needs to be done?" autofocus
onblur="<%= todos.actions.add_blur %>" onkeydown="<%= todos.actions.add
_keypress
%>">
onblur="<%= todos.actions.add_blur %>" onkeydown="<%= todos.actions.add
OnKeydown
%>">
</header>
</header>
<call view="Tasks" data="data" />
<call view="Tasks" data="data" />
<call view="Stats" data="data.stats" />
<call view="Stats" data="data.stats" />
...
...
examples/duel/src/main/webapp/js/todos/controller.js
View file @
7f9bd8d4
...
@@ -71,7 +71,7 @@ var todos = todos || {};
...
@@ -71,7 +71,7 @@ var todos = todos || {};
// event handlers
// event handlers
todos
.
actions
=
{
todos
.
actions
=
{
add
_keypress
:
function
(
e
)
{
add
OnKeydown
:
function
(
e
)
{
if
(
e
.
keyCode
===
ENTER_KEY
)
{
if
(
e
.
keyCode
===
ENTER_KEY
)
{
add
(
this
);
add
(
this
);
}
else
if
(
e
.
keyCode
===
ESC_KEY
)
{
}
else
if
(
e
.
keyCode
===
ESC_KEY
)
{
...
@@ -79,14 +79,14 @@ var todos = todos || {};
...
@@ -79,14 +79,14 @@ var todos = todos || {};
}
}
},
},
edit
_b
lur
:
function
(
id
)
{
edit
OnB
lur
:
function
(
id
)
{
// create a closure around the ID
// create a closure around the ID
return
function
()
{
return
function
()
{
edit
(
this
,
id
);
edit
(
this
,
id
);
};
};
},
},
edit
_keypress
:
function
(
id
)
{
edit
OnKeydown
:
function
(
id
)
{
// create a closure around the ID
// create a closure around the ID
return
function
(
e
)
{
return
function
(
e
)
{
if
(
e
.
keyCode
===
ENTER_KEY
)
{
if
(
e
.
keyCode
===
ENTER_KEY
)
{
...
@@ -99,7 +99,7 @@ var todos = todos || {};
...
@@ -99,7 +99,7 @@ var todos = todos || {};
};
};
},
},
remove
_c
lick
:
function
(
id
)
{
remove
OnC
lick
:
function
(
id
)
{
// create a closure around the ID
// create a closure around the ID
return
function
()
{
return
function
()
{
todos
.
model
.
remove
(
id
);
todos
.
model
.
remove
(
id
);
...
@@ -107,37 +107,35 @@ var todos = todos || {};
...
@@ -107,37 +107,35 @@ var todos = todos || {};
};
};
},
},
clear
_c
lick
:
function
()
{
clear
OnC
lick
:
function
()
{
todos
.
model
.
expunge
();
todos
.
model
.
expunge
();
refreshView
();
refreshView
();
},
},
content_d
blclick
:
function
()
{
editOnD
blclick
:
function
()
{
var
li
=
this
;
var
self
=
this
;
while
(
li
.
tagName
!==
'
LI
'
)
{
while
(
self
.
tagName
!==
'
LI
'
)
{
li
=
li
.
parentNode
;
self
=
self
.
parentNode
;
}
}
li
.
className
=
'
editing
'
;
self
.
className
=
'
editing
'
;
var
input
=
find
(
'
input[type=text]
'
,
li
);
var
input
=
find
(
'
input[type=text]
'
,
self
);
if
(
input
)
{
if
(
input
)
{
input
.
focus
();
input
.
focus
();
}
}
},
},
completed
_c
hange
:
function
(
id
)
{
completed
OnC
hange
:
function
(
id
)
{
// create a closure around the ID
// create a closure around the ID
return
function
()
{
return
function
()
{
var
checkbox
=
this
;
todos
.
model
.
toggle
(
id
,
this
.
checked
);
todos
.
model
.
toggle
(
id
,
checkbox
.
checked
);
refreshView
();
refreshView
();
};
};
},
},
toggle_change
:
function
()
{
toggleOnChange
:
function
()
{
var
checkbox
=
this
;
todos
.
model
.
toggleAll
(
this
.
checked
);
todos
.
model
.
toggleAll
(
checkbox
.
checked
);
refreshView
();
refreshView
();
}
}
};
};
...
...
examples/duel/www/cdn/
0246d47e943708b571e47bd968ef697d343ae178
.js
→
examples/duel/www/cdn/
41614acbac7a243d667ca7ec317c4d0c81ca1d7d
.js
View file @
7f9bd8d4
This diff is collapsed.
Click to expand it.
examples/duel/www/index.html
View file @
7f9bd8d4
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<p>
Ported to
<a
href=
"http://duelengine.org"
>
DUEL
</a>
by
<a
href=
"http://mck.me"
>
Stephen McKamey
</a></p>
<p>
Ported to
<a
href=
"http://duelengine.org"
>
DUEL
</a>
by
<a
href=
"http://mck.me"
>
Stephen McKamey
</a></p>
<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=
"./cdn/
0246d47e943708b571e47bd968ef697d343ae178
.js"
></script>
<script
src=
"./cdn/
41614acbac7a243d667ca7ec317c4d0c81ca1d7d
.js"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
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