id stringlengths 34 124 | type stringclasses 4
values | prompt stringlengths 0 4.95k | response stringlengths 21 4.89k | source_lang stringclasses 3
values | target_lang stringclasses 2
values | repo stringclasses 75
values | path stringlengths 10 88 | license stringclasses 1
value | commit stringlengths 40 40 | stars int64 431 18.7k | source_url stringlengths 86 176 | line_start int64 1 214 | line_end int64 3 253 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jeremyramin/terminal-plus:lib/panel-view.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: (options) ->
super(options)
@addDefaultButtons()
@terminal.showIcon(... | var PanelView,
boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } };
PanelView = (function() {
class PanelView extends TerminalView {
constructor() {
super(...arguments);
this.destroy = t... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/panel-view.coffee | 17 | 66 |
jeremyramin/terminal-plus:lib/panel-view.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var PanelView,
boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } };
PanelView = (function() {
class PanelView extends TerminalView {
constructo... | class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: (options) ->
super(options)
@addDefaultButtons()
@terminal.showIcon()
@updateName(@terminal.getName())
@attachResize... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/panel-view.coffee | 17 | 66 |
jeremyramin/terminal-plus:lib/panel-view.coffee:3:completion | completion | class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: (options) ->
super(options)
@addDefaultButtons()
@terminal.showIcon()
@updateName(@terminal.getName())
@attachResize... | else
@panel.destroy()
super(keepTerminal)
###
Section: Setup
###
addDefaultButtons: ->
@closeBtn = @addButton 'right', @destroy, 'x'
@hideBtn = @addButton 'right', @hide, 'chevron-down'
@fullscreenBtn = @addButton 'right', @toggleFullscreen, 'screen-full'
@inputBtn = @addButton 'lef... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/panel-view.coffee | 17 | 66 |
jeremyramin/terminal-plus:lib/panel-view.coffee:4:raw_corpus | raw_corpus | return if @panel?
@panel = atom.workspace.addBottomPanel(item: this, visible: false)
###
Section: Resizing
###
attachResizeEvents: ->
@panelDivider.on 'mousedown', @resizeStarted
detachResizeEvents: ->
@panelDivider.off 'mousedown'
onWindowResize: (event) =>
@terminal.disableAnimation()... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/panel-view.coffee | 67 | 116 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:4:completion | completion | return if @panel?
@panel = atom.workspace.addBottomPanel(item: this, visible: false)
###
Section: Resizing
###
attachResizeEvents: ->
@panelDivider.on 'mousedown', @resizeStarted
detachResizeEvents: ->
@panelDivider.off 'mousedown'
onWindowResize: (event) =>
@terminal.disableAnimation()... | @windowHeight += offset
else
@terminal.height @terminal.getRowHeight()
@terminal.enableAnimation()
super()
resizeStarted: =>
return if @maximized
@maxHeight = @terminal.getPrevHeight() + $('.item-views').height()
$(document).on('mousemove', @resizePanel)
$(document).on('mouseup... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/panel-view.coffee | 67 | 116 |
jeremyramin/terminal-plus:lib/panel-view.coffee:5:raw_corpus | raw_corpus | nearestRow = @nearestRow(@terminal.height() + delta)
clamped = Math.max(nearestRow, @terminal.getRowHeight())
return if clamped > @maxHeight
@terminal.height clamped
@terminal.recalibrateSize()
###
Section: External Methods
###
open: =>
super()
@terminal.getStatusIcon().activate()
... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/panel-view.coffee | 117 | 166 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:5:completion | completion | nearestRow = @nearestRow(@terminal.height() + delta)
clamped = Math.max(nearestRow, @terminal.getRowHeight())
return if clamped > @maxHeight
@terminal.height clamped
@terminal.recalibrateSize()
###
Section: External Methods
###
open: =>
super()
@terminal.getStatusIcon().activate()
... | @focus()
@panel.show()
@terminal.height 0
@animating = true
@terminal.height @terminal.getPrevHeight() or defaultHeight
hide: ({refocus}={})=>
refocus ?= true
lastOpenedTerminal = null
@terminal.getStatusIcon().deactivate()
@onTransitionEnd =>
@panel.hide()
super(refocus... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/panel-view.coffee | 117 | 166 |
jeremyramin/terminal-plus:lib/panel-view.coffee:6:raw_corpus | raw_corpus | @terminal.clearHeight().disableAnimation()
tabView = new (require './tab-view') {@terminal}
tabView.toggle()
@remove()
isVisible: ->
@panel.isVisible()
###
Section: Helper Methods
###
nearestRow: (value) ->
rowHeight = @terminal.getRowHeight()
return rowHeight * Math.round(value / ... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/panel-view.coffee | 167 | 187 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:6:completion | completion | @terminal.clearHeight().disableAnimation()
tabView = new (require './tab-view') {@terminal}
tabView.toggle()
@remove()
isVisible: ->
@panel.isVisible()
### | Section: Helper Methods
###
nearestRow: (value) ->
rowHeight = @terminal.getRowHeight()
return rowHeight * Math.round(value / rowHeight)
onTransitionEnd: (callback) ->
@terminal.one 'webkitTransitionEnd', =>
callback()
@animating = false | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/panel-view.coffee | 167 | 187 |
jeremyramin/terminal-plus:lib/panel-view.coffee:3:raw_corpus | raw_corpus | class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: (options) ->
super(options)
@addDefaultButtons()
@statusIcon = new StatusIcon()
@statusIcon.initialize(@terminal)
@up... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895/lib/panel-view.coffee | 18 | 67 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: (options) ->
super(options)
@addDefaultButtons()
@statusIcon = new S... | var PanelView,
boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } };
PanelView = (function() {
class PanelView extends TerminalView {
constructor() {
super(...arguments);
this.destroy = t... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895/lib/panel-view.coffee | 18 | 67 |
jeremyramin/terminal-plus:lib/panel-view.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var PanelView,
boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } };
PanelView = (function() {
class PanelView extends TerminalView {
constructo... | class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: (options) ->
super(options)
@addDefaultButtons()
@statusIcon = new StatusIcon()
@statusIcon.initialize(@terminal)
@up... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895/lib/panel-view.coffee | 18 | 67 |
jeremyramin/terminal-plus:lib/panel-view.coffee:3:completion | completion | class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: (options) ->
super(options)
@addDefaultButtons()
@statusIcon = new StatusIcon()
@statusIcon.initialize(@terminal)
@up... | @panel.destroy()
@hide()
else
@panel.destroy()
super(keepTerminal)
###
Section: Setup
###
addDefaultButtons: ->
@closeBtn = @addButton 'right', @destroy, 'x'
@hideBtn = @addButton 'right', @hide, 'chevron-down'
@fullscreenBtn = @addButton 'right', @toggleFullscreen, 'screen-fu... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895/lib/panel-view.coffee | 18 | 67 |
jeremyramin/terminal-plus:lib/panel-view.coffee:4:raw_corpus | raw_corpus | attach: ->
return if @panel?
@panel = atom.workspace.addBottomPanel(item: this, visible: false)
###
Section: Resizing
###
attachResizeEvents: ->
@panelDivider.on 'mousedown', @resizeStarted
detachResizeEvents: ->
@panelDivider.off 'mousedown'
onWindowResize: (event) =>
@terminal.dis... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895/lib/panel-view.coffee | 68 | 117 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:4:completion | completion | attach: ->
return if @panel?
@panel = atom.workspace.addBottomPanel(item: this, visible: false)
###
Section: Resizing
###
attachResizeEvents: ->
@panelDivider.on 'mousedown', @resizeStarted
detachResizeEvents: ->
@panelDivider.off 'mousedown'
onWindowResize: (event) =>
@terminal.dis... | @terminal.height newHeight
@maxHeight += offset
@windowHeight += offset
else
@terminal.height @terminal.getRowHeight()
@terminal.enableAnimation()
super()
resizeStarted: =>
return if @maximized
@maxHeight = @terminal.getPrevHeight() + $('.item-views').height()
$(doc... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895/lib/panel-view.coffee | 68 | 117 |
jeremyramin/terminal-plus:lib/panel-view.coffee:5:raw_corpus | raw_corpus | delta = mouseY - $('atom-panel-container.bottom').height()
return unless Math.abs(delta) > (@terminal.getRowHeight() * 5 / 6)
nearestRow = @nearestRow(@terminal.height() + delta)
clamped = Math.max(nearestRow, @terminal.getRowHeight())
return if clamped > @maxHeight
@terminal.height clamped
@t... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895/lib/panel-view.coffee | 118 | 167 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:5:completion | completion | delta = mouseY - $('atom-panel-container.bottom').height()
return unless Math.abs(delta) > (@terminal.getRowHeight() * 5 / 6)
nearestRow = @nearestRow(@terminal.height() + delta)
clamped = Math.max(nearestRow, @terminal.getRowHeight())
return if clamped > @maxHeight
@terminal.height clamped
@t... | height = @nearestRow(@terminal.height())
@terminal.height(height)
@focus()
@panel.show()
@terminal.height 0
@animating = true
@terminal.height @terminal.getPrevHeight() or defaultHeight
hide: ({refocus}={})=>
refocus ?= true
@statusIcon.deactivate()
@onTransitionEnd =>
... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895/lib/panel-view.coffee | 118 | 167 |
jeremyramin/terminal-plus:lib/panel-view.coffee:6:raw_corpus | raw_corpus | @destroy keepTerminal: true
@terminal.clearHeight().disableAnimation()
tabView = new (require './tab-view') {@terminal}
tabView.toggle()
@remove()
isVisible: ->
@panel.isVisible()
###
Section: Helper Methods
###
nearestRow: (value) ->
rowHeight = @terminal.getRowHeight()
return... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895/lib/panel-view.coffee | 168 | 189 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:6:completion | completion | @destroy keepTerminal: true
@terminal.clearHeight().disableAnimation()
tabView = new (require './tab-view') {@terminal}
tabView.toggle()
@remove()
isVisible: ->
@panel.isVisible()
### | Section: Helper Methods
###
nearestRow: (value) ->
rowHeight = @terminal.getRowHeight()
return rowHeight * Math.round(value / rowHeight)
onTransitionEnd: (callback) ->
@terminal.one 'webkitTransitionEnd', =>
callback()
@animating = false | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9e03a6b0faa3609f6b8c6523d9e7dbd9419a1895/lib/panel-view.coffee | 168 | 189 |
jeremyramin/terminal-plus:lib/panel-view.coffee:3:raw_corpus | raw_corpus | class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: ({id, path, pwd, terminal}) ->
super {id, path, pwd, terminal}
@addDefaultButtons()
@statusIcon = new StatusIcon()
@statu... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/panel-view.coffee | 18 | 67 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: ({id, path, pwd, terminal}) ->
super {id, path, pwd, terminal}
@addDefaul... | var PanelView,
boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } };
PanelView = (function() {
class PanelView extends TerminalView {
constructor() {
super(...arguments);
this.destroy = t... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/panel-view.coffee | 18 | 67 |
jeremyramin/terminal-plus:lib/panel-view.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var PanelView,
boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } };
PanelView = (function() {
class PanelView extends TerminalView {
constructo... | class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: ({id, path, pwd, terminal}) ->
super {id, path, pwd, terminal}
@addDefaultButtons()
@statusIcon = new StatusIcon()
@statu... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/panel-view.coffee | 18 | 67 |
jeremyramin/terminal-plus:lib/panel-view.coffee:3:completion | completion | class PanelView extends TerminalView
animating: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: ({id, path, pwd, terminal}) ->
super {id, path, pwd, terminal}
@addDefaultButtons()
@statusIcon = new StatusIcon()
@statu... | @panel.destroy()
@hide()
else
@panel.destroy()
super(keepTerminal)
###
Section: Setup
###
addDefaultButtons: ->
@closeBtn = @addButton 'right', @destroy, 'x'
@hideBtn = @addButton 'right', @hide, 'chevron-down'
@fullscreenBtn = @addButton 'right', @toggleFullscreen, 'screen-fu... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/panel-view.coffee | 18 | 67 |
jeremyramin/terminal-plus:lib/panel-view.coffee:5:raw_corpus | raw_corpus | delta = mouseY - $('atom-panel-container.bottom').height()
return unless Math.abs(delta) > (@terminal.getRowHeight() * 5 / 6)
nearestRow = @nearestRow(@terminal.height() + delta)
clamped = Math.max(nearestRow, @terminal.getRowHeight())
return if clamped > @maxHeight
@terminal.height clamped
@t... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/panel-view.coffee | 118 | 167 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:5:completion | completion | delta = mouseY - $('atom-panel-container.bottom').height()
return unless Math.abs(delta) > (@terminal.getRowHeight() * 5 / 6)
nearestRow = @nearestRow(@terminal.height() + delta)
clamped = Math.max(nearestRow, @terminal.getRowHeight())
return if clamped > @maxHeight
@terminal.height clamped
@t... | height = @nearestRow(@terminal.height())
@terminal.height(height)
@focus()
@panel.show()
@terminal.height 0
@animating = true
@terminal.height @terminal.getPrevHeight() or defaultHeight
hide: ({refocus}={})=>
refocus ?= true
@statusIcon.deactivate()
@onTransitionEnd =>
... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/panel-view.coffee | 118 | 167 |
jeremyramin/terminal-plus:lib/panel-view.coffee:6:raw_corpus | raw_corpus | @hide()
else
@open()
updateName: (name) ->
@statusIcon.setName(name)
toggleFullscreen: =>
@destroy keepTerminal: true
@terminal.clearHeight().disableAnimation()
tabView = new (require './tab-view') {@terminal}
@remove()
isVisible: ->
@panel.isVisible()
###
Section: Helpe... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/panel-view.coffee | 168 | 196 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:6:completion | completion | @hide()
else
@open()
updateName: (name) ->
@statusIcon.setName(name)
toggleFullscreen: =>
@destroy keepTerminal: true
@terminal.clearHeight().disableAnimation()
tabView = new (require './tab-view') {@terminal}
@remove()
isVisible: -> | @panel.isVisible()
###
Section: Helper Methods
###
nearestRow: (value) ->
rowHeight = @terminal.getRowHeight()
return rowHeight * Math.round(value / rowHeight)
onTransitionEnd: (callback) ->
@terminal.one 'webkitTransitionEnd', =>
callback()
@animating = false | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/panel-view.coffee | 168 | 196 |
jeremyramin/terminal-plus:lib/panel-view.coffee:4:raw_corpus | raw_corpus | attach: ->
return if @panel?
@panel = atom.workspace.addBottomPanel(item: this, visible: false)
###
Section: Visuals
###
open: =>
super()
@statusIcon.activate()
if lastOpenedView and lastOpenedView != this
lastOpenedView.hide({refocus: false})
lastOpenedView = this
@onTran... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9baf5336e0f310f509256d5f9b44459b3a7f2882 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9baf5336e0f310f509256d5f9b44459b3a7f2882/lib/panel-view.coffee | 68 | 117 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:4:completion | completion | attach: ->
return if @panel?
@panel = atom.workspace.addBottomPanel(item: this, visible: false)
###
Section: Visuals
###
open: =>
super()
@statusIcon.activate()
if lastOpenedView and lastOpenedView != this
lastOpenedView.hide({refocus: false})
lastOpenedView = this
@onTran... | @panel.show()
@terminal.height 0
@animating = true
@terminal.height @terminal.getPrevHeight() or defaultHeight
hide: ({refocus}={})=>
refocus ?= true
@statusIcon.deactivate()
@onTransitionEnd =>
@panel.hide()
super(refocus)
@terminal.height @terminal.getPrevHeight()
@ani... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9baf5336e0f310f509256d5f9b44459b3a7f2882 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9baf5336e0f310f509256d5f9b44459b3a7f2882/lib/panel-view.coffee | 68 | 117 |
jeremyramin/terminal-plus:lib/panel-view.coffee:5:raw_corpus | raw_corpus | ###
Section: Resizing
###
attachResizeEvents: ->
@panelDivider.on 'mousedown', @resizeStarted
detachResizeEvents: ->
@panelDivider.off 'mousedown'
onWindowResize: (event) =>
@terminal.disableAnimation()
delta = atom.getSize().height - @windowHeight
if lines = (delta / @terminal.getRowH... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9baf5336e0f310f509256d5f9b44459b3a7f2882 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9baf5336e0f310f509256d5f9b44459b3a7f2882/lib/panel-view.coffee | 118 | 167 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:5:completion | completion | ###
Section: Resizing
###
attachResizeEvents: ->
@panelDivider.on 'mousedown', @resizeStarted
detachResizeEvents: ->
@panelDivider.off 'mousedown'
onWindowResize: (event) =>
@terminal.disableAnimation()
delta = atom.getSize().height - @windowHeight
if lines = (delta / @terminal.getRowH... | @terminal.enableAnimation()
super()
resizeStarted: =>
return if @maximized
@maxHeight = @terminal.getPrevHeight() + $('.item-views').height()
$(document).on('mousemove', @resizePanel)
$(document).on('mouseup', @resizeStopped)
@terminal.disableAnimation()
resizeStopped: =>
$(document).o... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9baf5336e0f310f509256d5f9b44459b3a7f2882 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9baf5336e0f310f509256d5f9b44459b3a7f2882/lib/panel-view.coffee | 118 | 167 |
jeremyramin/terminal-plus:lib/panel-view.coffee:6:raw_corpus | raw_corpus | @terminal.height clamped
@terminal.recalibrateSize()
###
Section: External Methods
###
updateName: (name) ->
@statusIcon.setName(name)
toggleFullscreen: =>
@destroy keepTerminal: true
@terminal.clearHeight().disableAnimation()
tabView = new (require './tab-view') {@terminal}
@remov... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9baf5336e0f310f509256d5f9b44459b3a7f2882 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9baf5336e0f310f509256d5f9b44459b3a7f2882/lib/panel-view.coffee | 168 | 201 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:6:completion | completion | @terminal.height clamped
@terminal.recalibrateSize()
###
Section: External Methods
###
updateName: (name) ->
@statusIcon.setName(name)
toggleFullscreen: =>
@destroy keepTerminal: true
@terminal.clearHeight().disableAnimation()
tabView = new (require './tab-view') {@terminal}
@remov... | isVisible: ->
@panel.isVisible()
###
Section: Helper Methods
###
nearestRow: (value) ->
rowHeight = @terminal.getRowHeight()
return rowHeight * Math.round(value / rowHeight)
onTransitionEnd: (callback) ->
@terminal.one 'webkitTransitionEnd', =>
callback()
@animating = false | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9baf5336e0f310f509256d5f9b44459b3a7f2882 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9baf5336e0f310f509256d5f9b44459b3a7f2882/lib/panel-view.coffee | 168 | 201 |
jeremyramin/terminal-plus:lib/panel-view.coffee:6:raw_corpus | raw_corpus | @terminal.height clamped
@terminal.recalibrateSize()
###
Section: External Methods
###
updateName: (name) ->
@statusIcon.setName(name)
toggleFullscreen: =>
@destroy keepTerminal: true
@terminal.clearHeight().disableAnimation()
tabView = new (require './tab-view') {@terminal}
@remov... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9846136d407b3f20ce78ac8bf12470ed999a0056 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9846136d407b3f20ce78ac8bf12470ed999a0056/lib/panel-view.coffee | 168 | 198 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:6:completion | completion | @terminal.height clamped
@terminal.recalibrateSize()
###
Section: External Methods
###
updateName: (name) ->
@statusIcon.setName(name)
toggleFullscreen: =>
@destroy keepTerminal: true
@terminal.clearHeight().disableAnimation()
tabView = new (require './tab-view') {@terminal} | @remove()
###
Section: Helper Methods
###
nearestRow: (value) ->
rowHeight = @terminal.getRowHeight()
return rowHeight * Math.round(value / rowHeight)
onTransitionEnd: (callback) ->
@terminal.one 'webkitTransitionEnd', =>
callback()
@animating = false | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 9846136d407b3f20ce78ac8bf12470ed999a0056 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9846136d407b3f20ce78ac8bf12470ed999a0056/lib/panel-view.coffee | 168 | 198 |
jeremyramin/terminal-plus:lib/panel-view.coffee:2:raw_corpus | raw_corpus | class PanelView extends TerminalView
animating: false
opened: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: ({id, statusBar, path, pwd, terminal}) ->
super {id, statusBar, path, pwd, terminal}
@closeBtn = @addButton 'right... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 8 | 57 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class PanelView extends TerminalView
animating: false
opened: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: ({id, statusBar, path, pwd, terminal}) ->
super {id, statusBar... | var PanelView,
boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } };
PanelView = (function() {
class PanelView extends TerminalView {
constructor() {
super(...arguments);
this.setAnimatio... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 8 | 57 |
jeremyramin/terminal-plus:lib/panel-view.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var PanelView,
boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } };
PanelView = (function() {
class PanelView extends TerminalView {
constructo... | class PanelView extends TerminalView
animating: false
opened: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: ({id, statusBar, path, pwd, terminal}) ->
super {id, statusBar, path, pwd, terminal}
@closeBtn = @addButton 'right... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 8 | 57 |
jeremyramin/terminal-plus:lib/panel-view.coffee:2:completion | completion | class PanelView extends TerminalView
animating: false
opened: false
windowHeight: atom.getSize().height
@getFocusedTerminal: ->
return TerminalView.getFocusedTerminal()
initialize: ({id, statusBar, path, pwd, terminal}) ->
super {id, statusBar, path, pwd, terminal}
@closeBtn = @addButton 'right... | @prevHeight = atom.config.get('terminal-plus.style.defaultPanelHeight')
if @prevHeight.indexOf('%') > 0
percent = Math.abs(Math.min(parseFloat(@prevHeight) / 100.0, 1))
bottomHeight = $('atom-panel.bottom').children(".terminal-view").height() or 0
@prevHeight = percent * ($('.item-views').height()... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 8 | 57 |
jeremyramin/terminal-plus:lib/panel-view.coffee:3:raw_corpus | raw_corpus | destroy: ({saveTerminal} = {}) =>
@detachResizeEvents()
@statusIcon.destroy()
if saveTerminal
@terminal = null
@panel.destroy()
else if @panel.isVisible()
@hide()
@onTransitionEnd => @panel.destroy()
else
@panel.destroy()
super()
open: =>
super()
@onTr... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 58 | 107 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:3:completion | completion | destroy: ({saveTerminal} = {}) =>
@detachResizeEvents()
@statusIcon.destroy()
if saveTerminal
@terminal = null
@panel.destroy()
else if @panel.isVisible()
@hide()
@onTransitionEnd => @panel.destroy()
else
@panel.destroy()
super()
open: =>
super()
@onTr... | else
@focus()
@panel.show()
@terminal.height 0
@animating = true
@terminal.height @prevHeight
hide: =>
super()
@onTransitionEnd =>
@panel.hide()
@prevHeight = @terminal.height()
@terminal.height @prevHeight
@animating = true
@terminal.height 0
toggle: ->
... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 58 | 107 |
jeremyramin/terminal-plus:lib/panel-view.coffee:4:raw_corpus | raw_corpus | @open()
attachResizeEvents: ->
@panelDivider.on 'mousedown', @resizeStarted
detachResizeEvents: ->
@panelDivider.off 'mousedown'
onWindowResize: (event) =>
@terminal.css 'transition', ''
delta = atom.getSize().height - @windowHeight
if Math.abs(delta) > @terminal.getRowHeight()
newHe... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 108 | 157 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
@open()
attachResizeEvents: ->
@panelDivider.on 'mousedown', @resizeStarted
detachResizeEvents: ->
@panelDivider.off 'mousedown'
onWindowResize: (event) =>
@terminal.css 'transition', ''
delta = atom.getSize().height - @windowHeight
... | this.open()({
attachResizeEvents: function() {
return this.panelDivider.on('mousedown', this.resizeStarted);
},
detachResizeEvents: function() {
return this.panelDivider.off('mousedown');
},
onWindowResize: (event) => {
var clamped, delta, newHeight;
this.terminal.css('transition', '');
de... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 108 | 157 |
jeremyramin/terminal-plus:lib/panel-view.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.open()({
attachResizeEvents: function() {
return this.panelDivider.on('mousedown', this.resizeStarted);
},
detachResizeEvents: function() {
return this.panelDivider.off('mousedown');
},
onWindowResize: (event) => {
var clamped, delta, new... | @open()
attachResizeEvents: ->
@panelDivider.on 'mousedown', @resizeStarted
detachResizeEvents: ->
@panelDivider.off 'mousedown'
onWindowResize: (event) =>
@terminal.css 'transition', ''
delta = atom.getSize().height - @windowHeight
if Math.abs(delta) > @terminal.getRowHeight()
newHe... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 108 | 157 |
jeremyramin/terminal-plus:lib/panel-view.coffee:4:completion | completion | @open()
attachResizeEvents: ->
@panelDivider.on 'mousedown', @resizeStarted
detachResizeEvents: ->
@panelDivider.off 'mousedown'
onWindowResize: (event) =>
@terminal.css 'transition', ''
delta = atom.getSize().height - @windowHeight
if Math.abs(delta) > @terminal.getRowHeight()
newHe... | @terminal.css 'transition', "height #{0.25 / @animationSpeed}s linear"
resizeStarted: =>
return if @maximized
@maxHeight = @prevHeight + $('.item-views').height()
$(document).on('mousemove', @resizePanel)
$(document).on('mouseup', @resizeStopped)
@terminal.css 'transition', ''
resizeStopped: =... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 108 | 157 |
jeremyramin/terminal-plus:lib/panel-view.coffee:5:raw_corpus | raw_corpus | nearestRow = @nearestRow(@terminal.height() + delta)
clamped = Math.max(nearestRow, @terminal.getRowHeight())
return if clamped > @maxHeight
@adjustHeight clamped
@terminal.recalibrateSize()
onTransitionEnd: (callback) ->
@terminal.one 'webkitTransitionEnd', =>
callback()
@animating ... | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 158 | 184 | ||
jeremyramin/terminal-plus:lib/panel-view.coffee:5:completion | completion | nearestRow = @nearestRow(@terminal.height() + delta)
clamped = Math.max(nearestRow, @terminal.getRowHeight())
return if clamped > @maxHeight
@adjustHeight clamped
@terminal.recalibrateSize()
onTransitionEnd: (callback) ->
@terminal.one 'webkitTransitionEnd', =>
callback()
@animating ... | @terminal.height height
@prevHeight = height
setName: (name) ->
super(name)
@statusIcon.updateName(@name)
toggleFullscreen: =>
terminal = @terminal
@destroy({saveTerminal: true})
tab = new (require './tab-view') {@id, @statusBar, terminal}
tab.attach()
terminal.focus() | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/panel-view.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/panel-view.coffee | 158 | 184 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:1:raw_corpus | raw_corpus | module.exports = React.createClass
displayName: 'launch-fullscreen'
mixins: [ mixinQuery, mixinSubscribe ]
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
getInitialState: ->
data: Immutable.Map()
tabKey: DEFAULT_TYPE
buttons: [
{ key: 'room', color: 'blue', ico... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 28 | 77 | ||
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = React.createClass
displayName: 'launch-fullscreen'
mixins: [ mixinQuery, mixinSubscribe ]
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
getInitialState: ->
data: Immutable.Map()
tabKey: DEFAULT_TY... | var indexOf = [].indexOf;
module.exports = React.createClass({
displayName: 'launch-fullscreen',
mixins: [mixinQuery, mixinSubscribe],
propTypes: {
_teamId: T.string.isRequired,
_userId: T.string.isRequired
},
getInitialState: function() {
return {
data: Immutable.Map(),
tabKey: DEFAU... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 28 | 77 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var indexOf = [].indexOf;
module.exports = React.createClass({
displayName: 'launch-fullscreen',
mixins: [mixinQuery, mixinSubscribe],
propTypes: {
_teamId: T.string.isRequired,
_userId: T.string.isRequired
},
getInitialState: function() {
re... | module.exports = React.createClass
displayName: 'launch-fullscreen'
mixins: [ mixinQuery, mixinSubscribe ]
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
getInitialState: ->
data: Immutable.Map()
tabKey: DEFAULT_TYPE
buttons: [
{ key: 'room', color: 'blue', ico... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 28 | 77 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:1:completion | completion | module.exports = React.createClass
displayName: 'launch-fullscreen'
mixins: [ mixinQuery, mixinSubscribe ]
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
getInitialState: ->
data: Immutable.Map()
tabKey: DEFAULT_TYPE
buttons: [
{ key: 'room', color: 'blue', ico... | archivedRooms: @getArchivedRooms()
componentDidMount: ->
# 保留 Story -> Topic 的草稿
for name in ['file', 'link']
draftActions.deleteStoryDraft @props._teamId, name
@subscribe recorder, =>
@setState
data: @getStoryDraftData @state.tabKey
# store datas
rooms: @getRooms()
... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 28 | 77 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:2:raw_corpus | raw_corpus | isValidStoryData: ->
@state.data?.getIn([ 'data', 'fileKey' ])?.length or @state.data?.getIn([ 'data', 'title' ])?.trim().length
getStoryDraftData: (category) ->
if @isStory category
query.storyDraftBy recorder.getState(), @props._teamId, category
onCreateStory: (completeCB) ->
if not @isValidSt... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 78 | 127 | ||
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
isValidStoryData: ->
@state.data?.getIn([ 'data', 'fileKey' ])?.length or @state.data?.getIn([ 'data', 'title' ])?.trim().length
getStoryDraftData: (category) ->
if @isStory category
query.storyDraftBy recorder.getState(), @props._teamId, categor... | ({
isValidStoryData: function() {
var ref, ref1, ref2, ref3;
return ((ref = this.state.data) != null ? (ref1 = ref.getIn(['data', 'fileKey'])) != null ? ref1.length : void 0 : void 0) || ((ref2 = this.state.data) != null ? (ref3 = ref2.getIn(['data', 'title'])) != null ? ref3.trim().length : void 0 : void 0);... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 78 | 127 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
isValidStoryData: function() {
var ref, ref1, ref2, ref3;
return ((ref = this.state.data) != null ? (ref1 = ref.getIn(['data', 'fileKey'])) != null ? ref1.length : void 0 : void 0) || ((ref2 = this.state.data) != null ? (ref3 = ref2.getIn(['data', 'tit... | isValidStoryData: ->
@state.data?.getIn([ 'data', 'fileKey' ])?.length or @state.data?.getIn([ 'data', 'title' ])?.trim().length
getStoryDraftData: (category) ->
if @isStory category
query.storyDraftBy recorder.getState(), @props._teamId, category
onCreateStory: (completeCB) ->
if not @isValidSt... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 78 | 127 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:2:completion | completion | isValidStoryData: ->
@state.data?.getIn([ 'data', 'fileKey' ])?.length or @state.data?.getIn([ 'data', 'title' ])?.trim().length
getStoryDraftData: (category) ->
if @isStory category
query.storyDraftBy recorder.getState(), @props._teamId, category
onCreateStory: (completeCB) ->
if not @isValidSt... | @onClearStory()
completeCB()
, ->
completeCB()
onClearStory: ->
if @isStory()
draftActions.deleteStoryDraft @props._teamId, @state.tabKey
onClose: ->
handlers.router.back()
onSwitchTab: (tabKey) ->
switch tabKey
when 'room' then analytics.clickRoom()
when 'chat' th... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 78 | 127 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:3:raw_corpus | raw_corpus | renderButton: ->
ul className: 'btns flex-center flex-horiz',
@state.buttons.map (item, index) =>
onClick = => @onSwitchTab item.key
className = cx item.color, 'active': @state.tabKey is item.key
li key: index, className: (cx 'btn-cell', className),
button className: (cx 'cl... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 128 | 177 | ||
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
renderButton: ->
ul className: 'btns flex-center flex-horiz',
@state.buttons.map (item, index) =>
onClick = => @onSwitchTab item.key
className = cx item.color, 'active': @state.tabKey is item.key
li key: index, className: (cx 'b... | ({
renderButton: function() {
return ul({
className: 'btns flex-center flex-horiz'
}, this.state.buttons.map((item, index) => {
var className, onClick;
onClick = () => {
return this.onSwitchTab(item.key);
};
className = cx(item.color, {
'active': this.state.tabKey... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 128 | 177 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
renderButton: function() {
return ul({
className: 'btns flex-center flex-horiz'
}, this.state.buttons.map((item, index) => {
var className, onClick;
onClick = () => {
return this.onSwitchTab(item.key);
};
className... | renderButton: ->
ul className: 'btns flex-center flex-horiz',
@state.buttons.map (item, index) =>
onClick = => @onSwitchTab item.key
className = cx item.color, 'active': @state.tabKey is item.key
li key: index, className: (cx 'btn-cell', className),
button className: (cx 'cl... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 128 | 177 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:3:completion | completion | renderButton: ->
ul className: 'btns flex-center flex-horiz',
@state.buttons.map (item, index) =>
onClick = => @onSwitchTab item.key
className = cx item.color, 'active': @state.tabKey is item.key
li key: index, className: (cx 'btn-cell', className),
button className: (cx 'cl... | button className: cleanButtonClass, onClick: @onClearStory,
lang.getText('reset-form')
ButtonSingleAction className: submitButtonClass, onClick: @onCreateStory,
Icon size: 20, name: 'tick'
lang.getText('create-story')
renderTab: ->
LaunchTabpage
_teamId: @props._teamId
_... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 128 | 177 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:4:raw_corpus | raw_corpus | div className: 'wrapper',
@renderTab()
if @isStory()
div className: cx('footer', 'is-show': @isValidStoryData()),
@renderStoryAction() | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 178 | 182 | ||
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
div className: 'wrapper',
@renderTab()
if @isStory()
div className: cx('footer', 'is-show': @isValidStoryData()),
@renderStoryAction()
``` | div({
className: 'wrapper'
}, this.renderTab());
if (this.isStory()) {
div({
className: cx('footer', {
'is-show': this.isValidStoryData()
})
}, this.renderStoryAction());
} | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 178 | 182 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
div({
className: 'wrapper'
}, this.renderTab());
if (this.isStory()) {
div({
className: cx('footer', {
'is-show': this.isValidStoryData()
})
}, this.renderStoryAction());
}
``` | div className: 'wrapper',
@renderTab()
if @isStory()
div className: cx('footer', 'is-show': @isValidStoryData()),
@renderStoryAction() | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 178 | 182 |
jianliaoim/talk-os:talk-web/client/app/launch-fullscreen.coffee:4:completion | completion | div className: 'wrapper',
@renderTab() | if @isStory()
div className: cx('footer', 'is-show': @isValidStoryData()),
@renderStoryAction() | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/launch-fullscreen.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/launch-fullscreen.coffee | 178 | 182 |
yakyak/yakyak:src/ui/about.coffee:1:raw_corpus | raw_corpus | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lin... | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/about.coffee | 1 | 50 | ||
yakyak/yakyak:src/ui/about.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and s... | var Menu, aboutWindow, aboutlayout, clipboard, i18n, i18nOpts, ipc, path, remote, trifl;
path = require('path');
trifl = require('trifl');
ipc = require('electron').ipcRenderer;
remote = require('electron').remote;
clipboard = require('electron').clipboard;
Menu = remote.Menu;
path = require('path');
// Catche... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/about.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Menu, aboutWindow, aboutlayout, clipboard, i18n, i18nOpts, ipc, path, remote, trifl;
path = require('path');
trifl = require('trifl');
ipc = require('electron').ipcRenderer;
remote = require('electron').remote;
clipboard = require('electron').clipboard;
M... | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lin... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:completion | completion | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lin... | i18n.configure i18nOpts.opts
i18n.setLocale(i18nOpts.locale) if i18nOpts.locale?
# simple context menu that can only copy
aboutWindow.webContents.on 'context-menu', (e, params) ->
e.preventDefault()
menuTemplate = [{
label: i18n.__('menu.edit.copy:Copy')
role: 'copy'
enabled: params.edi... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:2:raw_corpus | raw_corpus | link_out = (ev)->
ev.preventDefault()
address = e.currentTarget.getAttribute 'href'
require('electron').shell.openExternal address
false | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/about.coffee | 51 | 56 | ||
yakyak/yakyak:src/ui/about.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
link_out = (ev)->
ev.preventDefault()
address = e.currentTarget.getAttribute 'href'
require('electron').shell.openExternal address
false
``` | var link_out;
link_out = function(ev) {
var address;
ev.preventDefault();
address = e.currentTarget.getAttribute('href');
require('electron').shell.openExternal(address);
return false;
}; | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/about.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/about.coffee | 51 | 56 |
yakyak/yakyak:src/ui/about.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var link_out;
link_out = function(ev) {
var address;
ev.preventDefault();
address = e.currentTarget.getAttribute('href');
require('electron').shell.openExternal(address);
return false;
};
``` | link_out = (ev)->
ev.preventDefault()
address = e.currentTarget.getAttribute 'href'
require('electron').shell.openExternal address
false | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/about.coffee | 51 | 56 |
yakyak/yakyak:src/ui/about.coffee:2:completion | completion | link_out = (ev)->
ev.preventDefault() | address = e.currentTarget.getAttribute 'href'
require('electron').shell.openExternal address
false | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/about.coffee | 51 | 56 |
yakyak/yakyak:src/ui/about.coffee:1:raw_corpus | raw_corpus | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lin... | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 7800c1ff30d3e9eb1ab618a4bd8799810d94aeb9 | 3,762 | https://github.com/yakyak/yakyak/blob/7800c1ff30d3e9eb1ab618a4bd8799810d94aeb9/src/ui/about.coffee | 1 | 50 | ||
yakyak/yakyak:src/ui/about.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and s... | var Menu, aboutWindow, aboutlayout, clipboard, i18n, i18nOpts, ipc, path, remote, trifl;
path = require('path');
trifl = require('trifl');
ipc = require('electron').ipcRenderer;
remote = require('electron').remote;
clipboard = require('electron').clipboard;
Menu = remote.Menu;
path = require('path');
// Catche... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/about.coffee | MIT | 7800c1ff30d3e9eb1ab618a4bd8799810d94aeb9 | 3,762 | https://github.com/yakyak/yakyak/blob/7800c1ff30d3e9eb1ab618a4bd8799810d94aeb9/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Menu, aboutWindow, aboutlayout, clipboard, i18n, i18nOpts, ipc, path, remote, trifl;
path = require('path');
trifl = require('trifl');
ipc = require('electron').ipcRenderer;
remote = require('electron').remote;
clipboard = require('electron').clipboard;
M... | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lin... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 7800c1ff30d3e9eb1ab618a4bd8799810d94aeb9 | 3,762 | https://github.com/yakyak/yakyak/blob/7800c1ff30d3e9eb1ab618a4bd8799810d94aeb9/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:completion | completion | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lin... | i18n.configure i18nOpts.opts
i18n.setLocale(i18nOpts.locale) if i18nOpts.locale?
# simple context menu that can only copy
aboutWindow.webContents.on 'context-menu', (e, params) ->
e.preventDefault()
menuTemplate = [{
label: i18n.__('menu.edit.copy')
role: 'copy'
enabled: params.editFlag... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 7800c1ff30d3e9eb1ab618a4bd8799810d94aeb9 | 3,762 | https://github.com/yakyak/yakyak/blob/7800c1ff30d3e9eb1ab618a4bd8799810d94aeb9/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:raw_corpus | raw_corpus | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lin... | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 5b8a5b966b9b80ae6a4aeb77cd1aaa7c30f6659d | 3,762 | https://github.com/yakyak/yakyak/blob/5b8a5b966b9b80ae6a4aeb77cd1aaa7c30f6659d/src/ui/about.coffee | 1 | 50 | ||
yakyak/yakyak:src/ui/about.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and s... | var Menu, aboutWindow, aboutlayout, clipboard, i18n, i18nOpts, ipc, path, remote, trifl;
path = require('path');
trifl = require('trifl');
ipc = require('electron').ipcRenderer;
remote = require('electron').remote;
clipboard = require('electron').clipboard;
Menu = remote.Menu;
path = require('path');
// Catche... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/about.coffee | MIT | 5b8a5b966b9b80ae6a4aeb77cd1aaa7c30f6659d | 3,762 | https://github.com/yakyak/yakyak/blob/5b8a5b966b9b80ae6a4aeb77cd1aaa7c30f6659d/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Menu, aboutWindow, aboutlayout, clipboard, i18n, i18nOpts, ipc, path, remote, trifl;
path = require('path');
trifl = require('trifl');
ipc = require('electron').ipcRenderer;
remote = require('electron').remote;
clipboard = require('electron').clipboard;
M... | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lin... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 5b8a5b966b9b80ae6a4aeb77cd1aaa7c30f6659d | 3,762 | https://github.com/yakyak/yakyak/blob/5b8a5b966b9b80ae6a4aeb77cd1aaa7c30f6659d/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:completion | completion | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
path = require 'path'
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lin... | i18n.configure i18nOpts.opts
i18n.setLocale(i18nOpts.locale) if i18nOpts.locale?
# simple context menu that can only copy
aboutWindow.webContents.on 'context-menu', (e, params) ->
e.preventDefault()
menuTemplate = [{
label: 'Copy'
role: 'copy'
enabled: params.editFlags.canCopy
}
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 5b8a5b966b9b80ae6a4aeb77cd1aaa7c30f6659d | 3,762 | https://github.com/yakyak/yakyak/blob/5b8a5b966b9b80ae6a4aeb77cd1aaa7c30f6659d/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:raw_corpus | raw_corpus | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lineNo, columnNo, error) ... | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | e5ee49b6b26189b426d9dfaa24c9ba84cceae0a6 | 3,762 | https://github.com/yakyak/yakyak/blob/e5ee49b6b26189b426d9dfaa24c9ba84cceae0a6/src/ui/about.coffee | 1 | 50 | ||
yakyak/yakyak:src/ui/about.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
#
#
# Catches errors in window and show them in the consol... | var Menu, aboutWindow, aboutlayout, clipboard, i18n, i18nOpts, ipc, path, remote, trifl;
path = require('path');
trifl = require('trifl');
ipc = require('electron').ipcRenderer;
remote = require('electron').remote;
clipboard = require('electron').clipboard;
Menu = remote.Menu;
// Catches errors in window and sh... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/about.coffee | MIT | e5ee49b6b26189b426d9dfaa24c9ba84cceae0a6 | 3,762 | https://github.com/yakyak/yakyak/blob/e5ee49b6b26189b426d9dfaa24c9ba84cceae0a6/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Menu, aboutWindow, aboutlayout, clipboard, i18n, i18nOpts, ipc, path, remote, trifl;
path = require('path');
trifl = require('trifl');
ipc = require('electron').ipcRenderer;
remote = require('electron').remote;
clipboard = require('electron').clipboard;
M... | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lineNo, columnNo, error) ... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | e5ee49b6b26189b426d9dfaa24c9ba84cceae0a6 | 3,762 | https://github.com/yakyak/yakyak/blob/e5ee49b6b26189b426d9dfaa24c9ba84cceae0a6/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:completion | completion | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lineNo, columnNo, error) ... | i18n.configure i18nOpts.opts
i18n.setLocale(i18nOpts.locale) if i18nOpts.locale?
# simple context menu that can only copy
aboutWindow.webContents.on 'context-menu', (e, params) ->
e.preventDefault()
menuTemplate = [{
label: 'Copy'
role: 'copy'
enabled: params.editFlags.canCopy
}
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | e5ee49b6b26189b426d9dfaa24c9ba84cceae0a6 | 3,762 | https://github.com/yakyak/yakyak/blob/e5ee49b6b26189b426d9dfaa24c9ba84cceae0a6/src/ui/about.coffee | 1 | 50 |
yakyak/yakyak:src/ui/about.coffee:1:raw_corpus | raw_corpus | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lineNo, columnNo, error) ... | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 7dfb27c3046340b03da464f0658a2180e21a02e5 | 3,762 | https://github.com/yakyak/yakyak/blob/7dfb27c3046340b03da464f0658a2180e21a02e5/src/ui/about.coffee | 1 | 45 | ||
yakyak/yakyak:src/ui/about.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
#
#
# Catches errors in window and show them in the consol... | var Menu, aboutWindow, aboutlayout, clipboard, ipc, link_out, path, remote, trifl;
path = require('path');
trifl = require('trifl');
ipc = require('electron').ipcRenderer;
remote = require('electron').remote;
clipboard = require('electron').clipboard;
Menu = remote.Menu;
// Catches errors in window and show the... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/about.coffee | MIT | 7dfb27c3046340b03da464f0658a2180e21a02e5 | 3,762 | https://github.com/yakyak/yakyak/blob/7dfb27c3046340b03da464f0658a2180e21a02e5/src/ui/about.coffee | 1 | 45 |
yakyak/yakyak:src/ui/about.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Menu, aboutWindow, aboutlayout, clipboard, ipc, link_out, path, remote, trifl;
path = require('path');
trifl = require('trifl');
ipc = require('electron').ipcRenderer;
remote = require('electron').remote;
clipboard = require('electron').clipboard;
Menu = ... | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lineNo, columnNo, error) ... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 7dfb27c3046340b03da464f0658a2180e21a02e5 | 3,762 | https://github.com/yakyak/yakyak/blob/7dfb27c3046340b03da464f0658a2180e21a02e5/src/ui/about.coffee | 1 | 45 |
yakyak/yakyak:src/ui/about.coffee:1:completion | completion | path = require 'path'
trifl = require 'trifl'
ipc = require('electron').ipcRenderer
remote = require('electron').remote
clipboard = require('electron').clipboard
Menu = remote.Menu
#
#
# Catches errors in window and show them in the console
#
window.onerror = (msg, url, lineNo, columnNo, error) ... | label: 'Copy'
role: 'copy'
enabled: params.editFlags.canCopy
}
{
label: "Copy Link"
visible: params.linkURL != '' and params.mediaType == 'none'
click: () ->
if process.platform == 'darwin'
clipboard
.writeBookmark params.linkTe... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | 7dfb27c3046340b03da464f0658a2180e21a02e5 | 3,762 | https://github.com/yakyak/yakyak/blob/7dfb27c3046340b03da464f0658a2180e21a02e5/src/ui/about.coffee | 1 | 45 |
yakyak/yakyak:src/ui/about.coffee:1:raw_corpus | raw_corpus | ipc = require('electron').ipcRenderer
path = require 'path'
remote = require('electron').remote
window.onerror = (msg, url, lineNo, columnNo, error) ->
hash = {msg, url, lineNo, columnNo, error}
ipc.send 'errorInWindow', hash, "About"
aboutlayout = require './views/aboutlayout'
document.body.appendChild ab... | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | c453875b86a737cd756678c333f44ff5fe1fee65 | 3,762 | https://github.com/yakyak/yakyak/blob/c453875b86a737cd756678c333f44ff5fe1fee65/src/ui/about.coffee | 1 | 18 | ||
yakyak/yakyak:src/ui/about.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
ipc = require('electron').ipcRenderer
path = require 'path'
remote = require('electron').remote
window.onerror = (msg, url, lineNo, columnNo, error) ->
hash = {msg, url, lineNo, columnNo, error}
ipc.send 'errorInWindow', hash, "About"
aboutlayout = re... | var aboutlayout, ipc, link_out, path, remote;
ipc = require('electron').ipcRenderer;
path = require('path');
remote = require('electron').remote;
window.onerror = function(msg, url, lineNo, columnNo, error) {
var hash;
hash = {msg, url, lineNo, columnNo, error};
return ipc.send('errorInWindow', hash, "About")... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/about.coffee | MIT | c453875b86a737cd756678c333f44ff5fe1fee65 | 3,762 | https://github.com/yakyak/yakyak/blob/c453875b86a737cd756678c333f44ff5fe1fee65/src/ui/about.coffee | 1 | 18 |
yakyak/yakyak:src/ui/about.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var aboutlayout, ipc, link_out, path, remote;
ipc = require('electron').ipcRenderer;
path = require('path');
remote = require('electron').remote;
window.onerror = function(msg, url, lineNo, columnNo, error) {
var hash;
hash = {msg, url, lineNo, columnNo, er... | ipc = require('electron').ipcRenderer
path = require 'path'
remote = require('electron').remote
window.onerror = (msg, url, lineNo, columnNo, error) ->
hash = {msg, url, lineNo, columnNo, error}
ipc.send 'errorInWindow', hash, "About"
aboutlayout = require './views/aboutlayout'
document.body.appendChild ab... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | c453875b86a737cd756678c333f44ff5fe1fee65 | 3,762 | https://github.com/yakyak/yakyak/blob/c453875b86a737cd756678c333f44ff5fe1fee65/src/ui/about.coffee | 1 | 18 |
yakyak/yakyak:src/ui/about.coffee:1:completion | completion | ipc = require('electron').ipcRenderer
path = require 'path'
remote = require('electron').remote
window.onerror = (msg, url, lineNo, columnNo, error) ->
hash = {msg, url, lineNo, columnNo, error}
ipc.send 'errorInWindow', hash, "About" | aboutlayout = require './views/aboutlayout'
document.body.appendChild aboutlayout.el
link_out = (ev)->
ev.preventDefault()
address = e.currentTarget.getAttribute 'href'
require('electron').shell.openExternal address
false | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/about.coffee | MIT | c453875b86a737cd756678c333f44ff5fe1fee65 | 3,762 | https://github.com/yakyak/yakyak/blob/c453875b86a737cd756678c333f44ff5fe1fee65/src/ui/about.coffee | 1 | 18 |
iostreamer-X/Awkward:util.coffee:1:raw_corpus | raw_corpus | cliff = require 'cliff'
cliff.inspect = (require 'eyes').inspector(
styles: {
all: 'red',
label: 'underline',
other: 'inverted',
key: 'bold',
special: 'grey',
string: 'green',
number: 'magenta',
bool: 'blue',
regexp: 'green'
})
module.exports.... | CoffeeScript | iostreamer-X/Awkward | util.coffee | MIT | 4deba7087cfbcf772ec18ce95cba2f5d340f2071 | 458 | https://github.com/iostreamer-X/Awkward/blob/4deba7087cfbcf772ec18ce95cba2f5d340f2071/util.coffee | 1 | 23 | ||
iostreamer-X/Awkward:util.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
cliff = require 'cliff'
cliff.inspect = (require 'eyes').inspector(
styles: {
all: 'red',
label: 'underline',
other: 'inverted',
key: 'bold',
special: 'grey',
string: 'green',
number: 'magenta',
bool... | var cliff, tryParseJSON;
cliff = require('cliff');
cliff.inspect = (require('eyes')).inspector({
styles: {
all: 'red',
label: 'underline',
other: 'inverted',
key: 'bold',
special: 'grey',
string: 'green',
number: 'magenta',
bool: 'blue',
regexp: 'green'
}
});
module.exports.cl... | CoffeeScript | JavaScript | iostreamer-X/Awkward | util.coffee | MIT | 4deba7087cfbcf772ec18ce95cba2f5d340f2071 | 458 | https://github.com/iostreamer-X/Awkward/blob/4deba7087cfbcf772ec18ce95cba2f5d340f2071/util.coffee | 1 | 23 |
iostreamer-X/Awkward:util.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var cliff, tryParseJSON;
cliff = require('cliff');
cliff.inspect = (require('eyes')).inspector({
styles: {
all: 'red',
label: 'underline',
other: 'inverted',
key: 'bold',
special: 'grey',
string: 'green',
number: 'magenta',
bool:... | cliff = require 'cliff'
cliff.inspect = (require 'eyes').inspector(
styles: {
all: 'red',
label: 'underline',
other: 'inverted',
key: 'bold',
special: 'grey',
string: 'green',
number: 'magenta',
bool: 'blue',
regexp: 'green'
})
module.exports.... | JavaScript | CoffeeScript | iostreamer-X/Awkward | util.coffee | MIT | 4deba7087cfbcf772ec18ce95cba2f5d340f2071 | 458 | https://github.com/iostreamer-X/Awkward/blob/4deba7087cfbcf772ec18ce95cba2f5d340f2071/util.coffee | 1 | 23 |
iostreamer-X/Awkward:util.coffee:1:completion | completion | cliff = require 'cliff'
cliff.inspect = (require 'eyes').inspector(
styles: {
all: 'red',
label: 'underline',
other: 'inverted',
key: 'bold',
special: 'grey',
string: 'green',
number: 'magenta',
bool: 'blue', | regexp: 'green'
})
module.exports.cliff = cliff
module.exports.tryParseJSON = tryParseJSON = (jsonString) ->
try
o = JSON.parse(jsonString)
if o and typeof o == 'object'
return o
catch e
false | CoffeeScript | CoffeeScript | iostreamer-X/Awkward | util.coffee | MIT | 4deba7087cfbcf772ec18ce95cba2f5d340f2071 | 458 | https://github.com/iostreamer-X/Awkward/blob/4deba7087cfbcf772ec18ce95cba2f5d340f2071/util.coffee | 1 | 23 |
Pagedraw/pagedraw:bin/print-history.coffee:1:raw_corpus | raw_corpus | fs = require 'fs'
stdin = JSON.parse fs.readFileSync('/dev/stdin').toString()
printJson = (elem) -> console.log JSON.stringify(elem, null, ' ')
for elem in Object.values(stdin.history)
printJson JSON.parse(elem) | CoffeeScript | Pagedraw/pagedraw | bin/print-history.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/bin/print-history.coffee | 1 | 8 | ||
Pagedraw/pagedraw:bin/print-history.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
fs = require 'fs'
stdin = JSON.parse fs.readFileSync('/dev/stdin').toString()
printJson = (elem) -> console.log JSON.stringify(elem, null, ' ')
for elem in Object.values(stdin.history)
printJson JSON.parse(elem)
``` | var elem, fs, i, len, printJson, ref, stdin;
fs = require('fs');
stdin = JSON.parse(fs.readFileSync('/dev/stdin').toString());
printJson = function(elem) {
return console.log(JSON.stringify(elem, null, ' '));
};
ref = Object.values(stdin.history);
for (i = 0, len = ref.length; i < len; i++) {
elem = ref[i];
... | CoffeeScript | JavaScript | Pagedraw/pagedraw | bin/print-history.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/bin/print-history.coffee | 1 | 8 |
Pagedraw/pagedraw:bin/print-history.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var elem, fs, i, len, printJson, ref, stdin;
fs = require('fs');
stdin = JSON.parse(fs.readFileSync('/dev/stdin').toString());
printJson = function(elem) {
return console.log(JSON.stringify(elem, null, ' '));
};
ref = Object.values(stdin.history);
for (i =... | fs = require 'fs'
stdin = JSON.parse fs.readFileSync('/dev/stdin').toString()
printJson = (elem) -> console.log JSON.stringify(elem, null, ' ')
for elem in Object.values(stdin.history)
printJson JSON.parse(elem) | JavaScript | CoffeeScript | Pagedraw/pagedraw | bin/print-history.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/bin/print-history.coffee | 1 | 8 |
Pagedraw/pagedraw:bin/print-history.coffee:1:completion | completion | fs = require 'fs'
stdin = JSON.parse fs.readFileSync('/dev/stdin').toString() | printJson = (elem) -> console.log JSON.stringify(elem, null, ' ')
for elem in Object.values(stdin.history)
printJson JSON.parse(elem) | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | bin/print-history.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/bin/print-history.coffee | 1 | 8 |
yakyak/yakyak:src/ui/views/startup.coffee:1:raw_corpus | raw_corpus | path = require 'path'
{later} = require '../util'
module.exports = view (models) ->
{connection, viewstate} = models
classList = ['connecting']
if viewstate.loadedContacts
classList.push 'hide'
div class: classList.join(' '), ->
div ->
div ->
img src: path.... | CoffeeScript | yakyak/yakyak | src/ui/views/startup.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/startup.coffee | 1 | 27 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.