diff --git a/backbone.js b/backbone.js index 7a8ee41f..98ba0ddc 100644 --- a/backbone.js +++ b/backbone.js @@ -859,7 +859,7 @@ // For small amounts of DOM Elements, where a full-blown template isn't // needed, use **make** to manufacture elements, one at a time. // - // var el = this.make('li', {'class': 'row'}, this.model.get('title')); + // var el = this.make('li', {'class': 'row'}, this.model.escape('title')); // make : function(tagName, attributes, content) { var el = document.createElement(tagName); diff --git a/docs/images/basecamp-mobile.png b/docs/images/basecamp-mobile.png new file mode 100644 index 00000000..0b96b691 Binary files /dev/null and b/docs/images/basecamp-mobile.png differ diff --git a/docs/images/instagreat.png b/docs/images/instagreat.png new file mode 100644 index 00000000..ea0fca3b Binary files /dev/null and b/docs/images/instagreat.png differ diff --git a/docs/images/substance.png b/docs/images/substance.png new file mode 100644 index 00000000..18db8056 Binary files /dev/null and b/docs/images/substance.png differ diff --git a/docs/images/tilemill.png b/docs/images/tilemill.png new file mode 100644 index 00000000..0047c306 Binary files /dev/null and b/docs/images/tilemill.png differ diff --git a/index.html b/index.html index 24ac2a1f..e571bbf9 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,7 @@ font-weight: bold; margin-top: 15px; } - div.toc_title:hover { + a.toc_title:hover { text-decoration: underline; } #sidebar .version { @@ -51,8 +51,12 @@ margin: 0 0 3px 0; } .toc_section li a { + text-decoration: none; color: black; } + .toc_section li a:hover { + text-decoration: underline; + } div.container { position: relative; width: 550px; @@ -83,11 +87,9 @@ } a, a:visited { color: #444; - text-decoration: none; } a:active, a:hover { color: #000; - text-decoration: underline; } a img { border: 0; @@ -499,9 +501,19 @@ var Note = Backbone.Model.extend({ author: function() { ... }, - allowedToEdit: function(account) { ... }, + coordinates: function() { ... }, - coordinates: function() { ... } + allowedToEdit: function(account) { + return true; + } + +}); + +var PrivateNote = Note.extend({ + + allowedToEdit: function(account) { + return account.owns(this); + } }); @@ -1106,7 +1118,7 @@ var alphabetical = Books.sortBy(function(book) { Add a model (or an array of models) to the collection. Fires an "add" event, which you can pass {silent: true} to suppress. If a model property is defined, you may also pass - raw attributes objects. + raw attributes objects, and have them be vivified as instances of the model.

@@ -1888,27 +1900,77 @@ var DocumentView = Backbone.View.extend({
     
 
     

- The DocumentCloud workspace + The DocumentCloud workspace is built on Backbone.js, with Documents, Projects, Notes, and Accounts all as Backbone models and collections.

- DocumentCloud Workspace + + DocumentCloud Workspace +

- Ben Nolan created - an example "Backbone Mobile" application, combining Backbone.js - with jQuery Mobile. You can - try the app - in your browser, or view the - source code on Github. + 37Signals used Backbone.js to create + Basecamp Mobile, the mobile version + of their popular project management software. You can access all your Basecamp + projects, post new messages, and comment on milestones (all represented + internally as Backbone.js models).

- - Backbone Mobile + + Basecamp Mobile + +
+ +

+ Our fellow + Knight Foundation News Challenge + winners, MapBox, created an open-source + map design studio with Backbone.js: + TileMill. + TileMill lets you manage map layers based on shapefiles and rasters, and + edit their appearance directly in the browser with the + Carto styling language. +

+ +
+ + TileMill + +
+ +

+ Elliott Kember and + Hector Simpson built + Insta-great! + - a fun way to explore popular photos and interact with + Instagram on the web. + Elliott says, "Backbone.js and Coffeescript were insanely useful for + writing clean, consistent UI code and keeping everything modular and + readable, even through several code refactors. I'm in love." +

+ +
+ + instagre.at + +
+ +

+ James Yu used Backbone.js to + create QuietWrite, 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 + CloudEdit, a simple document editing app. +

+ +
+ + QuietWrite
@@ -1936,17 +1998,28 @@ var DocumentView = Backbone.View.extend({

- James Yu used Backbone.js to - create QuietWrite, 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 - CloudEdit, a simple document editing app. + Michael Aufreiter is building an open source document authoring and publishing engine: Substance. + Substance makes use of Backbone.View and Backbone.Controller, while Backbone plays well together with Data.js, which is used for data persistence.

- - QuietWrite + + Substance + +
+ +

+ Ben Nolan created + an example "Backbone Mobile" application, combining Backbone.js + with jQuery Mobile. You can + try the app + in your browser, or view the + source code on Github. +

+ +
+ + Backbone Mobile