Skip to content

Instantly share code, notes, and snippets.

View erichocean's full-sized avatar

Erich Ocean erichocean

  • Xy Group Ltd
  • North Carolina
View GitHub Profile
// ==========================================================================
// myApp.MainMenuController
// ==========================================================================
require('core');
/** @class
(Document Your View Here)
SC.AUTORESIZE_BORDERS = 'borders';
SC.AUTORESIZE_WIDTH = 'width';
SC.AUTORESIZE_RIGHT = 'right';
SC.AUTORESIZE_LEFT = 'left';
SC.AUTORESIZE_HEIGHT = 'height';
SC.AUTORESIZE_TOP = 'top';
SC.AUTORESIZE_BOTTOM = 'bottom';
SC.AUTORESIZE_WIDTH_HEIGHT = 'width+height';
SC.AUTORESIZE_WIDTH_TOP = 'width+top';
SC.AUTORESIZE_WIDTH_BOTTOM = 'width+bottom';
SC.page = SC.Page.create({
size: { width: 800, height: 600 },
marginInset: SC.View.create({
outlets: ['projectNameLabel','appProjectDirLabel','projectAppsScroller','appNameLabel','appDirLabel','appFilesScroller'],
layout: { x: 0, y: 0, width: 800, height: 600 },
projectNameLabel: SC.LabelView.create({
valueBinding: 'SC.IDE.projectController.name',
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<style>
body {
position: absolute;
right: 100px;
height: 600px;
troy:sproutcore-buildtools onitunes$ ./bin//sc-server
Loading SproutCore bundles in /Users/onitunes/tmp/sproutcore-buildtools
Running SproutCore Build Tools v0.9.17
Welcome to SproutCore
~ Starting Merb server listening at 0.0.0.0:4020
~ Using Mongrel adapter
~ Started request handling: Tue Sep 30 12:41:19 -0700 2008
~ uninitialized constant Merb::Request::Application - (NameError)
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:492:in `const_missing_before_generators'
/opt/local/lib/ruby/gems/1.8/gems/rubigen-1.3.2/lib/rubigen/lookup.rb:13:in `const_missing'
<% content_for('body') do %>
<%= tab_view :decider_tabs,
:lazy_tabs => true,
:height => 400,
:now_showing => :incomming,
:segments => [[:incomming,'Incomming Orders'],
[:complete,'Completed/Canceled Orders']] %>
<% end %>
// This method is called by the various handlers once they have extracted
// their data.
refreshRecordsWithData: function(dataAry,recordType,cacheCode,loaded) {
var server = this ;
// first, prepare each data item in the Ary.
dataAry = dataAry.map(function(data) {
// camelize the keys received back.
data = server._camelizeData(data) ;
/**
Call this to force the list to refresh. The refresh may not happen
right away, depending on the dataSource.
*/
refresh: function() {
var recordType = this.get('recordType') || SC.Record ;
var offset = (this._limit > 0) ? this._offset : 0 ;
if (!this._boundRefreshFunc) {
this._boundRefreshFunc = this._refreshDidComplete.bind(this) ;
// ..........................................
// REFRESH
refreshRecords: function(records) {
if (!records || records.length == 0) return ;
records = this._recordsByResource(records) ; // sort by resource.
for(var resource in records) {
if (resource == '*') continue ;
isFlashVisible: NO,
_isFlashVisible: NO, // for animation
isFlashVisibleBinding: 'OI.flashController.firstMessage',
isFlashVisibleBindingDefault: SC.Binding.Bool,
isFlashVisibleObserver: function () {
if ( !this._wrapperAnimation ) {
this._wrapperAnimation = Animator.apply( SC.page.get('wrapper').rootElement, "top: 0px;", { duration: 200 });
}