Commit 9c64c82b authored by Sindre Sorhus's avatar Sindre Sorhus

PureMVC app cleanup

- Convert to tabs
- Trim trailing whitespace
- Improve readme
parent 2dfaa8b3
## [PureMVC](http://puremvc.github.com/) [JavaScript](https://github.com/PureMVC/puremvc-js-multicore-framework/wiki) Demo - TodoMVC # PureMVC TodoMVC app
This demo is a PureMVC port of the [TodoMVC Project](http://todomvc.com), a JavaScript application framework comparison demo. Given a standard html template, css, and a plain vanilla JavaScript reference app (no framework), developers are challenged to produce implementations base upon their favorite framework.
This demo is a [PureMVC](http://puremvc.github.com/) port of the [TodoMVC Project](http://todomvc.com), a JavaScript application framework comparison demo. Given a standard html template, css, and a plain vanilla JavaScript reference app (no framework), developers are challenged to produce implementations base upon their favorite framework.
The pseudo-classes are written in PureMVC's optional built-in style. The pseudo-classes are written in PureMVC's optional built-in style.
* [Live Demo](http://darkstar.puremvc.org/content_header.html?url=http://puremvc.org/pages/demos/JS/Demo_JS_TodoMVC/&desc=PureMVC%20JavaScript%20Demo:%20TodoMVC) * [Live Demo](http://darkstar.puremvc.org/content_header.html?url=http://puremvc.org/pages/demos/JS/Demo_JS_TodoMVC/&desc=PureMVC%20JavaScript%20Demo:%20TodoMVC)
* [Discussion](http://forums.puremvc.org/index.php?topic=2049.0) * [Discussion](http://forums.puremvc.org/index.php?topic=2049.0)
## Screenshot
![PureMVC JavaScript Demo: TodoMVC](http://puremvc.org/pages/images/screenshots/PureMVC-Shot-JS-TodoMVC.png)
## Status ## Screenshot
Production - [Version 1.2](https://github.com/PureMVC/puremvc-js-demo-todomvc/blob/master/VERSION)
## Platforms / Technologies ![PureMVC JavaScript Demo: TodoMVC](http://puremvc.org/pages/images/screenshots/PureMVC-Shot-JS-TodoMVC.png)
* [JavaScript](http://en.wikipedia.org/wiki/JavaScript)
* [TodoMVC Project](http://todomvc.com)
## License
* Original TodoMVC Demo - Copyright (c) Addy Osmani & Sindre Sorhus
* TodoMVC port to PureMVC - Copyright (c) 2012 Mike Britton and Cliff Hall ## Status
* PureMVC Framework - Copyright(c) 2006-2012 [Futurescale, Inc](http://futurescale.com). Production - [Version 1.2](https://github.com/PureMVC/puremvc-js-demo-todomvc/blob/master/VERSION)
All rights reserved.
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. ## Credits
* Neither the name of Futurescale, Inc., PureMVC.org, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. TodoMVC port to PureMVC by Mike Britton and Cliff Hall
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<script src="../../../assets/director.min.js"></script> <script src="../../../assets/director.min.js"></script>
<!-- PUREMVC LIBRARY --> <!-- PUREMVC LIBRARY -->
<script src="js/lib/puremvc-1.0.1.min.js"></script> <script src="js/lib/puremvc.min.js"></script>
<!-- APPLICATION CONSTANTS --> <!-- APPLICATION CONSTANTS -->
<script src="js/AppConstants.js"></script> <script src="js/AppConstants.js"></script>
...@@ -80,8 +80,7 @@ ...@@ -80,8 +80,7 @@
<!-- START THE APPLICATION --> <!-- START THE APPLICATION -->
<script> <script>
document.addEventListener('DOMContentLoaded', function() document.addEventListener('DOMContentLoaded', function() {
{
var app = new todomvc.Application(); var app = new todomvc.Application();
}); });
</script> </script>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* PureMVC JS is multi-core, meaning you may have multiple, * PureMVC JS is multi-core, meaning you may have multiple,
* named and isolated PureMVC cores. This app only has one. * named and isolated PureMVC cores. This app only has one.
*/ */
puremvc.define({ name: 'todomvc.AppConstants' },{}, { puremvc.define({ name: 'todomvc.AppConstants' }, {}, {
// The multiton key for this app's single core // The multiton key for this app's single core
CORE_NAME: 'TodoMVC', CORE_NAME: 'TodoMVC',
...@@ -27,5 +27,4 @@ puremvc.define({ name: 'todomvc.AppConstants' },{}, { ...@@ -27,5 +27,4 @@ puremvc.define({ name: 'todomvc.AppConstants' },{}, {
FILTER_ALL: 'all', FILTER_ALL: 'all',
FILTER_ACTIVE: 'active', FILTER_ACTIVE: 'active',
FILTER_COMPLETED: 'completed' FILTER_COMPLETED: 'completed'
} });
);
...@@ -15,7 +15,7 @@ puremvc.define({ ...@@ -15,7 +15,7 @@ puremvc.define({
* Register Proxies with the Model * Register Proxies with the Model
* @override * @override
*/ */
execute: function (note) { execute: function(note) {
this.facade.registerProxy( new todomvc.model.proxy.TodoProxy() ); this.facade.registerProxy( new todomvc.model.proxy.TodoProxy() );
} }
} }
......
...@@ -18,7 +18,7 @@ puremvc.define({ name: 'todomvc.view.event.AppEvents' }, {}, ...@@ -18,7 +18,7 @@ puremvc.define({ name: 'todomvc.view.event.AppEvents' }, {},
// Create event (cross-browser) // Create event (cross-browser)
createEvent: function( eventName ) { createEvent: function( eventName ) {
var event; var event;
if( document.createEvent ) { if ( document.createEvent ) {
event = document.createEvent( 'Events' ); event = document.createEvent( 'Events' );
event.initEvent( eventName, false, false ); event.initEvent( eventName, false, false );
} else if ( document.createEventObject ) { } else if ( document.createEventObject ) {
......
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