Sha256: 8cbee2c35903265c05129b991675a392a5cbfb4071db96e3d99eff007de3ebbb
Contents?: true
Size: 1.41 KB
Versions: 48
Compression:
Stored size: 1.41 KB
Contents
// ========================================================================== // Project: Greenhouse.ViewConfig // Copyright: ©2010 Mike Ball // ========================================================================== /*globals Greenhouse js_beautify*/ /** @class (Document your Model here) @extends SC.Record @version 0.1 */ Greenhouse.ViewConfig = SC.Record.extend( /** @scope Greenhouse.ViewConfig.prototype */ { primaryKey: 'path', views: SC.Record.toMany('Greenhouse.Design', {nested: YES}), panes: SC.Record.toMany('Greenhouse.Design', {nested: YES}), controllers: SC.Record.toMany('Greenhouse.Design', {nested: YES}), canEdit: SC.Record.attr(Boolean), name: SC.Record.attr(String), path: SC.Record.attr(String), body: function(){ var ret = {name: this.get('name'), path: this.get('path'), views: [], controllers: [], panes: []}, views = this.get('views'), controllers = this.get('controllers'), panes = this.get('panes'); views.forEach(function(i){ ret.views.push(i.get('attributes')); }); controllers.forEach(function(i){ ret.controllers.push(i.get('attributes')); }); panes.forEach(function(i){ ret.panes.push(i.get('attributes')); }); return js_beautify(SC.json.encode(ret)); }.property('views', 'panes', 'controllers') }) ; Greenhouse.CONFIG_QUERY = SC.Query.remote(Greenhouse.ViewConfig);
Version data entries
48 entries across 48 versions & 2 rubygems