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
6de9e4b7
Commit
6de9e4b7
authored
May 01, 2013
by
Oscar Godson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ticket #510 - Put all the codez in a global namespace
parent
f7e1b55e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
8 deletions
+12
-8
vanilla-examples/vanillajs/index.html
vanilla-examples/vanillajs/index.html
+4
-0
vanilla-examples/vanillajs/js/app.js
vanilla-examples/vanillajs/js/app.js
+4
-4
vanilla-examples/vanillajs/js/controller.js
vanilla-examples/vanillajs/js/controller.js
+1
-1
vanilla-examples/vanillajs/js/model.js
vanilla-examples/vanillajs/js/model.js
+1
-1
vanilla-examples/vanillajs/js/store.js
vanilla-examples/vanillajs/js/store.js
+1
-1
vanilla-examples/vanillajs/js/view.js
vanilla-examples/vanillajs/js/view.js
+1
-1
No files found.
vanilla-examples/vanillajs/index.html
View file @
6de9e4b7
...
...
@@ -39,6 +39,10 @@
</footer>
<script
src=
"components/todomvc-common/base.js"
></script>
<script
src=
"components/director/build/director.js"
></script>
<script>
// Bootstrap app data
window
.
app
=
{};
</script>
<script
src=
"js/helpers.js"
></script>
<script
src=
"js/store.js"
></script>
<script
src=
"js/model.js"
></script>
...
...
vanilla-examples/vanillajs/js/app.js
View file @
6de9e4b7
...
...
@@ -8,10 +8,10 @@
* @param {string} name The name of your new to do list.
*/
function
Todo
(
name
)
{
this
.
storage
=
new
Store
(
name
);
this
.
model
=
new
Model
(
this
.
storage
);
this
.
view
=
new
View
();
this
.
controller
=
new
Controller
(
this
.
model
,
this
.
view
);
this
.
storage
=
new
app
.
Store
(
name
);
this
.
model
=
new
app
.
Model
(
this
.
storage
);
this
.
view
=
new
app
.
View
();
this
.
controller
=
new
app
.
Controller
(
this
.
model
,
this
.
view
);
}
var
todo
=
new
Todo
(
'
todos-vanillajs
'
);
...
...
vanilla-examples/vanillajs/js/controller.js
View file @
6de9e4b7
...
...
@@ -338,5 +338,5 @@
};
// Export to window
window
.
Controller
=
Controller
;
window
.
app
.
Controller
=
Controller
;
})(
window
);
vanilla-examples/vanillajs/js/model.js
View file @
6de9e4b7
...
...
@@ -115,5 +115,5 @@
};
// Export to window
window
.
Model
=
Model
;
window
.
app
.
Model
=
Model
;
})(
window
);
vanilla-examples/vanillajs/js/store.js
View file @
6de9e4b7
...
...
@@ -138,5 +138,5 @@
};
// Export to window
window
.
Store
=
Store
;
window
.
app
.
Store
=
Store
;
})(
window
);
vanilla-examples/vanillajs/js/view.js
View file @
6de9e4b7
...
...
@@ -87,5 +87,5 @@
};
// Export to window
window
.
View
=
View
;
window
.
app
.
View
=
View
;
})(
window
);
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