This file contains hidden or 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
| SC.LabelView.design({ | |
| escapeHTML: NO, | |
| value: '<h1>To Display HTML</h1><p>html is being escaped.</p>' | |
| }) |
This file contains hidden or 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
| /* controller opts and stuff */ | |
| var opts = {}; | |
| opts.vendorDetailController = function() { | |
| var opts = {}; | |
| opts.cdReferences = CDWeb.Vendor.prototype.cdReferences; | |
| opts.cdReferences.map(function(reference) { | |
| // console.log(this.toString()); | |
| opts[reference + 'Observer'] = function() { | |
| var property = reference, value = this.get(reference); |
This file contains hidden or 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
| # abbot/lib/sproutcore/rack/proxy.rb | |
| require 'net/http' | |
| module SC | |
| module Rack | |
| # Rack application proxies requests as needed for the given project. | |
| class Proxy | |
| def initialize(project) | |
| @project = project |
This file contains hidden or 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
| CDWeb.queriesController = SC.ArrayController.create( | |
| /** @scope CDWeb.queriesController */ { | |
| queriesBinding: 'CDWeb.rootViewController.rootQueries', | |
| defaultQueriesBinding: 'CDWeb.rootViewController.rootDefaultQueries', | |
| /** | |
| this function observes the queries value of CDWeb.rootViewController | |
| then builds new query objects and sets content of controller when queries value changes | |
| */ |
This file contains hidden or 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
| // ========================================================================== | |
| // OrionFw.ManyToManyController | |
| // ========================================================================== | |
| require('core'); | |
| OrionFw.ManyToManyController = SC.Controller.extend({ | |
| init: function() { | |
| sc_super(); |
This file contains hidden or 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
| CDWeb.BreadcrumbsView = SC.View.extend({ | |
| crumbs: [], | |
| crumbsBinding: "CDWeb.breadcrumbsController.arrangedObjects", | |
| tagName: 'ul', | |
| layout: { left:0, right:0, top: 0, bottom:0 }, | |
| crumbsDidChangeObserver: function() { | |
| console.log('crumbsDidChange', t = this); |
This file contains hidden or 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
| // ========================================================================== | |
| // CDWeb.BreadcrumbsController | |
| // ========================================================================== | |
| require('core'); | |
| /** @class | |
| (Document Your View Here) | |
This file contains hidden or 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
| CDWeb.ObjectSelectorFieldView = SC.View.extend( | |
| /** @scope CDWeb.ObjectSelectorFieldView.prototype */{ | |
| requestUrlBinding: 'CDWeb.objectSelectorController.requestUrl', | |
| requestParamsBinding: 'CDWeb.objectSelectorController.requestParams', | |
| render: function(context, firstTime) { | |
| if (firstTime) { | |
| context.push('<input type="text" style="width:100%" />') ; | |
| } |
This file contains hidden or 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
| // ========================================================================== | |
| // CDWeb.ObjectSelectorController | |
| // ========================================================================== | |
| require('core'); | |
| /** @class | |
| (Document Your View Here) |
This file contains hidden or 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
| CDWeb.requestController = SC.DataSource.create( | |
| /** @scope CDWeb.requestController */ { | |
| retrieveRecords: function(store, storeKeys) { | |
| var storeKey = storeKeys[0] ; // only the first | |
| var id = store.idFor(storeKey) ; | |
| var rec = store.find(CDWeb.Data, id) ; | |
| $.ajax({ | |
| type: 'GET', |