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
41fbc7c5
Commit
41fbc7c5
authored
Sep 13, 2017
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename and structure files
parent
511c391f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
4638 additions
and
24 deletions
+4638
-24
examples/renderjs/gadget_model.html
examples/renderjs/gadget_model.html
+4
-4
examples/renderjs/gadget_router.html
examples/renderjs/gadget_router.html
+3
-3
examples/renderjs/gadget_todo.js
examples/renderjs/gadget_todo.js
+11
-12
examples/renderjs/index.html
examples/renderjs/index.html
+5
-5
examples/renderjs/lib/handlebars.js
examples/renderjs/lib/handlebars.js
+4608
-0
examples/renderjs/lib/jio.js
examples/renderjs/lib/jio.js
+0
-0
examples/renderjs/lib/renderjs.js
examples/renderjs/lib/renderjs.js
+0
-0
examples/renderjs/lib/rsvp.js
examples/renderjs/lib/rsvp.js
+0
-0
examples/renderjs/package.json
examples/renderjs/package.json
+7
-0
No files found.
examples/renderjs/gadget_model.html
View file @
41fbc7c5
...
...
@@ -2,11 +2,11 @@
<html>
<head>
<title>
Model Gadget
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"jio.js"
></script>
<script
src=
"
lib/
rsvp.js"
></script>
<script
src=
"
lib/
renderjs.js"
></script>
<script
src=
"
lib/
jio.js"
></script>
<script
src=
"gadget_model.js"
></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
</html>
examples/renderjs/gadget_router.html
View file @
41fbc7c5
...
...
@@ -2,11 +2,11 @@
<html>
<head>
<title>
Router Gadget
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"
lib/
rsvp.js"
></script>
<script
src=
"
lib/
renderjs.js"
></script>
<script
src=
"gadget_global.js"
></script>
<script
src=
"gadget_router.js"
></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
</html>
examples/renderjs/
index
.js
→
examples/renderjs/
gadget_todo
.js
View file @
41fbc7c5
...
...
@@ -67,7 +67,7 @@
switch
(
traverse
)
{
case
2
:
return
element
.
parentElement
.
parentElement
.
querySelectorAll
(
target
);
.
parentElement
.
querySelectorAll
(
target
);
case
0
:
return
element
.
querySelectorAll
(
target
);
}
...
...
@@ -116,7 +116,7 @@
function
setItemClass
(
o
)
{
return
TODO
+
(
o
.
completed
?
COMPLETED
:
STR
)
+
(
o
.
editing
?
EDITING
:
STR
);
(
o
.
editing
?
EDITING
:
STR
);
}
function
setHidden
(
root
,
hide
)
{
...
...
@@ -130,7 +130,7 @@
// let's go
rJS
(
window
)
/////////////////////////////
/////////////////////////////
// state
/////////////////////////////
.
setState
({
...
...
@@ -141,7 +141,7 @@
query
:
''
})
/////////////////////////////
/////////////////////////////
// ready
/////////////////////////////
.
ready
(
function
()
{
...
...
@@ -184,7 +184,7 @@
// published methods
/////////////////////////////
// router calls to update the DOM land here
// router calls to update the DOM land here
.
allowPublicAcquisition
(
'
setQuery
'
,
function
(
param_list
)
{
this
.
changeState
({
'
query
'
:
param_list
[
0
],
...
...
@@ -250,7 +250,7 @@
if
(
toggle_all
)
{
toggle_all
.
checked
=
all_checked
=
getAllChecked
(
todo_list
);
getAllChecked
(
todo_list
);
}
// keep focus on todo being edited
...
...
@@ -294,7 +294,7 @@
dict
.
list
)
{
makeList
(
getElems
(
dict
.
list
,
0
,
LI
))
.
forEach
(
function
(
li
)
{
.
forEach
(
function
(
li
)
{
var
jio_id
=
li
.
getAttribute
(
JIO_ID
);
var
obj
=
getObj
(
todo_list
,
jio_id
).
filter
(
Boolean
).
pop
();
if
(
obj
===
undefined
)
{
...
...
@@ -346,7 +346,7 @@
// set filter
makeList
(
getElems
(
element
,
0
,
FILTERS
))
.
forEach
(
function
(
filter
)
{
.
forEach
(
function
(
filter
)
{
filter
.
classList
.
remove
(
SELECTED
);
if
(
filter
.
getAttribute
(
HREF
)
===
window
.
location
.
hash
)
{
filter
.
classList
.
add
(
SELECTED
);
...
...
@@ -365,12 +365,12 @@
// onEvent
/////////////////////////////
// new todo
// new todo
.
onEvent
(
'
submit
'
,
function
(
event
)
{
return
this
.
storeItem
(
event
.
target
.
elements
[
0
].
value
.
trim
());
},
false
,
true
)
// edit todo
// edit todo
.
onEvent
(
'
dblclick
'
,
function
(
event
)
{
var
gadget
=
this
;
var
dict
=
gadget
.
property_dict
;
...
...
@@ -423,7 +423,7 @@
});
},
false
,
false
)
// key inputs
// key inputs
.
onEvent
(
'
keydown
'
,
function
(
event
)
{
var
gadget
=
this
;
var
dict
=
gadget
.
property_dict
;
...
...
@@ -517,4 +517,3 @@
},
false
,
false
);
}(
window
,
rJS
,
RSVP
,
Handlebars
,
Boolean
,
promiseEventListener
));
examples/renderjs/index.html
View file @
41fbc7c5
...
...
@@ -8,12 +8,12 @@
<link
rel=
"stylesheet"
href=
"node_modules/todomvc-common/base.css"
>
<link
rel=
"stylesheet"
href=
"node_modules/todomvc-app-css/index.css"
>
<script
src=
"
rsvp
.js"
></script>
<script
src=
"
renderjs
.js"
></script>
<script
src=
"
jio
.js"
></script>
<script
src=
"node_modules/handlebars/dist/handlebars.js"
></script>
<script
src=
"
lib/handlebars
.js"
></script>
<script
src=
"
lib/rsvp
.js"
></script>
<script
src=
"
lib/renderjs
.js"
></script>
<script
src=
"gadget_global.js"
></script>
<script
src=
"
index
.js"
></script>
<script
src=
"
gadget_todo
.js"
></script>
<script
id=
"list_template"
type=
"text/x-handlebars-template"
>
<
section
id
=
"
main
"
class
=
"
main {{#unless todo_exists}}hidden{{/unless}}
"
>
...
...
examples/renderjs/lib/handlebars.js
0 → 100644
View file @
41fbc7c5
This source diff could not be displayed because it is too large. You can
view the blob
instead.
examples/renderjs/jio.js
→
examples/renderjs/
lib/
jio.js
View file @
41fbc7c5
File moved
examples/renderjs/renderjs.js
→
examples/renderjs/
lib/
renderjs.js
View file @
41fbc7c5
File moved
examples/renderjs/rsvp.js
→
examples/renderjs/
lib/
rsvp.js
View file @
41fbc7c5
File moved
examples/renderjs/package.json
0 → 100644
View file @
41fbc7c5
{
"private"
:
true
,
"dependencies"
:
{
"todomvc-common"
:
"^1.0.0"
,
"todomvc-app-css"
:
"^1.0.1"
}
}
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