Skip to content

Instantly share code, notes, and snippets.

@skopp
Forked from anonymous/index.coffee
Created June 26, 2013 04:29
Show Gist options
  • Save skopp/5864787 to your computer and use it in GitHub Desktop.
Save skopp/5864787 to your computer and use it in GitHub Desktop.
class MainView extends JView
constructor:->
super
@terminal = new KDView
cssClass: "terminal"
@terminal.$().css
width: "100%"
height: 300
@webterm = new WebTermView
delegate: @terminal
cssClass: "webterm"
@webterm.on "WebTermConnected", (remote)=>
@remote = remote
@terminal.addSubView @webterm
@runCmd = new KDButtonView
title: "Run command"
callback: =>
@remote.input "ls\n"
pistachio:->
"""
This is a real terminal:
{{> this.terminal}}
<br>
{{> this.runCmd}}
"""
viewAppended: ->
@setTemplate do @pistachio
appView.addSubView new MainView
cssClass: "your-app-name"
.your-app-name {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment