Created
March 26, 2014 19:30
-
-
Save fatihacet/9791334 to your computer and use it in GitHub Desktop.
Coffee2JS.kdapp
This file contains 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
class CoffeetojsMainView extends KDView | |
constructor: (options = {}, data) -> | |
super options, data | |
@loading = new KDLoaderView | |
size : | |
width : 48 | |
showLoader : yes | |
appManager = KD.getSingleton "appManager" | |
appManager.require "Teamwork", => | |
@workspace = new Workspace | |
title : "Coffee2JS" | |
cssClass : "coffeetojs" | |
name : "Coffee2JS" | |
panels : [ | |
title : "Coffee2JS" | |
layout : | |
direction : "vertical" | |
sizes : ["50%", "50%"] | |
splitName : "BaseSplit" | |
views : [ | |
{ | |
type : "editor" | |
name : "coffeeEditor" | |
} | |
{ | |
type : "editor" | |
name : "jsEditor" | |
} | |
] | |
] | |
@workspace.once "viewAppended", => | |
@bindWorkspaceEvents() | |
@loading.destroy() | |
KD.utils.wait 3000, => @addSubView @workspace | |
@addSubView @loading | |
bindWorkspaceEvents: -> | |
@panel = @workspace.getActivePanel() | |
{@coffeeEditor, @jsEditor} = @panel.panesByName | |
class CoffeetojsController extends AppController | |
constructor: (options = {}, data) -> | |
options.view = new CoffeetojsMainView | |
options.appInfo = | |
name : "Coffeetojs" | |
type : "application" | |
super options, data | |
if appView? | |
view = new CoffeetojsMainView | |
appView.addSubView view | |
else | |
KD.registerAppClass CoffeetojsController, | |
name : "Coffeetojs" | |
routes : | |
"/:name?/Coffeetojs" : null | |
"/:name?/fatihacet/Apps/Coffeetojs" : null | |
dockPath : "/fatihacet/Apps/Coffeetojs" | |
behavior : "application" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment