Skip to content

Instantly share code, notes, and snippets.

@ttdonovan
Created March 4, 2009 20:24
Show Gist options
  • Select an option

  • Save ttdonovan/73984 to your computer and use it in GitHub Desktop.

Select an option

Save ttdonovan/73984 to your computer and use it in GitHub Desktop.
// ==========================================================================
// CDWeb.BreadcrumbsController
// ==========================================================================
require('core');
/** @class
(Document Your View Here)
@extends SC.Object
@author AuthorName
@version 0.1
@static
*/
CDWeb.breadcrumbsController = SC.ArrayController.create(
/** @scope CDWeb.breadcrumbsController */ {
allowMultipleSelection: NO,
commitsChangesImmediately: NO,
content: [],
exampleContentObject: SC.Record,
// crumbTitleBinding: 'CDWeb.detailController.display_string',
init: function() {
sc_super();
/* Add a reload crumb for development */
this.content.push(SC.Record.newRecord({ title:'Reload', url:'/cdweb' }));
},
addCrumb: function(title, url) {
var title = title || 'undefined',
url = url || '#';
this.insertNewObjectAt(null, { title:title, url:url });
}
}) ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment