Coffee2JS.kdapp
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