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 |
|---|---|---|---|---|---|---|---|---|---|
ccb482745a3a40779ce865b0e77664c3351acfdf | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
# =============================== Load plugins =============================== #
grunt.loadNpmTasks 'grunt-eslint'
grunt.loadNpmTasks 'grunt-travis-lint'
grunt.loadNpmTasks 'grunt-jsonlint'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-mdlint'
# ===============... | module.exports = (grunt) ->
# =============================== Load plugins =============================== #
grunt.loadNpmTasks 'grunt-eslint'
grunt.loadNpmTasks 'grunt-travis-lint'
grunt.loadNpmTasks 'grunt-jsonlint'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-mdlint'
# ===============... | Fix mdlint VS NodeJS >= 5 for Travis | Fix mdlint VS NodeJS >= 5 for Travis
| CoffeeScript | mit | llaumgui/lesshint-lint-xml-reporter |
54d302604dbcc46fd74edcbce6445df09fceea6d | app/assets/javascripts/butler.js.coffee | app/assets/javascripts/butler.js.coffee | #= require jquery
#= require jquery_ujs
#= require jquery-fileupload/basic
#= require jquery-fileupload/vendor/tmpl
#= require attachments
#= require dropzone_effects
#= require bootstrap-sprockets
#= require moment
#= require moment/de
#= require bootstrap-datetimepicker
#= require marked.min
# http://github.com/t... | #= require jquery
#= require jquery_ujs
#= require jquery-fileupload/basic
#= require jquery-fileupload/vendor/tmpl
#= require attachments
#= require dropzone_effects
#= require bootstrap-sprockets
#= require moment
#= require moment/de
#= require bootstrap-datetimepicker
#= require marked.min
# http://github.com/t... | Fix datetimepicker call after plugin update | Fix datetimepicker call after plugin update
| CoffeeScript | mit | leewaa/butler,basiszwo/butler,ninjaconcept/butler,basiszwo/butler,leewaa/butler,leewaa/butler,basiszwo/butler,ninjaconcept/butler,ninjaconcept/butler |
42e0619dfa8bcf5d2761392c3dc189ffdb9b78dc | vendor/assets/javascripts/progressive_render.js.coffee | vendor/assets/javascripts/progressive_render.js.coffee | # TODO: API for load missing content or binding to page events
$ ->
setup_listener()
load_missing_content()
setup_listener = ->
$(document).on 'progressive_render:end', load_missing_content
$(document).on 'ajax:end', load_missing_content
$(document).on 'turbolinks:load', load_missing_content if window.Turbol... | # TODO: API for load missing content or binding to page events
$ ->
setup_listener()
load_missing_content()
setup_listener = ->
$(document).on 'progressive_render:end', load_missing_content
$(document).on 'ajax:end', load_missing_content
$(document).on 'turbolinks:load', load_missing_content if window.Turbol... | Modify the DOM instead of setting the 'data' prop via jQuery to mark a section as 'progressive-loaded' | Modify the DOM instead of setting the 'data' prop via jQuery to mark a section as 'progressive-loaded'
Defect:
This was exposed as an issue by another bug which was loading the entire page on partial load and re-loading the javascript.
The result was an infinite loop of reloading the content.
Fix:
Modifying the DOM o... | CoffeeScript | mit | johnsonj/progressive_load,johnsonj/progressive_render,johnsonj/progressive_load,johnsonj/progressive_render,johnsonj/progressive_render,johnsonj/progressive_render,johnsonj/progressive_load,johnsonj/progressive_load |
f0d54850119202f73da0059b909f708b11214141 | core/app/backbone/views/interactors_view.coffee | core/app/backbone/views/interactors_view.coffee | class InteractorEmptyView extends Backbone.Marionette.ItemView
tagName: 'span'
template: "fact_relations/interactor_empty"
class InteractorView extends Backbone.Marionette.Layout
tagName: 'span'
className: 'separator-list-item'
template: "fact_relations/interactor"
class window.InteractorsView extends Backb... | class InteractorEmptyView extends Backbone.Marionette.ItemView
tagName: 'span'
template: "fact_relations/interactor_empty"
class InteractorView extends Backbone.Marionette.Layout
tagName: 'span'
className: 'separator-list-item'
template: "fact_relations/interactor"
class window.InteractorsView extends Backb... | Use singular type in InteractorsView | Use singular type in InteractorsView
| CoffeeScript | mit | daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
3230ec7c2fff1df950eb9bb4614d74a3a4bdc0b8 | client/src/views/report_edit_visualisation_view.coffee | client/src/views/report_edit_visualisation_view.coffee | window.Backbone ||= {}
window.Backbone.Views ||= {}
class Backbone.Views.ReportEditVisualisationView extends Backbone.Diorama.NestingView
className: 'modal report-edit-visualisation'
template: Handlebars.templates['report_edit_visualisation.hbs']
events:
"click .close": "close"
"click .save": "save"
... | window.Backbone ||= {}
window.Backbone.Views ||= {}
class Backbone.Views.ReportEditVisualisationView extends Backbone.Diorama.NestingView
className: 'modal report-edit-visualisation'
template: Handlebars.templates['report_edit_visualisation.hbs']
events:
"click .close": "closeModal"
"click .save": "save... | Revert removal of closeModal function, _events get cleared before onClose | Revert removal of closeModal function, _events get cleared before onClose
| CoffeeScript | bsd-3-clause | unepwcmc/NRT,unepwcmc/NRT |
2965b31504f9e268429b2cef2bf6137ab1acd6d5 | app/assets/javascripts/advanced_search.js.coffee | app/assets/javascripts/advanced_search.js.coffee | App.AdvancedSearch =
advanced_search_terms: ->
$('#js-advanced-search').data('advanced-search-terms')
toggle_form: (event) ->
event.preventDefault()
$('#js-advanced-search').slideToggle()
toggle_date_options: ->
if $('#js-advanced-search-date-min').val() == 'custom'
$('#js-custom-date').s... | App.AdvancedSearch =
advanced_search_terms: ->
$('#js-advanced-search').data('advanced-search-terms')
toggle_form: (event) ->
event.preventDefault()
$('#js-advanced-search').slideToggle()
toggle_date_options: ->
if $('#js-advanced-search-date-min').val() == 'custom'
$('#js-custom-date').s... | Remove unnecesary space on coffeescript file | Remove unnecesary space on coffeescript file
| CoffeeScript | agpl-3.0 | lalibertad/consul,votedevin/consul,CDJ11/CDJ,AyuntamientoPuertoReal/decidePuertoReal,AyuntamientoMadrid/participacion,consul/consul,deivid-rodriguez/participacion,deivid-rodriguez/participacion,deivid-rodriguez/participacion,AyuntamientoMadrid/consul,amiedes/consul,artofhuman/consul,lalibertad/consul,CDJ11/CDJ,votedevi... |
5655ed1490bd3ba849df383760faaa6521988abf | app/assets/javascripts/views/paper_index_view.js.coffee | app/assets/javascripts/views/paper_index_view.js.coffee | ETahi.PaperIndexView = Ember.View.extend
setBackgroundColor:(->
$('html').addClass('matte')
).on('didInsertElement')
resetBackgroundColor:(->
$('html').removeClass('matte')
).on('willDestroyElement')
| ETahi.PaperIndexView = Ember.View.extend
setBackgroundColor:(->
$('html').addClass('matte')
).on('didInsertElement')
resetBackgroundColor:(->
$('html').removeClass('matte')
).on('willDestroyElement')
setupScrollFixing: (->
$('.control-bar').scrollToFixed()
$('#tahi-container > main > aside >... | Add scrollToFix for content bar in paper show page | Add scrollToFix for content bar in paper show page
[Fixes #69382112]
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
06e25d1d01afe446b833f7a7a6d12ae766432f7d | lib/motions.coffee | lib/motions.coffee | class Motion
constructor: (@editor) ->
isComplete: -> true
class MoveLeft extends Motion
execute: ->
{column, row} = @editor.getCursorScreenPosition()
@editor.moveCursorLeft() if column > 0
select: ->
{column, row} = @editor.getCursorScreenPosition()
if column > 0
@editor.selectLeft()
... | class Motion
constructor: (@editor) ->
isComplete: -> true
class MoveLeft extends Motion
execute: ->
{column, row} = @editor.getCursorScreenPosition()
@editor.moveCursorLeft() if column > 0
select: ->
{column, row} = @editor.getCursorScreenPosition()
if column > 0
@editor.selectLeft()
... | Fix the down motion to stop on last line | Fix the down motion to stop on last line
| CoffeeScript | mit | t9md/atom-vim-mode-plus,bronson/vim-mode-next,naorunaoru/vim-mode-next |
9a15ccedc34aa09dc3973a2d34992e23c89eb2e1 | client/skr/models/Location.coffee | client/skr/models/Location.coffee | SHARED_DATA = null
SHARED_COLLECTION = null
class Skr.Models.Location extends Skr.Models.Base
cacheDuration: [1, 'day']
mixins: [ 'FileSupport', 'HasCodeField' ]
props:
id: {type:"integer"}
code: {type:"code"}
name: {type:"string"}
address_id:... | SHARED_DATA = null
SHARED_COLLECTION = null
class Skr.Models.Location extends Skr.Models.Base
cacheDuration: [1, 'day']
mixins: [ 'FileSupport', 'HasCodeField' ]
props:
id: {type:"integer"}
code: {type:"code"}
name: {type:"string"}
address_id:... | Adjust logo property on change | Adjust logo property on change
Since the onchange does slightly wrong thing
| CoffeeScript | agpl-3.0 | argosity/stockor,argosity/stockor,argosity/stockor,argosity/stockor |
0bacbcfc4cd6ac548df7592025a7cc2bb7bfef19 | client/src/scripts/geyser.global.coffee | client/src/scripts/geyser.global.coffee | geyser = do ->
parse = (spec) ->
dotIndex = spec.indexOf '.'
switch dotIndex
when -1
tag: spec
when 0
tag: 'div'
classes: split (spec.substr 1), '.'
else
tokens = split spec, '.'
tag: tokens.shift()
classes: tokens
generate = (arg) ->
co... | geyser = do ->
_cache = {}
parse = (spec) ->
dotIndex = spec.indexOf '.'
switch dotIndex
when -1
tag: spec
when 0
tag: 'div'
classes: split (spec.substr 1), '.'
else
tokens = split spec, '.'
tag: tokens.shift()
classes: tokens
getEleme... | Speed up geyser by caching known element types. | Speed up geyser by caching known element types.
[PP-10]
| CoffeeScript | apache-2.0 | h2oai/h2o,elkingtonmcb/h2o-2,rowhit/h2o-2,eg-zhang/h2o-2,vbelakov/h2o,h2oai/h2o-2,100star/h2o,111t8e/h2o-2,100star/h2o,elkingtonmcb/h2o-2,111t8e/h2o-2,h2oai/h2o,eg-zhang/h2o-2,h2oai/h2o,vbelakov/h2o,elkingtonmcb/h2o-2,elkingtonmcb/h2o-2,calvingit21/h2o-2,h2oai/h2o,h2oai/h2o,rowhit/h2o-2,calvingit21/h2o-2,h2oai/h2o,111t... |
acc0c18bc65e02d67889b5ce5be6b577d1d49e67 | internal_packages/thread-list/lib/draft-buttons.cjsx | internal_packages/thread-list/lib/draft-buttons.cjsx | React = require "react/addons"
classNames = require 'classnames'
{RetinaImg} = require 'nylas-component-kit'
{Actions, FocusedContentStore} = require "nylas-exports"
class DraftDeleteButton extends React.Component
@displayName: 'DraftDeleteButton'
@containerRequired: false
@propTypes:
selection: React.PropT... | React = require "react/addons"
classNames = require 'classnames'
{RetinaImg} = require 'nylas-component-kit'
{Actions, FocusedContentStore, DestroyDraftTask} = require "nylas-exports"
class DraftDeleteButton extends React.Component
@displayName: 'DraftDeleteButton'
@containerRequired: false
@propTypes:
sele... | Fix missing import, resolves Sentry 4041 | fix(drafts): Fix missing import, resolves Sentry 4041
| CoffeeScript | mit | nirmit/nylas-mail,simonft/nylas-mail,nylas-mail-lives/nylas-mail,nirmit/nylas-mail,simonft/nylas-mail,simonft/nylas-mail,nirmit/nylas-mail,nylas/nylas-mail,nylas/nylas-mail,nirmit/nylas-mail,nylas/nylas-mail,nylas-mail-lives/nylas-mail,nylas-mail-lives/nylas-mail,simonft/nylas-mail,nirmit/nylas-mail,simonft/nylas-mail,... |
538f0718bb2b5fa2a380340415487daf801e26df | server.coffee | server.coffee | express = require 'express'
bodyParser = require 'body-parser'
errorHandler = require 'errorhandler'
meshbluHealthcheck = require 'express-meshblu-healthcheck'
morgan = require 'morgan'
MessagesController = require './src/controllers/messages-controller'
messagesController = new Me... | bodyParser = require 'body-parser'
errorHandler = require 'errorhandler'
express = require 'express'
meshbluHealthcheck = require 'express-meshblu-healthcheck'
morgan = require 'morgan'
AuthenticateController = require './src/controllers/authenticate-controller'
MessagesController ... | Add authentication controller to routes | Add authentication controller to routes
| CoffeeScript | mit | octoblu/meshblu-server-http,octoblu/meshblu-http-server,octoblu/meshblu-http-server,octoblu/meshblu-server-http |
e6307e3f3f7d00b5ab2db29f15577edc5f920862 | bokehjs/test/models/transforms/jitter_transform.coffee | bokehjs/test/models/transforms/jitter_transform.coffee | {expect} = require "chai"
utils = require "../../utils"
{Collections} = utils.require "base"
describe "step_interpolator_transform module", ->
source = {start: 0, end: 10}
target = {start: 20, end: 80}
generate_jitter = ->
Collections("Jitter").create
width: 1
center: 0
distribution: 'uni... | {expect} = require "chai"
utils = require "../../utils"
{Collections} = utils.require "base"
Jitter = utils.require("models/transforms/jitter_transform").Model
describe "step_interpolator_transform module", ->
source = {start: 0, end: 10}
target = {start: 20, end: 80}
generate_jitter = ->
new Jitter({
... | Convert to the newer unit test methodology. | Convert to the newer unit test methodology.
| CoffeeScript | bsd-3-clause | azjps/bokeh,aiguofer/bokeh,rs2/bokeh,clairetang6/bokeh,clairetang6/bokeh,DuCorey/bokeh,philippjfr/bokeh,phobson/bokeh,ericmjl/bokeh,ericmjl/bokeh,rs2/bokeh,philippjfr/bokeh,phobson/bokeh,draperjames/bokeh,draperjames/bokeh,percyfal/bokeh,dennisobrien/bokeh,ptitjano/bokeh,bokeh/bokeh,azjps/bokeh,aiguofer/bokeh,bokeh/bok... |
06f0988028cbe48eda517619e391a11c5cf72c67 | src/packages/fuzzy-finder/lib/fuzzy-finder.coffee | src/packages/fuzzy-finder/lib/fuzzy-finder.coffee | _ = require 'underscore'
module.exports =
projectPaths: null
fuzzyFinderView: null
loadPathsTask: null
activate: (state) ->
rootView.command 'fuzzy-finder:toggle-file-finder', =>
@createView().toggleFileFinder()
rootView.command 'fuzzy-finder:toggle-buffer-finder', =>
@createView().toggleB... | _ = require 'underscore'
module.exports =
projectPaths: null
fuzzyFinderView: null
loadPathsTask: null
activate: (state) ->
rootView.command 'fuzzy-finder:toggle-file-finder', =>
@createView().toggleFileFinder()
rootView.command 'fuzzy-finder:toggle-buffer-finder', =>
@createView().toggleB... | Simplify setting lastOpened serialized value | Simplify setting lastOpened serialized value
Iterate over the project's edit sessions instead of
the stored paths in the serialized state.
| CoffeeScript | mit | rsvip/aTom,chengky/atom,YunchengLiao/atom,mertkahyaoglu/atom,toqz/atom,stuartquin/atom,Andrey-Pavlov/atom,hagb4rd/atom,Hasimir/atom,Ingramz/atom,tisu2tisu/atom,Neron-X5/atom,GHackAnonymous/atom,Austen-G/BlockBuilder,rxkit/atom,vinodpanicker/atom,abcP9110/atom,transcranial/atom,atom/atom,lisonma/atom,gisenberg/atom,me-b... |
3b6158fc2229f3b6e4e013e693f5e1dbe66d4fce | atom/config.cson | atom/config.cson | "*":
"atom-beautify":
general:
_analyticsUserId: "016f8b6e-eda5-4d72-acc8-57bcde20fdff"
core:
autoHideMenuBar: true
disabledPackages: [
"exception-reporting"
"linter-perl"
"perltidy"
]
projectHome: "/home/caramelomartins/Projects"
themes: [
"nucleus-dark-ui"
... | "*":
"atom-beautify":
general:
_analyticsUserId: "016f8b6e-eda5-4d72-acc8-57bcde20fdff"
core:
autoHideMenuBar: true
disabledPackages: [
"exception-reporting"
"linter-perl"
"perltidy"
]
projectHome: "/home/caramelomartins/Projects"
themes: [
"nucleus-dark-ui"
... | Change font size in atom | Change font size in atom
| CoffeeScript | mit | caramelomartins/dotfiles,caramelomartins/dotfiles |
56385a798b3741c370ba841ede6278f30e849f42 | services/web/public/coffee/ide/labels/LabelsMaster.coffee | services/web/public/coffee/ide/labels/LabelsMaster.coffee | define [
], () ->
class LabelsMaster
constructor: (@ide, @$scope) ->
@_state = {
documents: {}
}
@$scope.$on 'doc:labels:updated', (e, data) =>
if data.docId and data.labels
@_state.documents[data.docId] = data.labels
@$scope.$on 'entity:deleted', (e, entity) =>
if entity.type == 'doc... | define [
], () ->
class LabelsMaster
constructor: (@ide, @$scope) ->
@_state = {
documents: {}
}
@$scope.$on 'doc:labels:updated', (e, data) =>
if data.docId and data.labels
@_state.documents[data.docId] = data.labels
@$scope.$on 'entity:deleted', (e, entity) =>
if entity.type == 'doc... | Use ide.$http, rather than jquery | Use ide.$http, rather than jquery
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
f1f65089e63fbd17e77e0640a409c44caea2b47f | core/app/backbone/factlink/collection_utils.coffee | core/app/backbone/factlink/collection_utils.coffee | window.collectionDifference = (args...) ->
utils = new CollectionUtils()
utils.difference args...
window.collectionMap = (args...) ->
utils = new CollectionUtils()
utils.map(args...)
class window.CollectionUtils
constructor: (eventAggregator)->
@eventAggregator = eventAggregator || new Backbone.Marionet... | window.collectionDifference = (args...) ->
utils = new CollectionUtils()
utils.difference args...
window.collectionMap = (args...) ->
utils = new CollectionUtils()
utils.map(args...)
class window.CollectionUtils
constructor: (eventAggregator)->
@eventAggregator = eventAggregator || new Backbone.Wreqr.Ev... | Use Backbone.Wreqr.EventAggregator instead of Marionette's version | Use Backbone.Wreqr.EventAggregator instead of Marionette's version
| CoffeeScript | mit | Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
f3433e3fb84ddfb9b6457a347237d59095450502 | settings/language-roff.cson | settings/language-roff.cson | ".text.roff":
editor:
commentStart: ".\\\" "
".source.pic":
editor:
commentStart: "# "
".text.runoff":
editor:
commentStart: ".! "
| ".text.roff":
editor:
commentStart: ".\\\" "
".source.pic":
editor:
commentStart: "# "
increaseIndentPattern: "[\\[({:]\\s*$"
decreaseIndentPattern: "^\\s*[\\])}]"
".text.runoff":
editor:
commentStart: ".! "
| Add indentation settings for Pic | Add indentation settings for Pic
| CoffeeScript | isc | Alhadis/language-roff,Alhadis/language-roff |
7440d8da581cf836ae5fed07fe49e59aceb7b85e | services/web/app/coffee/infrastructure/Features.coffee | services/web/app/coffee/infrastructure/Features.coffee | Settings = require 'settings-sharelatex'
module.exports = Features =
externalAuthenticationSystemUsed: ->
Settings.ldap? or Settings.saml? or Settings.overleaf?.oauth?
hasFeature: (feature) ->
switch feature
when 'registration'
return not Features.externalAuthenticationSystemUsed()
when 'github-sync'
... | Settings = require 'settings-sharelatex'
module.exports = Features =
externalAuthenticationSystemUsed: ->
Settings.ldap? or Settings.saml? or Settings.overleaf?.oauth?
hasFeature: (feature) ->
switch feature
when 'registration'
return not Features.externalAuthenticationSystemUsed()
when 'github-sync'
... | Change to an 'enableGithubSync' setting | Change to an 'enableGithubSync' setting
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
40929447107b5ba840ffbddbc17506a57e6fd0bf | core/app/backbone/views/extended_fact_title_view.coffee | core/app/backbone/views/extended_fact_title_view.coffee | class window.ExtendedFactTitleView extends Backbone.Marionette.Layout
tagName: "header"
id: "single-factlink-header"
template: "facts/_extended_fact_title"
events:
"click .back-to-profile": "navigateToProfile"
regions:
creatorProfileRegion: ".created_by_region"
onRender: ->
@creatorProfileRe... | class window.ExtendedFactTitleView extends Backbone.Marionette.Layout
tagName: "header"
id: "single-factlink-header"
template: "facts/extended_fact_title"
events:
"click .back-to-profile": "navigateToProfile"
regions:
creatorProfileRegion: ".created_by_region"
onRender: ->
@creatorProfileReg... | Use our correct template syntax | Use our correct template syntax
| 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 |
4fb6bced0804a39fc7b287ee61b9f4b992ddfbc1 | desktop/components/auction_reminders/blacklist.coffee | desktop/components/auction_reminders/blacklist.coffee | blacklist = require '../../lib/blacklist.coffee'
{ TEAM_BLOGS } = require('sharify').data
module.exports =
patterns: [
'^/personalize'
'^/artsy-primer'
'^/collect-art'
'^/consign'
'^/consign2'
'^/signup'
'^/login'
'^/user/edit'
'^/sale/.*'
'^/auction/.*'
'^/dev$'
'^/in... | blacklist = require '../../lib/blacklist.coffee'
{ TEAM_BLOGS } = require('sharify').data
module.exports =
patterns: [
'^/personalize'
'^/artsy-primer'
'^/collect-art'
'^/consign'
'^/consign2'
'^/signup'
'^/login'
'^/user/edit'
'^/sale/.*'
'^/auction/.*'
'^/dev$'
'^/in... | Disable auction reminders on the Miami Fair Week page | Disable auction reminders on the Miami Fair Week page
| CoffeeScript | mit | cavvia/force-1,eessex/force,oxaudo/force,izakp/force,damassi/force,anandaroop/force,izakp/force,kanaabe/force,izakp/force,anandaroop/force,erikdstock/force,yuki24/force,eessex/force,erikdstock/force,joeyAghion/force,kanaabe/force,erikdstock/force,artsy/force,joeyAghion/force,joeyAghion/force,anandaroop/force,izakp/forc... |
e2edb185c22d8ac26861634895a5d5770bce6009 | assets/javascripts/views/post/post_reply_form.js.coffee | assets/javascripts/views/post/post_reply_form.js.coffee | TentStatus.Views.PostReplyForm = class PostReplyFormView extends TentStatus.Views.NewPostForm
@template_name: '_post_reply_form'
@view_name: 'post_reply_form'
is_reply_form: true
constructor: ->
super
toggle: =>
if @visible
@hide()
else
@show()
hide: =>
@visible = false
D... | TentStatus.Views.PostReplyForm = class PostReplyFormView extends TentStatus.Views.NewPostForm
@template_name: '_post_reply_form'
@view_name: 'post_reply_form'
is_reply_form: true
constructor: ->
super
toggle: =>
if @visible
@hide()
else
@show()
hide: =>
@visible = false
D... | Add post author to prepopulated reply mentions | Add post author to prepopulated reply mentions
| CoffeeScript | bsd-3-clause | tent/tent-status,tent/tent-status |
5abe54bc6adbb1625be0f72a3662847ce7c74062 | 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
$(document).ready(init)
| 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']],
... | Add italic to html container editor | Add italic to html container editor
| CoffeeScript | apache-2.0 | catima/catima,catima/catima,catima/catima,catima/catima |
f55542e5fd038139042a32dc86aeb643a14e88f5 | src/definitions/skills.coffee | src/definitions/skills.coffee | _ = require 'lodash'
game = require '../game'
log = require '../log'
prompts = game.prompts
direction = require '../direction'
vectorMath = require '../vector-math'
calc = require '../calc'
Skill = class exports.Skill
name: 'skill'
# symbol: 'skill' # allow symbols for skills (to show in list maybe)
class exports... | _ = require 'lodash'
Promise = require 'bluebird'
game = require '../game'
log = require '../log'
prompts = game.prompts
direction = require '../direction'
vectorMath = require '../vector-math'
calc = require '../calc'
Skill = class exports.Skill
name: 'skill'
# symbol: 'skill' # allow symbols for skills (to show ... | Tweak askParams of TentacleWhip skill | Tweak askParams of TentacleWhip skill
| CoffeeScript | mit | raymond-h/krogue |
13583d1940171bf0024594ab4c1a17a3b6d8447e | components/inquiry_questionnaire/views/basic_info.coffee | components/inquiry_questionnaire/views/basic_info.coffee | StepView = require './step.coffee'
Form = require '../../form/index.coffee'
LocationSearch = require '../../location_search/index.coffee'
template = -> require('../templates/basic_info.jade') arguments...
module.exports = class BasicInfo extends StepView
template: -> template arguments...
__events__:
'click b... | StepView = require './step.coffee'
Form = require '../../form/index.coffee'
LocationSearch = require '../../location_search/index.coffee'
template = -> require('../templates/basic_info.jade') arguments...
module.exports = class BasicInfo extends StepView
template: -> template arguments...
__events__:
'click b... | Use hack for valid hash attr | Use hack for valid hash attr
| CoffeeScript | mit | oxaudo/force,mzikherman/force,artsy/force-public,dblock/force,damassi/force,cavvia/force-1,cavvia/force-1,eessex/force,kanaabe/force,erikdstock/force,TribeMedia/force-public,erikdstock/force,kanaabe/force,dblock/force,izakp/force,yuki24/force,cavvia/force-1,mzikherman/force,izakp/force,oxaudo/force,cavvia/force-1,anand... |
922bc3dc58c76ce4dbd82d266b641aee8831f448 | src/loophole.coffee | src/loophole.coffee | vm = require 'vm'
exports.allowUnsafeEval = (fn) ->
previousEval = global.eval
try
global.eval = (source) -> vm.runInThisContext(source)
fn()
finally
global.eval = previousEval
exports.allowUnsafeNewFunction = (fn) ->
previousFunction = global.Function
try
global.Function = exports.Function
... | vm = require 'vm'
exports.allowUnsafeEval = (fn) ->
previousEval = global.eval
try
global.eval = (source) -> vm.runInThisContext(source)
fn()
finally
global.eval = previousEval
exports.allowUnsafeNewFunction = (fn) ->
previousFunction = global.Function
try
global.Function = exports.Function
... | Allow arrays as param lists in | Allow arrays as param lists in
| CoffeeScript | mit | stevemao/loophole |
1ed492fa1aba6fce4a874a5fb5dc3e7d13fba7b2 | karma.conf.coffee | karma.conf.coffee | module.exports = (config) ->
config.set
basePath: ''
frameworks: [ 'jasmine' ]
files: [
'public/vendor/zepto-1.1.4.js'
'public/site.js'
'spec/**/*.coffee'
]
exclude: []
preprocessors: {
'**/*.coffee': ['coffee']
}
reporters: [ 'progress' ]
port: 9876
col... | module.exports = (config) ->
config.set
basePath: ''
frameworks: [ 'jasmine' ]
files: [
'public/vendor/zepto-1.1.4.js'
'spec/**/*.coffee'
]
exclude: []
preprocessors: {
'**/*.coffee': ['coffee']
}
reporters: [ 'progress' ]
port: 9876
colors: true
logLevel:... | Revert "re-run tests on changes in site.js" | Revert "re-run tests on changes in site.js"
This reverts commit 89e3a3d26be72fc3d49a89fc8cbc75abf73999ce.
| CoffeeScript | mit | ePages-de/site,ePages-de/site,ePages-de/site |
6cc9d0159ff5384c6a351074b3e1aa981a3082e2 | lib/latex.coffee | lib/latex.coffee | path = require "path"
latexmk = require "./latexmk"
module.exports =
configDefaults:
texPath: "$PATH:/usr/texbin"
outputDirectory: ""
enableShellEscape: false
activate: ->
@initialize()
atom.workspaceView.command "latex:build", => @build()
initialize: ->
envPath = process.env.PATH
t... | path = require "path"
latexmk = require "./latexmk"
module.exports =
configDefaults:
texPath: "$PATH:/usr/texbin"
outputDirectory: ""
enableShellEscape: false
activate: ->
@initialize()
atom.workspaceView.command "latex:build", => @build()
initialize: ->
atom.config.observe "latex.texPa... | Simplify the code that initializes process.env.PATH | Simplify the code that initializes process.env.PATH
| CoffeeScript | mit | WoodyWoodsta/atom-latex,thomasjo/atom-latex,thomasjo/atom-latex,WoodyWoodsta/atom-latex,thomasjo/atom-latex |
d9462e391fc207ef973683ddc14ce0a487c82298 | test/unit/transactions/TransactionManager.spec.coffee | test/unit/transactions/TransactionManager.spec.coffee | r = require('require-root')('generic-dht')
TransactionManager = r 'src/transactions/TransactionManager'
describe 'TransactionManager', ()->
beforeEach ()->
@responseCb = jasmine.createSpy 'responseCb'
@errorCb = jasmine.createSpy 'errorCb'
@manager = new TransactionManager @responseCb, @errorCb
it 's... | r = require('require-root')('generic-dht')
TransactionManager = r 'src/transactions/TransactionManager'
describe 'TransactionManager', ()->
commonBeforeEach = ()->
@responseCb = jasmine.createSpy 'responseCb'
@errorCb = jasmine.createSpy 'errorCb'
@manager = new TransactionManager @responseCb, @errorCb
... | Use a common beforeEach in TransactionManager tests | Use a common beforeEach in TransactionManager tests
| CoffeeScript | mit | LoveIsGrief/generic-dht |
7beaccec51bf3507b6ae14057715202ab4915c66 | app/assets/javascripts/rich_editable_element.js.coffee | app/assets/javascripts/rich_editable_element.js.coffee | window.Tahi ||= {}
class Tahi.RichEditableElement
constructor: (@element) ->
@instance = CKEDITOR.inline @element,
extraPlugins: 'sharedspace'
removePlugins: 'floatingspace,resize'
sharedSpaces:
top: 'toolbar'
toolbar: [
[ 'Format' ]
[ 'Bold', 'Italic', 'Underline'... | window.Tahi ||= {}
class Tahi.RichEditableElement
constructor: (@element) ->
@instance = CKEDITOR.inline @element,
extraPlugins: 'sharedspace'
removePlugins: 'floatingspace,resize'
sharedSpaces:
top: 'toolbar'
toolbar: [
[ 'Format' ]
[ 'Bold', 'Italic', 'Underline'... | Remove h1 from CKEDITOR format_tags | Remove h1 from CKEDITOR format_tags
[Finishes #61519586]
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
4e28969cf0e337cfe082d091afba7c08a6c4e6c5 | app/assets/javascripts/videos/infinitescroll.js.coffee | app/assets/javascripts/videos/infinitescroll.js.coffee | $ ->
# Don't run on non-video pages
return if not $('.videos').length
# $(window).sausage({page: '.video'
# , content: (i, page) ->
# '<span class="sausage-span">' + (i + 1) + ". " + page.find('.date').html() + '</span>'
# })
every = (milliseconds, callback) => setInterval callback, milliseconds
nearB... | $ ->
# Don't run on non-video pages
return if not $('.videos').length
# $(window).sausage({page: '.video'
# , content: (i, page) ->
# '<span class="sausage-span">' + (i + 1) + ". " + page.find('.date').html() + '</span>'
# })
every = (milliseconds, callback) => setInterval callback, milliseconds
nearB... | Fix infinite scroll for pages w/ query string params already on them | Fix infinite scroll for pages w/ query string params already on them
| CoffeeScript | mit | BrettBukowski/CatchLater,BrettBukowski/CatchLater,BrettBukowski/CatchLater |
1e7de09f96936aa15de557d86db6b6094c7cb561 | client/views/patients/instancesOfProcurement.coffee | client/views/patients/instancesOfProcurement.coffee | Template.instancesOfProcurementForm.events
"click .add-instance-of-procurement": -> @instancesOfProcurementCollection.insert {}
Template.instancesOfProcurementForm.helpers
"iop": -> @instancesOfProcurementCollection.find()
Template.instancesOfProcurementForm.created = ->
collection = @data.instancesOfProc... | Template.instancesOfProcurementForm.events
"click .add-instance-of-procurement": -> @instancesOfProcurementCollection.insert {}
Template.instancesOfProcurementForm.helpers
"iop": -> @instancesOfProcurementCollection.find()
Template.instancesOfProcurementForm.created = ->
collection = @data.instancesOfProc... | Use the official parentData method to access parents data | Use the official parentData method to access parents data
| CoffeeScript | mit | drobbins/kassebaum,drobbins/kassebaum |
32858e9ccecab3f758965cd67202e9c078d08715 | kirppu/static_src/js/overseer/receipt_list_mode.coffee | kirppu/static_src/js/overseer/receipt_list_mode.coffee | class @ReceiptFindMode extends CheckoutMode
ModeSwitcher.registerEntryPoint("receipt_list", @)
constructor: ->
super
@receiptList = new ReceiptList()
enter: ->
super
refresh = new RefreshButton(=> Api.receipt_list().done(@onResult))
@cfg.uiRef.body.empty()
@cfg.uiRef.body.append(refresh.... | class @ReceiptFindMode extends CheckoutMode
ModeSwitcher.registerEntryPoint("receipt_list", @)
constructor: ->
super
@receiptList = new ReceiptList()
enter: ->
super
refresh = new RefreshButton(=> Api.receipt_pending().done(@onResult))
@cfg.uiRef.body.empty()
@cfg.uiRef.body.append(refre... | Fix api function name regression. | Fix api function name regression.
From 7ec2e329da4f16da80d682bc37d9ec8e2f7ce6c7
| CoffeeScript | mit | jlaunonen/kirppu,jlaunonen/kirppu,jlaunonen/kirppu,jlaunonen/kirppu |
342af54f7c36a5141caff410642655699183fd12 | .config/atom/config.cson | .config/atom/config.cson | "*":
core:
audioBeep: false
closeEmptyWindows: false
disabledPackages: [
"language-clojure"
"language-go"
"language-java"
"language-perl"
"language-objective-c"
"language-property-list"
"metrics"
"open-on-github"
"package-generator"
"symbols-view... | "*":
core:
audioBeep: false
closeEmptyWindows: false
disabledPackages: [
"language-clojure"
"language-go"
"language-java"
"language-perl"
"language-objective-c"
"language-property-list"
"metrics"
"open-on-github"
"package-generator"
"symbols-view... | Disable language-sql atom built-in package | Disable language-sql atom built-in package
I don't think I need it.
| CoffeeScript | mit | glepretre/dotfiles |
30a0faf755fc70105bca42415c5548754b417e8f | jobs/index.coffee | jobs/index.coffee | # Copyright 2013 Matt Farmer
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | # Copyright 2013 Matt Farmer
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | Disable representatives job for now. | Disable representatives job for now.
| CoffeeScript | agpl-3.0 | gaodp/gga-api,gaodp/gga-api |
cba3ffc0a594873f57cd7f1c79166ff245b8f055 | app/assets/javascripts/sprangular/services/orders.coffee | app/assets/javascripts/sprangular/services/orders.coffee | Sprangular.service "Orders", ($http) ->
service =
find: (number) ->
$http.get("/api/orders/#{number}")
.then (response) ->
Sprangular.extend(response.data, Sprangular.Order)
all: ->
$http.get("/api/orders")
.then (response) ->
Sprangular.extend(response.data, ... | Sprangular.service "Orders", ($http) ->
service =
find: (number) ->
$http.get("/api/orders/#{number}")
.then (response) ->
service._loadOrder(response.data)
all: ->
$http.get("/api/orders")
.then (response) ->
_.map response.data, (record) ->
servi... | Refactor loading of order responses | Refactor loading of order responses
| CoffeeScript | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular |
d16be458df7bff13c24f55e630bf79d53beb3193 | components/RotateElement.coffee | components/RotateElement.coffee | noflo = require 'noflo'
class RotateElement extends noflo.Component
description: 'Change the coordinates of a DOM element'
constructor: ->
@element = null
@inPorts =
element: new noflo.Port 'object'
percent: new noflo.Port 'number'
@inPorts.element.on 'data', (element) =>
@element = ... | noflo = require 'noflo'
class RotateElement extends noflo.Component
description: 'Change the coordinates of a DOM element'
constructor: ->
@element = null
@inPorts =
element: new noflo.Port 'object'
percent: new noflo.Port 'number'
degrees: new noflo.Port 'number'
@inPorts.element.on... | Allow input also in degrees | Allow input also in degrees
| CoffeeScript | mit | noflo/noflo-css,noflo/noflo-css |
9edfa46d7fb4834c5d0bda7f937507cfe5f8d7cb | lib/about.coffee | lib/about.coffee | {CompositeDisposable} = require 'atom'
AboutView = null
StatusBarView = null
aboutURI = 'atom://about'
createAboutView = (state) ->
AboutView ?= require './about-view'
new AboutView(state)
atom.deserializers.add
name: 'AboutView'
deserialize: (state) -> createAboutView(state)
module.exports = About =
act... | {CompositeDisposable} = require 'atom'
AboutView = null
StatusBarView = null
# The local storage key for the available update version.
AvailableUpdateVersion = 'about:version-available'
aboutURI = 'atom://about'
createAboutView = (state) ->
AboutView ?= require './about-view'
new AboutView(state)
atom.deserial... | Store the version available for update. | Store the version available for update.
| CoffeeScript | mit | atom/about,mnquintana/atom-about |
6553a49609ce83e4a17902dd46e9262ea4d3eae7 | core/app/backbone/mixins/update_on_sign_in_or_out_mixin.coffee | core/app/backbone/mixins/update_on_sign_in_or_out_mixin.coffee | window.UpdateOnSignInOrOutMixin =
componentDidMount: ->
window.currentSession.user().on 'change:username', (-> @forceUpdate()), @
componentWillUnmount: ->
window.currentSession.user().off null, null, @
| window.UpdateOnSignInOrOutMixin =
componentDidMount: ->
window.currentSession.user().on 'change:username', ( ->
if @isMounted()
@forceUpdate()
), @
componentWillUnmount: ->
window.currentSession.user().off null, null, @
| Fix UpdateOnSignInOrOutMixin so it doesn't trigger forceUpdate when impossible | Fix UpdateOnSignInOrOutMixin so it doesn't trigger forceUpdate when impossible
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core |
e516168099da66cbfd9839cf2ab5731862950ce3 | src/app.coffee | src/app.coffee | ModelEmitter = require './model-emitter'
Route = require './route'
class App extends ModelEmitter
constructor: (state = {}) ->
super
@_routes = {}
@views = []
addRoute: (path, cb) ->
unless (route = @_routes[path])?
route = new Route path
route.callbacks ?= []
route.callbac... | ModelEmitter = require './model-emitter'
Route = require './route'
class App extends ModelEmitter
prefix: ''
constructor: (state = {}) ->
super
@_routes = {}
@views = []
addRoute: (path, cb) ->
unless (route = @_routes[path])?
route = new Route @prefix + path
route.callbacks... | Make it possible to prefix routes. | Make it possible to prefix routes.
| CoffeeScript | mit | zeekay/mvstar |
db4f5ac662f07478a7113f1f966bbfb920fb834a | GitIssueView.coffee | GitIssueView.coffee | {$$, EditorView, View} = require 'atom'
marked = require 'marked'
module.exports =
class GitIssueView extends View
@content: ->
@div =>
@h1 'GitHub Issues'
@ul()
constructor: (opt) ->
super
{@issues} = opt
issueList = @issues
.sort (a,b) -> +a.number - +b.number
.map (issue... | {$$, EditorView, View} = require 'atom'
marked = require 'marked'
_ = require 'lodash'
module.exports =
class GitIssueView extends View
@content: ->
@section 'class':'padded pane-item', =>
@h1 'class':'section-heading', 'GitHub Issues'
@div 'data-element':'issue-list'
constructor: (opt={}) ->
... | Improve look of issues display | Improve look of issues display
| CoffeeScript | mit | r24y/github-issues |
bfcb35ebc1012efa7a41c96cff2a8f655c5ce8f5 | client/app/lib/activity/sidebar/sidebarownmachineslist.coffee | client/app/lib/activity/sidebar/sidebarownmachineslist.coffee | kd = require 'kd'
globals = require 'globals'
KDCustomHTMLView = kd.CustomHTMLView
EnvironmentsModal = require 'app/environment/environmentsmodal'
SidebarMachineList = require './sidebarmachinelist'
module.exports = class SidebarOwnMachinesList extends SidebarMachineList
constructor:... | kd = require 'kd'
KDCustomHTMLView = kd.CustomHTMLView
SidebarMachineList = require './sidebarmachinelist'
curryIn = require 'app/util/curryIn'
module.exports = class SidebarOwnMachinesList extends SidebarMachineList
constructor: (options = {}, data) ->
options.title ?= 'Your ... | Refactor sidebar own machine list class definition | Refactor sidebar own machine list class definition
| CoffeeScript | agpl-3.0 | sinan/koding,mertaytore/koding,koding/koding,jack89129/koding,usirin/koding,alex-ionochkin/koding,gokmen/koding,cihangir/koding,andrewjcasal/koding,andrewjcasal/koding,andrewjcasal/koding,acbodine/koding,jack89129/koding,acbodine/koding,acbodine/koding,gokmen/koding,koding/koding,kwagdy/koding-1,acbodine/koding,jack891... |
80f9e84557bba7cf91de71d7477f76e4ad3e1a7a | lib/tests_finder.coffee | lib/tests_finder.coffee | fs = require 'fs'
path = require 'path'
# Finds all test files in the given directory.
class TestsFinder
constructor: (@directory) ->
# Returns the name of all files within the given directory that contain tests.
files: ->
@_search_directory @directory, []
# Adds all test files in the current directo... | fs = require 'fs'
path = require 'path'
# Finds all test files in the given directory.
class TestsFinder
constructor: (@directory) ->
# Returns the name of all files within the given directory that contain tests.
files: ->
@_search_directory @directory, []
# Adds all test files in the current directo... | Return files sorted by name | Return files sorted by name
This makes tests less flaky. | CoffeeScript | mit | Originate/mycha |
51f601cc5fb56ba48decaee407c8512955941d22 | lib/validate.coffee | lib/validate.coffee | {Range} = require('atom')
helpers = require('./helpers')
module.exports = Validate =
linter: (linter) ->
# set undefined to false for backward compatibility
linter.modifiesBuffer = Boolean(linter.modifiesBuffer)
unless linter.grammarScopes instanceof Array
throw new Error("grammarScopes is not an ... | {Range} = require('atom')
helpers = require('./helpers')
module.exports = Validate =
linter: (linter) ->
# set undefined to false for backward compatibility
linter.modifiesBuffer = Boolean(linter.modifiesBuffer)
unless linter.grammarScopes instanceof Array
throw new Error("grammarScopes is not an ... | Enforce more validations on linter and messages | :new: Enforce more validations on linter and messages
| CoffeeScript | mit | AtomLinter/Linter,DanPurdy/linter,JohnMurga/linter,blakeembrey/linter,steelbrain/linter,shawninder/linter,atom-community/linter,e-jigsaw/Linter,Arcanemagus/linter |
cfd668776dd8d4c54c5215b0bb1997962edc550f | keymaps/git.cson | keymaps/git.cson | '.workspace':
'ctrl-9': 'github:toggle-git-panel'
'ctrl-(': 'github:toggle-git-panel-focus' # ctrl-shift-9
'.github-Panel':
'cmd-enter': 'github:commit'
'ctrl-enter': 'github:commit'
'.github-StagingView':
'left': 'github:focus-diff-view'
'tab': 'core:focus-next'
'shift-tab': 'core:focus-previous'
'.gi... | '.workspace':
'ctrl-9': 'github:toggle-git-panel'
'ctrl-(': 'github:toggle-git-panel-focus' # ctrl-shift-9
'.github-Panel':
'cmd-enter': 'github:commit'
'ctrl-enter': 'github:commit'
'.github-StagingView':
'tab': 'core:focus-next'
'shift-tab': 'core:focus-previous'
'.github-CommitView-editor atom-text-ed... | Make left dive into diff view | Make left dive into diff view
| CoffeeScript | mit | atom/github,atom/github,atom/github |
349edae0fd6addbcf42feaf4c86a5037e3bc4ac2 | src/beautifiers/crystal.coffee | src/beautifiers/crystal.coffee | ###
Requires https://github.com/jaspervdj/stylish-haskell
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Crystal extends Beautifier
name: "Crystal"
link: "http://crystal-lang.org"
isPreInstalled: false
options: {
Crystal: false
}
beautify: (text, language, options) ->
... | ###
Requires https://github.com/jaspervdj/stylish-haskell
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Crystal extends Beautifier
name: "Crystal"
link: "http://crystal-lang.org"
executables: [
{
name: "Crystal"
cmd: "crystal"
homepage: "http://crystal-lang.o... | Switch Crystal beautifier to using Executables | Switch Crystal beautifier to using Executables
| CoffeeScript | mit | Glavin001/atom-beautify,prettydiff/atom-beautify,prettydiff/atom-beautify,Glavin001/atom-beautify,prettydiff/atom-beautify,Glavin001/atom-beautify,prettydiff/atom-beautify,Glavin001/atom-beautify,Glavin001/atom-beautify |
8e076cc65e4707e64d646b9ef2a9a24d6b53dc5a | src/desktop/models/page.coffee | src/desktop/models/page.coffee | Backbone = require 'backbone'
sd = require('sharify').data
{ Markdown } = require 'artsy-backbone-mixins'
insane = require('insane')
_ = require 'underscore'
module.exports = class Page extends Backbone.Model
_.extend @prototype, Markdown
urlRoot: "#{sd.API_URL}/api/v1/page"
sanitizedHtml: (attr) ->
clean... | Backbone = require 'backbone'
sd = require('sharify').data
{ Markdown } = require 'artsy-backbone-mixins'
insane = require('insane')
_ = require 'underscore'
module.exports = class Page extends Backbone.Model
_.extend @prototype, Markdown
urlRoot: "#{sd.API_URL}/api/v1/page"
sanitizedHtml: (attr) ->
clean... | Make the markdown a bit more customizable with h1, h2, and div | Make the markdown a bit more customizable with h1, h2, and div
| CoffeeScript | mit | erikdstock/force,anandaroop/force,yuki24/force,artsy/force,erikdstock/force,anandaroop/force,oxaudo/force,joeyAghion/force,izakp/force,oxaudo/force,damassi/force,yuki24/force,oxaudo/force,eessex/force,anandaroop/force,erikdstock/force,joeyAghion/force,erikdstock/force,joeyAghion/force,damassi/force,artsy/force,artsy/fo... |
59779c4d56a98c2a1230207ac3b3180a94a288f1 | resources/assets/coffee/_classes/landing-hero.coffee | resources/assets/coffee/_classes/landing-hero.coffee | ###
# Copyright 2015 ppy Pty. Ltd.
#
# This file is part of osu!web. osu!web is distributed with the hope of
# attracting more community contributions to the core ecosystem of osu!.
#
# osu!web is free software: you can redistribute it and/or modify
# it under the terms of the Affero GNU General Public License version ... | ###
# Copyright 2015 ppy Pty. Ltd.
#
# This file is part of osu!web. osu!web is distributed with the hope of
# attracting more community contributions to the core ecosystem of osu!.
#
# osu!web is free software: you can redistribute it and/or modify
# it under the terms of the Affero GNU General Public License version ... | Fix slider breakage after navigation | Fix slider breakage after navigation
| CoffeeScript | agpl-3.0 | LiquidPL/osu-web,marcostudios/osu-web,nekodex/osu-web,Kuron-kun/osu-web,nanaya/osu-web,notbakaneko/osu-web,omkelderman/osu-web,ppy/osu-web,comentarinformal/osu-web,LiquidPL/osu-web,LiquidPL/osu-web,Kuron-kun/osu-web,Nekonyx/osu-web,Kuron-kun/osu-web,omkelderman/osu-web,Nekonyx/osu-web,Nekonyx/osu-web,comentarinformal/o... |
1804ada61cf906e86bbabba3d5ae32347a2b4f13 | test/error-pattern-type.coffee | test/error-pattern-type.coffee | describe 'error of incorrect pattern type when', ->
it 'is not an Object or Array', ->
a.throws (-> ss 'foobar'), 'Error: Given argument type String ("foobar") is incompatible with parameter type PlainObject.'
| describe 'error of incorrect pattern type', ->
it 'when arg is not a PlainObject', ->
a.throws (-> ss 'foobar'), 'Error: Given argument type String ("foobar") is incompatible with parameter type PlainObject.'
a.throws (-> ss /blah/), 'Error: Given argument type Object ({}) is incompatible with parameter type... | Enhance pattern-type test with more assertions on cases of invalid patterns | Enhance pattern-type test with more assertions on cases of invalid patterns
| CoffeeScript | mit | littlebits/stream-sift |
59c02c90da4cf323d416be5f06ab85afbe7fcd6b | src/packages/spell-check/lib/spell-check-handler.coffee | src/packages/spell-check/lib/spell-check-handler.coffee | SpellChecker = require 'spellchecker'
module.exports =
findMisspellings: (text) ->
wordRegex = /(?:^|[\s\[\]])([a-zA-Z']+)(?=[\s\.\[\]:]|$)/g
row = 0
misspellings = []
for line in text.split('\n')
while matches = wordRegex.exec(line)
word = matches[1]
continue unless SpellChecke... | SpellChecker = require 'spellchecker'
module.exports =
findMisspellings: (text) ->
wordRegex = /(?:^|[\s\[\]])([a-zA-Z']+)(?=[\s\.\[\]:,]|$)/g
row = 0
misspellings = []
for line in text.split('\n')
while matches = wordRegex.exec(line)
word = matches[1]
continue unless SpellCheck... | Include comma as a word boundary | Include comma as a word boundary
| CoffeeScript | mit | hpham04/atom,kaicataldo/atom,andrewleverette/atom,Ju2ender/atom,yalexx/atom,vinodpanicker/atom,dsandstrom/atom,omarhuanca/atom,florianb/atom,nrodriguez13/atom,mertkahyaoglu/atom,fedorov/atom,davideg/atom,nvoron23/atom,Andrey-Pavlov/atom,davideg/atom,svanharmelen/atom,nvoron23/atom,fang-yufeng/atom,AlisaKiatkongkumthon/... |
c44660b1e39c141aea0bce414130e7519830ca92 | lib/beantest.coffee | lib/beantest.coffee | {exec} = require 'child_process'
path = require 'path'
fs = require 'fs'
REFRESH_RATE = 500 # in msecs
RUN_PATH = path.join __dirname, "run_test.coffee"
seen = {} # cache of file names
shouldRun = true # if a change in file was detected
canRun = true # if tests are... | {exec} = require 'child_process'
path = require 'path'
fs = require 'fs'
REFRESH_RATE = 500 # in msecs
EXECUTE_WITH = "node"
RUN_PATH = path.join __dirname, "run_test.js"
unless path.exists RUN_PATH
EXECUTE_WITH = "coffee"
RUN_PATH = path.join __dirname, "run_test.coffee"
seen = {} ... | Use node by default; don't depend on coffee. | Use node by default; don't depend on coffee.
| CoffeeScript | mit | sarenji/beantest |
e937070277ae7d44e37de85864f91a1fc779f093 | app/assets/javascripts/cmtool/application.js.coffee | app/assets/javascripts/cmtool/application.js.coffee | #= require jquery
#= require jquery_ujs
#= require foundation
#= require ace/ace
#= require ace/theme-monokai
#= require ace/mode-coffee
#= require ace/mode-handlebars
#= require ace/mode-yaml
#= require ace/mode-haml
#= require tinymce-jquery
#= require_directory .
#= require_self
$ ->
$(document).foundation()
co... | #= require jquery
#= require jquery_ujs
#= require foundation
#= require ace/ace
#= require ace/theme-monokai
#= require ace/mode-coffee
#= require ace/mode-handlebars
#= require ace/mode-yaml
#= require ace/mode-haml
#= require tinymce-jquery
#= require_directory .
#= require_self
$ ->
$(document).foundation()
co... | Add other page fields to preview functionality | Add other page fields to preview functionality
| CoffeeScript | mit | bterkuile/cmtool,bterkuile/cmtool,bterkuile/cmtool |
625b33177acee656467fece41375587de8981eb0 | app/assets/javascripts/settings.js.coffee | app/assets/javascripts/settings.js.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$(document).ready ->
$(".new").hide()
$(".view-option").show()
$(".edit-option").hide()
$(".options"... | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$(document).ready ->
$(".new").hide()
$(".view-option").show()
$(".edit-option").hide()
$(".options"... | Fix settings javascript for Firefox compatibility | Fix settings javascript for Firefox compatibility
| CoffeeScript | mit | nholden/job_board,nholden/job_board,nholden/job_board |
15b3fbe3d2369f4b8e4a557a308e2e075c8e42e0 | assets/javascripts/routes/index_route.js.coffee | assets/javascripts/routes/index_route.js.coffee | App.IndexRoute = App.AuthenticatedRoute.extend
setupController: (controller, model)->
stateData = {}
stateIds = []
activeState = null
# Loop thru all room states
# find the first joined room to load
# start pollers for all joined rooms
model.forEach (item)=>
stateId = item.get... | App.IndexRoute = App.AuthenticatedRoute.extend
setupController: (controller, model)->
stateData = {}
stateIds = []
activeState = null
# Loop thru all room states
# find the first joined room to load
# start pollers for all joined rooms
model.forEach (item)=>
stateId = item.get... | Add message poller and users poller to state data | Add message poller and users poller to state data
| CoffeeScript | mit | sashafklein/bloc-mogo,louishawkins/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat,HashNuke/mogo-chat,sashafklein/bloc-mogo,louishawkins/mogo-chat,HashNuke/mogo-chat,di-stars/mogo-chat,di-stars/mogo-chat |
5f7c0ca7c64ca9b6799dca8306e76688d337d71a | src/top.coffee | src/top.coffee | ###
Top module for Rubic (for Chrome App)
###
# Compatibility modules
require("compat/es7compat")
require("compat/bbjscompat")
# UI helpers
require("ui/bootbox-promise")
# Load main controller
require("controller/windowcontroller") # Needed to solve circular dependency
$(->
# Controller must be initiated after ... | ###
Top module for Rubic (for Chrome App)
###
# Compatibility modules
require("compat/es7compat")
require("compat/bbjscompat")
# UI helpers
require("ui/bootbox-promise")
$(->
require("app/preferences").initCache().then(->
# WindowController should be loaded before MainController
# to solve circular depen... | Move class loading after window.onload to show splash quickly | Move class loading after window.onload to show splash quickly
| CoffeeScript | mit | kimushu/rubic,kimushu/rubic |
1e5ebe3c3430888821c77b5b23213f382333598e | src/lunch.coffee | src/lunch.coffee | # Description:
# Hubot enforces the correct time to talk about lunch.
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# lunch -> Isn't it a little early to be talking about lunch?
#
#
# Author:
# arosenb2
module.exports = (robot) ->
robot.hear /lunch/i, (msg) ->
if ! isPastLunchTime() ... | # Description:
# Hubot enforces the correct time to talk about lunch.
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# lunch -> Isn't it a little early to be talking about lunch?
#
#
# Author:
# arosenb2
module.exports = (robot) ->
robot.hear /lunch/i, (msg) ->
if ! isPastLunchTime() ... | Use the date object instead of a param | Use the date object instead of a param
| CoffeeScript | mit | arosenb2/hubot-lunch |
1770e9fa73a51cc0cefed793878aa16ab874d931 | lib/notational-velocity.coffee | lib/notational-velocity.coffee | {CompositeDisposable} = require 'atom'
module.exports =
configDefaults:
directory: 'testdata'
notationalVelocityView: null
activate: (state) ->
# Events subscribed to in atom's system can be easily cleaned up with a
# CompositeDisposable
@subscriptions = new CompositeDisposable
# Register ... | {CompositeDisposable} = require 'atom'
module.exports =
config:
directory:
type: 'string'
default: 'testdata'
notationalVelocityView: null
activate: (state) ->
# Events subscribed to in atom's system can be easily cleaned up with a
# CompositeDisposable
@subscriptions = new Composit... | Update default config by specifying its type | Update default config by specifying its type
| CoffeeScript | mit | lexicalunit/atom-notes |
fddfbd3299ee85237d43f766b7564356f622048b | src/validate-ssh.coffee | src/validate-ssh.coffee | # Gets added by gulp build.
# base64 = require 'base64binary'
uint8ArrayToInt = (arr) ->
len = arr.length
return 0 if len == 0
return arr[len-1] + (uint8ArrayToInt(arr[...len-1]) << 8)
validate = (key) ->
# See http://crypto.stackexchange.com/a/5948.
key = key.replace(/\r?\n/g, '')
key = /AAAAB3NzaC1yc2E[A-Za-... | # Gets added by gulp build.
# base64 = require 'base64binary'
uint8ArrayToInt = (arr) ->
len = arr.length
return 0 if len == 0
return arr[len-1] + (uint8ArrayToInt(arr.subarray(0, len-1)) << 8)
validate = (key) ->
# See http://crypto.stackexchange.com/a/5948.
key = key.replace(/\r?\n/g, '')
key = /AAAAB3NzaC1y... | Use subarrays as browsers (chrome at least) don't support slice. | Use subarrays as browsers (chrome at least) don't support slice.
Works correctly in node, also.
| CoffeeScript | mit | resin-io/validateSSHjs |
8af4fd1821162203faab0c76df63c89b19dde7dc | workers/social/lib/social/models/user/emailsanitize.coffee | workers/social/lib/social/models/user/emailsanitize.coffee | sanitize = (email, options = {}) ->
email = email.trim().toLowerCase()
return switch
when checkGmail email then sanitizeGmail email, options
else email
sanitizeGmail = (email, options = {}) ->
options.excludeDots or= no
options.excludePlus or= no
[local, host] = email.split '@'
[username, ... | sanitize = (email, options = {}) ->
options.excludeDots or= no
options.excludePlus or= no
[local, host] = email.split '@'
[username, label...] = local.split '+'
label = label.join '+'
# . have no meaning, they're being abused to create fake accounts
username = excludeDots username if options.excl... | Apply email sanitization procedure to emails from all domains except koding.com | Apply email sanitization procedure to emails from all domains except koding.com
| CoffeeScript | agpl-3.0 | mertaytore/koding,cihangir/koding,sinan/koding,kwagdy/koding-1,koding/koding,jack89129/koding,usirin/koding,kwagdy/koding-1,alex-ionochkin/koding,drewsetski/koding,sinan/koding,gokmen/koding,mertaytore/koding,acbodine/koding,acbodine/koding,koding/koding,koding/koding,gokmen/koding,drewsetski/koding,drewsetski/koding,c... |
25bcbc283c06e70266b4e1ac3e4ddfcdf158f756 | app/assets/javascripts/active_admin/application.js.coffee | app/assets/javascripts/active_admin/application.js.coffee | # Initializers
$ ->
# jQuery datepickers (also evaluates dynamically added HTML)
$(document).on 'focus', '.datepicker:not(.hasDatepicker)', ->
defaults = dateFormat: 'yy-mm-dd'
options = $(@).data 'datepicker-options'
$(@).datepicker $.extend(defaults, options)
# Clear Filters button
$('.clear_filt... | # Initializers
$ ->
# jQuery datepickers (also evaluates dynamically added HTML)
$(document).on 'focus', '.datepicker:not(.hasDatepicker)', ->
defaults = dateFormat: 'yy-mm-dd'
options = $(@).data 'datepicker-options'
$(@).datepicker $.extend(defaults, options)
# Clear Filters button
$('.clear_filt... | Fix using Javascript reserved keyword | Fix using Javascript reserved keyword
| CoffeeScript | mit | wspurgin/activeadmin,iuriandreazza/activeadmin,waymondo/active_admin,rubixware/activeadmin,ampinog/activeadmin,iuriandreazza/activeadmin,buren/activeadmin,applexiaohao/activeadmin,keichan34/active_admin,senid231/activeadmin,bloomrain/activeadmin,strivedi183/activeadmin,getkiwicom/activeadmin,ishumilova/activeadmin,wspu... |
5d89b74bab3b27ff031f1192a77b6d649837eada | src/utils.coffee | src/utils.coffee | Promise = require 'bluebird'
fs = Promise.promisifyAll require 'fs'
os = require 'os'
crypto = require 'crypto'
# Parses the output of /proc/cpuinfo to find the "Serial : 710abf21" line
# or the hostname if there isn't a serial number (when run in dev mode)
# The uuid is the SHA1 hash of that value.
exports.getDeviceU... | Promise = require 'bluebird'
fs = Promise.promisifyAll require 'fs'
os = require 'os'
crypto = require 'crypto'
# Parses the output of /proc/cpuinfo to find the "Serial : 710abf21" line
# or the hostname if there isn't a serial number (when run in dev mode)
# The uuid is the SHA1 hash of that value.
exports.getDeviceU... | Use __dirname to make sure the relative path is relative to where we expect. | Use __dirname to make sure the relative path is relative to where we expect.
| CoffeeScript | apache-2.0 | deviceMP/resin-supervisor,resin-io/resin-multivisor,nghiant2710/resin-supervisor,deviceMP/resin-supervisor,nghiant2710/resin-supervisor |
dbb6208d745956fcf6d5a66f47efa56958581bf9 | src/jquery.turbolinks.coffee | src/jquery.turbolinks.coffee | ###
jquery.turbolinks.js ~ v0.1.0 ~ https://github.com/kossnocorp/jquery.turbolinks
jQuery plugin for rebind events problem caused by Tubrolinks
The MIT License
Copyright (c) 2012 Sasha Koss
###
$ = require?('jquery') || window.jQuery
callbacks = []
ready = ->
callback() for callback in callbacks
$(rea... | ###
jquery.turbolinks.js ~ v0.1.0 ~ https://github.com/kossnocorp/jquery.turbolinks
jQuery plugin for drop-in fix binded events problem caused by Turbolinks
The MIT License
Copyright (c) 2012 Sasha Koss
###
$ = require?('jquery') || window.jQuery
# List for store callbacks passed to `$` or `$.ready`
callba... | Update comments in source file | Update comments in source file
| CoffeeScript | mit | echobobby/jquery.turbolinks,rstacruz/jquery.turbolinks,kossnocorp/jquery.turbolinks |
6dc40635dc0389f2579d1e37b4c5c09260ee56b8 | scripts/crashlytics-notifications.coffee | scripts/crashlytics-notifications.coffee | # Notifies about Crashlytics crashes via a Crashlytics web hook
#
# Dependencies:
# "url": ""
# "querystring": ""
#
# Configuration:
# Just put this url <HUBOT_URL>:<PORT>/hubot/jenkins-notify?room=<room> to your Jenkins
# Notification config. See here: https://wiki.jenkins-ci.org/display/JENKINS/Notification+P... | # Notifies about Crashlytics crashes via a Crashlytics web hook
#
# Dependencies:
# "url": ""
# "querystring": ""
#
# Configuration:
# Just put this url <HUBOT_URL>:<PORT>/hubot/jenkins-notify?room=<room> to your Jenkins
# Notification config. See here: https://wiki.jenkins-ci.org/display/JENKINS/Notification+P... | Add logging when receiving crashes | Add logging when receiving crashes
| CoffeeScript | mit | brandnetworks/our-product-slack-hubot |
68dfb586e4a98ab68e7ea004d39791928f62900a | src/coffee/cilantro/ui/query/item.coffee | src/coffee/cilantro/ui/query/item.coffee | define [
'underscore'
'marionette'
'../base'
'tpl!templates/query/item.html'
], (_, Marionette, base, templates...) ->
templates = _.object ['item'], templates
class EmptyQueryItem extends base.EmptyView
icon: false
message: 'You have not yet created any queries or have had an... | define [
'underscore'
'marionette'
'../base'
'tpl!templates/query/item.html'
], (_, Marionette, base, templates...) ->
templates = _.object ['item'], templates
class EmptyQueryItem extends base.EmptyView
icon: false
message: 'You have not yet created any queries or have had an... | Implement delete button for queries in the QueryList | Implement delete button for queries in the QueryList
| CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
9764e004e2d160bd210f0c70bc87c8540e45960d | src/ext/components/predict-output.coffee | src/ext/components/predict-output.coffee | H2O.PredictOutput = (_, _go, prediction) ->
{ frame, model } = prediction
_plots = signals []
renderPlot = (title, render) ->
container = signal null
render (error, vis) ->
if error
debug error
else
container vis.element
_plots.push title: title, plot: container
swit... | H2O.PredictOutput = (_, _go, prediction) ->
{ frame, model } = prediction
_plots = signals []
renderPlot = (title, render) ->
container = signal null
render (error, vis) ->
if error
debug error
else
container vis.element
_plots.push title: title, plot: container
swit... | Fix ROC domains to (0, 1) | Fix ROC domains to (0, 1)
| CoffeeScript | mit | junwucs/h2o-flow,nilbody/h2o-flow,printedheart/h2o-flow,nilbody/h2o-flow,h2oai/h2o-flow,nilbody/h2o-flow,printedheart/h2o-flow,h2oai/h2o-flow,junwucs/h2o-flow,printedheart/h2o-flow,junwucs/h2o-flow |
619e1abac66aa7628082c8f4f4d803b92ae7f409 | src/scripts/models/search-results.coffee | src/scripts/models/search-results.coffee | define (require) ->
Backbone = require('backbone')
SEARCH_URI = "#{location.protocol}//#{location.hostname}:6543/search"
return class SearchResults extends Backbone.Model
url: () -> "#{SEARCH_URI}#{@query}"
defaults:
query:
limits: []
sort: []
results:
items: []
... | define (require) ->
Backbone = require('backbone')
settings = require('cs!settings')
SEARCH_URI = "#{location.protocol}//#{settings.cnxarchive.host}:#{settings.cnxarchive.port}/search"
return class SearchResults extends Backbone.Model
url: () -> "#{SEARCH_URI}#{@query}"
defaults:
query:
... | Use cnx host/port settings to create search uri | Use cnx host/port settings to create search uri
| CoffeeScript | agpl-3.0 | Connexions/webview,katalysteducation/webview,katalysteducation/webview,carolinelane10/webview,dak/webview,dak/webview,Connexions/webview,katalysteducation/webview,dak/webview,Connexions/webview,Connexions/webview,katalysteducation/webview |
40bce37db5e1bc941a6e3d1778d91b50fbd3d5c2 | src/parse.coffee | src/parse.coffee | deckardcain = require('deckardcain')
fury = require('fury')
fury.use(require('fury-adapter-apib-parser'))
fury.use(require('fury-adapter-swagger'))
apiElementsToJson = require('./api-elements-to-json')
createAnnotation = (message, type) ->
{
element: 'annotation'
meta: {classes: [type]}
content: messag... | deckardcain = require('deckardcain')
fury = require('fury')
fury.use(require('fury-adapter-apib-parser'))
fury.use(require('fury-adapter-swagger'))
apiElementsToJson = require('./api-elements-to-json')
createWarning = (message) ->
annotation = new fury.minim.elements.Annotation(message)
annotation.classes.push('... | Use minim to add warning about unrecognized format | refactor: Use minim to add warning about unrecognized format
| CoffeeScript | mit | apiaryio/dredd-transactions,apiaryio/dredd,apiaryio/dredd-transactions,apiaryio/dredd,apiaryio/dredd |
b669ed4159462064a5ce577e57b58b9218709e6f | lib/archive-edit-session.coffee | lib/archive-edit-session.coffee | fsUtils = require 'fs-utils'
path = require 'path'
_ = require 'underscore'
archive = require 'ls-archive'
File = require 'file'
module.exports=
class ArchiveEditSession
registerDeserializer(this)
@activate: ->
Project = require 'project'
Project.registerOpener (filePath) ->
new ArchiveEditSession(f... | fsUtils = require 'fs-utils'
path = require 'path'
_ = require 'underscore'
archive = require 'ls-archive'
File = require 'file'
module.exports=
class ArchiveEditSession
registerDeserializer(this)
@activate: ->
Project = require 'project'
Project.registerOpener (filePath) ->
new ArchiveEditSession(f... | Make all edit session uri's relative | Make all edit session uri's relative
This allows them to be collaborated without having absolute paths
in the shared document.
| CoffeeScript | mit | atom/archive-view |
0d6fede035e8f099b5c042b00413966ea19f2397 | app/assets/javascripts/mixins/controllers/saves_delayed.js.coffee | app/assets/javascripts/mixins/controllers/saves_delayed.js.coffee | ETahi.SavesDelayed = Ember.Mixin.create
saveInFlight: false
saveDelayed: ->
Ember.run.debounce(@, @saveModel, 100)
saveModel: ->
unless @get('saveInFlight')
@set('saveInFlight', true)
@get('model').save().then =>
@set('saveInFlight', false)
actions:
saveModel: ->
@saveDe... | ETahi.SavesDelayed = Ember.Mixin.create
saveInFlight: false
saveDelayed: ->
Ember.run.debounce(@, @saveModel, 200)
saveModel: ->
unless @get('saveInFlight')
@set('saveInFlight', true)
@get('model').save().then =>
@set('saveInFlight', false)
actions:
saveModel: ->
@saveDe... | Increase SavesDelayed debounce to 200ms. | Increase SavesDelayed debounce to 200ms.
We're trying to eliminate some recurring test failures.
This may change more in the future.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
4570e0e05fe3b86cd0dbaf405217ca5b71d478d2 | lib/command-palette-view.coffee | lib/command-palette-view.coffee | {$$} = require 'space-pen'
SelectList = require 'select-list'
$ = require 'jquery'
_ = require 'underscore'
module.exports =
class CommandPaletteView extends SelectList
@activate: ->
new CommandPaletteView
@viewClass: ->
"#{super} command-palette overlay from-top"
filterKey: 'eventDescription'
previ... | {$$} = require 'space-pen'
SelectList = require 'select-list'
$ = require 'jquery'
_ = require 'underscore'
module.exports =
class CommandPaletteView extends SelectList
@activate: ->
new CommandPaletteView
@viewClass: ->
"#{super} command-palette overlay from-top"
filterKey: 'eventDescription'
keyBi... | Remove unneeded initialization of variable from superclass | Remove unneeded initialization of variable from superclass
| CoffeeScript | mit | atom/command-palette |
68cc8aeff8866e0dcc6aa0fbf1cac0ebb0c73e7f | bokehjs/src/coffee/action/open_url.coffee | bokehjs/src/coffee/action/open_url.coffee | _ = require "underscore"
Util = require "../util/util"
HasProperties = require "../common/has_properties"
class OpenURL extends HasProperties
type: 'OpenURL'
execute: (data_source) ->
selected = data_source.get("selected")
if selected['0d'].flag
indices = selected['0d'].indices
else if selected[... | _ = require "underscore"
Util = require "../util/util"
HasProperties = require "../common/has_properties"
class OpenURL extends HasProperties
type: 'OpenURL'
execute: (data_source) ->
selected = data_source.get("selected")
if selected['0d'].flag
indices = selected['0d'].indices
else if selected[... | Return null from OpenURL.execute() to reduce output size | Return null from OpenURL.execute() to reduce output size
| CoffeeScript | bsd-3-clause | bokeh/bokeh,dennisobrien/bokeh,aiguofer/bokeh,ChinaQuants/bokeh,stonebig/bokeh,khkaminska/bokeh,azjps/bokeh,rs2/bokeh,dennisobrien/bokeh,gpfreitas/bokeh,khkaminska/bokeh,rs2/bokeh,aiguofer/bokeh,draperjames/bokeh,aavanian/bokeh,mindriot101/bokeh,Karel-van-de-Plassche/bokeh,msarahan/bokeh,percyfal/bokeh,dennisobrien/bok... |
9a23af4523b7ef9532a35ae7130af16c6868b437 | core/app/backbone/views/sub_comments/react_sub_comment.coffee | core/app/backbone/views/sub_comments/react_sub_comment.coffee | window.ReactSubComment = React.createBackboneClass
displayName: 'ReactSubComment'
propTypes:
fact_opinionators: React.PropTypes.instanceOf(Opinionators).isRequired
model: React.PropTypes.instanceOf(SubComment).isRequired
_save: ->
@model().saveWithState()
_content_tag: ->
if @model().get('form... | window.ReactSubComment = React.createBackboneClass
displayName: 'ReactSubComment'
propTypes:
fact_opinionators: React.PropTypes.instanceOf(Opinionators).isRequired
model: React.PropTypes.instanceOf(SubComment).isRequired
_save: ->
@model().saveWithState()
_content_tag: ->
if @model().get('form... | Fix delete button on sub comments | Fix delete button on sub comments
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core |
6819240a2f623ccd6bb3f92f600e8bc9de29793f | .atom/config.cson | .atom/config.cson | "*":
"autocomplete-python":
useKite: false
core:
disabledPackages: [
"metrics"
"linter-python-pep8"
]
telemetryConsent: "no"
themes: [
"one-dark-ui"
"monokai"
]
editor:
fontSize: 11
scrollPastEnd: true
showIndentGuide: true
showInvisibles: true
s... | "*":
"autocomplete-python":
useKite: false
core:
disabledPackages: [
"metrics"
"linter-python-pep8"
]
telemetryConsent: "no"
themes: [
"one-dark-ui"
"monokai"
]
editor:
fontSize: 11
scrollPastEnd: true
showIndentGuide: true
showInvisibles: true
s... | Hide vcs-ignored files in Atom | Hide vcs-ignored files in Atom
| CoffeeScript | mit | janwh/dotfiles |
e1413f2c705dfc0390048efc91f9d85905936cb8 | app/routes.coffee | app/routes.coffee | passport = require 'passport'
debug = require('debug')('meshblu-google-authenticator:routes')
url = require 'url'
class Router
constructor: (@app) ->
register: =>
@app.get '/', (request, response) => response.status(200).send status: 'online'
@app.get '/login', @storeCallbackUrl, passport.authenticate '... | passport = require 'passport'
debug = require('debug')('meshblu-google-authenticator:routes')
url = require 'url'
class Router
constructor: (@app) ->
register: =>
@app.get '/', (request, response) => response.status(200).send status: 'online'
@app.get '/login', @storeCallbackUrl, passport.authenticate '... | Use cookies for callback instead of session | Use cookies for callback instead of session
| CoffeeScript | mit | octoblu/meshblu-google-authenticator,octoblu/meshblu-authenticator-google |
840ac3c1902107eba772b7097f69467ca8bff9e3 | app/scripts/lib/handlebars-helpers.coffee | app/scripts/lib/handlebars-helpers.coffee | require [
"handlebars"
], (
Handlebars
) ->
helpers =
highlightMatches: (match) ->
result = match.wrap (match) ->
"<span class=\"match\">#{match}</span>"
new Handlebars.SafeString result
prettyUrl: (url) ->
url.replace /^((http|https):\/\/)?(www.)?/, ""
Handlebars.registerHe... | require [
"handlebars"
], (
Handlebars
) ->
helpers =
highlightMatches: (match) ->
result = match.wrap (match) ->
"<span class=\"match\">#{match}</span>"
new Handlebars.SafeString result
prettyUrl: (url) ->
url.replace(/^((http|https):\/\/)?(www.)?/, "")
.replace(/\/$/... | Remove trailing slashes and HTML file extension from prettyfied URLs | Remove trailing slashes and HTML file extension from prettyfied URLs
| CoffeeScript | mit | JoelBesada/Backtick |
d6f46c8d116ce81ec93ea08a7b4bc52b6071776e | spec/javascripts/analytics/virtual_pageview_spec.coffee | spec/javascripts/analytics/virtual_pageview_spec.coffee | //= require analytics/virtual_pageview
describe 'VirtualPageview', ->
element = null
describe 'given "data-virtual-pageview" anchor link', ->
beforeEach ->
element = $('<body>' +
'<a id="a_link" data-virtual-pageview="/top-3-search-result" href="https://peoplefinder.service.gov.uk/people/john-s... | //= require analytics/virtual_pageview
describe 'VirtualPageview', ->
element = null
describe 'given "data-virtual-pageview" anchor link', ->
setUpPage = (page_url) ->
element = $('<body>' +
'<a id="a_link" data-virtual-pageview="' + page_url + '" href="https://peoplefinder.service.gov.uk/peopl... | Refactor virtual pageview spec to have a setup function | Refactor virtual pageview spec to have a setup function
| CoffeeScript | mit | ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder |
e208ad81746590dfc04c03ac3b53dd597902aa39 | app/assets/javascripts/mixins/controllers/participants.js.coffee | app/assets/javascripts/mixins/controllers/participants.js.coffee | ETahi.ControllerParticipants = Ember.Mixin.create
needs: ['application']
currentUser: Ember.computed.alias('controllers.application.currentUser')
allUsers: (->
paperId = @get('paper.id') || @get('litePaper.id')
DS.PromiseObject.create
promise: $.getJSON("/filtered_users/collaborators/#{paperId}")
... | ETahi.ControllerParticipants = Ember.Mixin.create
needs: ['application']
currentUser: Ember.computed.alias('controllers.application.currentUser')
allUsers: (->
paperId = @get('paper.id') || @get('litePaper.id')
DS.PromiseObject.create
promise: $.getJSON("/filtered_users/collaborators/#{paperId}")
... | Use addObject instead of pushObject. | Use addObject instead of pushObject.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
3f282af12e03ebdc67ff593ea85d1d70e67f8316 | app/assets/javascripts/static.js.coffee | app/assets/javascripts/static.js.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$ ->
animateMetric = $(".metric-box strong").each ->
$this = $(this)
starting_point = 0
$targe... | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$ ->
animateMetric = $(".metric-box strong").each ->
$this = $(this)
starting_point = 0
$targe... | Make animation duration much shorter | Make animation duration much shorter
| CoffeeScript | agpl-3.0 | openaustralia/morph,openaustralia/morph,openaustralia/morph,otherchirps/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,otherchirps/morph,otherchirps/morph,otherchirps/morph,openaustralia/morph,openaustralia/morph |
1b682b922b67631198fc49dd3a4e5b499eb19627 | app/assets/javascripts/uploadcare/widget/tabs/file-tab.js.coffee | app/assets/javascripts/uploadcare/widget/tabs/file-tab.js.coffee | {
namespace,
utils,
jQuery: $,
templates: {tpl}
} = uploadcare
{dragdrop} = uploadcare.widget
namespace 'uploadcare.widget.tabs', (ns) ->
class ns.FileTab extends ns.BaseSourceTab
constructor: ->
super
@wrap.append tpl 'tab-file', {avalibleTabs: @dialogApi.avalibleTabs}
@wrap.on 'cl... | {
namespace,
utils,
jQuery: $,
templates: {tpl}
} = uploadcare
{dragdrop} = uploadcare.widget
namespace 'uploadcare.widget.tabs', (ns) ->
class ns.FileTab extends ns.BaseSourceTab
constructor: ->
super
@wrap.append tpl 'tab-file', {avalibleTabs: @dialogApi.avalibleTabs}
@wrap.on 'cl... | Switch to preview after drag and drop | Switch to preview after drag and drop
| CoffeeScript | bsd-2-clause | prognostikos/uploadcare-widget,toscale/uploadcare-widget,BIGWOO/uploadcare-widget,uploadcare/uploadcare-widget,toscale/uploadcare-widget,BIGWOO/uploadcare-widget,uploadcare/uploadcare-widget,toscale/uploadcare-widget,BIGWOO/uploadcare-widget,prognostikos/uploadcare-widget,prognostikos/uploadcare-widget |
e934f6d2df395502aa3d0daae3acda8723dc64fb | core/app/backbone/views/users/auto_complete_search_users_view.coffee | core/app/backbone/views/users/auto_complete_search_users_view.coffee | #= require ../auto_complete/search_list_view
class AutoCompleteSearchUserView extends Backbone.Factlink.StepView
tagName: "li"
template: "auto_complete/search_item"
templateHelpers: ->
query = @options.query
highlightedTitle: -> highlightTextInTextAsHtml(query, @username)
onRender: ->
@$el.addC... | #= require ../auto_complete/search_list_view
class AutoCompleteSearchUserView extends Backbone.Factlink.StepView
tagName: "li"
template: "auto_complete/search_item"
templateHelpers: ->
query = @options.query
highlightedTitle: -> highlightTextInTextAsHtml(query, @name)
onRender: ->
@$el.addClass... | Use the users name in the auto complete box | Use the users name in the auto complete box
| CoffeeScript | mit | daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core |
2c33f6b295bbcca5a9707937854691ecc48810f9 | app/frontend/javascripts/visualization-story.js.coffee | app/frontend/javascripts/visualization-story.js.coffee | Visualization = require './visualization.js'
class VisualizationStory extends Visualization
# Override onSync method to set Visualization Canvas offset x & use render(false)
onSync: =>
# Setup visualization parameters
@parameters = $.parseJSON @visualization.get('parameters')
@setupParameters()
# ... | Visualization = require './visualization.js'
class VisualizationStory extends Visualization
# Override onSync method to set Visualization Canvas offset x & use render(false)
onSync: =>
# Setup visualization parameters
@parameters = $.parseJSON @visualization.get('parameters')
@setupParameters()
# ... | Fix menu canvas & navigation render in visualization-story | Fix menu canvas & navigation render in visualization-story
| CoffeeScript | agpl-3.0 | civio/onodo,civio/onodo,civio/onodo,civio/onodo |
d1480407b2508c1e190c4e74616cafd6d2c6ffc6 | src/app/projects/projects.coffee | src/app/projects/projects.coffee | angular.module('doubtfire.projects', [
'doubtfire.projects.states'
'doubtfire.projects.student-project'
'doubtfire.projects.project-lab-list'
'doubtfire.projects.project-outcome-alignment'
'doubtfire.projects.project-portfolio-wizard'
'doubtfire.projects.project-progress-dashboard'
])
| angular.module('doubtfire.projects', [
'doubtfire.projects.states'
'doubtfire.projects.project-viewer'
'doubtfire.projects.project-lab-list'
'doubtfire.projects.project-outcome-alignment'
'doubtfire.projects.project-portfolio-wizard'
'doubtfire.projects.project-progress-dashboard'
])
| Change dependency module of student-project to project-viewer | FIX: Change dependency module of student-project to project-viewer
| CoffeeScript | agpl-3.0 | doubtfire-lms/doubtfire-web,alexcu/doubtfire-web,doubtfire-lms/doubtfire-web,final-year-project/doubtfire-web,final-year-project/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,alexcu/doubtfire-web |
f5b54f427ac58436592d8c2b2752f6d79aea72d4 | lib/router.coffee | lib/router.coffee | Router.configure
layoutTemplate: "layout"
loadingTemplate: "loading"
waitOn: ->
if Meteor.user()
Meteor.subscribe "patients"
else
ready: -> true
Router.map ->
@route "home",
path: "/"
template: "home"
@route "admin",
path: "/admin"
... | Router.configure
layoutTemplate: "layout"
loadingTemplate: "loading"
waitOn: ->
if Meteor.user()
Meteor.subscribe "patients"
else
ready: -> true
Router.map ->
@route "home",
path: "/"
template: "home"
@route "admin",
path: "/admin"
... | Use an alert instead of the access_denied template | Use an alert instead of the access_denied template
| CoffeeScript | mit | drobbins/kassebaum,drobbins/kassebaum |
aea035a362bfceda91b38ba3bcee70252cae3cb7 | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
grunt.initConfig
clean:
test: ['tmp']
semverCopy:
inlineObject:
resources:
name: "inlineResource"
range: "~1.1"
parentDirectory: "./test/fixtures/MyResource"
dest: 'tmp/inlineResource'
inlineObjects:
resources: [
{
name: "inlineResourcesA... | module.exports = (grunt) ->
grunt.initConfig
clean:
test: ['tmp']
semverCopy:
inlineObject:
resources:
name: "inlineResource"
range: "~1.1"
parentDirectory: "./test/fixtures/MyResource"
dest: 'tmp/inlineResource'
inlineObjects:
resources: [
{
name: "inlineResourcesA... | Fix casing on JSON folder paths | Fix casing on JSON folder paths
| CoffeeScript | mit | JackMorrissey/grunt-semvercopy |
971cee2637850b5b293df93fbf57bd787feaca2b | Gruntfile.coffee | Gruntfile.coffee | fs = require 'fs'
path = require 'path'
Mocha = require 'mocha'
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
mocha:
db:
src: ['test/db/*.coffee']
default:
src: ['test/*.coffee']
coffee:
default:
files: [
expand: true # E... | fs = require 'fs'
path = require 'path'
Mocha = require 'mocha'
exec = require('child_process').exec
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
mocha:
db:
src: ['test/db/*.coffee']
default:
src: ['test/*.coffee']
coffee:
default:
files:... | Add Grunt task to reset stuff | Add Grunt task to reset stuff
Helps with testing the install process. You probably shouldn't run this.
| CoffeeScript | mit | impromptu/impromptu,impromptu/impromptu |
bb921b14ff4484e1007c08d908b4ab56e119f53f | src/components/tags/cnx-mod.cjsx | src/components/tags/cnx-mod.cjsx | React = require 'react'
MultiInput = require './multi-input'
CnxModTag = React.createClass
propTypes:
exerciseId: React.PropTypes.string.isRequired
validateInput: (value) ->
'Must match CNX module ID (without version number)' unless value.match(
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-... | React = require 'react'
MultiInput = require './multi-input'
CnxModTag = React.createClass
propTypes:
exerciseId: React.PropTypes.string.isRequired
validateInput: (value) ->
'Must match CNX module ID (without version number)' unless value.match(
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-... | Rename tag prefix to 'context-cnxmod' | Rename tag prefix to 'context-cnxmod'
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
e8fcd4641a2ef67df2e94b7f161c1a061cd5eb77 | app/assets/javascripts/layout_nav.js.coffee | app/assets/javascripts/layout_nav.js.coffee | class @LayoutNav
$ ->
$('#scrolling-tabs').on 'scroll', ->
currentPosition = $(this).scrollLeft()
return if currentPosition == 0
if $('.nav-control').length
maxPosition = $(this)[0].scrollWidth - $(this).parent().width() + 59
else
maxPosition = $(this)[0].scrollWidth - $(th... | class @LayoutNav
$ ->
$('#scrolling-tabs').on 'scroll', ->
currentPosition = $(this).scrollLeft()
return if currentPosition == 0
maxPosition = $(this)[0].scrollWidth - $(this).parent().width()
maxPosition += 59 if $('.nav-control').length and window.innerWidth > 480
$('.fade-out').t... | Check screen width before increasing max position | Check screen width before increasing max position
| CoffeeScript | mit | jirutka/gitlabhq,dplarson/gitlabhq,t-zuehlsdorff/gitlabhq,dplarson/gitlabhq,screenpages/gitlabhq,allysonbarros/gitlabhq,t-zuehlsdorff/gitlabhq,allysonbarros/gitlabhq,openwide-java/gitlabhq,SVArago/gitlabhq,openwide-java/gitlabhq,mmkassem/gitlabhq,dplarson/gitlabhq,SVArago/gitlabhq,mmkassem/gitlabhq,dreampet/gitlab,mr-d... |
c158e75c2afcb686ab9f35980f46161fed19921a | tapestry-core/src/test/coffeescript/META-INF/modules/palette-demo.coffee | tapestry-core/src/test/coffeescript/META-INF/modules/palette-demo.coffee | define ["t5/core/dom", "t5/core/events", "underscore"],
(dom, events, _) ->
dom.onDocument events.palette.willChange, (event, memo) ->
values = _.map memo.selectedOptions, (o) -> o.value
(dom "event-selection").update JSON.stringify values
(dom "event-reorder").update memo.reorder.toString() | define ["t5/core/dom", "t5/core/events", "underscore", "t5/core/console"],
(dom, events, _, console) ->
dom.body.on events.palette.willChange, (event, memo) ->
console.info "palette-demo, palette willChange"
values = _.map memo.selectedOptions, (o) -> o.value
(dom "event-selection").update J... | Adjust code to attach event handler at body, not document level | Adjust code to attach event handler at body, not document level
My working theory is that Prototype and/or Chrome has changed to not propogate custom events
past the body (to the document).
| CoffeeScript | apache-2.0 | apache/tapestry-5,apache/tapestry-5,apache/tapestry-5,apache/tapestry-5,apache/tapestry-5 |
ad4a17ba4b32f0c6c1f5524f4f1dab5b02506067 | app/assets/javascripts/application/pods_progress_bar.js.coffee | app/assets/javascripts/application/pods_progress_bar.js.coffee | #= require nanobar.js
class @PodsProgressBar
update: (factor) ->
progress = factor * 100
@nanobar.go(progress)
start: ->
$container = $('.progress-container').empty()
@nanobar = new Nanobar
target: $container.get(0)
id: 'pods-progress'
| #= require nanobar.js
class @PodsProgressBar
update: (factor) ->
progress = factor * 100
if @nanobar
@nanobar.go(progress)
start: ->
$container = $('.progress-container').empty()
@nanobar = new Nanobar
target: $container.get(0)
id: 'pods-progress'
| Fix nanobar updates when there is no nanobar. | Fix nanobar updates when there is no nanobar.
| CoffeeScript | mit | bsingr/cocoa-tree,bsingr/cocoa-tree,bsingr/cocoa-tree |
0eda06334f90d288ab087118633953c9cdc5518f | app/assets/javascripts/components/search/results.js.jsx.coffee | app/assets/javascripts/components/search/results.js.jsx.coffee | SearchResults = React.createClass
scrollTo: (event)->
console.log(event)
window.scrollTo(0,$("activities_bookmark").offsetTop)
render: ->
message = (@props.results.map (group)-> `<span>{group.pagination.total_items} <GenericLink link={{url: 'javascript:void(0)', onclick: this.scrollTo, text: group.hea... | SearchResults = React.createClass
generateScrollTo: (type)->
return (event)->
window.scrollTo(0,$("#{type}_bookmark").offsetTop)
render: ->
message = @props.results.map (group)=>
link = {url: 'javascript:void(0)', onclick: @generateScrollTo(group.type), text: group.header, className: ''}
... | Fix scrollTo in results summary links | Fix scrollTo in results summary links
| CoffeeScript | mit | concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse |
045dda1c7494d836f9797f831bb0bbdb525d4795 | src/task/review.cjsx | src/task/review.cjsx | React = require 'react'
_ = require 'underscore'
tasks = require './collection'
{ExerciseStep} = require '../exercise'
{ExerciseButton} = require '../buttons'
TaskReview = React.createClass
displayName: 'TaskReview'
getInitialState: ->
@getSteps(@props)
componentWillMount: ->
{collectionUUID, moduleUUI... | React = require 'react'
_ = require 'underscore'
tasks = require './collection'
{ExerciseStep} = require '../exercise'
{ExerciseButton} = require '../buttons'
TaskReview = React.createClass
displayName: 'TaskReview'
propTypes:
moduleUUID: React.PropTypes.string.isRequired
collectionUUID: React.PropTy... | Set propTypes and add key to ExerciseStep | Set propTypes and add key to ExerciseStep
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
408305c004d7eb6e64ff47bb48b271016466c0a3 | coffee/controllers/posts_controller.coffee | coffee/controllers/posts_controller.coffee | define [
"chaplin"
"models/posts"
"views/posts"
], (Chaplin, Posts, PostsView) ->
"use strict"
class PostsController extends Chaplin.Controller
show: (params) ->
id = params.id
if params.isClub
query = club: params.club
else if params.isTag
query = tag: params.tag
... | define [
"chaplin"
"models/posts"
"views/posts"
], (Chaplin, Posts, PostsView) ->
"use strict"
class PostsController extends Chaplin.Controller
show: (params) ->
id = params.id
if params.isClub
query = club: params.club
params.title = "!#{params.club}"
else if params.is... | Fix page's title in club and tags | Fix page's title in club and tags
| CoffeeScript | cc0-1.0 | border-radius/meow-anon,Kagami/bnw-meow,border-radius/meow-anon |
5d4308fd026b6813e09b452ab1d7dae2d0b2fd5c | core/app/assets/javascripts/lib/prevent_scroll_propagation.coffee | core/app/assets/javascripts/lib/prevent_scroll_propagation.coffee | #= require jquery.mousewheel
shouldUseNativeBehaviour = ($el) ->
# We explicitly only want a scrollbar when there is something to scroll (overflow-y: auto),
# but there isn't anything to scroll
$el.css('overflow-y') == 'auto' && $el[0].scrollHeight <= $el.innerHeight()
shouldPreventScroll = ($el, deltaY) ->
#... | #= require jquery.mousewheel
shouldUseNativeBehaviour = ($el) ->
# We explicitly only want a scrollbar when there is something to scroll (overflow-y: auto),
# but there isn't anything to scroll
$el.css('overflow-y') == 'auto' && $el[0].scrollHeight <= $el.innerHeight()
shouldPreventScroll = ($el, delta) ->
# ... | Revert "Compare deltaY instead of "normalized" delta" | Revert "Compare deltaY instead of "normalized" delta"
This reverts commit 52775026804f7e6866fb94100fd5c8f15618bc0a.
| CoffeeScript | mit | daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core |
b01a4aa041c6aaecef80cadb5277e86770b0906e | src/packages/markdown-preview/lib/markdown-preview-view.coffee | src/packages/markdown-preview/lib/markdown-preview-view.coffee | fs = require 'fs'
$ = require 'jquery'
ScrollView = require 'scroll-view'
{$$$} = require 'space-pen'
module.exports =
class MarkdownPreviewView extends ScrollView
registerDeserializer(this)
@deserialize: ({path}) ->
new MarkdownPreviewView(project.bufferForPath(path))
@content: ->
@div class: 'markdow... | fs = require 'fs'
$ = require 'jquery'
ScrollView = require 'scroll-view'
{$$$} = require 'space-pen'
module.exports =
class MarkdownPreviewView extends ScrollView
registerDeserializer(this)
@deserialize: ({path}) ->
new MarkdownPreviewView(project.bufferForPath(path))
@content: ->
@div class: 'markdow... | Allow markdown preview view to be scrolled with core:move-up/move-down | Allow markdown preview view to be scrolled with core:move-up/move-down | CoffeeScript | mit | devmario/atom,seedtigo/atom,RobinTec/atom,gisenberg/atom,mertkahyaoglu/atom,alexandergmann/atom,KENJU/atom,kaicataldo/atom,jjz/atom,vcarrera/atom,Ingramz/atom,woss/atom,Jandersolutions/atom,russlescai/atom,paulcbetts/atom,Galactix/atom,atom/atom,crazyquark/atom,nvoron23/atom,niklabh/atom,mnquintana/atom,stinsonga/atom,... |
525922585acab19b193dd0264c2fa1a86d5adb65 | app/assets/javascripts/replace_self_on_ajax_success.js.coffee | app/assets/javascripts/replace_self_on_ajax_success.js.coffee | $(document).on 'ajax:success', '[data-replace-self-on-ajax-success]', (event, data, status, xhr) ->
$(this).replaceWith(data)
$.fancybox.update()
| $(document).on 'ajax:success', '[data-replace-self-on-ajax-success]', (event, data, status, xhr) ->
newEl = $(data)
$(this).replaceWith(newEl)
newEl.trigger('replace:success')
| Replace on ajax:sucess triggers replace:success | Replace on ajax:sucess triggers replace:success
This makes the comment box resize correctly after a new comment is
posted.
| CoffeeScript | mit | RobinClowers/photo-album,RobinClowers/photo-album,RobinClowers/photo-album,RobinClowers/photo-album |
a9b9d65942659e77263fbf395f13d13a9625a40c | app/assets/javascripts/sprangular/controllers/checkout.coffee | app/assets/javascripts/sprangular/controllers/checkout.coffee | Sprangular.controller 'CheckoutCtrl', (
$scope,
$location,
countries,
order,
Status,
Account,
Cart,
Checkout,
Angularytics,
Env,
$translate
) ->
Status.setPageTitle('checkout.checkout')
user = Account.user
$scope.countries = countries
$scope.order = order
$scope.processing = false
$s... | Sprangular.controller 'CheckoutCtrl', (
$scope,
$location,
countries,
order,
Status,
Account,
Cart,
Checkout,
Angularytics,
Env,
$translate
) ->
Status.setPageTitle('checkout.checkout')
user = Account.user
$scope.order = order
$scope.secure = $location.protocol() == 'https'
$scope.curr... | Remove unused $scope attributes from Checkout controller | Remove unused $scope attributes from Checkout controller
| CoffeeScript | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular |
a0a0e47f5656ed63082cecc02c25e2384743adae | web/js/views/search_view.coffee | web/js/views/search_view.coffee | define ['jquery', 'underscore', 'backbone'], ($, _, Backbone) ->
class SearchView extends Backbone.View
el: $('#search')
events:
'submit form': 'searchRoute'
typeaheadOptions:
source: (query, process) ->
params = $.param { query: query }
$.getJSON "/autocomplete?#{params}", ... | define ['jquery', 'underscore', 'backbone', 'bootstrap'], ($, _, Backbone) ->
class SearchView extends Backbone.View
el: $('#search')
events:
'submit form': 'searchRoute'
typeaheadOptions:
source: (query, process) ->
params = $.param { query: query }
$.getJSON "/autocomplete... | Add bootsrap.js to SearchView dependencies. | Add bootsrap.js to SearchView dependencies.
| CoffeeScript | mit | reitti/reittiopas,reitti/reittiopas |
f5a02fcea28699716732b200db4f0ef410fbc66b | scoped-properties/language-haskell.cson | scoped-properties/language-haskell.cson | '.source.haskell':
'editor':
'increaseIndentPattern': '((^.*(=|\\bdo|\\bwhere|\\bthen|\\belse|\\bof)\\s*$)|(^.*\\bif(?!.*\\bthen\\b.*\\belse\\b.*).*$))'
'decreaseIndentPattern': '^\\s*$'
| '.source.haskell':
'editor':
'commentStart': '-- '
'increaseIndentPattern': '((^.*(=|\\bdo|\\bwhere|\\bthen|\\belse|\\bof)\\s*$)|(^.*\\bif(?!.*\\bthen\\b.*\\belse\\b.*).*$))'
'decreaseIndentPattern': '^\\s*$'
| Comment symbol to allow toggling comments | Comment symbol to allow toggling comments | CoffeeScript | mit | e-jigsaw/language-haskell,atom-haskell/language-haskell |
c7c587f0df077ff4444ecc2e2921ce0f68fbc229 | review_front/app/routes/application.coffee | review_front/app/routes/application.coffee | `import Ember from 'ember'`
Application = Ember.Route.extend
setupController: (controller, model)->
controller.set('current_user', @store.find('user', 'me'))
`export default Application`
| `import Ember from 'ember'`
Application = Ember.Route.extend
setupController: (controller, model)->
controller.set('current_user', @store.find('user', 'me'))
redirect: ->
@transitionTo('projects')
`export default Application`
| Add redirect in main route | Add redirect in main route
[#94794346]
| CoffeeScript | mit | Naturaily/review,Naturaily/review,Naturaily/review |
e7c7165a4a3aba0b9029b1eaca0dbdb1b93ea4b9 | app/assets/javascripts/controllers/TodoListController.js.coffee | app/assets/javascripts/controllers/TodoListController.js.coffee | angular.module('todoApp').controller "TodoListController", ($scope, Task) ->
$scope.init = (taskListId) ->
@taskService = new Task(taskListId)
$scope.tasks = @taskService.all()
$scope.addTask = ->
task = description: $scope.taskDescription
$scope.tasks.push(task)
@taskService.create(task)
| angular.module('todoApp').controller "TodoListController", ($scope, Task) ->
$scope.init = (taskListId) ->
@taskService = new Task(taskListId)
$scope.tasks = @taskService.all()
$scope.addTask = ->
task = description: $scope.taskDescription
$scope.tasks.unshift(task)
@taskService.create(task)
| Make new tasks appear at the top of the list. | Make new tasks appear at the top of the list.
| CoffeeScript | mit | eibay/todo-rails4-angularjs,eibay/todo-rails4-angularjs,hayatnoor/africa-rize-crud,danmayer/travel_calculator,mkwiatkowski/todo-rails4-angularjs,nzw3yl/sentinel,rabdulsal/AngularRails2,TetianaFilonenko/todo-rails4-angularjs,TetianaFilonenko/todo-rails4-angularjs,hayatnoor/africa-rize-crud,hayatnoor/africa-rize-crud,dan... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.