commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
643f68764031bff78efa11b51eead1c473bb140d | services/web/app/coffee/Features/Analytics/AnalyticsRouter.coffee | services/web/app/coffee/Features/Analytics/AnalyticsRouter.coffee | AuthenticationController = require './../Authentication/AuthenticationController'
AnalyticsController = require('./AnalyticsController')
AnalyticsProxy = require('./AnalyticsProxy')
module.exports =
apply: (webRouter, privateApiRouter, publicApiRouter) ->
webRouter.post '/event/:event', AnalyticsController.recordEv... | AuthenticationController = require './../Authentication/AuthenticationController'
AnalyticsController = require('./AnalyticsController')
AnalyticsProxy = require('./AnalyticsProxy')
module.exports =
apply: (webRouter, privateApiRouter, publicApiRouter) ->
webRouter.post '/event/:event', AnalyticsController.recordEv... | Add `recentV1TemplateIdsActivity` proxy to AnalyticRouter | Add `recentV1TemplateIdsActivity` proxy to AnalyticRouter
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
6cb3b9ee4d0773ff2daccf663a2962bbf593b5cf | test/battle_server.coffee | test/battle_server.coffee | {BattleServer} = require '../server'
{Engine} = require '../engine'
sinon = require 'sinon'
describe 'BattleServer', ->
describe '#queuePlayer', ->
it "adds a new player to the server's queue", ->
server = new BattleServer()
server.queuePlayer({})
server.queuedPlayers().should.have.length 1
... | {BattleServer} = require '../server'
{Engine} = require '../engine'
sinon = require 'sinon'
describe 'BattleServer', ->
describe '#queuePlayer', ->
it "adds a new player to the server's queue", ->
server = new BattleServer()
server.queuePlayer({})
server.queuedPlayers().should.have.length 1
... | Add test for whether players get an emitted event. | Add test for whether players get an emitted event.
| CoffeeScript | mit | 6/battletower,sarenji/pokebattle-sim,pepijndevos/battletower,sarenji/pokebattle-sim,sarenji/pokebattle-sim,askii93/battletower |
c7886eddc0db2985f22e0d39fe7f92dc3bb3a27c | app/assets/javascripts/app/check_icon.js.coffee | app/assets/javascripts/app/check_icon.js.coffee | $('input.icon-check[type="checkbox"]').each ->
elm = $(this)
icon = $('<i>', class: 'fa fa-fw clickable')
icon.insertAfter(elm)
change = ->
if elm.is(':checked')
icon.removeClass('fa-square-o').addClass('fa-check-square')
else
icon.addClass('fa-square-o').removeClass('fa-check-square')
elm... | $('input.icon-check[type="checkbox"]').each ->
elm = $(this)
icon = $('<i>', class: 'fa fa-fw clickable')
icon.insertAfter(elm)
change = ->
if elm.is(':checked')
icon.removeClass('fa-square-o').addClass('fa-check-square')
else
icon.addClass('fa-square-o').removeClass('fa-check-square')
elm... | Fix attendance submission when clicking icon | Fix attendance submission when clicking icon
| CoffeeScript | agpl-3.0 | tmecklem/onebody,hooray4me/onebody2,Capriatto/onebody,fadiwissa/onebody,klarkc/onebody,nerdnorth/remote-workers-app,brunoocasali/onebody,davidleach/onebody,calsaviour/onebody,kevinjqiu/onebody,dorman/onebody,hooray4me/onebody2,mattraykowski/onebody,seethemhigh/onebody,nerdnorth/remote-workers-app,klarkc/onebody,mattray... |
8f80c9ac94674b8ee1098e8dfb7278d262e25a72 | app/assets/javascripts/sugar/facebook.js.coffee | app/assets/javascripts/sugar/facebook.js.coffee | # Listens for a ready event from the framework, trigger init()
# if the application ID is configured.
$(Sugar).bind "ready", ->
@Facebook.init() if @Configuration.FacebookAppId
Sugar.Facebook =
appId: false
init: ->
@appId = Sugar.Configuration.FacebookAppId
if $(".fb_button").length > 0
$(".fb_bu... | # Listens for a ready event from the framework, trigger init()
# if the application ID is configured.
$(Sugar).bind "ready", ->
@Facebook.init() if @Configuration.FacebookAppId
Sugar.Facebook =
appId: false
init: ->
@appId = Sugar.Configuration.FacebookAppId
if $(".fb_button").length > 0
$(".fb_bu... | Load the Facebook SDK on all pages if the app ID is set and enable xfbml | Load the Facebook SDK on all pages if the app ID is set and enable xfbml
| CoffeeScript | mit | Wevah/sugar,Wevah/sugar,vena/sugar,Wevah/sugar,vena/sugar,elektronaut/sugar,vena/sugar,elektronaut/sugar,elektronaut/sugar,elektronaut/sugar |
6a20eae6933459b2c411c0451897f0966da1e364 | community/server/src/main/coffeescript/test/neo4j/webadmin/modules/databrowser/views/TestPropertyContainerView.coffee | community/server/src/main/coffeescript/test/neo4j/webadmin/modules/databrowser/views/TestPropertyContainerView.coffee |
define ['lib/amd/Backbone','neo4j/webadmin/modules/databrowser/views/PropertyContainerView'], (Backbone, PropertyContainerView) ->
# TODO: Refactor out the "shouldBeConvertedToString" into it's own class
describe "PropertyContainerView", ->
pcv = new PropertyContainerView(template:null)
it "recogni... |
define ['lib/amd/Backbone','neo4j/webadmin/modules/databrowser/views/PropertyContainerView'], (Backbone, PropertyContainerView) ->
# TODO: Refactor out the "shouldBeConvertedToString" into it's own class
describe "PropertyContainerView", ->
pcv = new PropertyContainerView(template:null)
it "recogni... | Remove a test that fails in TeamCity. | Remove a test that fails in TeamCity.
There is no obvious reason why this test should fail, but since
Webadmin has been replaced by the Browser, there doesn't seem to be any
point trying to work out what is going on.
| CoffeeScript | apache-2.0 | HuangLS/neo4j,HuangLS/neo4j,HuangLS/neo4j,HuangLS/neo4j,HuangLS/neo4j |
8f6e66a4016f9c08e34038b2d44dff84746462af | lib/observejs/app/assets/javascripts/observejs/creator.js.coffee | lib/observejs/app/assets/javascripts/observejs/creator.js.coffee | class Creator
update: (el) =>
model = el.getAttribute(ObserveJS.attributeName)
if model?
@create(el, model)
else
@destroy(el)
create: (el) =>
model = el.getAttribute(ObserveJS.attributeName)
if ObserveJS.cache[model]?
if el.instance?
el.instance.loaded()
retur... | class Creator
update: (el) =>
model = el.getAttribute(ObserveJS.attributeName)
if model?
@create(el, model)
else
@destroy(el)
create: (el) =>
model = el.getAttribute(ObserveJS.attributeName)
if ObserveJS.cache[model]?
if el.instance?
el.instance.loaded()
retur... | Make sure callback exists before binding | Make sure callback exists before binding
| CoffeeScript | mit | pothibo/observejs,pothibo/observejs,pothibo/observejs |
77acabf53073838f834d6e898eb7d088be4501bc | client/redux/actions.coffee | client/redux/actions.coffee | import callApi from '../lib/callApi'
import {getRawData} from './getters'
export GET_DATA = 'GET_DATA'
export INVALIDATE_DATA = 'INVALIDATE_DATA'
export INVALIDATE_ALL_DATA = 'INVALIDATE_ALL_DATA'
export SAVE_DATA_PROMISES = 'SAVE_DATA_PROMISES'
export LOGOUT = 'LOGOUT'
export LOGIN = 'POST_LOGIN'
export SET_UNKNOWN_... | import callApi from '../lib/callApi'
import {getRawData} from './getters'
export GET_DATA = 'GET_DATA'
export INVALIDATE_DATA = 'INVALIDATE_DATA'
export INVALIDATE_ALL_DATA = 'INVALIDATE_ALL_DATA'
export SAVE_DATA_PROMISES = 'SAVE_DATA_PROMISES'
export LOGOUT = 'LOGOUT'
export LOGIN = 'POST_LOGIN'
export SET_UNKNOWN_... | Make action understand that timeout is in milliseconds | Make action understand that timeout is in milliseconds
| CoffeeScript | agpl-3.0 | petr-kalinin/algoprog,petr-kalinin/algoprog,petr-kalinin/algoprog,petr-kalinin/algoprog |
3579cee6c34d3fd2c8e5b6b516b689b516b8f5a9 | aphrodite/app/assets/javascripts/import.js.coffee | aphrodite/app/assets/javascripts/import.js.coffee | $ ->
return unless $('#new_document')
$('#files_uploader').fileupload
dataType: 'json'
maxFileSize: 10000000
acceptFileTypes: /(\.|\/)(pdf|txt|doc|docx|html)$/i
#limitConcurrentUploads: 5
#progressall: (e, data) ->
#progress = parseInt(data.loaded / data.total * 100, 10)
#$('#progre... | $ ->
return unless $('#new_document')
$('#files_uploader').fileupload
dataType: 'json'
maxFileSize: 10000000
acceptFileTypes: /(\.|\/)(pdf|txt|doc|docx|html)$/i
limitConcurrentUploads: 5
| Add a limit to file upload | [aphrodite] Add a limit to file upload
| CoffeeScript | mit | analiceme/chaos |
05c3044a7b56ad1bd6b8e30e751c2a4d37f99591 | client/views/tasks/add_task.coffee | client/views/tasks/add_task.coffee | Template.newTaskForm.events
'submit #new-task, click #addTaskButton': (e) ->
e.preventDefault()
body = $('#new-task-text').val()
$('#new-task-text').val("")
now = new Date()
priority = 'low'
list = 'Home'
Tasks.insert
body: body
dateDue: moment(now).add('w', 1).toDate()
d... | Template.newTaskForm.events
'submit #new-task, click #addTaskButton': (e) ->
e.preventDefault()
body = $('#new-task-text').val()
$('#new-task-text').val("")
if body
addEvent body
$('#addTaskInput').removeClass('has-warning')
else
$('#addTaskInput').addClass('has-warning')
... | Check if body is empty before submitting | Check if body is empty before submitting
| CoffeeScript | agpl-3.0 | adelq/astroid-web |
7aac0f6590362edca78edf040b51466fbaf3cc1c | app/assets/javascripts/services/product_service.coffee | app/assets/javascripts/services/product_service.coffee | angular.module('kassa').service('ProductService',[
'$http'
'$routeParams'
($http, $routeParams)->
#handle price as a float, not a string
convert = (resp)->
products = Array(resp.data.products || resp.data.product)
for product in products
product.price = parseFloat(product.price)
... | angular.module('kassa').service('ProductService',[
'$http'
'$routeParams'
($http, $routeParams)->
#handle price as a float, not a string
convertProduct = (product)->
product.price = parseFloat(product.price)
convert = (resp)->
products = resp.data.products
if products?
conve... | Fix ruby like array convert | Fix ruby like array convert
| CoffeeScript | mit | flipflops/kassa,flipflops/kassa |
e51a2fdb5bb422d362b5e898773b30c61046da82 | client/landing/CollaborativeWorkspace/panes/sharableclientterminalpane.coffee | client/landing/CollaborativeWorkspace/panes/sharableclientterminalpane.coffee | class SharableClientTerminalPane extends TerminalPane
constructor: (options = {}, data) ->
sessionOptions = options.sessionKey
options.vmName = sessionOptions.vmName
options.vmRegion = sessionOptions.vmRegion
options.joinUser = sessionOptions.host
options.session = sessionOptions.key
op... | class SharableClientTerminalPane extends TerminalPane
constructor: (options = {}, data) ->
sessionOptions = options.sessionKey
options.vmName = sessionOptions.vmName
options.vmRegion = sessionOptions.vmRegion
options.joinUser = sessionOptions.host
options.session = sessionOptions.key
op... | Send default size options and fix sharable terminal mode. | Teamwork: Send default size options and fix sharable terminal mode.
| CoffeeScript | agpl-3.0 | mertaytore/koding,mertaytore/koding,andrewjcasal/koding,mertaytore/koding,koding/koding,andrewjcasal/koding,mertaytore/koding,szkl/koding,jack89129/koding,sinan/koding,sinan/koding,andrewjcasal/koding,rjeczalik/koding,kwagdy/koding-1,koding/koding,kwagdy/koding-1,alex-ionochkin/koding,jack89129/koding,rjeczalik/koding,... |
59777c66187327a9d38f4be7e9cb2016daf2a31b | app/assets/javascripts/add-playlist-option.js.coffee | app/assets/javascripts/add-playlist-option.js.coffee | $("#post_playlist_id").select2({
language: {
noResults: () ->
term = $('.select2-search__field')[0].value || Playlist
return '<a href="http://google.com">Add '+term+ '</a>'
}
escapeMarkup:
(markup) -> return markup
});
| addnew = 'Add new playlist'
$('#post_playlist_id').append('<option>Add new playlist</option>')
matchWithNew = (params, data) ->
params.term = params.term || ''
if (data.text.indexOf(addnew) != -1 || data.text.indexOf(params.term) != -1)
return data;
return null;
formatAddNew = (data) ->
if ($('.select2-s... | Add event to add new playlist option | Add event to add new playlist option
| CoffeeScript | mit | avalonmediasystem/media-element-add-to-playlist,avalonmediasystem/media-element-add-to-playlist,avalonmediasystem/media-element-add-to-playlist |
ee2b30c12d874590abfa734554a334760bda3955 | app/assets/javascripts/placeholder_element.js.coffee | app/assets/javascripts/placeholder_element.js.coffee | window.Tahi ||= {}
class Tahi.PlaceholderElement
constructor: (@element, options={}) ->
@placeholder = @element.attributes['placeholder'].value
$element = $(@element)
$element.on 'focus', => @clearPlaceholder()
$element.on 'blur', => @setPlaceholder()
$element.on 'keydown', (e) => @supressEnterKe... | window.Tahi ||= {}
class Tahi.PlaceholderElement
constructor: (@element, options={}) ->
@placeholder = @element.attributes['placeholder'].value
$element = $(@element)
$element.on 'focus', => @clearPlaceholder()
$element.on 'blur', => @setPlaceholder()
$element.on 'keydown', (e) => @supressEnterKe... | Use textContent instead of innerText | Use textContent instead of innerText
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
794b5237f6e912eca4d96497f3f6de70b3bdbc03 | lib/assets/javascripts/websocket_rails/event.js.coffee | lib/assets/javascripts/websocket_rails/event.js.coffee | ###
The Event object stores all the releavant information for events
that are being queued for sending to the server.
###
class WebSocketRails.Event
constructor: (data) ->
@name = data[0]
attr = data[1]
@id = (((1+Math.random())*0x10000)|0) unless attr['id']?
@channel = if attr.channel? ... | ###
The Event object stores all the relevant event information.
###
class WebSocketRails.Event
constructor: (data) ->
@name = data[0]
attr = data[1]
@id = (((1+Math.random())*0x10000)|0) unless attr['id']?
@channel = if attr.channel? then attr.channel
@data = if attr.data? then at... | Change ridiculous WebSocketRails.Event description comments. | Change ridiculous WebSocketRails.Event description comments.
| CoffeeScript | mit | mohitnatoo/websocket-rails,vincenzodev/websocket-rails,iamalfonso/websocket-rails,phlegx/websocket-rails,mzahir/websocket-rails,phlegx/websocket-rails,a-leung/websocket-rails,MhdSyrwan/websocket-rails,mzahir/websocket-rails,a-leung/websocket-rails,moaa/websocket-rails,phlegx/websocket-rails,mohitnatoo/websocket-rails,m... |
e553960d79c925b1448a9e1c121f51057bfad163 | app/assets/javascripts/georgia/views/links/link_form_content.js.coffee | app/assets/javascripts/georgia/views/links/link_form_content.js.coffee | class Georgia.Views.LinkFormContent extends Backbone.View
template: JST['links/form_content']
className: 'tab-pane'
events:
'change input': 'attributeChanged'
'change textarea': 'attributeChanged'
initialize: (options) ->
$(@el).attr 'id', "content_#{@model.cid}"
render: ->
$(@el).html(@tem... | class Georgia.Views.LinkFormContent extends Backbone.View
template: JST['links/form_content']
className: 'tab-pane'
events:
'change input': 'attributeChanged'
'change textarea': 'attributeChanged'
initialize: (options) ->
$(@el).attr 'id', "content_#{@model.cid}"
render: ->
$(@el).html(@tem... | Fix Menu Link editing error on jquery autocomplete | Fix Menu Link editing error on jquery autocomplete
| CoffeeScript | mit | georgia-cms/georgia,georgia-cms/georgia,georgia-cms/georgia |
d9a3d22330e5dfca36779a5bf2c2dbd0a64756af | app/assets/javascripts/darkswarm/services/filter_selectors.js.coffee | app/assets/javascripts/darkswarm/services/filter_selectors.js.coffee | Darkswarm.factory "FilterSelectorsService", ->
# This stores all filters so we can access in-use counts etc
# Accessed via activeSelector Directive
new class FilterSelectorsService
selectors: []
new: (obj = {})->
obj.active = false
@selectors.push obj
obj
totalActive: =>
@sele... | Darkswarm.factory "FilterSelectorsService", ->
# This stores all filters so we can access in-use counts etc
# Accessed via activeSelector Directive
new class FilterSelectorsService
selectors: []
new: (obj = {})->
obj.active = false
@selectors.push obj
obj
totalActive: =>
@sele... | Tweak labels for filter button | Tweak labels for filter button
| CoffeeScript | agpl-3.0 | oeoeaio/openfoodnetwork,ltrls/openfoodnetwork,ltrls/openfoodnetwork,stveep/openfoodnetwork,openfoodfoundation/openfoodnetwork,levent/openfoodnetwork,folklabs/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,oeoeaio/openfoodnetwork,stveep/openfoodnetwork,RohanM/openfoodnetwork,KosenkoDmitriy/openfoodnetwork... |
eca4d773a02fa29141655d7e7e91809e668fbbdf | app/assets/javascripts/foundation_extras.js.coffee | app/assets/javascripts/foundation_extras.js.coffee | App.FoundationExtras =
initialize: ->
$(document).foundation()
$(window).trigger "load.zf.sticky"
$(window).trigger "resize"
| App.FoundationExtras =
initialize: ->
$(document).foundation()
$(window).trigger "load.zf.sticky"
$(window).trigger "resize"
clearSticky = ->
$("[data-sticky]").foundation("destroy") if $("[data-sticky]").length
$(document).on("page:before-unload", clearSticky)
| Reset sticky component before leaving the page using Turbolinks | Reset sticky component before leaving the page using Turbolinks
| CoffeeScript | agpl-3.0 | usabi/consul_san_borondon,usabi/consul_san_borondon,consul/consul,consul/consul,AyuntamientoPuertoReal/decidePuertoReal,usabi/consul_san_borondon,usabi/consul_san_borondon,consul/consul,AyuntamientoPuertoReal/decidePuertoReal,consul/consul,consul/consul,AyuntamientoPuertoReal/decidePuertoReal |
bf8dfbe4061d896b944b10a87a65b4ad0253b205 | app/assets/javascripts/controllers/message_task_controller.js.coffee | app/assets/javascripts/controllers/message_task_controller.js.coffee | ETahi.MessageTaskController = ETahi.TaskController.extend
newCommentBody: ""
actions:
clearMessageContent: -> null
postComment: ->
userId = Tahi.currentUser.id.toString()
commenter = @store.all('user').findBy('id', userId)
commentFields =
commenter: commenter
messageTask: ... | ETahi.MessageTaskController = ETahi.TaskController.extend
newCommentBody: ""
actions:
clearMessageContent: ->
@set('newCommentBody', "")
postComment: ->
userId = Tahi.currentUser.id.toString()
commenter = @store.all('user').findBy('id', userId)
commentFields =
commenter: co... | Clear new message content on cancel. | Clear new message content on cancel.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
1fe6c102a44a4f9bc28d2fc3f543a5037b6e498a | core/app/backbone/views/extended_fact_view.coffee | core/app/backbone/views/extended_fact_view.coffee | #= require ./fact_view.js
class window.ExtendedFactView extends FactView
tagName: "section"
template: "facts/_extended_fact"
showLines: 6;
onRender: ->
super()
@renderUserPassportViews();
renderUserPassportViews: ()->
interacting_users = this.model.get('interacting_users')
for user_activ... | #= require ./fact_view.js
class window.ExtendedFactView extends FactView
tagName: "section"
className: ""
template: "facts/_extended_fact"
showLines: 6;
onRender: ->
super()
@renderUserPassportViews();
renderUserPassportViews: ()->
interacting_users = this.model.get('interacting_users')
... | Use empty className for ExtendedFact | Use empty className for ExtendedFact
By default inherits .fact-block from the FactView
Signed-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@north26.nl>
| CoffeeScript | mit | daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
6128353ff5f599613052fa452430b94c139a79dd | client/app/lib/commonviews/applicationview/applicationtabview.coffee | client/app/lib/commonviews/applicationview/applicationtabview.coffee | kd = require 'kd'
KDTabView = kd.TabView
module.exports = class ApplicationTabView extends KDTabView
constructor: (options = {}, data) ->
options.resizeTabHandles ?= yes
options.lastTabHandleMargin ?= 80
options.closeAppWhenAllTabsClosed ?= yes
options.enableMoveTabHand... | kd = require 'kd'
KDTabView = kd.TabView
module.exports = class ApplicationTabView extends KDTabView
constructor: (options = {}, data) ->
options.resizeTabHandles ?= yes
options.lastTabHandleMargin ?= 90
options.closeAppWhenAllTabsClosed ?= yes
options.enableMoveTabHand... | Increase margin value for use more free space on tab handler | ApplicationTabView: Increase margin value for use more free space on tab handler
| CoffeeScript | agpl-3.0 | andrewjcasal/koding,gokmen/koding,sinan/koding,drewsetski/koding,cihangir/koding,usirin/koding,sinan/koding,cihangir/koding,alex-ionochkin/koding,usirin/koding,sinan/koding,andrewjcasal/koding,drewsetski/koding,szkl/koding,gokmen/koding,andrewjcasal/koding,koding/koding,cihangir/koding,kwagdy/koding-1,gokmen/koding,sin... |
75fbc7f8ea780dd9310e98f400240100881d54b8 | server/methods/getRoomIdByNameOrId.coffee | server/methods/getRoomIdByNameOrId.coffee | Meteor.methods
getRoomIdByNameOrId: (rid) ->
if not Meteor.userId()
throw new Meteor.Error 'error-invalid-user', 'Invalid user', { method: 'getRoomIdByNameOrId' }
room = RocketChat.models.Rooms.findOneById(rid) or RocketChat.models.Rooms.findOneByName(rid)
return null unless room?
if room.usernames.index... | Meteor.methods
getRoomIdByNameOrId: (rid) ->
if not Meteor.userId()
throw new Meteor.Error 'error-invalid-user', 'Invalid user', { method: 'getRoomIdByNameOrId' }
room = RocketChat.models.Rooms.findOneById(rid) or RocketChat.models.Rooms.findOneByName(rid)
if not room?
throw new Meteor.Error 'error-not-a... | Return an error if room not found | Return an error if room not found
| CoffeeScript | mit | Dianoga/Rocket.Chat,AlecTroemel/Rocket.Chat,mccambridge/Rocket.Chat,fatihwk/Rocket.Chat,liuliming2008/Rocket.Chat,intelradoux/Rocket.Chat,bt/Rocket.Chat,Gudii/Rocket.Chat,cnash/Rocket.Chat,karlprieb/Rocket.Chat,subesokun/Rocket.Chat,igorstajic/Rocket.Chat,pkgodara/Rocket.Chat,matthewshirley/Rocket.Chat,galrotem1993/Roc... |
d919742554c0522663c8ed92d91a1dce8633004a | src/views/keyboardHelp.coffee | src/views/keyboardHelp.coffee | class Ribs.KeyboardHelpView extends Backbone.View
className: "ribs-keyboard-shortcuts-overlay"
events:
'click' : "remove"
initialize: (options) ->
@views = options.views
$(window).on "keyup", @handleKeyup
remove: ->
$(window).off "keyup", @handleKeyup
super
... | class Ribs.KeyboardHelpView extends Backbone.View
className: "ribs-keyboard-shortcuts-overlay"
events:
'click' : "remove"
initialize: (options) ->
@views = options.views
$(window).on "keyup", @handleKeyup
remove: ->
$(window).off "keyup", @handleKeyup
super
... | Check for existence of hotkey label | Check for existence of hotkey label
| CoffeeScript | mit | quid/ribs |
4f64fcaf6f484bf36c41e65745b9eec7d17ad6f9 | src/app/tasks/task-definition-selector/task-definition-selector.coffee | src/app/tasks/task-definition-selector/task-definition-selector.coffee | angular.module('doubtfire.tasks.task-definition-selector',[])
#
# A switch that that the selection of a specified task definition
# Only handles task definition - not tasks in a project
#
.directive('taskDefinitionSelector', ->
replace: true
restrict: 'E'
templateUrl: 'tasks/task-definition-selector/task-definit... | angular.module('doubtfire.tasks.task-definition-selector',[])
#
# A switch that that the selection of a specified task definition
# Only handles task definition - not tasks in a project
#
.directive('taskDefinitionSelector', ->
replace: true
restrict: 'E'
templateUrl: 'tasks/task-definition-selector/task-definit... | Add missing ngModel attribute to task-def-selector | FIX: Add missing ngModel attribute to task-def-selector
| CoffeeScript | agpl-3.0 | final-year-project/doubtfire-web,final-year-project/doubtfire-web |
74dd8a6ba566b48f7a25f48a6ec35ba5eb0ab4cd | spec/skr/models/CustomerSpec.coffee | spec/skr/models/CustomerSpec.coffee | describe "Skr.Models.Customer", ->
it "can be instantiated", ->
model = new Skr.Models.Customer()
expect(model).toEqual(jasmine.any(Skr.Models.Customer))
it "sends failure messages when code isn't set", (done)->
model = new Skr.Models.Customer()
Lanes.Testing.ModelSaver.perfor... | describe "Skr.Models.Customer", ->
beforeEach ->
Lanes.Testing.ModelSaver.setUser('admin')
it "can be instantiated", ->
model = new Skr.Models.Customer()
expect(model).toEqual(jasmine.any(Skr.Models.Customer))
it "sends failure messages when code isn't set", (done)->
mode... | Set user to admin for spec | Set user to admin for spec
| CoffeeScript | agpl-3.0 | argosity/stockor,argosity/stockor,argosity/stockor,argosity/stockor |
6fb8229fd2a2808e41d704c1796fbc65a6c802c4 | scoped-properties/language-restructuredtext.cson | scoped-properties/language-restructuredtext.cson | '.text.restructuredtext':
'editor':
'commentStart': '.. '
| '.text.restructuredtext':
'editor':
'commentStart': '.. '
'increaseIndentPattern': '::\\s*$'
| Enable auto-indentation for literal blocks. | Enable auto-indentation for literal blocks.
| CoffeeScript | mit | Lukasa/language-restructuredtext |
263ee43cb56f369688919725db6f0124c9b52bce | services/clsi/app/coffee/DraftModeManager.coffee | services/clsi/app/coffee/DraftModeManager.coffee | fs = require "fs"
logger = require "logger-sharelatex"
module.exports = DraftModeManager =
injectDraftMode: (filename, callback = (error) ->) ->
fs.readFile filename, "utf8", (error, content) ->
return callback(error) if error?
modified_content = DraftModeManager._injectDraftOption content
logger.log {
... | fs = require "fs"
logger = require "logger-sharelatex"
module.exports = DraftModeManager =
injectDraftMode: (filename, callback = (error) ->) ->
fs.readFile filename, "utf8", (error, content) ->
return callback(error) if error?
modified_content = DraftModeManager._injectDraftOption content
logger.log {
... | Make draft mode regex global | Make draft mode regex global
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
54d1fc9d668f10b4201688546808adcdc1dc9517 | test/unit/helper/schema-spec.coffee | test/unit/helper/schema-spec.coffee | assert = require 'assert'
joi = require 'joi'
schema = require '../../../coffee/helper/schema'
data =
grupper : require '../../data/gruppe.json'
bilder : require '../../data/bilde.json'
turer : require '../../data/tur.json'
områder : require '../../data/omrade.json'
steder : require '../../data/ste... | assert = require 'assert'
joi = require 'joi'
schema = require '../../../coffee/helper/schema'
data =
grupper : require '../../data/gruppe.json'
bilder : require '../../data/bilde.json'
turer : require '../../data/tur.json'
områder : require '../../data/omrade.json'
steder : require '../../data/ste... | Add optional schema test for empty arrays | Add optional schema test for empty arrays
| CoffeeScript | mit | Turbasen/Turbasen,Turistforeningen/Turbasen |
75b38e427d4273bd01448bdf30a1cbd5dfe9157e | app/assets/javascripts/jobbr/application.js.coffee | app/assets/javascripts/jobbr/application.js.coffee | #= require jquery
#= require jquery_ujs
#= require_self
autoRefreshInterval = 3000
timeout = undefined
scrollToBottom = ($container) ->
if $container.length > 0
$container.scrollTop($container[0].scrollHeight)
toggleRefreshButton = ->
$('#auto-refresh').toggleClass('active')
$('#auto-refresh i').toggleCla... | #= require jquery
#= require jquery_ujs
#= require_self
autoRefreshInterval = 3000
timeout = undefined
scrollToBottom = ($container) ->
if $container.length > 0
$container.scrollTop($container[0].scrollHeight)
toggleRefreshButton = ->
$('#auto-refresh').toggleClass('active')
$('#auto-refresh i').toggleCla... | Refresh a page automatically, without using turbolinks. | Refresh a page automatically, without using turbolinks.
| CoffeeScript | mit | PrimeRevenue/jobbr,PrimeRevenue/jobbr,PrimeRevenue/jobbr |
012b13df5018bafc2e2240abd0d81b80a51c41cb | BackofficeBundle/Resources/public/coffee/blockView.coffee | BackofficeBundle/Resources/public/coffee/blockView.coffee | BlockView = Backbone.View.extend(
tagName: 'li'
className: 'ui-model-blocks'
events:
'click i.block-param': 'paramBlock'
'click i.block-remove': 'removeBlock'
initialize: (options) ->
@block = options.block
@height = options.height
@direction = options.direction || 'height'
@displayClass... | BlockView = Backbone.View.extend(
tagName: 'li'
className: 'ui-model-blocks'
events:
'click i.block-param': 'paramBlock'
'click i.block-remove': 'confirmRemoveBlock'
initialize: (options) ->
@block = options.block
@height = options.height
@direction = options.direction || 'height'
@displ... | Add a native confirm dialog | Add a native confirm dialog
| CoffeeScript | apache-2.0 | open-orchestra/open-orchestra-media-admin-bundle,open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-user-bundle,open-orchestra/open-orchestra-media-admin-bundle,open-orchestra/open-orchestra-media-admin-bundle,open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-cms-bundle,open-orc... |
3d9a5cfa38fb30960b80dd8ce90dc5daf8f6c8c6 | src/app/api/models/task-completion-csv.coffee | src/app/api/models/task-completion-csv.coffee | angular.module("doubtfire.api.models.task-completion-csv", [])
.service("TaskCompletionCsv", (DoubtfireConstants, $window, currentUser, fileDownloaderService) ->
this.downloadFile = (unit) ->
fileDownloaderService.downloadFile "#{DoubtfireConstants.API_URL}/csv/units/#{unit.id}/task_completion.json?auth_token=#{... | angular.module("doubtfire.api.models.task-completion-csv", [])
.service("TaskCompletionCsv", (DoubtfireConstants, $window, currentUser, fileDownloaderService) ->
this.downloadFile = (unit) ->
fileDownloaderService.downloadFile "#{DoubtfireConstants.API_URL}/csv/units/#{unit.id}/task_completion.json", "#{unit.nam... | Remove auth tokens from task completion url | FIX: Remove auth tokens from task completion url
| CoffeeScript | agpl-3.0 | doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web |
04d289de07509dd0f4de5954f3b30f49f01d6f39 | apps/middleware/authenticate.coffee | apps/middleware/authenticate.coffee | Organization = require "../../models/organization"
# Need to support authentication via Organization API key as well
module.exports = (req, res, next) ->
if req.session.org_id
Organization.findById req.session.org_id, (err, org)->
req.org = org
req.session.org_id = org.id
next()
else
res... | Organization = require "../../models/organization"
# Need to support authentication via Organization API key as well
module.exports = (req, res, next) ->
unauthorzed = ->
if req.xhr
res.send 403
else
res.redirect('/login')
if api_key = req.query.api_key
Organization.findOne {api_key: api_... | Add Authentication via API key | Add Authentication via API key
| CoffeeScript | mit | EverFi/Sash,EverFi/Sash,EverFi/Sash |
a450e9608ca52dc2907474c78d5462e9d0532e53 | app/templates/app/coffee/main.coffee | app/templates/app/coffee/main.coffee | PlayScene =
preload: ->
create: ->
update: ->
game = new Phaser.Game 640, 480, Phaser.AUTO, 'game'
game.state.add 'play', PlayScene
game.state.start.play
| PlayScene =
preload: ->
create: ->
update: ->
game = new Phaser.Game 640, 480, Phaser.AUTO, 'game'
game.state.add 'play', PlayScene
game.state.start 'play'
| FIX bug in coffeescript code when no preloader | FIX bug in coffeescript code when no preloader
| CoffeeScript | mit | belen-albeza/generator-phaser-coffee |
8fb1bfc260041fe67174999e93f7ff0214c990e6 | client/app/Applications/Chat.kdapplication/Views/conversationlistitemtitle.coffee | client/app/Applications/Chat.kdapplication/Views/conversationlistitemtitle.coffee | class ChatConversationListItemTitle extends JView
constructor:(options = {}, data)->
options.cssClass = 'chat-item'
data = [nick for nick in data when nick isnt KD.nick()].first
super
viewAppended:->
invitees = @getData()
@accounts = []
for invitee in invitees
KD.remote.cacheable i... | class ChatConversationListItemTitle extends JView
constructor:(options = {}, data)->
options.cssClass = 'chat-item'
# data = [nick for nick in data when nick isnt KD.nick()].first
super
viewAppended:->
invitees = @getData()
@accounts = []
for invitee in invitees
KD.remote.cacheable... | Disable for now, lets keep conversations with users own name. | Disable for now, lets keep conversations with users own name.
| CoffeeScript | agpl-3.0 | acbodine/koding,acbodine/koding,szkl/koding,usirin/koding,mertaytore/koding,rjeczalik/koding,cihangir/koding,usirin/koding,sinan/koding,mertaytore/koding,acbodine/koding,szkl/koding,rjeczalik/koding,szkl/koding,kwagdy/koding-1,drewsetski/koding,sinan/koding,szkl/koding,mertaytore/koding,koding/koding,acbodine/koding,an... |
24c0ce04a53be56a1743438fc6743842772f34c3 | core/app/backbone/views/react_user_tabs.coffee | core/app/backbone/views/react_user_tabs.coffee | window.ReactUserTabs = React.createBackboneClass
render: ->
spaced_middle_dot = " \u00b7 "
_div ['main-region-tabs'],
_a [
'active' if @props.page == 'about'
rel: 'backbone'
href: "/#{@model().get('username')}"
],
'About'
spaced_middle_dot
_a [
... | window.ReactUserTabs = React.createBackboneClass
render: ->
return _span() unless FactlinkApp.isCurrentUser @model()
spaced_middle_dot = " \u00b7 "
_div ['main-region-tabs'],
_a [
'active' if @props.page == 'about'
rel: 'backbone'
href: "/#{@model().get('username')}"
... | Hide tabs unless current user | Hide tabs unless current user
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
4bcb614c9ab25c021078f548de3c13e65aafa86a | lib/assets/javascripts/jack_up/drag_and_drop.coffee | lib/assets/javascripts/jack_up/drag_and_drop.coffee | ignoreEvent = (event) ->
event.stopPropagation()
event.preventDefault()
class @JackUp.DragAndDrop
constructor: (@droppableElement, @processor) ->
@droppableElement
.bind("dragenter", @_drag)
.bind("drop", @_drop)
.bind("drop", @_dragOut)
_drag: (event) =>
ignoreEvent event
event.... | ignoreEvent = (event) ->
event.stopPropagation()
event.preventDefault()
class @JackUp.DragAndDrop
constructor: (@droppableElement, @processor) ->
@droppableElement
.bind("dragenter", @_dragEnter)
.bind("dragleave", @_dragLeave)
.bind("drop", @_drop)
_dragEnter: (event) =>
ignoreEvent... | Remove hover class when leaving the drop zone. | Remove hover class when leaving the drop zone.
| CoffeeScript | mit | thoughtbot/jack_up,thoughtbot/jack_up,thoughtbot/jack_up |
f92f0a1ac904c7bd82ffd10b83434461007647c0 | core/app/backbone/factlink/cross_fade_region.coffee | core/app/backbone/factlink/cross_fade_region.coffee | Backbone.Factlink ||= {}
class Backbone.Factlink.CrossFadeRegion extends Backbone.Marionette.Region
defaultFadeTime = 560
initialize: -> @on 'close', -> @$el?.stop()
crossFade: (newView) ->
if @currentView
@$el.stop().fadeOut(@_fadeTime(), => @show newView)
else
@show(newView)
open: (vi... | Backbone.Factlink ||= {}
class Backbone.Factlink.CrossFadeRegion extends Backbone.Marionette.Region
defaultFadeTime = 560
initialize: -> @on 'close', -> @$el?.stop()
crossFade: (newView) ->
if @currentView
@$el.stop().fadeOut(@_fadeTime(), => @show newView)
else
@show(newView)
open: (vi... | Revert the slow fade :) | Revert the slow fade :)
| CoffeeScript | mit | Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
dea47efcd3f4f94ae51d2625a7e2d21c49502258 | src/scripts/modules/media/body/body.coffee | src/scripts/modules/media/body/body.coffee | define (require) ->
$ = require('jquery')
Mathjax = require('mathjax')
BaseView = require('cs!helpers/backbone/views/base')
template = require('hbs!./body-template')
require('less!./body')
return class MediaBodyView extends BaseView
template: template
events:
'click .solution > .ui-toggle-wr... | define (require) ->
$ = require('jquery')
Mathjax = require('mathjax')
BaseView = require('cs!helpers/backbone/views/base')
template = require('hbs!./body-template')
require('less!./body')
return class MediaBodyView extends BaseView
template: template
events:
'click .solution > .ui-toggle-wr... | Make editable and track changes | Make editable and track changes
| CoffeeScript | agpl-3.0 | katalysteducation/webview,Connexions/webview,katalysteducation/webview,katalysteducation/webview,dak/webview,katalysteducation/webview,Connexions/webview,dak/webview,Connexions/webview,Connexions/webview,dak/webview,carolinelane10/webview |
a03c7a375ae4aa605504d9db660dd179cc45932e | lib/assets/javascripts/models/post/status.js.coffee | lib/assets/javascripts/models/post/status.js.coffee | TentStatus.Models.StatusPost = class StatusPostModel extends TentStatus.Models.Post
@model_name: 'status_post'
@post_type: new TentClient.PostType(TentStatus.config.POST_TYPES.STATUS)
@validate: (attrs, options = {}) ->
errors = []
if (attrs.content?.text and attrs.content.text.match /^[\s\r\t]*$/) || (... | TentStatus.Models.StatusPost = class StatusPostModel extends TentStatus.Models.Post
@model_name: 'status_post'
@post_type: new TentClient.PostType(TentStatus.config.POST_TYPES.STATUS)
@validate: (attrs, options = {}) ->
errors = []
if (attrs.content?.text and attrs.content.text.match /^[\s\r\t]*$/) || (... | Fix fetching replies for conversation view | Fix fetching replies for conversation view
| CoffeeScript | bsd-3-clause | tent/tent-status,tent/tent-status |
14c55462b75ee8fb49ed333251f1158d9618df93 | server/s3manager/s3manager.coffee | server/s3manager/s3manager.coffee | AWS = Meteor.require 'aws-sdk'
AWS.config.update
'accessKeyId' : "AKIAJ4QROL3BSAMJTI7Q",
'secretAccessKey' : "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",
'region' : "us-west-2"
s3 = new AWS.S3()
bucket = "d2mpclient"
Meteor.startup ->
s3.listBuckets {}, (err, data)->
console.log "=== buckets ==... | AWS = Meteor.require 'aws-sdk'
bucket = "d2mpclient"
AWS.config.update
'accessKeyId' : "AKIAJ4QROL3BSAMJTI7Q",
'secretAccessKey' : "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",
'region' : "us-west-2"
s3 = new AWS.S3()
Meteor.startup ->
s3.listBuckets {}, (err, data)->
console.log "client bucket:... | Fix one thing with s3 | Fix one thing with s3
| CoffeeScript | apache-2.0 | paralin/D2ModdinMeteor,paralin/D2ModdinMeteor |
6d678f6cd4e4131d8610f78024456efb78864ff7 | src/components/qa/exercise-card.cjsx | src/components/qa/exercise-card.cjsx | _ = require 'underscore'
React = require 'react'
{ExerciseCardMixin} = require '../task-plan/homework/exercises'
{ExerciseStore} = require '../../flux/exercise'
String = require '../../helpers/string'
Exercise = React.createClass
mixins: [ExerciseCardMixin]
propTypes:
exercise: React.PropTypes.object.isRequ... | _ = require 'underscore'
React = require 'react'
{ExerciseStore} = require '../../flux/exercise'
String = require '../../helpers/string'
ExerciseCard = require '../exercise-card'
Exercise = React.createClass
propTypes:
exercise: React.PropTypes.object.isRequired
renderHeader: ->
<div className='pools'>
... | Use ExerciseCard component with all content shown | Use ExerciseCard component with all content shown
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
b8f1e29531590eb96afdae9c19ac45bb394b7340 | src/login/config/routes.coffee | src/login/config/routes.coffee | angular.module 'NotSoShitty.login'
.config ($stateProvider) ->
$stateProvider
.state 'trello-login',
url: '/login/trello'
controller: 'TrelloLoginCtrl'
templateUrl: 'login/states/trello/view.html'
resolve:
dummy: (localStorageService, $state, $q) ->
deferred = $q.defer()
if loc... | angular.module 'NotSoShitty.login'
.config ($stateProvider) ->
$stateProvider
.state 'trello-login',
url: '/login/trello'
controller: 'TrelloLoginCtrl'
templateUrl: 'login/states/trello/view.html'
| Delete redirection on Trello authenticated | Delete redirection on Trello authenticated
| CoffeeScript | mit | theodo/scrumble,theodo/scrumble,theodo/scrumble |
2164a759f397219ace5d4f2d591ffc891171a8e1 | battle-detail.coffee | battle-detail.coffee | require 'coffee-react/register'
require "#{ROOT}/views/env"
# i18n
{join} = require 'path-extra'
window.i18n = {}
window.i18n.main = new(require 'i18n-2')
locales: ['en-US', 'ja-JP', 'zh-CN', 'zh-TW']
defaultLocale: 'zh-CN'
directory: join(__dirname, 'assets', 'i18n')
extension: '.json'
updateFiles: false
... | require 'coffee-react/register'
require "#{ROOT}/views/env"
# i18n
{join} = require 'path-extra'
window.i18n = {}
window.i18n.main = new(require 'i18n-2')
locales: ['en-US', 'ja-JP', 'zh-CN', 'zh-TW']
defaultLocale: 'zh-CN'
directory: join(__dirname, 'assets', 'i18n')
extension: '.json'
updateFiles: false
... | Move css setup to window.coffee | Move css setup to window.coffee
| CoffeeScript | mit | poooi/plugin-battle-detail |
a82f5b6811334234e99d62a370940afd876945ad | angular/core/services/session.coffee | angular/core/services/session.coffee | angular.module('loomioApp').factory 'Session', ($rootScope, $translate, $window, Records, AppConfig) ->
login: (data) ->
Records.import(data)
if @visitor()
defaultParams = {participation_token: @visitor().participationToken}
Records.stances.remote.defaultParams = defaultParams
Records.poll... | angular.module('loomioApp').factory 'Session', ($rootScope, $translate, $window, Records, AppConfig) ->
login: (data) ->
Records.import(data)
if @visitor()
defaultParams = {participation_token: @visitor().participationToken}
Records.stances.remote.defaultParams = defaultParams
Records.poll... | Update time zone on user when it changes | Update time zone on user when it changes
| CoffeeScript | agpl-3.0 | loomio/loomio,loomio/loomio,piratas-ar/loomio,loomio/loomio,piratas-ar/loomio,piratas-ar/loomio,loomio/loomio,piratas-ar/loomio |
a69ccd89a032a07762846b5025b6d2b0e762cbf4 | core/app/assets/javascripts/base/social-services.coffee | core/app/assets/javascripts/base/social-services.coffee | popupCenter = (url, width, height, name) ->
left = (screen.width/2)-(width/2)
top = (screen.height/2)-(height/2)
window.open(url, name, "menubar=no,toolbar=no,status=no,width=#{width},height=#{height},toolbar=no,left=#{left},top=#{top}")
$("span.social-services-button a.popup").click((e) ->
popupCenter($(this)... | popupCenter = (url, width, height, name) ->
left = (screen.width/2)-(width/2)
top = (screen.height/2)-(height/2)
window.open(url, name, "menubar=no,toolbar=no,status=no,width=#{width},height=#{height},toolbar=no,left=#{left},top=#{top}")
$("span.social-services-button a.popup").click((e) ->
popupCenter($(this)... | Use preventDefault instead of returning false (less implicit) | Use preventDefault instead of returning false (less implicit)
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core |
ac6839181e7a1c19673e90acee6263f0a3089b0f | app/assets/javascripts/profiles.js.coffee | app/assets/javascripts/profiles.js.coffee | jQuery ->
percentageFormatter = (x) -> x * 100.0 + "%"
$('.tournament.plot').each (i, element) ->
element_id = $(element).attr('id')
data = $.parseJSON($(element).attr('data-ratings'))
options = {
series: {
lines: { show: true }
},
yaxis: {
min: 0.0,
max: 0.0,
... | jQuery ->
percentageFormatter = (x) -> x * 100.0 + "%"
$('.tournament.plot').each (i, element) ->
element_id = $(element).attr('id')
data = $.parseJSON($(element).attr('data-ratings'))
options = {
series: {
lines: { show: true }
},
yaxis: {
min: 0.0,
max: 0.0,
... | Fix profile graph x-axis scaling | Fix profile graph x-axis scaling
| CoffeeScript | mit | proglottis/ladder,Gigaicon/ladder,proglottis/ladder,proglottis/ladder,Gigaicon/ladder,Gigaicon/ladder |
03d786218f9ebbfc66cd77c6d0b467f7c64d6a7e | client/Environments/views/scene/environmentruleitem.coffee | client/Environments/views/scene/environmentruleitem.coffee | class EnvironmentRuleItem extends EnvironmentItem
constructor: (options = {}, data) ->
options.cssClass = 'rule'
options.joints = ['right']
options.allowedConnections =
EnvironmentDomainItem : ['left']
super options, data
@setClass "disabled" unless data.enabled... | class EnvironmentRuleItem extends EnvironmentItem
constructor: (options = {}, data) ->
options.cssClass = 'rule'
options.joints = ['right']
options.allowedConnections =
EnvironmentDomainItem : ['left']
super options, data
@setClass "disabled" unless data.enabled... | Refactor data update method to reuse. | Environments: Refactor data update method to reuse.
| CoffeeScript | agpl-3.0 | koding/koding,acbodine/koding,cihangir/koding,alex-ionochkin/koding,sinan/koding,gokmen/koding,alex-ionochkin/koding,acbodine/koding,alex-ionochkin/koding,drewsetski/koding,koding/koding,alex-ionochkin/koding,rjeczalik/koding,jack89129/koding,andrewjcasal/koding,jack89129/koding,kwagdy/koding-1,jack89129/koding,rjeczal... |
7a206bc1e76afea90139a5a2683f00cbc4e2a5d1 | src/turbolinks/error_renderer.coffee | src/turbolinks/error_renderer.coffee | #= require ./renderer
class Turbolinks.ErrorRenderer extends Turbolinks.Renderer
constructor: (@html) ->
render: (callback) ->
@renderView =>
@replaceDocumentHTML()
@activateBodyScriptElements()
callback()
replaceDocumentHTML: ->
document.documentElement.innerHTML = @html
activateB... | #= require ./renderer
class Turbolinks.ErrorRenderer extends Turbolinks.Renderer
constructor: (html) ->
htmlElement = document.createElement("html")
htmlElement.innerHTML = html
@newHead = htmlElement.querySelector("head")
@newBody = htmlElement.querySelector("body")
render: (callback) ->
@ren... | Set newBody property when rendering errors | Set newBody property when rendering errors
It's expected by the Turbolinks.Renderer super class
| CoffeeScript | mit | turbolinks/turbolinks,turbolinks/turbolinks,turbolinks/turbolinks |
1a3e8b966e870e665d4a6f3747e3f3d8bf425100 | tutor/src/components/task-plan/footer/help-tooltip.cjsx | tutor/src/components/task-plan/footer/help-tooltip.cjsx | React = require 'react'
BS = require 'react-bootstrap'
{TaskPlanStore} = require '../../../flux/task-plan'
buildTooltip = ({isPublished}) ->
saveMessage = if isPublished
<div>
<p>
<strong>Save</strong> will update the assignment.
</p>
</div>
else
<div>
<p>
<strong>Publ... | React = require 'react'
BS = require 'react-bootstrap'
{TaskPlanStore} = require '../../../flux/task-plan'
buildTooltip = ({isPublished}) ->
saveMessage = if isPublished
<div>
<p>
<strong>Save</strong> will update the assignment.
</p>
</div>
else
<div>
<p>
<strong>Publ... | Adjust text so there's a space after "Delete Assignment" | Adjust text so there's a space after "Delete Assignment"
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
88d67772c75b42be5a35e7195addef6a8b67ade6 | core/app/backbone/collections/evidence_collection.coffee | core/app/backbone/collections/evidence_collection.coffee | class window.EvidenceCollection extends Backbone.Collection
comparator: (evidence) ->
# TODO: breaks with relevance > 1000
-parseFloat(evidence.get('opinions')?.formatted_relevance || '0.0');
model: (attrs, options) ->
switch attrs.evidence_type
when 'FactRelation'
new FactRelation attrs,... | class window.EvidenceCollection extends Backbone.Collection
comparator: (evidence) ->
# TODO: breaks with relevance > 1000
-parseFloat(evidence.get('opinions')?.formatted_relevance || '0.0');
parse: (data) ->
results = []
_.each data, (item) =>
switch item.evidence_type
when 'FactRela... | Use parse in EvidenceCollection to add the correct model | Use parse in EvidenceCollection to add the correct model
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
a8ed95cfb7b28896e65ddbbe12476b6a7556fc70 | homedisplay/info_weather/static/js/weather_door.coffee | homedisplay/info_weather/static/js/weather_door.coffee | RefreshWeather = (options) ->
options = options or {}
options.elem = options.elem or "#weather-general"
options.update_interval = options.update_interval or FAST_UPDATE
elem = jq options.elem
update_interval = null
setWeatherInfo = (icon, temperature) ->
elem.html "<img src='/homecontroller/static/ima... | RefreshWeather = (options) ->
options = options or {}
options.elem = options.elem or "#weather-general"
options.update_interval = options.update_interval or FAST_UPDATE
elem = jq options.elem
update_interval = null
setWeatherInfo = (icon, temperature) ->
elem.html "<img src='/homecontroller/static/byo... | Update door tablet weather information | Update door tablet weather information
| CoffeeScript | bsd-3-clause | ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display |
f855aed308b47c172564685f08976810ac35ca80 | lib/mixed-indent-warning.coffee | lib/mixed-indent-warning.coffee | MixedIndentWarningView = require './mixed-indent-warning-view'
IndentChecker = require '../lib/indent-checker'
{CompositeDisposable} = require 'atom'
module.exports = MixedIndentWarning =
editor: null
mixedIndentWarningView: null
modalPanel: null
subscriptions: null
activate: (state) ->
# Events subscri... | MixedIndentWarningView = require './mixed-indent-warning-view'
IndentChecker = require '../lib/indent-checker'
{CompositeDisposable} = require 'atom'
module.exports = MixedIndentWarning =
editor: null
mixedIndentWarningView: null
modalPanel: null
subscriptions: null
activate: (state) ->
# Events subscri... | Change decorateMarker to invalidate on changes | Change decorateMarker to invalidate on changes
| CoffeeScript | mit | sirbrillig/mixed-indent-warning,sirbrillig/linter-mixed-indent |
dacb65ba4dd31f92c4aef26f28fde901582a28b6 | client/source/controllers/settings_controller.coffee | client/source/controllers/settings_controller.coffee | Controller = require 'lib/controller'
User = require 'models/user'
Users = require 'models/users'
BasicSettingsView = require 'views/settings/basic'
UsersList = require 'views/users/list'
module.exports = class SettingsController extends Controller
basic: ->
@adjustTitle 'Settings'
@view = new BasicSettingsV... | Controller = require 'lib/controller'
User = require 'models/user'
Users = require 'models/users'
BasicSettingsView = require 'views/settings/basic'
UsersList = require 'views/users/list'
module.exports = class SettingsController extends Controller
basic: ->
@adjustTitle 'Settings'
@view = new BasicSettingsV... | Fix for reusing UserList (.model not guaranteed now) | Fix for reusing UserList (.model not guaranteed now)
| CoffeeScript | agpl-3.0 | edolyne/buckets,mikesmithmsm/buckets,bucketsio/buckets,edolyne/hive,nishant8BITS/buckets,edolyne/buckets,bucketsio/buckets,artelse/buckets,dut3062796s/buckets,mikesmithmsm/buckets,mamute/buckets,asm-products/buckets,asm-products/buckets,mamute/buckets,artelse/buckets,nishant8BITS/buckets,edolyne/hive,dut3062796s/bucket... |
499f920638cc3ea60288bd3472dc9786b5440207 | build/tasks/generate-asar-task.coffee | build/tasks/generate-asar-task.coffee | asar = require 'asar'
fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
{cp, rm} = require('./task-helpers')(grunt)
grunt.registerTask 'generate-asar', 'Generate asar archive for the app', ->
done = @async()
unpack = [
'*.node'
'.ctags'
'ctags-darwin'
'ctags-linu... | asar = require 'asar'
fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
{cp, rm} = require('./task-helpers')(grunt)
grunt.registerTask 'generate-asar', 'Generate asar archive for the app', ->
done = @async()
unpack = [
'*.node'
'ctags-config'
'ctags-darwin'
'ctag... | Rename .ctags file to ctags-config in unpack list | Rename .ctags file to ctags-config in unpack list
Necessary since the file was renamed in symbols-view@0.103.0.
| CoffeeScript | mit | MjAbuz/atom,jeremyramin/atom,Arcanemagus/atom,KENJU/atom,SlimeQ/atom,tmunro/atom,t9md/atom,Abdillah/atom,kjav/atom,Jonekee/atom,liuderchi/atom,rxkit/atom,Jonekee/atom,vhutheesing/atom,florianb/atom,Sangaroonaom/atom,ReddTea/atom,transcranial/atom,harshdattani/atom,fedorov/atom,beni55/atom,mrodalgaard/atom,brumm/atom,Ja... |
fd38046dd2d6aa84a635b32ba28b4d8a2396fb75 | src/desktop/apps/home/queries/initial.coffee | src/desktop/apps/home/queries/initial.coffee | module.exports = """
query($showHeroUnits: Boolean!) {
home_page {
artwork_modules(
max_rails: 7,
order: [
ACTIVE_BIDS,
RECENTLY_VIEWED_WORKS
RECOMMENDED_WORKS,
FOLLOWED_ARTISTS,
RELATED_ARTISTS,
FOLLOWED_GALLERIES,
SAVED_... | module.exports = """
query($showHeroUnits: Boolean!) {
home_page {
artwork_modules(
max_rails: -1,
max_followed_gene_rails: -1,
order: [
ACTIVE_BIDS,
RECENTLY_VIEWED_WORKS
RECOMMENDED_WORKS,
FOLLOWED_ARTISTS,
RELATED_ARTISTS,
... | Allow all the homepage rail! | Allow all the homepage rail!
| CoffeeScript | mit | cavvia/force-1,artsy/force,kanaabe/force,erikdstock/force,artsy/force,erikdstock/force,izakp/force,damassi/force,xtina-starr/force,xtina-starr/force,anandaroop/force,mzikherman/force,yuki24/force,anandaroop/force,yuki24/force,kanaabe/force,anandaroop/force,cavvia/force-1,joeyAghion/force,izakp/force,izakp/force,xtina-s... |
a06631daab8f1e4e223fb7f204778d4f0f7e138b | client/ide/finder/idefindercontextmenucontroller.coffee | client/ide/finder/idefindercontextmenucontroller.coffee | class IDE.FinderContextMenuController extends NFinderContextMenuController
getFolderMenu: (fileView) ->
fileData = fileView.getData()
items =
Expand :
action : "expand"
separator : yes
Collapse :
... | class IDE.FinderContextMenuController extends NFinderContextMenuController
getFolderMenu: (fileView) ->
fileData = fileView.getData()
items =
Expand :
action : "expand"
separator : yes
Collapse :
... | Remove 'Workspace from here' menu item unless machine is mine. | Finder: Remove 'Workspace from here' menu item unless machine is mine.
| CoffeeScript | agpl-3.0 | szkl/koding,kwagdy/koding-1,cihangir/koding,acbodine/koding,szkl/koding,jack89129/koding,szkl/koding,rjeczalik/koding,drewsetski/koding,kwagdy/koding-1,alex-ionochkin/koding,mertaytore/koding,kwagdy/koding-1,szkl/koding,cihangir/koding,rjeczalik/koding,koding/koding,alex-ionochkin/koding,gokmen/koding,andrewjcasal/kodi... |
42fd58da8a8ef1abd89b1dc7351433b30407c575 | app/assets/javascripts/sprangular/directives/creditCardForm.coffee | app/assets/javascripts/sprangular/directives/creditCardForm.coffee | Sprangular.directive 'creditCardForm', ->
restrict: 'E'
templateUrl: 'credit_cards/form.html'
scope:
creditCard: '='
controller: ($scope) ->
$scope.months = [
{index: 1, name: 'January'},
{index: 2, name: 'February'},
{index: 3, name: 'March'},
{index: 4, name: 'April'},
{i... | Sprangular.directive 'creditCardForm', ->
restrict: 'E'
templateUrl: 'credit_cards/form.html'
scope:
creditCard: '='
controller: ($scope) ->
$scope.months = [
{index: 1, name: 'January'},
{index: 2, name: 'February'},
{index: 3, name: 'March'},
{index: 4, name: 'April'},
{i... | Update lastDigits when card number changes | Update lastDigits when card number changes
| CoffeeScript | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular |
5c2860108e03ec8d3be9e3f5d492c3616e0fe29d | app/assets/javascripts/components/bootstrap-tooltip.js.coffee | app/assets/javascripts/components/bootstrap-tooltip.js.coffee | Hummingbird.BootstrapTooltipComponent = Ember.Component.extend
tagName: 'a'
didInsertElement: ->
@$().tooltip
placement: @get('placement')
title: @get('title')
| Hummingbird.BootstrapTooltipComponent = Ember.Component.extend
tagName: 'a'
initializeTooltip: (->
@$().tooltip
placement: @get('placement')
title: @get('title')
).on('didInsertElement')
updateTooltip: (->
@$().tooltip 'destroy'
@initializeTooltip()
).observes('title', 'placement')
| Fix alternate title not being updated on switching between anime pages. | Fix alternate title not being updated on switching between anime pages.
| CoffeeScript | apache-2.0 | sidaga/hummingbird,wlads/hummingbird,vevix/hummingbird,xhocquet/hummingbird,paladique/hummingbird,NuckChorris/hummingbird,NuckChorris/hummingbird,xhocquet/hummingbird,saintsantos/hummingbird,wlads/hummingbird,astraldragon/hummingbird,jcoady9/hummingbird,MiLk/hummingbird,xhocquet/hummingbird,vevix/hummingbird,qgustavor/... |
7926531330e7750b45e7d00367bc4b31df28ce8f | build/tasks/generate-module-cache-task.coffee | build/tasks/generate-module-cache-task.coffee | path = require 'path'
ModuleCache = require '../../src/module-cache'
module.exports = (grunt) ->
grunt.registerTask 'generate-module-cache', 'Generate a module cache for all core modules and packages', ->
appDir = grunt.config.get('atom.appDir')
{packageDependencies} = grunt.file.readJSON('package.json')
... | path = require 'path'
ModuleCache = require '../../src/module-cache'
module.exports = (grunt) ->
grunt.registerTask 'generate-module-cache', 'Generate a module cache for all core modules and packages', ->
appDir = grunt.config.get('atom.appDir')
{packageDependencies} = grunt.file.readJSON('package.json')
... | Whitelist folders path from core | Whitelist folders path from core
There are several folders bundled in the app that aren't needed in the
require cache list so it is simpler to opt-in the folders that should
be part of the cache.
| CoffeeScript | mit | tmunro/atom,gzzhanghao/atom,stuartquin/atom,lpommers/atom,avdg/atom,pkdevbox/atom,kandros/atom,Jandersolutions/atom,andrewleverette/atom,bryonwinger/atom,G-Baby/atom,matthewclendening/atom,YunchengLiao/atom,chfritz/atom,charleswhchan/atom,jacekkopecky/atom,GHackAnonymous/atom,SlimeQ/atom,originye/atom,SlimeQ/atom,flori... |
dd3cc2ddbeb189b77b607ac128b1da28d2fde8e6 | app/assets/javascripts/app/manage/users.js.coffee | app/assets/javascripts/app/manage/users.js.coffee | #= require "../users/new"
$ ->
if isOnPage 'manage', 'users'
mconf.Resources.addToBind ->
mconf.Users.New.bind()
window.onpopstate = (event) ->
window.location.href = mconf.Base.urlFromParts(event.state)
event.state
$('input.resource-filter-field').each ->
input = $(this)
... | #= require "../users/new"
$ ->
if isOnPage 'manage', 'users'
mconf.Resources.addToBind ->
mconf.Users.New.bind()
window.onpopstate = (event) ->
window.location.href = mconf.Base.urlFromParts(event.state)
event.state
$('input.resource-filter-field').each ->
input = $(this)
... | Check if opElement exists before setting in manage users search | Check if opElement exists before setting in manage users search
| CoffeeScript | agpl-3.0 | mconf-rnp/mconf-web,mconf-rnp/mconf-web,mconf-rnp/mconf-web,mconf-rnp/mconf-web |
e47c8428cd8fa8098c5d925611206d5fb2becf4f | app/assets/javascripts/species/views/elibrary_search_form/elibrary_search_form_view.js.coffee | app/assets/javascripts/species/views/elibrary_search_form/elibrary_search_form_view.js.coffee | Species.ElibrarySearchFormView = Ember.View.extend
templateName: 'species/elibrary_search_form'
classNames: ['search-block']
actions:
toggleSearchOptions: () ->
@.$('.search-form').toggle() | Species.ElibrarySearchFormView = Ember.View.extend
templateName: 'species/elibrary_search_form'
classNames: ['search-block']
actions:
toggleSearchOptions: () ->
@.$('.search-form').toggle()
icon = @.$('.search-options-toggle > i')
if icon.hasClass('fa-plus-circle')
icon.addClass('fa... | Change status when clicking on show search options | Change status when clicking on show search options
| CoffeeScript | bsd-3-clause | unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI |
93fd3dbc4985da9a4c8ac083afc741815de51861 | app/assets/javascripts/controllers/player_controller.js.coffee | app/assets/javascripts/controllers/player_controller.js.coffee | Yossarian.PlayerController = Ember.Controller.extend
artists: null
currentRecording: null
lastRecording: null
recordings: (->
@get('artists').toArray().map((artist) -> artist.get('recordings')).flatten().uniq().shuffle()
).property('artists.@each.recordings.@each')
playing: (->
@get('currentRec... | Yossarian.PlayerController = Ember.Controller.extend
states: { stopped: 0, playing: 1 }
artists: null
currentRecording: null
currentState: 0
recordings: (->
@get('artists').map((artist) -> artist.get('recordings').toArray().shuffle()[0..1]).flatten().sortBy('id')
).property('artists.@each... | Refactor PlayerController to use states | Refactor PlayerController to use states | CoffeeScript | mit | smolnar/yossarian,smolnar/yossarian,smolnar/yossarian |
34b4b09993330bfff7879105a3bea368392fb011 | lib/tool-bar-button-view.coffee | lib/tool-bar-button-view.coffee | {CompositeDisposable} = require 'atom'
{$, View} = require 'space-pen'
module.exports = class ToolBarButtonView extends View
@content: ->
@button class: 'btn btn-default tool-bar-btn'
initialize: (options) ->
@subscriptions = new CompositeDisposable
@priority = options.priority
if options.toolti... | {CompositeDisposable} = require 'atom'
{$, View} = require 'space-pen'
module.exports = class ToolBarButtonView extends View
@content: ->
@button class: 'btn btn-default tool-bar-btn'
initialize: (options) ->
@subscriptions = new CompositeDisposable
@priority = options.priority
if options.toolti... | Check active element when store it | Check active element when store it
| CoffeeScript | mit | suda/tool-bar,jerone/tool-bar,jerone/tool-bar,cakecatz/toolbar,suda/tool-bar |
4a7a0a85dda3e2926a22483e0966f2cfea3acaa0 | js-library/app/js/jail_iframe/classes/control_iframe.coffee | js-library/app/js/jail_iframe/classes/control_iframe.coffee |
class ControlIframe
constructor: ->
@el = document.createElement('iframe')
#need to append to outer document before we can access frame document.
FactlinkJailRoot.$factlinkCoreContainer.append(@el)
@$el = $(@el)
@doc = @el.contentWindow.document;
@doc.open()
#need doctype to avoid quirks ... |
class ControlIframe
constructor: ->
@el = document.createElement('iframe')
#need to append to outer document before we can access frame document.
FactlinkJailRoot.$factlinkCoreContainer.append(@el)
@$el = $(@el)
@doc = @el.contentWindow.document;
@doc.open()
#need doctype to avoid quirks ... | Implement resizer that sets outer size of frame to inner control size | Implement resizer that sets outer size of frame to inner control size
| CoffeeScript | mit | Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core |
d1ac56fb8e7a8d0ccf1b7881dab4473c1c7d371c | app/assets/javascripts/backbone/views/rooms/show_view.js.coffee | app/assets/javascripts/backbone/views/rooms/show_view.js.coffee | Chamber.Views.Rooms ||= {}
class Chamber.Views.Rooms.ShowView extends Backbone.View
template: JST["backbone/templates/rooms/show"]
events: {
"click input[type=submit]": "doSubmit",
}
initialize: ->
@messages_index_view = new Chamber.Views.Messages.IndexView(
{
el: $("#messages", @el... | Chamber.Views.Rooms ||= {}
class Chamber.Views.Rooms.ShowView extends Backbone.View
template: JST["backbone/templates/rooms/show"]
events: {
"click input[type=submit]": "doSubmit",
}
initialize: ->
@messages_index_view = new Chamber.Views.Messages.IndexView(
{
el: $("#messages", @el... | Fix bug in code that repopulated the input field | Fix bug in code that repopulated the input field
| CoffeeScript | mit | espenhogbakk/chamber,espenhogbakk/chamber |
efb1cc73f139eb696ba5e76a1a7db44b28a5c878 | lib/package-keymap-view.coffee | lib/package-keymap-view.coffee | _ = require 'underscore-plus'
{$$$, View} = require 'atom'
# Displays the keybindings for a package namespace
module.exports =
class PackageKeymapView extends View
@content: ->
@section =>
@div class: 'section-heading icon icon-keyboard', 'Keybindings'
@table class: 'package-keymap-table table native... | path = require 'path'
_ = require 'underscore-plus'
{$, $$$, View} = require 'atom'
# Displays the keybindings for a package namespace
module.exports =
class PackageKeymapView extends View
@content: ->
@section =>
@div class: 'section-heading icon icon-keyboard', 'Keybindings'
@table class: 'package-... | Add copy icon to keymaps in package view | Add copy icon to keymaps in package view
Closes #166
| CoffeeScript | mit | atom/settings-view |
671bcb6d60f461e265c86c3415c74d594595f255 | bokehjs/src/coffee/models/transforms/step_interpolator.coffee | bokehjs/src/coffee/models/transforms/step_interpolator.coffee | _ = require "underscore"
Transform = require "./transform"
Interpolator = require "./interpolator"
p = require "../../core/properties"
class StepInterpolator extends Interpolator.Model
initialize: (attrs, options) ->
super(attrs, options)
props: ->
return _.extend {}, super(), {
mode: [ p.String, ... | _ = require "underscore"
Transform = require "./transform"
Interpolator = require "./interpolator"
p = require "../../core/properties"
class StepInterpolator extends Interpolator.Model
initialize: (attrs, options) ->
super(attrs, options)
props: ->
return _.extend {}, super(), {
mode: [ p.String, ... | Implement the different modes of the StepInterpolator | Implement the different modes of the StepInterpolator
| CoffeeScript | bsd-3-clause | justacec/bokeh,percyfal/bokeh,aavanian/bokeh,rs2/bokeh,clairetang6/bokeh,schoolie/bokeh,mindriot101/bokeh,timsnyder/bokeh,bokeh/bokeh,rs2/bokeh,aiguofer/bokeh,Karel-van-de-Plassche/bokeh,phobson/bokeh,percyfal/bokeh,schoolie/bokeh,ericmjl/bokeh,philippjfr/bokeh,timsnyder/bokeh,stonebig/bokeh,azjps/bokeh,ptitjano/bokeh,... |
dcece2bb3eae8cda89739bfc2a3c0fa303ad6c1c | lib/linter-map.cson | lib/linter-map.cson | 'source.ruby': 'rubocop'
'source.ruby.rails': 'rubocop'
'source.python': 'flake8'
'source.js': 'jshint'
'source.haskell': 'hlint'
'text.tex.latex.haskell': 'hlint'
'source.coffee': 'coffeelint'
'source.go': 'gc'
'source.css': 'csslint'
'source.css.scss': 'scss-lint'
'source.puppet': 'puppet-lint'
'source.shell': 'shell... | 'source.ruby': 'rubocop'
'source.ruby.rails': 'rubocop'
'source.ruby.rspec': 'rubocop'
'source.python': 'flake8'
'source.js': 'jshint'
'source.haskell': 'hlint'
'text.tex.latex.haskell': 'hlint'
'source.coffee': 'coffeelint'
'source.go': 'gc'
'source.css': 'csslint'
'source.css.scss': 'scss-lint'
'source.puppet': 'pupp... | Add Rspec grammar for Rubocop | Add Rspec grammar for Rubocop
| CoffeeScript | mit | ahmetabdi/atom-lint,yujinakayama/atom-lint |
ff506b2b0330370c0fed3cc5dd89921fb624fbd2 | services/web/app/coffee/infrastructure/Features.coffee | services/web/app/coffee/infrastructure/Features.coffee | Settings = require 'settings-sharelatex'
module.exports = Features =
externalAuthenticationSystemUsed: ->
Settings.ldap? or Settings.saml? or Settings.overleaf?.oauth?
hasFeature: (feature) ->
switch feature
when 'homepage'
return Settings.enableHomepage
when 'registration'
return not Features.ext... | Settings = require 'settings-sharelatex'
module.exports = Features =
externalAuthenticationSystemUsed: ->
Settings.ldap? or Settings.saml? or Settings.overleaf?.oauth?
hasFeature: (feature) ->
switch feature
when 'homepage'
return Settings.enableHomepage
when 'registration'
return not Features.ext... | Make publishing and viewing templates separate features | Make publishing and viewing templates separate features
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
b8a2d2164788ae86ca81409a15006e52960879b2 | client/angular/components/progress_chart/progress_chart.coffee | client/angular/components/progress_chart/progress_chart.coffee |
svg = require 'svg.js'
AppConfig = require 'shared/services/app_config.coffee'
angular.module('loomioApp').directive 'progressChart', ->
template: '<div class="progress-chart"></div>'
replace: true
scope:
stanceCounts: '='
goal: '='
size: '@'
restrict: 'E'
controller: ['$scope', '$element'... |
svg = require 'svg.js'
AppConfig = require 'shared/services/app_config.coffee'
angular.module('loomioApp').directive 'progressChart', ->
template: '<div class="progress-chart"></div>'
replace: true
scope:
stanceCounts: '='
goal: '='
size: '@'
restrict: 'E'
controller: ['$scope', '$element'... | Make sure count chart + preview always show the same thing | Make sure count chart + preview always show the same thing
| CoffeeScript | agpl-3.0 | loomio/loomio,piratas-ar/loomio,loomio/loomio,loomio/loomio,piratas-ar/loomio,piratas-ar/loomio,piratas-ar/loomio,loomio/loomio |
83fb69f3a8dec45383f7cb82509879410eb13472 | app/core/services/segment.coffee | app/core/services/segment.coffee | module.exports = loadSegmentio = if not me.useSocialSignOn() then -> Promise.resolve([]) else _.once ->
return new Promise (accept, reject) ->
analytics = window.analytics = window.analytics or []
analytics.invoked = true
analytics.methods = [
'trackSubmit'
'trackClick'
'trackLink'
... | module.exports = loadSegmentio = if not me.useSocialSignOn() then -> Promise.resolve([]) else _.once ->
return new Promise (accept, reject) ->
analytics = window.analytics = window.analytics or []
analytics.invoked = true
analytics.methods = [
'trackSubmit'
'trackClick'
'trackLink'
... | Update Intercom / Segment integration | Update Intercom / Segment integration
Updating settings based on new Ozaria source in Segment, pointing to a 2nd Intercom destination in Segment. 2nd Intercom Segement destination still points to our Coco Intercom workspace for now.
| CoffeeScript | mit | javatlacati/codecombat,javatlacati/codecombat,codecombat/codecombat,codecombat/codecombat,codecombat/codecombat,codecombat/codecombat,javatlacati/codecombat,codecombat/codecombat,javatlacati/codecombat,javatlacati/codecombat |
da7df04e34e01a0e705720bbc16be377ccd42bf0 | resources/assets/coffee/react/contest-entry/user-entry.coffee | resources/assets/coffee/react/contest-entry/user-entry.coffee | # Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
# See the LICENCE file in the repository root for full licence text.
import * as React from 'react'
import { button, div, i } from 'react-dom-factories'
el = React.createElement
export class UserEntry extends Reac... | # Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
# See the LICENCE file in the repository root for full licence text.
import * as React from 'react'
import { button, div, i } from 'react-dom-factories'
el = React.createElement
export class UserEntry extends Reac... | Fix non-working button after converted from link | Fix non-working button after converted from link
| CoffeeScript | agpl-3.0 | nanaya/osu-web,ppy/osu-web,notbakaneko/osu-web,ppy/osu-web,nanaya/osu-web,nekodex/osu-web,nekodex/osu-web,notbakaneko/osu-web,LiquidPL/osu-web,LiquidPL/osu-web,nekodex/osu-web,LiquidPL/osu-web,ppy/osu-web,nanaya/osu-web,notbakaneko/osu-web,LiquidPL/osu-web,nanaya/osu-web,ppy/osu-web,notbakaneko/osu-web,ppy/osu-web,notb... |
0164e8740b6185e8298d0a6c897562b2b1dd1022 | src/uploader.coffee | src/uploader.coffee | {EventEmitter} = require 'events'
aws = require 'aws-sdk'
class Uploader extends EventEmitter
# Constructor
constructor: ({accessKey, secretKey, sessionToken, region, stream, objectName, objectParams, bucket, partSize, maxBufferSize, waitForPartAttempts, waitTime, debug}, @cb) ->
super()
aws.co... | {EventEmitter} = require 'events'
aws = require 'aws-sdk'
class Uploader extends EventEmitter
# Constructor
constructor: ({accessKey, secretKey, sessionToken, region, stream, objectName, objectParams, bucket, partSize, maxBufferSize, waitForPartAttempts, waitTime, service, debug}, @cb) ->
super()
... | Make it possible to pass S3 service to Uploader. | Make it possible to pass S3 service to Uploader.
It is useful to change various S3 service parameters like maxRetries
etc.
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3/ManagedUpload.html
| CoffeeScript | mit | apiaryio/s3-streaming-upload |
bd7bc803cb99336c1ee6d9aadcd0151fc6bef6f9 | app/assets/javascripts/darkswarm/darkswarm.js.coffee | app/assets/javascripts/darkswarm/darkswarm.js.coffee | window.Darkswarm = angular.module("Darkswarm", [
'ngResource',
'mm.foundation',
'LocalStorageModule',
'infinite-scroll',
'angular-flash.service',
'templates',
'ngSanitize',
'ngAnimate',
'uiGmapgoogle-maps',
'duScroll',
'angularFileUpload',
'angularSlideables'
]).config ($httpProvider, $tooltipPr... | window.Darkswarm = angular.module("Darkswarm", [
'ngResource',
'mm.foundation',
'LocalStorageModule',
'infinite-scroll',
'angular-flash.service',
'templates',
'ngSanitize',
'ngAnimate',
'uiGmapgoogle-maps',
'duScroll',
'angularFileUpload',
'angularSlideables'
]).config ($httpProvider, $tooltipPr... | Fix broken syntax in multiple angular files | Fix broken syntax in multiple angular files
I have no idea how this was not already throwing errors before...
| CoffeeScript | agpl-3.0 | mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundati... |
435f4a0fa12ef637ed25e025971274a2f0226ff4 | source/assets/javascripts/components/photo_gallery.coffee | source/assets/javascripts/components/photo_gallery.coffee | class PhotoGallery
constructor: (options) ->
@$el = options.el
@thumbnails = options.thumbnails
@project = options.project
setup: ->
for thumbnail in @thumbnails
new Thumbnail({ el: @$el, thumbnail: thumbnail, project: @project }).listen()
class Thumbnail
constructor: (option... | class PhotoGallery
constructor: (options) ->
@$el = options.el
@thumbnails = options.thumbnails
@project = options.project
setup: ->
for thumbnail in @thumbnails
new Thumbnail({ el: @$el, thumbnail: thumbnail, project: @project }).listen()
class Thumbnail
constructor: (option... | Fix image javascript in safari | Fix image javascript in safari
| CoffeeScript | mit | ballauriena/charlie-portfolio-website,ballauriena/charlie-portfolio-website,ballauriena/charlie-portfolio-website |
9915fb3a12e071c2b38c8754bad17617d89c555e | app/assets/javascripts/scoreboard.coffee | app/assets/javascripts/scoreboard.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
draw_scoreboard = ->
if !document.getElementById('scoreboard_graph')
return
$.get 'teams/get_score_... | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
draw_scoreboard = (chart) ->
if !document.getElementById('scoreboard_graph')
return
$.get 'teams/ge... | Fix chart object being destroyed | Fix chart object being destroyed
| CoffeeScript | mit | RCydefe/hack-the-arch,mcpa-stlouis/hack-the-arch,mcpa-stlouis/hack-the-arch,RCydefe/hack-the-arch,RCydefe/hack-the-arch,mcpa-stlouis/hack-the-arch,mcpa-stlouis/hack-the-arch,RCydefe/hack-the-arch,mcpa-stlouis/hack-the-arch |
8bfcbb6675ecf04d672c674870d7e802245101b3 | cms/static/coffee/src/main.coffee | cms/static/coffee/src/main.coffee | AjaxPrefix.addAjaxPrefix(jQuery, -> CMS.prefix)
@CMS =
Models: {}
Views: {}
prefix: $("meta[name='path_prefix']").attr('content')
_.extend CMS, Backbone.Events
$ ->
Backbone.emulateHTTP = true
$.ajaxSetup
headers : { 'X-CSRFToken': $.cookie 'csrftoken' }
dataType: 'json'
$(document).ajaxError ... | AjaxPrefix.addAjaxPrefix(jQuery, -> CMS.prefix)
@CMS =
Models: {}
Views: {}
prefix: $("meta[name='path_prefix']").attr('content')
_.extend CMS, Backbone.Events
$ ->
Backbone.emulateHTTP = true
$.ajaxSetup
headers : { 'X-CSRFToken': $.cookie 'csrftoken' }
dataType: 'json'
$(document).ajaxError ... | Make notifyOnError handler try to parse response as JSON | Make notifyOnError handler try to parse response as JSON
| CoffeeScript | agpl-3.0 | syjeon/new_edx,ZLLab-Mooc/edx-platform,zerobatu/edx-platform,Endika/edx-platform,zhenzhai/edx-platform,appliedx/edx-platform,ahmedaljazzar/edx-platform,edx-solutions/edx-platform,alu042/edx-platform,mbareta/edx-platform-ft,cyanna/edx-platform,Shrhawk/edx-platform,morpheby/levelup-by,eduNEXT/edunext-platform,playm2mboy/... |
6f1c508f7686e0995dbe225a07ff2faa9ddb8a6b | app/assets/javascripts/routes/map.route.js.coffee | app/assets/javascripts/routes/map.route.js.coffee | Wheelmap.MapRoute = Ember.Route.extend
setupController: (controller, model)->
@_super(controller, model)
@controllerFor('toolbar').set('content', @store.findAll('category'))
renderTemplate: (controller, model)->
@render 'index',
outlet: 'map' | Wheelmap.MapRoute = Ember.Route.extend
setupController: (controller, model)->
@_super(controller, model)
toolbarController = @controllerFor('toolbar')
unless toolbarController.get('model') instanceof DS.PromiseArray
toolbarController.set('model', @store.findAll('category'))
renderTemplate: (con... | Fix unnecessary loading of categories in map route. | Fix unnecessary loading of categories in map route.
| CoffeeScript | agpl-3.0 | sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap |
5ab2cb098184f958f9fb9f96dc2399b1e1ca21e2 | client/templates/user_profile/user_profile.coffee | client/templates/user_profile/user_profile.coffee | gravatar_url = (email_address) ->
hash = CryptoJS.MD5 email_address.trim().toLowerCase()
"http://www.gravatar.com/avatar/" + hash + "?d=404&s=50"
Template.profilePage.onRendered ->
url = gravatar_url(Template.parentData().emails[0].address)
HTTP.get url, (error, response) ->
if not error
$('#gravatar... | gravatar_url = (email_address) ->
hash = CryptoJS.MD5 email_address.trim().toLowerCase()
"http://www.gravatar.com/avatar/" + hash + "?d=404&s=50"
Template.profilePage.onRendered ->
url = gravatar_url(Template.parentData().emails[0].address)
HTTP.get url, (error, response) ->
# If you're wondering why there... | Document reason for exception in the console. | Document reason for exception in the console.
| CoffeeScript | mit | mxipartners/mijnmxi,mxipartners/mijnmxi,mxipartners/mijnmxi |
4658a54c4626e7c3330aa31214b4d82e40b5483a | components/ManageSteps/ManageSteps.coffee | components/ManageSteps/ManageSteps.coffee | 'use strict'
React = require 'react'
ManageStepsView = require './ManageStepsView'
{ connect } = require 'react-redux'
{ loadStepsByProject } = require 'appirio-tech-client-app-layer'
ManageSteps = React.createClass
propTypes:
projectId: React.PropTypes.string.isRequired
co... | 'use strict'
React = require 'react'
ManageStepsView = require './ManageStepsView'
{ connect } = require 'react-redux'
{ loadStepsByProject } = require 'appirio-tech-client-app-layer'
ManageSteps = React.createClass
propTypes:
projectId: React.PropTypes.string.isRequired
p... | Add permissions prop to manage steps | Add permissions prop to manage steps
| CoffeeScript | mit | appirio-tech/react-components,appirio-tech/react-components,appirio-tech/react-components |
2cfdd55e8620fd6e5cf1645b0de26718d985a66e | app/assets/javascripts/sprangular/directives/shippingRatesSelection.coffee | app/assets/javascripts/sprangular/directives/shippingRatesSelection.coffee | Sprangular.directive 'shippingRateSelection', ->
restrict: 'E'
templateUrl: 'shipping/rates.html'
scope:
order: '='
controller: ($scope, Checkout, Env) ->
$scope.loading = false
$scope.address = {}
$scope.currencySymbol = Env.currency.symbol
$scope.$watch 'order.shippingRate', (rate, oldRa... | Sprangular.directive 'shippingRateSelection', ->
restrict: 'E'
templateUrl: 'shipping/rates.html'
scope:
order: '='
controller: ($scope, Checkout, Env) ->
$scope.loading = false
$scope.address = {}
$scope.currencySymbol = Env.currency.symbol
$scope.$watch 'order.shippingRate', (rate, oldRa... | Update `shipping-rate-selection` to use `Order.shippingAddress` directly | Update `shipping-rate-selection` to use `Order.shippingAddress` directly
| CoffeeScript | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular |
2baef43bb1b58314f24a8a3d85dc8932123796ee | app/assets/javascripts/pages.coffee | app/assets/javascripts/pages.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
jQuery ->
$(document).keydown (event) ->
if $("#shortcuts_available").length
action = null
... | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
jQuery ->
$(document).keydown (event) ->
if $("#shortcuts_available").length
action = null
... | Disable javascript for deactivated accordion extension | fix: Disable javascript for deactivated accordion extension
| CoffeeScript | agpl-3.0 | ploh/basar,ploh/basar,ploh/basar,ploh/basar |
42531750891782798c980a574dc8d0d7ae11e35d | app/assets/javascripts/i18n_dashboard/translations.js.coffee | app/assets/javascripts/i18n_dashboard/translations.js.coffee | jQuery ->
$('#form-translation textarea').autosize()
$('.add-translation').click (event) ->
event.preventDefault()
$('#form-translation #locale').val('')
$('#form-translation #key').val('')
$('#form-translation #value').trigger('autosize')
$('#form-translation #value').focus()
$('.edit-trans... | jQuery ->
$('#form-translation textarea').autosize()
$('.add-translation').click (event) ->
event.preventDefault()
$('#form-translation #locale').val('')
$('#form-translation #key').val('')
$('#form-translation #value').val('')
$('#form-translation #value').trigger('autosize')
$('#form-tran... | Clean textarea when add a translation | fix: Clean textarea when add a translation
| CoffeeScript | mit | redrick/redis_dictionary,redrick/redis_dictionary |
2a12118e6b65e7fe7a0ab7ad0e63d848e8f9b294 | assets/js/src/i18n/index.coffee | assets/js/src/i18n/index.coffee | $ ->
selectors = [
# newsletter modal
'.subscribe-banner'
'.modal-title'
'.modal-body p'
'.modal-body .button-add.wide'
# default view
'.read-more'
'.older-posts'
'.newer-posts'
'.poweredby'
# post view
'footer .button-add.large.wide'
'a.post-meta'
'.prefix-date... | $ ->
selectors = [
# newsletter modal
'.subscribe-banner'
'.modal-title'
'.modal-body p'
'.modal-body .button-add.wide'
# default view
'.read-more'
'.older-posts'
'.newer-posts'
'.poweredby'
# post view
'footer .button-add.large.wide'
'a.post-meta'
'.prefix-dat... | Fix translation in different pages context | Fix translation in different pages context
| CoffeeScript | mit | Kikobeats/itch,zombeats/bloggy,Kikobeats/itch,Kikobeats/bloggy,zombeats/bloggy,Kikobeats/bloggy |
193f837cc48a7e33f13d48232f54b5b29b559e9f | config/amd/gulp-options.coffee | config/amd/gulp-options.coffee | module.exports =
karma: true,
shims:
underscore: {exports: '_'}
backbone: {exports: 'Backbone', deps: ['underscore']}
'backbone-orm': {exports: 'BackboneORM', deps: ['backbone', 'stream']}
'parameters': {exports: '__test__parameters__', deps: ['backbone-orm']}
post_load: 'window._ = window.Backbon... | module.exports =
karma: true,
shims:
underscore: {exports: '_'}
backbone: {exports: 'Backbone', deps: ['underscore']}
'backbone-orm': {exports: 'BackboneORM', deps: ['backbone', 'stream']}
'parameters': {exports: '__test__parameters__', deps: ['backbone-orm']}
post_load: 'window._ = window.Backbon... | Work around for lodash -> index | Work around for lodash -> index
| CoffeeScript | mit | vidigami/backbone-orm |
1abe5c541105c82df81de9eec34e4dc62c1418d8 | src/pushbullet.coffee | src/pushbullet.coffee | # Description:
# <placeholder>
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# <placeholder>
#
# Author:
# dualmoon
if not process.env.HUBOT_PUSHBULLET_API_KEY
console.log "HUBOT_PUSHBULLET_API_KEY was not set! This plugin won't work!"
else
apiKey = process.env.HUBOT_PUSHBULLET_API_KEY... | # Description:
# <placeholder>
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# <placeholder>
#
# Author:
# dualmoon
if not process.env.HUBOT_PUSHBULLET_API_KEY
console.log "HUBOT_PUSHBULLET_API_KEY was not set! This plugin won't work!"
else
apiKey = process.env.HUBOT_PUSHBULLET_API_KEY... | Update output of 'pb last' | Update output of 'pb last'
| CoffeeScript | mit | dualmoon/hubot-pushbullet |
b47300420830b79720b42612ddd18b40f48d77fa | spec/components/pickers.cjsx | spec/components/pickers.cjsx | DatePicker = require '../../components/date_picker'
TimePicker = require '../../components/time_picker'
module.exports = React.createClass
displayName: 'PickersTest'
render: ->
datetime = new Date(1995,11,17)
datetime.setHours(17)
datetime.setMinutes(28)
<section>
<DatePicker />
<Date... | DatePicker = require '../../components/date_picker'
TimePicker = require '../../components/time_picker'
module.exports = React.createClass
displayName: 'PickersTest'
render: ->
datetime = new Date(1995,11,17)
datetime.setHours(17)
datetime.setMinutes(28)
<section>
<h2>Pickers</h2>
<D... | Add title to date picker test component | Add title to date picker test component
| CoffeeScript | mit | react-toolbox/react-toolbox,soyjavi/react-toolbox,KerenChandran/react-toolbox,rubenmoya/react-toolbox,react-toolbox/react-toolbox,react-toolbox/react-toolbox,rubenmoya/react-toolbox,rubenmoya/react-toolbox,jasonleibowitz/react-toolbox,showings/react-toolbox,DigitalRiver/react-atlas,soyjavi/react-toolbox,jasonleibowitz/... |
7bfdbe857350050c8639ac62dc52412488f19107 | core/app/backbone/models/fact_relation.coffee | core/app/backbone/models/fact_relation.coffee | class window.FactRelation extends Backbone.Model
defaults:
evidence_type: 'FactRelation'
setOpinion: (type) ->
$.ajax
url: @url() + "/opinion/" + type
success: (data) =>
mp_track "Evidence: opinionate",
type: type
evidence_id: @id
@set data
type: "po... | class window.FactRelation extends Backbone.Model
defaults:
evidence_type: 'FactRelation'
setOpinion: (type) ->
$.ajax
url: @url() + "/opinion/" + type
success: (data) =>
mp_track "Evidence: opinionate",
type: type
evidence_id: @id
@set data
type: "po... | Add current_opinion getter to FactRelation | Add current_opinion getter to FactRelation
| CoffeeScript | mit | Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core |
8ddf61523394e17b4561bfa9740904f2cf519fb7 | src/Witness/_witness/Scripts/witness/AsyncAction.coffee | src/Witness/_witness/Scripts/witness/AsyncAction.coffee | # reference "Witness.coffee"
# reference "Event.coffee"
# reference "TimeoutError.coffee"
{ Event, TimeoutError } = @witness
@witness.AsyncAction = class AsyncAction
constructor: (@func, @args = [], @description, @timeout = AsyncAction.defaultTimeout) ->
@on = Event.define "running", "passed", "failed"... | # reference "Witness.coffee"
# reference "Event.coffee"
# reference "TimeoutError.coffee"
{ Event, TimeoutError } = @witness
@witness.AsyncAction = class AsyncAction
constructor: (@func, @args = [], @description, @timeout = AsyncAction.defaultTimeout) ->
@on = Event.define "running", "passed", "failed"... | Change default async action timeout to 10 seconds. | Change default async action timeout to 10 seconds.
| CoffeeScript | bsd-2-clause | andrewdavey/witness,andrewdavey/witness,andrewdavey/witness |
083eb75ae51ea001d81b985561f30b88acfdc08a | menus/floobits.cson | menus/floobits.cson | # See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'atom-workspace': [
# { 'label': 'Enable Floobits', 'command': 'Floobits: Join Workspace' }
# { 'label': 'Enable Floobits', 'command': 'Floobits: Join Recent Workspace' }
]
'menu': [
{
'label': 'Packages'
... | # See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'atom-workspace': [
# { 'label': 'Enable Floobits', 'command': 'Floobits: Join Workspace' }
# { 'label': 'Enable Floobits', 'command': 'Floobits: Join Recent Workspace' }
]
'menu': [
{
'label': 'Packages'
... | Add a toggle to show / not show user list | Add a toggle to show / not show user list | CoffeeScript | apache-2.0 | mingsai/floobits-atom,Floobits/floobits-atom |
1cbd356e7eb0bf4b63a6a82473afb5bf6fbcfd2c | server/utils/constants.coffee | server/utils/constants.coffee |
exports.MSGBYPAGE = 30
# safeDestroy parameters (to be tweaked)
# loads 200 ids in memory at once
exports.LIMIT_DESTROY = 200
# loads 30 messages in memory at once
exports.LIMIT_UPDATE = 30
# send 5 request to the DS in parallel
exports.CONCURRENT_DESTROY = 1
# number of IMAP & cozy UID&flags in memory when comparing ... |
exports.MSGBYPAGE = 30
# safeDestroy parameters (to be tweaked)
# loads 200 ids in memory at once
exports.LIMIT_DESTROY = 200
# loads 30 messages in memory at once
exports.LIMIT_UPDATE = 30
# send 5 request to the DS in parallel
exports.CONCURRENT_DESTROY = 1
# number of IMAP & cozy UID&flags in memory when comparing ... | Set FETCH AT ONCE to 10000 | Set FETCH AT ONCE to 10000
RAM usage is still reasonable, import is way faster
| CoffeeScript | mit | cozy-labs/emails,poupotte/cozy-emails,aenario/cozy-emails,clochix/cozy-emails,lemelon/cozy-emails,poupotte/cozy-emails,nono/cozy-emails,cozy/cozy-emails,robinmoussu/cozy-emails,robinmoussu/cozy-emails,cozy-labs/emails,aenario/cozy-emails,clochix/cozy-emails,frankrousseau/cozy-emails,kelukelu/cozy-emails,kelukelu/cozy-e... |
11ca431953b73c32a42daecee4cc22866a067e0c | snowblocks/atom/packages.cson | snowblocks/atom/packages.cson | # Copyright (c) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
# Copyright (c) 2017-present Sven Greb <code@svengreb.de>
# Project: igloo
# Repository: https://github.com/arcticicestudio/igloo
# License: MIT
# References:
# https://github.com/lee-dohm/package-sync
packages: [
"atom-beautif... | # Copyright (c) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
# Copyright (c) 2017-present Sven Greb <code@svengreb.de>
# Project: igloo
# Repository: https://github.com/arcticicestudio/igloo
# License: MIT
# References:
# https://github.com/lee-dohm/package-sync
packages: [
"atom-beautif... | Add package "language-rust" for Rust support | Add package "language-rust" for Rust support
Add support for Rust (1) via the community package "language-rust" (2).
References:
(1) https://www.rust-lang.org
(2) https://atom.io/packages/language-rust
Closes GH-121
| CoffeeScript | mit | arcticicestudio/igloo,arcticicestudio/igloo,arcticicestudio/igloo |
6ae2da866f278420a5cbfe5b6dfa6f30341634d0 | src/deploy-monitor.coffee | src/deploy-monitor.coffee | class DeployMonitor
deploy = null
chat = null
monitorInterval = null
monitorPeriodMs = 10000
deployHangTimeMs = 0
lastDeployStdout = null
setDeploy: (deployJob, chatArg)->
deploy = deployJob
chat = chatArg
deploy.on('create', ()=>
@.startMonitoring()
)
deploy.on('close', ()=>
... | class DeployMonitor
deploy = null
chat = null
monitorInterval = null
monitorPeriodMs = 10000
deployHangTimeMs = 0
lastDeployOutput = null
setDeploy: (deployJob, chatArg)->
deploy = deployJob
chat = chatArg
deploy.on('create', ()=>
@.startMonitoring()
)
deploy.on('close', ()=>
... | Use PulsarJob.output instead of PulsarJob.stdout for monitoring deploy. | Use PulsarJob.output instead of PulsarJob.stdout for monitoring deploy.
| CoffeeScript | mit | vogdb/hubot-pulsar,vogdb/hubot-pulsar,cargomedia/hubot-pulsar,cargomedia/hubot-pulsar |
9e0b8bce7d3f7ac924e39572c81c41261d96d77f | src/scripts/modules/header/header.coffee | src/scripts/modules/header/header.coffee | define (require) ->
$ = require('jquery')
settings = require('settings')
BaseView = require('cs!helpers/backbone/views/base')
template = require('hbs!./header-template')
require('less!./header')
return class HeaderView extends BaseView
template: template
templateHelpers: () -> {
page: @page
... | define (require) ->
$ = require('jquery')
settings = require('settings')
BaseView = require('cs!helpers/backbone/views/base')
template = require('hbs!./header-template')
require('less!./header')
return class HeaderView extends BaseView
template: template
templateHelpers: () -> {
page: @page
... | Check if legacy url is defined before creating link | Check if legacy url is defined before creating link
| CoffeeScript | agpl-3.0 | Connexions/webview,dak/webview,Connexions/webview,dak/webview,carolinelane10/webview,dak/webview,Connexions/webview,katalysteducation/webview,katalysteducation/webview,Connexions/webview,katalysteducation/webview,katalysteducation/webview |
d77ce589d6f6499038f5cde6cf9db2801021dbae | common/queries.hooks.coffee | common/queries.hooks.coffee | share.Queries.before.update (userId, query, fieldNames, modifier, options) ->
if _.intersection(fieldNames, ["interface", "output", "startRecNum", "sortField", "sortReverse", "fields", "fieldsOrder"]).length
modifier.$set = modifier.$set or {}
modifier.$set.isOutputStale = true
| share.Queries.before.update (userId, query, fieldNames, modifier, options) ->
if _.intersection(fieldNames, ["interface", "output", "startRecNum", "sortField", "sortReverse", "fields", "fieldsOrder"]).length
modifier.$set = modifier.$set or {}
modifier.$set.isOutputStale = true
if _.intersection(fieldNames,... | Reset query on interface or output change | Reset query on interface or output change
| CoffeeScript | agpl-3.0 | chrissanders/FlowBAT,chrissanders/FlowBAT,rbouqueau/FlowBAT,rbouqueau/FlowBAT,chrissanders/FlowBAT,rbouqueau/FlowBAT |
ad7421369deb4a54ecd14dccf5f12ef7ff068b4b | app/assets/javascripts/species/mixins/geo_entity_auto_complete_lookup.js.coffee | app/assets/javascripts/species/mixins/geo_entity_auto_complete_lookup.js.coffee | Species.GeoEntityAutoCompleteLookup = Ember.Mixin.create
geoEntityQuery: null
autoCompleteRegions: null
autoCompleteCountries: null
selectedGeoEntities: []
selectedGeoEntitiesIds: []
geoEntityQueryObserver: ( ->
re = new RegExp("(^|\\(| )"+@get('geoEntityQuery'),"i")
@set 'autoCompleteCountries', @... | Species.GeoEntityAutoCompleteLookup = Ember.Mixin.create
geoEntityQuery: null
autoCompleteRegions: null
autoCompleteCountries: null
selectedGeoEntities: []
selectedGeoEntitiesIds: []
geoEntityQueryObserver: ( ->
removeDiactritics = (string) -> string.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
... | Replace letters with diactritics (e.g., ä ö ü É é) during geoentity filtering, so geoentities can be filtered using only english alphabet | feat: Replace letters with diactritics (e.g., ä ö ü É é) during geoentity filtering, so geoentities can be filtered using only english alphabet
| CoffeeScript | bsd-3-clause | unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI |
33802a4252b8e4349c344a8755291f1f4e83561b | core/app/backbone/views/popovers/react_signin_popover.coffee | core/app/backbone/views/popovers/react_signin_popover.coffee | window.ReactSigninPopover = React.createClass
getInitialState: ->
opened: false
componentDidMount: ->
window.currentUser.on 'change:username', @_onSignedInChange, @
componentWillUnmount: ->
window.currentUser.off null, null, @
_onButtonClicked: (e) ->
@setState opened: true
_onSignedInChan... | window.ReactSigninPopover = React.createClass
getInitialState: ->
opened: false
componentDidMount: ->
window.currentUser.on 'change:username', @_onSignedInChange, @
componentWillUnmount: ->
window.currentUser.off null, null, @
_onButtonClicked: (e) ->
@setState opened: true
_onSignedInChan... | Use pendingState as state is not updated instantly | Use pendingState as state is not updated instantly
| CoffeeScript | mit | Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core |
eb441c972a2a83e5ac2565c59cd4267bf89e0d02 | lib/fuzzy-finder.coffee | lib/fuzzy-finder.coffee | _ = require 'underscore'
module.exports =
projectPaths: null
fuzzyFinderView: null
loadPathsTask: null
activate: (state) ->
rootView.command 'fuzzy-finder:toggle-file-finder', =>
@createView().toggleFileFinder()
rootView.command 'fuzzy-finder:toggle-buffer-finder', =>
@createView().toggleB... | _ = require 'underscore'
module.exports =
projectPaths: null
fuzzyFinderView: null
loadPathsTask: null
activate: (state) ->
rootView.command 'fuzzy-finder:toggle-file-finder', =>
@createView().toggleFileFinder()
rootView.command 'fuzzy-finder:toggle-buffer-finder', =>
@createView().toggleB... | Remove view when package is deactivated | Remove view when package is deactivated
| CoffeeScript | mit | viddo/fuzzy-finder,Spy-Seth/fuzzy-finder,nielsAD/fuzzy-finder,segiddins/fuzzy-finder,nielsAD/fuzzy-finder,toshi-saito/fuzzy-finder,Kerruba/fuzzy-finder,viddo/fuzzy-finder,Kerruba/fuzzy-finder,gvanderest/fuzzy-finder,gvanderest/fuzzy-finder,pombredanne/fuzzy-finder,pombredanne/fuzzy-finder,atom/fuzzy-finder,segiddins/fu... |
ce15d63709536466c1742d9da4e3c3111323ce40 | server/lib/cordova.coffee | server/lib/cordova.coffee | Meteor.methods
log: ->
console.log.apply console, arguments
Meteor.startup ->
Push.debug = true
Push.Configure
apn:
passphrase: '***'
keyData: Assets.getText 'PushRocketChatKey.pem'
certData: Assets.getText 'PushRocketChatCert_development.pem'
gateway: 'gateway.sandbox.push.apple.com'
'apn-dev':
... | Meteor.methods
log: ->
console.log.apply console, arguments
Meteor.startup ->
Push.debug = true
Push.Configure
apn:
passphrase: '***'
keyData: Assets.getText 'certs/PushRocketChatKey.pem'
certData: Assets.getText 'certs/PushRocketChatCert_development.pem'
gateway: 'gateway.sandbox.push.apple.com'
... | Load certs from dir 'certs' | Load certs from dir 'certs'
| CoffeeScript | mit | ealbers/Rocket.Chat,jbsavoy18/rocketchat-1,coreyaus/Rocket.Chat,TribeMedia/Rocket.Chat,flaviogrossi/Rocket.Chat,williamfortunademoraes/Rocket.Chat,sunhaolin/Rocket.Chat,LearnersGuild/Rocket.Chat,leohmoraes/Rocket.Chat,christmo/Rocket.Chat,capensisma/Rocket.Chat,xasx/Rocket.Chat,galrotem1993/Rocket.Chat,LearnersGuild/Ro... |
07897604b796589030629f869701118ea46b8c4e | src/widgets/views/select2.coffee | src/widgets/views/select2.coffee | Menglifang.Widgets.Select2 = Ember.Select.extend
classNames: ['mlf-select2']
placeholder: '请选择...'
allowClear: true
minimumInputLength: 0
maximumSelectionSize: 3
didInsertElement: ->
@$().select2
placeholder: @get('placeholder')
allowClear: @get('allowClear')
minimumInputLength: @get... | Menglifang.Widgets.Select2 = Ember.Select.extend
classNames: ['mlf-select2']
placeholder: '请选择...'
allowClear: true
closeOnSelect: true
minimumInputLength: 0
maximumSelectionSize: 0
selectedDidChange: (->
@$().select2('val', @$().val())
).observes('selection.@each')
didInsertElement: ->
Emb... | Allow setting `allowClear` and `closeOnSelect` | Allow setting `allowClear` and `closeOnSelect`
| CoffeeScript | mit | emberjs-cn/ember-menglifang |
936aa7af0fee60abbb3fa0f4a83acce5a94ccd0b | app/assets/javascripts/table_sortable.js.coffee | app/assets/javascripts/table_sortable.js.coffee | App.TableSortable =
getCellValue: (row, index) ->
$(row).children("td").eq(index).text()
comparer: (index) ->
(a, b) ->
valA = App.TableSortable.getCellValue(a, index)
valB = App.TableSortable.getCellValue(b, index)
return if $.isNumeric(valA) and $.isNumeric(valB) then valA - valB else v... | App.TableSortable =
getCellValue: (row, index) ->
$(row).children("td").eq(index).text()
comparer: (index) ->
(a, b) ->
valA = App.TableSortable.getCellValue(a, index)
valB = App.TableSortable.getCellValue(b, index)
return if $.isNumeric(valA) and $.isNumeric(valB) then valA - valB else v... | Simplify adding rows to sortable tables | Simplify adding rows to sortable tables
The `append` method can handle arrays, so there's no need to loop
through each element.
There's more to improve on this method, like the `asc` variable being
global to a table instead of depending on the current column, but for
now I'm only refactoring and maintaining the curre... | CoffeeScript | agpl-3.0 | consul/consul,consul/consul,consul/consul,consul/consul,usabi/consul_san_borondon,usabi/consul_san_borondon,consul/consul,usabi/consul_san_borondon,usabi/consul_san_borondon |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.