-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dropping the non Marionette module variation of the application, upda…
…ting index, adding readme.
- Loading branch information
1 parent
db6e8e7
commit 9b81a25
Showing
22 changed files
with
82 additions
and
3,316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Backbone.Marionette is a composite application library for Backbone.js that aims to simplify the construction of large scale JavaScript applications. It is a collection of common design and implementation patterns found in the applications that Derick Bailey has been building with Backbone, and includes various pieces inspired by composite application architectures, such as Microsoft's "Prism" framework. | ||
|
||
This implementation of the application uses Marionette's module system. Variations using RequireJS and a more classic approach to JavaScript modules are also [available](https://github.com/marionettejs/backbone.marionette/wiki/Projects-and-websites-using-marionette). |
150 changes: 79 additions & 71 deletions
150
labs/architecture-examples/backbone_marionette/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,91 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<title>Marionette • TodoMVC</title> | ||
<link rel="stylesheet" href="../../../assets/base.css"> | ||
<link rel="stylesheet" href="css/app.css"> | ||
<!--[if IE]> | ||
<script src="../../../assets/ie.js"></script> | ||
<![endif]--> | ||
</head> | ||
<body> | ||
<section id="todoapp"> | ||
<header id="header"></header> | ||
<section id="main"></section> | ||
<footer id="footer"></footer> | ||
</section> | ||
<footer id="info"> | ||
<p>Double-click to edit a todo</p> | ||
|
||
<p>Created by <a href="http://github.com/jsoverson">Jarrod Overson</a></p> | ||
</footer> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<title>Marionette • TodoMVC</title> | ||
<link rel="stylesheet" href="../../../assets/base.css"> | ||
<link rel="stylesheet" href="css/app.css"> | ||
<!--[if IE]> | ||
<script src="../../../assets/ie.js"></script> | ||
<![endif]--> | ||
|
||
<!-- vendor libraries --> | ||
<script src="../../../assets/base.js"></script> | ||
<script src="../../../assets/jquery.min.js"></script> | ||
<script src="../../../assets/lodash.min.js"></script> | ||
<script src="js/lib/backbone.js"></script> | ||
<script src="js/lib/backbone-localStorage.js"></script> | ||
<script src="js/lib/backbone.marionette.js"></script> | ||
<script type="text/html" id="template-footer"> | ||
<span id="todo-count"><strong></strong> items left</span> | ||
<ul id="filters"> | ||
<li> | ||
<a href="#">All</a> | ||
</li> | ||
<li> | ||
<a href="#active">Active</a> | ||
</li> | ||
<li> | ||
<a href="#completed">Completed</a> | ||
</li> | ||
</ul> | ||
<button id="clear-completed">Clear completed</button> | ||
</script> | ||
|
||
<!-- application libraries --> | ||
<script src="js/models/Todo.js"></script> | ||
<script src="js/collections/TodoList.js"></script> | ||
<script src="js/Router.js"></script> | ||
<script type="text/html" id="template-header"> | ||
<h1>todos</h1> | ||
<input id="new-todo" placeholder="What needs to be done?" autofocus> | ||
</script> | ||
|
||
<!-- application views --> | ||
<script src="js/views/Footer.js"></script> | ||
<script src="js/views/Header.js"></script> | ||
<script src="js/views/TodoItemView.js"></script> | ||
<script src="js/views/TodoListCompositeView.js"></script> | ||
<script type="text/html" id="template-todoItemView"> | ||
<div class="view"> | ||
<input class="toggle" type="checkbox" <% if (completed) { %>checked<% } %>> | ||
<label><%= title %></label> | ||
<button class="destroy"></button> | ||
</div> | ||
<input class="edit" value="<%= title %>"> | ||
</script> | ||
|
||
<!-- application --> | ||
<script src="js/app.js"></script> | ||
<script type="text/html" id="template-todoListCompositeView"> | ||
<input id="toggle-all" type="checkbox"> | ||
<label for="toggle-all">Mark all as complete</label> | ||
<ul id="todo-list"></ul> | ||
</script> | ||
|
||
<script type="text/html" id="template-footer"> | ||
<span id="todo-count"><strong></strong> items left</span> | ||
<ul id="filters"> | ||
<li> | ||
<a href="#/">All</a> | ||
</li> | ||
<li> | ||
<a href="#/active">Active</a> | ||
</li> | ||
<li> | ||
<a href="#/completed">Completed</a> | ||
</li> | ||
</ul> | ||
<button id="clear-completed">Clear completed</button> | ||
</script> | ||
</head> | ||
|
||
<script type="text/html" id="template-header"> | ||
<h1>todos</h1> | ||
<input id="new-todo" placeholder="What needs to be done?" autofocus> | ||
</script> | ||
<body> | ||
<section id="todoapp"> | ||
<header id="header"></header> | ||
<section id="main"></section> | ||
<footer id="footer"></footer> | ||
</section> | ||
|
||
<script type="text/html" id="template-todoItemView"> | ||
<div class="view"> | ||
<input class="toggle" type="checkbox" <% if (completed) { %>checked<% } %>> | ||
<label><%= title %></label> | ||
<button class="destroy"></button> | ||
</div> | ||
<input class="edit" value="<%= title %>"> | ||
</script> | ||
<footer id="info"> | ||
<p>Double-click to edit a todo</p> | ||
<p> | ||
Created by <a href="http://github.com/jsoverson">Jarrod Overson</a> | ||
and <a href="http://github.com/derickbailey">Derick Bailey</a>, | ||
using <a href="http://marionettejs.com">Backbone.Marionette</a> | ||
</p> | ||
<p>Further variations on the Backbone.Marionette app are also <a href="https://github.com/marionettejs/backbone.marionette/wiki/Projects-and-websites-using-marionette">available</a>.</p> | ||
</footer> | ||
|
||
<script type="text/html" id="template-todoListCompositeView"> | ||
<input id="toggle-all" type="checkbox"> | ||
<label for="toggle-all">Mark all as complete</label> | ||
<ul id="todo-list"></ul> | ||
</script> | ||
</body> | ||
<!-- vendor libraries --> | ||
<script src="../../../assets/base.js"></script> | ||
<script src="../../../assets/jquery.min.js"></script> | ||
<script src="../../../assets/lodash.min.js"></script> | ||
<script src="js/lib/backbone.js"></script> | ||
<script src="js/lib/backbone-localStorage.js"></script> | ||
<script src="js/lib/backbone.marionette.js"></script> | ||
|
||
<!-- application --> | ||
<script src="js/TodoMVC.js"></script> | ||
<script src="js/TodoMVC.Todos.js"></script> | ||
<script src="js/TodoMVC.Layout.js"></script> | ||
<script src="js/TodoMVC.TodoList.Views.js"></script> | ||
<script src="js/TodoMVC.TodoList.js"></script> | ||
|
||
<script> | ||
$(function(){ | ||
// Start the TodoMVC app (defined in js/TodoMVC.js) | ||
TodoMVC.start(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
11 changes: 0 additions & 11 deletions
11
labs/architecture-examples/backbone_marionette/js/Router.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
labs/architecture-examples/backbone_marionette/js/collections/TodoList.js
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
labs/architecture-examples/backbone_marionette/js/models/Todo.js
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
labs/architecture-examples/backbone_marionette/js/views/Footer.js
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
labs/architecture-examples/backbone_marionette/js/views/Header.js
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
labs/architecture-examples/backbone_marionette/js/views/TodoItemView.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.