Skip to content

Instantly share code, notes, and snippets.

View etgryphon's full-sized avatar

Evin Grano etgryphon

  • Concluent System, LLC
  • Leesburg, VA USA
View GitHub Profile
// ========================================================================
// SproutCore
// copyright 2006-2008 Sprout Systems, Inc.
// ========================================================================
require('core') ;
SC.URL_ENCODED_FORMAT = 'url-encoded' ;
SC.JSON_FORMAT = 'json';
/** @private */
init: function() {
sc_super() ;
var RecordType = this.get('recordType') ;
if (RecordType) {
var q = SC.Query.create({recordType: RecordType, orderBy: 'name'});
var collection = SC.Store.findAll(q);
this.set('content', collection) ;
}
// ==========================================================================
// Project: SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
// Portions ©2008-2009 Apple, Inc. All rights reserved.
// License: Licened under MIT license (see license.js)
// ==========================================================================
/**
@class
require 'service-patch'
config :all, :required => [:jquery, :sproutcore, :'sproutcore/designer', :'sproutcore/deprecated', :'onitunes-statechart']
# CORE FRAMEWORKS
config :scui, :required => []
config :linkit, :required => [:scui]
config :'core-orion', :required => [:scui]
# This configuration section will be applied to all bundles used by your
# application, even bundles that come from other gems.
myApp.MasterView = SC.View.extend(
/** @scope myApp.MasterView.prototype */ {
classNames: ['master-view'],
// necessary config elements to set up binding on the ListViews
contentPath: '',
selectionPath: '',
/**
aRealMasterView: myApp.MasterView.design({
layout: { /* layout here */ },
contentPath: 'myApp.myRecordsController.arrangedObjects',
selectionPath: 'myApp.myRecordsController.selection',
searchPath: 'myApp.myRecordsController.search'
})
// ==========================================================================
// SCUI.SimpleButton
// ==========================================================================
/**
@namespace
Implements common status observation.
@author Mike Ball
dragUpdated: function(drag, evt) {
var loc = drag.get('location');
var offset = drag.get('ghostOffset');
var ghostView = drag.get('ghostView');
var view = drag.get('view');
var frame;
// if(drag.get('startFrame')){
// frame = drag.get('startFrame');
// }
// else{
/** @class
This is a Drawing View:
If you want to draw a new shape you can pass in the information:
For a Line:
{
+shape: SCUI.LINE,
+start: {x: 0, y: 0},
+end: {x: 100, y: 100},
// ==========================================================================
// SCUI.WidgetView
// ==========================================================================
sc_require('core');
/** @class
This is a management view that handles a widget. Implements the Widget Mixin