Commit 41fbc7c5 authored by Sven Franck's avatar Sven Franck

rename and structure files

parent 511c391f
......@@ -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>
......@@ -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>
......@@ -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));
......@@ -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}}">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"private": true,
"dependencies": {
"todomvc-common": "^1.0.0",
"todomvc-app-css": "^1.0.1"
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment