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 |
|---|---|---|---|---|---|---|---|---|---|
d71b0ff0be97a37aa442524d6948759e05fe726c | src/lib/sync.coffee | src/lib/sync.coffee | util = require 'lib/util'
network = require 'lib/network'
methodMap =
create: 'POST'
update: 'POST'
delete: 'POST'
read: 'GET'
getValue = (object, prop) ->
if val = object?[prop]
if _.isFunction(val) then val() else val
else
null
module.exports = class Sync
constructor: (@options = {}) ->
... | util = require 'lib/util'
network = require 'lib/network'
methodMap =
create: 'POST'
update: 'POST'
delete: 'POST'
read: 'GET'
module.exports = class Sync
constructor: (@options = {}) ->
@options.parse ?= (response) ->
response
buildUrl: (url) =>
if urlRoot = @options.urlRoot
divi... | Replace 'getValue' with underscore's _.result method | Replace 'getValue' with underscore's _.result method | CoffeeScript | mit | trabian/titanium-backbone,trabian/titanium-backbone,vcu/titanium-backbone,vcu/titanium-backbone |
e246a442fcfc70cb6ea8df41478fe94ceb92f4b2 | vendor/assets/javascripts/fustrate/generic_table.coffee | vendor/assets/javascripts/fustrate/generic_table.coffee | class Fustrate.GenericTable extends Fustrate.GenericPage
@blankRow: null
table: null
initialize: =>
super
@reloadTable()
reloadTable: ->
sortRows: (rows, sortFunction = ->) ->
([sortFunction(row), row] for row in rows)
.sort (x, y) -> if x[0] == y[0] then 0 else x[0] > y[0]
.map (r... | class Fustrate.GenericTable extends Fustrate.GenericPage
@blankRow: null
table: null
initialize: =>
super
@reloadTable()
reloadTable: ->
sortRows: (rows, sortFunction = ->) ->
([sortFunction(row), row] for row in rows)
.sort (x, y) -> if x[0] == y[0] then 0 else x[0] > y[0]
.map (r... | Add method to update pagination | Add method to update pagination
Signed-off-by: Steven Hoffman <f5bcacb8ce1651b7d1e56f2693431f20e085fdeb@valenciamgmt.com>
| CoffeeScript | mit | Fustrate/fustrate-rails |
7f2a7b8f545d5594d744b09c8d6e4a62564ea471 | menus/term2.cson | menus/term2.cson | # See https://atom.io/docs/latest/creating-a-package#menus for more details
# 'context-menu':
# '.overlayer':
# 'Open terminal here': 'term:open'
'menu': [
'label': 'Packages'
'submenu': [
'label': 'Term 2'
'submenu': [
{'label': 'Open New Terminal in New Tab', 'command': 'term3:open'}
... | # See https://atom.io/docs/latest/creating-a-package#menus for more details
# 'context-menu':
# '.overlayer':
# 'Open terminal here': 'term:open'
'menu': [
'label': 'Packages'
'submenu': [
'label': 'Term 3'
'submenu': [
{'label': 'Open New Terminal in New Tab', 'command': 'term3:open'}
... | Correct package menu label to show Term 3 instead of Term 2 | Correct package menu label to show Term 3 instead of Term 2
| CoffeeScript | mit | dwb/atom-xterm,Floobits/atom-term3 |
482aa430079759c08861d8c4e1e4306b8667c023 | app/assets/javascripts/initializers/session_restore.coffee | app/assets/javascripts/initializers/session_restore.coffee | Ember.Application.initializer
name: 'session'
after: 'ember-auth-load'
initialize: (container, application) ->
Dashboard.Session = Ember.Object.extend(
init: ->
auth = container.lookup 'auth:main'
auth.addHandler 'signInSuccess', ->
sessionStorage.setItem('authToken', auth.g... | Ember.Application.initializer
name: 'session'
after: 'ember-auth-load'
initialize: (container, application) ->
Dashboard.Session = Ember.Object.extend(
init: ->
auth = container.lookup 'auth:main'
auth.addHandler 'signInSuccess', ->
sessionStorage.setItem('authToken', auth.g... | Add auth handler to remove session data when sign out | Add auth handler to remove session data when sign out
| CoffeeScript | mit | FromUte/dune-dashboard,FromUte/dune-dashboard,FromUte/dune-dashboard |
19b6043e92198181e6b003d0b40e3d052bfa7406 | 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-darwin'
'ctags-linux'
'ctags... | 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-lin... | Update .ctags pattern for unpacking | Update .ctags pattern for unpacking
| CoffeeScript | mit | darwin/atom,lpommers/atom,codex8/atom,Jandersolutions/atom,efatsi/atom,prembasumatary/atom,nvoron23/atom,pombredanne/atom,darwin/atom,xream/atom,bj7/atom,sillvan/atom,jlord/atom,G-Baby/atom,ObviouslyGreen/atom,bj7/atom,atom/atom,tanin47/atom,fredericksilva/atom,ilovezy/atom,kandros/atom,dannyflax/atom,johnrizzo1/atom,n... |
579befd5d4e572b3c9bca9cb1e9604339b759b77 | client/app/lib/util/trackInitialTurnOn.coffee | client/app/lib/util/trackInitialTurnOn.coffee | kd = require 'kd'
nick = require 'app/util/nick'
Tracker = require 'app/util/tracker'
module.exports = (machine) ->
return unless analytics
return unless typeof analytics.user is 'function'
{ initialTurnOn } = analytics.user().traits()
return if initialTurnOn
initialTurnOn = yes
analytics.iden... | kd = require 'kd'
nick = require 'app/util/nick'
Tracker = require 'app/util/tracker'
module.exports = (machine) ->
return unless analytics
return unless typeof analytics.user is 'function'
{ initialTurnOn } = analytics.user().traits()
return if initialTurnOn
initialTurnOn = yes
analytics.iden... | Split track initial turn on function body | Split track initial turn on function body
| CoffeeScript | agpl-3.0 | szkl/koding,sinan/koding,rjeczalik/koding,acbodine/koding,szkl/koding,acbodine/koding,cihangir/koding,kwagdy/koding-1,andrewjcasal/koding,alex-ionochkin/koding,sinan/koding,rjeczalik/koding,kwagdy/koding-1,alex-ionochkin/koding,cihangir/koding,gokmen/koding,alex-ionochkin/koding,gokmen/koding,andrewjcasal/koding,koding... |
d5dbffcbf08f20effe80355ada4f8eefd809584e | app/assets/javascripts/mixingpanel/cookies.js.coffee | app/assets/javascripts/mixingpanel/cookies.js.coffee | class @MixingpanelCookies
constructor: ()->
@_loadCookies()
@cookieDefOpts =
domain: null
path: null
expires_at: null
_loadCookies: ->
for cookie_token in document.cookie.split("; ")
[key, value] = cookie_token.split("=")
@[key] = value
set: (key, value, opts = {})->
... | class @MixingpanelCookies
constructor: ()->
@_loadCookies()
@cookieDefOpts =
domain: null
path: null
expires_at: null
_loadCookies: ->
for cookie_token in document.cookie.split("; ")
[key, value] = cookie_token.split("=")
@[key] = value
set: (key, value, opts = {})->
... | Remove session from cookie set option | Remove session from cookie set option
| CoffeeScript | mit | gguerrero/mixingpanel,kelkoo-services/mixingpanel,kelkoo-services/mixingpanel,kelkoo-services/mixingpanel,gguerrero/mixingpanel,gguerrero/mixingpanel |
4ab63db6cf7d87f9c87814a6ab70cdefee15ec57 | lib/main.coffee | lib/main.coffee | BibtexProvider = require "./provider"
module.exports =
config:
bibtex:
type: 'string'
default: ''
scope:
type: 'string'
default: '.source.gfm'
resultTemplate:
type: 'string'
default: '@[key]'
activate: ->
@provider = new BibtexProvider()
deactivate: ->
@p... | BibtexProvider = require "./provider"
module.exports =
config:
bibtex:
type: 'array'
default: []
items:
type: 'string'
scope:
type: 'string'
default: '.source.gfm'
resultTemplate:
type: 'string'
default: '@[key]'
activate: ->
@provider = new Bibtex... | Update configuration schema to reflect that we expect an array of BibTeX file names. | Update configuration schema to reflect that we expect an array of BibTeX file names.
| CoffeeScript | mit | lodestone/autocomplete-bibtex,mangecoeur/autocomplete-bibtex,mdlincoln/autocomplete-bibtex,apcshields/autocomplete-bibtex,tpoisot/autocomplete-citeproc,tpoisot/autocomplete-bibtex |
74739018fcbb127050f5c6577b9f7dc50b1f13aa | lib/model/user.coffee | lib/model/user.coffee | root = exports ? this
root.User = class User
@findOne: (idOrName) ->
data = Meteor.users.findOne(idOrName)
if not data
data = Meteor.users.findOne({'profile.name': new RegExp('^' + idOrName + '$', 'i')})
new User(data)
@current: ->
Meteor.userId() and new User(Meteor.user())
constructor: ... | root = exports ? this
root.User = class User
@findOne: (idOrName) ->
data = Meteor.users.findOne(idOrName)
if not data
data = Meteor.users.findOne({'profile.name': new RegExp('^' + idOrName + '$', 'i')})
new User(data)
@current: ->
Meteor.userId() and new User(Meteor.user())
constructor: ... | Fix facebook images to make sure they are squares | Fix facebook images to make sure they are squares
| CoffeeScript | apache-2.0 | rantav/reversim-summit-2014,rantav/reversim-summit-2015,rantav/reversim-summit-2015,rantav/reversim-summit-2014,rantav/reversim-summit-2015 |
4a12754d904abbb035c7365fb7508420b163eb0f | services/web/public/coffee/ide/editor/directives/toggleSwitch.coffee | services/web/public/coffee/ide/editor/directives/toggleSwitch.coffee | define [
"base"
], (App) ->
App.directive "toggleSwitch", () ->
restrict: "E"
scope:
description: "@"
labelFalse: "@"
labelTrue: "@"
ngModel: "="
template: """
<fieldset class="toggle-switch">
<legend class="sr-only">{{description}}</legend>
<input
type="radio"
... | define [
"base"
], (App) ->
App.directive "toggleSwitch", () ->
restrict: "E"
scope:
description: "@"
labelFalse: "@"
labelTrue: "@"
ngModel: "="
template: """
<fieldset class="toggle-switch">
<legend class="sr-only">{{description}}</legend>
<input
type="radio"
... | Mark visible toggle switch as hidden from screen readers | Mark visible toggle switch as hidden from screen readers
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
f0e8d114f904e7c79a5645d053d6b20cd32cbae3 | app/assets/javascripts/modules/maps/base_layer.coffee | app/assets/javascripts/modules/maps/base_layer.coffee | define('base_layer', [], ->
class BaseLayer
@render: (map, opts={}) ->
terrain = L.mapbox.tileLayer('unepwcmc.l8gj1ihl')
satellite = L.mapbox.tileLayer('unepwcmc.lac5fjl1')
L.control.layers({
"<span data-layer='Terrain'>Terrain</span>": terrain,
"<span data-layer='Satellite'>Sa... | define('base_layer', [], ->
class BaseLayer
@render: (map, opts={}) ->
terrain = L.mapbox.tileLayer('unepwcmc.l8gj1ihl')
satellite = L.mapbox.tileLayer('unepwcmc.lac5fjl1')
marine = L.mapbox.styleLayer('mapbox://styles/unepwcmc/cj63iq5m04i142rl0481raoxj')
# add Terrain/Satellite button
... | Add option to set a style for the map and hide the terrain options | Add option to set a style for the map and hide the terrain options
| CoffeeScript | bsd-3-clause | unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet |
dcfa5fa42d20c791159de8fcba2aa37475855ca9 | app/assets/javascripts/admin/subscriptions/controllers/subscription_controller.js.coffee | app/assets/javascripts/admin/subscriptions/controllers/subscription_controller.js.coffee | angular.module("admin.subscriptions").controller "SubscriptionController", ($scope, Subscription, SubscriptionForm, customers, schedules, paymentMethods, shippingMethods) ->
$scope.subscription = new Subscription()
$scope.errors = null
$scope.save = null
$scope.customers = customers
$scope.schedules = schedul... | angular.module("admin.subscriptions").controller "SubscriptionController", ($scope, Subscription, SubscriptionForm, Customers, Schedules, PaymentMethods, ShippingMethods) ->
$scope.subscription = new Subscription()
$scope.errors = null
$scope.save = null
$scope.customers = Customers.all
$scope.schedules = Sch... | Use services to access injected data arrays | Use services to access injected data arrays
| CoffeeScript | agpl-3.0 | Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,oeoeaio/openf... |
7784e34349700afb2ad31666174d98b1a1872ca2 | lib/assets/javascripts/views/profile_component/avatar.js.coffee | lib/assets/javascripts/views/profile_component/avatar.js.coffee | Marbles.Views.ProfileAvatar = class ProfileAvatarView extends Marbles.Views.ProfileComponent
@template_name: '_profile_avatar'
@view_name: 'profile_avatar'
constructor: ->
super
@on 'ready', @checkImageMortality
@render()
checkImageMortality: =>
img = Marbles.DOM.querySelector('img', @el)
... | Marbles.Views.ProfileAvatar = class ProfileAvatarView extends Marbles.Views.ProfileComponent
@template_name: '_profile_avatar'
@view_name: 'profile_avatar'
constructor: ->
super
@on 'ready', @checkImageMortality
checkImageMortality: =>
img = Marbles.DOM.querySelector('img', @el)
unless img.co... | Fix profile avatar component: Don't render until profile fetch has been attempted | Fix profile avatar component: Don't render until profile fetch has been attempted
| CoffeeScript | bsd-3-clause | tent/tent-status,tent/tent-status |
a60f4088160e6b32b4ce0630ab7d20bceb6bd200 | lib/models/diffs/diff-chunk.coffee | lib/models/diffs/diff-chunk.coffee | DiffLine = require './diff-line'
ListItem = require '../list-item'
{git} = require '../../git'
{File} = require 'pathwatcher'
_ = require 'underscore'
##
# A DiffChunk represents one consecutive block of altered lines. The end-goal of
# breaking them out separately is to be able to stage them individually.
#
module.e... | path = require 'path'
DiffLine = require './diff-line'
ListItem = require '../list-item'
{git} = require '../../git'
{File} = require 'pathwatcher'
_ = require 'underscore'
##
# A DiffChunk represents one consecutive block of altered lines. The end-goal of
# breaking them out separately is to be able to stage them i... | Fix junks folders created for patch file | Fix junks folders created for patch file
| CoffeeScript | mit | tomekwi/atomatigit,aki77/atomatigit |
966f49c2057b65d70a345c9a152212c160ad3dbf | sensor.coffee | sensor.coffee | path = require('path')
class HubotSensor
constructor: (@freq, active = true) ->
@_id = null
@room = process.env.HUBOT_SENSORS_ROOM
@setup() if active
setup: () ->
@enable()
check: () ->
fire: () ->
notify: (text) ->
@robot.messageRoom @room, text
name: () ->
@constructor.name
... | path = require('path')
class HubotSensor
constructor: (@freq, active = true) ->
@_id = null
@room = process.env.HUBOT_SENSORS_ROOM
@setup() if active
setup: () ->
@enable()
check: () ->
fire: () ->
notify: (text, rooms = [@room]) ->
@robot.messageRoom(room, text) for room in [].conca... | Add a rooms param to notify method to notify in multiple rooms | Add a rooms param to notify method to notify in multiple rooms
| CoffeeScript | mit | basoko/hubot-sensors |
fe4539116edf2a9d4f1fea1dfa2e22fb0e2ffa20 | src/index.coffee | src/index.coffee | Form = require('multiparty').Form
createWriteStream = require('fs').createWriteStream
hash = require('crypto').createHash
rand = require('crypto').pseudoRandomBytes
JFUM = module.exports = (opts) ->
opts ?= {}
@tmpDir = opts.tmpDir or require('os').tmpdir()
@minFileSize = opts.minFileSize or 1
@maxFileSize = ... | Form = require('multiparty').Form
createWriteStream = require('fs').createWriteStream
hash = require('crypto').createHash
rand = require('crypto').pseudoRandomBytes
JFUM = module.exports = (opts) ->
opts ?= {}
@tmpDir = opts.tmpDir or require('os').tmpdir()
@minFileSize = opts.minFileSize or 1
@maxFileSize = ... | Fix default supported file types | Fix default supported file types
| CoffeeScript | mit | Turistforeningen/node-jfum,Turistforeningen/node-jfum |
b2c159e4c88d7a952f27522eeb47692efaef9042 | app/assets/javascripts/directives/gravatar_directive.coffee | app/assets/javascripts/directives/gravatar_directive.coffee | #= require gravtastic
angular.module('kassa').directive('gravatar', [
'$parse'
($parse)->
linker = ($scope, $element, $attrs)->
email = size = null
setGravatarSrc = (email, size)->
if email?
$element.attr('src', Gravtastic(email, default: 'mm', size: (size ||= 22)))
updateE... | #= require gravtastic
angular.module('kassa').directive('gravatar', [
'$parse'
($parse)->
linker = ($scope, $element, $attrs)->
email = size = null
setGravatarSrc = (email, size)->
email = "" unless email?
$element.attr('src', Gravtastic(email, default: 'mm', size: (size ||= 22)))
... | Fix gravatar to show mystery man if no email is present | Fix gravatar to show mystery man if no email is present
| CoffeeScript | mit | flipflops/kassa,flipflops/kassa |
be975c05f13069a29b15cddf1080e25aa4edfe25 | lineman/app/services/message_channel_service.coffee | lineman/app/services/message_channel_service.coffee | angular.module('loomioApp').factory 'MessageChannelService', ($http, Records, CommentModel, EventModel) ->
new class MessageChannelService
subscribeSuccess: (subscription, onMessageReceived) ->
PrivatePub.sign(subscription)
console.log 'subscribed to channel:', subscription.channel
PrivatePub.su... | angular.module('loomioApp').factory 'MessageChannelService', ($http, Records, CommentModel, EventModel) ->
new class MessageChannelService
subscribeSuccess: (subscription, onMessageReceived) ->
PrivatePub.sign(subscription)
console.log 'subscribed to channel:', subscription.channel
PrivatePub.su... | Fix live updating for discussions | Fix live updating for discussions
| CoffeeScript | agpl-3.0 | annewchen/loomio,FSFTN/Loomio,doomergithub/loomio,Collabforge/site-collabio,mlarghydracept/loomio,piratas-ar/loomio,gvalerin/loomio,Collabforge/site-collabio,wangjun/loomio,HadoDokis/loomio,sicambria/loomio,aca13jmf/loomio,juliagra/loomio,piratas-ar/loomio,codingnutty/loomio,wangjun/loomio,doomergithub/loomio,Collabfor... |
f6ebf24bf025ed4373b436f74b47504c830321cf | src/loader.coffee | src/loader.coffee | ((url)->
# Section 1
iframe = document.createElement('iframe')
iframe.src = "javascript:false"
iframe.title = ""
# iframe.role = "presentation" # a11y
(iframe.frameElement or iframe).style.cssText = "width: 0; height: 0; border: 0"
where = document.getElementsByTagName('script')
where = where[where.len... | ###
Analytics Payload Loader
This is the `analytics.js` file that loads the actual Analytics payload. It
utilizes the Friendly iFrames (FiF) technique in order to load the JavaScript
library without blocking the `window.onload` event.
@see http://goo.gl/VLDc3F More information on FiF technique
###
((url)->
# Sectio... | Add documentation for Analytics Payload Loader | Add documentation for Analytics Payload Loader
| CoffeeScript | mit | skroutz/analytics.js,skroutz/analytics.js,skroutz/analytics.js |
d80f269fbe0d5a8cc7800aa46aefd6eea15b0fd3 | app/assets/javascripts/catalog-admin/summernote_init.coffee | app/assets/javascripts/catalog-admin/summernote_init.coffee | init = ->
$("[data-provider='summernote']").summernote
height: 300
maximumImageFileSize: 262144 # 256KB
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'clear']],
['fontname', ['fontname']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
... | init = ->
$("[data-provider='summernote']").summernote
height: 300
maximumImageFileSize: 262144 # 256KB
callbacks: onBlurCodeview: -> $(this).val $(this).summernote('code') # Fix content not saved from codeview issue
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline',... | Fix content not saved from codeview | Fix content not saved from codeview
| CoffeeScript | apache-2.0 | catima/catima,catima/catima,catima/catima,catima/catima |
8b49f0794ed03072ebf4c3930d5d43aeccc7b8a2 | app/client/js/routes.coffee | app/client/js/routes.coffee | goog.provide 'app.Routes'
goog.require 'este.Routes'
class app.Routes extends este.Routes
###*
@param {app.user.Store} userStore
@constructor
@extends {este.Routes}
###
constructor: (userStore) ->
@home = @route '/'
@about = @route '/about'
@songs = @route '/songs'
@recentlyUpdatedS... | goog.provide 'app.Routes'
goog.require 'este.Routes'
class app.Routes extends este.Routes
###*
@param {app.user.Store} userStore
@constructor
@extends {este.Routes}
###
constructor: (userStore) ->
@home = @route '/'
@about = @route '/about'
@songs = @route '/songs'
@recentlyUpdatedS... | Add api search song route. | Add api search song route.
| CoffeeScript | mit | steida/songary |
772414a4471cd08cd5036927bc106a92ab52a7b2 | src/core/components/browser.coffee | src/core/components/browser.coffee | Flow.Browser = (_) ->
_docs = signals []
_hasDocs = lift _docs, (docs) -> docs.length > 0
createDocView = ([ type, id, doc ]) ->
_title = signal doc.title
_date = signal new Date doc.modifiedDate
_fromNow = lift _date, Flow.Util.fromNow
load = ->
_.loadNotebook id, doc
purge = ->
... | Flow.Browser = (_) ->
_docs = signals []
_sortedDocs = lift _docs, (docs) ->
sortBy docs, (doc) -> -doc.date().getTime()
_hasDocs = lift _docs, (docs) -> docs.length > 0
createDocView = ([ type, id, doc ]) ->
_title = signal doc.title
_date = signal new Date doc.modifiedDate
_fromNow = lift _... | Sort files by modification time | Sort files by modification time
| CoffeeScript | mit | h2oai/h2o-flow,printedheart/h2o-flow,junwucs/h2o-flow,h2oai/h2o-flow,printedheart/h2o-flow,printedheart/h2o-flow,nilbody/h2o-flow,nilbody/h2o-flow,nilbody/h2o-flow,junwucs/h2o-flow,junwucs/h2o-flow |
a266db6be389e0d7792ab514f744f8219859080f | Gruntfile.coffee | Gruntfile.coffee | module.exports = ->
# Project configuration
@initConfig
pkg: @file.readJSON 'package.json'
# BDD tests on Node.js
mochaTest:
nodejs:
src: ['spec/*.coffee']
options:
reporter: 'spec'
# Coding standards
coffeelint:
components:
files:
src: [... | module.exports = ->
# Project configuration
@initConfig
pkg: @file.readJSON 'package.json'
# BDD tests on Node.js
mochaTest:
nodejs:
src: ['spec/*.coffee']
options:
reporter: 'spec'
grep: process.env.TESTS
# Coding standards
coffeelint:
component... | Allow to grep for tests using TESTS envvar | Grunt: Allow to grep for tests using TESTS envvar
| CoffeeScript | mit | msgflo/msgflo,msgflo/msgflo,msgflo/msgflo |
dd2c4e0290d32f360b0fb73281ffff45262c9357 | app/assets/javascripts/routes/application_route.coffee | app/assets/javascripts/routes/application_route.coffee | Pancakes.ApplicationRoute = Ember.Route.extend
renderTemplate: (controller, model) ->
@_super(controller, model)
@render 'study_locations',
into: 'application',
outlet: 'studyLocations',
controller: 'studyLocations'
setupController: (controller) ->
@_super(controller)
@controlle... | Pancakes.ApplicationRoute = Ember.Route.extend
renderTemplate: (controller, model) ->
@_super(controller, model)
@render 'study_locations',
into: 'application',
outlet: 'studyLocations',
controller: 'studyLocations'
setupController: (controller) ->
@_super(controller)
@controlle... | Revert "Redirect / to /event_searches/new." | Revert "Redirect / to /event_searches/new."
This reverts commit 0de8612155705207d54facc388020df1ceb82141.
The scope of the hook is too broad; it applies to _every_ route below
the application route. A different approach is needed.
| CoffeeScript | mit | NUBIC/ncs_navigator_pancakes,NUBIC/ncs_navigator_pancakes,NUBIC/ncs_navigator_pancakes |
969ba207aec2247c7538c6a4e632f527a4043d11 | application/chrome/content/wesabe/io/Downloader.coffee | application/chrome/content/wesabe/io/Downloader.coffee | {open} = require 'io/file'
class Downloader
constructor: (@url, @file, @callback) ->
@_downloader = Cc["@mozilla.org/network/downloader;1"].createInstance()
@_ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService)
@_downloader.QueryInterface Ci.nsIDownloader
@_downloader.ini... | {open} = require 'io/file'
class Downloader
constructor: (@url, @file, @callback) ->
@_downloader = Cc["@mozilla.org/network/downloader;1"].createInstance()
@_ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService)
@_downloader.QueryInterface Ci.nsIDownloader
@_downloader.ini... | Fix regression when downloading a specific URL. | Fix regression when downloading a specific URL.
Copy-paste restructuring error. It used to be all in one function, now it's an ivar.
| CoffeeScript | apache-2.0 | wesabe/ssu,wesabe/ssu,wesabe/ssu,wesabe/ssu,wesabe/ssu |
c684a66ac3aa3c5066c0428b92b885058c62ef96 | common/static/coffee/src/xblock/core.coffee | common/static/coffee/src/xblock/core.coffee | @XBlock =
runtime: {}
initializeBlock: (element) ->
$element = $(element)
children = @initializeBlocks($element)
version = $element.data("runtime-version")
initFnName = $element.data("init")
if version? and initFnName?
runtime = @runtime["v#{version}"](element, children)
initFn = wi... | @XBlock =
runtime: {}
initializeBlock: (element) ->
$element = $(element)
children = @initializeBlocks($element)
version = $element.data("runtime-version")
initFnName = $element.data("init")
if version? and initFnName?
runtime = @runtime["v#{version}"](element, children)
initFn = wi... | Add information to xblocks about when they complete initialization that's visible in javascript | Add information to xblocks about when they complete initialization that's visible in javascript
| CoffeeScript | agpl-3.0 | unicri/edx-platform,IONISx/edx-platform,bigdatauniversity/edx-platform,ampax/edx-platform-backup,mcgachey/edx-platform,torchingloom/edx-platform,halvertoluke/edx-platform,mjirayu/sit_academy,Lektorium-LLC/edx-platform,jolyonb/edx-platform,appsembler/edx-platform,Edraak/circleci-edx-platform,mahendra-r/edx-platform,Wata... |
36e2eacbc03c0da6d2a8b43719083794ef4b02ad | test/integration/system-int.coffee | test/integration/system-int.coffee | request = require 'supertest'
assert = require 'assert'
req = request require '../../coffee/server'
describe '/CloudHealthCheck', ->
it 'should return OK for MongoDB and Redis', (done) ->
req.get '/CloudHealthCheck'
.expect 200
.expect (res) ->
assert.deepEqual res.body, message: 'Syste... | request = require 'supertest'
assert = require 'assert'
req = request require '../../coffee/server'
describe '/CloudHealthCheck', ->
it 'should return 200 OK for GET request', (done) ->
req.get '/CloudHealthCheck'
.expect 200
.expect (res) ->
assert.deepEqual res.body, message: 'System ... | Add integration test for HEAD /CloudHealthCheck | Add integration test for HEAD /CloudHealthCheck
| CoffeeScript | mit | Turistforeningen/Turbasen,Turbasen/Turbasen |
96477abef3469746269d8564dcbe4f3ba42a691b | test/parser_spec.coffee | test/parser_spec.coffee | expect = require('chai').expect
fs = require('fs')
Parser = require('../lib/parser')
describe 'Parser', ->
dummy = fs.createReadStream('./test/fixtures/dummy.html')
parser = new Parser(dummy)
it 'lists available years', (done) ->
parser.getYears (err, years) ->
expect(err).to.be.null
expe... | expect = require('chai').expect
fs = require('fs')
Parser = require('../lib/parser')
describe 'Parser', ->
beforeEach ->
@dummy = fs.createReadStream('./test/fixtures/dummy.html')
@parser = new Parser(@dummy)
it 'lists available years', (done) ->
@parser.getYears (err, years) ->
expect(err... | Use properties instead of local variables | Use properties instead of local variables
| CoffeeScript | mit | paulodiovani/sinos-river-parser |
0254e647628a2af47bc8ea5d2b1482bf2dc89630 | spec/spec-bootstrap.coffee | spec/spec-bootstrap.coffee | try
require '../src/window'
Atom = require '../src/atom'
window.atom = new Atom()
window.atom.show() unless atom.getLoadSettings().exitWhenDone
{runSpecSuite} = require './jasmine-helper'
document.title = "Spec Suite"
runSpecSuite './spec-suite'
catch error
unless atom.getLoadSettings().exitWhenDone
... | try
require '../src/window'
Atom = require '../src/atom'
window.atom = new Atom()
window.atom.show() unless atom.getLoadSettings().exitWhenDone
{runSpecSuite} = require './jasmine-helper'
document.title = "Spec Suite"
runSpecSuite './spec-suite'
catch error
if atom?.getLoadSettings().exitWhenDone
a... | Remove window handling in catch block | Remove window handling in catch block
The catch block in index.html takes care of this
| CoffeeScript | mit | yalexx/atom,toqz/atom,brettle/atom,davideg/atom,brumm/atom,rookie125/atom,me6iaton/atom,mrodalgaard/atom,qskycolor/atom,svanharmelen/atom,nvoron23/atom,kc8wxm/atom,jtrose2/atom,hagb4rd/atom,vinodpanicker/atom,florianb/atom,stinsonga/atom,prembasumatary/atom,johnrizzo1/atom,einarmagnus/atom,qskycolor/atom,rsvip/aTom,bry... |
954aa64e642535780a48a007562da71c7b84b06e | lib/restructured-preview.coffee | lib/restructured-preview.coffee | {CompositeDisposable} = require 'atom'
RestructuredPreviewView = require './restructured-preview-view'
url = require 'url'
module.exports = RestructuredPreview =
restructuredPreviewView: null
modalPanel: null
subscriptions: null
activate: (state) ->
@subscriptions = new CompositeDisposable
@subscripti... | {CompositeDisposable} = require 'atom'
RestructuredPreviewView = require './restructured-preview-view'
url = require 'url'
module.exports = RestructuredPreview =
restructuredPreviewView: null
modalPanel: null
subscriptions: null
activate: (state) ->
@subscriptions = new CompositeDisposable
@subscripti... | Split to the right when opening preview | Split to the right when opening preview
| CoffeeScript | mit | MichaelAquilina/restructured-preview,MichaelAquilina/restructured-preview |
789476e6ab5dca24099e16b65610fe87abed4b2b | app/assets/javascripts/forms.js.coffee | app/assets/javascripts/forms.js.coffee | App.Forms =
disableEnter: ->
$('form.js-enter-disabled').on('keyup keypress', (event) ->
if event.which == 13
e.preventDefault()
)
submitOnChange: ->
$('.js-submit-on-change').unbind('change').on('change', ->
$(this).closest('form').submit()
false
)
toggleLink: ->
... | App.Forms =
disableEnter: ->
$('form.js-enter-disabled').on('keyup keypress', (event) ->
if event.which == 13
e.preventDefault()
)
submitOnChange: ->
$('.js-submit-on-change').unbind('change').on('change', ->
$(this).closest('form').submit()
false
)
toggleLink: ->
... | Synchronize percentage for new progress bars | Synchronize percentage for new progress bars
According to the HTML specification:
> The default value is the minimum plus half the difference between the
> minimum and the maximum, unless the maximum is less than the minimum,
> in which case the default value is the minimum.
So for new progress bars, we had a numeri... | CoffeeScript | agpl-3.0 | consul/consul,AyuntamientoPuertoReal/decidePuertoReal,AyuntamientoMadrid/participacion,AyuntamientoPuertoReal/decidePuertoReal,AyuntamientoMadrid/participacion,consul/consul,AyuntamientoPuertoReal/decidePuertoReal,usabi/consul_san_borondon,consul/consul,usabi/consul_san_borondon,AyuntamientoMadrid/participacion,Ayuntam... |
aa899e5de023ce13a333d12ea459b8e14a13d4b7 | app/assets/javascripts/ui.js.coffee | app/assets/javascripts/ui.js.coffee | jQuery ->
$(".clickable").live "click", (e) ->
window.location.href = $(this).find("a.primary-link").attr("href")
$(".collapsible")
.hover ->
$(this).find(".collapse").slideDown()
, ->
$(this).find(".collapse").slideUp()
.find(".collapse").hide()
$(":input.date").dateinput
format... | jQuery ->
# Crude way to make large blocks .clickable by definiting a.primary-link in them
$(".clickable").live "click", (e) ->
window.location.href = $(this).find("a.primary-link").attr("href")
# When .collapsible item is hovered in/out the .collapse elements inside
# expand and collapse
$(".collapsible... | Add autoset and dependent methods to select inputs. | Add autoset and dependent methods to select inputs.
* Autoset allows one select to influence another.
* Dependent shows or hides elements based on the value of a select.
| CoffeeScript | mit | cyclestreets/cyclescape,cyclestreets/cyclescape,auto-mat/toolkit,auto-mat/toolkit,cyclestreets/cyclescape |
96a9b73c3a934b8803ab9bf4c40c0ab7a0f54906 | atom/snippets.cson | atom/snippets.cson | ".source.ruby":
"Hashrocket":
prefix: "="
body: " => "
"Context block":
prefix: "context"
body: """
context "$1" do
$2
end
"""
"Test block":
prefix: "test"
body: """
test "$1" do
$2
end
"""
".source.coffee":
"Describe block":
prefix:... | ".source.ruby":
"Hashrocket":
prefix: "="
body: " => "
"Curly braces block":
prefix: "{"
body: "{ |${1:variable}| $2 "
"Context block":
prefix: "context"
body: """
context "$1" do
$2
end
"""
"Test block":
prefix: "test"
body: """
test "$1" do
... | Add Atom snippet for Ruby curly braces block | Add Atom snippet for Ruby curly braces block
| CoffeeScript | mit | jasonrudolph/dotfiles,jasonrudolph/dotfiles,jasonrudolph/dotfiles,jasonrudolph/dotfiles |
230b35d7ad46fae91b305d798f1fd5bca790e982 | src/components/learning-guide/progress-bar.cjsx | src/components/learning-guide/progress-bar.cjsx | React = require 'react'
BS = require 'react-bootstrap'
ChapterSectionType = require './chapter-section-type'
module.exports = React.createClass
displayName: 'LearningGuideProgressBar'
propTypes:
section: ChapterSectionType.isRequired
onPractice: React.PropTypes.func
render: ->
{section, chapter, ... | React = require 'react'
BS = require 'react-bootstrap'
ChapterSectionType = require './chapter-section-type'
module.exports = React.createClass
displayName: 'LearningGuideProgressBar'
propTypes:
section: ChapterSectionType.isRequired
onPractice: React.PropTypes.func
render: ->
{section, chapter, ... | Add "Click to practice" tooltip to practice buttons | Add "Click to practice" tooltip to practice buttons
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
8dfd4879413f839963addad39995b18f91f2a862 | services/web/public/coffee/main/account-upgrade.coffee | services/web/public/coffee/main/account-upgrade.coffee | define [
"base"
], (App) ->
App.controller "FreeTrialModalController", ($scope, abTestManager, sixpack, event_tracking)->
$scope.buttonClass = "btn-primary"
$scope.startFreeTrial = (source, couponCode) ->
event_tracking.sendMB "subscription-start-trial", { source }
w = window.open()
sixpack.convert "t... | define [
"base"
], (App) ->
App.controller "FreeTrialModalController", ($scope, abTestManager, sixpack, event_tracking)->
$scope.buttonClass = "btn-primary"
$scope.startFreeTrial = (source, couponCode) ->
event_tracking.sendMB "subscription-start-trial", { source, plan: $scope.startTrialPlanCode }
w = wi... | Add plan to event tracking | Add plan to event tracking
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
ad981dde75d46824a86f87c92cc4f5cc36b41b37 | assets/javascripts/application.coffee | assets/javascripts/application.coffee | #= require dashing.js
#= require_tree ./lib
#= require_tree ./dashing
#= require_tree ../../widgets
Dashing.on 'ready', ->
Dashing.widget_margins ||= [5, 5]
Dashing.widget_base_dimensions ||= [300, 360]
Dashing.numColumns ||= 4
contentWidth = (Dashing.widget_base_dimensions[0] + Dashing.widget_margins[0] * 2)... | #= require dashing.js
#= require_tree ./lib
#= require_tree ./dashing
#= require_tree ../../widgets
$ ->
Dashing.widget_margins ||= [5, 5]
Dashing.widget_base_dimensions ||= [300, 360]
Dashing.numColumns ||= 4
contentWidth = (Dashing.widget_base_dimensions[0] + Dashing.widget_margins[0] * 2) * Dashing.numColu... | Fix notification window not hiding on start | Fix notification window not hiding on start
| CoffeeScript | mit | creacoon/dashboard,creacoon/dashboard,creacoon/dashboard |
1803ea3c38f454413f4d040ece3eefec0fd56fcd | app/assets/javascripts/admin/utils/services/errors_parser.js.coffee | app/assets/javascripts/admin/utils/services/errors_parser.js.coffee | # Parses a structure of errors that came from the server
angular.module("admin.utils").factory "ErrorsParser", ->
new class ErrorsParser
toString: (errors, defaultContent = "") =>
return defaultContent unless errors?
errorsString = ""
if errors.length > 0
# it is an array of errors
... | # Parses a structure of errors that came from the server
angular.module("admin.utils").factory "ErrorsParser", ->
new class ErrorsParser
toString: (errors, defaultContent = "") =>
return defaultContent unless errors?
errorsString = ""
if errors.length > 0
# it is an array of errors
... | Add traling breakline to case where errors come in a array | Add traling breakline to case where errors come in a array
| CoffeeScript | agpl-3.0 | Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfo... |
8815d90ab060cc49f397caf424f0c263be7fca4b | app/assets/javascripts/sprangular/directives/addressForm.coffee | app/assets/javascripts/sprangular/directives/addressForm.coffee | Sprangular.directive 'addressForm', ->
restrict: 'E'
templateUrl: 'addresses/form.html'
scope:
address: '='
countries: '='
disabled: '='
submitted: '='
controller: ($scope) ->
$scope.selectedCountry = null
$scope.hasErrors = false
$scope.$watchGroup ['address.firstname', 'address.la... | Sprangular.directive 'addressForm', ->
restrict: 'E'
templateUrl: 'addresses/form.html'
scope:
address: '='
countries: '='
disabled: '='
submitted: '='
controller: ($scope, Account) ->
$scope.user = Account.user
$scope.selectedCountry = null
$scope.hasErrors = false
$scope.$watc... | Add $scope.user to address-form directive | Add $scope.user to address-form directive
| CoffeeScript | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular |
82f8e81afee136c91a3bec67f18bef26cbdd393b | simpletabs.coffee | simpletabs.coffee | $ ->
hashTabs = ->
_element: ""
element: (element) ->
this._element = element
updateTab: (updateHash=true)->
this.updateTabLink()
this.updateTabContainer()
$('body').scrollTop(0)
if updateHash
this.updateURLHash()
updateTabLink: ->
this._element.parent().... | $ ->
hashTabs = ->
_element: ""
element: (element) ->
this._element = element
updateTab: (updateHash=true)->
this.updateTabLink()
this.updateTabContainer()
$('body').scrollTop(0)
if updateHash
this.updateURLHash()
updateTabLink: ->
this._element.parent().... | Add possibility to show N content with the same data tab | Add possibility to show N content with the same data tab
| CoffeeScript | mit | romulomachado/simpletabs |
928b0cec384af4e3c6c8230c2639eca4206e1511 | lineman/app/js/controllers/proposal_pie_chart_controller.coffee | lineman/app/js/controllers/proposal_pie_chart_controller.coffee | angular.module('loomioApp').controller 'ProposalPieChartController', ($scope) ->
$scope.pieChartData = [
{ value : 0, color : "#90D490" },
{ value : 0, color : "#F0BB67" },
{ value : 0, color : "#D49090" },
{ value : 0, color : "#dd0000"}
]
$scope.pieChartOptions =
animation: false
segme... | angular.module('loomioApp').controller 'ProposalPieChartController', ($scope) ->
$scope.pieChartData = [
{ value : 0, color : "#90D490" },
{ value : 0, color : "#F0BB67" },
{ value : 0, color : "#D49090" },
{ value : 0, color : "#dd0000" },
{ value : 0, color : "#cccccc" }
]
$scope.pieChartO... | Make empty pie chart appear on proposal page | Make empty pie chart appear on proposal page
| CoffeeScript | agpl-3.0 | podemos-info/loomio,podemos-info/loomio,podemos-info/loomio |
0d4b12566c9d7e31fab12515c5adb6f404407ef1 | 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... | Fix ng-model attribute update for task def selector | FIX: Fix ng-model attribute update for task def selector
| CoffeeScript | agpl-3.0 | doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,alexcu/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,alexcu/doubtfire-web |
fec8fec29d1e479c6f243e7ef36fc38aefb73536 | packages/rocketchat-lib/lib/startup/settingsOnLoadSiteUrl.coffee | packages/rocketchat-lib/lib/startup/settingsOnLoadSiteUrl.coffee | if Meteor.isServer
url = Npm.require('url')
RocketChat.settings.get 'Site_Url', (key, value) ->
if value?.trim() isnt ''
__meteor_runtime_config__.ROOT_URL = value
if Meteor.absoluteUrl.defaultOptions?.rootUrl?
Meteor.absoluteUrl.defaultOptions.rootUrl = value
if Meteor.isServer
RocketChat.hostname = ur... | if Meteor.isServer
url = Npm.require('url')
RocketChat.settings.get 'Site_Url', (key, value) ->
if value?.trim() isnt ''
__meteor_runtime_config__.ROOT_URL = value
__meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL = value
if Meteor.absoluteUrl.defaultOptions?.rootUrl?
Meteor.absoluteUrl.defaultOptions.ro... | Set DDP_DEFAULT_CONNECTION_URL to the same value of ROOT_URL | Set DDP_DEFAULT_CONNECTION_URL to the same value of ROOT_URL
| CoffeeScript | mit | AimenJoe/Rocket.Chat,klatys/Rocket.Chat,mccambridge/Rocket.Chat,OtkurBiz/Rocket.Chat,nishimaki10/Rocket.Chat,LearnersGuild/Rocket.Chat,subesokun/Rocket.Chat,bt/Rocket.Chat,alexbrazier/Rocket.Chat,marzieh312/Rocket.Chat,yuyixg/Rocket.Chat,liuliming2008/Rocket.Chat,pitamar/Rocket.Chat,abduljanjua/TheHub,abduljanjua/TheHu... |
ad6c062afe239578080ff7c0c938fd22ed5fc0c8 | app/assets/javascripts/objects/requests_number.js.coffee | app/assets/javascripts/objects/requests_number.js.coffee | @Curri.RequestsNumber =
poll: ->
setTimeout @request, 10000
request: ->
$.ajax
url: $('#requesters_link').attr('href')
dataType: 'JSON'
success: Curri.RequestsNumber.updateRequesters
updateRequesters: (data) ->
$requestsLink = $('#requesters_link')
reqLimit = $requestsLink.data... | @Curri.RequestsNumber =
poll: ->
setTimeout @request, 10000
request: ->
$.ajax
url: $('#requesters_link').attr('href')
dataType: 'JSON'
success: Curri.RequestsNumber.updateRequesters
updateRequesters: (data) ->
$requestsLink = $('#requesters_link')
reqLimit = $requestsLink.data... | Document title changes to notify teachers of requesters - like twitter and gmail | Document title changes to notify teachers of requesters - like twitter and gmail
| CoffeeScript | mit | aomra015/curri,aomran/curri |
69f99466508f26224a9a605657103fcf2913712e | app/assets/javascripts/components/activity/recent_activity_handler.cjsx | app/assets/javascripts/components/activity/recent_activity_handler.cjsx | React = require 'react/addons'
Router = require 'react-router'
RouteHandler = Router.RouteHandler
Link = Router.Link
DidYouKnowHandler = require './did_you_know_handler'
MainspaceHandler = require './mainspace_handler'
PlagiarismHandler = require './plagiarism_handler'
RecentActivityHandler = Re... | React = require 'react/addons'
Router = require 'react-router'
RouteHandler = Router.RouteHandler
Link = Router.Link
DidYouKnowHandler = require './did_you_know_handler'
MainspaceHandler = require './mainspace_handler'
PlagiarismHandler = require './plagiarism_handler'
RecentActivityHandler = Re... | Remove link to placeholder 'Mainspace' recent activity feed | Remove link to placeholder 'Mainspace' recent activity feed
| CoffeeScript | mit | KarmaHater/WikiEduDashboard,KarmaHater/WikiEduDashboard,ragesoss/WikiEduDashboard,Wowu/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,feelfreelinux/WikiEduDashboard,MusikAnimal/WikiEduDashboard,alpha721/WikiEduDashboard,adamwight/WikiEduDashboard,KarmaHater/WikiEduDas... |
8883b78abc0f6e243bc846f3cf1f777977bd323a | lib/helpers.coffee | lib/helpers.coffee | mkdirp = require 'mkdirp'
fs = require 'fs'
#
# Convenient method for writing a file on
# a path that might not exist. This function
# will create all folders provided in the
# path to the file.
#
#
# writeToFile('/tmp/hi/folder/file.js', "console.log('hi')")
#
# will create a file at /tmp/hi/folder/file.js with... | mkdirp = require 'mkdirp'
fs = require 'fs'
#
# Convenient method for writing a file on
# a path that might not exist. This function
# will create all folders provided in the
# path to the file.
#
#
# writeToFile('/tmp/hi/folder/file.js', "console.log('hi')")
#
# will create a file at /tmp/hi/folder/... | Fix url normalization for Windows | Fix url normalization for Windows
When bundle-up is called from Windows, it uses the file path to generate
the compiled assets url, resulting in things like
"/\generated\bundle\asdfg.css".
This little patch fixes that.
| CoffeeScript | mit | FGRibreau/bundle-up,Cowboy-coder/bundle-up,FGRibreau/bundle-up |
81090886cb3453d6e1363b8b22575ed95a86705d | spec/openers/preview-opener-spec.coffee | spec/openers/preview-opener-spec.coffee | PreviewOpener = require '../../lib/openers/preview-opener'
describe "PreviewOpener", ->
describe "open", ->
it "invokes the callback with an exit code equal to `1` because the file is not found", ->
exitCode = null
opener = new PreviewOpener()
opener.open 'dummy-file-name.pdf', (code) -> exitCo... | PreviewOpener = require '../../lib/openers/preview-opener'
describe "PreviewOpener", ->
describe "open", ->
# FIXME: Horrible test. Needs to be fixed, or removed entirely.
it "invokes the callback with an exit code equal to `1` because the file is not found", ->
exitCode = null
opener = new Previ... | Add note about horribly bad test | Add note about horribly bad test
| CoffeeScript | mit | WoodyWoodsta/atom-latex,WoodyWoodsta/atom-latex,thomasjo/atom-latex,thomasjo/atom-latex,thomasjo/atom-latex |
3bcdf084dccd40b99b889b6b4e75e67f9cafd6d9 | app/assets/javascripts/rglossa/routes/corpus/result_route.coffee | app/assets/javascripts/rglossa/routes/corpus/result_route.coffee | App.CorpusResultRoute = Em.Route.extend
model: (params) ->
{search_id: searchId, page_no: @pageNo} = params
# Get the search model subclass for the search engine used by the current
# corpus and find the record with the given search_id
searchModelClass = @controllerFor('corpus').get('searchModelClas... | App.CorpusResultRoute = Em.Route.extend
model: (params) ->
{search_id: searchId, page_no: @pageNo} = params
# Get the search model subclass for the search engine used by the current
# corpus and find the record with the given search_id
searchModelClass = @controllerFor('corpus').get('searchModelClas... | Set the correct page number on the toolbar controller | Set the correct page number on the toolbar controller
| CoffeeScript | mit | textlab/rglossa,textlab/rglossa,textlab/glossa,textlab/glossa,textlab/rglossa,textlab/rglossa,textlab/glossa,textlab/glossa,textlab/glossa,textlab/rglossa |
d39925a7bb604decb614b88a2ee64a8faf354a21 | app/assets/javascripts/routes/application.route.js.coffee | app/assets/javascripts/routes/application.route.js.coffee | Wheelmap.ApplicationRoute = Ember.Route.extend
signedIn: false
beforeModel: (transition)->
signUrl = $.cookie('sign_url')
if signUrl?
transition.abort()
$.cookie('sign_url', null)
window.location.hash = signUrl
actions:
authenticate: (transition)->
self = @
unless se... | Wheelmap.ApplicationRoute = Ember.Route.extend
signedIn: false
beforeModel: (transition)->
signUrl = $.cookie('sign_url')
data = JSON.parse $.cookie("flash")
if signUrl? && !data.error && !data.alert && !data.notice
transition.abort()
$.cookie('sign_url', null)
window.location.hash ... | Fix autoredirect when login failed. | Fix autoredirect when login failed.
| CoffeeScript | agpl-3.0 | sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap |
2f29388c299130c2aedfb8403033b07269b7f7c0 | src/index.coffee | src/index.coffee | minimatch = require 'minimatch'
module.exports = (env, callback) ->
filter = (contents, pattern) ->
list(contents).filter (entry) ->
if pattern? then minimatch(entry.filename, pattern) else true
list = (contents) ->
entries = []
for key, value of contents._
switch key
when 'dire... | minimatch = require 'minimatch'
module.exports = (env, callback) ->
filter = (contents, pattern) ->
list(contents).filter (entry) ->
minimatch(entry.filename, pattern)
list = (contents) ->
entries = []
for key, value of contents._
switch key
when 'directories'
subcontent... | Remove non-mandatory check from filter function | Remove non-mandatory check from filter function
| CoffeeScript | mit | xavierdutreilh/wintersmith-contents,xavierdutreilh/wintersmith-contents |
c2a42365b3767829b05a5fb321820ce0827a75fa | server.coffee | server.coffee | StreamServer = require './stream_server'
Bits = require './bits'
logger = require './logger'
Bits.set_warning_fatal true
logger.setLevel logger.LEVEL_INFO
streamServer = new StreamServer
process.on 'SIGINT', =>
console.log 'Got SIGINT'
streamServer.stop ->
process.kill process.pid, 'SIGTERM'
process.on 'unc... | url = require 'url'
StreamServer = require './stream_server'
Bits = require './bits'
logger = require './logger'
Bits.set_warning_fatal true
logger.setLevel logger.LEVEL_INFO
streamServer = new StreamServer
streamServer.setLivePathConsumer (uri, callback) ->
pathname = url.parse(uri).pathname[1..]
isAuthorized ... | Add an example of setLivePathConsumer() | Add an example of setLivePathConsumer()
| CoffeeScript | mit | iizukanao/node-rtsp-rtmp-server,iizukanao/node-rtsp-rtmp-server,danielfree/node-rtsp-rtmp-server,PeterBLITZ/node-rtsp-rtmp-server,danielfree/node-rtsp-rtmp-server,atyenoria/node-rtsp-rtmp-server,atyenoria/node-rtsp-rtmp-server,PeterBLITZ/node-rtsp-rtmp-server |
cf9597dbb4772740749d5dafbb480f57d39a0b6a | server.coffee | server.coffee | # modules
express = require("express");
app = express();
colors = require 'colors'
db = require './models/db'
http = require './services/http'
logger = require './services/logger'
# config
net = require './config/networking'
# DATABASE
# --------
do db.syncSchemas
# EXPRESS BOOTSTRAP
# -----------------
# add middl... | # modules
express = require("express");
app = express();
colors = require 'colors'
db = require './models/db'
http = require './services/http'
logger = require './services/logger'
# config
net = require './config/networking'
# DATABASE
# --------
do db.syncSchemas
# EXPRESS BOOTSTRAP
# -----------------
# add middl... | Use 3000 if PORT not defined | Use 3000 if PORT not defined
| CoffeeScript | lgpl-2.1 | AlsaceDigitale/straliens-server |
414fc3e94728218aa0ee2ffd1dc328157b862fe7 | app/assets/javascripts/chosen.js.coffee | app/assets/javascripts/chosen.js.coffee | $ ->
# enable chosen js
$('.chosen-select').chosen
no_results_text: 'No results matched'
width: '400px'
placeholder_text_multiple: 'Select languages...'
| $ ->
# enable chosen js
$('.chosen-select').chosen
no_results_text: 'No results matched'
width: '400px'
placeholder_text_multiple: 'Select languages you can read and speak'
| Add text in chosen select | Add text in chosen select
| CoffeeScript | mit | awph/translate_community,awph/translate_community,thedarkmammouth/translate_community,thedarkmammouth/translate_community |
9cc698b680249b94c21242c8eee9a51a5d54042b | app/assets/javascripts/collections/clouds/users.js.coffee | app/assets/javascripts/collections/clouds/users.js.coffee | class Cloudsdale.Collections.CloudsUsers extends Backbone.Collection
model: Cloudsdale.Models.User
url: -> "/v1/#{@topic.type}s/#{@topic.id}/users/online.json"
topic: 'cloud'
initialize: (args,options) ->
args ||= {}
options ||= {}
@topic = options.topic
this
cachedFetch: (options) -... | class Cloudsdale.Collections.CloudsUsers extends Backbone.Collection
model: Cloudsdale.Models.User
url: ->
if @topic.get('member_count') > 100
return "/v1/#{@topic.type}s/#{@topic.id}/users/online.json"
else
return "/v1/#{@topic.type}s/#{@topic.id}/users.json"
topic: 'cloud'
initialize: (... | Return all users on small clouds. | Return all users on small clouds.
| CoffeeScript | mit | cloudsdaleapp/cloudsdale-web,cloudsdaleapp/cloudsdale-web,cloudsdaleapp/cloudsdale-web,cloudsdaleapp/cloudsdale-web |
40921a3bd9e1e264d04b17c307678caf7fe52e11 | core/app/backbone/views/channels/favourite_topic_button_view.coffee | core/app/backbone/views/channels/favourite_topic_button_view.coffee | class window.FavouriteTopicButtonView extends ActionButtonView
mini: true
onRender: -> @updateButton()
initialize: ->
@bindTo @model, 'change', @updateButton, @
@user = currentUser
templateHelpers: =>
disabled_label: Factlink.Global.t.favourite.capitalize()
disable_label: Factlink.Global.t.u... | class window.FavouriteTopicButtonView extends ActionButtonView
mini: true
onRender: -> @updateButton()
initialize: ->
@bindTo @model, 'change', @updateButton, @
@user = currentUser
templateHelpers: =>
disabled_label: Factlink.Global.t.favourite.capitalize()
disable_label: Factlink.Global.t.u... | Fix check for Topic in FavouriteTopicCollection | Fix check for Topic in FavouriteTopicCollection
Can't this be done nicer?
favourite_topics.contains @model doesn't seem to work (I guess because the @model has more attributes than the Topics in FavTopicCollection).
@mark @janpaul123
| CoffeeScript | mit | Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core |
a5ac9dcd99035a5edcea422cdc020cde8aba8a80 | demos/visualizer-lazy/visualizer.coffee | demos/visualizer-lazy/visualizer.coffee | 'use strict'
{
setupEditors
setupSamples
setupCompilers
setupRunButton
saveProgram
loadProgram
} = window.viz
grid = null
run = (editors, compiler) ->
saveProgram editors
playfield = new bef.Playfield()
playfield.fromString editors.source.getValue(), 16, 10
lazyRuntime = new bef.LazyRuntime()
lazyRunt... | 'use strict'
{
setupEditors
setupSamples
setupCompilers
setupRunButton
saveProgram
loadProgram
} = window.viz
grid = null
run = (editors, compiler) ->
saveProgram editors
playfield = new bef.Playfield()
playfield.fromString editors.source.getValue(), 16, 10
lazyRuntime = new bef.LazyRuntime()
lazyRunt... | Stop selecting the js output | Stop selecting the js output
| CoffeeScript | mit | adrianton3/befunjit,adrianton3/befunjit,adrianton3/befunjit |
f73f997aa05eefea6f32ec71186dd2deee17e8ad | client/landing/app/Applications/Chat.kdapplication/Views/mainchatpanel.coffee | client/landing/app/Applications/Chat.kdapplication/Views/mainchatpanel.coffee | class MainChatPanel extends JView
constructor:->
super
cssClass : 'main-chat-panel'
@registerSingleton "chatPanel", @, yes
@conversationList = new ChatConversationListView
@conversationListController = new ChatConversationListController
view : @conversationList
viewAppended:->
@a... | class MainChatPanel extends JView
constructor:->
super
cssClass : 'main-chat-panel visible'
@registerSingleton "chatPanel", @, yes
@conversationList = new ChatConversationListView
@conversationListController = new ChatConversationListController
view : @conversationList
viewAppended:-... | Make it visible by default for testing fastly | Make it visible by default for testing fastly
| CoffeeScript | agpl-3.0 | koding/koding,jack89129/koding,drewsetski/koding,gokmen/koding,acbodine/koding,sinan/koding,alex-ionochkin/koding,acbodine/koding,rjeczalik/koding,kwagdy/koding-1,jack89129/koding,usirin/koding,kwagdy/koding-1,drewsetski/koding,cihangir/koding,mertaytore/koding,szkl/koding,sinan/koding,drewsetski/koding,usirin/koding,m... |
f7f80e8cde6c3b4320a869b7d6902bd2b41af727 | app/assets/javascripts/neighborly/static/learn.js.coffee | app/assets/javascripts/neighborly/static/learn.js.coffee | Neighborly.Static ?= {}
Neighborly.Static.Learn =
init: Backbone.View.extend
el: '.learn-page'
initialize: ->
$('.expand-section').click (event) ->
event.preventDefault()
$(this).parents('.main-section').find('.section-content').slideToggle 500, =>
elem = $(this).find('.expan... | Neighborly.Static ?= {}
Neighborly.Static.Learn =
init: Backbone.View.extend
el: '.learn-page'
initialize: ->
if window.innerWidth < 1000
$('.main-section').localScroll duration: 600
else
$('.expand-section').click this.expand_section
expand_section: (event) ->
event.p... | Enable Learn page's section expansion just in big screens | Enable Learn page's section expansion just in big screens
| CoffeeScript | mit | gustavoguichard/neighborly,gustavoguichard/neighborly,MicroPasts/micropasts-crowdfunding,MicroPasts/micropasts-crowdfunding,gustavoguichard/neighborly,MicroPasts/micropasts-crowdfunding,MicroPasts/micropasts-crowdfunding |
c90b15ca5329e3d52c5e5716045b7f6d352f48bd | src/Boundary.coffee | src/Boundary.coffee | class BoundaryComponent
BoundarySystem =
add: (engine) ->
@engine = engine
@boundaries = engine.e 'boundary', 'pos'
@entities = engine.e 'blob', 'pos'
update: (delta) ->
return if not @boundaries.length > 0
boundary = @boundaries[0].c 'pos' # TODO Only 1st object is used; should be changed
... | class BoundaryComponent
BoundarySystem =
add: (engine) ->
@engine = engine
@boundaries = engine.e 'boundary', 'pos'
@entities = engine.e 'blob', 'pos'
update: (delta) ->
return if not @boundaries.length > 0
boundary = @boundaries[0].c 'pos' # TODO Only 1st object is used; should be changed
... | Fix boundary not working correctly | Fix boundary not working correctly
| CoffeeScript | mit | yoo2001818/Absorb |
04e08f046735d40464e912c771ddf3ab1bb465f3 | app/assets/javascripts/views/event_view.js.coffee | app/assets/javascripts/views/event_view.js.coffee | Yossarian.EventView = Ember.View.extend
tagName: 'li'
attributeBindings: ['class']
mouseEnter: ->
@$().find('.info').addClass('open')
@$().find('.nivoSlider').data('nivoslider').stop()
mouseLeave: ->
@$().find('.info').removeClass('open')
@$().find('.nivoSlider').data('nivoslider').start()
| Yossarian.EventView = Ember.View.extend
tagName: 'li'
attributeBindings: ['class']
mouseEnter: ->
@$().find('.info').addClass('active')
@$().find('.nivoSlider').data('nivoslider').stop()
mouseLeave: ->
@$().find('.info').removeClass('active')
@$().find('.nivoSlider').data('nivoslider').start()... | Add active class to event view | Add active class to event view
| CoffeeScript | mit | smolnar/yossarian,smolnar/yossarian,smolnar/yossarian |
4714a070e9c0b485b18294b1ffb4a9fb710d7bbd | lib/utilities/viewsSerialization.coffee | lib/utilities/viewsSerialization.coffee | Backbone = require 'backbone'
###
backbone.syphon configuration
==================================
###
module.exports = (Module, App, Backbone, Marionette, $, _) ->
Backbone.Syphon.KeySplitter = (key) ->
key.split '.'
Backbone.Syphon.KeyJoiner = (parentKey, childKey) ->
parentKey + '.' + childKey
| Backbone = require 'backbone'
###
backbone.syphon configuration
==================================
###
module.exports = (Module, App, Backbone, Marionette, $, _) ->
Backbone.Syphon.KeySplitter = (key) ->
key.split '.'
Backbone.Syphon.KeyJoiner = (parentKey, childKey) ->
parentKey + '.' + childKey
Ba... | Add serializers for checkboxes arrays | Add serializers for checkboxes arrays
| CoffeeScript | mit | mosaiqo/frontendAppLib |
411feb4ccd354b1d7f4a1a9c1ba2e6fcaa5bd721 | server/methods.coffee | server/methods.coffee | Meteor.methods
weCanHelpEmail: (name, email, mind) ->
check([name, email, mind], [String])
Email.send
to: 'rs14team@googlegroups.com',
from: email,
subject: "Help #{name} make a proposal",
text: "#{mind}\n\nThank you, #{name} <#{email}>"
sendSubmitEmail: (p) ->
u = User.find(p.u... | Meteor.methods
weCanHelpEmail: (name, email, mind) ->
check([name, email, mind], [String])
Email.send
to: 'rs14team@googlegroups.com',
from: email,
subject: "Help #{name} make a proposal",
text: "#{mind}\n\nThank you, #{name} <#{email}>"
sendSubmitEmail: (p) ->
u = User.find(p.u... | Change the From address when sending a submission email. Maybe that'd work... | Change the From address when sending a submission email. Maybe that'd work...
| CoffeeScript | apache-2.0 | rantav/reversim-summit-2014,rantav/reversim-summit-2015,rantav/reversim-summit-2015,rantav/reversim-summit-2015,rantav/reversim-summit-2014 |
113cb908315cd2ae28b78431799e731abfee04f7 | coffee/cilantro/models/exporter.coffee | coffee/cilantro/models/exporter.coffee | define [
'../core'
'./base'
], (c, base) ->
class ExporterModel extends base.Model
class ExporterCollection extends base.Collection
model: ExporterModel
# Versions greater than or equal to this version are considered to
# support notification on completion.
minSe... | define [
'../core'
'./base'
], (c, base) ->
class ExporterModel extends base.Model
class ExporterCollection extends base.Collection
model: ExporterModel
# Versions greater than or equal to this version are considered to
# support notification on completion.
minSe... | Update the minimum Serrano version that notifies in responses | Update the minimum Serrano version that notifies in responses
| CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
c7c559eb55fa1c12b5086766d79faf06761392b5 | keymaps/encoding-selector.cson | keymaps/encoding-selector.cson | '.platform-darwin .editor':
'ctrl-shift-u': 'encoding-selector:show'
'.platform-win32 .editor':
'ctrl-shift-u': 'encoding-selector:show'
'.platform-linux .editor':
'ctrl-shift-u': 'encoding-selector:show'
| '.platform-darwin .editor':
'ctrl-shift-u': 'encoding-selector:show'
'.platform-win32 .editor':
'ctrl-shift-u': 'encoding-selector:show'
'.platform-linux .editor':
'ctrl-u': 'encoding-selector:show'
| Change the Linux key binding to Ctrl+u | :bug: Change the Linux key binding to Ctrl+u
Applies to #5
| CoffeeScript | mit | pombredanne/encoding-selector,atom/encoding-selector |
9812af09e75e47b6911bff2e1ccd68b531e3cc2d | src/Lidsys/Application/Controller/assets/lidsys/app-models.js.coffee | src/Lidsys/Application/Controller/assets/lidsys/app-models.js.coffee | window.ActiveService = class ActiveService
constructor: ->
@user = null
setUser: (@user) ->
getUser: -> @user
isLoggedIn: -> !!(@user && @user.userId)
| window.ActiveService = class ActiveService
constructor: ->
@user = null
setUser: (@user) ->
getUser: -> @user
isLoggedIn: -> !!@user?.userId
| Reduce isLoggedIn() check using Coffee more beautifully | Reduce isLoggedIn() check using Coffee more beautifully
| CoffeeScript | bsd-3-clause | lightster/lidsys-web,lightster/lidsys-web,lightster/lidsys-web,lightster/lidsys-web |
d8231be3ecab996dd1b9eb52454213c5f5d17e78 | assets/javascripts/views/misc/updates.coffee | assets/javascripts/views/misc/updates.coffee | #= require views/misc/notif
class app.views.Updates extends app.views.Notif
@className += ' _notif-news'
@defautOptions:
autoHide: 30000
init: ->
@lastUpdateTime = @getLastUpdateTime()
@updatedDocs = @getUpdatedDocs()
@updatedDisabledDocs = @getUpdatedDisabledDocs()
@show() if @updatedDocs.... | #= require views/misc/notif
class app.views.Updates extends app.views.Notif
@className += ' _notif-news'
@defautOptions:
autoHide: 30000
init: ->
@lastUpdateTime = @getLastUpdateTime()
@updatedDocs = @getUpdatedDocs()
@updatedDisabledDocs = @getUpdatedDisabledDocs()
@show() if @updatedDocs.... | Fix docs update notif not being displayed in some cases | Fix docs update notif not being displayed in some cases
| CoffeeScript | mpl-2.0 | yosiat/devdocs,webcoding/devdocs,rlugojr/devdocs,webcoding/devdocs,rlugojr/devdocs,yosiat/devdocs,rlugojr/devdocs,webcoding/devdocs,yosiat/devdocs |
3163afcc6e87200626c3cd4b8817d7b797cc5686 | lib/walker.coffee | lib/walker.coffee | ###
# Walker:
# Traverses a JavaScript AST.
#
# class MyWalker extends Walker
#
# w = new MyWalker(ast)
# w.run()
#
###
module.exports = class Walker
constructor: (@root, @options) ->
@path = []
run: ->
@walk(@root)
walk: (node) =>
oldLength = @path.length
@path.push(node)
type... | ###
# Walker:
# Traverses a JavaScript AST.
#
# class MyWalker extends Walker
#
# w = new MyWalker(ast)
# w.run()
#
###
module.exports = class Walker
constructor: (@root, @options) ->
@path = []
run: ->
@walk(@root)
walk: (node) =>
oldLength = @path.length
@path.push(node)
type... | Add preliminary support for filters. | Add preliminary support for filters.
| CoffeeScript | mit | kustomzone/js2coffee,js2coffee/js2coffee,datachand/js2coffee,marnen/js2coffee,salipro4ever/js2coffee,vinodpanicker/js2coffee,simudream/js2coffee |
09f62405c39f2f45312b094860e927ec62785a50 | atom/.atom/config.cson | atom/.atom/config.cson | "*":
core:
themes: [
"atom-dark-ui"
"atom-dark-syntax"
]
editor:
backUpBeforeSaving: true
fontFamily: "inconsolata"
invisibles: {}
scrollPastEnd: true
showIndentGuide: true
showInvisibles: true
softWrap: true
tabLength: 4
"exception-reporting":
userId: "025b... | "*":
core:
themes: [
"atom-dark-ui"
"atom-dark-syntax"
]
editor:
backUpBeforeSaving: true
fontFamily: "inconsolata"
invisibles: {}
scrollPastEnd: true
showIndentGuide: true
showInvisibles: true
softWrap: true
tabLength: 4
"exception-reporting":
userId: "025b... | Fix issue with atom removing trailing whitespace. | Fix issue with atom removing trailing whitespace.
Shame this isn't the default.
| CoffeeScript | mit | mathuin/.files |
baf9e414421ab8a7de005f73334d360043f5ffb8 | src/config.coffee | src/config.coffee | config =
mailchimp:
action: '//digitalcoachingnetwork.us11.list-manage.com/subscribe/post?u=68d703ae770920ff4a8b715e2&id=a3577a5ba4'
mongo:
connectionString: process.env.MONGOLAB_URI || 'localhost/dcn'
adminEmail: 'info@digitalcoachingnetwork.com'
trello:
# id of the Trello list to insert new cl... | config =
mailchimp:
action: '//digitalcoachingnetwork.us11.list-manage.com/subscribe/post?u=68d703ae770920ff4a8b715e2&id=a3577a5ba4'
mongo:
connectionString: process.env.MONGOLAB_URI || 'localhost/dcn'
adminEmail: 'info@digitalcoachingnetwork.com'
trello:
# id of the Trello list to insert new cl... | Use stripe public key from env on the client-side. | Use stripe public key from env on the client-side.
| CoffeeScript | isc | digitalcoachingnetwork/digitalcoachingnetwork.com,digitalcoachingnetwork/digitalcoachingnetwork.com |
21e6ab46bf4aea5e1c70a3ca88ece5745d40cd47 | src/app/api/models/group-set.coffee | src/app/api/models/group-set.coffee | angular.module("doubtfire.api.models.group-set", [])
.factory("GroupSet", (resourcePlus, DoubtfireConstants, currentUser, $window) ->
GroupSet = resourcePlus "/units/:unit_id/group_sets/:id", { id: "@id", unit_id: "@unit_id" }
GroupSet.groupCSVUploadUrl = (unit, group_set) ->
"#{DoubtfireConstants.API_URL}/uni... | angular.module("doubtfire.api.models.group-set", [])
.factory("GroupSet", (resourcePlus, DoubtfireConstants, fileDownloaderService) ->
GroupSet = resourcePlus "/units/:unit_id/group_sets/:id", { id: "@id", unit_id: "@unit_id" }
GroupSet.groupCSVUploadUrl = (unit, group_set) ->
"#{DoubtfireConstants.API_URL}/un... | Switch auth for group set csv uploads and downloads | ENHANCE: Switch auth for group set csv uploads and downloads
| CoffeeScript | agpl-3.0 | doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web |
f68b762221566ff2f90248209f2ec213cd28c65d | src/config.coffee | src/config.coffee | path = require 'path'
module.exports =
getAtomDirectory: ->
process.env.ATOM_HOME ? path.join(process.env.HOME, '.atom')
getResourcePath: ->
process.env.ATOM_RESOURCE_PATH ? '/Applications/Atom.app/Contents/Frameworks/Atom.framework/Resources'
getNodeUrl: ->
process.env.ATOM_NODE_URL ? 'https://gh-... | path = require 'path'
module.exports =
getAtomDirectory: ->
process.env.ATOM_HOME ? path.join(process.env.HOME, '.atom')
getResourcePath: ->
process.env.ATOM_RESOURCE_PATH ? '/Applications/Atom.app/Contents/Resources/app'
getNodeUrl: ->
process.env.ATOM_NODE_URL ? 'https://gh-contractor-zcbenz.s3.a... | Update to new root resource path | Update to new root resource path
| CoffeeScript | mit | VandeurenGlenn/apm,pusateri/apm,bronson/apm,gutsy/apm,fscherwi/apm,pusateri/apm,Nikpolik/apm,ethanp/apm,fscherwi/apm,fscherwi/apm,bcoe/apm,pusateri/apm,pusateri/apm,pusateri/apm,jlord/apm,AtaraxiaEta/apm,gutsy/apm,atom/apm,AtaraxiaEta/apm,AtaraxiaEta/apm,bronson/apm,bcoe/apm,Nikpolik/apm,AtaraxiaEta/apm,ethanp/apm,etha... |
25befa736831301626e31000cc64d7053f844a6b | spec/compile-cache-spec.coffee | spec/compile-cache-spec.coffee | path = require 'path'
CSON = require 'season'
CoffeeCache = require 'coffee-cash'
babel = require '../src/babel'
CompileCache = require '../src/compile-cache'
describe "Compile Cache", ->
describe ".addPathToCache(filePath)", ->
it "adds the path to the correct CSON, CoffeeScript, or babel cache", ->
spyO... | path = require 'path'
CSON = require 'season'
CoffeeCache = require 'coffee-cash'
babel = require '../src/babel'
CompileCache = require '../src/compile-cache'
describe "Compile Cache", ->
describe ".addPathToCache(filePath)", ->
it "adds the path to the correct CSON, CoffeeScript, or babel cache", ->
spyO... | Update fixture path in compile cache spec | Update fixture path in compile cache spec
| CoffeeScript | mit | yomybaby/atom,cyzn/atom,kc8wxm/atom,Austen-G/BlockBuilder,basarat/atom,charleswhchan/atom,ralphtheninja/atom,alexandergmann/atom,seedtigo/atom,Huaraz2/atom,kc8wxm/atom,me-benni/atom,RuiDGoncalves/atom,dannyflax/atom,bcoe/atom,sekcheong/atom,Mokolea/atom,rxkit/atom,fedorov/atom,palita01/atom,jjz/atom,jtrose2/atom,chengk... |
b69eca4a029b2555ea615180a94dd4a5a62760e6 | app/assets/javascripts/models/lite_paper.js.coffee | app/assets/javascripts/models/lite_paper.js.coffee | a = DS.attr
ETahi.LitePaper = DS.Model.extend
paper: DS.belongsTo('paper')
flow: DS.belongsTo('flow')
title: a('string')
shortTitle: a('string')
submitted: a('boolean')
roles: a()
displayTitle: (->
@get('title') || @get('shortTitle')
).property 'title', 'shortTitle'
roleList: (->
@get('role... | a = DS.attr
ETahi.LitePaper = DS.Model.extend
paper: DS.belongsTo('paper')
flow: DS.belongsTo('flow')
title: a('string')
shortTitle: a('string')
submitted: a('boolean')
roles: a()
displayTitle: (->
@get('title') || @get('shortTitle')
).property 'title', 'shortTitle'
roleList: (->
@get('role... | Sort the roles uniformally on the dashboard | Sort the roles uniformally on the dashboard | CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
7589d02b064faf80b3aff240ac3fc72a8604f6db | test/front.coffee | test/front.coffee | Front = require('../lib/front/front')
WebSocket = require('ws')
WebSocketServer = require('ws').Server
describe 'Front', ->
beforeEach ->
@front = new Front
it 'should initialize', ->
@front.start
it 'should start a WSS', ->
stub = new WebSocketServer({port: 3021, host: "0.0.0.0"});
stub.on 'co... | Front = require('../lib/front/front')
WebSocket = require('ws')
WebSocketServer = require('ws').Server
logger.set_levels 'development'
describe 'Front', ->
beforeEach ->
@front = new Front
it 'should initialize', ->
@front.start
it 'should start a WSS', ->
stub = new WebSocketServer({port: 3021, ho... | Fix the test to use the correct websocket port | Fix the test to use the correct websocket port
| CoffeeScript | mit | buttercoin/buttercoin,buttercoin/buttercoin-engine,bankonme/buttercoin,buttercoin/buttercoin,bankonme/buttercoin,eXcomm/buttercoin,eXcomm/buttercoin |
cab34b5ab4b7e1538d013660fd59b77077c50517 | core/app/backbone/views/evidence/evidence_bottom_view.coffee | core/app/backbone/views/evidence/evidence_bottom_view.coffee | class window.NDPFactRelationOrCommentBottomView extends Backbone.Marionette.Layout
className: 'ndp-evidenceish-bottom'
template: 'facts/evidence_bottom'
triggers:
'click .js-sub-comments-link': 'toggleSubCommentsList'
ui:
subCommentsLink: '.js-sub-comments-link'
subCommentsLinkContainer: ... | class window.NDPFactRelationOrCommentBottomView extends Backbone.Marionette.Layout
className: 'ndp-evidenceish-bottom'
template: 'facts/evidence_bottom'
triggers:
'click .js-sub-comments-link': 'toggleSubCommentsList'
ui:
subCommentsLink: '.js-sub-comments-link'
subCommentsLinkContainer: ... | Initialize was not so unnecessary -- used for rendering delete button when creating | Initialize was not so unnecessary -- used for rendering delete button when creating
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core |
46b8e23d2957c6a48ff69c4f913b3cde48c96e23 | app/assets/javascripts/magic_word/validatable_form.js.coffee | app/assets/javascripts/magic_word/validatable_form.js.coffee | class MagicWord.ValidatableForm
constructor: (@$form) ->
@inputs = @_inputs()
@model = @$form.data('validate-model')
@$button = @$form.find('[type=submit]')
@validationRoute = "/#{MagicWord.enginePath}/validations"
@$button.click @validateInputs
@$button.attr('disabl... | class MagicWord.ValidatableForm
constructor: (@$form) ->
@inputs = @_inputs()
@model = @$form.data('validate-model')
@$button = @$form.find('[type=submit]')
@validationRoute = "/#{MagicWord.enginePath}/validations"
@$button.click @validateInputs
@$button.attr('disabl... | Check if anything in response.error has any content | Check if anything in response.error has any content
| CoffeeScript | mit | lumoslabs/comply,lumoslabs/comply,lumoslabs/comply |
bf9932056b06852ee23b492ce3787ee6a3ed425a | core/app/backbone/collections/ndp_evidence_collection.coffee | core/app/backbone/collections/ndp_evidence_collection.coffee | class window.NDPEvidenceCollection extends Backbone.Collection
initialize: (models, options) ->
@on 'change', @sort, @
@fact = options.fact
constructor: (models, options) ->
super
unless models and models.length > 0
@reset [
new OpinionatersEvidence({type: 'believe' }, fact: @fact),... | class window.NDPEvidenceCollection extends Backbone.Collection
initialize: (models, options) ->
@on 'change', @sort, @
@fact = options.fact
constructor: (models, options) ->
super
unless models and models.length > 0
@reset [
new OpinionatersEvidence {type: 'believe'}, collection: t... | Revert "Revert "Indeed don't pass the fact but the collection"" | Revert "Revert "Indeed don't pass the fact but the collection""
This reverts commit f5ac7bf37b645ff51724a29d0b01d04fc09e45de.
| CoffeeScript | mit | daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core |
e19a8d48403513b786268bd9d7edc8bdb4825e8a | bots/libs/HexBot.coffee | bots/libs/HexBot.coffee | ### Common variables and functions for bots ###
#require = patchRequire(global.require)
#utils = require('utils')
exports.userAgent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.40 Safari/537.31'
#argumentData = [{name:'argName1',default:'optionalArg'}, {name:'argName2',c... | ### Common variables and functions for bots ###
#require = patchRequire(global.require)
#utils = require('utils')
exports.userAgent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.5 Safari/537.36'
#argumentData = [{name:'argName1',default:'optionalArg'}, {name:'argName2',cs... | Update useragent and reword argument error message | Update useragent and reword argument error message
| CoffeeScript | bsd-3-clause | hexid/HexBot,hexid/HexBot,hexid/HexBot |
f8275340c7b75796c93ad7b99c18818b8d3a5d6e | src/desktop/apps/galleries_institutions/queries/partner_categories_query.coffee | src/desktop/apps/galleries_institutions/queries/partner_categories_query.coffee | module.exports =
"""
query GalleriesInstitutionsPartnerCategoriesQuery($category_type: CategoryType, $type: [PartnerClassification]){
partner_categories(category_type: $category_type, size: 30, internal: false){
name
id
primary: partners(eligible_for_listing: true, eligible_for_primary_bucket... | module.exports =
"""
query GalleriesInstitutionsPartnerCategoriesQuery($category_type: CategoryType, $type: [PartnerClassification]){
partner_categories(category_type: $category_type, size: 50, internal: false){
name
id
primary: partners(eligible_for_listing: true, eligible_for_primary_bucket... | Change partner_category query page size to 50 | Change partner_category query page size to 50
Was reposted in #incidents https://artsy.slack.com/archives/C9RK0BLEP/p1567172226006600
After investigation noticed recently new categories were added so had to increase the query page size
| CoffeeScript | mit | joeyAghion/force,damassi/force,erikdstock/force,artsy/force,anandaroop/force,artsy/force,izakp/force,oxaudo/force,joeyAghion/force,yuki24/force,cavvia/force-1,eessex/force,artsy/force,izakp/force,oxaudo/force,erikdstock/force,artsy/force,joeyAghion/force,yuki24/force,oxaudo/force,damassi/force,erikdstock/force,eessex/f... |
308b7b3c5d633d7d8a77fbe4c96297117159150d | js/application.coffee | js/application.coffee | class App
Routers: {}
Models: {}
Collections: {}
Views: {}
init: ->
window.flight = new Flight()
new @Routers.AppRouter
Backbone.history.start()
@Collections.Activities.fetch()
window.app = new App
`
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, '');
};
Str... | class App
Routers: {}
Models: {}
Collections: {}
Views: {}
init: ->
window.flight = new Flight()
new @Routers.AppRouter
Backbone.history.start()
@Collections.Activities.fetch()
$('#menu-button').click ->
flight.slideOutMenu()
window.app = new App
`
String.prototype.trim = fu... | Call slide out menu on button click. | Call slide out menu on button click.
| CoffeeScript | mit | zestia/glide |
6801513f46a46e06914e241cae771a8d254deda1 | _includes/coffeescript/scripts.coffee | _includes/coffeescript/scripts.coffee | $ ->
loadInterview = (name, url) ->
document.title = "Advice by #{name} with Mig Reyes on Humble Pied."
$('#content').load(url + ' #guest')
window.history.pushState('guest', '', url)
$(window).bind "keydown", (event) ->
$previous = $('[data-previous-guest]')
$next = $('[data-next-guest]')
... | $ ->
loadInterview = (name, url) ->
document.title = "Advice by #{name} with Mig Reyes on Humble Pied."
$('#content').load(url + ' #guest')
window.history.pushState('guest', '', url)
$(window).bind "keydown", (event) ->
$previous = $('[data-previous-guest]')
$next = $('[data-next-guest]')
... | Update title if using back button. | Update title if using back button.
| CoffeeScript | mit | migreyes/humblepied,migreyes/humblepied |
c70fbc6acef01c76431b2ca18dca92d1198888b6 | app/assets/javascripts/hyper_admin/angularjs/controllers/form_ctrl.js.coffee | app/assets/javascripts/hyper_admin/angularjs/controllers/form_ctrl.js.coffee | angular.module("hyperadmin")
.controller "FormCtrl", ($scope, $state, Restangular, Flash) ->
@resource = { }
mode = $state.current.data.mode
if mode == "new"
method = "post"
target = "admin/#{$scope.resourceClass.plural}"
successMessage = "#{$scope.resourceClass.singular_human} created ... | angular.module("hyperadmin")
.controller "FormCtrl", ($scope, $state, Restangular, Flash) ->
@resource = { }
mode = $state.current.data.mode
if mode == "new"
method = "post"
target = "admin/#{$scope.resourceClass.plural}"
successMessage = "#{$scope.resourceClass.singular_human} created ... | Remove id, created_at and updated_at from forms | Remove id, created_at and updated_at from forms
| CoffeeScript | mit | hyperoslo/hyper_admin,hyperoslo/hyper_admin,hyperoslo/hyper_admin |
e058d7bf6fb4a4829c532dae44ece1f1cf7996e4 | src/scripts/modules/media/title/title.coffee | src/scripts/modules/media/title/title.coffee | define (require) ->
$ = require('jquery')
_ = require('underscore')
BaseView = require('cs!helpers/backbone/views/base')
MailPopoverView = require('cs!./popovers/mail/mail')
template = require('hbs!./title-template')
require('less!./title')
return class MediaTitleView extends BaseView
template: templ... | define (require) ->
$ = require('jquery')
_ = require('underscore')
Backbone = require('backbone')
BaseView = require('cs!helpers/backbone/views/base')
MailPopoverView = require('cs!./popovers/mail/mail')
template = require('hbs!./title-template')
require('less!./title')
return class MediaTitleView ext... | Use backbone to determine url fragments | Use backbone to determine url fragments
| CoffeeScript | agpl-3.0 | Connexions/webview,dak/webview,Connexions/webview,dak/webview,carolinelane10/webview,dak/webview,katalysteducation/webview,Connexions/webview,katalysteducation/webview,Connexions/webview,katalysteducation/webview,katalysteducation/webview |
7a5e31cb852347361c5505296bc9ed8437e69ed7 | scripts/testing.coffee | scripts/testing.coffee | # Just a test script for testing custom commands
#
# Command(s):
# hubot ding — outputs test response
module.exports = (robot) ->
robot.respond /ding$/i, (msg) ->
if robot.auth.hasRole(msg.envelope.user, ['admin'])
msg.send "DONG!"
else
msg.send "Sorry #{msg.envelope.user.... | # Just a test script for testing custom commands
#
# Command(s):
# hubot ding — outputs test response
module.exports = (robot) ->
robot.respond /ding$/i, (msg) ->
if robot.auth.hasRole(msg.envelope.user, ['admin'])
msg.send "DONG!"
return
| Remove response for non auth. | Remove response for non auth.
| CoffeeScript | mit | davemcnally/awebot |
225e052366ac182cc4c053d23714223c897bfd79 | lib/applyDependencies.coffee | lib/applyDependencies.coffee | applyDependencies = (services, resolver) ->
wrappedServices = {}
for serviceName, serviceDef of services
dependencies = {}
# we will create keys for any declared dependency types
# and have them map to resolved dependencies
for dependencyType of serviceDef.dependencies
# initialize sub-ob... | applyDependencies = (services, resolver) ->
wrappedServices = {}
for serviceName, serviceDef of services
dependencies = {}
# we will create keys for any declared dependency types
# and have them map to resolved dependencies
for dependencyType of serviceDef.dependencies
# initialize sub-ob... | Remove unnecessary manual copying, add comments | Remove unnecessary manual copying, add comments
| CoffeeScript | mit | TorchlightSoftware/law |
a043f28d9baa7b555b6473b646cfd9b208c42a39 | services/web/public/coffee/ide/references-search/ReferencesSearchManager.coffee | services/web/public/coffee/ide/references-search/ReferencesSearchManager.coffee | define [
], () ->
class ReferencesSearchManager
constructor: (@ide, @$scope) ->
@$scope.$root._references = @state = keys: []
@$scope.$on 'document:closed', (e, doc) =>
if doc.doc_id
entity = @ide.fileTreeManager.findEntityById doc.doc_id
if entity?.name?.match /.*\.bib$/
@$scope.$emit '... | define [
], () ->
class ReferencesSearchManager
constructor: (@ide, @$scope) ->
@$scope.$root._references = @state = keys: []
@$scope.$on 'document:closed', (e, doc) =>
if doc.doc_id
entity = @ide.fileTreeManager.findEntityById doc.doc_id
if entity?.name?.match /.*\.bib$/
@indexReference... | Remove extra event emission. add debug print. | Remove extra event emission. add debug print.
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
7b15e2922f4d6e1067c3eb7e2da14e65d4c4e236 | src/cli.coffee | src/cli.coffee | fs = require 'fs'
path = require 'path'
spark = require 'commander'
commands = require './commands'
# Load our options and parse the command
spark.option('--location <path>', 'choose a file location [~/.sparkfile]', String, '~/.sparkfile')
spark.version require('../package.json').version
spark.command('*')
.de... | fs = require 'fs'
path = require 'path'
spark = require 'commander'
commands = require './commands'
# Load our options and parse the command
spark.option('--location <path>', 'choose a file location [~/.sparkfile]', String, '~/.sparkfile')
spark.version require('../package.json').version
spark.command('*')
.de... | Bring back help output by default | Bring back help output by default
| CoffeeScript | mit | evansolomon/sparkfile |
e0bfbe6383bd8a824ad86f0b1de2c583bc7f072b | app/assets/javascripts/campo_editor.js.coffee | app/assets/javascripts/campo_editor.js.coffee | $(document).on 'shown.bs.tab', 'a[data-behavior~="preview"]', (e) ->
editor = $(this).closest('.campo-editor')
preview = editor.find('.tab-pane.preview')
textarea = editor.find('textarea')
preview.html('')
preview.css height: textarea.css('height')
$.ajax
url: '/preview'
data: { content: textarea.v... | $(document).on 'show.bs.tab', 'a[data-behavior~="preview"]', (e) ->
editor = $(this).closest('.campo-editor')
preview = editor.find('.tab-pane.preview')
textarea = editor.find('textarea')
preview.html('')
preview.css height: textarea.css('height')
$.ajax
url: '/preview'
data: { content: textarea.va... | Fix campo eidtor preview flash | Fix campo eidtor preview flash
| CoffeeScript | mit | fahchen/tsemple,xzh2103072/railsgirlschina,alex-marmot/railsgirlschina,w-zengtao/railsgirlschina,chloerei/campo,JuanitoFatas/campo,lite/wechat-dev,bxyb214/book,lite/wechat-dev,ZhaoZijie/morning,bxyb214/book,iec-uestc/tsemple,alex-marmot/campo,railsgirls-cn/railsgirlschina,JuanitoFatas/campo,w-zengtao/railsgirlschina,Zh... |
9c55393ef016a2ceb8c786263808ec01489a0010 | test/index.spec.coffee | test/index.spec.coffee | expect = require('chai').expect
fs = require 'fs-extended'
Inotifyr = require '../'
describe 'inotifyr', ->
beforeEach ->
fs.ensureDirSync './test/fixtures'
afterEach ->
fs.deleteDirSync './test/fixtures'
it 'should watch a directory for file add events', (done) ->
watcher = new Inotifyr 'test/fix... | expect = require('chai').expect
fs = require 'fs-extended'
cp = require 'child_process'
{spawn, exec} = require 'child_process'
Inotifyr = require '../'
describe 'inotifyr', ->
beforeEach ->
fs.ensureDirSync './test/fixtures'
afterEach ->
fs.deleteDirSync './test/fixtures'
it 'should watch a directory... | Add test for git clone. | test: Add test for git clone.
| CoffeeScript | mit | Dignifiedquire/node-inotifyr |
cb90ae3504fc300f63f42e0d0070ea7e9eb32692 | lib/main.coffee | lib/main.coffee | {CompositeDisposable} = require 'atom'
module.exports =
config: require './config'
activate: (state) ->
@transpiler ?= new (require './transpiler')
# track any file save events and transpile if babel
@disposable = new CompositeDisposable
@textEditors = {}
@disposable.add atom.project.onDidCha... | {CompositeDisposable} = require 'atom'
INTERFILESAVETIME = 1000
module.exports =
config: require './config'
activate: (state) ->
@transpiler ?= new (require './transpiler')
# track any file save events and transpile if babel
@disposable = new CompositeDisposable
@textEditors = {}
@fileSaveTim... | Allow 'Save All' files to work as well as guarding against multiple transpiles when a text file is working in split screen mode. | Allow 'Save All' files to work as well as guarding against multiple transpiles when a text file is working in split screen mode.
| CoffeeScript | mit | gandm/language-babel |
d43eb6f9c8def4f054abb766382f87e9f6d6a3eb | javascripts/components/Layout.coffee | javascripts/components/Layout.coffee | React = require('react')
Nav = require('components/Nav')
R = React.DOM
require('main.scss')
module.exports = React.createClass
render: ->
R.div {className: 'pure-g'},
R.nav {className: 'pure-u-1'},
new Nav(null),
@props.view
| React = require('react')
Nav = require('components/Nav')
R = React.DOM
require('main.scss')
module.exports = React.createClass
render: ->
R.div null,
R.nav null,
new Nav()
R.div {className: 'col-md-12'},
@props.view
| Change from pure to bootstrap | Change from pure to bootstrap
| CoffeeScript | mit | UberMouse/Mizuchi-frontend |
392bb5b59d66006041fa138261da7089e4ca3e24 | src/app/api/models/teaching-period.coffee | src/app/api/models/teaching-period.coffee | angular.module("doubtfire.api.models.teaching-period", [])
.factory("TeachingPeriod", (resourcePlus, api, currentUser, alertService) ->
resource = resourcePlus "/teaching_periods/:id", { id: "@id"}
data = { }
data.loadedPeriods = []
TeachingPeriod = {
query: () ->
if data.loadedPeriods.length == 0
... | angular.module("doubtfire.api.models.teaching-period", [])
.factory("TeachingPeriod", (resourcePlus, api, currentUser, alertService) ->
resource = resourcePlus "/teaching_periods/:id", { id: "@id"}
data = { }
data.loadedPeriods = []
TeachingPeriod = {
query: () ->
if data.loadedPeriods.length == 0
... | Add create and update method | NEW: Add create and update method
| CoffeeScript | agpl-3.0 | doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web |
d5a2a857886729005bc0b48a11123c582875f6f4 | app/js/jail_iframe/classes/control_iframe.coffee | 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/js-library,Factlink/js-library,Factlink/js-library |
4a76f6f244830b6a040aa86189e7be05c5227fd3 | parts/bottom-alert.cjsx | parts/bottom-alert.cjsx | {Panel} = ReactBootstrap
module.exports = React.createClass
render: ->
<div>
{
if @props.getShip? or @props.getItem?
<Panel>
{"#{@props.getShip.api_ship_type} 「#{@props.getShip.api_ship_name}」 #{@props.joinFleet}"}
</Panel>
else if @props.formationNum != 0
... | {Panel} = ReactBootstrap
module.exports = React.createClass
render: ->
<div>
{
if @props.getShip? or @props.getItem?
prepend = ""
if @props.getItem?.api_useitem_id is 68
prepend = "摸鱼成功! "
<Panel>
{prepend + "#{@props.getShip.api_ship_type} 「#{@p... | Add prophet get use item (2) | Add prophet get use item (2)
| CoffeeScript | mit | poooi/plugin-prophet |
20401155dba2e5fd6d54be1fb7f8d82c889d944b | spec/javascripts/role_jquery_spec.coffee | spec/javascripts/role_jquery_spec.coffee | describe 'jQuery Role', ->
beforeEach ->
loadFixtures('base.html')
it 'should find elemenets by role using @ alias', ->
expect(
$('@some_role').get(0)
).toBe(
$('[role="some_role"]').get(0)
)
it 'should allow to use multiply roles', ->
expect(
$('@role_one').get(0)
).t... | describe 'jQuery Role', ->
beforeEach ->
loadFixtures('base.html')
it 'should find elemenets by role using @ alias', ->
expect(
$('@some_role').get(0)
).toBe(
$('[role="some_role"]').get(0)
)
it 'should allow to use multiply roles', ->
expect(
$('@role_one').get(0)
).t... | Add more expectations for multiple roles | Add more expectations for multiple roles
| CoffeeScript | mit | gazay/role-haml,gazay/role-haml |
212fa2b3280b91a8959d9a481211773f5f76a67a | assets/javascripts/helpers.js.coffee | assets/javascripts/helpers.js.coffee | Em.Handlebars.helper 'relativeTime', (value, options)->
time = moment(value)
difference = moment().unix() - time.unix()
if difference > 31536000
time.format("MMM D, YYYY")
else if difference > 86400
time.format("MMM D")
else
time.fromNow(true)
Em.Handlebars.helper 'readableTime', (value, options... | Em.Handlebars.helper 'readableTime', (value, options)->
time = moment(value)
difference = moment().unix() - time.unix()
if difference > 31536000
time.format("h:mma, D MMM YYYY")
else
time.format("h:mma, D MMM")
| Remove relativeTime helper and change format of display time | Remove relativeTime helper and change format of display time
| CoffeeScript | mit | sashafklein/bloc-mogo,sashafklein/bloc-mogo,louishawkins/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat,HashNuke/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,HashNuke/mogo-chat,di-stars/mogo-chat,louishawkins/mogo-chat,di-stars/mogo-chat |
6425ab3d64711bec7eb2749e096eb37321b9b95b | app/assets/javascripts/jobs_list/views/jobs_list_view.js.coffee | app/assets/javascripts/jobs_list/views/jobs_list_view.js.coffee | window.JobsListView = class JobsListView extends Backbone.View
events:
'click p.clear-all a': 'clearAll'
initialize: ->
@model.bind 'add', => this.render()
@model.bind 'remove', => this.render()
$(@el).append('<h2>Jobs List</h2>')
@list = $('<ul class="jobs-list" />').appendTo(@el)
$(@e... | window.JobsListView = class JobsListView extends Backbone.View
events:
'click p.clear-all a': 'clearAll'
initialize: ->
@model.bind 'add', => this.render()
@model.bind 'remove', => this.render()
$(@el).append('<h2>Jobs List</h2>')
@list = $('<ul class="jobs-list" />').appendTo(@el)
$(@e... | Increase the height of the job list. | Increase the height of the job list.
| CoffeeScript | mit | gds-attic/jobs,gds-attic/jobs,gds-attic/jobs |
75be5753160c47ef7062aa23d1e47215b8a607a5 | app/assets/javascripts/bikeways.js.coffee | app/assets/javascripts/bikeways.js.coffee | # This file uses the Garber-Irish method for allowing "per-page Javascript."
# I'm using the `gistyle` gem to handle the actual implementation of the pattern.
APP.init = ->
console.log "application"
APP.segments =
init: ->
$ ->
console.log "segments (controller)"
index: ->
$ ->
console.log ... | # This file uses the Garber-Irish method for allowing "per-page Javascript."
# I'm using the `gistyle` gem to handle the actual implementation of the pattern.
APP.init = ->
console.log "application"
APP.segments =
init: ->
$ ->
console.log "segments (controller)"
index: ->
$ ->
console.log ... | Change map to TERRAIN. Don't save datatables state. | Change map to TERRAIN. Don't save datatables state.
| CoffeeScript | mit | jbinto/bikeways,jbinto/bikeways |
b189837f511396c1f901fe5b2d186a5f363888ed | app/src/base/navigation_controller.coffee | app/src/base/navigation_controller.coffee | class @NavigationController extends @ViewController
viewControllers: []
childViewControllerContentId: 'navigation_controller_content'
push: (viewController) ->
if @topViewController()?
@topViewController().onDetach()
@topViewController().parentViewController = undefined
@viewControllers.push... | class @NavigationController extends @ViewController
_historyLength: 1
viewControllers: []
childViewControllerContentId: 'navigation_controller_content'
push: (viewController) ->
if @topViewController()?
@topViewController().onDetach()
@topViewController().parentViewController = undefined
i... | Update navigation controller stack history management | Update navigation controller stack history management
| CoffeeScript | mit | LedgerHQ/ledger-wallet-chrome,Morveus/ledger-wallet-doge-chrome,Morveus/ledger-wallet-doge-chrome,LedgerHQ/ledger-wallet-chrome |
36a83dca92680a71281fcad121ce5332c7263e3a | app/src/utils/storage/chrome_store.coffee | app/src/utils/storage/chrome_store.coffee | getChromeVersion = -> getChromeVersion.version ||= +navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2]
# A store able to keep persistently data with the chrome storage API
class @ledger.storage.ChromeStore extends ledger.storage.Store
# @see ledger.storage.Store#_raw_get
_raw_get: (keys, cb) ->
try
... | getChromeVersion = -> getChromeVersion.version ||= +navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2]
# A store able to keep persistently data with the chrome storage API
class @ledger.storage.ChromeStore extends ledger.storage.Store
# @see ledger.storage.Store#_raw_get
_raw_get: (keys, cb) ->
try
... | Fix remove callback for Chrome 43 | Fix remove callback for Chrome 43
| CoffeeScript | mit | LedgerHQ/ledger-wallet-chrome,LedgerHQ/ledger-wallet-chrome |
47950cf16a857cefcf0dde86e9696640fba5e7fc | src/coffee/game/enums.coffee | src/coffee/game/enums.coffee | angular.module 'gameDefinition.enums', []
.factory 'enums', () ->
origins:
illusionist: 'an illusionist'
hallucinist: 'a hallucinist'
hypnotist: 'a hypnotist'
leads:
none: undefined
jackie: 'Jackie'
employer: 'KB&S'
cop: 'Officer Dentley'
student: 'Ms. Denotto'
| angular.module 'gameDefinition.enums', []
.factory 'enums', () ->
origins:
illusionist: 'an illusionist'
hallucinist: 'a hallucinist'
hypnotist: 'a hypnotist'
leads:
none: undefined
jackie: 'Jackie'
employer: 'KB&S'
cop: 'Officer Dentley'
student: 'Ms. Denotto'... | Add Roxy Lead to Enums | Add Roxy Lead to Enums
| CoffeeScript | unlicense | arashikou/exper3-2015 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.