Skip to content

Commit

Permalink
Upgrading Backbone.js (test) dependencies to latest jQuery, Zepto, an…
Browse files Browse the repository at this point in the history
…d Underscore.
  • Loading branch information
jashkenas committed Feb 7, 2011
1 parent ac8c3dd commit 164ad72
Show file tree
Hide file tree
Showing 9 changed files with 3,704 additions and 1,668 deletions.
4 changes: 2 additions & 2 deletions backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,10 +677,10 @@
if (!this.routes) return;
var routes = [];
for (var route in this.routes) {
routes.unshift([route, this.route[route]]);
routes.unshift([route, this.routes[route]]);
}
for (var i = 0, l = routes.length; i < l; i++) {
this.route(routes[0], routes[1], this[routes[1]]);
this.route(routes[i][0], routes[i][1], this[routes[i][1]]);
}
},

Expand Down
4 changes: 2 additions & 2 deletions examples/todos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<title>Backbone Demo: Todos</title>
<link href="todos.css" media="all" rel="stylesheet" type="text/css"/>
<script src="../../test/vendor/json2.js"></script>
<script src="../../test/vendor/jquery-1.4.2.js"></script>
<script src="../../test/vendor/underscore-1.1.3.js"></script>
<script src="../../test/vendor/jquery-1.5.js"></script>
<script src="../../test/vendor/underscore-1.1.4.js"></script>
<script src="../../backbone.js"></script>
<script src="../backbone-localstorage.js"></script>
<script src="todos.js"></script>
Expand Down
38 changes: 19 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ <h2 id="Model">Backbone.Model</h2>
Destroys the model on the server by delegating an HTTP <tt>DELETE</tt>
request to <a href="#Sync">Backbone.sync</a>. Accepts
<tt>success</tt> and <tt>error</tt> callbacks in the options hash.
Triggers a <tt>"destroy"</tt> event on the model, which will bubble up
Triggers a <tt>"destroy"</tt> event on the model, which will bubble up
through any collections that contain it.
</p>

Expand Down Expand Up @@ -1911,39 +1911,39 @@ <h2 id="examples">Examples</h2>
<img src="docs/images/backbone-mobile.png" alt="Backbone Mobile" class="example_image" />
</a>
</div>

<p>
<a href="http://twitter.com/evilchelu">Cristi Balan</a> and
<a href="http://dira.ro">Irina Dumitrascu</a> created
<a href="http://tzigla.com">Tzigla</a>, a collaborative drawing
application where artists make tiles that connect to each other to
<a href="http://twitter.com/evilchelu">Cristi Balan</a> and
<a href="http://dira.ro">Irina Dumitrascu</a> created
<a href="http://tzigla.com">Tzigla</a>, a collaborative drawing
application where artists make tiles that connect to each other to
create <a href="http://tzigla.com/boards/1">surreal drawings</a>.
Backbone models help organize the code, controllers provide
<a href="http://tzigla.com/boards/1#!/tiles/2-2">bookmarkable deep links</a>,
and the views are rendered with
<a href="https://github.com/creationix/haml-js">haml.js</a> and
Backbone models help organize the code, controllers provide
<a href="http://tzigla.com/boards/1#!/tiles/2-2">bookmarkable deep links</a>,
and the views are rendered with
<a href="https://github.com/creationix/haml-js">haml.js</a> and
<a href="http://zeptojs.com/">Zepto</a>.
Tzigla is written in Ruby (Rails) on the backend, and
Tzigla is written in Ruby (Rails) on the backend, and
<a href="http://coffeescript.org">CoffeeScript</a> on the frontend, with
<a href="http://documentcloud.github.com/jammit/">Jammit</a>
<a href="http://documentcloud.github.com/jammit/">Jammit</a>
prepackaging the static assets.
</p>

<div style="text-align: center;">
<a href="http://www.tzigla.com/">
<img src="docs/images/tzigla.png" alt="Tzigla" class="example_image" />
</a>
</div>

<p>
<a href="http://www.twitter.com/jamesjyu">James Yu</a> used Backbone.js to
create <a href="http://www.quietwrite.com/">QuietWrite</a>, an app
that gives writers a clean and quiet interface to concentrate on the text itself.
The editor relies on Backbone to persist document data to the server. He
followed up with a Backbone.js + Rails tutorial that describes how to implement
The editor relies on Backbone to persist document data to the server. He
followed up with a Backbone.js + Rails tutorial that describes how to implement
<a href="http://www.jamesyu.org/2011/01/27/cloudedit-a-backbone-js-tutorial-by-example/">CloudEdit, a simple document editing app</a>.
</p>

<div style="text-align: center;">
<a href="http://www.quietwrite.com/">
<img src="docs/images/quietwrite.png" alt="QuietWrite" class="example_image" />
Expand Down Expand Up @@ -2182,8 +2182,8 @@ <h2 id="changelog">Change Log</h2>

</div>

<script src="test/vendor/underscore-1.1.3.js"></script>
<script src="test/vendor/jquery-1.4.2.js"></script>
<script src="test/vendor/underscore-1.1.4.js"></script>
<script src="test/vendor/jquery-1.5.js"></script>
<script src="test/vendor/json2.js"></script>
<script src="backbone.js"></script>

Expand Down
2 changes: 1 addition & 1 deletion test/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(document).ready(function() {
asyncTest("Controller: routes (anything)", 1, function() {
window.location.hash = 'doesnt-match-a-route';
setTimeout(function() {
equals(controller.anything, 'doesnt-match-a-routea');
equals(controller.anything, 'doesnt-match-a-route');
start();
window.location.hash = '';
}, 10);
Expand Down
4 changes: 2 additions & 2 deletions test/test-zepto.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<title>Backbone Test Suite</title>
<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" />
<script type="text/javascript" src="vendor/json2.js"></script>
<script type="text/javascript" src="vendor/zepto-0.3.js"></script>
<script type="text/javascript" src="vendor/zepto-0.4.js"></script>
<script type="text/javascript" src="vendor/qunit.js"></script>
<script type="text/javascript" src="vendor/jslitmus.js"></script>
<script type="text/javascript" src="vendor/underscore-1.1.3.js"></script>
<script type="text/javascript" src="vendor/underscore-1.1.4.js"></script>
<script type="text/javascript" src="../backbone.js"></script>

<script type="text/javascript" src="events.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions test/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<title>Backbone Test Suite</title>
<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" />
<script type="text/javascript" src="vendor/json2.js"></script>
<script type="text/javascript" src="vendor/jquery-1.4.2.js"></script>
<script type="text/javascript" src="vendor/jquery-1.5.js"></script>
<script type="text/javascript" src="vendor/qunit.js"></script>
<script type="text/javascript" src="vendor/jslitmus.js"></script>
<script type="text/javascript" src="vendor/underscore-1.1.3.js"></script>
<script type="text/javascript" src="vendor/underscore-1.1.4.js"></script>
<script type="text/javascript" src="../backbone.js"></script>

<script type="text/javascript" src="events.js"></script>
Expand Down
Loading

0 comments on commit 164ad72

Please sign in to comment.