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
jianliaoim/talk-os:talk-web/client/actions/story.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.readone = (_storyId, success, fail) -> config = pathParams: id: _storyId api.stories.readone.get config .then (resp) -> dispatcher.handleViewAction type: 'story/readone' data: resp success? resp .catch (error) -> ...
exports.readone = function(_storyId, success, fail) { var config; config = { pathParams: { id: _storyId } }; return api.stories.readone.get(config).then(function(resp) { dispatcher.handleViewAction({ type: 'story/readone', data: resp }); return typeof success === "function"...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
71
81
jianliaoim/talk-os:talk-web/client/actions/story.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.readone = function(_storyId, success, fail) { var config; config = { pathParams: { id: _storyId } }; return api.stories.readone.get(config).then(function(resp) { dispatcher.handleViewAction({ type: 'story/readone', data...
exports.readone = (_storyId, success, fail) -> config = pathParams: id: _storyId api.stories.readone.get config .then (resp) -> dispatcher.handleViewAction type: 'story/readone' data: resp success? resp .catch (error) -> fail? error
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
71
81
jianliaoim/talk-os:talk-web/client/actions/story.coffee:5:completion
completion
exports.readone = (_storyId, success, fail) -> config = pathParams: id: _storyId api.stories.readone.get config .then (resp) ->
dispatcher.handleViewAction type: 'story/readone' data: resp success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
71
81
jianliaoim/talk-os:talk-web/client/actions/story.coffee:6:raw_corpus
raw_corpus
exports.remove = (_teamId, _channelId) -> config = pathParams: id: _channelId routerHandlers.team _teamId api.stories.remove.delete config .then (resp) -> dispatcher.handleViewAction type: 'story/remove' data: resp .catch (error) -> notifyActions.error '删除story失败'
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
83
93
jianliaoim/talk-os:talk-web/client/actions/story.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.remove = (_teamId, _channelId) -> config = pathParams: id: _channelId routerHandlers.team _teamId api.stories.remove.delete config .then (resp) -> dispatcher.handleViewAction type: 'story/remove' data: resp .catch (err...
exports.remove = function(_teamId, _channelId) { var config; config = { pathParams: { id: _channelId } }; routerHandlers.team(_teamId); return api.stories.remove.delete(config).then(function(resp) { return dispatcher.handleViewAction({ type: 'story/remove', data: resp }); }...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
83
93
jianliaoim/talk-os:talk-web/client/actions/story.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.remove = function(_teamId, _channelId) { var config; config = { pathParams: { id: _channelId } }; routerHandlers.team(_teamId); return api.stories.remove.delete(config).then(function(resp) { return dispatcher.handleViewAction({ ...
exports.remove = (_teamId, _channelId) -> config = pathParams: id: _channelId routerHandlers.team _teamId api.stories.remove.delete config .then (resp) -> dispatcher.handleViewAction type: 'story/remove' data: resp .catch (error) -> notifyActions.error '删除story失败'
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
83
93
jianliaoim/talk-os:talk-web/client/actions/story.coffee:6:completion
completion
exports.remove = (_teamId, _channelId) -> config = pathParams: id: _channelId routerHandlers.team _teamId api.stories.remove.delete config
.then (resp) -> dispatcher.handleViewAction type: 'story/remove' data: resp .catch (error) -> notifyActions.error '删除story失败'
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
83
93
jianliaoim/talk-os:talk-web/client/actions/story.coffee:7:raw_corpus
raw_corpus
exports.update = (_storyId, data, success, fail) -> config = pathParams: id: _storyId data: data api.stories.update.put config .then (resp) -> dispatcher.handleViewAction type: 'story/update' data: resp success? resp .catch (error) -> fail? error notify...
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
95
118
jianliaoim/talk-os:talk-web/client/actions/story.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.update = (_storyId, data, success, fail) -> config = pathParams: id: _storyId data: data api.stories.update.put config .then (resp) -> dispatcher.handleViewAction type: 'story/update' data: resp success? ...
exports.update = function(_storyId, data, success, fail) { var config; config = { pathParams: { id: _storyId }, data: data }; return api.stories.update.put(config).then(function(resp) { dispatcher.handleViewAction({ type: 'story/update', data: resp }); return typeof suc...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
95
118
jianliaoim/talk-os:talk-web/client/actions/story.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.update = function(_storyId, data, success, fail) { var config; config = { pathParams: { id: _storyId }, data: data }; return api.stories.update.put(config).then(function(resp) { dispatcher.handleViewAction({ type: 'story/...
exports.update = (_storyId, data, success, fail) -> config = pathParams: id: _storyId data: data api.stories.update.put config .then (resp) -> dispatcher.handleViewAction type: 'story/update' data: resp success? resp .catch (error) -> fail? error notify...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
95
118
jianliaoim/talk-os:talk-web/client/actions/story.coffee:7:completion
completion
exports.update = (_storyId, data, success, fail) -> config = pathParams: id: _storyId data: data api.stories.update.put config .then (resp) -> dispatcher.handleViewAction type: 'story/update' data: resp success? resp
.catch (error) -> fail? error notifyActions.error '更新story失败' # Action of create story draft, insert draft data, # dispatch 'story/create-draft' into updater. # # @param { String } _teamId # @param { String } _draftStoryId # @param { String } draftStoryCategory # # @return null
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
95
118
jianliaoim/talk-os:talk-web/client/actions/story.coffee:8:raw_corpus
raw_corpus
exports.createDraft = (_teamId, _draftStoryId, draftStoryCategory) -> dispatcher.handleViewAction type: 'story/create-draft' data: { _teamId, _id: _draftStoryId, category: draftStoryCategory }
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
120
123
jianliaoim/talk-os:talk-web/client/actions/story.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.createDraft = (_teamId, _draftStoryId, draftStoryCategory) -> dispatcher.handleViewAction type: 'story/create-draft' data: { _teamId, _id: _draftStoryId, category: draftStoryCategory } ```
exports.createDraft = function(_teamId, _draftStoryId, draftStoryCategory) { return dispatcher.handleViewAction({ type: 'story/create-draft', data: { _teamId, _id: _draftStoryId, category: draftStoryCategory } }); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
120
123
jianliaoim/talk-os:talk-web/client/actions/story.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.createDraft = function(_teamId, _draftStoryId, draftStoryCategory) { return dispatcher.handleViewAction({ type: 'story/create-draft', data: { _teamId, _id: _draftStoryId, category: draftStoryCategory } }); }; ```
exports.createDraft = (_teamId, _draftStoryId, draftStoryCategory) -> dispatcher.handleViewAction type: 'story/create-draft' data: { _teamId, _id: _draftStoryId, category: draftStoryCategory }
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/story.coffee
120
123
jianliaoim/talk-os:talk-account/server/apis/check.coffee:1:raw_corpus
raw_corpus
Promise = require 'bluebird' Err = require 'err1st' config = require 'config' app = require '../server' redis = require '../components/redis' limbo = require 'limbo' { UserModel } = limbo.use 'account' module.exports = checkController = app.controller 'check', -> @action 'ping', (req, res, callback) -> ret...
CoffeeScript
jianliaoim/talk-os
talk-account/server/apis/check.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/apis/check.coffee
1
26
jianliaoim/talk-os:talk-account/server/apis/check.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Promise = require 'bluebird' Err = require 'err1st' config = require 'config' app = require '../server' redis = require '../components/redis' limbo = require 'limbo' { UserModel } = limbo.use 'account' module.exports = checkController = app.controller 'chec...
var Err, Promise, UserModel, app, checkController, config, limbo, redis; Promise = require('bluebird'); Err = require('err1st'); config = require('config'); app = require('../server'); redis = require('../components/redis'); limbo = require('limbo'); ({UserModel} = limbo.use('account')); module.exports = checkC...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/server/apis/check.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/apis/check.coffee
1
26
jianliaoim/talk-os:talk-account/server/apis/check.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Err, Promise, UserModel, app, checkController, config, limbo, redis; Promise = require('bluebird'); Err = require('err1st'); config = require('config'); app = require('../server'); redis = require('../components/redis'); limbo = require('limbo'); ({UserM...
Promise = require 'bluebird' Err = require 'err1st' config = require 'config' app = require '../server' redis = require '../components/redis' limbo = require 'limbo' { UserModel } = limbo.use 'account' module.exports = checkController = app.controller 'check', -> @action 'ping', (req, res, callback) -> ret...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/server/apis/check.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/apis/check.coffee
1
26
jianliaoim/talk-os:talk-account/server/apis/check.coffee:1:completion
completion
Promise = require 'bluebird' Err = require 'err1st' config = require 'config' app = require '../server' redis = require '../components/redis' limbo = require 'limbo' { UserModel } = limbo.use 'account'
module.exports = checkController = app.controller 'check', -> @action 'ping', (req, res, callback) -> return callback(new Err('PARAMS_INVALID', 'checkToken')) unless req.query.checkToken is config.checkToken # Db state $dbState = UserModel.findOneAsync() # Redis state $redisState = redis.setexAs...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/server/apis/check.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/apis/check.coffee
1
26
jianliaoim/talk-os:talk-api2x/server/controllers/mark.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' Err = require 'err1st' Promise = require 'bluebird' logger = require 'graceful-logger' limbo = require 'limbo' app = require '../server' { MarkModel } = limbo.use 'talk' module.exports = markController = app.controller 'mark', -> @mixin require './mixins/permission' @ensure '_targetId', o...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/controllers/mark.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/mark.coffee
1
31
jianliaoim/talk-os:talk-api2x/server/controllers/mark.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' Err = require 'err1st' Promise = require 'bluebird' logger = require 'graceful-logger' limbo = require 'limbo' app = require '../server' { MarkModel } = limbo.use 'talk' module.exports = markController = app.controller 'mark', -> @mixi...
var Err, MarkModel, Promise, _, app, limbo, logger, markController; _ = require('lodash'); Err = require('err1st'); Promise = require('bluebird'); logger = require('graceful-logger'); limbo = require('limbo'); app = require('../server'); ({MarkModel} = limbo.use('talk')); module.exports = markController = app.c...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/controllers/mark.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/mark.coffee
1
31
jianliaoim/talk-os:talk-api2x/server/controllers/mark.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Err, MarkModel, Promise, _, app, limbo, logger, markController; _ = require('lodash'); Err = require('err1st'); Promise = require('bluebird'); logger = require('graceful-logger'); limbo = require('limbo'); app = require('../server'); ({MarkModel} = limbo...
_ = require 'lodash' Err = require 'err1st' Promise = require 'bluebird' logger = require 'graceful-logger' limbo = require 'limbo' app = require '../server' { MarkModel } = limbo.use 'talk' module.exports = markController = app.controller 'mark', -> @mixin require './mixins/permission' @ensure '_targetId', o...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/controllers/mark.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/mark.coffee
1
31
jianliaoim/talk-os:talk-api2x/server/controllers/mark.coffee:1:completion
completion
_ = require 'lodash' Err = require 'err1st' Promise = require 'bluebird' logger = require 'graceful-logger' limbo = require 'limbo' app = require '../server' { MarkModel } = limbo.use 'talk' module.exports = markController = app.controller 'mark', -> @mixin require './mixins/permission'
@ensure '_targetId', only: 'read' @before 'readableMarks', only: 'read' @before 'deletableMark', only: 'remove' @action 'read', (req, res, callback) -> {_targetId, story} = req.get() conditions = target: _targetId team: story._teamId MarkModel.find conditions, callback @action 'remove...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/controllers/mark.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/mark.coffee
1
31
littlebee/git-time-machine:lib/hz-scroller.coffee:1:raw_corpus
raw_corpus
module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 @$element = $("<div class='#{@className}'>") @$parentElement.app...
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2b2a9b6ccc55dda0429a45aae913d1a0f6666439
1,111
https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/hz-scroller.coffee
4
53
littlebee/git-time-machine:lib/hz-scroller.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 @$element = $...
var GitTimeplot; module.exports = GitTimeplot = (function() { class GitTimeplot { constructor($parentElement) { var ref; this._onScroll = this._onScroll.bind(this); this._onTouchClick = this._onTouchClick.bind(this); this.$parentElement = $parentElement; this._debouncedOnScroll = _....
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2b2a9b6ccc55dda0429a45aae913d1a0f6666439
1,111
https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/hz-scroller.coffee
4
53
littlebee/git-time-machine:lib/hz-scroller.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var GitTimeplot; module.exports = GitTimeplot = (function() { class GitTimeplot { constructor($parentElement) { var ref; this._onScroll = this._onScroll.bind(this); this._onTouchClick = this._onTouchClick.bind(this); this.$parentEleme...
module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 @$element = $("<div class='#{@className}'>") @$parentElement.app...
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2b2a9b6ccc55dda0429a45aae913d1a0f6666439
1,111
https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/hz-scroller.coffee
4
53
littlebee/git-time-machine:lib/hz-scroller.coffee:1:completion
completion
module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 @$element = $("<div class='#{@className}'>") @$parentElement.app...
scrollFarLeft: () -> @$element.scrollLeft(0) getScrollLeft: () -> return @$element.scrollLeft() getScrollRight: () -> return @$element.scrollLeft() + @$element.width() _onScroll: => @_toggleTouchAreas() _onTouchClick: (which) => switch(which) when "left" then @scrollFarLeft() ...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2b2a9b6ccc55dda0429a45aae913d1a0f6666439
1,111
https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/hz-scroller.coffee
4
53
littlebee/git-time-machine:lib/hz-scroller.coffee:2:raw_corpus
raw_corpus
_toggleTouchArea: (which)-> $touchArea = @$element.find(".gtm-touch-area.gtm-#{which}") unless $touchArea.length > 0 $touchArea = $("<div class='gtm-touch-area gtm-#{which}'>") $touchArea.on "click.gtmTouchArea", => @_onTouchClick(which) @$element.prepend($touchArea) scrollLeft = @getScro...
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2b2a9b6ccc55dda0429a45aae913d1a0f6666439
1,111
https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/hz-scroller.coffee
54
81
littlebee/git-time-machine:lib/hz-scroller.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _toggleTouchArea: (which)-> $touchArea = @$element.find(".gtm-touch-area.gtm-#{which}") unless $touchArea.length > 0 $touchArea = $("<div class='gtm-touch-area gtm-#{which}'>") $touchArea.on "click.gtmTouchArea", => @_onTouchClick(which) ...
({ _toggleTouchArea: function(which) { var $touchArea, areaLeft, relativeRight, scrollLeft, shouldHide; $touchArea = this.$element.find(`.gtm-touch-area.gtm-${which}`); if (!($touchArea.length > 0)) { $touchArea = $(`<div class='gtm-touch-area gtm-${which}'>`); $touchArea.on("click.gtmTouchAre...
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2b2a9b6ccc55dda0429a45aae913d1a0f6666439
1,111
https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/hz-scroller.coffee
54
81
littlebee/git-time-machine:lib/hz-scroller.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ _toggleTouchArea: function(which) { var $touchArea, areaLeft, relativeRight, scrollLeft, shouldHide; $touchArea = this.$element.find(`.gtm-touch-area.gtm-${which}`); if (!($touchArea.length > 0)) { $touchArea = $(`<div class='gtm-touch-area g...
_toggleTouchArea: (which)-> $touchArea = @$element.find(".gtm-touch-area.gtm-#{which}") unless $touchArea.length > 0 $touchArea = $("<div class='gtm-touch-area gtm-#{which}'>") $touchArea.on "click.gtmTouchArea", => @_onTouchClick(which) @$element.prepend($touchArea) scrollLeft = @getScro...
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2b2a9b6ccc55dda0429a45aae913d1a0f6666439
1,111
https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/hz-scroller.coffee
54
81
littlebee/git-time-machine:lib/hz-scroller.coffee:2:completion
completion
_toggleTouchArea: (which)-> $touchArea = @$element.find(".gtm-touch-area.gtm-#{which}") unless $touchArea.length > 0 $touchArea = $("<div class='gtm-touch-area gtm-#{which}'>") $touchArea.on "click.gtmTouchArea", => @_onTouchClick(which) @$element.prepend($touchArea) scrollLeft = @getScro...
areaLeft: scrollLeft when 'right' shouldHide: relativeRight >= @_getChildWidth() - 10 areaLeft: relativeRight - 20 if shouldHide $touchArea.hide() else $touchArea.css({left: areaLeft}) $touchArea.show() _getChildWidth: -> @$element.find('.timeplot').outerWidth(tr...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2b2a9b6ccc55dda0429a45aae913d1a0f6666439
1,111
https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/hz-scroller.coffee
54
81
littlebee/git-time-machine:lib/hz-scroller.coffee:1:raw_corpus
raw_corpus
{$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 ...
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
67955945166132bc8d05a36417e7e54ebf6dda23
1,111
https://github.com/littlebee/git-time-machine/blob/67955945166132bc8d05a36417e7e54ebf6dda23/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.f...
var $, GitTimeplot, View, _; ({$, View} = require("atom-space-pen-views")); _ = require('underscore-plus'); module.exports = GitTimeplot = (function() { class GitTimeplot { constructor($parentElement) { var ref; this._onScroll = this._onScroll.bind(this); this.$parentElement = $parentElement;...
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
67955945166132bc8d05a36417e7e54ebf6dda23
1,111
https://github.com/littlebee/git-time-machine/blob/67955945166132bc8d05a36417e7e54ebf6dda23/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var $, GitTimeplot, View, _; ({$, View} = require("atom-space-pen-views")); _ = require('underscore-plus'); module.exports = GitTimeplot = (function() { class GitTimeplot { constructor($parentElement) { var ref; this._onScroll = this._onScroll....
{$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 ...
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
67955945166132bc8d05a36417e7e54ebf6dda23
1,111
https://github.com/littlebee/git-time-machine/blob/67955945166132bc8d05a36417e7e54ebf6dda23/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:1:completion
completion
{$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 ...
@$element.scrollLeft(@_getChildWidth() - @$element.width()) getScrollLeft: () -> return @$element.scrollLeft() getScrollRight: () -> return @$element.scrollLeft() + @$element.width() _onScroll: => @_toggleTouchAreas() _toggleTouchAreas: -> @_toggleTouchArea('left') @_toggleTouchArea(...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
67955945166132bc8d05a36417e7e54ebf6dda23
1,111
https://github.com/littlebee/git-time-machine/blob/67955945166132bc8d05a36417e7e54ebf6dda23/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:2:raw_corpus
raw_corpus
scrollLeft = @getScrollLeft() relativeRight = @getScrollRight() {shouldHide, areaLeft} = switch which when 'left' shouldHide: scrollLeft == 0 areaLeft: scrollLeft when 'right' shouldHide: relativeRight >= @_getChildWidth() - 10 areaLeft: relativeRight - 20 if sh...
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
67955945166132bc8d05a36417e7e54ebf6dda23
1,111
https://github.com/littlebee/git-time-machine/blob/67955945166132bc8d05a36417e7e54ebf6dda23/lib/hz-scroller.coffee
51
70
littlebee/git-time-machine:lib/hz-scroller.coffee:2:completion
completion
scrollLeft = @getScrollLeft() relativeRight = @getScrollRight() {shouldHide, areaLeft} = switch which when 'left' shouldHide: scrollLeft == 0 areaLeft: scrollLeft when 'right' shouldHide: relativeRight >= @_getChildWidth() - 10 areaLeft: relativeRight - 20
if shouldHide $touchArea.hide() else $touchArea.css({left: areaLeft}) $touchArea.show() _getChildWidth: -> @$element.find('.timeplot').outerWidth(true)
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
67955945166132bc8d05a36417e7e54ebf6dda23
1,111
https://github.com/littlebee/git-time-machine/blob/67955945166132bc8d05a36417e7e54ebf6dda23/lib/hz-scroller.coffee
51
70
littlebee/git-time-machine:lib/hz-scroller.coffee:1:raw_corpus
raw_corpus
{$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 ...
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
ee97545054e4fdcbbb5fea240230d11233a4dc92
1,111
https://github.com/littlebee/git-time-machine/blob/ee97545054e4fdcbbb5fea240230d11233a4dc92/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.f...
var $, GitTimeplot, View, _; ({$, View} = require("atom-space-pen-views")); _ = require('underscore-plus'); module.exports = GitTimeplot = (function() { class GitTimeplot { constructor($parentElement) { var ref; this._onScroll = this._onScroll.bind(this); this.$parentElement = $parentElement;...
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
ee97545054e4fdcbbb5fea240230d11233a4dc92
1,111
https://github.com/littlebee/git-time-machine/blob/ee97545054e4fdcbbb5fea240230d11233a4dc92/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var $, GitTimeplot, View, _; ({$, View} = require("atom-space-pen-views")); _ = require('underscore-plus'); module.exports = GitTimeplot = (function() { class GitTimeplot { constructor($parentElement) { var ref; this._onScroll = this._onScroll....
{$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 ...
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
ee97545054e4fdcbbb5fea240230d11233a4dc92
1,111
https://github.com/littlebee/git-time-machine/blob/ee97545054e4fdcbbb5fea240230d11233a4dc92/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:1:completion
completion
{$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 ...
_onScroll: => @_toggleTouchAreas() _toggleTouchAreas: -> @_toggleTouchArea('left') @_toggleTouchArea('right') _toggleTouchArea: (which)-> $touchArea = @$element.find(".gtm-#{which}-touch-area") unless $touchArea.length > 0 $touchArea = $("<div class='gtm-#{which}-touch-area'>") @...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
ee97545054e4fdcbbb5fea240230d11233a4dc92
1,111
https://github.com/littlebee/git-time-machine/blob/ee97545054e4fdcbbb5fea240230d11233a4dc92/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:2:raw_corpus
raw_corpus
if shouldHide $touchArea.hide() else $touchArea.css({left: areaLeft}) $touchArea.show() _getChildWidth: -> @$element.find('.timeplot').outerWidth(true)
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
ee97545054e4fdcbbb5fea240230d11233a4dc92
1,111
https://github.com/littlebee/git-time-machine/blob/ee97545054e4fdcbbb5fea240230d11233a4dc92/lib/hz-scroller.coffee
51
60
littlebee/git-time-machine:lib/hz-scroller.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if shouldHide $touchArea.hide() else $touchArea.css({left: areaLeft}) $touchArea.show() _getChildWidth: -> @$element.find('.timeplot').outerWidth(true) ```
if (shouldHide) { $touchArea.hide(); } else { $touchArea.css({ left: areaLeft }); $touchArea.show(); } ({ _getChildWidth: function() { return this.$element.find('.timeplot').outerWidth(true); } });
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
ee97545054e4fdcbbb5fea240230d11233a4dc92
1,111
https://github.com/littlebee/git-time-machine/blob/ee97545054e4fdcbbb5fea240230d11233a4dc92/lib/hz-scroller.coffee
51
60
littlebee/git-time-machine:lib/hz-scroller.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript if (shouldHide) { $touchArea.hide(); } else { $touchArea.css({ left: areaLeft }); $touchArea.show(); } ({ _getChildWidth: function() { return this.$element.find('.timeplot').outerWidth(true); } }); ```
if shouldHide $touchArea.hide() else $touchArea.css({left: areaLeft}) $touchArea.show() _getChildWidth: -> @$element.find('.timeplot').outerWidth(true)
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
ee97545054e4fdcbbb5fea240230d11233a4dc92
1,111
https://github.com/littlebee/git-time-machine/blob/ee97545054e4fdcbbb5fea240230d11233a4dc92/lib/hz-scroller.coffee
51
60
littlebee/git-time-machine:lib/hz-scroller.coffee:2:completion
completion
if shouldHide $touchArea.hide() else $touchArea.css({left: areaLeft})
$touchArea.show() _getChildWidth: -> @$element.find('.timeplot').outerWidth(true)
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
ee97545054e4fdcbbb5fea240230d11233a4dc92
1,111
https://github.com/littlebee/git-time-machine/blob/ee97545054e4fdcbbb5fea240230d11233a4dc92/lib/hz-scroller.coffee
51
60
littlebee/git-time-machine:lib/hz-scroller.coffee:1:raw_corpus
raw_corpus
{$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 ...
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2d2adcc4c8d3095653098d677e55020f71b2e4a1
1,111
https://github.com/littlebee/git-time-machine/blob/2d2adcc4c8d3095653098d677e55020f71b2e4a1/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.f...
var $, GitTimeplot, View, _; ({$, View} = require("atom-space-pen-views")); _ = require('underscore-plus'); module.exports = GitTimeplot = (function() { class GitTimeplot { constructor($parentElement) { var ref; this._onScroll = this._onScroll.bind(this); this.$parentElement = $parentElement;...
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2d2adcc4c8d3095653098d677e55020f71b2e4a1
1,111
https://github.com/littlebee/git-time-machine/blob/2d2adcc4c8d3095653098d677e55020f71b2e4a1/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var $, GitTimeplot, View, _; ({$, View} = require("atom-space-pen-views")); _ = require('underscore-plus'); module.exports = GitTimeplot = (function() { class GitTimeplot { constructor($parentElement) { var ref; this._onScroll = this._onScroll....
{$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 ...
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2d2adcc4c8d3095653098d677e55020f71b2e4a1
1,111
https://github.com/littlebee/git-time-machine/blob/2d2adcc4c8d3095653098d677e55020f71b2e4a1/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:1:completion
completion
{$, View} = require "atom-space-pen-views" _ = require 'underscore-plus' module.exports = class GitTimeplot className: 'gtm-hz-scroller' constructor: (@$parentElement)-> @_debouncedOnScroll = _.debounce @_onScroll, 100 @$element = @$parentElement.find(".#{@className}") unless @$element?.length > 0 ...
_toggleTouchAreas: -> @_toggleLeftTouchArea() @_toggleRightTouchArea() _toggleLeftTouchArea: -> $leftTouchArea = @$element.find('.gtm-left-touch-area') unless $leftTouchArea.length > 0 $leftTouchArea = $('<div class="gtm-left-touch-area">') @$element.prepend($leftTouchArea) scrollLef...
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2d2adcc4c8d3095653098d677e55020f71b2e4a1
1,111
https://github.com/littlebee/git-time-machine/blob/2d2adcc4c8d3095653098d677e55020f71b2e4a1/lib/hz-scroller.coffee
1
50
littlebee/git-time-machine:lib/hz-scroller.coffee:2:raw_corpus
raw_corpus
if relativeRight >= @_getChildWidth() - 10 $rightTouchArea.hide() else $rightTouchArea.show() $rightTouchArea.css({left: relativeRight - 20}) _getChildWidth: -> @$element.find('.timeplot').outerWidth(true)
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2d2adcc4c8d3095653098d677e55020f71b2e4a1
1,111
https://github.com/littlebee/git-time-machine/blob/2d2adcc4c8d3095653098d677e55020f71b2e4a1/lib/hz-scroller.coffee
51
59
littlebee/git-time-machine:lib/hz-scroller.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if relativeRight >= @_getChildWidth() - 10 $rightTouchArea.hide() else $rightTouchArea.show() $rightTouchArea.css({left: relativeRight - 20}) _getChildWidth: -> @$element.find('.timeplot').outerWidth(true) ```
if (relativeRight >= this._getChildWidth() - 10) { $rightTouchArea.hide(); } else { $rightTouchArea.show(); $rightTouchArea.css({ left: relativeRight - 20 }); } ({ _getChildWidth: function() { return this.$element.find('.timeplot').outerWidth(true); } });
CoffeeScript
JavaScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2d2adcc4c8d3095653098d677e55020f71b2e4a1
1,111
https://github.com/littlebee/git-time-machine/blob/2d2adcc4c8d3095653098d677e55020f71b2e4a1/lib/hz-scroller.coffee
51
59
littlebee/git-time-machine:lib/hz-scroller.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript if (relativeRight >= this._getChildWidth() - 10) { $rightTouchArea.hide(); } else { $rightTouchArea.show(); $rightTouchArea.css({ left: relativeRight - 20 }); } ({ _getChildWidth: function() { return this.$element.find('.timeplot').outerWidth(tru...
if relativeRight >= @_getChildWidth() - 10 $rightTouchArea.hide() else $rightTouchArea.show() $rightTouchArea.css({left: relativeRight - 20}) _getChildWidth: -> @$element.find('.timeplot').outerWidth(true)
JavaScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2d2adcc4c8d3095653098d677e55020f71b2e4a1
1,111
https://github.com/littlebee/git-time-machine/blob/2d2adcc4c8d3095653098d677e55020f71b2e4a1/lib/hz-scroller.coffee
51
59
littlebee/git-time-machine:lib/hz-scroller.coffee:2:completion
completion
if relativeRight >= @_getChildWidth() - 10 $rightTouchArea.hide() else $rightTouchArea.show()
$rightTouchArea.css({left: relativeRight - 20}) _getChildWidth: -> @$element.find('.timeplot').outerWidth(true)
CoffeeScript
CoffeeScript
littlebee/git-time-machine
lib/hz-scroller.coffee
MIT
2d2adcc4c8d3095653098d677e55020f71b2e4a1
1,111
https://github.com/littlebee/git-time-machine/blob/2d2adcc4c8d3095653098d677e55020f71b2e4a1/lib/hz-scroller.coffee
51
59
jianliaoim/talk-os:talk-web/test/spec/util/search.spec.coffee:1:raw_corpus
raw_corpus
Immutable = require 'immutable' describe 'util: search', -> beforeEach -> @search = require 'util/search' describe 'function: indexOfPinyins', -> it 'should return the first position if there is a match', -> pinyins = Immutable.List(['xiaoai', 'xiaoyi']) query = 'x' index = @search.ind...
CoffeeScript
jianliaoim/talk-os
talk-web/test/spec/util/search.spec.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/util/search.spec.coffee
1
50
jianliaoim/talk-os:talk-web/test/spec/util/search.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Immutable = require 'immutable' describe 'util: search', -> beforeEach -> @search = require 'util/search' describe 'function: indexOfPinyins', -> it 'should return the first position if there is a match', -> pinyins = Immutable.List(['xiaoai'...
var Immutable; Immutable = require('immutable'); describe('util: search', function() { beforeEach(function() { return this.search = require('util/search'); }); return describe('function: indexOfPinyins', function() { it('should return the first position if there is a match', function() { var index...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/test/spec/util/search.spec.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/util/search.spec.coffee
1
50
jianliaoim/talk-os:talk-web/test/spec/util/search.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable; Immutable = require('immutable'); describe('util: search', function() { beforeEach(function() { return this.search = require('util/search'); }); return describe('function: indexOfPinyins', function() { it('should return the first posi...
Immutable = require 'immutable' describe 'util: search', -> beforeEach -> @search = require 'util/search' describe 'function: indexOfPinyins', -> it 'should return the first position if there is a match', -> pinyins = Immutable.List(['xiaoai', 'xiaoyi']) query = 'x' index = @search.ind...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/test/spec/util/search.spec.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/util/search.spec.coffee
1
50
jianliaoim/talk-os:talk-web/test/spec/util/search.spec.coffee:1:completion
completion
Immutable = require 'immutable' describe 'util: search', -> beforeEach -> @search = require 'util/search' describe 'function: indexOfPinyins', -> it 'should return the first position if there is a match', -> pinyins = Immutable.List(['xiaoai', 'xiaoyi']) query = 'x' index = @search.ind...
expect(index).toEqual 4 query = 'yi' index = @search.indexOfPinyins(pinyins, query) expect(index).toEqual 4 query = '' index = @search.indexOfPinyins(pinyins, query) expect(index).toEqual 0 it 'should return the first position if there are mutiple matches', -> pinyins = ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/test/spec/util/search.spec.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/util/search.spec.coffee
1
50
jianliaoim/talk-os:talk-web/test/spec/util/search.spec.coffee:2:raw_corpus
raw_corpus
index = @search.indexOfPinyins(pinyins, query) expect(index).toEqual -1 it 'should make "general" room a special case', -> pinyins = Immutable.List(['general']) query = 'gonggaoban' # Search by chinese name index = @search.indexOfPinyins(pinyins, query) expect(index).toEqual 0
CoffeeScript
jianliaoim/talk-os
talk-web/test/spec/util/search.spec.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/util/search.spec.coffee
51
58
jianliaoim/talk-os:talk-web/test/spec/util/search.spec.coffee:2:completion
completion
index = @search.indexOfPinyins(pinyins, query) expect(index).toEqual -1 it 'should make "general" room a special case', ->
pinyins = Immutable.List(['general']) query = 'gonggaoban' # Search by chinese name index = @search.indexOfPinyins(pinyins, query) expect(index).toEqual 0
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/test/spec/util/search.spec.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/util/search.spec.coffee
51
58
gss/engine:src/structures/Positions.coffee:1:raw_corpus
raw_corpus
class Positions constructor: (@engine) -> yield: (id, property, value, positioning) -> # parse $id[property] as [id, property] unless id? path = property last = path.lastIndexOf('[') return if last == -1 property = path.substring(last + 1, path.length - 1) id = path.substring(...
CoffeeScript
gss/engine
src/structures/Positions.coffee
MIT
c8a49435e3ee1aae29e857e34fe09a2616bc1e44
2,854
https://github.com/gss/engine/blob/c8a49435e3ee1aae29e857e34fe09a2616bc1e44/src/structures/Positions.coffee
8
57
gss/engine:src/structures/Positions.coffee:1:completion
completion
class Positions constructor: (@engine) -> yield: (id, property, value, positioning) -> # parse $id[property] as [id, property] unless id? path = property last = path.lastIndexOf('[') return if last == -1 property = path.substring(last + 1, path.length - 1) id = path.substring(...
# Apply changed styles in batch, # leave out positioning properties (Restyle/Reflow) positioning = {} if data for path, value of data unless value == undefined @yield null, path, value, positioning # Adjust positioning styles to respect element offsets @engine.intrinsic.each...
CoffeeScript
CoffeeScript
gss/engine
src/structures/Positions.coffee
MIT
c8a49435e3ee1aae29e857e34fe09a2616bc1e44
2,854
https://github.com/gss/engine/blob/c8a49435e3ee1aae29e857e34fe09a2616bc1e44/src/structures/Positions.coffee
8
57
gss/engine:src/structures/Positions.coffee:2:raw_corpus
raw_corpus
styles = positioning?[uid] if values = @engine.values if styles?.x == undefined if (left = values[uid + '[x]'])? (styles ||= (positioning[uid] ||= {})).x = left if styles?.y == undefined if (top = values[uid + '[y]'])? (styles ||= (positioning[uid] ||= {...
CoffeeScript
gss/engine
src/structures/Positions.coffee
MIT
c8a49435e3ee1aae29e857e34fe09a2616bc1e44
2,854
https://github.com/gss/engine/blob/c8a49435e3ee1aae29e857e34fe09a2616bc1e44/src/structures/Positions.coffee
58
82
gss/engine:src/structures/Positions.coffee:2:completion
completion
styles = positioning?[uid] if values = @engine.values if styles?.x == undefined if (left = values[uid + '[x]'])? (styles ||= (positioning[uid] ||= {})).x = left if styles?.y == undefined if (top = values[uid + '[y]'])? (styles ||= (positioning[uid] ||= {...
switch property when "x" styles.x = value - x (offsets ||= {}).x = value - x when "y" styles.y = value - y (offsets ||= {}).y = value - y # Let other measurements hook up into this batch # @engine.intrinsic.update(e...
CoffeeScript
CoffeeScript
gss/engine
src/structures/Positions.coffee
MIT
c8a49435e3ee1aae29e857e34fe09a2616bc1e44
2,854
https://github.com/gss/engine/blob/c8a49435e3ee1aae29e857e34fe09a2616bc1e44/src/structures/Positions.coffee
58
82
Atraci/Atraci:coffee/_search.coffee:1:raw_corpus
raw_corpus
doSearch = (searchObj, getTracks, callback) -> userTracking.event( "Search", "organic", searchObj.searchStr).send() $('#SideBar li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search({ keywor...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:1:completion
completion
doSearch = (searchObj, getTracks, callback) -> userTracking.event( "Search", "organic", searchObj.searchStr).send() $('#SideBar li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search({ keywor...
noResults: '' results: -> select: (event, ui) -> doSearch({ searchStr: ui.item.value, searchType: ui.item.type }) source: (request, response) -> searchVal = request.term if searchVal $.getJSON( 'http://www.last.fm/search/autocomplete?q=' + searchV...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:2:raw_corpus
raw_corpus
itemType = 'Artist' itemValue = eachItem.artist else # There may have no any value of these # In this way, just ignore the case. return foundTracks.push type: itemType weight: eac...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_search.coffee
51
100
Atraci/Atraci:coffee/_search.coffee:2:completion
completion
itemType = 'Artist' itemValue = eachItem.artist else # There may have no any value of these # In this way, just ignore the case. return foundTracks.push type: itemType weight: eac...
switch item.type when 'Track' then iconClass = 'fa-music' when 'Album' then iconClass = 'fa-folder-open-o' when 'Artist' then iconClass = 'fa-group' $icon = $('<span>') $icon.addClass('fa fa-fw ' + iconClass) # make label $label = $('<span>') $label.text(item.label) # make a...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_search.coffee
51
100
Atraci/Atraci:coffee/_search.coffee:3:raw_corpus
raw_corpus
doSearch({searchStr: searchVal}) $(@).autocomplete('close') $('#ContentWrapper').on 'click', '.track-container', -> if videojs('video_player').paused() != true and videojs('video_player').currentTime() == 0 PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), ...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_search.coffee
101
129
Atraci/Atraci:coffee/_search.coffee:3:completion
completion
doSearch({searchStr: searchVal}) $(@).autocomplete('close') $('#ContentWrapper').on 'click', '.track-container', -> if videojs('video_player').paused() != true and videojs('video_player').currentTime() == 0 PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), ...
if $(@).find('.artist').text() != __currentTrack.artist or $(@).find('.title').text() != __currentTrack.title PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_search.coffee
101
129
Atraci/Atraci:coffee/_search.coffee:1:raw_corpus
raw_corpus
doSearch = (searchVal, getTracks, callback) -> userTracking.event( "Search", "organic", searchVal).send() $('#SideBar li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search({ keywords: search...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
aba06633e946e80707c404493341e5c7e746d257
800
https://github.com/Atraci/Atraci/blob/aba06633e946e80707c404493341e5c7e746d257/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:1:completion
completion
doSearch = (searchVal, getTracks, callback) -> userTracking.event( "Search", "organic", searchVal).send() $('#SideBar li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search({ keywords: search...
results: -> select: (event, ui) -> doSearch(ui.item.value) source: (request, response) -> searchVal = request.term if searchVal $.getJSON( 'http://www.last.fm/search/autocomplete?q=' + searchVal, (data) -> results = data?.response?.docs foun...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
aba06633e946e80707c404493341e5c7e746d257
800
https://github.com/Atraci/Atraci/blob/aba06633e946e80707c404493341e5c7e746d257/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:2:raw_corpus
raw_corpus
# In this way, just ignore the case. return foundTracks.push type: itemType weight: eachItem.weight label: itemValue value: itemValue # tracks with higher scores will be the first foun...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
aba06633e946e80707c404493341e5c7e746d257
800
https://github.com/Atraci/Atraci/blob/aba06633e946e80707c404493341e5c7e746d257/coffee/_search.coffee
51
100
Atraci/Atraci:coffee/_search.coffee:2:completion
completion
# In this way, just ignore the case. return foundTracks.push type: itemType weight: eachItem.weight label: itemValue value: itemValue # tracks with higher scores will be the first foun...
$icon = $('<span>') $icon.addClass('fa fa-fw ' + iconClass) # make label $label = $('<span>') $label.text(item.label) # make anchor $a = $('<a>') $a.append($icon) $a.append($label) return $('<li>') .data("item.autocomplete", item) .append($a) .appendTo(ul) $('...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
aba06633e946e80707c404493341e5c7e746d257
800
https://github.com/Atraci/Atraci/blob/aba06633e946e80707c404493341e5c7e746d257/coffee/_search.coffee
51
100
Atraci/Atraci:coffee/_search.coffee:3:raw_corpus
raw_corpus
if videojs('video_player').paused() != true and videojs('video_player').currentTime() == 0 PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ) $(@)....
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
aba06633e946e80707c404493341e5c7e746d257
800
https://github.com/Atraci/Atraci/blob/aba06633e946e80707c404493341e5c7e746d257/coffee/_search.coffee
101
125
Atraci/Atraci:coffee/_search.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if videojs('video_player').paused() != true and videojs('video_player').currentTime() == 0 PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('...
if (videojs('video_player').paused() !== true && videojs('video_player').currentTime() === 0) { PlayTrack($(this).find('.artist').text(), $(this).find('.title').text(), $(this).find('.cover').attr('data-cover_url_medium'), $(this).find('.cover').attr('data-cover_url_large')); $(this).siblings('.playing').removeClas...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_search.coffee
MIT
aba06633e946e80707c404493341e5c7e746d257
800
https://github.com/Atraci/Atraci/blob/aba06633e946e80707c404493341e5c7e746d257/coffee/_search.coffee
101
125
Atraci/Atraci:coffee/_search.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript if (videojs('video_player').paused() !== true && videojs('video_player').currentTime() === 0) { PlayTrack($(this).find('.artist').text(), $(this).find('.title').text(), $(this).find('.cover').attr('data-cover_url_medium'), $(this).find('.cover').attr('data-cover_...
if videojs('video_player').paused() != true and videojs('video_player').currentTime() == 0 PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ) $(@)....
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
aba06633e946e80707c404493341e5c7e746d257
800
https://github.com/Atraci/Atraci/blob/aba06633e946e80707c404493341e5c7e746d257/coffee/_search.coffee
101
125
Atraci/Atraci:coffee/_search.coffee:3:completion
completion
if videojs('video_player').paused() != true and videojs('video_player').currentTime() == 0 PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ) $(@)....
$(@).find('.title').text() != __currentTrack.title PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ) $(@).siblings('.playing').removeClass('playing') ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
aba06633e946e80707c404493341e5c7e746d257
800
https://github.com/Atraci/Atraci/blob/aba06633e946e80707c404493341e5c7e746d257/coffee/_search.coffee
101
125
Atraci/Atraci:coffee/_search.coffee:1:raw_corpus
raw_corpus
doSearch = (searchVal, getTracks, callback) -> userTracking.event( "Search", "organic", searchVal).send() $('#sidebar-container li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search({ keywor...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
d3b9006f1d7c7d502d0e1255880c846ab60299aa
800
https://github.com/Atraci/Atraci/blob/d3b9006f1d7c7d502d0e1255880c846ab60299aa/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:1:completion
completion
doSearch = (searchVal, getTracks, callback) -> userTracking.event( "Search", "organic", searchVal).send() $('#sidebar-container li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search({ keywor...
results: -> select: (event, ui) -> doSearch(ui.item.value) source: (request, response) -> searchVal = request.term if searchVal $.getJSON( 'http://www.last.fm/search/autocomplete?q=' + searchVal, (data) -> results = data?.response?.docs foun...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
d3b9006f1d7c7d502d0e1255880c846ab60299aa
800
https://github.com/Atraci/Atraci/blob/d3b9006f1d7c7d502d0e1255880c846ab60299aa/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:2:raw_corpus
raw_corpus
# In this way, just ignore the case. return foundTracks.push type: itemType weight: eachItem.weight label: itemValue value: itemValue # tracks with higher scores will be the first foun...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
c9e7bb599e5584d9698a79617de68843d30d3aed
800
https://github.com/Atraci/Atraci/blob/c9e7bb599e5584d9698a79617de68843d30d3aed/coffee/_search.coffee
51
100
Atraci/Atraci:coffee/_search.coffee:2:completion
completion
# In this way, just ignore the case. return foundTracks.push type: itemType weight: eachItem.weight label: itemValue value: itemValue # tracks with higher scores will be the first foun...
$icon = $('<span>') $icon.addClass('fa fa-fw ' + iconClass) # make label $label = $('<span>') $label.text(item.label) # make anchor $a = $('<a>') $a.append($icon) $a.append($label) return $('<li>') .data("item.autocomplete", item) .append($a) .appendTo(ul) $('...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
c9e7bb599e5584d9698a79617de68843d30d3aed
800
https://github.com/Atraci/Atraci/blob/c9e7bb599e5584d9698a79617de68843d30d3aed/coffee/_search.coffee
51
100
Atraci/Atraci:coffee/_search.coffee:3:raw_corpus
raw_corpus
videojs('video_player').currentTime() == 0 PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ) $(@).siblings('.playing').removeClass('playing') $(...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
c9e7bb599e5584d9698a79617de68843d30d3aed
800
https://github.com/Atraci/Atraci/blob/c9e7bb599e5584d9698a79617de68843d30d3aed/coffee/_search.coffee
101
124
Atraci/Atraci:coffee/_search.coffee:3:completion
completion
videojs('video_player').currentTime() == 0 PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ) $(@).siblings('.playing').removeClass('playing') $(...
PlayTrack( $(@).find('.artist').text(), $(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ) $(@).siblings('.playing').removeClass('playing') $(@).addClass('playing') else if videojs('video...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
c9e7bb599e5584d9698a79617de68843d30d3aed
800
https://github.com/Atraci/Atraci/blob/c9e7bb599e5584d9698a79617de68843d30d3aed/coffee/_search.coffee
101
124
Atraci/Atraci:coffee/_search.coffee:1:raw_corpus
raw_corpus
doSearch = (searchVal, getTracks, callback) -> userTracking.event( "Search", "organic", searchVal).send() $('#sidebar-container li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search({ keywor...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
6f8956fc9ccdcce8b206c44bfa24c425c16588d0
800
https://github.com/Atraci/Atraci/blob/6f8956fc9ccdcce8b206c44bfa24c425c16588d0/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:1:completion
completion
doSearch = (searchVal, getTracks, callback) -> userTracking.event( "Search", "organic", searchVal).send() $('#sidebar-container li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search({ keywor...
results: -> select: (event, ui) -> doSearch(ui.item.value) source: (request, response) -> searchVal = request.term if searchVal $.getJSON( 'http://www.last.fm/search/autocomplete?q=' + searchVal, (data) -> results = data?.response?.docs foun...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
6f8956fc9ccdcce8b206c44bfa24c425c16588d0
800
https://github.com/Atraci/Atraci/blob/6f8956fc9ccdcce8b206c44bfa24c425c16588d0/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:1:raw_corpus
raw_corpus
doSearch = (searchVal, getTracks, callback) -> userTracking.event( "Search", "organic", searchVal).send() $('#sidebar-container li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search(searchVal, (...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:1:completion
completion
doSearch = (searchVal, getTracks, callback) -> userTracking.event( "Search", "organic", searchVal).send() $('#sidebar-container li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search(searchVal, (...
doSearch(ui.item.value) source: (request, response) -> searchVal = request.term if searchVal $.getJSON( 'http://www.last.fm/search/autocomplete?q=' + searchVal, (data) -> results = data?.response?.docs foundTracks = [] if results ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:2:raw_corpus
raw_corpus
foundTracks.push type: itemType weight: eachItem.weight label: itemValue value: itemValue # tracks with higher scores will be the first foundTracks.sort (trackA, trackB) -> return trackA.weight < trackB....
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_search.coffee
51
100
Atraci/Atraci:coffee/_search.coffee:2:completion
completion
foundTracks.push type: itemType weight: eachItem.weight label: itemValue value: itemValue # tracks with higher scores will be the first foundTracks.sort (trackA, trackB) -> return trackA.weight < trackB....
# make label $label = $('<span>') $label.text(item.label) # make anchor $a = $('<a>') $a.append($icon) $a.append($label) return $('<li>') .data("item.autocomplete", item) .append($a) .appendTo(ul) $('#Search input').keypress (e) -> searchVal = $(@).val() if e.w...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_search.coffee
51
100
Atraci/Atraci:coffee/_search.coffee:3:raw_corpus
raw_corpus
$(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ) $(@).siblings('.playing').removeClass('playing') $(@).addClass('playing') if $(@).find('.artist').text() != __currentTrack.artist or $(@).find('.ti...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_search.coffee
101
121
Atraci/Atraci:coffee/_search.coffee:3:completion
completion
$(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ) $(@).siblings('.playing').removeClass('playing') $(@).addClass('playing') if $(@).find('.artist').text() != __currentTrack.artist or $(@).find('.ti...
$(@).find('.artist').text(), $(@).find('.title').text(), $(@).find('.cover').attr('data-cover_url_medium'), $(@).find('.cover').attr('data-cover_url_large') ) $(@).siblings('.playing').removeClass('playing') $(@).addClass('playing') else if videojs('video_player').paused() ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_search.coffee
101
121
Atraci/Atraci:coffee/_search.coffee:1:raw_corpus
raw_corpus
doSearch = (searchVal, getTracks, callback) -> userTracking.event("Search", "organic", searchVal).send() $('#sidebar-container li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search(searchVal, ((tr...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
fc13789f06fbbcfcc77c6bc99531107bbc233628
800
https://github.com/Atraci/Atraci/blob/fc13789f06fbbcfcc77c6bc99531107bbc233628/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:1:completion
completion
doSearch = (searchVal, getTracks, callback) -> userTracking.event("Search", "organic", searchVal).send() $('#sidebar-container li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search(searchVal, ((tr...
$.getJSON 'http://www.last.fm/search/autocomplete?q=' + searchVal, (data) -> results = data?.response?.docs foundTracks = [] if results results.forEach (eachItem, index) -> # find out the right type of this i...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
fc13789f06fbbcfcc77c6bc99531107bbc233628
800
https://github.com/Atraci/Atraci/blob/fc13789f06fbbcfcc77c6bc99531107bbc233628/coffee/_search.coffee
1
50
Atraci/Atraci:coffee/_search.coffee:2:raw_corpus
raw_corpus
# tracks with higher scores will be the first foundTracks.sort (trackA, trackB) -> return trackA.weight < trackB.weight response(foundTracks) else response([]) ).data('ui-autocomplete')._renderItem = (ul, item) -> ...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
fc13789f06fbbcfcc77c6bc99531107bbc233628
800
https://github.com/Atraci/Atraci/blob/fc13789f06fbbcfcc77c6bc99531107bbc233628/coffee/_search.coffee
51
96
Atraci/Atraci:coffee/_search.coffee:2:completion
completion
# tracks with higher scores will be the first foundTracks.sort (trackA, trackB) -> return trackA.weight < trackB.weight response(foundTracks) else response([]) ).data('ui-autocomplete')._renderItem = (ul, item) -> ...
$a.append($icon) $a.append($label) return $('<li>').data("item.autocomplete", item).append($a).appendTo(ul) $('#Search input').keypress (e) -> searchVal = $(@).val() if e.which is 13 and $(@).val() != '' doSearch(searchVal) $('#ContentWrapper').on 'click', '.track-containe...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
fc13789f06fbbcfcc77c6bc99531107bbc233628
800
https://github.com/Atraci/Atraci/blob/fc13789f06fbbcfcc77c6bc99531107bbc233628/coffee/_search.coffee
51
96
Atraci/Atraci:coffee/_search.coffee:2:raw_corpus
raw_corpus
# tracks with higher scores will be the first foundTracks.sort (trackA, trackB) -> return trackA.weight < trackB.weight response(foundTracks) else response([]) ).data('ui-autocomplete')._renderItem = (ul, item) -> ...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
e089667bab6c51070baa53879d45f45d7dc5e3d8
800
https://github.com/Atraci/Atraci/blob/e089667bab6c51070baa53879d45f45d7dc5e3d8/coffee/_search.coffee
51
92
Atraci/Atraci:coffee/_search.coffee:2:completion
completion
# tracks with higher scores will be the first foundTracks.sort (trackA, trackB) -> return trackA.weight < trackB.weight response(foundTracks) else response([]) ).data('ui-autocomplete')._renderItem = (ul, item) -> ...
# make anchor $a = $('<a>') $a.append($icon) $a.append($label) return $('<li>').data("item.autocomplete", item).append($a).appendTo(ul) $('#Search input').keypress (e) -> searchVal = $(@).val() if e.which is 13 and $(@).val() != '' doSearch(searchVal) $('#C...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
e089667bab6c51070baa53879d45f45d7dc5e3d8
800
https://github.com/Atraci/Atraci/blob/e089667bab6c51070baa53879d45f45d7dc5e3d8/coffee/_search.coffee
51
92
Atraci/Atraci:coffee/_search.coffee:1:raw_corpus
raw_corpus
$ -> doSearch = (searchVal) -> userTracking.event("Search", "organic", searchVal).send() $('#sidebar-container li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search(searchV...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
e5beee0decba281ae18f7bc399cac8412fae0963
800
https://github.com/Atraci/Atraci/blob/e5beee0decba281ae18f7bc399cac8412fae0963/coffee/_search.coffee
1
40
Atraci/Atraci:coffee/_search.coffee:1:completion
completion
$ -> doSearch = (searchVal) -> userTracking.event("Search", "organic", searchVal).send() $('#sidebar-container li.active').removeClass('active') $('#tracklist-container').empty() spinner = new Spinner(spinner_opts).spin($('#tracklist-container')[0]) TrackSource.search(searchV...
if searchVal $.getJSON 'http://www.last.fm/search/autocomplete?q=' + searchVal, (data) -> results = data?.response?.docs foundTracks = [] if results results.forEach (eachItem, index) -> # find...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
e5beee0decba281ae18f7bc399cac8412fae0963
800
https://github.com/Atraci/Atraci/blob/e5beee0decba281ae18f7bc399cac8412fae0963/coffee/_search.coffee
1
40
Atraci/Atraci:coffee/_search.coffee:2:raw_corpus
raw_corpus
foundTracks.push type: itemType weight: eachItem.weight label: itemValue value: itemValue # tracks with higher scores will be the first foundTr...
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
e5beee0decba281ae18f7bc399cac8412fae0963
800
https://github.com/Atraci/Atraci/blob/e5beee0decba281ae18f7bc399cac8412fae0963/coffee/_search.coffee
42
89
Atraci/Atraci:coffee/_search.coffee:2:completion
completion
foundTracks.push type: itemType weight: eachItem.weight label: itemValue value: itemValue # tracks with higher scores will be the first foundTr...
$label = $('<span>') $label.text(item.label) # make anchor $a = $('<a>') $a.append($icon) $a.append($label) return $('<li>').data("item.autocomplete", item).append($a).appendTo(ul) $('#Search input').keypress (e) -> searchVal = $(@).val() if e.which is ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_search.coffee
MIT
e5beee0decba281ae18f7bc399cac8412fae0963
800
https://github.com/Atraci/Atraci/blob/e5beee0decba281ae18f7bc399cac8412fae0963/coffee/_search.coffee
42
89