Skip to content

Instantly share code, notes, and snippets.

@fatihacet
Created March 26, 2014 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatihacet/9791334 to your computer and use it in GitHub Desktop.
Save fatihacet/9791334 to your computer and use it in GitHub Desktop.
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