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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nevir/groc:lib/utils.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var error, i, j, len, s, segment;
if (highlighted.length !== segments.length) {
error = new Error(util.format('pygmentize rendered %d of %d segments; expected to be equal', highlighted.length, segments.length));
error.pygmentsOutput = result;
return callback... | if highlighted.length != segments.length
error = new Error util.format 'pygmentize rendered %d of %d segments; expected to be equal',
highlighted.length, segments.length
error.pygmentsOutput = result
return callback error
# Attach highlighted source to the highlightedCode prope... | JavaScript | CoffeeScript | nevir/groc | lib/utils.coffee | MIT | bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8 | 579 | https://github.com/nevir/groc/blob/bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8/lib/utils.coffee | 87 | 120 |
nevir/groc:lib/utils.coffee:3:completion | completion | if highlighted.length != segments.length
error = new Error util.format 'pygmentize rendered %d of %d segments; expected to be equal',
highlighted.length, segments.length
error.pygmentsOutput = result
return callback error
# Attach highlighted source to the highlightedCode prope... | # Annotate an array of segments by running their comments through
# [showdown](https://github.com/coreyti/showdown).
markdownComments: (segments, project, callback) ->
converter = new showdown.Showdown.converter()
try
for segment in segments
segment.markdownedComments = converter.makeHtml seg... | CoffeeScript | CoffeeScript | nevir/groc | lib/utils.coffee | MIT | bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8 | 579 | https://github.com/nevir/groc/blob/bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8/lib/utils.coffee | 87 | 120 |
jianliaoim/talk-os:talk-web/client/app/setting-sync.coffee:1:raw_corpus | raw_corpus | cx = require 'classnames'
React = require 'react'
recorder = require 'actions-recorder'
query = require '../query'
teamActions = require '../actions/team'
accountActions = require '../actions/account'
notifyActions = require '../actions/notify'
routerHandlers = require '../handlers/router'
mixinSubscribe = require '.... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/setting-sync.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-sync.coffee | 1 | 50 | ||
jianliaoim/talk-os:talk-web/client/app/setting-sync.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
cx = require 'classnames'
React = require 'react'
recorder = require 'actions-recorder'
query = require '../query'
teamActions = require '../actions/team'
accountActions = require '../actions/account'
notifyActions = require '../actions/notify'
routerHandlers = ... | var Icon, React, a, accountActions, cx, div, i, lang, mixinSubscribe, notifyActions, query, recorder, routerHandlers, span, teamActions;
cx = require('classnames');
React = require('react');
recorder = require('actions-recorder');
query = require('../query');
teamActions = require('../actions/team');
accountActio... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/setting-sync.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-sync.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/setting-sync.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Icon, React, a, accountActions, cx, div, i, lang, mixinSubscribe, notifyActions, query, recorder, routerHandlers, span, teamActions;
cx = require('classnames');
React = require('react');
recorder = require('actions-recorder');
query = require('../query');
... | cx = require 'classnames'
React = require 'react'
recorder = require 'actions-recorder'
query = require '../query'
teamActions = require '../actions/team'
accountActions = require '../actions/account'
notifyActions = require '../actions/notify'
routerHandlers = require '../handlers/router'
mixinSubscribe = require '.... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/setting-sync.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-sync.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/setting-sync.coffee:1:completion | completion | cx = require 'classnames'
React = require 'react'
recorder = require 'actions-recorder'
query = require '../query'
teamActions = require '../actions/team'
accountActions = require '../actions/account'
notifyActions = require '../actions/notify'
routerHandlers = require '../handlers/router'
mixinSubscribe = require '.... | getInitialState: ->
unions: @getAccounts()
showWarning: false
componentDidMount: ->
@subscribe recorder, =>
@setState unions: @getAccounts()
getAccounts: ->
query.accounts(recorder.getState())
onBack: ->
routerHandlers.settingTeams()
onTeamListShow: ->
routerHandlers.teamSyncLi... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/setting-sync.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-sync.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/setting-sync.coffee:2:raw_corpus | raw_corpus | renderBind: ->
div className: 'content',
div className: 'sync-logo sync-teambition'
span className: 'intro', lang.getText 'sync-from-teambition'
div className: 'bottom',
a onClick: @onBind, lang.getText 'bind-teambition'
render: ->
isTeambition = @state.unions.some (union) ->
... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/setting-sync.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-sync.coffee | 51 | 70 | ||
jianliaoim/talk-os:talk-web/client/app/setting-sync.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
renderBind: ->
div className: 'content',
div className: 'sync-logo sync-teambition'
span className: 'intro', lang.getText 'sync-from-teambition'
div className: 'bottom',
a onClick: @onBind, lang.getText 'bind-teambition'
render: -... | ({
renderBind: function() {
return div({
className: 'content'
}, div({
className: 'sync-logo sync-teambition'
}), span({
className: 'intro'
}, lang.getText('sync-from-teambition')), div({
className: 'bottom'
}, a({
onClick: this.onBind
}, lang.getText('bind-teambi... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/setting-sync.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-sync.coffee | 51 | 70 |
jianliaoim/talk-os:talk-web/client/app/setting-sync.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
renderBind: function() {
return div({
className: 'content'
}, div({
className: 'sync-logo sync-teambition'
}), span({
className: 'intro'
}, lang.getText('sync-from-teambition')), div({
className: 'bottom'
}, a({
... | renderBind: ->
div className: 'content',
div className: 'sync-logo sync-teambition'
span className: 'intro', lang.getText 'sync-from-teambition'
div className: 'bottom',
a onClick: @onBind, lang.getText 'bind-teambition'
render: ->
isTeambition = @state.unions.some (union) ->
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/setting-sync.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-sync.coffee | 51 | 70 |
jianliaoim/talk-os:talk-web/client/app/setting-sync.coffee:2:completion | completion | renderBind: ->
div className: 'content',
div className: 'sync-logo sync-teambition'
span className: 'intro', lang.getText 'sync-from-teambition'
div className: 'bottom',
a onClick: @onBind, lang.getText 'bind-teambition'
render: ->
isTeambition = @state.unions.some (union) -> | union.get('login') is 'teambition'
div className: 'setting-sync setting-wrapper',
div className: 'header',
Icon name: 'arrow-left', size: 24, className: 'to-back', onClick: @onBack
lang.getText 'setting-team-sync'
if isTeambition
@renderSync()
else
@renderBind() | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/setting-sync.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-sync.coffee | 51 | 70 |
Pathgather/please-wait:spec/please-wait.spec.coffee:1:raw_corpus | raw_corpus | 'use strict';
describe 'PleaseWait', ->
getTransitionEvent = ->
el = document.createElement('fakeelement')
transitions =
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd',
'msAnimation': 'MSAnimationEnd',
'MozAnimation': 'mozAnimationEnd'
'animation' : 'anim... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 1 | 41 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
'use strict';
describe 'PleaseWait', ->
getTransitionEvent = ->
el = document.createElement('fakeelement')
transitions =
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd',
'msAnimation': 'MSAnimationEnd',
'M... | 'use strict';
describe('PleaseWait', function() {
var getTransitionEvent;
getTransitionEvent = function() {
var el, key, transitions, val;
el = document.createElement('fakeelement');
transitions = {
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd',
'msAnimation': ... | CoffeeScript | JavaScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 1 | 41 |
Pathgather/please-wait:spec/please-wait.spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
'use strict';
describe('PleaseWait', function() {
var getTransitionEvent;
getTransitionEvent = function() {
var el, key, transitions, val;
el = document.createElement('fakeelement');
transitions = {
'WebkitAnimation': 'webkitAnimationEnd',
... | 'use strict';
describe 'PleaseWait', ->
getTransitionEvent = ->
el = document.createElement('fakeelement')
transitions =
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd',
'msAnimation': 'MSAnimationEnd',
'MozAnimation': 'mozAnimationEnd'
'animation' : 'anim... | JavaScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 1 | 41 |
Pathgather/please-wait:spec/please-wait.spec.coffee:1:completion | completion | 'use strict';
describe 'PleaseWait', ->
getTransitionEvent = ->
el = document.createElement('fakeelement')
transitions =
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd',
'msAnimation': 'MSAnimationEnd',
'MozAnimation': 'mozAnimationEnd'
'animation' : 'anim... | beforeEach () ->
if !originalHTML? then originalHTML = document.body.innerHTML
afterEach () ->
# Reset the body to its original state before each run. We could call finish, but we'll test that below
document.body.innerHTML = originalHTML
describe "when using the default template", ->
d... | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 1 | 41 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:raw_corpus | raw_corpus | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 43 | 81 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.inn... | describe("when using a custom template", function() {
it("adds the template to the body", function() {
var addedScreen;
window.pleaseWait({
template: "<div>LOADING!</div>"
});
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0];
return expect(addedScreen.innerHTML).toE... | CoffeeScript | JavaScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 43 | 81 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("when using a custom template", function() {
it("adds the template to the body", function() {
var addedScreen;
window.pleaseWait({
template: "<div>LOADING!</div>"
});
addedScreen = document.body.getElementsByClassName("pg-loading-sc... | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | JavaScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 43 | 81 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:completion | completion | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | describe "when specifying a background color", ->
it "sets the loading screen's background color", ->
window.pleaseWait({logo: 'logo.png', loadingHtml: "<div></div>", backgroundColor: "#CCCCCC"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.... | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 43 | 81 |
Pathgather/please-wait:spec/please-wait.spec.coffee:3:raw_corpus | raw_corpus | describe "when the loading screen has finished animating in", ->
beforeEach ->
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
loadingHtml.dispatchEvent event
expect(onLoaded).not.toHaveBeenCalled()
it "removes the loading screen from ... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 83 | 124 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "when the loading screen has finished animating in", ->
beforeEach ->
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
loadingHtml.dispatchEvent event
expect(onLoaded).not.toHav... | describe("when the loading screen has finished animating in", function() {
beforeEach(function() {
var event;
event = document.createEvent('Event');
event.initEvent(getTransitionEvent(), true, true);
loadingHtml.dispatchEvent(event);
return expect(onLoaded).not.toHaveBeenCalled();
});
return i... | CoffeeScript | JavaScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 83 | 124 |
Pathgather/please-wait:spec/please-wait.spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("when the loading screen has finished animating in", function() {
beforeEach(function() {
var event;
event = document.createEvent('Event');
event.initEvent(getTransitionEvent(), true, true);
loadingHtml.dispatchEvent(event);
return ex... | describe "when the loading screen has finished animating in", ->
beforeEach ->
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
loadingHtml.dispatchEvent event
expect(onLoaded).not.toHaveBeenCalled()
it "removes the loading screen from ... | JavaScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 83 | 124 |
Pathgather/please-wait:spec/please-wait.spec.coffee:3:completion | completion | describe "when the loading screen has finished animating in", ->
beforeEach ->
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
loadingHtml.dispatchEvent event
expect(onLoaded).not.toHaveBeenCalled()
it "removes the loading screen from ... | event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
addedScreen.dispatchEvent event
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen).toBeDefined()
# Finish loading in animation
expect(onLoa... | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 83 | 124 |
Pathgather/please-wait:spec/please-wait.spec.coffee:4:raw_corpus | raw_corpus | describe 'when reloading multiple times', ->
it "adds and removes pg-loaded & pg-loading from the body accordingly", ->
document.body.className = "my-class"
first = window.pleaseWait()
expect(document.body.className).toEqual("my-class pg-loading")
first.finish(true)
expect(document.bod... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 126 | 136 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'when reloading multiple times', ->
it "adds and removes pg-loaded & pg-loading from the body accordingly", ->
document.body.className = "my-class"
first = window.pleaseWait()
expect(document.body.className).toEqual("my-class pg-loa... | describe('when reloading multiple times', function() {
return it("adds and removes pg-loaded & pg-loading from the body accordingly", function() {
var first, second;
document.body.className = "my-class";
first = window.pleaseWait();
expect(document.body.className).toEqual("my-class pg-loading");
f... | CoffeeScript | JavaScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 126 | 136 |
Pathgather/please-wait:spec/please-wait.spec.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('when reloading multiple times', function() {
return it("adds and removes pg-loaded & pg-loading from the body accordingly", function() {
var first, second;
document.body.className = "my-class";
first = window.pleaseWait();
expect(documen... | describe 'when reloading multiple times', ->
it "adds and removes pg-loaded & pg-loading from the body accordingly", ->
document.body.className = "my-class"
first = window.pleaseWait()
expect(document.body.className).toEqual("my-class pg-loading")
first.finish(true)
expect(document.bod... | JavaScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 126 | 136 |
Pathgather/please-wait:spec/please-wait.spec.coffee:4:completion | completion | describe 'when reloading multiple times', ->
it "adds and removes pg-loaded & pg-loading from the body accordingly", ->
document.body.className = "my-class"
first = window.pleaseWait()
expect(document.body.className).toEqual("my-class pg-loading") | first.finish(true)
expect(document.body.className).toEqual("my-class pg-loaded")
second = window.pleaseWait()
expect(document.body.className).toEqual("my-class pg-loading")
second.finish(true)
expect(document.body.className).toEqual("my-class pg-loaded") | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | e920f1273d04617a0c32233fcf1e8affb4c384bc | 1,583 | https://github.com/Pathgather/please-wait/blob/e920f1273d04617a0c32233fcf1e8affb4c384bc/spec/please-wait.spec.coffee | 126 | 136 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:raw_corpus | raw_corpus | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 3e7c51a592b5d673efd871cef56a715cc48e4980 | 1,583 | https://github.com/Pathgather/please-wait/blob/3e7c51a592b5d673efd871cef56a715cc48e4980/spec/please-wait.spec.coffee | 43 | 83 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.inn... | describe("when using a custom template", function() {
it("adds the template to the body", function() {
var addedScreen;
window.pleaseWait({
template: "<div>LOADING!</div>"
});
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0];
return expect(addedScreen.innerHTML).toE... | CoffeeScript | JavaScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 3e7c51a592b5d673efd871cef56a715cc48e4980 | 1,583 | https://github.com/Pathgather/please-wait/blob/3e7c51a592b5d673efd871cef56a715cc48e4980/spec/please-wait.spec.coffee | 43 | 83 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("when using a custom template", function() {
it("adds the template to the body", function() {
var addedScreen;
window.pleaseWait({
template: "<div>LOADING!</div>"
});
addedScreen = document.body.getElementsByClassName("pg-loading-sc... | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | JavaScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 3e7c51a592b5d673efd871cef56a715cc48e4980 | 1,583 | https://github.com/Pathgather/please-wait/blob/3e7c51a592b5d673efd871cef56a715cc48e4980/spec/please-wait.spec.coffee | 43 | 83 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:completion | completion | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | describe "when specifying a background color", ->
it "sets the loading screen's background color", ->
window.pleaseWait({logo: 'logo.png', loadingHtml: "<div></div>", backgroundColor: "#CCCCCC"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.... | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 3e7c51a592b5d673efd871cef56a715cc48e4980 | 1,583 | https://github.com/Pathgather/please-wait/blob/3e7c51a592b5d673efd871cef56a715cc48e4980/spec/please-wait.spec.coffee | 43 | 83 |
Pathgather/please-wait:spec/please-wait.spec.coffee:3:raw_corpus | raw_corpus | it "removes the loading screen from the body after it transitions out", ->
loadingScreen.finish()
expect(onLoaded).toHaveBeenCalled()
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
addedScreen.dispatchEvent event
addedScreen = docu... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 3e7c51a592b5d673efd871cef56a715cc48e4980 | 1,583 | https://github.com/Pathgather/please-wait/blob/3e7c51a592b5d673efd871cef56a715cc48e4980/spec/please-wait.spec.coffee | 85 | 119 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it "removes the loading screen from the body after it transitions out", ->
loadingScreen.finish()
expect(onLoaded).toHaveBeenCalled()
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
a... | it("removes the loading screen from the body after it transitions out", function() {
var addedScreen, event;
loadingScreen.finish();
expect(onLoaded).toHaveBeenCalled();
event = document.createEvent('Event');
event.initEvent(getTransitionEvent(), true, true);
addedScreen.dispatchEvent(event);
addedScreen ... | CoffeeScript | JavaScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 3e7c51a592b5d673efd871cef56a715cc48e4980 | 1,583 | https://github.com/Pathgather/please-wait/blob/3e7c51a592b5d673efd871cef56a715cc48e4980/spec/please-wait.spec.coffee | 85 | 119 |
Pathgather/please-wait:spec/please-wait.spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it("removes the loading screen from the body after it transitions out", function() {
var addedScreen, event;
loadingScreen.finish();
expect(onLoaded).toHaveBeenCalled();
event = document.createEvent('Event');
event.initEvent(getTransitionEvent(), true, tr... | it "removes the loading screen from the body after it transitions out", ->
loadingScreen.finish()
expect(onLoaded).toHaveBeenCalled()
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
addedScreen.dispatchEvent event
addedScreen = docu... | JavaScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 3e7c51a592b5d673efd871cef56a715cc48e4980 | 1,583 | https://github.com/Pathgather/please-wait/blob/3e7c51a592b5d673efd871cef56a715cc48e4980/spec/please-wait.spec.coffee | 85 | 119 |
Pathgather/please-wait:spec/please-wait.spec.coffee:3:completion | completion | it "removes the loading screen from the body after it transitions out", ->
loadingScreen.finish()
expect(onLoaded).toHaveBeenCalled()
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
addedScreen.dispatchEvent event
addedScreen = docu... | addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen).toBeDefined()
# Finish loading in animation
expect(onLoaded).not.toHaveBeenCalled()
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
load... | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 3e7c51a592b5d673efd871cef56a715cc48e4980 | 1,583 | https://github.com/Pathgather/please-wait/blob/3e7c51a592b5d673efd871cef56a715cc48e4980/spec/please-wait.spec.coffee | 85 | 119 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:raw_corpus | raw_corpus | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | c53694014314753ad23eb47d6eb1bd04306a1499 | 1,583 | https://github.com/Pathgather/please-wait/blob/c53694014314753ad23eb47d6eb1bd04306a1499/spec/please-wait.spec.coffee | 43 | 81 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.inn... | describe("when using a custom template", function() {
it("adds the template to the body", function() {
var addedScreen;
window.pleaseWait({
template: "<div>LOADING!</div>"
});
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0];
return expect(addedScreen.innerHTML).toE... | CoffeeScript | JavaScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | c53694014314753ad23eb47d6eb1bd04306a1499 | 1,583 | https://github.com/Pathgather/please-wait/blob/c53694014314753ad23eb47d6eb1bd04306a1499/spec/please-wait.spec.coffee | 43 | 81 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("when using a custom template", function() {
it("adds the template to the body", function() {
var addedScreen;
window.pleaseWait({
template: "<div>LOADING!</div>"
});
addedScreen = document.body.getElementsByClassName("pg-loading-sc... | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | JavaScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | c53694014314753ad23eb47d6eb1bd04306a1499 | 1,583 | https://github.com/Pathgather/please-wait/blob/c53694014314753ad23eb47d6eb1bd04306a1499/spec/please-wait.spec.coffee | 43 | 81 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:completion | completion | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | describe "when specifying a background color", ->
it "sets the loading screen's background color", ->
window.pleaseWait({logo: 'logo.png', loadingHtml: "<div></div>", backgroundColor: "#CCCCCC"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.... | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | c53694014314753ad23eb47d6eb1bd04306a1499 | 1,583 | https://github.com/Pathgather/please-wait/blob/c53694014314753ad23eb47d6eb1bd04306a1499/spec/please-wait.spec.coffee | 43 | 81 |
Pathgather/please-wait:spec/please-wait.spec.coffee:3:raw_corpus | raw_corpus | it "removes the loading screen from the body after it transitions out", ->
pleaseWait.finish()
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
addedScreen.dispatchEvent event
addedScreen = document.body.getElementsByClassName("pg-loading-sc... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | c53694014314753ad23eb47d6eb1bd04306a1499 | 1,583 | https://github.com/Pathgather/please-wait/blob/c53694014314753ad23eb47d6eb1bd04306a1499/spec/please-wait.spec.coffee | 83 | 114 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it "removes the loading screen from the body after it transitions out", ->
pleaseWait.finish()
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
addedScreen.dispatchEvent event
addedScr... | it("removes the loading screen from the body after it transitions out", function() {
var addedScreen, event;
pleaseWait.finish();
event = document.createEvent('Event');
event.initEvent(getTransitionEvent(), true, true);
addedScreen.dispatchEvent(event);
addedScreen = document.body.getElementsByClassName("pg... | CoffeeScript | JavaScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | c53694014314753ad23eb47d6eb1bd04306a1499 | 1,583 | https://github.com/Pathgather/please-wait/blob/c53694014314753ad23eb47d6eb1bd04306a1499/spec/please-wait.spec.coffee | 83 | 114 |
Pathgather/please-wait:spec/please-wait.spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it("removes the loading screen from the body after it transitions out", function() {
var addedScreen, event;
pleaseWait.finish();
event = document.createEvent('Event');
event.initEvent(getTransitionEvent(), true, true);
addedScreen.dispatchEvent(event);
... | it "removes the loading screen from the body after it transitions out", ->
pleaseWait.finish()
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
addedScreen.dispatchEvent event
addedScreen = document.body.getElementsByClassName("pg-loading-sc... | JavaScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | c53694014314753ad23eb47d6eb1bd04306a1499 | 1,583 | https://github.com/Pathgather/please-wait/blob/c53694014314753ad23eb47d6eb1bd04306a1499/spec/please-wait.spec.coffee | 83 | 114 |
Pathgather/please-wait:spec/please-wait.spec.coffee:3:completion | completion | it "removes the loading screen from the body after it transitions out", ->
pleaseWait.finish()
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
addedScreen.dispatchEvent event
addedScreen = document.body.getElementsByClassName("pg-loading-sc... | addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen).toBeDefined()
# Finish loading in animation
event = document.createEvent('Event')
event.initEvent(getTransitionEvent(), true, true)
loadingHtml.dispatchEvent event
addedScreen ... | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | c53694014314753ad23eb47d6eb1bd04306a1499 | 1,583 | https://github.com/Pathgather/please-wait/blob/c53694014314753ad23eb47d6eb1bd04306a1499/spec/please-wait.spec.coffee | 83 | 114 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:raw_corpus | raw_corpus | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 40d8a35c68da1c2b57cd99146be4b156851c8893 | 1,583 | https://github.com/Pathgather/please-wait/blob/40d8a35c68da1c2b57cd99146be4b156851c8893/spec/please-wait.spec.coffee | 43 | 85 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.inn... | describe("when using a custom template", function() {
it("adds the template to the body", function() {
var addedScreen;
window.pleaseWait({
template: "<div>LOADING!</div>"
});
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0];
return expect(addedScreen.innerHTML).toE... | CoffeeScript | JavaScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 40d8a35c68da1c2b57cd99146be4b156851c8893 | 1,583 | https://github.com/Pathgather/please-wait/blob/40d8a35c68da1c2b57cd99146be4b156851c8893/spec/please-wait.spec.coffee | 43 | 85 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("when using a custom template", function() {
it("adds the template to the body", function() {
var addedScreen;
window.pleaseWait({
template: "<div>LOADING!</div>"
});
addedScreen = document.body.getElementsByClassName("pg-loading-sc... | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | JavaScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 40d8a35c68da1c2b57cd99146be4b156851c8893 | 1,583 | https://github.com/Pathgather/please-wait/blob/40d8a35c68da1c2b57cd99146be4b156851c8893/spec/please-wait.spec.coffee | 43 | 85 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:completion | completion | describe "when using a custom template", ->
it "adds the template to the body", ->
window.pleaseWait({template: "<div>LOADING!</div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.innerHTML).toEqual("<div>LOADING!</div>")
describe "w... | it "sets the loading screen's background color", ->
window.pleaseWait({logo: 'logo.png', loadingHtml: "<div></div>", backgroundColor: "#CCCCCC"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.style.backgroundColor).toEqual("rgb(204, 204, 204)")
... | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | 40d8a35c68da1c2b57cd99146be4b156851c8893 | 1,583 | https://github.com/Pathgather/please-wait/blob/40d8a35c68da1c2b57cd99146be4b156851c8893/spec/please-wait.spec.coffee | 43 | 85 |
Pathgather/please-wait:spec/please-wait.spec.coffee:1:raw_corpus | raw_corpus | 'use strict';
describe 'PleaseWait', ->
getTransitionEvent = ->
el = document.createElement('fakeelement')
transitions =
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd',
'msAnimation': 'MSAnimationEnd',
'MozAnimation': 'mozAnimationEnd'
'animation' : 'anim... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c | 1,583 | https://github.com/Pathgather/please-wait/blob/d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c/spec/please-wait.spec.coffee | 1 | 50 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
'use strict';
describe 'PleaseWait', ->
getTransitionEvent = ->
el = document.createElement('fakeelement')
transitions =
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd',
'msAnimation': 'MSAnimationEnd',
'M... | 'use strict';
describe('PleaseWait', function() {
var getTransitionEvent;
getTransitionEvent = function() {
var el, key, transitions, val;
el = document.createElement('fakeelement');
transitions = {
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd',
'msAnimation': ... | CoffeeScript | JavaScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c | 1,583 | https://github.com/Pathgather/please-wait/blob/d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c/spec/please-wait.spec.coffee | 1 | 50 |
Pathgather/please-wait:spec/please-wait.spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
'use strict';
describe('PleaseWait', function() {
var getTransitionEvent;
getTransitionEvent = function() {
var el, key, transitions, val;
el = document.createElement('fakeelement');
transitions = {
'WebkitAnimation': 'webkitAnimationEnd',
... | 'use strict';
describe 'PleaseWait', ->
getTransitionEvent = ->
el = document.createElement('fakeelement')
transitions =
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd',
'msAnimation': 'MSAnimationEnd',
'MozAnimation': 'mozAnimationEnd'
'animation' : 'anim... | JavaScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c | 1,583 | https://github.com/Pathgather/please-wait/blob/d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c/spec/please-wait.spec.coffee | 1 | 50 |
Pathgather/please-wait:spec/please-wait.spec.coffee:1:completion | completion | 'use strict';
describe 'PleaseWait', ->
getTransitionEvent = ->
el = document.createElement('fakeelement')
transitions =
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd',
'msAnimation': 'MSAnimationEnd',
'MozAnimation': 'mozAnimationEnd'
'animation' : 'anim... | document.body.innerHTML = originalHTML
describe "when using the default template", ->
describe "when setting a logo", ->
it "sets the logo", ->
window.pleaseWait({logo: "logo.png"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
logo = addedSc... | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c | 1,583 | https://github.com/Pathgather/please-wait/blob/d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c/spec/please-wait.spec.coffee | 1 | 50 |
Pathgather/please-wait:spec/please-wait.spec.coffee:2:raw_corpus | raw_corpus | window.pleaseWait({logo: "logo.png", template: "<div><img class='pg-loading-logo'></img></div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
logo = addedScreen.getElementsByClassName("pg-loading-logo")[0]
expect(logo.src).toContain("logo.png")
describ... | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c | 1,583 | https://github.com/Pathgather/please-wait/blob/d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c/spec/please-wait.spec.coffee | 51 | 79 | ||
Pathgather/please-wait:spec/please-wait.spec.coffee:2:completion | completion | window.pleaseWait({logo: "logo.png", template: "<div><img class='pg-loading-logo'></img></div>"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
logo = addedScreen.getElementsByClassName("pg-loading-logo")[0]
expect(logo.src).toContain("logo.png")
describ... | window.pleaseWait({logo: 'logo.png', loadingHtml: "<div></div>", backgroundColor: "#CCCCCC"})
addedScreen = document.body.getElementsByClassName("pg-loading-screen")[0]
expect(addedScreen.style.backgroundColor).toEqual("rgb(204, 204, 204)")
describe 'finish', ->
it "removes the loading screen fro... | CoffeeScript | CoffeeScript | Pathgather/please-wait | spec/please-wait.spec.coffee | MIT | d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c | 1,583 | https://github.com/Pathgather/please-wait/blob/d99216f87ac8fbfecaa335fa8bd9bd1a5581f67c/spec/please-wait.spec.coffee | 51 | 79 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-valsub-spec.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-valsub-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-valsub-spec.coffee | 1 | 43 | ||
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-valsub-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-valsub-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-valsub-spec.coffee | 1 | 43 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-valsub-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-valsub-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-valsub-spec.coffee | 1 | 43 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-valsub-spec.coffee:1:completion | completion | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | expect(_.valSub(null)).toBeNull()
it 'should return the value of the object if null', ->
expect(_.valSub("string", null)).toBe "string"
it 'should return a number if given a number', ->
expect(_.valSub(99, {})).toBe 99
it 'should return empty string if given an empty string', ->
e... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-valsub-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-valsub-spec.coffee | 1 | 43 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 40 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:completion | completion | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | image: '='
link: (scope, element, attrs) ->
$element = $(element)
scope.$watch 'image', (image) ->
$element.css {
'background-image': 'url(' + image.url + ')'
'background-size': image.backgroundSize || 'cover'
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 2c2eb7bc16616a8b1d9601b8307884f5f6be40de | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/2c2eb7bc16616a8b1d9601b8307884f5f6be40de/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 40 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 2c2eb7bc16616a8b1d9601b8307884f5f6be40de | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/2c2eb7bc16616a8b1d9601b8307884f5f6be40de/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 2c2eb7bc16616a8b1d9601b8307884f5f6be40de | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/2c2eb7bc16616a8b1d9601b8307884f5f6be40de/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:completion | completion | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | image: '='
link: (scope, element, attrs) ->
$element = $(element)
scope.$watch 'image', (image) ->
$element.css {
'background-image': 'url(' + image.url + ')'
'background-size': image.backgroundSize || 'cover'
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 2c2eb7bc16616a8b1d9601b8307884f5f6be40de | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/2c2eb7bc16616a8b1d9601b8307884f5f6be40de/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 41 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 41 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 41 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/image/directives.fancyImage.coffee:1:completion | completion | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | image: '='
link: (scope, element, attrs) ->
$element = $(element)
scope.$watch 'image', (image) ->
console.log image
$element.css {
'background-image': 'url(' + image.url + ')'
'background-size': image.backgroundSi... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/image/directives.fancyImage.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/image/directives.fancyImage.coffee | 1 | 41 |
jianliaoim/talk-os:talk-web/client/app/team-page.coffee:1:raw_corpus | raw_corpus | React = require 'react'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
query = require '../query'
settingsActions = require '../actions/settings'
routerHandlers = require '../handlers/router'
mixinRouter = require '../mixin/router'
TeamDrawer = React.createFactory requir... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/team-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-page.coffee | 1 | 50 | ||
jianliaoim/talk-os:talk-web/client/app/team-page.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
React = require 'react'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
query = require '../query'
settingsActions = require '../actions/settings'
routerHandlers = require '../handlers/router'
mixinRouter = require '... | var Immutable, PureRenderMixin, React, T, TeamDrawer, TeamHeader, TeamSidebar, TeamToolbar, TeamWrapper, div, mixinRouter, query, routerHandlers, settingsActions;
React = require('react');
Immutable = require('immutable');
PureRenderMixin = require('react-addons-pure-render-mixin');
query = require('../query');
se... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/team-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-page.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/team-page.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Immutable, PureRenderMixin, React, T, TeamDrawer, TeamHeader, TeamSidebar, TeamToolbar, TeamWrapper, div, mixinRouter, query, routerHandlers, settingsActions;
React = require('react');
Immutable = require('immutable');
PureRenderMixin = require('react-addons... | React = require 'react'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
query = require '../query'
settingsActions = require '../actions/settings'
routerHandlers = require '../handlers/router'
mixinRouter = require '../mixin/router'
TeamDrawer = React.createFactory requir... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/team-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-page.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/team-page.coffee:1:completion | completion | React = require 'react'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
query = require '../query'
settingsActions = require '../actions/settings'
routerHandlers = require '../handlers/router'
mixinRouter = require '../mixin/router'
TeamDrawer = React.createFactory requir... | mixins: [mixinRouter, PureRenderMixin]
getUserId: ->
query.userId @props.store
render: ->
_userId = @getUserId()
_teamId = @getTeamId()
_channelId = @getChannelId()
channelType = @getChannelType()
div className: 'team-page flex-horiz',
div className: 'team-aside flex-vert',
... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/team-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-page.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/team-page.coffee:2:raw_corpus | raw_corpus | user: query.user @props.store
router: @props.router
TeamWrapper
#
# _toId, _roomId, _storyId is not a very common property,
# those will be removed someday.
#
_toId: @getChannelId '_toId'
_roomId: @getChannelId '_roomId'
_teamId: @g... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/team-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-page.coffee | 51 | 72 | ||
jianliaoim/talk-os:talk-web/client/app/team-page.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
user: query.user @props.store
router: @props.router
TeamWrapper
#
# _toId, _roomId, _storyId is not a very common property,
# those will be removed someday.
#
_toId: @getChannelId '_toId'
... | var base;
({
user: query.user(this.props.store({
router: this.props.router
}))
});
TeamWrapper({
// _toId, _roomId, _storyId is not a very common property,
// those will be removed someday.
_toId: this.getChannelId('_toId'),
_roomId: this.getChannelId('_roomId'),
_teamId: this.getTeamId(),
_user... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/team-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-page.coffee | 51 | 72 |
jianliaoim/talk-os:talk-web/client/app/team-page.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var base;
({
user: query.user(this.props.store({
router: this.props.router
}))
});
TeamWrapper({
// _toId, _roomId, _storyId is not a very common property,
// those will be removed someday.
_toId: this.getChannelId('_toId'),
_roomId: this.getCha... | user: query.user @props.store
router: @props.router
TeamWrapper
#
# _toId, _roomId, _storyId is not a very common property,
# those will be removed someday.
#
_toId: @getChannelId '_toId'
_roomId: @getChannelId '_roomId'
_teamId: @g... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/team-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-page.coffee | 51 | 72 |
jianliaoim/talk-os:talk-web/client/app/team-page.coffee:2:completion | completion | user: query.user @props.store
router: @props.router
TeamWrapper
#
# _toId, _roomId, _storyId is not a very common property,
# those will be removed someday.
#
_toId: @getChannelId '_toId'
_roomId: @getChannelId '_roomId'
_teamId: @g... | _storyId: @getChannelId '_storyId'
_channelId: _channelId
_channelType: channelType
user: query.user @props.store
router: @props.router
TeamDrawer
_teamId: _teamId
_userId: _userId
channelType: channelType
channel: query.byChannelTy... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/team-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-page.coffee | 51 | 72 |
jianliaoim/talk-os:talk-web/client/actions/contact-prefs.coffee:1:raw_corpus | raw_corpus | dispatcher = require '../dispatcher'
lang = require '../locales/lang'
notifyActions = require '../actions/notify'
api = require '../network/api'
exports.updateInTeam = (_teamId, _userId, data, success, fail) ->
config =
pathParams:
id: _teamId
data: data
api.teams.prefs.put(config)
.then (resp) ... | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/contact-prefs.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/contact-prefs.coffee | 1 | 22 | ||
jianliaoim/talk-os:talk-web/client/actions/contact-prefs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
dispatcher = require '../dispatcher'
lang = require '../locales/lang'
notifyActions = require '../actions/notify'
api = require '../network/api'
exports.updateInTeam = (_teamId, _userId, data, success, fail) ->
config =
pathParams:
id: _teamId
d... | var api, dispatcher, lang, notifyActions;
dispatcher = require('../dispatcher');
lang = require('../locales/lang');
notifyActions = require('../actions/notify');
api = require('../network/api');
exports.updateInTeam = function(_teamId, _userId, data, success, fail) {
var config;
config = {
pathParams: {
... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/actions/contact-prefs.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/contact-prefs.coffee | 1 | 22 |
jianliaoim/talk-os:talk-web/client/actions/contact-prefs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var api, dispatcher, lang, notifyActions;
dispatcher = require('../dispatcher');
lang = require('../locales/lang');
notifyActions = require('../actions/notify');
api = require('../network/api');
exports.updateInTeam = function(_teamId, _userId, data, success, ... | dispatcher = require '../dispatcher'
lang = require '../locales/lang'
notifyActions = require '../actions/notify'
api = require '../network/api'
exports.updateInTeam = (_teamId, _userId, data, success, fail) ->
config =
pathParams:
id: _teamId
data: data
api.teams.prefs.put(config)
.then (resp) ... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/contact-prefs.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/contact-prefs.coffee | 1 | 22 |
jianliaoim/talk-os:talk-web/client/actions/contact-prefs.coffee:1:completion | completion | dispatcher = require '../dispatcher'
lang = require '../locales/lang'
notifyActions = require '../actions/notify'
api = require '../network/api'
exports.updateInTeam = (_teamId, _userId, data, success, fail) ->
config =
pathParams:
id: _teamId
data: data | api.teams.prefs.put(config)
.then (resp) ->
data =
_userId: _userId
resp: resp
dispatcher.handleViewAction
type: 'contact-prefs/update'
data: data
success? resp
.catch (error) ->
fail? error | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/contact-prefs.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/contact-prefs.coffee | 1 | 22 |
CaryLandholt/AngularFun:tasks/clean.coffee:1:raw_corpus | raw_corpus | ###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
rimraf = require 'rimraf'
grunt.registerMultiTask 'clean', 'Deletes a directory', ->
src = @file.src
exists = path.existsSync src
return if not exists
srcFullPath = path.resolve src
message = "Delete... | CoffeeScript | CaryLandholt/AngularFun | tasks/clean.coffee | MIT | b51fa32a9d2a3556c592d2e033e8802bf40b3f97 | 672 | https://github.com/CaryLandholt/AngularFun/blob/b51fa32a9d2a3556c592d2e033e8802bf40b3f97/tasks/clean.coffee | 1 | 19 | ||
CaryLandholt/AngularFun:tasks/clean.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
rimraf = require 'rimraf'
grunt.registerMultiTask 'clean', 'Deletes a directory', ->
src = @file.src
exists = path.existsSync src
return if not exi... | /*global module, require*/
module.exports = function(grunt) {
var growl, path, rimraf;
growl = require('growl');
path = require('path');
rimraf = require('rimraf');
return grunt.registerMultiTask('clean', 'Deletes a directory', function() {
var exists, message, src, srcFullPath;
src = this.file.src;
... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | tasks/clean.coffee | MIT | b51fa32a9d2a3556c592d2e033e8802bf40b3f97 | 672 | https://github.com/CaryLandholt/AngularFun/blob/b51fa32a9d2a3556c592d2e033e8802bf40b3f97/tasks/clean.coffee | 1 | 19 |
CaryLandholt/AngularFun:tasks/clean.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global module, require*/
module.exports = function(grunt) {
var growl, path, rimraf;
growl = require('growl');
path = require('path');
rimraf = require('rimraf');
return grunt.registerMultiTask('clean', 'Deletes a directory', function() {
var exists... | ###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
rimraf = require 'rimraf'
grunt.registerMultiTask 'clean', 'Deletes a directory', ->
src = @file.src
exists = path.existsSync src
return if not exists
srcFullPath = path.resolve src
message = "Delete... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | tasks/clean.coffee | MIT | b51fa32a9d2a3556c592d2e033e8802bf40b3f97 | 672 | https://github.com/CaryLandholt/AngularFun/blob/b51fa32a9d2a3556c592d2e033e8802bf40b3f97/tasks/clean.coffee | 1 | 19 |
CaryLandholt/AngularFun:tasks/clean.coffee:1:completion | completion | ###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
rimraf = require 'rimraf'
grunt.registerMultiTask 'clean', 'Deletes a directory', ->
src = @file.src | exists = path.existsSync src
return if not exists
srcFullPath = path.resolve src
message = "Deleted #{srcFullPath} directory."
rimraf.sync src
grunt.log.writeln message
growl message, title: 'Directory Deleted' | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | tasks/clean.coffee | MIT | b51fa32a9d2a3556c592d2e033e8802bf40b3f97 | 672 | https://github.com/CaryLandholt/AngularFun/blob/b51fa32a9d2a3556c592d2e033e8802bf40b3f97/tasks/clean.coffee | 1 | 19 |
CaryLandholt/AngularFun:tasks/clean.coffee:1:raw_corpus | raw_corpus | ###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
rimraf = require 'rimraf'
grunt.registerMultiTask 'clean', 'Deletes a directory', ->
dest = @file.dest
exists = path.existsSync dest
return if not exists
destFullPath = path.resolve dest
message = "D... | CoffeeScript | CaryLandholt/AngularFun | tasks/clean.coffee | MIT | 4d1f0e38f7f87729adcf7c80bc4242ce73098f46 | 672 | https://github.com/CaryLandholt/AngularFun/blob/4d1f0e38f7f87729adcf7c80bc4242ce73098f46/tasks/clean.coffee | 1 | 19 | ||
CaryLandholt/AngularFun:tasks/clean.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
rimraf = require 'rimraf'
grunt.registerMultiTask 'clean', 'Deletes a directory', ->
dest = @file.dest
exists = path.existsSync dest
return if not ... | /*global module, require*/
module.exports = function(grunt) {
var growl, path, rimraf;
growl = require('growl');
path = require('path');
rimraf = require('rimraf');
return grunt.registerMultiTask('clean', 'Deletes a directory', function() {
var dest, destFullPath, exists, message;
dest = this.file.des... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | tasks/clean.coffee | MIT | 4d1f0e38f7f87729adcf7c80bc4242ce73098f46 | 672 | https://github.com/CaryLandholt/AngularFun/blob/4d1f0e38f7f87729adcf7c80bc4242ce73098f46/tasks/clean.coffee | 1 | 19 |
CaryLandholt/AngularFun:tasks/clean.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global module, require*/
module.exports = function(grunt) {
var growl, path, rimraf;
growl = require('growl');
path = require('path');
rimraf = require('rimraf');
return grunt.registerMultiTask('clean', 'Deletes a directory', function() {
var dest, ... | ###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
rimraf = require 'rimraf'
grunt.registerMultiTask 'clean', 'Deletes a directory', ->
dest = @file.dest
exists = path.existsSync dest
return if not exists
destFullPath = path.resolve dest
message = "D... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | tasks/clean.coffee | MIT | 4d1f0e38f7f87729adcf7c80bc4242ce73098f46 | 672 | https://github.com/CaryLandholt/AngularFun/blob/4d1f0e38f7f87729adcf7c80bc4242ce73098f46/tasks/clean.coffee | 1 | 19 |
CaryLandholt/AngularFun:tasks/clean.coffee:1:completion | completion | ###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
rimraf = require 'rimraf'
grunt.registerMultiTask 'clean', 'Deletes a directory', ->
dest = @file.dest | exists = path.existsSync dest
return if not exists
destFullPath = path.resolve dest
message = "Deleted #{destFullPath} directory."
rimraf.sync dest
grunt.log.writeln message
growl message, title: 'Directory Deleted' | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | tasks/clean.coffee | MIT | 4d1f0e38f7f87729adcf7c80bc4242ce73098f46 | 672 | https://github.com/CaryLandholt/AngularFun/blob/4d1f0e38f7f87729adcf7c80bc4242ce73098f46/tasks/clean.coffee | 1 | 19 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | 1 | 31 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | 1 | 31 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | 1 | 31 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee:1:completion | completion | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | cyclotronDirectives.directive 'iframerefresh', ($interval) ->
{
restrict: 'A'
link: (scope, element, attrs) ->
refresh = parseInt(attrs.iframerefresh)
if !isNaN(refresh)
intervalFn = -> $(element).attr('src', (i, val) -> val)
intervalPromise ... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | 1 | 31 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | 1 | 31 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | 1 | 31 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | 1 | 31 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee:1:completion | completion | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | cyclotronDirectives.directive 'iframerefresh', ($interval) ->
{
restrict: 'A'
link: (scope, element, attrs) ->
refresh = parseInt(attrs.iframerefresh)
if !isNaN(refresh)
intervalFn = -> $(element).attr('src', (i, val) -> val)
intervalPromise ... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/widgets/iframe/directives.iframerefresh.coffee | 1 | 31 |
jianliaoim/talk-os:talk-web/client/app/panel-chat.coffee:1:raw_corpus | raw_corpus | module.exports = React.createClass
displayName: 'panel-chat'
mixins: [PureRenderMixin, mixinQuery]
propTypes:
_teamId: T.string.isRequired
contacts: T.instanceOf(Immutable.List).isRequired
leftContacts: T.instanceOf(Immutable.List).isRequired
onClose: T.func
getInitialState: ->
showForm: ... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/panel-chat.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/panel-chat.coffee | 31 | 80 | ||
jianliaoim/talk-os:talk-web/client/app/panel-chat.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = React.createClass
displayName: 'panel-chat'
mixins: [PureRenderMixin, mixinQuery]
propTypes:
_teamId: T.string.isRequired
contacts: T.instanceOf(Immutable.List).isRequired
leftContacts: T.instanceOf(Immutable.List).isRequired
... | module.exports = React.createClass({
displayName: 'panel-chat',
mixins: [PureRenderMixin, mixinQuery],
propTypes: {
_teamId: T.string.isRequired,
contacts: T.instanceOf(Immutable.List).isRequired,
leftContacts: T.instanceOf(Immutable.List).isRequired,
onClose: T.func
},
getInitialState: functi... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/panel-chat.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/panel-chat.coffee | 31 | 80 |
jianliaoim/talk-os:talk-web/client/app/panel-chat.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = React.createClass({
displayName: 'panel-chat',
mixins: [PureRenderMixin, mixinQuery],
propTypes: {
_teamId: T.string.isRequired,
contacts: T.instanceOf(Immutable.List).isRequired,
leftContacts: T.instanceOf(Immutable.List).isRequi... | module.exports = React.createClass
displayName: 'panel-chat'
mixins: [PureRenderMixin, mixinQuery]
propTypes:
_teamId: T.string.isRequired
contacts: T.instanceOf(Immutable.List).isRequired
leftContacts: T.instanceOf(Immutable.List).isRequired
onClose: T.func
getInitialState: ->
showForm: ... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/panel-chat.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/panel-chat.coffee | 31 | 80 |
jianliaoim/talk-os:talk-web/client/app/panel-chat.coffee:1:completion | completion | module.exports = React.createClass
displayName: 'panel-chat'
mixins: [PureRenderMixin, mixinQuery]
propTypes:
_teamId: T.string.isRequired
contacts: T.instanceOf(Immutable.List).isRequired
leftContacts: T.instanceOf(Immutable.List).isRequired
onClose: T.func
getInitialState: ->
showForm: ... | onItemClick: (contact) ->
_userId = query.userId(recorder.getState())
if contact.get('_id') isnt _userId
routerHandlers.chat @props._teamId, contact.get('_id'), {}, @props.onClose
analytics.enterChatFromStory()
renderContacts: (type) ->
if type is 'leftContacts'
filteredList = @filterLi... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/panel-chat.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/panel-chat.coffee | 31 | 80 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.