commit
stringlengths
40
40
old_file
stringlengths
9
134
new_file
stringlengths
9
134
old_contents
stringlengths
0
2.21k
new_contents
stringlengths
34
3.19k
subject
stringlengths
14
340
message
stringlengths
15
1.43k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
9
29k
f138a4860fcaefd277acfb3d11effde7d962ed8e
client/src/views/section_view.coffee
client/src/views/section_view.coffee
window.Backbone ||= {} window.Backbone.Views ||= {} class Backbone.Views.SectionView extends Backbone.Diorama.NestingView template: Handlebars.templates['section.hbs'] tagName: 'section' className: 'section-view' events: "click .add-narrative": "addNarrative" "click .add-visualisation": "addVisualisation" initialize: (options) -> @section = options.section render: => @closeSubViews() noContent = !@section.get('narrative')? and !@section.get('visualisation') @$el.html(@template( thisView: @ section: @section.toJSON() noContent: noContent narrative: @section.get('narrative') visualisation: @section.get('visualisation') )) @renderSubViews() return @ addNarrative: => @section.set('narrative', new Backbone.Models.Narrative()) @render() addVisualisation: => @section.set('visualisation', new Backbone.Models.Visualisation()) @render() onClose: -> @closeSubViews()
window.Backbone ||= {} window.Backbone.Views ||= {} class Backbone.Views.SectionView extends Backbone.Diorama.NestingView template: Handlebars.templates['section.hbs'] tagName: 'section' className: 'section-view' events: "click .add-narrative": "addNarrative" "click .add-visualisation": "addVisualisation" initialize: (options) -> @section = options.section render: => @closeSubViews() noContent = !@section.get('narrative')? and !@section.get('visualisation')? @$el.html(@template( thisView: @ section: @section.toJSON() noContent: noContent narrative: @section.get('narrative') visualisation: @section.get('visualisation') )) @renderSubViews() return @ addNarrative: => @section.set('narrative', new Backbone.Models.Narrative()) @render() addVisualisation: => @section.set('visualisation', new Backbone.Models.Visualisation()) @render() onClose: -> @closeSubViews()
Add missing ? to conditional
Add missing ? to conditional
CoffeeScript
bsd-3-clause
unepwcmc/NRT,unepwcmc/NRT
028157ea21c17e264baaee12baef9a508e2f1e00
client/source/views/base/mixins/form.coffee
client/source/views/base/mixins/form.coffee
_ = require 'underscore' module.exports = render: -> # Prepare any submit buttons for Ladda @$btn = @$('.ladda-button').ladda() # Automatically focus the first visible input _.defer => @$('.form-control:visible').eq(0).focus() formParams: -> # Uses jQuery formParams, but don't try to convert number values to numbers, etc. @$el.formParams no submit: (promise) -> @$btn.ladda 'start' promise.always( @$btn.ladda 'stop' ).fail( @renderServerErrors ) renderServerErrors: (res) => # First let's get rid of the old ones @$('.help-block').remove() @$('.has-error').removeClass('has-error') if errors = res?.responseJSON?.errors _.each errors, (error) => if error.type is 'required' message = '<span class="label label-danger">Required</span>' else message = error.message @$ """[name="#{error.path}"]""" .closest '.form-group' .find('.help-block').remove().end() .addClass 'has-error' .append """ <span class="help-block">#{message}</span> """ @$('.has-error').eq(0).find('[name]').focus()
_ = require 'underscore' module.exports = render: -> # Prepare any submit buttons for Ladda @$btn = @$('.ladda-button').ladda() # Automatically focus the first visible input _.defer => @$('.form-control:visible').eq(0).focus() formParams: -> # Uses jQuery formParams, but don't try to convert number values to numbers, etc. @$el.formParams no submit: (promise) -> @$btn.ladda 'start' promise.always( @$btn.ladda 'stop' ).fail( _.bind(@renderServerErrors, @) ) renderServerErrors: (res) -> # First let's get rid of the old ones @$('.help-block').remove() @$('.has-error').removeClass('has-error') if errors = res?.responseJSON?.errors _.each errors, (error) => if error.type is 'required' message = '<span class="label label-danger">Required</span>' else message = error.message @$ """[name="#{error.path}"]""" .closest '.form-group' .find('.help-block').remove().end() .addClass 'has-error' .append """ <span class="help-block">#{message}</span> """ @$('.has-error').eq(0).find('[name]').focus()
Fix for rendering server errors in new Form mixin
Fix for rendering server errors in new Form mixin
CoffeeScript
agpl-3.0
dut3062796s/buckets,nishant8BITS/buckets,edolyne/hive,bucketsio/buckets,mikesmithmsm/buckets,dut3062796s/buckets,bucketsio/buckets,mamute/buckets,edolyne/buckets,edolyne/buckets,asm-products/buckets,asm-products/buckets,edolyne/hive,artelse/buckets,mikesmithmsm/buckets,nishant8BITS/buckets,mamute/buckets,artelse/buckets
59d8095c1d6f3b1951663c875eb75ac0272384c7
client/skr/components/PrintFormChooser.cjsx
client/skr/components/PrintFormChooser.cjsx
class Skr.Components.PrintFormChooser extends Lanes.React.Component propTypes: label: React.PropTypes.string model: Lanes.PropTypes.Model.isRequired mixins: [ Lanes.React.Mixins.ReadEditingState ] onChange: -> (f) => @invoice.form = f renderEdit: (value) -> choices = @props.model.constructor.Templates <Lanes.Vendor.ReactWidgets.DropdownList data={choices} value={value} onChange={@onChange} /> renderValue: (value) -> value render: -> value = @props.model[@props.name or 'form'] or 'default' props = _.omit(@props, 'choices', 'name') <LC.FormGroup editing={@isEditingRecord()} className="field" {...props} > {if @isEditingRecord() then @renderEdit(value) else @renderValue(value)} </LC.FormGroup>
class Skr.Components.PrintFormChooser extends Lanes.React.Component propTypes: label: React.PropTypes.string.isRequired model: Lanes.PropTypes.Model.isRequired choices: React.PropTypes.array mixins: [ Lanes.React.Mixins.ReadEditingState ] onChange: (val) -> if @props.onChange @props.onChange?(val, @props) else @props.model[@props.name] = val renderEdit: (value) -> choices = @props.choices || @props.model.constructor.Templates <Lanes.Vendor.ReactWidgets.DropdownList data={choices} value={value} onChange={@onChange} /> renderValue: (value) -> value render: -> value = @props.value or @props.model[@props.name or 'form'] or 'default' props = _.omit(@props, 'choices', 'name') <LC.FormGroup editing={@isEditingRecord()} className="field" {...props} > {if @isEditingRecord() then @renderEdit(value) else @renderValue(value)} </LC.FormGroup>
Allow overriding get/set from props
Allow overriding get/set from props
CoffeeScript
agpl-3.0
argosity/stockor,argosity/stockor,argosity/stockor,argosity/stockor
8c43567e4ade481eb43b1d4246bc16c5514e8573
lib/sockets.coffee
lib/sockets.coffee
app = require('../config/app').app io = require('socket.io').listen(app) RepositorySchema = require('../models/repository').RepositorySchema io.sockets.on 'connection', (socket) -> RepositorySchema.pre 'save', (next) -> console.log 'socket.io sending repository event' socket.emit 'repository', 'repository': this next
app = require('../config/app').app io = require('socket.io').listen(app) RepositorySchema = require('../models/repository').RepositorySchema io.sockets.on 'connection', (socket) -> RepositorySchema.pre 'save', (next) -> console.log 'socket.io sending repository event' socket.emit 'repository', 'repository': this next()
Make sure to execute the next filter.
Make sure to execute the next filter.
CoffeeScript
mit
drip/drip
ef0bba68c7cfc3961a567fde6245779c33b27ce9
lib/helpers.coffee
lib/helpers.coffee
mkdirp = require 'mkdirp' fs = require 'fs' # # Convenient method for writing a file on # a path that might not exist. This function # will create all folders provided in the # path to the file. # # # writeToFile('/tmp/hi/folder/file.js', "console.log('hi')") # # will create a file at /tmp/hi/folder/file.js with provided content # writeToFile = (file, content) -> try fs.writeFileSync(file, content) catch e if e.code == 'ENOENT' or e.code == 'EBADF' splitted = file.split('/') mkdirp.sync(splitted.splice(0, splitted.length-1).join('/'), 0o0777) # Retry! writeToFile(file, content) else console.log e normalizeUrl = (url) -> protocol = url.match(/^(http|https):\/\//)?[0] protocol = '' unless protocol? url = url.replace(protocol, '') url = url.replace('//', '/') return protocol + url exports.writeToFile = writeToFile exports.normalizeUrl = normalizeUrl
mkdirp = require 'mkdirp' fs = require 'fs' # # Convenient method for writing a file on # a path that might not exist. This function # will create all folders provided in the # path to the file. # # # writeToFile('/tmp/hi/folder/file.js', "console.log('hi')") # # will create a file at /tmp/hi/folder/file.js with provided content # writeToFile = (file, content) -> try fs.writeFileSync(file, content) catch e if e.code == 'ENOENT' or e.code == 'EBADF' splitted = file.split('/') mkdirp.sync(splitted.splice(0, splitted.length-1).join('/'), 0o0777) # Retry! writeToFile(file, content) else console.log e normalizeUrl = (url) -> protocol = url.match(/^(http|https):\/\//)?[0] protocol = '' unless protocol? url = url.replace(protocol, '') url = url.replace('\\', '/') url = url.replace('//', '/') return protocol + url exports.writeToFile = writeToFile exports.normalizeUrl = normalizeUrl
Fix url normalization for Windows
Fix url normalization for Windows When bundle-up is called from Windows, it uses the file path to generate the compiled assets url, resulting in things like "/\generated\bundle\asdfg.css". This little patch fixes that.
CoffeeScript
mit
FGRibreau/bundle-up,Cowboy-coder/bundle-up,FGRibreau/bundle-up
ae85e3e2372b09afa1be5b49532ca99aca08e3ae
public/js/main.coffee
public/js/main.coffee
$ -> data = [ name: 'Original' participants: 100 conversions: 45 color: '#00aa00' , name: 'Variation' participants: 100 conversions: 50 color: 'blue' ] variations = [] variations.push new App.Variation item.name, item.color, item.participants, item.conversions for item in data calculator = new App.Calculator variations calculator.renderGraph()
$ -> data = title: 'Original vs Variation' variations: [ name: 'Original' participants: 100 conversions: 45 color: '#00aa00' , name: 'Variation' participants: 100 conversions: 50 color: '#0000ff' ] variations = [] variations.push new App.Variation item.name, item.color, item.participants, item.conversions for item in data.variations calculator = new App.Calculator data.title, variations calculator.render()
Add title to the chart
Add title to the chart
CoffeeScript
mit
mattm/abtestcalculator,mattm/abtestcalculator
93f3d0883c5701ee76902c0c857aa5af33a31153
client/ide/workspace/panel.coffee
client/ide/workspace/panel.coffee
class IDE.Panel extends KDView constructor: (options = {}, data) -> options.cssClass = KD.utils.curry 'panel', options.cssClass super options, data @panesContainer = [] @panes = [] @panesByName = {} @createLayout() createLayout: -> {layoutOptions} = @getOptions() unless layoutOptions throw new Error 'You should pass layoutOptions to create a panel' @layout = new IDE.WorkspaceLayoutBuilder { delegate: this, layoutOptions } @addSubView @layout createPane: (paneOptions) -> PaneClass = @getPaneClass paneOptions pane = new PaneClass paneOptions @panesByName[paneOptions.name] = pane if paneOptions.name @panes.push pane @emit 'NewPaneCreated', pane return pane getPaneClass: (paneOptions) -> paneType = paneOptions.type PaneClass = if paneType is 'custom' then paneOptions.paneClass else @findPaneClass paneType unless PaneClass throw new Error "PaneClass is not defined for \"#{paneOptions.type}\" pane type" return PaneClass findPaneClass: (paneType) -> paneClasses = terminal : IDE.TerminalPane editor : IDE.EditorPane preview : IDE.PreviewPane finder : IDE.FinderPane drawing : IDE.DrawingPane return paneClasses[paneType] getPaneByName: (name) -> return @panesByName[name] or null
class IDE.Panel extends KDView constructor: (options = {}, data) -> options.cssClass = KD.utils.curry 'panel', options.cssClass super options, data @panesContainer = [] @panes = [] @panesByName = {} @createLayout() createLayout: -> {layoutOptions} = @getOptions() unless layoutOptions throw new Error 'You should pass layoutOptions to create a panel' layoutOptions.delegate = this @layout = new IDE.WorkspaceLayoutBuilder layoutOptions @addSubView @layout createPane: (paneOptions) -> PaneClass = @getPaneClass paneOptions pane = new PaneClass paneOptions @panesByName[paneOptions.name] = pane if paneOptions.name @panes.push pane @emit 'NewPaneCreated', pane return pane getPaneClass: (paneOptions) -> paneType = paneOptions.type PaneClass = if paneType is 'custom' then paneOptions.paneClass else @findPaneClass paneType unless PaneClass throw new Error "PaneClass is not defined for \"#{paneOptions.type}\" pane type" return PaneClass findPaneClass: (paneType) -> paneClasses = terminal : IDE.TerminalPane editor : IDE.EditorPane preview : IDE.PreviewPane finder : IDE.FinderPane drawing : IDE.DrawingPane return paneClasses[paneType] getPaneByName: (name) -> return @panesByName[name] or null
Fix for new layout builder in Panel.
Fix for new layout builder in Panel.
CoffeeScript
agpl-3.0
mertaytore/koding,kwagdy/koding-1,cihangir/koding,mertaytore/koding,gokmen/koding,andrewjcasal/koding,alex-ionochkin/koding,alex-ionochkin/koding,koding/koding,mertaytore/koding,cihangir/koding,cihangir/koding,koding/koding,kwagdy/koding-1,jack89129/koding,rjeczalik/koding,jack89129/koding,gokmen/koding,jack89129/koding,mertaytore/koding,acbodine/koding,usirin/koding,cihangir/koding,sinan/koding,mertaytore/koding,szkl/koding,rjeczalik/koding,usirin/koding,jack89129/koding,kwagdy/koding-1,andrewjcasal/koding,acbodine/koding,drewsetski/koding,andrewjcasal/koding,cihangir/koding,sinan/koding,andrewjcasal/koding,szkl/koding,rjeczalik/koding,alex-ionochkin/koding,alex-ionochkin/koding,alex-ionochkin/koding,szkl/koding,andrewjcasal/koding,usirin/koding,drewsetski/koding,gokmen/koding,acbodine/koding,usirin/koding,koding/koding,kwagdy/koding-1,szkl/koding,usirin/koding,cihangir/koding,rjeczalik/koding,szkl/koding,jack89129/koding,gokmen/koding,sinan/koding,alex-ionochkin/koding,usirin/koding,acbodine/koding,gokmen/koding,sinan/koding,koding/koding,acbodine/koding,acbodine/koding,szkl/koding,cihangir/koding,rjeczalik/koding,cihangir/koding,rjeczalik/koding,sinan/koding,jack89129/koding,drewsetski/koding,drewsetski/koding,koding/koding,kwagdy/koding-1,koding/koding,gokmen/koding,koding/koding,drewsetski/koding,mertaytore/koding,drewsetski/koding,mertaytore/koding,acbodine/koding,koding/koding,jack89129/koding,usirin/koding,jack89129/koding,sinan/koding,alex-ionochkin/koding,kwagdy/koding-1,mertaytore/koding,szkl/koding,alex-ionochkin/koding,rjeczalik/koding,andrewjcasal/koding,usirin/koding,kwagdy/koding-1,sinan/koding,drewsetski/koding,gokmen/koding,andrewjcasal/koding,rjeczalik/koding,kwagdy/koding-1,szkl/koding,sinan/koding,acbodine/koding,gokmen/koding,andrewjcasal/koding,drewsetski/koding
9fc631f515b9c072710385288da10a85b1ddad27
client/controllers/smartEvents/smartEvent.coffee
client/controllers/smartEvents/smartEvent.coffee
SmartEvents = require '/imports/collections/smartEvents' Incidents = require '/imports/collections/incidentReports' #Allow multiple modals or the suggested locations list won't show after the #loading modal is hidden Modal.allowMultiple = true Template.smartEvent.onCreated -> @editState = new ReactiveVar false @eventId = new ReactiveVar() @autorun => eventId = Router.current().getParams()._id @eventId.set eventId @subscribe 'smartEvents', eventId, onReady: => event = SmartEvents.findOne(eventId) eventDateRange = event.dateRange query = disease: event.disease if eventDateRange query['dateRange.start'] = $lte: eventDateRange.end query['dateRange.end'] = $gte: eventDateRange.start @subscribe 'smartEventIncidents', query Template.smartEvent.onRendered -> new Clipboard '.copy-link' Template.smartEvent.helpers smartEvent: -> SmartEvents.findOne(Template.instance().eventId.get()) isEditing: -> Template.instance().editState.get() deleted: -> SmartEvents.findOne(Template.instance().eventId.get())?.deleted hasAssociatedIncidents: -> Incidents.find().count() incidentReportsTemplateData: -> incidents: Incidents.find({}, {sort: {'dateRange.end': 1}}) eventType: 'smart' Template.smartEvent.events 'click .edit-link, click #cancel-edit': (event, instance) -> instance.editState.set(not instance.editState.get())
SmartEvents = require '/imports/collections/smartEvents' Incidents = require '/imports/collections/incidentReports' #Allow multiple modals or the suggested locations list won't show after the #loading modal is hidden Modal.allowMultiple = true Template.smartEvent.onCreated -> @editState = new ReactiveVar false @eventId = new ReactiveVar() Template.smartEvent.onRendered -> eventId = Router.current().getParams()._id @eventId.set(eventId) @subscribe 'smartEvents', eventId @autorun => event = SmartEvents.findOne(eventId) if event eventDateRange = event.dateRange query = disease: event.disease if eventDateRange query['dateRange.start'] = $lte: eventDateRange.end query['dateRange.end'] = $gte: eventDateRange.start @subscribe 'smartEventIncidents', query Template.smartEvent.onRendered -> new Clipboard '.copy-link' Template.smartEvent.helpers smartEvent: -> SmartEvents.findOne(Template.instance().eventId.get()) isEditing: -> Template.instance().editState.get() deleted: -> SmartEvents.findOne(Template.instance().eventId.get())?.deleted hasAssociatedIncidents: -> Incidents.find().count() incidentReportsTemplateData: -> incidents: Incidents.find({}, sort: 'dateRange.end': 1) eventType: 'smart' Template.smartEvent.events 'click .edit-link, click #cancel-edit': (event, instance) -> instance.editState.set(not instance.editState.get())
Make IR query reactive when smart event is edited
Make IR query reactive when smart event is edited
CoffeeScript
apache-2.0
ecohealthalliance/eidr-connect,ecohealthalliance/eidr-connect,ecohealthalliance/eidr-connect,ecohealthalliance/eidr-connect
794cf80c7467758fba1a86c3adf38899577ada5d
src/app/units/unit-student-plagiarism-list/unit-student-plagiarism-list.coffee
src/app/units/unit-student-plagiarism-list/unit-student-plagiarism-list.coffee
angular.module('doubtfire.units.partials.unit-student-plagiarism-list',[]) # # List of all possible plagiarism detected in student's work # .directive('unitStudentPlagiarismList', -> replace: true restrict: 'E' templateUrl: 'units/unit-student-plagiarism-list/unit-student-plagiarism-list.tpl.html' controller: ($scope, $filter, currentUser, gradeService, projectService) -> $scope.grades = gradeService.grades $scope.view = "all-students" studentFilter = "allStudents" $scope.tutorName = currentUser.profile.name $scope.search = "" $scope.reverse = false $scope.currentPage = 1 $scope.maxSize = 5 $scope.pageSize = 15 $scope.assessingUnitRole = $scope.unitRole $scope.setActiveView = (kind) -> $scope.view = kind if kind == 'my-students' studentFilter = "myStudents" else studentFilter = "allStudents" $scope.activeStudent = null $scope.activeTask = null $scope.selectStudent = (student) -> $scope.activeStudent = student if student projectService.fetchDetailsForProject student, $scope.unit, (project) -> $scope.activeTask = _.find(student.tasks, (task) -> task.similar_to_count > 0) $scope.selectTask = (task) -> $scope.activeTask = task )
angular.module('doubtfire.units.unit-student-plagiarism-list',[]) # # List of all possible plagiarism detected in student's work # .directive('unitStudentPlagiarismList', -> replace: true restrict: 'E' templateUrl: 'units/unit-student-plagiarism-list/unit-student-plagiarism-list.tpl.html' controller: ($scope, $filter, currentUser, gradeService, projectService) -> $scope.grades = gradeService.grades $scope.view = "all-students" studentFilter = "allStudents" $scope.tutorName = currentUser.profile.name $scope.search = "" $scope.reverse = false $scope.currentPage = 1 $scope.maxSize = 5 $scope.pageSize = 15 $scope.assessingUnitRole = $scope.unitRole $scope.setActiveView = (kind) -> $scope.view = kind if kind == 'my-students' studentFilter = "myStudents" else studentFilter = "allStudents" $scope.activeStudent = null $scope.activeTask = null $scope.selectStudent = (student) -> $scope.activeStudent = student if student projectService.fetchDetailsForProject student, $scope.unit, (project) -> $scope.activeTask = _.find(student.tasks, (task) -> task.similar_to_count > 0) $scope.selectTask = (task) -> $scope.activeTask = task )
Remove 'partials' from module name of student plagiarism list
FIX: Remove 'partials' from module name of student plagiarism list
CoffeeScript
agpl-3.0
alexcu/doubtfire-web,final-year-project/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,final-year-project/doubtfire-web,alexcu/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web
75f2f25bcec0233a3a3aa224914749255774dae5
src/keyboard-layout.coffee
src/keyboard-layout.coffee
{Emitter} = require 'event-kit' {KeyboardLayoutObserver} = require '../build/Release/keyboard-layout-observer.node' emitter = new Emitter observer = new KeyboardLayoutObserver -> emitter.emit 'did-change-current-keyboard-layout', getCurrentKeyboardLayout() getCurrentKeyboardLayout = -> observer.getCurrentKeyboardLayout() getCurrentKeyboardLanguage = -> observer.getCurrentKeyboardLanguage() getInstalledKeyboardLanguages = -> rawList = observer.getInstalledKeyboardLanguages() ret = [] for item in rawList continue if ret.indexOf(item) >= 0 ret.push(item) ret onDidChangeCurrentKeyboardLayout = (callback) -> emitter.on 'did-change-current-keyboard-layout', callback observeCurrentKeyboardLayout = (callback) -> callback(getCurrentKeyboardLayout()) onDidChangeCurrentKeyboardLayout(callback) module.exports = {getCurrentKeyboardLayout, getCurrentKeyboardLanguage, getInstalledKeyboardLanguages, onDidChangeCurrentKeyboardLayout, observeCurrentKeyboardLayout}
{Emitter} = require 'event-kit' {KeyboardLayoutObserver} = require '../build/Release/keyboard-layout-observer.node' emitter = new Emitter observer = new KeyboardLayoutObserver -> emitter.emit 'did-change-current-keyboard-layout', getCurrentKeyboardLayout() getCurrentKeyboardLayout = -> observer.getCurrentKeyboardLayout() getCurrentKeyboardLanguage = -> observer.getCurrentKeyboardLanguage() getInstalledKeyboardLanguages = -> # NB: This method returns one language per input method, and users can have # >1 layout that matches a given language (i.e. Japanese probably has Hiragana # and Katakana, both would correspond to the language "ja"), so we need to # dedupe this list. rawList = observer.getInstalledKeyboardLanguages() ret = [] for item in rawList continue if ret.indexOf(item) >= 0 ret.push(item) ret onDidChangeCurrentKeyboardLayout = (callback) -> emitter.on 'did-change-current-keyboard-layout', callback observeCurrentKeyboardLayout = (callback) -> callback(getCurrentKeyboardLayout()) onDidChangeCurrentKeyboardLayout(callback) module.exports = {getCurrentKeyboardLayout, getCurrentKeyboardLanguage, getInstalledKeyboardLanguages, onDidChangeCurrentKeyboardLayout, observeCurrentKeyboardLayout}
Comment why we have this method
Comment why we have this method
CoffeeScript
mit
atom/keyboard-layout,atom/keyboard-layout,atom/keyboard-layout
507e56025f3830fcfe0a9abf70a33f996efb9bc7
client/landing/app/Applications/Chat.kdapplication/Controllers/conversationlistcontroller.coffee
client/landing/app/Applications/Chat.kdapplication/Controllers/conversationlistcontroller.coffee
class ChatConversationListController extends CommonChatController constructor:-> super @getListView().on 'moveToIndexRequested', @bound 'moveItemToIndex' # loadItems:(callback)-> # super # @me.fetchFollowersWithRelationship {}, {}, (err, accounts)=> # @instantiateListItems accounts unless err
class ChatConversationListController extends CommonChatController constructor:-> super @getListView().on 'moveToIndexRequested', @bound 'moveItemToIndex' addItem:(data)-> # Make sure there is one conversation with same channel name {chatChannel} = data for chat in @itemsOrdered return if chat.conversation?.channel?.name is chatChannel?.name super data
Make sure there is one conversation with same channel name in the conversation list
Make sure there is one conversation with same channel name in the conversation list
CoffeeScript
agpl-3.0
gokmen/koding,andrewjcasal/koding,alex-ionochkin/koding,sinan/koding,drewsetski/koding,acbodine/koding,usirin/koding,jack89129/koding,mertaytore/koding,mertaytore/koding,mertaytore/koding,kwagdy/koding-1,drewsetski/koding,alex-ionochkin/koding,andrewjcasal/koding,alex-ionochkin/koding,andrewjcasal/koding,drewsetski/koding,kwagdy/koding-1,drewsetski/koding,koding/koding,rjeczalik/koding,acbodine/koding,szkl/koding,kwagdy/koding-1,koding/koding,andrewjcasal/koding,usirin/koding,cihangir/koding,gokmen/koding,alex-ionochkin/koding,kwagdy/koding-1,rjeczalik/koding,alex-ionochkin/koding,alex-ionochkin/koding,usirin/koding,andrewjcasal/koding,usirin/koding,alex-ionochkin/koding,mertaytore/koding,cihangir/koding,cihangir/koding,acbodine/koding,jack89129/koding,koding/koding,rjeczalik/koding,jack89129/koding,gokmen/koding,mertaytore/koding,cihangir/koding,rjeczalik/koding,koding/koding,acbodine/koding,usirin/koding,gokmen/koding,kwagdy/koding-1,kwagdy/koding-1,drewsetski/koding,usirin/koding,mertaytore/koding,andrewjcasal/koding,sinan/koding,acbodine/koding,jack89129/koding,jack89129/koding,acbodine/koding,jack89129/koding,szkl/koding,gokmen/koding,mertaytore/koding,rjeczalik/koding,cihangir/koding,szkl/koding,acbodine/koding,szkl/koding,andrewjcasal/koding,drewsetski/koding,usirin/koding,kwagdy/koding-1,andrewjcasal/koding,jack89129/koding,koding/koding,rjeczalik/koding,szkl/koding,cihangir/koding,gokmen/koding,cihangir/koding,szkl/koding,rjeczalik/koding,drewsetski/koding,gokmen/koding,koding/koding,koding/koding,rjeczalik/koding,drewsetski/koding,sinan/koding,sinan/koding,koding/koding,sinan/koding,sinan/koding,sinan/koding,jack89129/koding,alex-ionochkin/koding,kwagdy/koding-1,cihangir/koding,usirin/koding,szkl/koding,gokmen/koding,acbodine/koding,sinan/koding,szkl/koding,mertaytore/koding
683eee1ffd48af59b13274c7415bc26d6718f1ce
src/scripts/corgime.coffee
src/scripts/corgime.coffee
# Description: # Corgime # # Dependencies: # None # # Configuration: # None # # Commands: # hubot corgi me - Receive a corgi # hubot corgi bomb N - get N corgis # # Author: # alexgodin module.exports = (robot) -> robot.respond /corgi me/i, (msg) -> msg.http("http://corginator.herokuapp.com/random") .get() (err, res, body) -> msg.send JSON.parse(body).corgi robot.respond /corgi bomb( (\d+))?/i, (msg) -> count = msg.match[2] || 5 msg.http("http://corginator.heroku.com/bomb?count=" + count) .get() (err, res, body) -> msg.send corgi for corgi in JSON.parse(body).corgis
# Description: # Corgime # # Dependencies: # None # # Configuration: # None # # Commands: # hubot corgi me - Receive a corgi # hubot corgi bomb N - get N corgis # # Author: # alexgodin module.exports = (robot) -> robot.respond /corgi me/i, (msg) -> msg.http("http://corginator.herokuapp.com/random") .get() (err, res, body) -> msg.send JSON.parse(body).corgi robot.respond /corgi bomb( (\d+))?/i, (msg) -> count = msg.match[2] || 5 msg.http("http://corginator.herokuapp.com/bomb?count=" + count) .get() (err, res, body) -> msg.send corgi for corgi in JSON.parse(body).corgis
Fix corgi bomb backend url
Fix corgi bomb backend url Let corgis fly in.
CoffeeScript
mit
yigitbey/hubot-scripts,dbkaplun/hubot-scripts,phillipalexander/hubot-scripts,n0mer/hubot-scripts,Ev1l/hubot-scripts,opentable/hubot-scripts,iilab/hubot-scripts,zecahnin/hubot-scripts,MaxMEllon/hubot-scripts,sklise/hubot-scripts,wsoula/hubot-scripts,alexhouse/hubot-scripts,jacobtomlinson/hubot-scripts,ambikads/hubot-scripts,ericjsilva/hubot-scripts,GrimDerp/hubot-scripts,contolini/hubot-scripts,github/hubot-scripts,marksie531/hubot-scripts,arcaartem/hubot-scripts,jankowiakmaria/hubot-scripts,jan0sch/hubot-scripts,modulexcite/hubot-scripts,terryjbates/hubot-scripts,chauffer/hubot-scripts,azimman/hubot-scripts,justinwoo/hubot-scripts,magicstone1412/hubot-scripts,cycomachead/hubot-scripts,davidsulpy/hubot-scripts
6e73b436f7831999bc6c2f100153a68aa91d4705
core/app/backbone/factlink/tooltip_marionette.coffee
core/app/backbone/factlink/tooltip_marionette.coffee
Backbone.Factlink ||= {} do -> #options: # parentView: marionette view # tooltipViewFactory: -> view # selector: selector identifying what can be hovered over. # $offsetParent: a dom node within which to position the # tooltip with respect to the target (hovered) node. By # default, uses parentView.$el. Backbone.Factlink.Tooltip = (options) -> positionedRegion = null maker = ($el, $target) -> throw "Cannot open duplicate tooltip" if positionedRegion? regionOptions = _.extend {}, options, contentView: options.tooltipViewFactory() positionedRegion = new Backbone.Factlink.PositionedRegion regionOptions positionedRegion.bindToElement $target, options.$offsetParent || $el positionedRegion.show new PopoverView regionOptions positionedRegion.updatePosition() positionedRegion.$el remover = -> positionedRegion.resetFade() positionedRegion = null closeHandler = Backbone.Factlink.TooltipJQ $el: options.parentView.$el selector: options.selector makeTooltip: maker removeTooltip: remover options.parentView.on 'close', closeHandler.close
Backbone.Factlink ||= {} #options: # parentView: marionette view # tooltipViewFactory: -> view # selector: selector identifying what can be hovered over. # $offsetParent: a dom node within which to position the # tooltip with respect to the target (hovered) node. By # default, uses parentView.$el. Backbone.Factlink.Tooltip = (options) -> positionedRegion = new Backbone.Factlink.PositionedRegion options maker = ($el, $target) -> popoverOptions = _.extend {}, options, contentView: options.tooltipViewFactory() positionedRegion.bindToElement $target, options.$offsetParent || $el positionedRegion.show new PopoverView popoverOptions positionedRegion.updatePosition() positionedRegion.$el remover = -> positionedRegion.resetFade() closeHandler = Backbone.Factlink.TooltipJQ $el: options.parentView.$el selector: options.selector makeTooltip: maker removeTooltip: remover options.parentView.on 'close', closeHandler.close
Remove unnecessary do nesting; there are no private variables in this scope.
Remove unnecessary do nesting; there are no private variables in this scope.
CoffeeScript
mit
Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core
5d60b9ba4e8f0048b8f22098fd186e7979136529
spec/body-spec.coffee
spec/body-spec.coffee
describe 'Body', -> Body = require '../lib/javascripts/body' view = null initView = ({ collection } = {}) -> collection ?= new Backbone.Collection [ { foo: 'foo', bar: 'bar' } ] view = new Body { collection } showView = -> initView(arguments...).render() afterEach -> view?.destroy() view = null it 'has a className', -> expect(showView().$el).toHaveClass 'body' it 'has many body rows', -> expect(showView().$el.children).not.toBeEmpty()
describe 'Body', -> Body = require '../lib/javascripts/body' view = null initView = ({ collection } = {}) -> collection ?= new Backbone.Collection [ { foo: 'foo', bar: 'bar' } ] view = new Body { collection } showView = -> initView(arguments...).render() afterEach -> view?.destroy() view = null it 'has a className', -> expect(showView().$el).toHaveClass 'body' it 'has many body rows', -> expect(showView().$el).not.toBeEmpty()
Fix bad spec: children is a function and it should actually assert the collection view not to be empty
Fix bad spec: children is a function and it should actually assert the collection view not to be empty
CoffeeScript
mit
juanca/marionette-tree,juanca/marionette-tree
8430e991d6913651a025c01474fcb09def14a9ae
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
# This is a manifest file that'll be compiled into including all the files listed below. # Add new JavaScript/Coffee code in separate files in this directory and they'll automatically # be included in the compiled file accessible from http://example.com/assets/application.js # It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the # the compiled file. # #= require jquery #= require jquery_ujs #= require foundation/foundation #= require foundation/foundation.alerts #= require foundation/foundation.clearing #= require foundation/foundation.cookie #= require foundation/foundation.dropdown #= require foundation/foundation.forms #= require foundation/foundation.joyride #= require foundation/foundation.magellan #= require foundation/foundation.orbit #= require foundation/foundation.reveal #= require foundation/foundation.section #= require foundation/foundation.tooltips #= require foundation/foundation.topbar #= require foundation/foundation.interchange #= require foundation/foundation.placeholder #= require foundation/foundation.abide #= require_tree . $ -> $(document).foundation() $(".notice").not(".alert").delay(3000).slideUp "slow"
# This is a manifest file that'll be compiled into including all the files listed below. # Add new JavaScript/Coffee code in separate files in this directory and they'll automatically # be included in the compiled file accessible from http://example.com/assets/application.js # It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the # the compiled file. # #= require jquery #= require jquery_ujs #= require foundation/foundation #= require foundation/foundation.alerts #= require foundation/foundation.clearing #= require foundation/foundation.cookie #= require foundation/foundation.dropdown #= require foundation/foundation.forms #= require foundation/foundation.joyride #= require foundation/foundation.magellan #= require foundation/foundation.orbit #= require foundation/foundation.reveal #= require foundation/foundation.section #= require foundation/foundation.tooltips #= require foundation/foundation.topbar #= require foundation/foundation.interchange #= require foundation/foundation.placeholder #= require foundation/foundation.abide #= require_tree . $ -> $(document).foundation()
Remove slide animation for alerts
Remove slide animation for alerts
CoffeeScript
apache-2.0
martinisoft/funnies,martinisoft/funnies
c7373ebbe2d08ab5c5699d88e51becbbc343c73f
src/librato.coffee
src/librato.coffee
Client = require 'librato' module.exports = new Client \ process.env.LIBRATO_USER, \ process.env.LIBRATO_TOKEN, \ prefix: process.env.LIBRATO_PREFIX, source: process.env.DOTCLOUD_SERVICE_ID
Client = require 'librato' module.exports = new Client \ process.env.LIBRATO_USER, \ process.env.LIBRATO_TOKEN, \ prefix: process.env.LIBRATO_PREFIX, source: process.env.DOTCLOUD_SERVICE_ID or 'test'
Add default Librato source as "test"
Add default Librato source as "test"
CoffeeScript
mit
Turistforeningen/Jotunheimr
32753fc4ab5c5ea45f8760be53815ec2b4977bd3
stress_test.coffee
stress_test.coffee
# vim: ts=2:sw=2:sta io = require('socket.io-client') url = process.env.TEST_TARGET || 'https://snap-backend-dev.herokuapp.com' #'http://localhost:8080' users = process.env.USERS || 50 randWord = (len) -> Math.random().toString(36).substr(2, len) startPlayer = (name) -> socket = io(url, {multiplex: false}) socket.on 'connect', ()-> setTimeout () -> socket.emit 'new player', name console.log "connected a test player #{name}" setInterval () -> w = randWord(2) socket.emit 'new word', w console.log "#{name} wrote: #{w}" , 1000 , Math.random()*2000 for a in [0..users] startPlayer(process.env.TEST_NAME || "player #{a}") # console.log randWord(2)
# vim: ts=2:sw=2:sta io = require('socket.io-client') url = process.env.TEST_TARGET || 'https://snap-backend-dev.herokuapp.com' #'http://localhost:8080' users = process.env.USERS || 50 WORD_CHARS = "abcdefghijklmnopqrstuvwxyz" randWord = (len) -> word = "" for c in [1..len] index = Math.floor(Math.random() * WORD_CHARS.length) word += WORD_CHARS.charAt(index) return word startPlayer = (name) -> socket = io(url, {multiplex: false}) socket.on 'connect', ()-> setTimeout () -> socket.emit 'new player', name console.log "connected a test player #{name}" setInterval () -> w = randWord(2) socket.emit 'new word', w console.log "#{name} wrote: #{w}" , 1000 , Math.random()*users*100 for a in [1..users] startPlayer(process.env.TEST_NAME || "player #{a}") # console.log randWord(2)
Fix up the stress tester
Fix up the stress tester - bring players out at 10 players/s - bring back 2-letter words (no numbers)
CoffeeScript
mit
CMS611-snap/snap-backend,CMS611-snap/snap-backend,CMS611-snap/snap-backend
96d8721c9e378f0e0d22c8a1de1d97ab88d58276
src/message.coffee
src/message.coffee
module.exports = class Message constructor: (@type, @message, @options={}) -> getType: -> @type getMessage: -> @message isClosable: -> !!@options.closable getIcon: -> return @options.icon if @options.icon? switch @type when 'fatal' then 'flame' when 'error' then 'bug' when 'warning' then 'alert' when 'info' then 'info' when 'success' then 'check' getIssueUrl: -> "https://github.com/atom/atom/issues/new?title=#{encodeURI(@getIssueTitle())}&body=#{encodeURI(@getIssueBody())}" getIssueTitle: -> @message getIssueBody: -> # TODO: crib version information from bug-report: https://github.com/lee-dohm/bug-report/blob/master/lib/bug-report.coffee#L69 """ There was an unhandled error Stack Trace ``` At #{@options.errorDetail} #{@options.stack} ``` """
# Experimental: This will likely change, do not use. module.exports = class Message constructor: (@type, @message, @options={}) -> getOptions: -> @options getType: -> @type getMessage: -> @message getDetail: -> @optons.detail isClosable: -> !!@options.closable getIcon: -> return @options.icon if @options.icon? switch @type when 'fatal' then 'flame' when 'error' then 'bug' when 'warning' then 'alert' when 'info' then 'info' when 'success' then 'check' getIssueUrl: -> "https://github.com/atom/atom/issues/new?title=#{encodeURI(@getIssueTitle())}&body=#{encodeURI(@getIssueBody())}" getIssueTitle: -> @message getIssueBody: -> # TODO: crib version information from bug-report: https://github.com/lee-dohm/bug-report/blob/master/lib/bug-report.coffee#L69 """ There was an unhandled error Stack Trace ``` At #{@options.detail} #{@options.stack} ``` """
Add some things to Message
Add some things to Message
CoffeeScript
mit
bsmr-x-script/atom,acontreras89/atom,yomybaby/atom,dannyflax/atom,qskycolor/atom,jordanbtucker/atom,SlimeQ/atom,omarhuanca/atom,basarat/atom,tony612/atom,Jandersolutions/atom,KENJU/atom,mrodalgaard/atom,synaptek/atom,targeter21/atom,rsvip/aTom,pengshp/atom,bcoe/atom,nvoron23/atom,sillvan/atom,mertkahyaoglu/atom,rmartin/atom,RuiDGoncalves/atom,fscherwi/atom,darwin/atom,constanzaurzua/atom,florianb/atom,charleswhchan/atom,FoldingText/atom,isghe/atom,G-Baby/atom,woss/atom,kdheepak89/atom,phord/atom,hellendag/atom,rlugojr/atom,Shekharrajak/atom,Jandersoft/atom,yamhon/atom,0x73/atom,ralphtheninja/atom,jordanbtucker/atom,fscherwi/atom,tanin47/atom,kc8wxm/atom,isghe/atom,palita01/atom,paulcbetts/atom,sxgao3001/atom,kjav/atom,chengky/atom,ali/atom,alexandergmann/atom,vinodpanicker/atom,tony612/atom,kandros/atom,matthewclendening/atom,rsvip/aTom,seedtigo/atom,yomybaby/atom,prembasumatary/atom,nrodriguez13/atom,Andrey-Pavlov/atom,bsmr-x-script/atom,liuxiong332/atom,SlimeQ/atom,Arcanemagus/atom,elkingtonmcb/atom,nvoron23/atom,boomwaiza/atom,cyzn/atom,DiogoXRP/atom,jjz/atom,hakatashi/atom,john-kelly/atom,isghe/atom,kandros/atom,harshdattani/atom,ppamorim/atom,lovesnow/atom,Dennis1978/atom,toqz/atom,qskycolor/atom,anuwat121/atom,andrewleverette/atom,mostafaeweda/atom,rjattrill/atom,rlugojr/atom,omarhuanca/atom,Austen-G/BlockBuilder,Sangaroonaom/atom,fredericksilva/atom,isghe/atom,crazyquark/atom,Klozz/atom,hharchani/atom,Hasimir/atom,gabrielPeart/atom,mnquintana/atom,pengshp/atom,NunoEdgarGub1/atom,xream/atom,acontreras89/atom,lovesnow/atom,Jdesk/atom,hagb4rd/atom,pombredanne/atom,folpindo/atom,prembasumatary/atom,batjko/atom,john-kelly/atom,sekcheong/atom,RobinTec/atom,acontreras89/atom,lisonma/atom,rjattrill/atom,wiggzz/atom,tmunro/atom,qiujuer/atom,bolinfest/atom,t9md/atom,basarat/atom,wiggzz/atom,jacekkopecky/atom,sxgao3001/atom,helber/atom,batjko/atom,FIT-CSE2410-A-Bombs/atom,champagnez/atom,sillvan/atom,scippio/atom,ykeisuke/atom,qiujuer/atom,vcarrera/atom,ObviouslyGreen/atom,Abdillah/atom,dsandstrom/atom,pkdevbox/atom,Jandersolutions/atom,vhutheesing/atom,jtrose2/atom,kc8wxm/atom,jacekkopecky/atom,h0dgep0dge/atom,ReddTea/atom,abcP9110/atom,johnrizzo1/atom,kevinrenaers/atom,alfredxing/atom,AlexxNica/atom,Klozz/atom,GHackAnonymous/atom,lovesnow/atom,ezeoleaf/atom,jeremyramin/atom,rmartin/atom,Galactix/atom,svanharmelen/atom,me-benni/atom,liuxiong332/atom,devoncarew/atom,deoxilix/atom,NunoEdgarGub1/atom,liuderchi/atom,Austen-G/BlockBuilder,liuxiong332/atom,chfritz/atom,stuartquin/atom,charleswhchan/atom,tanin47/atom,brettle/atom,russlescai/atom,stinsonga/atom,Arcanemagus/atom,champagnez/atom,jlord/atom,FoldingText/atom,rmartin/atom,mostafaeweda/atom,synaptek/atom,acontreras89/atom,dannyflax/atom,fredericksilva/atom,Rodjana/atom,MjAbuz/atom,me6iaton/atom,folpindo/atom,sebmck/atom,helber/atom,lovesnow/atom,RuiDGoncalves/atom,xream/atom,FoldingText/atom,Andrey-Pavlov/atom,dijs/atom,AlbertoBarrago/atom,jjz/atom,phord/atom,medovob/atom,kdheepak89/atom,ReddTea/atom,Jonekee/atom,originye/atom,johnhaley81/atom,avdg/atom,batjko/atom,bencolon/atom,ali/atom,devmario/atom,Andrey-Pavlov/atom,tjkr/atom,AlbertoBarrago/atom,AdrianVovk/substance-ide,toqz/atom,bolinfest/atom,kc8wxm/atom,YunchengLiao/atom,lpommers/atom,dsandstrom/atom,john-kelly/atom,Huaraz2/atom,Shekharrajak/atom,harshdattani/atom,tmunro/atom,champagnez/atom,burodepeper/atom,bryonwinger/atom,jtrose2/atom,medovob/atom,kandros/atom,darwin/atom,BogusCurry/atom,RobinTec/atom,beni55/atom,targeter21/atom,synaptek/atom,AlisaKiatkongkumthon/atom,devmario/atom,Andrey-Pavlov/atom,scv119/atom,Shekharrajak/atom,n-riesco/atom,stinsonga/atom,sotayamashita/atom,hpham04/atom,me6iaton/atom,hharchani/atom,dkfiresky/atom,NunoEdgarGub1/atom,yangchenghu/atom,cyzn/atom,oggy/atom,hellendag/atom,PKRoma/atom,jlord/atom,panuchart/atom,originye/atom,lovesnow/atom,sxgao3001/atom,PKRoma/atom,KENJU/atom,brettle/atom,anuwat121/atom,ivoadf/atom,Abdillah/atom,brumm/atom,yangchenghu/atom,gontadu/atom,bcoe/atom,AdrianVovk/substance-ide,pombredanne/atom,Dennis1978/atom,vinodpanicker/atom,deepfox/atom,panuchart/atom,florianb/atom,Locke23rus/atom,devmario/atom,hpham04/atom,Mokolea/atom,sebmck/atom,matthewclendening/atom,gzzhanghao/atom,yomybaby/atom,kjav/atom,vcarrera/atom,atom/atom,boomwaiza/atom,ReddTea/atom,Jdesk/atom,gisenberg/atom,Ju2ender/atom,AlisaKiatkongkumthon/atom,tisu2tisu/atom,kaicataldo/atom,jeremyramin/atom,Galactix/atom,rookie125/atom,constanzaurzua/atom,toqz/atom,rxkit/atom,yomybaby/atom,RobinTec/atom,ppamorim/atom,bj7/atom,vhutheesing/atom,einarmagnus/atom,crazyquark/atom,ppamorim/atom,hagb4rd/atom,kittens/atom,yamhon/atom,devmario/atom,ironbox360/atom,vcarrera/atom,nucked/atom,vhutheesing/atom,splodingsocks/atom,amine7536/atom,fedorov/atom,devoncarew/atom,oggy/atom,ilovezy/atom,Jonekee/atom,omarhuanca/atom,AlbertoBarrago/atom,gisenberg/atom,pombredanne/atom,svanharmelen/atom,decaffeinate-examples/atom,mostafaeweda/atom,hakatashi/atom,rjattrill/atom,fredericksilva/atom,Jandersoft/atom,synaptek/atom,tony612/atom,fredericksilva/atom,bolinfest/atom,GHackAnonymous/atom,woss/atom,svanharmelen/atom,amine7536/atom,hharchani/atom,rsvip/aTom,mertkahyaoglu/atom,Rodjana/atom,scv119/atom,batjko/atom,amine7536/atom,sebmck/atom,deepfox/atom,kittens/atom,dannyflax/atom,sekcheong/atom,transcranial/atom,jlord/atom,scippio/atom,sxgao3001/atom,n-riesco/atom,florianb/atom,jtrose2/atom,kaicataldo/atom,n-riesco/atom,folpindo/atom,Galactix/atom,kittens/atom,sillvan/atom,ezeoleaf/atom,targeter21/atom,ardeshirj/atom,gzzhanghao/atom,sekcheong/atom,johnrizzo1/atom,Neron-X5/atom,toqz/atom,bj7/atom,mostafaeweda/atom,paulcbetts/atom,Locke23rus/atom,deoxilix/atom,jeremyramin/atom,MjAbuz/atom,fang-yufeng/atom,g2p/atom,russlescai/atom,kdheepak89/atom,jlord/atom,Ju2ender/atom,deoxilix/atom,matthewclendening/atom,rsvip/aTom,chfritz/atom,codex8/atom,brumm/atom,Dennis1978/atom,AlexxNica/atom,YunchengLiao/atom,Abdillah/atom,rookie125/atom,ezeoleaf/atom,Neron-X5/atom,Mokolea/atom,G-Baby/atom,ali/atom,rookie125/atom,Galactix/atom,tjkr/atom,crazyquark/atom,tisu2tisu/atom,chengky/atom,jjz/atom,gabrielPeart/atom,vinodpanicker/atom,ObviouslyGreen/atom,brumm/atom,rjattrill/atom,avdg/atom,001szymon/atom,constanzaurzua/atom,Neron-X5/atom,vinodpanicker/atom,hagb4rd/atom,BogusCurry/atom,ali/atom,beni55/atom,me6iaton/atom,niklabh/atom,devoncarew/atom,batjko/atom,amine7536/atom,charleswhchan/atom,Ju2ender/atom,bcoe/atom,ashneo76/atom,GHackAnonymous/atom,fedorov/atom,GHackAnonymous/atom,kc8wxm/atom,splodingsocks/atom,nucked/atom,mdumrauf/atom,me6iaton/atom,vjeux/atom,andrewleverette/atom,0x73/atom,Jandersoft/atom,lpommers/atom,CraZySacX/atom,kjav/atom,ivoadf/atom,MjAbuz/atom,fang-yufeng/atom,SlimeQ/atom,xream/atom,omarhuanca/atom,hpham04/atom,nvoron23/atom,ReddTea/atom,basarat/atom,toqz/atom,bcoe/atom,fedorov/atom,kittens/atom,kdheepak89/atom,brettle/atom,davideg/atom,basarat/atom,anuwat121/atom,h0dgep0dge/atom,Austen-G/BlockBuilder,ralphtheninja/atom,ironbox360/atom,hakatashi/atom,MjAbuz/atom,amine7536/atom,yamhon/atom,crazyquark/atom,t9md/atom,ReddTea/atom,transcranial/atom,ralphtheninja/atom,qskycolor/atom,Jandersolutions/atom,charleswhchan/atom,Ju2ender/atom,FIT-CSE2410-A-Bombs/atom,hakatashi/atom,hellendag/atom,ashneo76/atom,matthewclendening/atom,Shekharrajak/atom,0x73/atom,g2p/atom,charleswhchan/atom,liuxiong332/atom,Locke23rus/atom,Austen-G/BlockBuilder,GHackAnonymous/atom,YunchengLiao/atom,vjeux/atom,qiujuer/atom,codex8/atom,Jdesk/atom,prembasumatary/atom,Ju2ender/atom,KENJU/atom,jacekkopecky/atom,liuderchi/atom,tanin47/atom,boomwaiza/atom,vinodpanicker/atom,bryonwinger/atom,ivoadf/atom,stuartquin/atom,dijs/atom,Huaraz2/atom,einarmagnus/atom,codex8/atom,Andrey-Pavlov/atom,sekcheong/atom,chengky/atom,ilovezy/atom,001szymon/atom,efatsi/atom,liuderchi/atom,seedtigo/atom,sillvan/atom,Ingramz/atom,yomybaby/atom,devmario/atom,deepfox/atom,panuchart/atom,Rychard/atom,sxgao3001/atom,johnhaley81/atom,dkfiresky/atom,yalexx/atom,nucked/atom,abcP9110/atom,gisenberg/atom,kevinrenaers/atom,transcranial/atom,bryonwinger/atom,dkfiresky/atom,mrodalgaard/atom,efatsi/atom,davideg/atom,daxlab/atom,wiggzz/atom,Shekharrajak/atom,beni55/atom,bencolon/atom,einarmagnus/atom,Hasimir/atom,florianb/atom,dsandstrom/atom,mnquintana/atom,basarat/atom,mostafaeweda/atom,woss/atom,rxkit/atom,Austen-G/BlockBuilder,Neron-X5/atom,alexandergmann/atom,Klozz/atom,jtrose2/atom,devoncarew/atom,Jandersolutions/atom,Galactix/atom,palita01/atom,RobinTec/atom,sillvan/atom,omarhuanca/atom,Neron-X5/atom,Jandersolutions/atom,Jonekee/atom,darwin/atom,avdg/atom,jtrose2/atom,hharchani/atom,kjav/atom,dannyflax/atom,bj7/atom,FoldingText/atom,t9md/atom,n-riesco/atom,h0dgep0dge/atom,liuderchi/atom,sebmck/atom,ObviouslyGreen/atom,vjeux/atom,decaffeinate-examples/atom,CraZySacX/atom,dsandstrom/atom,cyzn/atom,Rychard/atom,ilovezy/atom,splodingsocks/atom,jacekkopecky/atom,mdumrauf/atom,alexandergmann/atom,Rodjana/atom,jordanbtucker/atom,Sangaroonaom/atom,davideg/atom,BogusCurry/atom,burodepeper/atom,hharchani/atom,vjeux/atom,fang-yufeng/atom,bencolon/atom,ardeshirj/atom,daxlab/atom,rxkit/atom,NunoEdgarGub1/atom,Ingramz/atom,FIT-CSE2410-A-Bombs/atom,oggy/atom,fredericksilva/atom,daxlab/atom,bsmr-x-script/atom,hpham04/atom,g2p/atom,oggy/atom,DiogoXRP/atom,Austen-G/BlockBuilder,john-kelly/atom,targeter21/atom,phord/atom,einarmagnus/atom,tony612/atom,Hasimir/atom,andrewleverette/atom,pkdevbox/atom,chengky/atom,efatsi/atom,alfredxing/atom,dannyflax/atom,deepfox/atom,palita01/atom,lpommers/atom,pombredanne/atom,tjkr/atom,ppamorim/atom,001szymon/atom,dsandstrom/atom,russlescai/atom,kdheepak89/atom,paulcbetts/atom,RobinTec/atom,ardeshirj/atom,mertkahyaoglu/atom,davideg/atom,tmunro/atom,G-Baby/atom,basarat/atom,n-riesco/atom,jjz/atom,johnhaley81/atom,nvoron23/atom,prembasumatary/atom,bryonwinger/atom,qiujuer/atom,dannyflax/atom,pombredanne/atom,ppamorim/atom,chengky/atom,sebmck/atom,dkfiresky/atom,constanzaurzua/atom,stuartquin/atom,helber/atom,tisu2tisu/atom,ironbox360/atom,splodingsocks/atom,paulcbetts/atom,crazyquark/atom,Sangaroonaom/atom,FoldingText/atom,mnquintana/atom,ali/atom,john-kelly/atom,Mokolea/atom,mnquintana/atom,woss/atom,gisenberg/atom,me-benni/atom,devoncarew/atom,qskycolor/atom,russlescai/atom,YunchengLiao/atom,Jdesk/atom,jlord/atom,niklabh/atom,gabrielPeart/atom,RuiDGoncalves/atom,gisenberg/atom,matthewclendening/atom,hagb4rd/atom,nvoron23/atom,ilovezy/atom,burodepeper/atom,gontadu/atom,Rychard/atom,elkingtonmcb/atom,synaptek/atom,scippio/atom,originye/atom,Abdillah/atom,vcarrera/atom,kaicataldo/atom,mertkahyaoglu/atom,acontreras89/atom,medovob/atom,pengshp/atom,jacekkopecky/atom,chfritz/atom,mnquintana/atom,lisonma/atom,jacekkopecky/atom,deepfox/atom,fedorov/atom,codex8/atom,rlugojr/atom,russlescai/atom,harshdattani/atom,davideg/atom,ashneo76/atom,pkdevbox/atom,abcP9110/atom,decaffeinate-examples/atom,alfredxing/atom,liuxiong332/atom,atom/atom,DiogoXRP/atom,me-benni/atom,Jandersoft/atom,vcarrera/atom,yangchenghu/atom,yalexx/atom,SlimeQ/atom,hagb4rd/atom,scv119/atom,lisonma/atom,lisonma/atom,woss/atom,PKRoma/atom,rmartin/atom,niklabh/atom,prembasumatary/atom,einarmagnus/atom,hpham04/atom,atom/atom,ezeoleaf/atom,mdumrauf/atom,SlimeQ/atom,Jandersoft/atom,fedorov/atom,0x73/atom,vjeux/atom,isghe/atom,lisonma/atom,yalexx/atom,KENJU/atom,codex8/atom,fang-yufeng/atom,decaffeinate-examples/atom,ykeisuke/atom,abcP9110/atom,kjav/atom,stinsonga/atom,targeter21/atom,Hasimir/atom,Ingramz/atom,bcoe/atom,Jdesk/atom,constanzaurzua/atom,oggy/atom,sekcheong/atom,ykeisuke/atom,YunchengLiao/atom,johnrizzo1/atom,seedtigo/atom,dkfiresky/atom,nrodriguez13/atom,nrodriguez13/atom,scv119/atom,qiujuer/atom,Huaraz2/atom,MjAbuz/atom,h0dgep0dge/atom,FoldingText/atom,rsvip/aTom,Abdillah/atom,sotayamashita/atom,me6iaton/atom,Arcanemagus/atom,KENJU/atom,kevinrenaers/atom,Hasimir/atom,NunoEdgarGub1/atom,gzzhanghao/atom,rmartin/atom,ilovezy/atom,yalexx/atom,AdrianVovk/substance-ide,kittens/atom,jjz/atom,AlexxNica/atom,CraZySacX/atom,gontadu/atom,tony612/atom,sotayamashita/atom,fang-yufeng/atom,stinsonga/atom,qskycolor/atom,kc8wxm/atom,fscherwi/atom,mertkahyaoglu/atom,dijs/atom,mrodalgaard/atom,AlisaKiatkongkumthon/atom,abcP9110/atom,florianb/atom,elkingtonmcb/atom,yalexx/atom
0f5ab3ff78a8d7ae47254343ad996b53e2142959
app/assets/javascripts/components/shortcut.coffee
app/assets/javascripts/components/shortcut.coffee
# ************************************* # # Shortcut # -> Trigger clicking an element after keyup # # ************************************* # # Dependencies # - Orientation.keyCodes # # ************************************* # # @param $element { jQuery object } # @param dataAttribute { string } # @param keyCodes { object } # # ************************************* @Orientation.shortcut = ( options ) -> settings = $.extend $element : $( '[data-shortcut]' ) dataAttribute : 'shortcut' keyCodes : Orientation.keyCodes , options settings.$element.each -> key = settings.keyCodes[ $(@).data( settings.dataAttribute ) ] $( document ).on 'keyup', ( event ) => $element = $(@) tag = event.target.tagName.toLowerCase() unless tag is 'input' or tag is 'textarea' if event.which is key $element.trigger( 'focus' ).trigger( 'click' ) if $element.prop( 'tagName' ).toLowerCase() is 'a' window.location = $element.attr( 'href' ) # ------------------------------------- # Usage # ------------------------------------- # # Orientation.shortcut() #
# ************************************* # # Shortcut # -> Trigger clicking an element after keyup # # ************************************* # # Dependencies # - Orientation.keyCodes # # ************************************* # # @param $element { jQuery object } # @param dataAttribute { string } # @param keyCodes { object } # # ************************************* @Orientation.shortcut = ( options ) -> settings = $.extend $element : $( '[data-shortcut]' ) dataAttribute : 'shortcut' keyCodes : Orientation.keyCodes , options settings.$element.each -> element = $(@) key = String( element.data( settings.dataAttribute ) ) keyCode = settings.keyCodes[ key.toLowerCase() ] isInteger = not isNaN( parseInt( key, 10 ) ) isUpperCase = key is key.toUpperCase() $( document ).on 'keyup', ( event ) => element = $(@) tag = event.target.tagName.toLowerCase() unless tag is 'input' or tag is 'textarea' if event.which is keyCode if ( isUpperCase and event.shiftKey )\ or ( not isUpperCase and not event.shiftKey )\ or isInteger element.trigger( 'focus' ).trigger( 'click' ) if element.prop( 'tagName' ).toLowerCase() is 'a' window.location = element.attr( 'href' ) # ------------------------------------- # Usage # ------------------------------------- # # Orientation.shortcut() #
Add shift-modified keys to Shortcut script
Add shift-modified keys to Shortcut script
CoffeeScript
mit
cmckni3/orientation,splicers/orientation,cmckni3/orientation,orientation/orientation,cmckni3/orientation,orientation/orientation,codeschool/orientation,liufffan/orientation,hashrocket/orientation,IZEA/orientation,smashingboxes/orientation,orientation/orientation,liufffan/orientation,orientation/orientation,jefmathiot/orientation,ferdinandrosario/orientation,smashingboxes/orientation,splicers/orientation,LogicalBricks/orientation,codio/orientation,robomc/orientation,robomc/orientation,Scripted/orientation,hashrocket/orientation,Scripted/orientation,ferdinandrosario/orientation,jefmathiot/orientation,twinn/orientation,IZEA/orientation,LogicalBricks/orientation,friism/orientation,codio/orientation,splicers/orientation,codeschool/orientation,friism/orientation,codeschool/orientation,Scripted/orientation,twinn/orientation
363e714601632c67acd350994c6e5894f1b0f01d
app/assets/javascripts/notebook/magic/tabs.coffee
app/assets/javascripts/notebook/magic/tabs.coffee
define([ 'observable' 'knockout' 'd3' 'dimple' ], (Observable, ko, d3, dimple) -> (dataO, container, options) -> ulId = @genId $('#ul'+ulId+' a').click( (e) -> e.preventDefault() e.stopImmediatePropagation() $('#tab'+ulId+' div.active').removeClass('active') $('#ul'+ulId+' li.active').removeClass('active') id = $(@).attr('href') $(id).addClass('active') $(@).parent().addClass('active') ) dataO.subscribe( (newData) => #notify tabs ) )
define([ 'jquery' 'observable' 'knockout' 'd3' 'dimple' ], ($, Observable, ko, d3, dimple) -> (dataO, container, options) -> ulId = @genId $('#ul'+ulId+' a').click( (e) -> e.preventDefault() e.stopImmediatePropagation() $('#tab'+ulId+' div.active').removeClass('active') $('#ul'+ulId+' li.active').removeClass('active') id = $(@).attr('href') $(id).addClass('active') $(@).parent().addClass('active') ) # select the first tab $('#ul'+ulId+' li:first a').click() dataO.subscribe( (newData) => #notify tabs ) )
Select the first tab automatically
Select the first tab automatically
CoffeeScript
apache-2.0
radek1st/spark-notebook,minyk/spark-notebook,maasg/spark-notebook,spark-notebook/spark-notebook,antonkulaga/spark-notebook,meh-ninja/spark-notebook,meh-ninja/spark-notebook,0asa/spark-notebook,0asa/spark-notebook,deanwampler/spark-notebook,radek1st/spark-notebook,minyk/spark-notebook,deanwampler/spark-notebook,andypetrella/spark-notebook,meh-ninja/spark-notebook,antonkulaga/spark-notebook,antonkulaga/spark-notebook,maasg/spark-notebook,andypetrella/spark-notebook,andypetrella/spark-notebook,andypetrella/spark-notebook,0asa/spark-notebook,deanwampler/spark-notebook,spark-notebook/spark-notebook,radek1st/spark-notebook,radek1st/spark-notebook,0asa/spark-notebook,minyk/spark-notebook,spark-notebook/spark-notebook,meh-ninja/spark-notebook,antonkulaga/spark-notebook,maasg/spark-notebook,maasg/spark-notebook,minyk/spark-notebook,spark-notebook/spark-notebook,deanwampler/spark-notebook
d07cc5d6ac09bb2fb677bbcbcb044f0fb9718950
app/assets/javascripts/asset_gallery/agbase.js.coffee
app/assets/javascripts/asset_gallery/agbase.js.coffee
### Welcome to AssetGallery -- http://github.com/ewr/AssetGallery ### # stub console.log() for IE if !window.console class window.console @log: -> AssetGallery ?= {}
### Welcome to AssetGallery -- http://github.com/ewr/AssetGallery ### # stub console.log() for IE if !window.console class window.console @log: -> window.AssetGallery ?= {}
Update AssetGallery definition to be compatible with CS 1.3.3
Update AssetGallery definition to be compatible with CS 1.3.3
CoffeeScript
mit
ewr/AssetGallery,ewr/AssetGallery,ewr/AssetGallery
e200bbe06b408e1ca3773ddeef81bb50e29cd432
.atom/packages.cson
.atom/packages.cson
packages: [ "autocomplete-python" "fold-functions" "language-ini" "linter" "linter-pep8" "linter-python-pep8" "markdown-preview-plus" "package-sync" "python-indent" ]
packages: [ "auto-detect-indentation" "autocomplete-python" "fold-functions" "language-ini" "linter" "linter-pep8" "linter-python-pep8" "markdown-preview-plus" "package-sync" "python-indent" ]
Add indentation auto detection to Atom
Add indentation auto detection to Atom
CoffeeScript
mit
janwh/dotfiles
ed11be52a3e18ee345e80513d5a8d8de66d952b2
.config/config.cson
.config/config.cson
"*": editor: tabLength: 4 fontFamily: "Menlo" softTabs: false autoIndentOnPaste: false invisibles: {} lineHeight: 1.3 fontSize: 11 core: themes: [ "atom-light-ui" "phoenix-syntax" ] disabledPackages: [ "snippets" "SFTP-deployment" "spell-check" "autocomplete-css" "autocomplete-plus" "compare-files" "merge-conflicts" "atom-compare-files" "background-tips" "welcome" ] "exception-reporting": userId: "4b2dfe3a-7eef-a871-4d35-230cb11366f8" welcome: showOnStartup: false "tree-view": hideIgnoredNames: true whitespace: removeTrailingWhitespace: false "asciidoc-preview": {} "autoclose-html": {} "SFTP-deployment": {} "remote-sync": {} "remote-edit": {} "file-icons": coloured: false "recent-files": updated: false "spell-check": {} "autocomplete-plus": {} "atom-beautify": _analyticsUserId: "84a7da30-e058-42d8-9fd2-cc0519eb2781" "status-bar": {} hex: {} docblockr: {} "toggle-quotes": {}
"*": editor: tabLength: 4 fontFamily: "Menlo" softTabs: false autoIndentOnPaste: false invisibles: {} lineHeight: 1.3 fontSize: 11 core: themes: [ "atom-light-ui" "phoenix-syntax" ] disabledPackages: [ "snippets" "SFTP-deployment" "spell-check" "autocomplete-css" "autocomplete-plus" "compare-files" "merge-conflicts" "atom-compare-files" "background-tips" "welcome" ] "exception-reporting": userId: "4b2dfe3a-7eef-a871-4d35-230cb11366f8" welcome: showOnStartup: false "tree-view": hideIgnoredNames: true whitespace: removeTrailingWhitespace: false "asciidoc-preview": {} "autoclose-html": {} "SFTP-deployment": {} "remote-sync": {} "remote-edit": {} "file-icons": coloured: false "recent-files": updated: false "spell-check": {} "autocomplete-plus": {} "atom-beautify": _analyticsUserId: "84a7da30-e058-42d8-9fd2-cc0519eb2781" "status-bar": {} hex: {} docblockr: {} "toggle-quotes": {} "find-and-replace": showSearchWrapIcon: false
Add setting for proposed "Show Wrap Icon" option
Add setting for proposed "Show Wrap Icon" option Fingers crossed this gets merged into the package's upstream. See also: atom/find-and-replace#618
CoffeeScript
isc
Alhadis/Atom-PhoenixTheme
a740f049c1bd25a3b6b5004ceb5a73b923c94bbe
src/scripts/workbench/views/sensor/map_view.js.coffee
src/scripts/workbench/views/sensor/map_view.js.coffee
class Workbench.Views.SensorMapView extends Backbone.Marionette.ItemView template: false initialize: -> @zoom = 13 onDestroy: -> @map.remove() if @map onShow: -> if @el.id is "" console.warn "No Map Element" else @location = [@model.get("latitude"), @model.get("longitude")] @map = L.map(@el.id).setView(@location, @zoom) L.tileLayer(Workbench.tile_url, { attribution: Workbench.tile_attribution }).addTo(@map) L.marker(@location).addTo(@map)
class Workbench.Views.SensorMapView extends Backbone.Marionette.ItemView template: false initialize: -> @zoom = 13 onDestroy: -> @map.remove() if @map onShow: -> if @el.id is "" console.warn "No Map Element" else @location = [@model.get("latitude"), @model.get("longitude")] @map = L.map(@el.id, { continuousWorld: true center: Workbench.provider.center minZoom: Workbench.provider.zoomRange.min maxZoom: Workbench.provider.zoomRange.max crs: Workbench.provider.CRS }) L.tileLayer(Workbench.provider.url, { attribution: Workbench.provider.attribution }).addTo(@map) @map.setView(@location, @zoom) L.marker(@location).addTo(@map)
Use AWM tiles for small sensor map
Use AWM tiles for small sensor map
CoffeeScript
mit
GeoSensorWebLab/asw-workbench,GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/asw-workbench,GeoSensorWebLab/asw-workbench
be75e1f10893b2b88a463918ff51e2cc4adf5a3d
app/assets/javascripts/utils.js.coffee
app/assets/javascripts/utils.js.coffee
window.Tahi ||= {} Tahi.utils = toCamel: (string) -> string.replace /(\-[a-z])/g, ($1) -> $1.toUpperCase().replace "-", "" windowHistory: -> window.history bindColumnResize: -> $(window).off('resize.columns').on 'resize.columns', => @resizeColumnHeaders() resizeColumnHeaders: -> $headers = $('.columns .column-header') return unless $headers.length $headers.css('height', '') heights = $headers.find('h2').map -> $(this).outerHeight() max = null try max = Math.max.apply(Math, heights) catch error console.log "Math error, setting height to 20" console.log error max = 20 $headers.css('height', max) $('.column-content').css('top', max) togglePropertyAfterDelay: (obj, prop, startVal, endVal, ms) -> obj.set(prop, startVal) setTimeout( -> Ember.run.schedule("actions", obj, 'set', prop, endVal) ms) debug: (description, obj) -> if ETahi.environment == 'development' console.groupCollapsed(description) console.log(obj) console.groupEnd()
window.Tahi ||= {} Tahi.utils = toCamel: (string) -> string.replace /(\-[a-z])/g, ($1) -> $1.toUpperCase().replace "-", "" windowHistory: -> window.history bindColumnResize: -> $(window).off('resize.columns').on 'resize.columns', => @resizeColumnHeaders() resizeColumnHeaders: -> $headers = $('.columns .column-header') return unless $headers.length $headers.css('height', '') heights = $headers.find('h2').map -> $(this).outerHeight() max = null try max = Math.max.apply(Math, heights) catch error console.log "Math error, setting height to 20" console.log error max = 20 $headers.css('height', max) $('.column-content').css('top', max) togglePropertyAfterDelay: (obj, prop, startVal, endVal, ms) -> obj.set(prop, startVal) setTimeout( -> Ember.run.schedule("actions", obj, 'set', prop, endVal) ms) debug: (description, obj) -> if ETahi.environment == 'development' console.groupCollapsed(description) console.log(Em.copy(obj, true)) console.groupEnd()
Support logging correctly when msg is mutated
Support logging correctly when msg is mutated
CoffeeScript
mit
johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi
c2c07bba0c8ab8cb5271a9c80b43d62be073e0f4
config/plugins/coffeelint.coffee
config/plugins/coffeelint.coffee
module.exports = (lineman) -> config: loadNpmTasks: lineman.config.application.loadNpmTasks.concat('grunt-coffeelint') prependTasks: common: lineman.config.application.prependTasks.common.concat('coffeelint') coffeelint: app: [ lineman.config.files.coffee.app ]
module.exports = (lineman) -> config: loadNpmTasks: lineman.config.application.loadNpmTasks.concat('grunt-coffeelint') prependTasks: common: lineman.config.application.prependTasks.common.concat('coffeelint') coffeelint: app: ["<%= files.coffee.app %>", "<%= files.coffee.spec %>"] watch: coffeelint: files: ["<%= files.coffee.app %>", "<%= files.coffee.spec %>"] tasks: ["coffeelint"]
Add watch support + use grunt variable expansion
Add watch support + use grunt variable expansion * `lineman run` will now catch linting problems as you work * Spec files will now trigger lint failures * Switched to the familiar (at least relative to the rest of lineman), string-variable expansion version of specifying glob references. This is nice because it expands at `grunt.initConfig`-time, which is assured to be after *each-and-every* plugin has loaded and modified the configuration struct. The previous approach is at risk of missing a modification to the globs based on load order of the plugins.
CoffeeScript
bsd-3-clause
aranasoft/lineman-coffeelint
c77feac9c0a7ef93f914c03c06f7fe913293765a
client/components/LangCorrector.coffee
client/components/LangCorrector.coffee
React = require('react') import { withRouter, Redirect } from 'react-router' import stripLabel from '../lib/stripLabel' import withLang from '../lib/withLang' correctUrl = (url, lang) -> if not url.startsWith("/material/") return url url = stripLabel(url) if lang == "ru" return url.replace("A", "А").replace("B", "Б").replace("C", "В").replace("D", "Г") else return url.replace("А", "A").replace("Б", "B").replace("В", "C").replace("Г", "D") + "!en" export default LangCorrector = withLang withRouter (props) -> url = props.location.pathname newUrl = correctUrl(url, props.lang) if url != newUrl <Redirect to={newUrl}/> else props.children
React = require('react') import { withRouter, Redirect } from 'react-router' import stripLabel from '../lib/stripLabel' import withLang from '../lib/withLang' correctUrl = (url, lang) -> if not url.startsWith("/material/") return url url = stripLabel(url) if lang == "ru" return url #.replace("A", "А").replace("B", "Б").replace("C", "В").replace("D", "Г") else return url + "!en" #.replace("А", "A").replace("Б", "B").replace("В", "C").replace("Г", "D") + "!en" export default LangCorrector = withLang withRouter (props) -> url = props.location.pathname newUrl = correctUrl(url, props.lang) if url != newUrl <Redirect to={newUrl}/> else props.children
Fix redirects for cf problems
Fix redirects for cf problems
CoffeeScript
agpl-3.0
petr-kalinin/algoprog,petr-kalinin/algoprog,petr-kalinin/algoprog,petr-kalinin/algoprog
302c0ab3ddbce7e1d953a322f4e5f3837490749e
menus/latex-friend.cson
menus/latex-friend.cson
'context-menu': 'atom-text-editor': [ { 'label': 'Sync PDF' 'command': 'latex-friend:syncpdf' } { 'label': 'Show structure' 'command': 'latex-friend:showNavigation' } { 'label': 'Show structure pane' 'command': 'latex-friend:showNavigationPane' } { 'label': 'Show TODOs' 'command': 'latex-friend:showTodos' } { 'label': 'Insert reference' 'command': 'latex-friend:insertReference' } { 'label': 'Matrix builder' 'command': 'latex-friend:matrixBuilder' } ] 'menu': [ { 'label': 'Packages' 'submenu': [ 'label': 'latex-friend' 'submenu': [ { 'label': 'Sync PDF' 'command': 'latex-friend:syncpdf' } { 'label' : 'Show structure' 'command' : 'latex-friend:showNavigation' } { 'label' : 'Show structure pane' 'command' : 'latex-friend:showNavigationPane' } { 'label' : 'Show TODOs' 'command' : 'latex-friend:showTodos' } { 'label' : 'Insert reference' 'command' : 'latex-friend:insertReference' } { 'label' : 'Matrix builder' 'command' : 'latex-friend:matrixBuilder' } ] ] } ]
'context-menu': 'atom-text-editor[data-grammar*="text tex"]': [ { 'label': 'Sync PDF' 'command': 'latex-friend:syncpdf' } { 'label': 'Show structure' 'command': 'latex-friend:showNavigation' } { 'label': 'Show structure pane' 'command': 'latex-friend:showNavigationPane' } { 'label': 'Show TODOs' 'command': 'latex-friend:showTodos' } { 'label': 'Insert reference' 'command': 'latex-friend:insertReference' } { 'label': 'Matrix builder' 'command': 'latex-friend:matrixBuilder' } ] 'menu': [ { 'label': 'Packages' 'submenu': [ 'label': 'latex-friend' 'submenu': [ { 'label': 'Sync PDF' 'command': 'latex-friend:syncpdf' } { 'label' : 'Show structure' 'command' : 'latex-friend:showNavigation' } { 'label' : 'Show structure pane' 'command' : 'latex-friend:showNavigationPane' } { 'label' : 'Show TODOs' 'command' : 'latex-friend:showTodos' } { 'label' : 'Insert reference' 'command' : 'latex-friend:insertReference' } { 'label' : 'Matrix builder' 'command' : 'latex-friend:matrixBuilder' } ] ] } ]
Hide menu items in non-latex environment.
Hide menu items in non-latex environment. Hide latex-related menu items in non-latex environment, as the menu items are not working in other source files except for tex files.
CoffeeScript
mit
ruivieira/latex-friend
e227d54e31e98192b940d15723f83fe5ee0bad3f
menus/symbols-view.cson
menus/symbols-view.cson
'menu': [ { 'label': 'Packages' 'submenu': [ 'label': 'Symbols' 'submenu': [ { 'label': 'File Symbols', 'command': 'symbols-view:toggle-file-symbols' } { 'label': 'Project Symbols', 'command': 'symbols-view:toggle-project-symbols' } ] ] } ] 'context-menu': '.overlayer': 'Go to Declaration': 'symbols-view:go-to-declaration'
'menu': [ { 'label': 'Packages' 'submenu': [ 'label': 'Symbols' 'submenu': [ { 'label': 'File Symbols', 'command': 'symbols-view:toggle-file-symbols' } { 'label': 'Project Symbols', 'command': 'symbols-view:toggle-project-symbols' } ] ] } ] 'context-menu': '.overlayer': [ { 'label': 'Go to Declaration', 'command': 'symbols-view:go-to-declaration' } ]
Use next context menu format
Use next context menu format
CoffeeScript
mit
changjej/symbols-view,spencerlyon2/symbols-view,harai/atom-gnu-global,spencerlyon2/symbols-view,rodumani/symbols-view,atom/symbols-view,rodumani/symbols-view,changjej/symbols-view,kainwinterheart/symbols-view,harai/atom-gnu-global
b3cbb015a5c28589b03cf44adb7079645fbda2da
Gulpfile.coffee
Gulpfile.coffee
require 'coffee-script/register' gulp = require 'gulp' coffee = require 'gulp-coffee' mocha = require 'gulp-mocha' shell = require 'gulp-shell' gulp.task 'coffee', -> gulp.src(['retro.coffee', 'libretro_h.coffee']) .pipe(coffee()) .pipe(gulp.dest '.') gulp.task 'mocha', ['gyp', 'coffee'], -> gulp.src(['test.coffee'], read: false) .pipe mocha reporter: 'spec', globals: should: require 'should' gulp.task 'gyp', shell.task [ './node_modules/.bin/node-pre-gyp build' ] gulp.task 'install', shell.task [ './node_modules/.bin/node-pre-gyp install --fallback-to-build' ] gulp.task 'build', ['gyp', 'coffee'] gulp.task 'test', ['mocha'] gulp.task 'prepublish', ['build'] gulp.task 'default', ['build', 'test']
require 'coffee-script/register' gulp = require 'gulp' coffee = require 'gulp-coffee' mocha = require 'gulp-mocha' shell = require 'gulp-shell' gulp.task 'coffee', -> gulp.src(['retro.coffee', 'libretro_h.coffee']) .pipe(coffee()) .pipe(gulp.dest '.') gulp.task 'mocha', ['gyp', 'coffee'], -> gulp.src(['test.coffee'], read: false) .pipe mocha reporter: 'spec', globals: should: require 'should' gulp.task 'gyp', shell.task [ 'node-pre-gyp build' ] gulp.task 'install', shell.task [ 'node-pre-gyp install --fallback-to-build' ] gulp.task 'build', ['gyp', 'coffee'] gulp.task 'test', ['mocha'] gulp.task 'prepublish', ['build'] gulp.task 'default', ['build', 'test']
Make build script work on Win32.
Make build script work on Win32.
CoffeeScript
mit
matthewbauer/node-retro,matthewbauer/node-retro,matthewbauer/node-retro,matthewbauer/node-retro
7f1b41e12253512c2365dd3495c27870ac07f70a
src/assets/javascripts/backdrop.coffee
src/assets/javascripts/backdrop.coffee
imagesLoaded = require 'imagesloaded' module.exports = class Backdrop constructor: ({ @$el, @$window, @$body }) -> # Wait for images to load before scaling @$el.imagesLoaded => @scale() scale: -> [width, height] = dimensions = @dimensions() @$el .addClass('is-ready') .css transform: "scale(#{@factor(dimensions)})" marginTop: -(height / 2) marginLeft: -(width / 2) dimensions: -> if @$el.is ':visible' [@$el.outerWidth(), @$el.outerHeight()] else $clone = @$el.clone() $clone.css 'visibility', 'hidden' @$body.append $clone dimensions = [$clone.outerWidth(), $clone.outerHeight()] $clone.remove() dimensions factor: ([width, height]) -> ratio = width / height viewportRatio = @$window.width() / @$window.height() direction = if viewportRatio > ratio then 'width' else 'height' factor = @$window[direction]() / @$el[direction]() Math.ceil(factor * 100) / 100
imagesLoaded = require 'imagesloaded' module.exports = class Backdrop constructor: ({ @$el, @$window, @$body }) -> # Wait for images to load before scaling @$el.imagesLoaded => @scale() scale: -> { width, height } = dimensions = @dimensions() @$el .addClass('is-ready') .css transform: "scale(#{@factor(dimensions)})" marginTop: -(height / 2) marginLeft: -(width / 2) dimensions: -> if @$el.is ':visible' width: @$el.outerWidth(), height: @$el.outerHeight() else $clone = @$el.clone() $clone.css 'visibility', 'hidden' @$body.append $clone dimensions = width: $clone.outerWidth(), height: $clone.outerHeight() $clone.remove() dimensions factor: (dimensions) -> { width, height } = dimensions ratio = width / height viewportRatio = @$window.width() / @$window.height() direction = if viewportRatio > ratio then 'width' else 'height' factor = @$window[direction]() / dimensions[direction] Math.ceil(factor * 100) / 100
Fix bug with off screen images
Fix bug with off screen images
CoffeeScript
mit
artsy/2014.artsy.net,ladanazita/2014.artsy.net,ladanazita/2014.artsy.net,artsy/2014.artsy.net,ladanazita/2014.artsy.net,artsy/2014.artsy.net
40948c2641dfeb6b8d37893b198bc8f7ecdec577
webpack.config.coffee
webpack.config.coffee
'use strict' pkg = require './package.json' node_modules = __dirname + '/node_modules' ExtractTextPlugin = require('extract-text-webpack-plugin') environment = process.env.NODE_ENV module.exports = cache : true resolve : extensions: ['', '.cjsx', '.coffee', '.js', '.json', '.styl'] context : __dirname entry: commons : ['./components/commons.styl'] test : ['webpack/hot/dev-server', './spec/index.cjsx'] # test : ['webpack/hot/dev-server', './spec/index.cjsx'] output: path : if environment is 'production' then './dist' else './build' filename : pkg.name + '.[name].js' publicPath : '/build/' devServer: # contentBase : './build' host : 'localhost' port : 8080 # colors : true # progress : true # noInfo : false # hot : true inline : true module: noParse : [node_modules + '/react/dist/*.js'] loaders: [ test : /\.cjsx$/, loader: 'coffee-jsx-loader' , test : /\.coffee$/, loader: 'coffee-jsx-loader' , test : /\.styl$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader!stylus-loader!') ] plugins: [ new ExtractTextPlugin pkg.name + '.[name].css', allChunks: false ]
'use strict' pkg = require './package.json' node_modules = __dirname + '/node_modules' ExtractTextPlugin = require('extract-text-webpack-plugin') environment = process.env.NODE_ENV module.exports = cache : true resolve : extensions: ['', '.cjsx', '.coffee', '.js', '.json', '.styl'] context : __dirname entry: commons : ['./components/commons.styl'] test : ['webpack/hot/dev-server', './spec/index.cjsx'] # test : ['webpack/hot/dev-server', './spec/index.cjsx'] output: path : if environment is 'production' then './dist' else './build' filename : pkg.name + '.[name].js' publicPath : '/build/' devServer: # contentBase : './build' host : '0.0.0.0' port : 8080 # colors : true # progress : true # noInfo : false # hot : true inline : true module: noParse : [node_modules + '/react/dist/*.js'] loaders: [ test : /\.cjsx$/, loader: 'coffee-jsx-loader' , test : /\.coffee$/, loader: 'coffee-jsx-loader' , test : /\.styl$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader!stylus-loader!') ] plugins: [ new ExtractTextPlugin pkg.name + '.[name].css', allChunks: false ]
Configure webpack dev server to accept connections from mobile
Configure webpack dev server to accept connections from mobile
CoffeeScript
mit
KerenChandran/react-toolbox,react-toolbox/react-toolbox,showings/react-toolbox,KerenChandran/react-toolbox,showings/react-toolbox,DigitalRiver/react-atlas,rubenmoya/react-toolbox,soyjavi/react-toolbox,jasonleibowitz/react-toolbox,rubenmoya/react-toolbox,react-toolbox/react-toolbox,jasonleibowitz/react-toolbox,Magneticmagnum/react-atlas,react-toolbox/react-toolbox,soyjavi/react-toolbox,rubenmoya/react-toolbox
64f87a5961f177d51b3a68198a4a0b85376d1298
app/assets/javascripts/jazz.js.coffee
app/assets/javascripts/jazz.js.coffee
# http://stackoverflow.com/questions/4214731/coffeescript-global-variables root = exports ? this root.decorate_minus_button = (e) -> e.click -> target_name = $(this).data('for') target = $('input#'+target_name) min = if target.attr('min') then target.attr('min') else 0 if target.val() val = Math.max(min, parseInt(target.val(), 10) - 1) target.val(val) root.decorate_plus_button = (e) -> e.click -> target_name = $(this).data('for') target = $('input#'+target_name) max = if target.attr('max') then target.attr('max') else 99 if target.val() val = Math.min(max, parseInt(target.val(), 10) + 1) target.val(val) $ -> decorate_minus_button($('form a.jazz.btn.minus')) decorate_plus_button($('form a.jazz.btn.plus')) # Make table rows with data-target attributes clickable $('tr[data-target]').click -> window.location = $(this).data('target') # Prevent clicking on links from trigger the above $('tr[data-target] a').click (e) -> e.stopPropagation();
# http://stackoverflow.com/questions/4214731/coffeescript-global-variables root = exports ? this root.decorate_minus_button = (e) -> e.click -> target_name = $(this).data('for') target = $('input#'+target_name) min = if target.attr('min') then target.attr('min') else 0 if target.val() val = Math.max(min, parseInt(target.val(), 10) - 1) target.val(val) root.decorate_plus_button = (e) -> e.click -> target_name = $(this).data('for') target = $('input#'+target_name) max = if target.attr('max') then target.attr('max') else 99 if target.val() val = Math.min(max, parseInt(target.val(), 10) + 1) target.val(val) $ -> decorate_minus_button($('form a.jazz.btn.minus')) decorate_plus_button($('form a.jazz.btn.plus')) # Make table rows with data-target attributes clickable $('tr[data-target]').click (e) -> if 'TD' == e.originalEvent.srcElement.tagName window.location = $(this).data('target')
Allow links to still 'work' within tr[data-target]
Allow links to still 'work' within tr[data-target]
CoffeeScript
mit
aisrael/jazz,aisrael/jazz
118e62143c41288209872a0980905764b7fe393f
scripts/views/workspace/content/search-results-item.coffee
scripts/views/workspace/content/search-results-item.coffee
define [ 'jquery' 'underscore' 'backbone' 'marionette' 'cs!collections/media-types' 'cs!helpers/enable-dnd' 'hbs!templates/workspace/content/search-results-item' ], ($, _, Backbone, Marionette, mediaTypes, enableContentDragging, searchResultsItemTemplate) -> # Search Result Views (workspace) # ------- # # A list of search results (stubs of models only containing an icon, url, title) # need a generic view for an item. # # Since we don't really distinguish between a search result view and a workspace/collection/etc # just consider them the same. return Marionette.ItemView.extend tagName: 'tr' initialize: () -> @template = (data) => data.id = @model.id return searchResultsItemTemplate(data) @listenTo @model, 'change', => @render() onRender: () -> # Render the modified time in a relative format and update it periodically $times = @$el.find('time[datetime]') #updateTimes $times # Add DnD options to content enableContentDragging(@model, @$el.children('*[data-media-type]'))
define [ 'jquery' 'underscore' 'backbone' 'marionette' 'cs!collections/media-types' 'cs!helpers/enable-dnd' 'hbs!templates/workspace/content/search-results-item' ], ($, _, Backbone, Marionette, mediaTypes, enableContentDragging, searchResultsItemTemplate) -> # Search Result Views (workspace) # ------- # # A list of search results (stubs of models only containing an icon, url, title) # need a generic view for an item. # # Since we don't really distinguish between a search result view and a workspace/collection/etc # just consider them the same. return Marionette.ItemView.extend tagName: 'tr' initialize: () -> @template = (data) => data.id = @model.id or @model.cid return searchResultsItemTemplate(data) @listenTo @model, 'change', => @render() onRender: () -> # Render the modified time in a relative format and update it periodically $times = @$el.find('time[datetime]') #updateTimes $times # Add DnD options to content enableContentDragging(@model, @$el.children('*[data-media-type]'))
Fix broken editor link for new media
Fix broken editor link for new media
CoffeeScript
agpl-3.0
oerpub/bookish,oerpub/github-bookeditor,oerpub/bookish,oerpub/github-bookeditor,oerpub/github-bookeditor
f86dd2b9562456ef5e43d2450c32b25c60ba18e1
gulpfile.coffee
gulpfile.coffee
gulp = require 'gulp' webserver = require 'gulp-webserver' coffee = require 'gulp-coffee' concat = require 'gulp-concat' filter = require 'gulp-filter' uglify = require 'gulp-uglify' main_bf = require 'main-bower-files' gulp.task 'webserver', -> gulp.src './' .pipe webserver livereload: true directoryListing: true open: true gulp.task 'compile', -> gulp.src 'src/**/*.coffee' .pipe coffee bare: true .pipe concat 'tankbetajs.js' .pipe gulp.dest 'app' gulp.task 'libs', -> gulp.src main_bf() .pipe filter '*.js' .pipe concat 'libs.min.js' .pipe uglify() .pipe gulp.dest 'app' gulp.task 'default', -> gulp.run 'webserver', 'compile' gulp.watch 'src/**/*.coffee*', -> gulp.run 'compile'
gulp = require 'gulp' webserver = require 'gulp-webserver' coffee = require 'gulp-coffee' concat = require 'gulp-concat' filter = require 'gulp-filter' uglify = require 'gulp-uglify' main_bf = require 'main-bower-files' gulp.task 'webserver', -> gulp.src './' .pipe webserver livereload: true directoryListing: true open: true gulp.task 'compile', -> gulp.src 'src/**/*.coffee' .pipe coffee bare: true .pipe concat 'tankbetajs.js' .pipe gulp.dest 'app' gulp.task 'libs', -> gulp.src main_bf() .pipe filter '*.js' .pipe concat 'libs.min.js' .pipe uglify() .pipe gulp.dest 'app' gulp.task 'watch', -> gulp.watch 'src/**/*.coffee*', -> gulp.run 'compile' gulp.task 'default', -> gulp.run 'webserver', 'compile', 'watch'
Move gulp watch to top level task
Move gulp watch to top level task
CoffeeScript
mit
sortelli/tankbeta,sortelli/tankbeta,sortelli/tankbeta,sortelli/tankbeta
d78ed248fbc6926145cc4d47888edbf3d0ba521c
server/entry.coffee
server/entry.coffee
Meteor.startup -> Accounts.urls.resetPassword = (token) -> Meteor.absoluteUrl('reset-password/' + token) AccountsEntry = settings: {} config: (appConfig) -> @settings = _.extend(@settings, appConfig) @AccountsEntry = AccountsEntry Meteor.methods entryValidateSignupCode: (signupCode) -> check signupCode, Match.OneOf(String, null, undefined) not AccountsEntry.settings.signupCode or signupCode is AccountsEntry.settings.signupCode accountsCreateUser: (username, email, password) -> if username Accounts.createUser username: username, email: email, password: password, profile: AccountsEntry.settings.defaultProfile || {} else Accounts.createUser email: email password: password profile: AccountsEntry.settings.defaultProfile || {}
Meteor.startup -> Accounts.urls.resetPassword = (token) -> Meteor.absoluteUrl('reset-password/' + token) AccountsEntry = settings: {} config: (appConfig) -> @settings = _.extend(@settings, appConfig) @AccountsEntry = AccountsEntry Meteor.methods entryValidateSignupCode: (signupCode) -> check signupCode, Match.OneOf(String, null, undefined) not AccountsEntry.settings.signupCode or signupCode is AccountsEntry.settings.signupCode accountsCreateUser: (username, email, password, profile) -> if username Accounts.createUser username: username, email: email, password: password, profile: AccountsEntry.settings.defaultProfile || {} else Accounts.createUser email: email password: password profile: AccountsEntry.settings.defaultProfile || {}
Add profile to server account create user
Add profile to server account create user
CoffeeScript
mit
vhmh2005/accounts-entry,jpatzer/accounts-entry,andykingking/accounts-entry,andykingking/accounts-entry,dovrosenberg/accounts-entry,meteorblackbelt/accounts-entry,RiffynInc/meteor-accounts-entry,benmgreene/accounts-entry,jg3526/accounts-entry,mauriciovieira/accounts-entry,dovrosenberg/accounts-entry,maxkferg/accounts-entry,jpatzer/accounts-entry,RiffynInc/meteor-accounts-entry,Vilango/accounts-entry,txs/meteor-wecare-accounts-entry-flow-blaze-global,mike623/accounts-entry,jg3526/accounts-entry,Differential/accounts-entry,mauriciovieira/accounts-entry,selaias/accounts-entry,Vilango/accounts-entry,maxkferg/accounts-entry,AppWorkshop/accounts-entry,AppWorkshop/accounts-entry,ChipCastleDotCom/accounts-entry,Differential/accounts-entry,valedaemon/accounts-entry,Noamyoungerm/accounts-entry,mike623/accounts-entry,txs/meteor-wecare-accounts-entry-flow-blaze,txs/meteor-wecare-accounts-entry-flow-blaze-global,lnader/meteor-accounts-entry,lnader/meteor-accounts-entry,meteorblackbelt/accounts-entry,valedaemon/accounts-entry,ChipCastleDotCom/accounts-entry,vhmh2005/accounts-entry,Noamyoungerm/accounts-entry,txs/meteor-wecare-accounts-entry-flow-blaze,benmgreene/accounts-entry,selaias/accounts-entry
9091b79ee41675a2ca99c38ab76d95e113ce6d77
brunch-config.coffee
brunch-config.coffee
exports.config = # See http://brunch.readthedocs.org/en/latest/config.html for documentation. paths: public: 'public' files: javascripts: joinTo: 'js/app.js': /^app/ stylesheets: joinTo: 'ss/app.css': /^app\/styles/ plugins: sass: debug: 'comments' sourceMaps: false
exports.config = # See http://brunch.readthedocs.org/en/latest/config.html for documentation. paths: public: 'public' files: javascripts: joinTo: 'js/app.js': /^app/ stylesheets: joinTo: 'ss/app.css': /^app\/styles/
Add sourcemaps back for devtools use
Add sourcemaps back for devtools use
CoffeeScript
mit
mgarbacz/existential.io
977d39fcaaec8efea60f78d21a66c3f0824bee4f
KVEnumeration.coffee
KVEnumeration.coffee
extend = (object, properties) -> for key, val of properties object[key] = val object enumNames=[] #C like enum class KVEnumeration #Registered enums #Static function that creates an enum object value. Uniqueness guarantied by object reference. #This objects's unique own field is the KVEnumeration name. It's read only. #string value shall be uppercase @value:(key,value,enumName="KVEnumeration",valueProto)-> prototype=extend _value:-> @[key] _key:->key _type:->enumName , valueProto properties={} properties[key]= value:value enumerable:true Object.create prototype, properties constructor:(enumName,enumValues,valueProto={}) -> #Check for uniqueness if enumName in enumNames then throw "#{enumName} already exists!" else enumNames.push enumName #Lambda to write enum values writeProperty = (property,key) => @[key]=KVEnumeration.value(key,property,enumName,valueProto) writeProperty val,key for key,val of enumValues #Define non-enumerable property Object.defineProperty @, 'concise', { #Returns a concise string representing the KVEnumeration value:-> "#{enumName}:[#{" "+val+" " for val in enumValues}]" } Object.defineProperty @, 'from', { #Returns the enum instance that matches value value: (lookupVal) -> (@[key] for key,val of enumValues when val is lookupVal)[0] } #Guaranties properties to be 'final', non writable Object.freeze(this)
extend = (object, properties) -> for key, val of properties object[key] = val object enumNames=[] #C like enum class Enumeration #Registered enums #Static function that creates an enum object value. Uniqueness guarantied by object reference. #This objects's unique own field is the Enumeration name. It's read only. #string value shall be uppercase @value:(key,value,enumName="Enumeration",valueProto)-> prototype=extend _value:-> @[key] _key:->key _type:->enumName , valueProto properties={} properties[key]= value:value enumerable:true Object.create prototype, properties constructor:(enumName,enumValues,valueProto={}) -> #Check for uniqueness if enumName in enumNames then throw "#{enumName} already exists!" else enumNames.push enumName #Lambda to write enum values writeProperty = (property,key) => @[key]=Enumeration.value(key,property,enumName,valueProto) writeProperty val,key for key,val of enumValues #Define non-enumerable property Object.defineProperty @, 'pretty', { #Returns a concise, pretty string representing the Enumeration value:-> "#{enumName}:{#{"#{key}:#{val} " for key,val of enumValues}}" } Object.defineProperty @, 'from', { #Returns the enum instance that matches value value: (lookupVal) -> (@[key] for key,val of enumValues when val is lookupVal)[0] } #Guaranties properties to be 'final', non writable Object.freeze(this)
Update to Enumeration + pretty function updated
Update to Enumeration + pretty function updated
CoffeeScript
mit
sveinburne/enumerationjs,sveinburne/enumerationjs
6670d0714c6bcb587cfc0b92ff0eba8fbcf8929f
home/.atom/config.cson
home/.atom/config.cson
"*": "exception-reporting": userId: "1e725750-c66d-33e4-9fce-f627ac32bde5" "release-notes": viewedVersion: "0.94.0" welcome: showOnStartup: false metrics: userId: "c2f08243ecb4a9bc44bd9e46d4f067086d9357e3" editor: fontSize: 11 showInvisibles: true showIndentGuide: true invisibles: {} core: disabledPackages: [ "metrics" "select-rectangle" "vim-mode" ] themes: [ "atom-dark-ui-slim" "seti-syntax" ] linter: showErrorInline: true "go-plus": goPath: "~/.go" "tree-view": {} "autocomplete-plus": {}
"*": "exception-reporting": userId: "1e725750-c66d-33e4-9fce-f627ac32bde5" "release-notes": viewedVersion: "0.94.0" welcome: showOnStartup: false metrics: userId: "c2f08243ecb4a9bc44bd9e46d4f067086d9357e3" editor: fontSize: 11 showInvisibles: true showIndentGuide: true invisibles: {} core: disabledPackages: [ "metrics" "select-rectangle" "vim-mode" ] themes: [ "atom-dark-ui-slim" "seti-syntax" ] linter: showErrorInline: true "go-plus": goPath: "~/.go" "tree-view": {} "autocomplete-plus": {} "file-types": "^.gvimrc.after": "viml" "^.profile$": "shell" "^.shared_env.*": "shell" "^.spacemacs$": "lisp" "^.vimrc.before$": "viml" "^.vimrc.after$": "viml" "^.zshenv.local.*$": "shell" "^.zshrc.local.*$": "shell"
Set various dotfile file types using the file-types package in atom.
Set various dotfile file types using the file-types package in atom.
CoffeeScript
mit
alphabetum/dotfiles,alphabetum/dotfiles,alphabetum/dotfiles,alphabetum/dotfiles
060f46be0bb339537ac1be8a4e4e542702baa9ff
app/assets/javascripts/startups.js.coffee
app/assets/javascripts/startups.js.coffee
initialize = () -> $markets = $("#startup_market_list") $markets.tokenInput "http://api.angel.co/1/search?type=MarketTag", crossDomain: true, queryParam: "query", prePopulate: $markets.data('pre'), theme: "facebook", tokenLimit: 3, tokenValue: "name" $ -> $body = $('body') routes = ['startups-new', 'startups-edit'] if _.some(routes, (route) -> $body.hasClass route) initialize()
$ -> $body = $('body') bodyClass = $body.attr 'class' routes = ['startups-new', 'startups-edit'] if bodyClass in ['startups-new', 'startups-edit'] $markets = $("#startup_market_list") $markets.tokenInput "http://api.angel.co/1/search?type=MarketTag", crossDomain: true, queryParam: "query", prePopulate: $markets.data('pre'), theme: "facebook", tokenLimit: 3, tokenValue: "name" else if bodyClass is 'startups-index' $(".startupcard").equalHeights()
Add equalHeights to Startup cards
Add equalHeights to Startup cards
CoffeeScript
mit
SoPR/sopr-platform,SoPR/sopr-platform
3f0e94296245c64ad338623a16f30f717ec04212
lib/image-editor-status-view.coffee
lib/image-editor-status-view.coffee
{$, View} = require 'atom-space-pen-views' {CompositeDisposable} = require 'atom' ImageEditor = require './image-editor' module.exports = class ImageEditorStatusView extends View @content: -> @div class: 'status-image inline-block', => @span class: 'image-size', outlet: 'imageSizeStatus' initialize: (@statusBar) -> @disposables = new CompositeDisposable @attach() @disposables.add atom.workspace.onDidChangeActivePaneItem => @updateImageSize() attach: -> @statusBar.appendLeft this attached: -> @updateImageSize() getImageSize: ({originalHeight, originalWidth}) -> @imageSizeStatus.text("#{originalWidth}x#{originalHeight}").show() updateImageSize: -> @imageLoadDisposable?.dispose() editor = atom.workspace.getActivePaneItem() if editor instanceof ImageEditor @editorView = $(atom.views.getView(editor)).view() @getImageSize(@editorView) if @editorView.loaded @imageLoadDisposable = @editorView.onDidLoad => if editor is atom.workspace.getActivePaneItem() @getImageSize(@editorView) else @imageSizeStatus.hide()
{$, View} = require 'atom-space-pen-views' {CompositeDisposable} = require 'atom' ImageEditor = require './image-editor' module.exports = class ImageEditorStatusView extends View @content: -> @div class: 'status-image inline-block', => @span class: 'image-size', outlet: 'imageSizeStatus' initialize: (@statusBar) -> @disposables = new CompositeDisposable @attach() @disposables.add atom.workspace.onDidChangeActivePaneItem => @updateImageSize() attach: -> @statusBar.addLeftTile(item: this) attached: -> @updateImageSize() getImageSize: ({originalHeight, originalWidth}) -> @imageSizeStatus.text("#{originalWidth}x#{originalHeight}").show() updateImageSize: -> @imageLoadDisposable?.dispose() editor = atom.workspace.getActivePaneItem() if editor instanceof ImageEditor @editorView = $(atom.views.getView(editor)).view() @getImageSize(@editorView) if @editorView.loaded @imageLoadDisposable = @editorView.onDidLoad => if editor is atom.workspace.getActivePaneItem() @getImageSize(@editorView) else @imageSizeStatus.hide()
Use new status bar tile API
Use new status bar tile API
CoffeeScript
mit
atom/image-view
a1171a497e6dbadfa9c626947c077c6c75352217
client/router.coffee
client/router.coffee
parse_pararms = (querystring) -> params = {} querystring = querystring.split('&') for qs in querystring continue if not qs pair = qs.split('=') params[decodeURIComponent pair[0]] = decodeURIComponent pair[1] params Meteor.Router.add '/': -> Session.set('params', parse_pararms @querystring) return 'all' '/new': 'new_event' '/login': 'login' '/event/:title_id': (title_id) -> event_id = Events.findOne(title_id: encodeURIComponent(title_id)) # Backwards compatible: if title_id != exist, assume the url is an event_id if not event_id event_id = title_id Session.set("event_id", event_id) return 'event_info' '/user/:user_id': (user_id) -> Session.set("user_id", user_id) return 'show_user' '/settings': () -> if Meteor.user() then 'edit_user' else 'login' '/search': (q) -> Session.set('params', parse_pararms @querystring) return 'search'
parse_pararms = (querystring) -> params = {} querystring = querystring.split('&') for qs in querystring continue if not qs pair = qs.split('=') params[decodeURIComponent pair[0]] = decodeURIComponent pair[1] params Meteor.Router.add '/': -> Session.set('params', parse_pararms @querystring) return 'all' '/new': 'new_event' '/login': 'login' '/event/:title_id': (title_id) -> event_id = Events.findOne(title_id: encodeURIComponent(title_id)) # Backwards compatible: if title_id does not exist, assume the url is an event_id if not event_id event_id = title_id Session.set("event_id", event_id) return 'event_info' '/user/:user_id': (user_id) -> Session.set("user_id", user_id) return 'show_user' '/settings': () -> if Meteor.user() then 'edit_user' else 'login' '/search': (q) -> Session.set('params', parse_pararms @querystring) return 'search'
Clarify wording in comment about routing deprecated event URLs
Clarify wording in comment about routing deprecated event URLs
CoffeeScript
mit
pennlabs/eventsatpenn-meteor
14dca91f3fba869d0783384272b8dfb702476f64
protractor.conf.coffee
protractor.conf.coffee
config = seleniumAddress: 'http://localhost:4444/wd/hub' specs: [ 'docs/app/src/**/.coffee' ] module.exports = config
config = seleniumAddress: 'http://localhost:4444/wd/hub' specs: [ 'docs/app/src/**/*.coffee' ] module.exports = config
Fix ptrotractor missing coffee files
Fix ptrotractor missing coffee files
CoffeeScript
mit
efacilitation/eventric
7de9da49ac5353fca4b830d4c83504c524966771
components/inquiry_questionnaire/views/inquiry.coffee
components/inquiry_questionnaire/views/inquiry.coffee
_ = require 'underscore' StepView = require './step.coffee' Form = require '../../form/index.coffee' ArtworkInquiry = require '../../../models/artwork_inquiry.coffee' defaultMessage = require '../../contact/default_message.coffee' template = -> require('../templates/inquiry.jade') arguments... module.exports = class Inquiry extends StepView template: (data) -> template _.extend data, message: @inquiry.get('message') __events__: 'click button': 'serialize' serialize: (e) -> @inquiry.set contact_gallery: true anonymous_session_id: @user.related().collectorProfile.get('anonymous_session_id') form = new Form model: @inquiry, $form: @$('form') form.submit e, {}, 'set' @next()
_ = require 'underscore' StepView = require './step.coffee' Form = require '../../form/index.coffee' ArtworkInquiry = require '../../../models/artwork_inquiry.coffee' defaultMessage = require '../../contact/default_message.coffee' template = -> require('../templates/inquiry.jade') arguments... module.exports = class Inquiry extends StepView template: (data) -> template _.extend data, message: @inquiry.get('message') __events__: 'click button': 'serialize' serialize: (e) -> form = new Form model: @inquiry, $form: @$('form') return unless form.start() e.preventDefault() @inquiry.set _.extend { contact_gallery: true }, form.data() @next()
Handle form validation properly when setting
Handle form validation properly when setting
CoffeeScript
mit
eessex/force,cavvia/force-1,dblock/force,erikdstock/force,cavvia/force-1,joeyAghion/force,eessex/force,izakp/force,artsy/force-public,eessex/force,dblock/force,oxaudo/force,anandaroop/force,TribeMedia/force-public,damassi/force,damassi/force,yuki24/force,mzikherman/force,oxaudo/force,cavvia/force-1,anandaroop/force,joeyAghion/force,kanaabe/force,yuki24/force,cavvia/force-1,joeyAghion/force,artsy/force,kanaabe/force,mzikherman/force,xtina-starr/force,yuki24/force,damassi/force,izakp/force,xtina-starr/force,kanaabe/force,dblock/force,artsy/force,izakp/force,anandaroop/force,mzikherman/force,damassi/force,joeyAghion/force,artsy/force,kanaabe/force,kanaabe/force,oxaudo/force,artsy/force,erikdstock/force,mzikherman/force,eessex/force,oxaudo/force,xtina-starr/force,xtina-starr/force,izakp/force,erikdstock/force,erikdstock/force,anandaroop/force,yuki24/force,TribeMedia/force-public,artsy/force-public
d6351d1c7b2128241ed0e48c3c8b0aa835e646b3
lib/utils/web-entry.cjsx
lib/utils/web-entry.cjsx
React = require 'react' Router = require 'react-router' find = require 'lodash/collection/find' filter = require 'lodash/collection/filter' createRoutes = require 'create-routes' app = require 'app' # TODO add extra file watcher here to reload config when file add/removed # TODO check if this is called when a new file is added. Narrow down problems loadConfig = (cb) -> stuff = require 'config' if module.hot module.hot.accept stuff.id, -> cb() cb() loadConfig -> app.loadContext (pagesReq) -> {pages, config, relativePath} = require 'config' routes = createRoutes(pages, pagesReq) # Remove templates files. pages = filter(pages, (page) -> page.path?) if router router.replaceRoutes [app] else router = Router.run [routes], Router.HistoryLocation, (Handler, state) -> page = find pages, (page) -> page.path is state.pathname React.render( <Handler config={config} pages={pages} page={page} state={state} />, document?.getElementById("react-mount") )
React = require 'react' Router = require 'react-router' find = require 'lodash/collection/find' filter = require 'lodash/collection/filter' createRoutes = require 'create-routes' app = require 'app' # TODO add extra file watcher here to reload config when file add/removed # TODO check if this is called when a new file is added. Narrow down problems loadConfig = (cb) -> stuff = require 'config' if module.hot module.hot.accept stuff.id, -> cb() cb() loadConfig -> app.loadContext (pagesReq) -> {pages, config, relativePath} = require 'config' routes = createRoutes(pages, pagesReq) # Remove templates files. pages = filter(pages, (page) -> page.path?) # Route already exists meaning we're hot-reloading. if router router.replaceRoutes [app] else router = Router.run [routes], Router.HistoryLocation, (Handler, state) -> page = find pages, (page) -> page.path is state.pathname # Let app know the route is changing. if app.onRouteChange then app.onRouteChange(state, page, pages, config) React.render( <Handler config={config} pages={pages} page={page} state={state} />, document?.getElementById("react-mount") )
Add hook so sites can respond to route changes
Add hook so sites can respond to route changes
CoffeeScript
mit
gatsbyjs/gatsby,mingaldrichgan/gatsby,mickeyreiss/gatsby,gesposito/gatsby,chiedo/gatsby,chiedo/gatsby,gatsbyjs/gatsby,danielfarrell/gatsby,ChristopherBiscardi/gatsby,fk/gatsby,gatsbyjs/gatsby,Khaledgarbaya/gatsby,gatsbyjs/gatsby,0x80/gatsby,fabrictech/gatsby,mingaldrichgan/gatsby,okcoker/gatsby,Khaledgarbaya/gatsby,rothfels/gatsby,shaunstanislaus/gatsby,HaQadosch/gatsby,fabrictech/gatsby,mickeyreiss/gatsby,aliswodeck/gatsby,mingaldrichgan/gatsby,chiedo/gatsby,ChristopherBiscardi/gatsby,gesposito/gatsby,bzero/gatsby,Khaledgarbaya/gatsby,kidaa/gatsby,gatsbyjs/gatsby,fk/gatsby,okcoker/gatsby,0x80/gatsby,MoOx/gatsby,domenicosolazzo/gatsby,gatsbyjs/gatsby,ChristopherBiscardi/gatsby,MariusCC/gatsby,danielfarrell/gatsby,brianjking/gatsby,ChristopherBiscardi/gatsby,danielfarrell/gatsby,fabrictech/gatsby,mickeyreiss/gatsby,lanastasov/gatsby,rothfels/gatsby,0x80/gatsby,Syncano/gatsby,okcoker/gatsby,fson/gatsby,fk/gatsby,alihalabyah/gatsby,eriknyk/gatsby
f84402c4cfe44ed0ca32cd80053a0beafb293731
src/app/text-mate-scope-selector.coffee
src/app/text-mate-scope-selector.coffee
PEG = require 'pegjs' fsUtils = require 'fs-utils' module.exports = class TextMateScopeSelector @parser: null @createParser: -> unless TextMateScopeSelector.parser? patternPath = require.resolve('text-mate-scope-selector-pattern.pegjs') TextMateScopeSelector.parser = PEG.buildParser(fsUtils.read(patternPath)) TextMateScopeSelector.parser constructor: (@selector) -> @matcher = TextMateScopeSelector.createParser().parse(@selector) matches: (scopes) -> @matcher.matches(scopes)
PEG = require 'pegjs' fsUtils = require 'fs-utils' module.exports = class TextMateScopeSelector @parser: null @createParser: -> unless TextMateScopeSelector.parser? patternPath = require.resolve('text-mate-scope-selector-pattern.pegjs') TextMateScopeSelector.parser = PEG.buildParser(fsUtils.read(patternPath)) TextMateScopeSelector.parser source: null matcher: null constructor: (@source) -> @matcher = TextMateScopeSelector.createParser().parse(@source) matches: (scopes) -> @matcher.matches(scopes)
Rename selector ivar to source
Rename selector ivar to source
CoffeeScript
mit
SlimeQ/atom,abcP9110/atom,charleswhchan/atom,0x73/atom,pengshp/atom,AlisaKiatkongkumthon/atom,rlugojr/atom,n-riesco/atom,Arcanemagus/atom,devoncarew/atom,tjkr/atom,matthewclendening/atom,KENJU/atom,abcP9110/atom,constanzaurzua/atom,Jdesk/atom,jacekkopecky/atom,alfredxing/atom,hpham04/atom,devoncarew/atom,chfritz/atom,stuartquin/atom,liuxiong332/atom,john-kelly/atom,crazyquark/atom,kdheepak89/atom,sekcheong/atom,bencolon/atom,sotayamashita/atom,jacekkopecky/atom,kdheepak89/atom,yomybaby/atom,gisenberg/atom,efatsi/atom,G-Baby/atom,folpindo/atom,Abdillah/atom,Abdillah/atom,codex8/atom,kittens/atom,einarmagnus/atom,hpham04/atom,andrewleverette/atom,kandros/atom,PKRoma/atom,qiujuer/atom,ali/atom,Ju2ender/atom,pkdevbox/atom,jacekkopecky/atom,palita01/atom,SlimeQ/atom,SlimeQ/atom,daxlab/atom,vcarrera/atom,rookie125/atom,atom/atom,scv119/atom,charleswhchan/atom,harshdattani/atom,burodepeper/atom,RobinTec/atom,kjav/atom,constanzaurzua/atom,transcranial/atom,batjko/atom,Jdesk/atom,splodingsocks/atom,gisenberg/atom,ironbox360/atom,n-riesco/atom,Andrey-Pavlov/atom,yalexx/atom,isghe/atom,burodepeper/atom,rsvip/aTom,woss/atom,Mokolea/atom,bcoe/atom,ardeshirj/atom,vhutheesing/atom,liuxiong332/atom,mostafaeweda/atom,Hasimir/atom,me-benni/atom,MjAbuz/atom,fang-yufeng/atom,PKRoma/atom,Hasimir/atom,champagnez/atom,johnrizzo1/atom,Austen-G/BlockBuilder,avdg/atom,toqz/atom,yamhon/atom,kandros/atom,ykeisuke/atom,basarat/atom,h0dgep0dge/atom,jeremyramin/atom,bryonwinger/atom,dsandstrom/atom,bradgearon/atom,AlexxNica/atom,sekcheong/atom,ashneo76/atom,sotayamashita/atom,dannyflax/atom,Ju2ender/atom,acontreras89/atom,jlord/atom,Galactix/atom,alfredxing/atom,Jandersolutions/atom,sxgao3001/atom,abe33/atom,ironbox360/atom,vhutheesing/atom,MjAbuz/atom,codex8/atom,erikhakansson/atom,MjAbuz/atom,davideg/atom,yangchenghu/atom,originye/atom,alfredxing/atom,omarhuanca/atom,batjko/atom,gisenberg/atom,Austen-G/BlockBuilder,panuchart/atom,stinsonga/atom,jordanbtucker/atom,AlbertoBarrago/atom,johnrizzo1/atom,kc8wxm/atom,pombredanne/atom,john-kelly/atom,einarmagnus/atom,FIT-CSE2410-A-Bombs/atom,elkingtonmcb/atom,rjattrill/atom,john-kelly/atom,splodingsocks/atom,ezeoleaf/atom,chengky/atom,acontreras89/atom,anuwat121/atom,abcP9110/atom,t9md/atom,wiggzz/atom,AlbertoBarrago/atom,ironbox360/atom,NunoEdgarGub1/atom,execjosh/atom,AlisaKiatkongkumthon/atom,devmario/atom,Dennis1978/atom,fscherwi/atom,sebmck/atom,RobinTec/atom,panuchart/atom,GHackAnonymous/atom,ppamorim/atom,avdg/atom,nvoron23/atom,prembasumatary/atom,rlugojr/atom,liuderchi/atom,deepfox/atom,0x73/atom,Neron-X5/atom,tony612/atom,vjeux/atom,constanzaurzua/atom,kjav/atom,pombredanne/atom,oggy/atom,sekcheong/atom,vinodpanicker/atom,woss/atom,Jandersolutions/atom,bryonwinger/atom,hharchani/atom,Jandersoft/atom,bsmr-x-script/atom,folpindo/atom,nrodriguez13/atom,me-benni/atom,tjkr/atom,elkingtonmcb/atom,abcP9110/atom,sillvan/atom,me-benni/atom,brettle/atom,amine7536/atom,lovesnow/atom,Neron-X5/atom,bsmr-x-script/atom,hagb4rd/atom,devoncarew/atom,originye/atom,beni55/atom,Jonekee/atom,paulcbetts/atom,lpommers/atom,jlord/atom,seedtigo/atom,jlord/atom,dijs/atom,mostafaeweda/atom,darwin/atom,targeter21/atom,elkingtonmcb/atom,vinodpanicker/atom,qskycolor/atom,qiujuer/atom,chfritz/atom,Dennis1978/atom,charleswhchan/atom,sillvan/atom,devoncarew/atom,kevinrenaers/atom,scippio/atom,codex8/atom,Rodjana/atom,splodingsocks/atom,sillvan/atom,Rychard/atom,sekcheong/atom,stuartquin/atom,yamhon/atom,g2p/atom,deoxilix/atom,nvoron23/atom,johnhaley81/atom,ilovezy/atom,tisu2tisu/atom,execjosh/atom,Jandersolutions/atom,omarhuanca/atom,Shekharrajak/atom,prembasumatary/atom,nucked/atom,fedorov/atom,CraZySacX/atom,SlimeQ/atom,yalexx/atom,deepfox/atom,targeter21/atom,mostafaeweda/atom,synaptek/atom,AlexxNica/atom,jacekkopecky/atom,folpindo/atom,dannyflax/atom,Jandersoft/atom,Huaraz2/atom,decaffeinate-examples/atom,rsvip/aTom,001szymon/atom,niklabh/atom,Jonekee/atom,decaffeinate-examples/atom,CraZySacX/atom,vcarrera/atom,Jandersolutions/atom,dijs/atom,jlord/atom,davideg/atom,prembasumatary/atom,0x73/atom,gisenberg/atom,tanin47/atom,hellendag/atom,jeremyramin/atom,toqz/atom,basarat/atom,hagb4rd/atom,palita01/atom,ivoadf/atom,vjeux/atom,rmartin/atom,tony612/atom,brumm/atom,ReddTea/atom,rjattrill/atom,fredericksilva/atom,kdheepak89/atom,prembasumatary/atom,yangchenghu/atom,YunchengLiao/atom,nvoron23/atom,hharchani/atom,liuderchi/atom,dkfiresky/atom,FoldingText/atom,jjz/atom,devmario/atom,boomwaiza/atom,RuiDGoncalves/atom,sebmck/atom,Austen-G/BlockBuilder,n-riesco/atom,Arcanemagus/atom,tjkr/atom,Jonekee/atom,githubteacher/atom,RuiDGoncalves/atom,Arcanemagus/atom,Dennis1978/atom,Rodjana/atom,Ju2ender/atom,yomybaby/atom,h0dgep0dge/atom,Klozz/atom,sekcheong/atom,bolinfest/atom,sxgao3001/atom,devmario/atom,harshdattani/atom,stuartquin/atom,Klozz/atom,chengky/atom,jjz/atom,mrodalgaard/atom,anuwat121/atom,kevinrenaers/atom,beni55/atom,Hasimir/atom,einarmagnus/atom,tmunro/atom,medovob/atom,NunoEdgarGub1/atom,isghe/atom,DiogoXRP/atom,pombredanne/atom,brumm/atom,liuderchi/atom,rsvip/aTom,fscherwi/atom,davideg/atom,gontadu/atom,g2p/atom,ObviouslyGreen/atom,hellendag/atom,beni55/atom,codex8/atom,cyzn/atom,tony612/atom,jtrose2/atom,bcoe/atom,transcranial/atom,FoldingText/atom,niklabh/atom,fang-yufeng/atom,vcarrera/atom,dsandstrom/atom,vjeux/atom,h0dgep0dge/atom,liuxiong332/atom,gabrielPeart/atom,bradgearon/atom,erikhakansson/atom,RobinTec/atom,kittens/atom,ykeisuke/atom,MjAbuz/atom,wiggzz/atom,AdrianVovk/substance-ide,svanharmelen/atom,woss/atom,sebmck/atom,decaffeinate-examples/atom,lpommers/atom,einarmagnus/atom,Locke23rus/atom,mnquintana/atom,Shekharrajak/atom,gzzhanghao/atom,ReddTea/atom,wiggzz/atom,jtrose2/atom,chengky/atom,GHackAnonymous/atom,RobinTec/atom,Jdesk/atom,fedorov/atom,hharchani/atom,ivoadf/atom,Andrey-Pavlov/atom,kdheepak89/atom,fedorov/atom,kaicataldo/atom,FoldingText/atom,fedorov/atom,mrodalgaard/atom,avdg/atom,mdumrauf/atom,Hasimir/atom,jacekkopecky/atom,toqz/atom,gzzhanghao/atom,Rychard/atom,sebmck/atom,kjav/atom,scv119/atom,ralphtheninja/atom,mostafaeweda/atom,anuwat121/atom,githubteacher/atom,yomybaby/atom,Jdesk/atom,pombredanne/atom,ali/atom,nrodriguez13/atom,Shekharrajak/atom,Jandersoft/atom,xream/atom,oggy/atom,einarmagnus/atom,andrewleverette/atom,me6iaton/atom,hakatashi/atom,crazyquark/atom,transcranial/atom,dannyflax/atom,Klozz/atom,mertkahyaoglu/atom,vcarrera/atom,ykeisuke/atom,efatsi/atom,n-riesco/atom,kevinrenaers/atom,hharchani/atom,G-Baby/atom,xream/atom,Ju2ender/atom,kc8wxm/atom,RobinTec/atom,medovob/atom,constanzaurzua/atom,dkfiresky/atom,russlescai/atom,chfritz/atom,ashneo76/atom,ivoadf/atom,brettle/atom,svanharmelen/atom,ralphtheninja/atom,MjAbuz/atom,Mokolea/atom,helber/atom,gzzhanghao/atom,tisu2tisu/atom,bcoe/atom,CraZySacX/atom,harshdattani/atom,me6iaton/atom,Jandersoft/atom,amine7536/atom,andrewleverette/atom,dkfiresky/atom,ilovezy/atom,Locke23rus/atom,yangchenghu/atom,rmartin/atom,basarat/atom,palita01/atom,pkdevbox/atom,G-Baby/atom,ali/atom,johnhaley81/atom,hakatashi/atom,tony612/atom,sebmck/atom,me6iaton/atom,001szymon/atom,kjav/atom,qskycolor/atom,charleswhchan/atom,nvoron23/atom,erikhakansson/atom,brumm/atom,amine7536/atom,ReddTea/atom,stinsonga/atom,ReddTea/atom,fang-yufeng/atom,florianb/atom,abe33/atom,ObviouslyGreen/atom,GHackAnonymous/atom,phord/atom,FoldingText/atom,synaptek/atom,florianb/atom,efatsi/atom,nucked/atom,BogusCurry/atom,BogusCurry/atom,rlugojr/atom,Shekharrajak/atom,jjz/atom,yomybaby/atom,bradgearon/atom,scv119/atom,xream/atom,atom/atom,lisonma/atom,mdumrauf/atom,Hasimir/atom,burodepeper/atom,bj7/atom,yalexx/atom,Locke23rus/atom,hharchani/atom,nvoron23/atom,prembasumatary/atom,FoldingText/atom,bcoe/atom,FIT-CSE2410-A-Bombs/atom,kandros/atom,isghe/atom,mnquintana/atom,lovesnow/atom,florianb/atom,pengshp/atom,kittens/atom,jtrose2/atom,rmartin/atom,Sangaroonaom/atom,rmartin/atom,jjz/atom,ppamorim/atom,mertkahyaoglu/atom,matthewclendening/atom,phord/atom,lisonma/atom,nrodriguez13/atom,rxkit/atom,sxgao3001/atom,scippio/atom,YunchengLiao/atom,me6iaton/atom,AlexxNica/atom,helber/atom,ali/atom,abcP9110/atom,paulcbetts/atom,Galactix/atom,qiujuer/atom,lovesnow/atom,oggy/atom,davideg/atom,pkdevbox/atom,Ingramz/atom,Neron-X5/atom,toqz/atom,AdrianVovk/substance-ide,dijs/atom,yalexx/atom,gontadu/atom,liuxiong332/atom,seedtigo/atom,ObviouslyGreen/atom,PKRoma/atom,russlescai/atom,omarhuanca/atom,fredericksilva/atom,paulcbetts/atom,dkfiresky/atom,alexandergmann/atom,chengky/atom,hpham04/atom,Sangaroonaom/atom,davideg/atom,lisonma/atom,Ingramz/atom,isghe/atom,johnhaley81/atom,rsvip/aTom,NunoEdgarGub1/atom,mostafaeweda/atom,darwin/atom,NunoEdgarGub1/atom,ezeoleaf/atom,deoxilix/atom,matthewclendening/atom,champagnez/atom,darwin/atom,ardeshirj/atom,jeremyramin/atom,hakatashi/atom,pombredanne/atom,vinodpanicker/atom,Sangaroonaom/atom,Austen-G/BlockBuilder,svanharmelen/atom,mdumrauf/atom,liuderchi/atom,Huaraz2/atom,ilovezy/atom,bryonwinger/atom,ppamorim/atom,sotayamashita/atom,dannyflax/atom,GHackAnonymous/atom,johnrizzo1/atom,KENJU/atom,vinodpanicker/atom,john-kelly/atom,boomwaiza/atom,pengshp/atom,rmartin/atom,isghe/atom,devmario/atom,BogusCurry/atom,sxgao3001/atom,qiujuer/atom,jtrose2/atom,fredericksilva/atom,jtrose2/atom,qskycolor/atom,basarat/atom,h0dgep0dge/atom,Austen-G/BlockBuilder,scv119/atom,vinodpanicker/atom,Neron-X5/atom,yomybaby/atom,Neron-X5/atom,tmunro/atom,panuchart/atom,kc8wxm/atom,bcoe/atom,acontreras89/atom,cyzn/atom,YunchengLiao/atom,batjko/atom,mnquintana/atom,kaicataldo/atom,russlescai/atom,cyzn/atom,chengky/atom,brettle/atom,ilovezy/atom,oggy/atom,ashneo76/atom,dsandstrom/atom,ppamorim/atom,KENJU/atom,YunchengLiao/atom,lisonma/atom,gabrielPeart/atom,Abdillah/atom,YunchengLiao/atom,bsmr-x-script/atom,decaffeinate-examples/atom,mertkahyaoglu/atom,alexandergmann/atom,stinsonga/atom,ardeshirj/atom,dannyflax/atom,jacekkopecky/atom,rsvip/aTom,Ingramz/atom,Abdillah/atom,rjattrill/atom,boomwaiza/atom,yalexx/atom,targeter21/atom,qskycolor/atom,helber/atom,vjeux/atom,synaptek/atom,mertkahyaoglu/atom,Andrey-Pavlov/atom,DiogoXRP/atom,lovesnow/atom,mnquintana/atom,gisenberg/atom,acontreras89/atom,bencolon/atom,Ju2ender/atom,alexandergmann/atom,ilovezy/atom,Shekharrajak/atom,florianb/atom,Huaraz2/atom,russlescai/atom,fang-yufeng/atom,ReddTea/atom,vcarrera/atom,sillvan/atom,liuxiong332/atom,constanzaurzua/atom,vjeux/atom,daxlab/atom,SlimeQ/atom,AlbertoBarrago/atom,woss/atom,synaptek/atom,ralphtheninja/atom,gabrielPeart/atom,hellendag/atom,lpommers/atom,seedtigo/atom,ppamorim/atom,t9md/atom,g2p/atom,kdheepak89/atom,tanin47/atom,fedorov/atom,fredericksilva/atom,t9md/atom,oggy/atom,mrodalgaard/atom,woss/atom,Andrey-Pavlov/atom,rxkit/atom,crazyquark/atom,champagnez/atom,kittens/atom,tmunro/atom,amine7536/atom,me6iaton/atom,gontadu/atom,hpham04/atom,medovob/atom,crazyquark/atom,Galactix/atom,mnquintana/atom,Andrey-Pavlov/atom,deepfox/atom,targeter21/atom,codex8/atom,omarhuanca/atom,ezeoleaf/atom,qiujuer/atom,FIT-CSE2410-A-Bombs/atom,matthewclendening/atom,daxlab/atom,tisu2tisu/atom,jjz/atom,kc8wxm/atom,githubteacher/atom,Jandersoft/atom,KENJU/atom,dkfiresky/atom,acontreras89/atom,bencolon/atom,fredericksilva/atom,basarat/atom,hagb4rd/atom,RuiDGoncalves/atom,bj7/atom,hagb4rd/atom,charleswhchan/atom,Abdillah/atom,0x73/atom,FoldingText/atom,tanin47/atom,deepfox/atom,Mokolea/atom,GHackAnonymous/atom,stinsonga/atom,abe33/atom,paulcbetts/atom,fang-yufeng/atom,dannyflax/atom,bryonwinger/atom,omarhuanca/atom,jordanbtucker/atom,ezeoleaf/atom,toqz/atom,devmario/atom,execjosh/atom,fscherwi/atom,jordanbtucker/atom,atom/atom,rookie125/atom,Rodjana/atom,n-riesco/atom,tony612/atom,phord/atom,john-kelly/atom,rookie125/atom,nucked/atom,splodingsocks/atom,deepfox/atom,qskycolor/atom,rjattrill/atom,kc8wxm/atom,jlord/atom,devoncarew/atom,bolinfest/atom,Jandersolutions/atom,kittens/atom,matthewclendening/atom,hakatashi/atom,Austen-G/BlockBuilder,deoxilix/atom,KENJU/atom,crazyquark/atom,ali/atom,kjav/atom,bolinfest/atom,bj7/atom,targeter21/atom,basarat/atom,synaptek/atom,originye/atom,Rychard/atom,russlescai/atom,rxkit/atom,florianb/atom,DiogoXRP/atom,hpham04/atom,001szymon/atom,vhutheesing/atom,dsandstrom/atom,sillvan/atom,yamhon/atom,sxgao3001/atom,Jdesk/atom,scippio/atom,hagb4rd/atom,amine7536/atom,lisonma/atom,niklabh/atom,batjko/atom,AlisaKiatkongkumthon/atom,AdrianVovk/substance-ide,NunoEdgarGub1/atom,Galactix/atom,lovesnow/atom,Galactix/atom,batjko/atom,kaicataldo/atom,dsandstrom/atom,mertkahyaoglu/atom
715594ad6086df24c0be034741489f9cbc524cc4
app/assets/javascripts/common.js.coffee
app/assets/javascripts/common.js.coffee
initYandexShare = (element) -> setTimeout (() -> Ya.share2(element)), 0 $ -> simplemdeId = document.querySelectorAll('.edit_event')[0].id if simplemdeId? new SimpleMDE element: document.getElementById("event_description") indentWithTabs: false promptURLs: true spellChecker: false autosave: enabled: true uniqueId: simplemdeId $('.admin-info i.fa').tooltip() $('li.participant a').tooltip() if $('#uuid').length > 0 uid = document.getElementById('uuid').dataset.userId ga('set', '&uid', uid) $('input#event_started_at').datetimepicker language: 'ru' minuteStepping: 15 showToday: true sideBySide: true icons: time: "fa fa-clock-o" date: "fa fa-calendar" up: "fa fa-arrow-up" down: "fa fa-arrow-down" Turbolinks.enableProgressBar() shares = document.querySelectorAll('.ya-share2') sharesInitialized = document.querySelectorAll('.ya-share2_inited') if shares.length > 0 and sharesInitialized.length is 0 Array.from(shares).forEach (element) -> initYandexShare(element)
initYandexShare = (element) -> setTimeout (() -> Ya.share2(element)), 0 $ -> simplemdeId = document.querySelectorAll('.edit_event')[0]?.id simplemdeId ||= document.getElementById('new_event')?.id if simplemdeId? new SimpleMDE element: document.getElementById("event_description") indentWithTabs: false promptURLs: true spellChecker: false autosave: enabled: true deplay: 3 uniqueId: simplemdeId $('.admin-info i.fa').tooltip() $('li.participant a').tooltip() if $('#uuid').length > 0 uid = document.getElementById('uuid').dataset.userId ga('set', '&uid', uid) $('input#event_started_at').datetimepicker language: 'ru' minuteStepping: 15 showToday: true sideBySide: true icons: time: "fa fa-clock-o" date: "fa fa-calendar" up: "fa fa-arrow-up" down: "fa fa-arrow-down" Turbolinks.enableProgressBar() shares = document.querySelectorAll('.ya-share2') sharesInitialized = document.querySelectorAll('.ya-share2_inited') if shares.length > 0 and sharesInitialized.length is 0 Array.from(shares).forEach (element) -> initYandexShare(element)
Fix md editor on event creation
Fix md editor on event creation
CoffeeScript
mit
NNRUG/it52-rails,NNRUG/it52-rails,NNRUG/it52-rails,NNRUG/it52-rails,NNRUG/it52-rails
de41e7a3da92d6f3ef9ad608732ef96c9019724a
app/assets/javascripts/commits.js.coffee
app/assets/javascripts/commits.js.coffee
class CommitsList @data = ref: null limit: 0 offset: 0 @disable = false @showProgress: -> $('.loading').show() @hideProgress: -> $('.loading').hide() @init: (ref, limit) -> $(".day-commits-table li.commit").live 'click', (event) -> if event.target.nodeName != "A" location.href = $(this).attr("url") e.stopPropagation() return false @data.ref = ref @data.limit = limit @data.offset = limit this.initLoadMore() this.showProgress() @getOld: -> this.showProgress() $.ajax type: "GET" url: location.href data: @data complete: this.hideProgress success: (data) -> CommitsList.append(data.count, data.html) dataType: "json" @append: (count, html) -> $("#commits-list").append(html) if count > 0 @data.offset += count else @disable = true @initLoadMore: -> $(document).unbind('scroll') $(document).endlessScroll bottomPixels: 400 fireDelay: 1000 fireOnce: true ceaseFire: => @disable callback: => this.getOld() this.CommitsList = CommitsList
class CommitsList @data = ref: null limit: 0 offset: 0 @disable = false @showProgress: -> $('.loading').show() @hideProgress: -> $('.loading').hide() @init: (ref, limit) -> $("body").on "click", ".day-commits-table li.commit", (event) -> if event.target.nodeName != "A" location.href = $(this).attr("url") e.stopPropagation() return false @data.ref = ref @data.limit = limit @data.offset = limit this.initLoadMore() this.showProgress() @getOld: -> this.showProgress() $.ajax type: "GET" url: location.href data: @data complete: this.hideProgress success: (data) -> CommitsList.append(data.count, data.html) dataType: "json" @append: (count, html) -> $("#commits-list").append(html) if count > 0 @data.offset += count else @disable = true @initLoadMore: -> $(document).unbind('scroll') $(document).endlessScroll bottomPixels: 400 fireDelay: 1000 fireOnce: true ceaseFire: => @disable callback: => this.getOld() this.CommitsList = CommitsList
Replace jquery deprecated .live with .on
Replace jquery deprecated .live with .on
CoffeeScript
mit
ksoichiro/gitlabhq,ksoichiro/gitlabhq,kotaro-dev/gitlab-6-9,ksoichiro/gitlabhq,kotaro-dev/gitlab-6-9,kotaro-dev/gitlab-6-9,ksoichiro/gitlabhq
aca0ba79acc90c3a212e3dc4d7c86c3ad1f43e63
app/assets/utensils/detect/detect.coffee
app/assets/utensils/detect/detect.coffee
#= require utensils/utensils class utensils.Detect # Describes browser detection for transition end events # utensils.Detect.transition.end # utensils.Detect.hasTransition @transition = (=> transitionEnd = (-> el = document.createElement("tranny") transEndEventNames = WebkitTransition: "webkitTransitionEnd" MozTransition: "transitionend" OTransition: "oTransitionEnd" msTransition: "MSTransitionEnd" transition: "transitionend" name = undefined for name of transEndEventNames return transEndEventNames[name] if el.style[name] isnt `undefined` )() @hasTransition = if transitionEnd then true else false return {end: transitionEnd ?= false} )()
#= require utensils/utensils class utensils.Detect # Describes browser detection for transition end events # utensils.Detect.transition.end # utensils.Detect.hasTransition @transition = (=> transitionEnd = (-> el = document.createElement("tranny") transEndEventNames = WebkitTransition: "webkitTransitionEnd" MozTransition: "transitionend" transition: "transitionend" name = undefined for name of transEndEventNames return transEndEventNames[name] if el.style[name] isnt `undefined` )() @hasTransition = if transitionEnd then true else false return {end: transitionEnd ?= false} )()
Remove transition end for MS and Opera
Remove transition end for MS and Opera MS has moved to the standard and Opera is moving to blink
CoffeeScript
mit
modeset/utensils,modeset/utensils,modeset/utensils
f3a20bdc85358944a6c03e4701659f55d039c4b6
coffee/cilantro/ui/concept/search.coffee
coffee/cilantro/ui/concept/search.coffee
define [ '../core' '../search' ], (c, search)-> # Takes a collection of concepts to filter/get the concept model instances # for rendering class ConceptSearch extends search.Search className: 'concept-search search' events: 'input typeahead:selected': 'focusConcept' options: -> url = c.data.concepts.url() return { name: 'Concepts' valueKey: 'name' limit: 10 remote: url: "#{ url }?query=%QUERY&brief=1" filter: (resp) => datums = [] c._.each resp, (datum) => if @collection.get(datum.id) datums.push(datum) return datums } focusConcept: (event, datum) -> c.publish c.CONCEPT_FOCUS, datum.id { ConceptSearch }
define [ '../core' '../search' ], (c, search)-> # Takes a collection of concepts to filter/get the concept model instances # for rendering class ConceptSearch extends search.Search className: 'concept-search search' events: 'typeahead:selected input': 'focusConcept' 'typeahead:autocompleted input': 'focusConcept' options: -> url = c.data.concepts.url() return { name: 'Concepts' valueKey: 'name' limit: 10 remote: url: "#{ url }?query=%QUERY&brief=1" filter: (resp) => datums = [] c._.each resp, (datum) => if @collection.get(datum.id) datums.push(datum) return datums } focusConcept: (event, datum) -> c.publish c.CONCEPT_FOCUS, datum.id { ConceptSearch }
Fix reversed events hash for ConceptSearch, add autocomplete handler
Fix reversed events hash for ConceptSearch, add autocomplete handler
CoffeeScript
bsd-2-clause
chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro
b6e92f815ee73283590865c06f41ae840169b1a2
spec/header-cells/string-cell-spec.coffee
spec/header-cells/string-cell-spec.coffee
describe 'HeaderCells StringCell', -> HeaderCell = require '../../lib/javascripts/header-cells/string-cell' initView = ({ model } = {}) -> model ?= new Backbone.Model label: 'header cell label' new HeaderCell { model } showView = -> initView(arguments...).render() it 'renders the label', -> expect(showView().$el).toHaveText 'header cell label' it 'has a className', -> expect(showView().$el).toHaveClass 'string-cell'
describe 'HeaderCells StringCell', -> HeaderCell = require '../../lib/javascripts/header-cells/string-cell' initView = ({ model } = {}) -> model ?= new Backbone.Model label: 'header cell label' new HeaderCell { model } showView = -> initView(arguments...).render() it 'renders the label', -> expect(showView().$el).toHaveText 'header cell label' it 'has a className', -> expect(showView().$el).toHaveClass 'header-cells-string-cell'
Fix header cells string cell className spec
Fix header cells string cell className spec
CoffeeScript
mit
juanca/marionette-tree,juanca/marionette-tree
6e83c10e0ef2732e48cf6cf895a7fee308212e59
src/coffee/cilantro/models/query.coffee
src/coffee/cilantro/models/query.coffee
define [ '../core' './base' ], (c, base) -> class QueryModel extends base.Model parse: (attrs) -> if attrs? and not attrs.shared_users? attrs.shared_users = [] return attrs class QueryCollection extends base.Collection model: QueryModel url: -> c.session.url('queries') initialize: -> super c.subscribe c.SESSION_OPENED, => @fetch(reset: true) c.subscribe c.SESSION_CLOSE, => @reset() class SharedQueryCollection extends QueryCollection url: -> c.session.url('shared_queries') initialize: -> super @on 'reset', -> c.promiser.resolve('shared_queries') { QueryModel, QueryCollection, SharedQueryCollection }
define [ '../core' './base' ], (c, base) -> class QueryModel extends base.Model parse: (attrs) -> super if attrs? and not attrs.shared_users? attrs.shared_users = [] return attrs class QueryCollection extends base.Collection model: QueryModel url: -> c.session.url('queries') initialize: -> super c.subscribe c.SESSION_OPENED, => @fetch(reset: true) c.subscribe c.SESSION_CLOSE, => @reset() class SharedQueryCollection extends QueryCollection url: -> c.session.url('shared_queries') initialize: -> super @on 'reset', -> c.promiser.resolve('shared_queries') { QueryModel, QueryCollection, SharedQueryCollection }
Add call to super in QueryModel parse() method
Add call to super in QueryModel parse() method
CoffeeScript
bsd-2-clause
chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro
e25aece700363a318c903a37bdc43001bdd02d17
src/app/repository-status-handler.coffee
src/app/repository-status-handler.coffee
Git = require 'git-utils' fsUtils = require 'fs-utils' path = require 'path' module.exports = loadStatuses: (repoPath) -> repo = Git.open(repoPath) if repo? workingDirectoryPath = repo.getWorkingDirectory() statuses = {} for path, status of repo.getStatus() statuses[path.join(workingDirectoryPath, path)] = status upstream = repo.getAheadBehindCount() repo.release() else upstream = {} statuses = {} callTaskMethod('statusesLoaded', {statuses, upstream})
Git = require 'git-utils' fsUtils = require 'fs-utils' path = require 'path' module.exports = loadStatuses: (repoPath) -> repo = Git.open(repoPath) if repo? workingDirectoryPath = repo.getWorkingDirectory() statuses = {} for filePath, status of repo.getStatus() statuses[path.join(workingDirectoryPath, filePath)] = status upstream = repo.getAheadBehindCount() repo.release() else upstream = {} statuses = {} callTaskMethod('statusesLoaded', {statuses, upstream})
Use filePath instead of path as variable name
Use filePath instead of path as variable name
CoffeeScript
mit
yalexx/atom,deoxilix/atom,chfritz/atom,ppamorim/atom,Galactix/atom,woss/atom,lpommers/atom,liuderchi/atom,mdumrauf/atom,seedtigo/atom,kc8wxm/atom,devmario/atom,rlugojr/atom,chengky/atom,helber/atom,seedtigo/atom,DiogoXRP/atom,Abdillah/atom,acontreras89/atom,Klozz/atom,Austen-G/BlockBuilder,vjeux/atom,brumm/atom,yalexx/atom,RuiDGoncalves/atom,transcranial/atom,Neron-X5/atom,nvoron23/atom,einarmagnus/atom,acontreras89/atom,targeter21/atom,bradgearon/atom,ali/atom,oggy/atom,RobinTec/atom,sxgao3001/atom,dannyflax/atom,deepfox/atom,dsandstrom/atom,gisenberg/atom,andrewleverette/atom,Shekharrajak/atom,splodingsocks/atom,devoncarew/atom,nvoron23/atom,yangchenghu/atom,omarhuanca/atom,n-riesco/atom,qskycolor/atom,sillvan/atom,yomybaby/atom,tmunro/atom,bsmr-x-script/atom,hagb4rd/atom,mnquintana/atom,toqz/atom,daxlab/atom,dkfiresky/atom,russlescai/atom,Jandersoft/atom,bcoe/atom,ironbox360/atom,hagb4rd/atom,originye/atom,deoxilix/atom,brumm/atom,h0dgep0dge/atom,RuiDGoncalves/atom,ardeshirj/atom,AdrianVovk/substance-ide,fedorov/atom,bradgearon/atom,G-Baby/atom,johnrizzo1/atom,niklabh/atom,batjko/atom,einarmagnus/atom,liuxiong332/atom,kittens/atom,hharchani/atom,sebmck/atom,h0dgep0dge/atom,paulcbetts/atom,0x73/atom,Jdesk/atom,Sangaroonaom/atom,fedorov/atom,sekcheong/atom,Abdillah/atom,scv119/atom,basarat/atom,vhutheesing/atom,yangchenghu/atom,targeter21/atom,mnquintana/atom,pombredanne/atom,splodingsocks/atom,codex8/atom,harshdattani/atom,jlord/atom,hakatashi/atom,gabrielPeart/atom,davideg/atom,wiggzz/atom,SlimeQ/atom,jlord/atom,NunoEdgarGub1/atom,kjav/atom,Galactix/atom,G-Baby/atom,ivoadf/atom,ykeisuke/atom,sotayamashita/atom,Ju2ender/atom,BogusCurry/atom,AlisaKiatkongkumthon/atom,darwin/atom,stuartquin/atom,palita01/atom,abcP9110/atom,dkfiresky/atom,abcP9110/atom,gisenberg/atom,mertkahyaoglu/atom,execjosh/atom,kdheepak89/atom,Jdesk/atom,matthewclendening/atom,basarat/atom,crazyquark/atom,Shekharrajak/atom,gisenberg/atom,john-kelly/atom,medovob/atom,FIT-CSE2410-A-Bombs/atom,ivoadf/atom,GHackAnonymous/atom,paulcbetts/atom,me-benni/atom,batjko/atom,Neron-X5/atom,Ingramz/atom,oggy/atom,ali/atom,panuchart/atom,devoncarew/atom,ashneo76/atom,oggy/atom,sillvan/atom,vcarrera/atom,t9md/atom,Rodjana/atom,MjAbuz/atom,gabrielPeart/atom,mrodalgaard/atom,andrewleverette/atom,stinsonga/atom,mrodalgaard/atom,AdrianVovk/substance-ide,paulcbetts/atom,john-kelly/atom,codex8/atom,ironbox360/atom,Ju2ender/atom,jlord/atom,h0dgep0dge/atom,Rodjana/atom,bcoe/atom,ReddTea/atom,yomybaby/atom,charleswhchan/atom,medovob/atom,florianb/atom,sebmck/atom,florianb/atom,Andrey-Pavlov/atom,Klozz/atom,synaptek/atom,me6iaton/atom,omarhuanca/atom,Klozz/atom,Dennis1978/atom,fredericksilva/atom,sotayamashita/atom,ykeisuke/atom,jordanbtucker/atom,brettle/atom,Shekharrajak/atom,yomybaby/atom,kdheepak89/atom,ivoadf/atom,basarat/atom,bradgearon/atom,g2p/atom,vcarrera/atom,sillvan/atom,tisu2tisu/atom,sxgao3001/atom,scippio/atom,seedtigo/atom,lisonma/atom,Ju2ender/atom,bj7/atom,yomybaby/atom,einarmagnus/atom,dsandstrom/atom,rookie125/atom,kdheepak89/atom,liuxiong332/atom,Huaraz2/atom,Abdillah/atom,ppamorim/atom,Sangaroonaom/atom,qskycolor/atom,githubteacher/atom,johnhaley81/atom,AlisaKiatkongkumthon/atom,isghe/atom,matthewclendening/atom,tanin47/atom,fang-yufeng/atom,n-riesco/atom,xream/atom,gabrielPeart/atom,brettle/atom,kdheepak89/atom,kandros/atom,beni55/atom,YunchengLiao/atom,t9md/atom,mostafaeweda/atom,kjav/atom,0x73/atom,Dennis1978/atom,davideg/atom,abe33/atom,mnquintana/atom,Hasimir/atom,dannyflax/atom,jacekkopecky/atom,toqz/atom,Sangaroonaom/atom,lisonma/atom,KENJU/atom,basarat/atom,abcP9110/atom,fang-yufeng/atom,folpindo/atom,vinodpanicker/atom,deepfox/atom,pombredanne/atom,crazyquark/atom,decaffeinate-examples/atom,mostafaeweda/atom,woss/atom,MjAbuz/atom,Rychard/atom,liuderchi/atom,john-kelly/atom,bolinfest/atom,kaicataldo/atom,rsvip/aTom,jacekkopecky/atom,Jdesk/atom,davideg/atom,BogusCurry/atom,prembasumatary/atom,dijs/atom,Jandersoft/atom,hagb4rd/atom,SlimeQ/atom,jtrose2/atom,beni55/atom,hharchani/atom,jacekkopecky/atom,jtrose2/atom,sotayamashita/atom,constanzaurzua/atom,GHackAnonymous/atom,jjz/atom,ykeisuke/atom,Neron-X5/atom,yamhon/atom,devoncarew/atom,charleswhchan/atom,bsmr-x-script/atom,atom/atom,mrodalgaard/atom,vinodpanicker/atom,sxgao3001/atom,Huaraz2/atom,transcranial/atom,johnrizzo1/atom,phord/atom,DiogoXRP/atom,ObviouslyGreen/atom,Jandersolutions/atom,pkdevbox/atom,rlugojr/atom,nvoron23/atom,stinsonga/atom,mnquintana/atom,johnhaley81/atom,ilovezy/atom,scv119/atom,folpindo/atom,Ingramz/atom,prembasumatary/atom,me6iaton/atom,sekcheong/atom,ppamorim/atom,rsvip/aTom,svanharmelen/atom,Andrey-Pavlov/atom,fedorov/atom,wiggzz/atom,ezeoleaf/atom,jordanbtucker/atom,Andrey-Pavlov/atom,n-riesco/atom,vinodpanicker/atom,omarhuanca/atom,jordanbtucker/atom,phord/atom,anuwat121/atom,qskycolor/atom,nucked/atom,AlexxNica/atom,vcarrera/atom,fang-yufeng/atom,ezeoleaf/atom,gzzhanghao/atom,basarat/atom,t9md/atom,einarmagnus/atom,yalexx/atom,bcoe/atom,alfredxing/atom,mostafaeweda/atom,palita01/atom,dannyflax/atom,liuderchi/atom,cyzn/atom,hpham04/atom,Jandersolutions/atom,tmunro/atom,ObviouslyGreen/atom,rjattrill/atom,qiujuer/atom,qskycolor/atom,Galactix/atom,CraZySacX/atom,hharchani/atom,Rychard/atom,cyzn/atom,Ju2ender/atom,sxgao3001/atom,transcranial/atom,dsandstrom/atom,BogusCurry/atom,omarhuanca/atom,harshdattani/atom,russlescai/atom,rxkit/atom,mertkahyaoglu/atom,kc8wxm/atom,elkingtonmcb/atom,kjav/atom,abcP9110/atom,amine7536/atom,jeremyramin/atom,kc8wxm/atom,russlescai/atom,0x73/atom,synaptek/atom,nucked/atom,burodepeper/atom,me-benni/atom,brettle/atom,bolinfest/atom,florianb/atom,me6iaton/atom,scippio/atom,amine7536/atom,oggy/atom,ilovezy/atom,stuartquin/atom,sebmck/atom,me6iaton/atom,ali/atom,AlbertoBarrago/atom,charleswhchan/atom,kc8wxm/atom,Jonekee/atom,Huaraz2/atom,anuwat121/atom,SlimeQ/atom,scv119/atom,batjko/atom,hpham04/atom,deoxilix/atom,tisu2tisu/atom,yamhon/atom,champagnez/atom,alexandergmann/atom,kdheepak89/atom,FoldingText/atom,yomybaby/atom,acontreras89/atom,tmunro/atom,crazyquark/atom,dkfiresky/atom,alexandergmann/atom,liuxiong332/atom,kjav/atom,chengky/atom,Hasimir/atom,vinodpanicker/atom,rsvip/aTom,nrodriguez13/atom,florianb/atom,vjeux/atom,kaicataldo/atom,einarmagnus/atom,devoncarew/atom,bcoe/atom,chfritz/atom,kandros/atom,Arcanemagus/atom,boomwaiza/atom,jeremyramin/atom,ReddTea/atom,dannyflax/atom,Austen-G/BlockBuilder,AlbertoBarrago/atom,hpham04/atom,sebmck/atom,splodingsocks/atom,Arcanemagus/atom,001szymon/atom,hagb4rd/atom,gontadu/atom,chengky/atom,palita01/atom,splodingsocks/atom,paulcbetts/atom,devoncarew/atom,ralphtheninja/atom,Shekharrajak/atom,Locke23rus/atom,darwin/atom,NunoEdgarGub1/atom,sillvan/atom,PKRoma/atom,me6iaton/atom,rjattrill/atom,mnquintana/atom,alexandergmann/atom,hagb4rd/atom,john-kelly/atom,NunoEdgarGub1/atom,Jandersolutions/atom,Jdesk/atom,batjko/atom,stinsonga/atom,jlord/atom,FoldingText/atom,hharchani/atom,vjeux/atom,tony612/atom,lovesnow/atom,brumm/atom,bj7/atom,prembasumatary/atom,AlisaKiatkongkumthon/atom,johnrizzo1/atom,rjattrill/atom,MjAbuz/atom,Austen-G/BlockBuilder,Andrey-Pavlov/atom,qiujuer/atom,pombredanne/atom,folpindo/atom,Jdesk/atom,hharchani/atom,ardeshirj/atom,andrewleverette/atom,isghe/atom,bryonwinger/atom,phord/atom,oggy/atom,Arcanemagus/atom,sekcheong/atom,johnhaley81/atom,FoldingText/atom,tjkr/atom,CraZySacX/atom,beni55/atom,atom/atom,deepfox/atom,vhutheesing/atom,avdg/atom,rookie125/atom,rmartin/atom,fscherwi/atom,yalexx/atom,originye/atom,Hasimir/atom,githubteacher/atom,florianb/atom,ralphtheninja/atom,liuderchi/atom,h0dgep0dge/atom,bsmr-x-script/atom,qiujuer/atom,ashneo76/atom,rmartin/atom,hakatashi/atom,yangchenghu/atom,jjz/atom,avdg/atom,RobinTec/atom,chengky/atom,pombredanne/atom,panuchart/atom,KENJU/atom,pkdevbox/atom,nrodriguez13/atom,nucked/atom,boomwaiza/atom,Galactix/atom,bencolon/atom,PKRoma/atom,decaffeinate-examples/atom,pengshp/atom,mdumrauf/atom,AlexxNica/atom,constanzaurzua/atom,scippio/atom,jtrose2/atom,niklabh/atom,ppamorim/atom,kittens/atom,Andrey-Pavlov/atom,omarhuanca/atom,pombredanne/atom,AlexxNica/atom,bryonwinger/atom,cyzn/atom,champagnez/atom,darwin/atom,niklabh/atom,crazyquark/atom,RobinTec/atom,scv119/atom,kevinrenaers/atom,execjosh/atom,gontadu/atom,jacekkopecky/atom,sebmck/atom,SlimeQ/atom,elkingtonmcb/atom,rxkit/atom,xream/atom,Abdillah/atom,gzzhanghao/atom,constanzaurzua/atom,tanin47/atom,boomwaiza/atom,targeter21/atom,kittens/atom,dsandstrom/atom,originye/atom,FIT-CSE2410-A-Bombs/atom,PKRoma/atom,jjz/atom,Jonekee/atom,daxlab/atom,lisonma/atom,pengshp/atom,hellendag/atom,bryonwinger/atom,decaffeinate-examples/atom,stuartquin/atom,constanzaurzua/atom,rxkit/atom,svanharmelen/atom,isghe/atom,dijs/atom,ardeshirj/atom,davideg/atom,nvoron23/atom,erikhakansson/atom,liuxiong332/atom,n-riesco/atom,chfritz/atom,Jonekee/atom,devmario/atom,codex8/atom,fscherwi/atom,devmario/atom,lpommers/atom,toqz/atom,CraZySacX/atom,abe33/atom,rjattrill/atom,alfredxing/atom,fredericksilva/atom,alfredxing/atom,YunchengLiao/atom,rookie125/atom,charleswhchan/atom,vcarrera/atom,atom/atom,rmartin/atom,vinodpanicker/atom,jjz/atom,FIT-CSE2410-A-Bombs/atom,ironbox360/atom,toqz/atom,tony612/atom,ali/atom,ilovezy/atom,deepfox/atom,Neron-X5/atom,me-benni/atom,jacekkopecky/atom,AdrianVovk/substance-ide,fang-yufeng/atom,Austen-G/BlockBuilder,jjz/atom,pengshp/atom,helber/atom,synaptek/atom,FoldingText/atom,batjko/atom,acontreras89/atom,Locke23rus/atom,DiogoXRP/atom,constanzaurzua/atom,mostafaeweda/atom,rmartin/atom,Locke23rus/atom,panuchart/atom,matthewclendening/atom,fedorov/atom,medovob/atom,amine7536/atom,fang-yufeng/atom,svanharmelen/atom,kevinrenaers/atom,avdg/atom,ezeoleaf/atom,prembasumatary/atom,lovesnow/atom,KENJU/atom,stinsonga/atom,isghe/atom,efatsi/atom,davideg/atom,kittens/atom,lovesnow/atom,tanin47/atom,gisenberg/atom,hellendag/atom,dijs/atom,burodepeper/atom,jtrose2/atom,efatsi/atom,fscherwi/atom,devmario/atom,mostafaeweda/atom,Ingramz/atom,tisu2tisu/atom,lisonma/atom,Jandersoft/atom,kandros/atom,RuiDGoncalves/atom,hellendag/atom,jeremyramin/atom,Jandersolutions/atom,hpham04/atom,vjeux/atom,ppamorim/atom,harshdattani/atom,githubteacher/atom,ali/atom,russlescai/atom,pkdevbox/atom,tony612/atom,tjkr/atom,jacekkopecky/atom,bcoe/atom,fredericksilva/atom,Neron-X5/atom,GHackAnonymous/atom,tjkr/atom,chengky/atom,efatsi/atom,ObviouslyGreen/atom,tony612/atom,Austen-G/BlockBuilder,ReddTea/atom,basarat/atom,qskycolor/atom,isghe/atom,Abdillah/atom,Dennis1978/atom,lisonma/atom,toqz/atom,qiujuer/atom,g2p/atom,gontadu/atom,Jandersoft/atom,Mokolea/atom,Hasimir/atom,qiujuer/atom,lpommers/atom,dkfiresky/atom,erikhakansson/atom,kittens/atom,woss/atom,abe33/atom,burodepeper/atom,jlord/atom,liuxiong332/atom,woss/atom,Rychard/atom,RobinTec/atom,KENJU/atom,targeter21/atom,synaptek/atom,vcarrera/atom,russlescai/atom,lovesnow/atom,hakatashi/atom,Austen-G/BlockBuilder,matthewclendening/atom,Jandersoft/atom,dannyflax/atom,n-riesco/atom,xream/atom,bryonwinger/atom,targeter21/atom,bolinfest/atom,fredericksilva/atom,erikhakansson/atom,ReddTea/atom,ilovezy/atom,kaicataldo/atom,Shekharrajak/atom,Mokolea/atom,jtrose2/atom,bj7/atom,ReddTea/atom,codex8/atom,ilovezy/atom,acontreras89/atom,0x73/atom,anuwat121/atom,dsandstrom/atom,hpham04/atom,nvoron23/atom,mdumrauf/atom,ezeoleaf/atom,dkfiresky/atom,devmario/atom,kjav/atom,gzzhanghao/atom,yamhon/atom,elkingtonmcb/atom,GHackAnonymous/atom,hakatashi/atom,MjAbuz/atom,lovesnow/atom,FoldingText/atom,Hasimir/atom,deepfox/atom,SlimeQ/atom,G-Baby/atom,rmartin/atom,MjAbuz/atom,YunchengLiao/atom,execjosh/atom,sekcheong/atom,kevinrenaers/atom,sillvan/atom,codex8/atom,daxlab/atom,champagnez/atom,ralphtheninja/atom,dannyflax/atom,nrodriguez13/atom,Mokolea/atom,Rodjana/atom,vjeux/atom,amine7536/atom,rsvip/aTom,crazyquark/atom,gisenberg/atom,charleswhchan/atom,mertkahyaoglu/atom,Ju2ender/atom,mertkahyaoglu/atom,amine7536/atom,rlugojr/atom,AlbertoBarrago/atom,vhutheesing/atom,mertkahyaoglu/atom,001szymon/atom,fredericksilva/atom,g2p/atom,ashneo76/atom,NunoEdgarGub1/atom,synaptek/atom,rsvip/aTom,Jandersolutions/atom,fedorov/atom,kc8wxm/atom,decaffeinate-examples/atom,YunchengLiao/atom,matthewclendening/atom,sekcheong/atom,RobinTec/atom,Galactix/atom,wiggzz/atom,bencolon/atom,prembasumatary/atom,sxgao3001/atom,FoldingText/atom,yalexx/atom,KENJU/atom,tony612/atom,NunoEdgarGub1/atom,woss/atom,abcP9110/atom,001szymon/atom,bencolon/atom,YunchengLiao/atom,john-kelly/atom,helber/atom,GHackAnonymous/atom
5d4cf8581b47963388c1b587c0ea2c3c98167f16
src/scripts/models/search-results.coffee
src/scripts/models/search-results.coffee
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: limits: [] sort: [] results: items: [] total: 0 initialize: (options = {}) -> @query = options.query or '' @fetch success: () => @set('loaded', true) parse: (response, options) -> response = super(arguments...) authors = new Backbone.Collection() _.each response.results.limits, (limit) -> if limit.author then authors.add(limit.author) _.each response.results.items, (item) -> _.each item.authors, (author, index) -> item.authors[index] = authors.get(author).toJSON() #response.queryFormatted = _.cloneDeep(response.query) response.queryFormatted = JSON.parse(JSON.stringify(response.query)) # HACK to deep clone _.each response.queryFormatted.limits, (limit) -> if limit.authorID author = authors.get(limit.authorID).toJSON() limit.authorID = "#{author.fullname} (#{author.id})" return response
define (require) -> Backbone = require('backbone') settings = require('cs!settings') SEARCH_URI = "#{location.protocol}//#{settings.cnxarchive.host}:#{settings.cnxarchive.port}/search" FILTER_NAMES = { "authorID": "Author" "keyword": "Keyword" "type": "Type" "pubYear": "Publication Date" "subject": "Subject" } return class SearchResults extends Backbone.Model url: () -> "#{SEARCH_URI}#{@query}" defaults: query: limits: [] sort: [] results: items: [] total: 0 initialize: (options = {}) -> @query = options.query or '' @fetch success: () => @set('loaded', true) parse: (response, options) -> response = super(arguments...) authors = new Backbone.Collection() _.each response.results.limits, (limit) -> limit.name = FILTER_NAMES[limit.tag] if limit.tag is 'authorID' authors.add(_.map limit.values, (value) -> value.meta) _.each response.results.items, (item) -> _.each item.authors, (author, index) -> item.authors[index] = authors.get(author).toJSON() #response.queryFormatted = _.cloneDeep(response.query) response.queryFormatted = JSON.parse(JSON.stringify(response.query)) # HACK to deep clone _.each response.queryFormatted.limits, (limit) -> if limit.authorID author = authors.get(limit.authorID).toJSON() limit.authorID = "#{author.fullname} (#{author.id})" return response
Update parser to handle new search api response
Update parser to handle new search api response
CoffeeScript
agpl-3.0
Connexions/webview,dak/webview,Connexions/webview,katalysteducation/webview,carolinelane10/webview,dak/webview,katalysteducation/webview,dak/webview,katalysteducation/webview,Connexions/webview,Connexions/webview,katalysteducation/webview
450068dba26f05ac5445fd3d3621074f8972c2d1
test/support/test_helpers.coffee
test/support/test_helpers.coffee
Walrus = require '../../bin/walrus' fs = require 'fs' path = require 'path' exec = require( 'child_process' ).exec TestHelpers = read : ( filename ) -> fs.readFileSync filename, 'utf8' if path.existsSync filename pass : ( specs, suffix='' ) -> for file in fs.readdirSync specs when path.extname( file ) is '.wal' do ( file ) => base = path.basename file, '.wal' text = @read "#{specs}/#{base}.wal" json = @read "#{specs}/#{base}.js" html = @read "#{specs}/#{base}#{suffix}.html" # if we can't find the suffixed version, try and find # one without the suffix and use that instead. html = @read "#{specs}/#{base}.html" if not html # if _that_ one doesn't exist, throw a helpful error. throw "Can't find example html at #{specs}/#{base}#{suffix}.html or #{specs}/#{base}.html" if not html tmpl = Walrus.Parser.parse text it "should pass the #{base}#{suffix} example", ( done ) -> comp = tmpl.compile( eval( "(#{json})" ) ) if comp is html done( ) else cmd = """ printf "#{comp}" | diff --unified #{specs}/#{base}#{suffix}.html - """ exec cmd, ( error, stdout, stderr ) -> done new Error "Expected did not match actual:\n" + stdout module.exports = TestHelpers
Walrus = require '../../bin/walrus' fs = require 'fs' path = require 'path' exec = require( 'child_process' ).exec TestHelpers = read : ( filename ) -> fs.readFileSync filename, 'utf8' if path.existsSync filename pass : ( specs, suffix='' ) -> for file in fs.readdirSync specs when path.extname( file ) is '.wal' do ( file ) => base = path.basename file, '.wal' spec = "#{specs}/#{base}#{suffix}.html" text = @read "#{specs}/#{base}.wal" json = @read "#{specs}/#{base}.js" html = @read spec # if we can't find the suffixed version, try and find # one without the suffix and use that instead. if not html spec = "#{specs}/#{base}.html" html = @read spec # if _that_ one doesn't exist, throw a helpful error. throw "Can't find example html at #{specs}/#{base}#{suffix}.html or #{specs}/#{base}.html" if not html tmpl = Walrus.Parser.parse text it "should pass the #{base}#{suffix} example", ( done ) -> comp = tmpl.compile( eval( "(#{json})" ) ) if comp is html done( ) else cmd = """ printf "#{comp}" | diff --unified #{spec} - """ exec cmd, ( error, stdout, stderr ) -> done new Error "Expected did not match actual:\n" + stdout module.exports = TestHelpers
Fix diffing when using fallback spec
Fix diffing when using fallback spec
CoffeeScript
mit
jeremyruppel/walrus
a5723e36b29f9db233a61c04e69f476957cce0e0
src/components/icon.cjsx
src/components/icon.cjsx
React = require 'react' BS = require 'react-bootstrap' module.exports = React.createClass displayName: 'Icon' propTypes: type: React.PropTypes.string className: React.PropTypes.string tooltip: React.PropTypes.string tooltipProps: React.PropTypes.object getDefaultProps: -> tooltipProps: { placement: 'bottom' } render: -> classes = ['tutor-icon', 'fa', "fa-#{@props.type}"] classes.push(@props.className) if @props.className icon = <i {...@props} className={classes.join(' ')} /> if @props.tooltip tooltip = <BS.Tooltip>{@props.tooltip}</BS.Tooltip> <BS.OverlayTrigger {...@props.tooltipProps} overlay={tooltip}>{icon}</BS.OverlayTrigger> else icon
React = require 'react' BS = require 'react-bootstrap' classnames = require 'classnames' module.exports = React.createClass displayName: 'Icon' propTypes: type: React.PropTypes.string.isRequired spin: React.PropTypes.bool className: React.PropTypes.string tooltip: React.PropTypes.string tooltipProps: React.PropTypes.object getDefaultProps: -> tooltipProps: { placement: 'bottom' } render: -> classNames = classnames('tutor-icon', 'fa', "fa-#{@props.type}", @props.className, { 'fa-spin': @props.spin }) icon = <i {...@props} className={classNames} /> if @props.tooltip tooltip = <BS.Tooltip>{@props.tooltip}</BS.Tooltip> <BS.OverlayTrigger {...@props.tooltipProps} overlay={tooltip}>{icon}</BS.OverlayTrigger> else icon
Use classnames and add spin animation support
Use classnames and add spin animation support
CoffeeScript
agpl-3.0
openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js
e8d68d577804dcfd67a6707d18a031a2f2d113b7
menus/tree-view.cson
menus/tree-view.cson
'menu': [ { 'label': 'View' 'submenu': [ 'label': 'Toggle Tree View' 'command': 'tree-view:toggle' ] } { 'label': 'Packages' 'submenu': [ 'label': 'Tree View' 'submenu': [ { 'label': 'Focus', 'command': 'tree-view:toggle-focus' } { 'label': 'Toggle', 'command': 'tree-view:toggle' } { 'label': 'Reveal Active File', 'command': 'tree-view:reveal-active-file' } ] ] } ] 'context-menu': '.tree-view': 'Add File': 'tree-view:add' 'Add Folder': 'tree-view:add' 'Rename': 'tree-view:move' 'Delete': 'tree-view:remove' 'Copy Full Path': 'tree-view:copy-full-path' 'Copy Project Path': 'tree-view:copy-project-path' 'Show in Finder': 'tree-view:show-in-file-manager'
'menu': [ { 'label': 'View' 'submenu': [ 'label': 'Toggle Tree View' 'command': 'tree-view:toggle' ] } { 'label': 'Packages' 'submenu': [ 'label': 'Tree View' 'submenu': [ { 'label': 'Focus', 'command': 'tree-view:toggle-focus' } { 'label': 'Toggle', 'command': 'tree-view:toggle' } { 'label': 'Reveal Active File', 'command': 'tree-view:reveal-active-file' } ] ] } ] 'context-menu': '.tree-view': 'Add File': 'tree-view:add' 'Add Folder': 'tree-view:add' 'Rename': 'tree-view:move' 'Delete': 'tree-view:remove' 'Copy Full Path': 'tree-view:copy-full-path' 'Copy Project Path': 'tree-view:copy-project-path' 'Show in Finder': 'tree-view:show-in-file-manager' '.pane .item-views': 'Reveal in Tree View': 'tree-view:reveal-active-file'
Add Reveal context menu to pane item views
Add Reveal context menu to pane item views Closes #70
CoffeeScript
mit
Galactix/tree-view,laituan245/tree-view,cgrabowski/webgl-studio-tree-view,samu/tree-view,tbryant/tree-view,tomekwi/tree-view,atom/tree-view,jarig/tree-view,learn-co/learn-ide-tree,pombredanne/tree-view-1,ALEXGUOQ/tree-view,matthewbauer/tree-view,jasonhinkle/tree-view,thgaskell/tree-view,rajendrant/tree-view-remote,ayumi/tree-view,benjaminRomano/tree-view
496597950f0751e68e5eb22199b445c4ca744d66
client/lanes/extension/Extensions.coffee
client/lanes/extension/Extensions.coffee
Lanes.Extensions = { instances: {} register: (klass)-> instance = new klass this.instances[klass.prototype.identifier] = instance instance.onRegistered?() fireOnAvailable: (application)-> instance.onAvailable?(application) for identifier, instance of @instances setBootstrapData: (bootstrap_data)-> @controlling_id = bootstrap_data.controlling_extension for identifier,data of bootstrap_data instance = this.instances[identifier] instance?.setBootstrapData?(data) makeNamespace: (identifier)-> for ns in ['Models','Views','Controllers','Screens'] Lanes.namespace("#{identifier}.#{ns}") controlling: -> this.get( @controlling_id ) get: (identifier)-> this.instances[identifier] }
Lanes.Extensions = { instances: {} register: (klass)-> instance = new klass this.instances[klass.prototype.identifier] = instance instance.onRegistered?() fireOnAvailable: (application)-> instance.onAvailable?(application) for identifier, instance of @instances setBootstrapData: (bootstrap_data)-> @controlling_id = bootstrap_data.controlling_extension for identifier,data of bootstrap_data instance = this.instances[identifier] instance?.setBootstrapData?(data) makeNamespace: (identifier)-> for ns in ['Models','Views','Controllers','Screens','Components'] Lanes.namespace("#{identifier}.#{ns}") controlling: -> this.get( @controlling_id ) get: (identifier)-> this.instances[identifier] }
Make NS for components on extensions
Make NS for components on extensions
CoffeeScript
mit
argosity/lanes,argosity/hippo,argosity/hippo,argosity/lanes,argosity/lanes,argosity/hippo
ea3e09b0336a19049eb3bd681099c7f6a34ad224
core/app/backbone/models/evidence.coffee
core/app/backbone/models/evidence.coffee
class window.Evidence extends Backbone.Model class window.OpinionatersEvidence extends Evidence # TODO: eventually, fetching this model should populate # the collection, not the other way around initialize: (attributes, options) -> @_fact_id = options.fact_id ? @collection.fact.id @on 'change:users', => @opinionaters().reset @get('users') opinionaters: -> @_opinionaters ?= new InteractorsPage @get('users') ? [], fact_id: @_fact_id type: @get('type') perPage: 7
class window.Evidence extends Backbone.Model class window.OpinionatersEvidence extends Evidence # TODO: eventually, fetching this model should populate # the collection, not the other way around initialize: (attributes, options) -> @_fact_id = options.fact_id ? @collection.fact.id @on 'change', => @updateOpinionators() @updateOpinionators() opinionaters: -> @_opinionaters ?= new InteractorsPage null, fact_id: @_fact_id type: @get('type') perPage: 7 updateOpinionators: -> @opinionaters().reset @opinionaters().parse(@attributes)
Use 'parse' function to set necessary properties on the page
Use 'parse' function to set necessary properties on the page
CoffeeScript
mit
Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core
0d4ba9c51bc0fb34a943a15811853a32fbd110bd
workers/auth/lib/auth/main.coffee
workers/auth/lib/auth/main.coffee
{argv} = require 'optimist' koding = require './bongo' koding.connect() AuthWorker = require './authworker' {authWorker} = require argv.c authWorker = new AuthWorker koding, authWorker.authResourceName authWorker.connect()
{argv} = require 'optimist' koding = require './bongo' koding.connect() AuthWorker = require './authworker' {authWorker,librato} = require argv.c processMonitor = (require 'processes-monitor').start name : "Auth Worker #{process.pid}" stats_id: "worker.auth." + process.pid interval : 30000 librato: librato authWorker = new AuthWorker koding, authWorker.authResourceName authWorker.connect()
Add auth stats to librato
Add auth stats to librato
CoffeeScript
agpl-3.0
jack89129/koding,rjeczalik/koding,rjeczalik/koding,rjeczalik/koding,alex-ionochkin/koding,usirin/koding,acbodine/koding,gokmen/koding,jack89129/koding,acbodine/koding,andrewjcasal/koding,sinan/koding,kwagdy/koding-1,szkl/koding,mertaytore/koding,gokmen/koding,gokmen/koding,koding/koding,szkl/koding,mertaytore/koding,koding/koding,szkl/koding,mertaytore/koding,cihangir/koding,szkl/koding,drewsetski/koding,alex-ionochkin/koding,jack89129/koding,acbodine/koding,jack89129/koding,andrewjcasal/koding,drewsetski/koding,kwagdy/koding-1,cihangir/koding,sinan/koding,kwagdy/koding-1,szkl/koding,koding/koding,kwagdy/koding-1,rjeczalik/koding,jack89129/koding,sinan/koding,alex-ionochkin/koding,alex-ionochkin/koding,usirin/koding,gokmen/koding,andrewjcasal/koding,jack89129/koding,acbodine/koding,acbodine/koding,gokmen/koding,szkl/koding,drewsetski/koding,acbodine/koding,mertaytore/koding,alex-ionochkin/koding,usirin/koding,gokmen/koding,alex-ionochkin/koding,cihangir/koding,sinan/koding,cihangir/koding,drewsetski/koding,cihangir/koding,mertaytore/koding,acbodine/koding,koding/koding,szkl/koding,kwagdy/koding-1,sinan/koding,andrewjcasal/koding,koding/koding,jack89129/koding,koding/koding,usirin/koding,drewsetski/koding,alex-ionochkin/koding,kwagdy/koding-1,jack89129/koding,drewsetski/koding,andrewjcasal/koding,andrewjcasal/koding,sinan/koding,acbodine/koding,gokmen/koding,szkl/koding,andrewjcasal/koding,usirin/koding,rjeczalik/koding,koding/koding,mertaytore/koding,rjeczalik/koding,mertaytore/koding,sinan/koding,koding/koding,cihangir/koding,kwagdy/koding-1,usirin/koding,usirin/koding,kwagdy/koding-1,rjeczalik/koding,cihangir/koding,cihangir/koding,drewsetski/koding,sinan/koding,mertaytore/koding,andrewjcasal/koding,gokmen/koding,usirin/koding,alex-ionochkin/koding,drewsetski/koding,rjeczalik/koding
df4ee31aaf9ed9ea265216bbb5620a117babb68f
app/assets/javascripts/commits.js.coffee
app/assets/javascripts/commits.js.coffee
class CommitsList @data = ref: null limit: 0 offset: 0 @disable = false @showProgress: -> $('.loading').show() @hideProgress: -> $('.loading').hide() @init: (ref, limit) -> $(".day-commits-table li.commit").live 'click', (event) -> if event.target.nodeName != "A" location.href = $(this).attr("url") e.stopPropagation() return false @data.ref = ref @data.limit = limit @data.offset = limit this.initLoadMore() this.showProgress() @getOld: -> this.showProgress() $.ajax type: "GET" url: location.href data: @data complete: this.hideProgress success: (data) -> CommitsList.append(data.count, data.html) dataType: "json" @append: (count, html) -> $("#commits-list").append(html) if count > 0 @data.offset += count else @disable = true @initLoadMore: -> $(document).unbind('scroll') $(document).endlessScroll bottomPixels: 400 fireDelay: 1000 fireOnce: true ceaseFire: => @disable callback: => this.getOld() this.CommitsList = CommitsList
class CommitsList @data = ref: null limit: 0 offset: 0 @disable = false @showProgress: -> $('.loading').show() @hideProgress: -> $('.loading').hide() @init: (ref, limit) -> $("body").on "click", ".day-commits-table li.commit", (event) -> if event.target.nodeName != "A" location.href = $(this).attr("url") e.stopPropagation() return false @data.ref = ref @data.limit = limit @data.offset = limit this.initLoadMore() this.showProgress() @getOld: -> this.showProgress() $.ajax type: "GET" url: location.href data: @data complete: this.hideProgress success: (data) -> CommitsList.append(data.count, data.html) dataType: "json" @append: (count, html) -> $("#commits-list").append(html) if count > 0 @data.offset += count else @disable = true @initLoadMore: -> $(document).unbind('scroll') $(document).endlessScroll bottomPixels: 400 fireDelay: 1000 fireOnce: true ceaseFire: => @disable callback: => this.getOld() this.CommitsList = CommitsList
Replace jquery deprecated .live with .on
Replace jquery deprecated .live with .on
CoffeeScript
mit
8thcolor/rubyconfau2015-sadr,8thcolor/eurucamp2014-htdsadr,8thcolor/eurucamp2014-htdsadr,8thcolor/rubyconfau2015-sadr,8thcolor/rubyconfau2015-sadr,8thcolor/eurucamp2014-htdsadr
26f21abcf3ca15eb91b00820a3220c79381b2382
src/browser/atom-protocol-handler.coffee
src/browser/atom-protocol-handler.coffee
app = require 'app' fs = require 'fs' path = require 'path' protocol = require 'protocol' # Handles requests with 'atom' protocol. # # It's created by {AtomApplication} upon instantiation and is used to create a # custom resource loader for 'atom://' URLs. # # The following directories are searched in order: # * ~/.atom/assets # * ~/.atom/dev/packages (unless in safe mode) # * ~/.atom/packages # * RESOURCE_PATH/node_modules # module.exports = class AtomProtocolHandler constructor: (@resourcePath, safeMode) -> @loadPaths = [] @dotAtomDirectory = path.join(app.getHomeDir(), '.atom') unless safeMode @loadPaths.push(path.join(@dotAtomDirectory, 'dev', 'packages')) @loadPaths.push(path.join(@dotAtomDirectory, 'packages')) @loadPaths.push(path.join(@resourcePath, 'node_modules')) @registerAtomProtocol() # Creates the 'atom' custom protocol handler. registerAtomProtocol: -> protocol.registerProtocol 'atom', (request) => relativePath = path.normalize(request.url.substr(7)) if relativePath.indexOf('assets/') is 0 assetsPath = path.join(@dotAtomDirectory, relativePath) filePath = assetsPath if fs.statSyncNoException(assetsPath).isFile?() unless filePath for loadPath in @loadPaths filePath = path.join(loadPath, relativePath) break if fs.statSyncNoException(filePath).isFile?() new protocol.RequestFileJob(filePath)
app = require 'app' fs = require 'fs' path = require 'path' protocol = require 'protocol' # Handles requests with 'atom' protocol. # # It's created by {AtomApplication} upon instantiation and is used to create a # custom resource loader for 'atom://' URLs. # # The following directories are searched in order: # * ~/.atom/assets # * ~/.atom/dev/packages (unless in safe mode) # * ~/.atom/packages # * RESOURCE_PATH/node_modules # module.exports = class AtomProtocolHandler constructor: (resourcePath, safeMode) -> @loadPaths = [] @dotAtomDirectory = path.join(app.getHomeDir(), '.atom') unless safeMode @loadPaths.push(path.join(@dotAtomDirectory, 'dev', 'packages')) @loadPaths.push(path.join(@dotAtomDirectory, 'packages')) @loadPaths.push(path.join(resourcePath, 'node_modules')) @registerAtomProtocol() # Creates the 'atom' custom protocol handler. registerAtomProtocol: -> protocol.registerProtocol 'atom', (request) => relativePath = path.normalize(request.url.substr(7)) if relativePath.indexOf('assets/') is 0 assetsPath = path.join(@dotAtomDirectory, relativePath) filePath = assetsPath if fs.statSyncNoException(assetsPath).isFile?() unless filePath for loadPath in @loadPaths filePath = path.join(loadPath, relativePath) break if fs.statSyncNoException(filePath).isFile?() new protocol.RequestFileJob(filePath)
Remove ivar only used in constructor
Remove ivar only used in constructor
CoffeeScript
mit
ppamorim/atom,brettle/atom,BogusCurry/atom,fedorov/atom,florianb/atom,Abdillah/atom,ivoadf/atom,FoldingText/atom,dannyflax/atom,medovob/atom,Mokolea/atom,toqz/atom,matthewclendening/atom,johnrizzo1/atom,AlisaKiatkongkumthon/atom,bolinfest/atom,beni55/atom,jordanbtucker/atom,atom/atom,darwin/atom,SlimeQ/atom,vcarrera/atom,dkfiresky/atom,wiggzz/atom,chengky/atom,yomybaby/atom,sekcheong/atom,omarhuanca/atom,deepfox/atom,bsmr-x-script/atom,omarhuanca/atom,Jandersolutions/atom,bryonwinger/atom,fredericksilva/atom,johnhaley81/atom,jeremyramin/atom,avdg/atom,chengky/atom,matthewclendening/atom,pengshp/atom,kandros/atom,Jdesk/atom,prembasumatary/atom,liuderchi/atom,dijs/atom,tisu2tisu/atom,yalexx/atom,jjz/atom,crazyquark/atom,Huaraz2/atom,liuxiong332/atom,basarat/atom,deoxilix/atom,AdrianVovk/substance-ide,FIT-CSE2410-A-Bombs/atom,transcranial/atom,ReddTea/atom,toqz/atom,chengky/atom,ykeisuke/atom,jtrose2/atom,jjz/atom,amine7536/atom,oggy/atom,rlugojr/atom,niklabh/atom,kjav/atom,oggy/atom,Jandersolutions/atom,rxkit/atom,amine7536/atom,devmario/atom,scippio/atom,jtrose2/atom,daxlab/atom,chengky/atom,ashneo76/atom,YunchengLiao/atom,ykeisuke/atom,vjeux/atom,lpommers/atom,Andrey-Pavlov/atom,bsmr-x-script/atom,nucked/atom,einarmagnus/atom,dsandstrom/atom,bj7/atom,lisonma/atom,gabrielPeart/atom,Shekharrajak/atom,mnquintana/atom,basarat/atom,abcP9110/atom,sxgao3001/atom,FoldingText/atom,jtrose2/atom,gisenberg/atom,tjkr/atom,hharchani/atom,githubteacher/atom,hpham04/atom,hharchani/atom,brettle/atom,batjko/atom,lisonma/atom,KENJU/atom,sillvan/atom,Shekharrajak/atom,decaffeinate-examples/atom,devoncarew/atom,Ingramz/atom,svanharmelen/atom,dkfiresky/atom,abcP9110/atom,kjav/atom,helber/atom,brumm/atom,nvoron23/atom,jjz/atom,pombredanne/atom,sotayamashita/atom,ali/atom,boomwaiza/atom,ezeoleaf/atom,RuiDGoncalves/atom,bj7/atom,fedorov/atom,burodepeper/atom,FoldingText/atom,ppamorim/atom,PKRoma/atom,h0dgep0dge/atom,isghe/atom,MjAbuz/atom,dannyflax/atom,oggy/atom,001szymon/atom,Ingramz/atom,anuwat121/atom,darwin/atom,russlescai/atom,russlescai/atom,alexandergmann/atom,constanzaurzua/atom,jacekkopecky/atom,Galactix/atom,brettle/atom,wiggzz/atom,yalexx/atom,fedorov/atom,prembasumatary/atom,woss/atom,acontreras89/atom,bj7/atom,Sangaroonaom/atom,targeter21/atom,devmario/atom,charleswhchan/atom,alfredxing/atom,BogusCurry/atom,alexandergmann/atom,RobinTec/atom,john-kelly/atom,Neron-X5/atom,AlbertoBarrago/atom,dannyflax/atom,Abdillah/atom,0x73/atom,hellendag/atom,hpham04/atom,matthewclendening/atom,sillvan/atom,bryonwinger/atom,bcoe/atom,mertkahyaoglu/atom,helber/atom,mrodalgaard/atom,gisenberg/atom,paulcbetts/atom,dkfiresky/atom,mnquintana/atom,devoncarew/atom,acontreras89/atom,CraZySacX/atom,gisenberg/atom,dkfiresky/atom,nucked/atom,SlimeQ/atom,sebmck/atom,davideg/atom,AlbertoBarrago/atom,FoldingText/atom,Jandersoft/atom,mertkahyaoglu/atom,einarmagnus/atom,Arcanemagus/atom,Andrey-Pavlov/atom,Abdillah/atom,nrodriguez13/atom,g2p/atom,MjAbuz/atom,isghe/atom,ReddTea/atom,charleswhchan/atom,Jandersolutions/atom,isghe/atom,andrewleverette/atom,Hasimir/atom,hharchani/atom,jacekkopecky/atom,Arcanemagus/atom,h0dgep0dge/atom,Galactix/atom,qskycolor/atom,vjeux/atom,deepfox/atom,RobinTec/atom,fredericksilva/atom,gzzhanghao/atom,svanharmelen/atom,xream/atom,toqz/atom,yomybaby/atom,rlugojr/atom,hakatashi/atom,pkdevbox/atom,n-riesco/atom,Ju2ender/atom,fredericksilva/atom,atom/atom,G-Baby/atom,kandros/atom,rxkit/atom,ardeshirj/atom,n-riesco/atom,boomwaiza/atom,AdrianVovk/substance-ide,bryonwinger/atom,kevinrenaers/atom,mostafaeweda/atom,phord/atom,woss/atom,bcoe/atom,atom/atom,medovob/atom,nucked/atom,KENJU/atom,ashneo76/atom,KENJU/atom,scv119/atom,kdheepak89/atom,synaptek/atom,YunchengLiao/atom,chengky/atom,kittens/atom,decaffeinate-examples/atom,RobinTec/atom,qskycolor/atom,niklabh/atom,Dennis1978/atom,pombredanne/atom,MjAbuz/atom,oggy/atom,wiggzz/atom,BogusCurry/atom,nvoron23/atom,liuxiong332/atom,stinsonga/atom,codex8/atom,tanin47/atom,Jdesk/atom,dsandstrom/atom,mertkahyaoglu/atom,brumm/atom,liuderchi/atom,nrodriguez13/atom,chfritz/atom,rjattrill/atom,yalexx/atom,Galactix/atom,prembasumatary/atom,chfritz/atom,rmartin/atom,kittens/atom,codex8/atom,Rodjana/atom,davideg/atom,rmartin/atom,acontreras89/atom,gabrielPeart/atom,champagnez/atom,tony612/atom,fang-yufeng/atom,bencolon/atom,Dennis1978/atom,Rychard/atom,mdumrauf/atom,rsvip/aTom,harshdattani/atom,niklabh/atom,efatsi/atom,seedtigo/atom,Jandersoft/atom,Ju2ender/atom,charleswhchan/atom,andrewleverette/atom,alexandergmann/atom,jjz/atom,sebmck/atom,acontreras89/atom,sebmck/atom,RobinTec/atom,qiujuer/atom,einarmagnus/atom,hagb4rd/atom,Jandersoft/atom,devmario/atom,palita01/atom,h0dgep0dge/atom,Galactix/atom,pombredanne/atom,codex8/atom,Jandersolutions/atom,john-kelly/atom,tmunro/atom,transcranial/atom,n-riesco/atom,medovob/atom,Jdesk/atom,mostafaeweda/atom,me-benni/atom,rmartin/atom,targeter21/atom,bcoe/atom,hakatashi/atom,tisu2tisu/atom,xream/atom,phord/atom,fredericksilva/atom,RuiDGoncalves/atom,lovesnow/atom,ezeoleaf/atom,yomybaby/atom,rjattrill/atom,sekcheong/atom,originye/atom,rookie125/atom,florianb/atom,liuxiong332/atom,ali/atom,synaptek/atom,Galactix/atom,constanzaurzua/atom,avdg/atom,stuartquin/atom,kandros/atom,vcarrera/atom,NunoEdgarGub1/atom,harshdattani/atom,hellendag/atom,omarhuanca/atom,splodingsocks/atom,gontadu/atom,yamhon/atom,kaicataldo/atom,Andrey-Pavlov/atom,RobinTec/atom,GHackAnonymous/atom,dannyflax/atom,scv119/atom,sxgao3001/atom,jlord/atom,stinsonga/atom,liuderchi/atom,rlugojr/atom,anuwat121/atom,woss/atom,abcP9110/atom,jordanbtucker/atom,panuchart/atom,abcP9110/atom,einarmagnus/atom,darwin/atom,basarat/atom,targeter21/atom,ObviouslyGreen/atom,synaptek/atom,jtrose2/atom,yalexx/atom,liuxiong332/atom,burodepeper/atom,devoncarew/atom,qskycolor/atom,Sangaroonaom/atom,scippio/atom,PKRoma/atom,vinodpanicker/atom,batjko/atom,Ju2ender/atom,mnquintana/atom,Austen-G/BlockBuilder,lisonma/atom,Klozz/atom,Hasimir/atom,johnrizzo1/atom,vcarrera/atom,Abdillah/atom,hagb4rd/atom,DiogoXRP/atom,sekcheong/atom,chfritz/atom,vcarrera/atom,me6iaton/atom,basarat/atom,Neron-X5/atom,splodingsocks/atom,hagb4rd/atom,SlimeQ/atom,elkingtonmcb/atom,hpham04/atom,YunchengLiao/atom,stinsonga/atom,dannyflax/atom,ezeoleaf/atom,mrodalgaard/atom,codex8/atom,Austen-G/BlockBuilder,originye/atom,rookie125/atom,NunoEdgarGub1/atom,kevinrenaers/atom,hakatashi/atom,ReddTea/atom,kc8wxm/atom,FIT-CSE2410-A-Bombs/atom,tony612/atom,batjko/atom,hellendag/atom,gisenberg/atom,dijs/atom,lpommers/atom,CraZySacX/atom,G-Baby/atom,me-benni/atom,yamhon/atom,mertkahyaoglu/atom,Mokolea/atom,YunchengLiao/atom,svanharmelen/atom,fedorov/atom,sotayamashita/atom,Austen-G/BlockBuilder,yalexx/atom,tanin47/atom,mdumrauf/atom,tmunro/atom,russlescai/atom,Hasimir/atom,kittens/atom,Huaraz2/atom,Hasimir/atom,gzzhanghao/atom,dijs/atom,synaptek/atom,lovesnow/atom,crazyquark/atom,vinodpanicker/atom,jacekkopecky/atom,deepfox/atom,johnrizzo1/atom,codex8/atom,me6iaton/atom,rmartin/atom,devoncarew/atom,amine7536/atom,lisonma/atom,elkingtonmcb/atom,KENJU/atom,AlisaKiatkongkumthon/atom,constanzaurzua/atom,crazyquark/atom,cyzn/atom,Neron-X5/atom,ivoadf/atom,mostafaeweda/atom,ykeisuke/atom,qiujuer/atom,nvoron23/atom,kdheepak89/atom,ralphtheninja/atom,hakatashi/atom,tisu2tisu/atom,yomybaby/atom,john-kelly/atom,hharchani/atom,rsvip/aTom,sxgao3001/atom,fscherwi/atom,alfredxing/atom,fang-yufeng/atom,alfredxing/atom,kc8wxm/atom,kc8wxm/atom,sebmck/atom,t9md/atom,Locke23rus/atom,Neron-X5/atom,jordanbtucker/atom,matthewclendening/atom,charleswhchan/atom,Jandersolutions/atom,rookie125/atom,splodingsocks/atom,bryonwinger/atom,kittens/atom,dsandstrom/atom,DiogoXRP/atom,qiujuer/atom,GHackAnonymous/atom,tjkr/atom,n-riesco/atom,ilovezy/atom,qiujuer/atom,yangchenghu/atom,AlbertoBarrago/atom,vinodpanicker/atom,Klozz/atom,NunoEdgarGub1/atom,ppamorim/atom,yamhon/atom,Jandersoft/atom,SlimeQ/atom,kdheepak89/atom,devoncarew/atom,kjav/atom,YunchengLiao/atom,basarat/atom,scv119/atom,decaffeinate-examples/atom,omarhuanca/atom,0x73/atom,charleswhchan/atom,fscherwi/atom,ali/atom,vhutheesing/atom,kjav/atom,Ju2ender/atom,ardeshirj/atom,rsvip/aTom,FIT-CSE2410-A-Bombs/atom,pkdevbox/atom,sotayamashita/atom,qiujuer/atom,ppamorim/atom,vhutheesing/atom,folpindo/atom,crazyquark/atom,sebmck/atom,gisenberg/atom,ReddTea/atom,pombredanne/atom,folpindo/atom,ObviouslyGreen/atom,MjAbuz/atom,hpham04/atom,fang-yufeng/atom,daxlab/atom,fang-yufeng/atom,dannyflax/atom,hharchani/atom,champagnez/atom,pkdevbox/atom,rjattrill/atom,Neron-X5/atom,0x73/atom,FoldingText/atom,deepfox/atom,stuartquin/atom,vinodpanicker/atom,001szymon/atom,Shekharrajak/atom,bcoe/atom,vhutheesing/atom,florianb/atom,ivoadf/atom,hagb4rd/atom,jacekkopecky/atom,mrodalgaard/atom,tmunro/atom,vjeux/atom,Rychard/atom,NunoEdgarGub1/atom,h0dgep0dge/atom,omarhuanca/atom,kc8wxm/atom,sekcheong/atom,efatsi/atom,kaicataldo/atom,Hasimir/atom,AlexxNica/atom,AlisaKiatkongkumthon/atom,paulcbetts/atom,yomybaby/atom,john-kelly/atom,prembasumatary/atom,bencolon/atom,Mokolea/atom,NunoEdgarGub1/atom,john-kelly/atom,sxgao3001/atom,deoxilix/atom,jeremyramin/atom,elkingtonmcb/atom,sillvan/atom,jeremyramin/atom,deoxilix/atom,beni55/atom,Jdesk/atom,brumm/atom,amine7536/atom,sillvan/atom,ironbox360/atom,ali/atom,GHackAnonymous/atom,russlescai/atom,prembasumatary/atom,githubteacher/atom,ezeoleaf/atom,rjattrill/atom,hpham04/atom,gabrielPeart/atom,crazyquark/atom,Rodjana/atom,ReddTea/atom,decaffeinate-examples/atom,cyzn/atom,isghe/atom,cyzn/atom,Rodjana/atom,batjko/atom,lisonma/atom,avdg/atom,dsandstrom/atom,mnquintana/atom,ilovezy/atom,vjeux/atom,ralphtheninja/atom,me6iaton/atom,lpommers/atom,CraZySacX/atom,jjz/atom,mdumrauf/atom,panuchart/atom,Andrey-Pavlov/atom,helber/atom,dkfiresky/atom,bcoe/atom,bsmr-x-script/atom,GHackAnonymous/atom,jacekkopecky/atom,einarmagnus/atom,Jonekee/atom,davideg/atom,MjAbuz/atom,jlord/atom,tony612/atom,Huaraz2/atom,bolinfest/atom,davideg/atom,sxgao3001/atom,Dennis1978/atom,fscherwi/atom,mostafaeweda/atom,Ju2ender/atom,lovesnow/atom,g2p/atom,gzzhanghao/atom,FoldingText/atom,beni55/atom,rxkit/atom,t9md/atom,pengshp/atom,ardeshirj/atom,isghe/atom,kittens/atom,stuartquin/atom,ironbox360/atom,Shekharrajak/atom,yangchenghu/atom,targeter21/atom,Arcanemagus/atom,jlord/atom,liuderchi/atom,jlord/atom,hagb4rd/atom,t9md/atom,ashneo76/atom,mostafaeweda/atom,folpindo/atom,davideg/atom,boomwaiza/atom,nvoron23/atom,scv119/atom,constanzaurzua/atom,daxlab/atom,burodepeper/atom,rsvip/aTom,vinodpanicker/atom,transcranial/atom,paulcbetts/atom,Locke23rus/atom,anuwat121/atom,me-benni/atom,toqz/atom,johnhaley81/atom,sekcheong/atom,yangchenghu/atom,tjkr/atom,KENJU/atom,G-Baby/atom,jtrose2/atom,qskycolor/atom,qskycolor/atom,florianb/atom,ralphtheninja/atom,Klozz/atom,Abdillah/atom,RuiDGoncalves/atom,SlimeQ/atom,ppamorim/atom,ironbox360/atom,ilovezy/atom,scippio/atom,001szymon/atom,splodingsocks/atom,sillvan/atom,Austen-G/BlockBuilder,ilovezy/atom,lovesnow/atom,oggy/atom,russlescai/atom,bolinfest/atom,kevinrenaers/atom,woss/atom,me6iaton/atom,rsvip/aTom,AlexxNica/atom,Jonekee/atom,stinsonga/atom,vjeux/atom,acontreras89/atom,tony612/atom,batjko/atom,gontadu/atom,paulcbetts/atom,matthewclendening/atom,Ingramz/atom,AlexxNica/atom,pengshp/atom,AdrianVovk/substance-ide,kc8wxm/atom,palita01/atom,amine7536/atom,mertkahyaoglu/atom,seedtigo/atom,Andrey-Pavlov/atom,Locke23rus/atom,devmario/atom,mnquintana/atom,tanin47/atom,kdheepak89/atom,johnhaley81/atom,harshdattani/atom,Austen-G/BlockBuilder,basarat/atom,fedorov/atom,Austen-G/BlockBuilder,andrewleverette/atom,Jandersoft/atom,vcarrera/atom,GHackAnonymous/atom,nvoron23/atom,deepfox/atom,abcP9110/atom,ilovezy/atom,gontadu/atom,toqz/atom,lovesnow/atom,Shekharrajak/atom,g2p/atom,xream/atom,nrodriguez13/atom,kaicataldo/atom,florianb/atom,tony612/atom,synaptek/atom,githubteacher/atom,Rychard/atom,panuchart/atom,jlord/atom,jacekkopecky/atom,fang-yufeng/atom,constanzaurzua/atom,Jonekee/atom,liuxiong332/atom,ali/atom,me6iaton/atom,woss/atom,phord/atom,n-riesco/atom,devmario/atom,kjav/atom,originye/atom,ObviouslyGreen/atom,palita01/atom,bencolon/atom,0x73/atom,champagnez/atom,targeter21/atom,kdheepak89/atom,DiogoXRP/atom,pombredanne/atom,Jdesk/atom,PKRoma/atom,Sangaroonaom/atom,seedtigo/atom,dsandstrom/atom,fredericksilva/atom,efatsi/atom,rmartin/atom
bf0b596073218c84e8336d73ba9cc944af6af51b
src/views/service-map-disclaimers.coffee
src/views/service-map-disclaimers.coffee
define [ 'i18next', 'app/views/base' ], ( {t: t}, {SMItemView: SMItemView} ) -> ServiceMapDisclaimersView: class ServiceMapDisclaimersView extends SMItemView template: 'description-of-service' className: 'content modal-dialog about' serializeData: -> lang: p13n.getLanguage() ServiceMapDisclaimersOverlayView: class ServiceMapDisclaimersOverlayView extends SMItemView template: 'disclaimers-overlay' serializeData: -> layer = p13n.get('map_background_layer') if layer in ['servicemap', 'accessible_map'] copyrightLink = "https://www.openstreetmap.org/copyright" copyright: t "disclaimer.copyright.#{layer}" copyrightLink: copyrightLink events: 'click #about-the-service': 'onAboutClick' onAboutClick: (ev) -> app.commands.execute 'showServiceMapDescription'
define [ 'i18next', 'app/views/base' ], ( {t: t}, {SMItemView: SMItemView} ) -> ServiceMapDisclaimersView: class ServiceMapDisclaimersView extends SMItemView template: 'description-of-service' className: 'content modal-dialog about' events: 'click .uservoice-link': 'openUserVoice' openUserVoice: (ev) -> console.trace() UserVoice = window.UserVoice || []; UserVoice.push ['show', mode: 'contact'] serializeData: -> lang: p13n.getLanguage() ServiceMapDisclaimersOverlayView: class ServiceMapDisclaimersOverlayView extends SMItemView template: 'disclaimers-overlay' serializeData: -> layer = p13n.get('map_background_layer') if layer in ['servicemap', 'accessible_map'] copyrightLink = "https://www.openstreetmap.org/copyright" copyright: t "disclaimer.copyright.#{layer}" copyrightLink: copyrightLink events: 'click #about-the-service': 'onAboutClick' onAboutClick: (ev) -> app.commands.execute 'showServiceMapDescription'
Make feedback link work in service description.
Make feedback link work in service description.
CoffeeScript
agpl-3.0
City-of-Helsinki/servicemap,vaaralav/servicemap,vaaralav/servicemap,City-of-Helsinki/servicemap,vaaralav/servicemap,City-of-Helsinki/servicemap
26b296f488c104a99cfde7000e2e8af7488ec792
app/assets/javascripts/backbone/views/home_view.js.coffee
app/assets/javascripts/backbone/views/home_view.js.coffee
ProjectMonitor.Views ||= {} class ProjectMonitor.Views.HomeView extends Backbone.View tagName: "ol" className: "projects" template: JST["backbone/templates/home"] initialize: (options) -> @subviews = [] @addTileView(tile) for tile in @collection.models @collection.on 'reset', => for view in @subviews view.tearDown() @subviews.length = 0 for model in @collection.models @addTileView(model) @render() @collection.on 'add', (model) => unless model.id in (view.model.id for view in @subviews) @addTileView(model) @render() @collection.on 'remove', (model) => viewsToDelete = (view for view in @subviews when view.model.id == model.id) for view in viewsToDelete view.tearDown() @subviews = (v for v in @subviews when v isnt view) addTileView: (model) -> if model.get("aggregate") view = new ProjectMonitor.Views.AggregateProjectView(model: model) else view = new ProjectMonitor.Views.ProjectView(model: model) @subviews.push(view) @registerSubView(view) render: -> @$el.empty() @$el.append(subview.render().$el) for subview in @subviews @
ProjectMonitor.Views ||= {} class ProjectMonitor.Views.HomeView extends Backbone.View tagName: "ol" className: "projects" template: JST["backbone/templates/home"] initialize: (options) -> @_addTileView(tile) for tile in @collection.models @collection.on 'reset', => for cid,view of @subViews view.tearDown() for model in @collection.models @_addTileView(model) @render() @collection.on 'add', (model) => unless model.id in (view.model.id for cid,view of @subViews) @_addTileView(model) @render() @collection.on 'remove', (model) => viewsToDelete = (view for cid,view of @subViews when view.model.id == model.id) for view in viewsToDelete view.tearDown() _addTileView: (model) -> if model.get("aggregate") view = new ProjectMonitor.Views.AggregateProjectView(model: model) else view = new ProjectMonitor.Views.ProjectView(model: model) @registerSubView(view) render: -> @$el.empty() @$el.append(subview.render().$el) for cid,subview of @subViews @
Remove subviews array from home view
Remove subviews array from home view
CoffeeScript
mit
BuildingSync/projectmonitor,pivotal/projectmonitor,dgodd/projectmonitor,pivotal/projectmonitor,mabounassif/projectmonitor-docker,remind101/projectmonitor,genebygene/projectmonitor,mabounassif/projectmonitor-docker,BuildingSync/projectmonitor,remind101/projectmonitor,BuildingSync/projectmonitor,remind101/projectmonitor,pivotal/projectmonitor,dgodd/projectmonitor,remind101/projectmonitor,genebygene/projectmonitor,genebygene/projectmonitor,mabounassif/projectmonitor-docker,dgodd/projectmonitor,dgodd/projectmonitor,mabounassif/projectmonitor-docker,pivotal/projectmonitor,BuildingSync/projectmonitor,genebygene/projectmonitor
d65cfcf1042a3069a52e7917c2064dcdae8a9215
app/assets/javascripts/home.js.coffee
app/assets/javascripts/home.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://jashkenas.github.com/coffee-script/ $("document").ready -> $(".point1").popover placement: "right" content: "We have the technical experise to make your ideas become an amazing reality." $(".point2").popover placement: "right" content: "Our experience with Agile development techniques means you'll spend more time loving your product and less time in meetings." $(".point3").popover placement: "right" content: "We have a combined total of over 100,000 man-hours of development experience. Regardless of what you need, we can help." $(".point4").popover placement: "right" content: "With team members that are experienced at working at every type of business - from spry startups to large enterprises - we are able to adapt to any situation quickly." $('#footer-nav').localScroll() $('ul.portfolio-thumbs li').hover( -> $(".overlay", this).stop().animate({top:'0px'},{queue:false,duration:300}) -> $(".overlay", this).stop().animate({top:'-183px'},{queue:false,duration:300}) )
# 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://jashkenas.github.com/coffee-script/ $("document").ready -> $(".point1").popover placement: "right" content: "We have the technical expertise to make your ideas become an amazing reality." $(".point2").popover placement: "right" content: "Our experience with Agile development techniques means you'll spend more time loving your product and less time in meetings." $(".point3").popover placement: "right" content: "We have a combined total of over 100,000 man-hours of development experience. Regardless of what you need, we can help." $(".point4").popover placement: "right" content: "With team members that are experienced at working at every type of business - from spry startups to large enterprises - we are able to adapt to any situation quickly." $('#footer-nav').localScroll() $('ul.portfolio-thumbs li').hover( -> $(".overlay", this).stop().animate({top:'0px'},{queue:false,duration:300}) -> $(".overlay", this).stop().animate({top:'-183px'},{queue:false,duration:300}) )
Fix embarassing typo in one of the popovers on the homepage
Fix embarassing typo in one of the popovers on the homepage
CoffeeScript
mit
coshx/coshx,coshx/coshx,coshx/coshx
771eff2608637d35db204321e2c23dcc3d02815d
apps/user/profile/index.coffee
apps/user/profile/index.coffee
Backbone = require 'backbone' mediator = require '../../../lib/mediator.coffee' template = -> require('../templates/partials/_channel_groups.jade') arguments... { QUERY } = require("sharify").data class ProfileView extends Backbone.View loading: false disabled: false threshold: -500 page: 2 initialize: -> @timer = setInterval @maybeLoad, 150 maybeLoad: => return false if @loading or @disabled or mediator.shared.state.get 'lightbox' total = document.body.scrollHeight scrollPos = (document.documentElement.scrollTop || document.body.scrollTop) progress = scrollPos + window.innerHeight * 4 if (total - progress < @threshold) @loadNextPage() loadNextPage: -> @loading = true $.ajax data: page: @page q: sd.QUERY url: "/api/#{sd.USER.slug}/profile" success: (response) => @page++ @loading = false if response.channels.length $('.profile').append template channels: response.channels else @disabled = true module.exports.init = -> new ProfileView el: $('.profile')
Backbone = require 'backbone' { QUERY, PROFILE_CHANNELS, SORT } = require("sharify").data mediator = require '../../../lib/mediator.coffee' ChannelGroupView = require '../../../components/channel_block_group/view.coffee' template = -> require('../templates/partials/_channel_groups.jade') arguments... class ProfileView extends Backbone.View loading: false disabled: false threshold: -500 page: 2 initialize: -> @timer = setInterval @maybeLoad, 150 maybeLoad: => return false if @loading or @disabled or mediator.shared.state.get 'lightbox' total = document.body.scrollHeight scrollPos = (document.documentElement.scrollTop || document.body.scrollTop) progress = scrollPos + window.innerHeight * 4 if (total - progress < @threshold) @loadNextPage() loadNextPage: -> @loading = true $.ajax data: page: @page q: QUERY sort: SORT url: "/api/#{sd.USER.slug}/profile" success: (response) => @page++ @loading = false if response.channels.length $('.profile').append template channels: response.channels @setUpChannelGroupViews(response.channels) else @disabled = true setUpChannelGroupViews: (channels) -> for channel in channels view = new ChannelGroupView channel: channel el: @$(".ChannelBlockGroup[data-id=#{channel.id}]") view.initBlockViews() module.exports.init = -> view = new ProfileView el: $('.profile') view.setUpChannelGroupViews(PROFILE_CHANNELS)
Handle random sort on the client
Handle random sort on the client
CoffeeScript
mit
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
008e47dc65de9e5a8b818f711a077b8c6b29e9f9
client/lanes/components/shared/Input.cjsx
client/lanes/components/shared/Input.cjsx
class Lanes.Components.Input extends Lanes.React.Component mixins: [ Lanes.Components.Form.FieldMixin ] formGroupClass: 'input' getDefaultProps: -> type: 'text' propTypes: unlabled: React.PropTypes.bool getValue: -> @refs.input.getValue() handleKeyDown: (ev) -> @props.onEnter() if ev.key is 'Enter' renderEdit: (label) -> value = @_getValue() or '' label ||= @props.label or _.field2title(@props.name) props = _.extend({ ref: 'input' className: _.classnames('value', changeset: @state.changeset) label: if @props.unlabeled then false else label value: value onKeyDown: @handleKeyDown if @props.onEnter onChange: @handleChange }, @props) if @props.inputOnly then @renderPlain(props) else @renderStyled(props, label) renderPlain: (props) -> <input {...props}/> renderStyled: (props, label) -> colProps = _.omit(props, 'name') <BS.Col {...colProps} > <BS.Input {...props} /> </BS.Col>
class Lanes.Components.Input extends Lanes.React.Component NUMBER_TEST: /^-?\d+(\.\d+)?$/ mixins: [ Lanes.Components.Form.FieldMixin ] propTypes: unlabled: React.PropTypes.bool onlyNumeric: React.PropTypes.bool getDefaultProps: -> type: 'text' getValue: -> @refs.input.getValue() handleKeyDown: (ev) -> @props.onEnter() if ev.key is 'Enter' valueInFlux: (value) -> type = @props.model.attributeType(@props.name) (@props.onlyNumeric or type is "bigdec" ) and not @NUMBER_TEST.test(value) validatedChangeHandler: (ev) -> value = ev.target.value if @valueInFlux(value) @setState(pendingValue: value) else @setState(pendingValue: false) @handleChange(ev) renderEdit: (label) -> value = @state.pendingValue or @props.value or @_getValue() label ||= @props.label or _.field2title(@props.name) props = _.extend({ ref: 'input' className: _.classnames('value', changeset: @state.changeset) label: if @props.unlabeled then false else label value: value onKeyDown: @handleKeyDown if @props.onEnter onChange: @validatedChangeHandler }, @props, {value: value}) if @props.inputOnly then @renderPlain(props) else @renderStyled(props, label) renderPlain: (props) -> <input {...props}/> renderStyled: (props, label) -> colProps = _.omit(props, 'name') <BS.Col {...colProps} > <BS.Input {...props} /> </BS.Col>
Store invalid decimal values in state, apply later
Store invalid decimal values in state, apply later This is needed so you can type '0.' before finishing with 0.2 for instance
CoffeeScript
mit
argosity/hippo,argosity/lanes,argosity/lanes,argosity/hippo,argosity/lanes,argosity/hippo
d981bfd791ef247b6daae7aac24cbde56641f320
src/app/components/directive.coffee
src/app/components/directive.coffee
'use strict' angular.module("ngFillHeight.directives") .directive 'ngFillHeight', ($parse) -> ngFillHeightLink = (scope, element, attrs) -> ngFillHeightOption = ($parse attrs.ngFillHeight)(scope) if typeof ngFillHeightOption isnt 'object' console.error 'The value of ngFillHeight has to be an Object' return parentObject = angular.element(ngFillHeightOption.parentSelector) currObject = angular.element(element) ngFillHeightOption.api = { recalcHeight : () -> recurrFunc = (increment) -> currObject.height(currObject.height() + increment) recurrFunc(10) while parentObject.height() >= parentObject.prop('scrollHeight') recurrFunc(-1) while parentObject.height() < parentObject.prop('scrollHeight') return } return { restrict: 'A' link : ngFillHeightLink }
'use strict' angular.module("ngFillHeight.directives") .directive 'ngFillHeight', ($parse) -> ngFillHeightLink = (scope, element, attrs) -> ngFillHeightOption = ($parse attrs.ngFillHeight)(scope) if typeof ngFillHeightOption isnt 'object' console.error 'The value of ngFillHeight has to be an Object' return parentObject = angular.element(ngFillHeightOption.parentSelector) currObject = angular.element(element) ngFillHeightOption.api = { recalcHeight : () -> recurrFunc = (increment) -> currObject.height(currObject.height() + increment) recurrFunc(10) while currObject.height() < ngFillHeightOption.minHeight or parentObject.height() >= parentObject.prop('scrollHeight') recurrFunc(-1) while currObject.height() > ngFillHeightOption.minHeight and parentObject.height() < parentObject.prop('scrollHeight') return } return { restrict: 'A' link : ngFillHeightLink }
Add capacity to inform a minHeight property
Add capacity to inform a minHeight property
CoffeeScript
mit
TimeoutZero/ng-fill-height
28da62349852a8944f9c3b82ee4db86e163d1b2c
app/assets/javascripts/residences.js.coffee
app/assets/javascripts/residences.js.coffee
# This function handles copying address fields from existing addresses. copyAddress = -> selected_address_id = +$(this)[0].value match = null address_fields = $(this).closest('div.address-fields') addresses = address_fields.find('div.applicant-addresses').data('applicant-addresses') for address in addresses if +address.id == +selected_address_id match = address break unless match return address_fields.find('input[id$=state]').val(match.state) address_fields.find('input[id$=street]').val(match.street) address_fields.find('input[id$=city]').val(match.city) address_fields.find('input[id$=apt]').val(match.apt) address_fields.find('input[id$=zip]').val(match.zip) $ -> dropdown = $('div.address-fields div.address-selector select') dropdown.change(copyAddress)
# This function handles copying address fields from existing addresses. copyAddress = -> selected_address_id = +$(this)[0].value match = null address_fields = $(this).closest('div.address-fields') addresses = address_fields.find('div.applicant-addresses').data('applicant-addresses') for address in addresses if +address.id == +selected_address_id match = address break unless match return address_fields.find('select[id$=state]').val(match.state) address_fields.find('input[id$=street]').val(match.street) address_fields.find('input[id$=city]').val(match.city) address_fields.find('input[id$=apt]').val(match.apt) address_fields.find('input[id$=zip]').val(match.zip) $ -> dropdown = $('div.address-fields div.address-selector select') dropdown.change(copyAddress)
Fix copying state from addresses
Fix copying state from addresses
CoffeeScript
mit
dclegalhackers/districthousing,adelevie/districthousing,jrunningen/districthousing,dmjurg/districthousing,dmjurg/districthousing,jrunningen/districthousing,MetricMike/districthousing,jrunningen/districthousing,uncompiled/districthousing,jrunningen/districthousing,lankyfrenchman/dchousing-apps,uncompiled/districthousing,meiao/districthousing,jrunningen/districthousing,adelevie/districthousing,codefordc/districthousing,MetricMike/districthousing,meiao/districthousing,uncompiled/districthousing,codefordc/districthousing,MetricMike/districthousing,dmjurg/districthousing,adelevie/districthousing,lankyfrenchman/dchousing-apps,meiao/districthousing,uncompiled/districthousing,uncompiled/districthousing,dclegalhackers/districthousing,meiao/districthousing,lankyfrenchman/dchousing-apps,codefordc/districthousing,meiao/districthousing,dclegalhackers/districthousing,dmjurg/districthousing,codefordc/districthousing,MetricMike/districthousing,lankyfrenchman/dchousing-apps,dclegalhackers/districthousing,adelevie/districthousing,codefordc/districthousing
fabd19f43cf278edd779285c22de32ada699d047
lib/app/logout.coffee
lib/app/logout.coffee
# # Logout helpers. # request = require 'superagent' opts = require '../options' { parse } = require 'url' redirectBack = require './redirectback' @denyBadLogoutLinks = (req, res, next) -> if parse(req.get 'Referrer').hostname.match 'artsy.net' next() else next new Error "Malicious logout link." @logout = (req, res, next) -> accessToken = req.user?.get('accessToken') req.logout() request .del("#{opts.ARTSY_URL}/api/v1/access_token") .set('X-Access-Token': accessToken) .end (error, response) -> if req.xhr res.status(200).send msg: 'success' else redirectBack req, res
# # Logout helpers. # request = require 'superagent' opts = require '../options' { parse } = require 'url' redirectBack = require './redirectback' @denyBadLogoutLinks = (req, res, next) -> if parse(req.get 'Referrer').hostname.match 'artsy.net' next() else next new Error "Malicious logout link." @logout = (req, res, next) -> accessToken = req.user?.get('accessToken') req.logout() req.session = null request .del("#{opts.ARTSY_URL}/api/v1/access_token") .set('X-Access-Token': accessToken) .end (error, response) -> if req.xhr res.status(200).send msg: 'success' else redirectBack req, res
Make sure to clear session explicitly when logging out
[Logout] Make sure to clear session explicitly when logging out
CoffeeScript
mit
artsy/artsy-passport
945db9572f60770c64d7c0b72e93fac89ca15ff7
lib/linter-php.coffee
lib/linter-php.coffee
linterPath = atom.packages.getLoadedPackage("linter").path Linter = require "#{linterPath}/lib/linter" class LinterPhp extends Linter # The syntax that the linter handles. May be a string or # list/tuple of strings. Names should be all lowercase. @syntax: ['text.html.php', 'source.php'] # A string, list, tuple or callable that returns a string, list or tuple, # containing the command line (with arguments) used to lint. cmd: 'php -l -n -d display_errors=On -d log_errors=Off' executablePath: null linterName: 'php' options: ['phpExecutablePath'] # A regex pattern used to extract information from the executable's output. regex: '(Parse|Fatal) (?<error>error):(\\s*(?<type>parse|syntax) error,?)?\\s*' + '(?<message>(unexpected \'(?<near>[^\']+)\')?.*) ' + 'in .*? on line (?<line>\\d+)' createMessage: (match) -> # message might be empty, we have to supply a value if match and match.type == 'parse' and not match.message message = 'parse error' super(match) module.exports = LinterPhp
linterPath = atom.packages.getLoadedPackage("linter").path Linter = require "#{linterPath}/lib/linter" {CompositeDisposable} = require 'atom' class LinterPhp extends Linter # The syntax that the linter handles. May be a string or # list/tuple of strings. Names should be all lowercase. @syntax: ['text.html.php', 'source.php'] # A string, list, tuple or callable that returns a string, list or tuple, # containing the command line (with arguments) used to lint. cmd: 'php -l -n -d display_errors=On -d log_errors=Off' executablePath: null linterName: 'php' # A regex pattern used to extract information from the executable's output. regex: '(Parse|Fatal) (?<error>error):(\\s*(?<type>parse|syntax) error,?)?\\s*' + '(?<message>(unexpected \'(?<near>[^\']+)\')?.*) ' + 'in .*? on line (?<line>\\d+)' constructor: (editor) -> super(editor) @disposables = new CompositeDisposable @disposables.add atom.config.observe 'linter-php.phpExecutablePath', => @executablePath = atom.config.get 'linter-php.phpExecutablePath' destroy: -> # atom.config.unobserve 'linter-php.phpExecutablePath' @disposables.dispose(); createMessage: (match) -> # message might be empty, we have to supply a value if match and match.type == 'parse' and not match.message message = 'parse error' super(match) module.exports = LinterPhp
Revert "Use options to observe phpExecutablePath config"
Revert "Use options to observe phpExecutablePath config" This reverts commit 4f52e2ca452c18dedc15d01ffb9acdeed28d8964.
CoffeeScript
mit
AtomLinter/linter-php,AtomLinter/linter-php
8736a4d89a30d90ebe3cb098c4c9b497260a9a93
lib/deprecation-cop-view.coffee
lib/deprecation-cop-view.coffee
{$, $$, ScrollView} = require 'atom' Grim = require 'grim' module.exports = class DeprecationCopView extends ScrollView @content: -> @div class: 'deprecation-cop pane-item', tabindex: -1, => @div class: 'panel', => @div class: 'panel-heading', "Deprecated calls" @ul outlet: 'list', class: 'list-tree has-collapsable-children' initialize: ({@uri}) -> @update() super() @on 'click', '.list-nested-item', -> $(this).toggleClass('collapsed') destroy: -> @detach() getUri: -> @uri getTitle: -> 'Deprecation Cop' update: -> for method, {count, message, stackTraces} of Grim.getLog() @list.append $$ -> @li class: 'list-nested-item collapsed', => @div class: 'list-item', => @span class: 'text-highlight', method @span " (called #{count} times)" @ul class: 'list', => for stackTrace in stackTraces @li class: 'list-item stack-trace padded', => @span class: 'icon icon-alert' @span stackTrace.split("\n")[3].replace(/^\s*at\s*/, '') @pre stackTrace
{$, $$, ScrollView} = require 'atom' Grim = require 'grim' module.exports = class DeprecationCopView extends ScrollView @content: -> @div class: 'deprecation-cop pane-item', tabindex: -1, => @div class: 'panel', => @div class: 'panel-heading', "Deprecated calls" @ul outlet: 'list', class: 'list-tree has-collapsable-children' initialize: ({@uri}) -> @update() super() @on 'click', '.list-nested-item', -> $(this).toggleClass('collapsed') destroy: -> @detach() getUri: -> @uri getTitle: -> 'Deprecation Cop' update: -> methodList = [] methodList.push [method, metadata] for method, metadata of Grim.getLog() methodList.sort (a, b) -> b[1].count - a[1].count for [method, {count, message, stackTraces}] in methodList @list.append $$ -> @li class: 'list-nested-item collapsed', => @div class: 'list-item', => @span class: 'text-highlight', method @span " (called #{count} times)" @ul class: 'list', => for stackTrace in stackTraces @li class: 'list-item stack-trace padded', => @span class: 'icon icon-alert' @span stackTrace.split("\n")[3].replace(/^\s*at\s*/, '') @pre stackTrace
Sort by deprecated method calls
Sort by deprecated method calls
CoffeeScript
mit
atom/deprecation-cop
250e25765471df8c58dceea0ccaf65d8054e147a
lib/sensu-dashboard/assets/javascripts/views/events/list.coffee
lib/sensu-dashboard/assets/javascripts/views/events/list.coffee
namespace 'SensuDashboard.Views.Events', (exports) -> class exports.List extends SensuDashboard.Views.List name: 'events/list' initialize: -> @autocomplete_view = @options.autocomplete_view @autocomplete_view.delegate = this super itemClass: -> exports.ListItem resolvedCollection: -> resolved = @collection.chain() for token in @autocomplete_view.tokens model = token.object resolved = if model instanceof SensuDashboard.Models.Check resolved.filter (record) -> record.get('check') == model.get('name') else if model instanceof SensuDashboard.Models.Client resolved.filter (record) -> record.get('client') == model.get('name') else if _.isString(model) resolved.filter (record) -> liquidMetal.score(record.get('output'), model) > 0.7 resolved renderCollection: -> @resolvedCollection().each (event) => @renderItem(event) # # Autocomplete delegate # filtersUpdated: -> @render()
namespace 'SensuDashboard.Views.Events', (exports) -> class exports.List extends SensuDashboard.Views.List name: 'events/list' initialize: -> @autocomplete_view = @options.autocomplete_view @autocomplete_view.delegate = this super itemClass: -> exports.ListItem resolvedCollection: -> resolved = @collection.chain() for token in @autocomplete_view.tokens model = token.object resolved = if model instanceof SensuDashboard.Models.Check resolved.filter (record) -> record.get('check') == model.get('name') else if model instanceof SensuDashboard.Models.Client resolved.filter (record) -> record.get('client') == model.get('name') else if _.isString(model) resolved.filter (record) -> output = record.get('output').toLowerCase() output.indexOf(model.toLowerCase()) != -1 resolved renderCollection: -> @resolvedCollection().each (event) => @renderItem(event) # # Autocomplete delegate # filtersUpdated: -> @render()
Use strpos for faster event output filtering
Use strpos for faster event output filtering
CoffeeScript
mit
pantheon-systems/sensu-dashboard,pantheon-systems/sensu-dashboard,sensu/sensu-dashboard,sensu/sensu-dashboard
9da5772148174a4a09932935c5a0e4b87a3644a1
lineman/app/js/controllers/proposal_pie_chart_controller.coffee
lineman/app/js/controllers/proposal_pie_chart_controller.coffee
angular.module('loomioApp').controller 'ProposalPieChartController', ($scope) -> $scope.pieChartData = [ { value : 0, color : "#90D490" }, { value : 0, color : "#F0BB67" }, { value : 0, color : "#D49090" }, { value : 0, color : "#dd0000"} ] $scope.pieChartOptions = animation: false segmentShowStroke: true segmentStrokeColor: "#fff" responsive: false refreshPieChartData = -> return unless $scope.proposal counts = $scope.proposal.voteCounts # yeah - this is done to preseve the view binding on the pieChartData $scope.pieChartData[0].value = counts.yes $scope.pieChartData[1].value = counts.abstain $scope.pieChartData[2].value = counts.no $scope.pieChartData[3].value = counts.block $scope.$watch 'proposal.voteCounts', -> refreshPieChartData()
angular.module('loomioApp').controller 'ProposalPieChartController', ($scope) -> $scope.pieChartData = [ { value : 0, color : "#90D490" }, { value : 0, color : "#F0BB67" }, { value : 0, color : "#D49090" }, { value : 0, color : "#dd0000" }, { value : 0, color : "#cccccc" } ] $scope.pieChartOptions = animation: false segmentShowStroke: true segmentStrokeColor: "#fff" responsive: false refreshPieChartData = -> return unless $scope.proposal counts = $scope.proposal.voteCounts hasAnyVotes = counts.yes + counts.abstain + counts.no + counts.block > 0 $scope.pieChartData[0].value = counts.yes $scope.pieChartData[1].value = counts.abstain $scope.pieChartData[2].value = counts.no $scope.pieChartData[3].value = counts.block $scope.pieChartData[4].value = if hasAnyVotes then 0 else 1 $scope.$watch 'proposal.voteCounts', -> refreshPieChartData()
Make empty pie chart appear on proposal page
Make empty pie chart appear on proposal page
CoffeeScript
agpl-3.0
mhjb/loomio,mhjb/loomio,tachyons/loomio,aca13jmf/loomio,Collabforge/site-collabio,isomerase/loomio,digideskio/loomio,juliagra/loomio,wangjun/loomio,wangjun/loomio,codingnutty/loomio,FSFTN/Loomio,Collabforge/site-collabio,HadoDokis/loomio,juliagra/loomio,FSFTN/Loomio,aca13jmf/loomio,piratas-ar/loomio,isomerase/loomio,doomergithub/loomio,piratas-ar/loomio,HadoDokis/loomio,Collabforge/site-collabio,labhackercd/loomio,sicambria/loomio,labhackercd/loomio,loomio/loomio,loomio/loomio,HadoDokis/loomio,loomio/loomio,tachyons/loomio,HadoDokis/loomio,mlarghydracept/loomio,gvalerin/loomio,tachyons/loomio,loomio/loomio,Collabforge/site-collabio,juliagra/DBCloomio,sicambria/loomio,mlarghydracept/loomio,mhjb/loomio,isomerase/loomio,digideskio/loomio,digideskio/loomio,kimihito/loomio,labhackercd/loomio,codingnutty/loomio,gvalerin/loomio,piratas-ar/loomio,juliagra/DBCloomio,kimihito/loomio,gvalerin/loomio,piratas-ar/loomio,labhackercd/loomio,doomergithub/loomio,wangjun/loomio,isomerase/loomio,doomergithub/loomio,juliagra/DBCloomio,juliagra/loomio,sicambria/loomio,kimihito/loomio,mlarghydracept/loomio,annewchen/loomio,mhjb/loomio,codingnutty/loomio,aca13jmf/loomio,FSFTN/Loomio,tachyons/loomio,sicambria/loomio,annewchen/loomio,annewchen/loomio,FSFTN/Loomio
e0f09b4fd3ce603ae7de83eb89b0aa6efeb89ec6
src/rebuild-module-cache.coffee
src/rebuild-module-cache.coffee
path = require 'path' async = require 'async' Command = require './command' config = require './config' fs = require './fs' module.exports = class RebuildModuleCache extends Command @commandNames: ['rebuild-module-cache'] constructor: -> @atomPackagesDirectory = path.join(config.getAtomDirectory(), 'packages') getResourcePath: (callback) -> if @resourcePath process.nextTick => callback(@resourcePath) else config.getResourcePath (@resourcePath) => callback(@resourcePath) rebuild: (packageDirectory, callback) -> @getResourcePath (resourcePath) => try @moduleCache ?= require(path.join(resourcePath, 'src', 'module-cache')) @moduleCache.create(packageDirectory) callback() catch error callback(error) run: (options) -> {callback} = options commands = [] for packageName in fs.list(@atomPackagesDirectory) packageDirectory = path.join(@atomPackagesDirectory, packageName) continue if fs.isSymbolicLinkSync(packageDirectory) continue unless fs.isDirectorySync(packageDirectory) commands.push (callback) => process.stdout.write "Rebuilding #{packageName} module cache " @rebuild packageDirectory, (error) => if error? @logFailure() else @logSuccess() callback(error) async.waterfall(commands, callback)
path = require 'path' async = require 'async' Command = require './command' config = require './config' fs = require './fs' module.exports = class RebuildModuleCache extends Command @commandNames: ['rebuild-module-cache'] constructor: -> @atomPackagesDirectory = path.join(config.getAtomDirectory(), 'packages') getResourcePath: (callback) -> if @resourcePath process.nextTick => callback(@resourcePath) else config.getResourcePath (@resourcePath) => callback(@resourcePath) rebuild: (packageDirectory, callback) -> @getResourcePath (resourcePath) => try @moduleCache ?= require(path.join(resourcePath, 'src', 'module-cache')) @moduleCache.create(packageDirectory) callback() catch error callback(error) run: (options) -> {callback} = options commands = [] fs.list(@atomPackagesDirectory).forEach (packageName) => packageDirectory = path.join(@atomPackagesDirectory, packageName) return if fs.isSymbolicLinkSync(packageDirectory) return unless fs.isDirectorySync(packageDirectory) commands.push (callback) => process.stdout.write "Rebuilding #{packageName} module cache " @rebuild packageDirectory, (error) => if error? @logFailure() else @logSuccess() callback(error) async.waterfall(commands, callback)
Use forEach to iterate over package folders
Use forEach to iterate over package folders
CoffeeScript
mit
gutsy/apm,bronson/apm,ethanp/apm,bcoe/apm,jlord/apm,jlord/apm,AtaraxiaEta/apm,AtaraxiaEta/apm,jlord/apm,ethanp/apm,jlord/apm,VandeurenGlenn/apm,pusateri/apm,ethanp/apm,jlord/apm,ethanp/apm,gutsy/apm,atom/apm,bcoe/apm,bronson/apm,VandeurenGlenn/apm,fscherwi/apm,bronson/apm,atom/apm,pusateri/apm,bcoe/apm,VandeurenGlenn/apm,bcoe/apm,atom/apm,bcoe/apm,pusateri/apm,fscherwi/apm,fscherwi/apm,fscherwi/apm,jlord/apm,bcoe/apm,VandeurenGlenn/apm,bronson/apm,AtaraxiaEta/apm,AtaraxiaEta/apm,VandeurenGlenn/apm,fscherwi/apm,AtaraxiaEta/apm,atom/apm,VandeurenGlenn/apm,gutsy/apm,fscherwi/apm,Nikpolik/apm,pusateri/apm,Nikpolik/apm,Nikpolik/apm,pusateri/apm,pusateri/apm,gutsy/apm,AtaraxiaEta/apm,Nikpolik/apm,ethanp/apm,ethanp/apm
0536ff00707cc9ddab3a4ba0740bca0e435c291e
widgets/lecturelist/lecturelist.coffee
widgets/lecturelist/lecturelist.coffee
class Dashing.Lecturelist extends Dashing.Widget ready: -> @currentIndex = 0 @items = $(@node).find('li') @items.hide() @nextItem() @startCarousel() onData: (data) -> @currentIndex = 0 i = 0 if data.items.length == 0 @set 'empty', true startCarousel: -> setInterval(@nextItem, 10000) nextItem: => items = @get('items') if items $(items[@currentIndex]).fadeOut => @currentIndex = (@currentIndex + 1) % items.length $(items[@currentIndex]).fadeIn()
class Dashing.Lecturelist extends Dashing.Widget ready: -> @currentIndex = 0 @items = $(@node).find('li') @items.hide() @nextItem() @startCarousel() onData: (data) -> @currentIndex = 0 i = 0 if data.items.length == 0 @set 'empty', true startCarousel: -> setInterval(@nextItem, 10000) nextItem: => items = @get('items') if items $(items[@currentIndex]).fadeOut => $(@node).find(".progress span:last-child").removeClass('active') $(@node).find(".progress span:nth-child(#{@currentIndex})").removeClass('active') @currentIndex = (@currentIndex + 1) % items.length if @currentIndex == 0 $(@node).find(".progress span:last-child").addClass('active') else $(@node).find(".progress span:nth-child(#{@currentIndex})").addClass('active') $(items[@currentIndex]).fadeIn()
Change opacity of dots as lectures fade out and in
Change opacity of dots as lectures fade out and in
CoffeeScript
mit
theodi/dashboards,theodi/dashboards,theodi/dashboards
b2d05d2135a573e5bead0800e59f5ee7788aab3e
app/assets/javascripts/neighborly/modules/infinite-scroll.js.coffee
app/assets/javascripts/neighborly/modules/infinite-scroll.js.coffee
Neighborly.InfiniteScroll = setupScroll: -> _.bindAll(this, 'onScroll', 'onSuccess') this.$window().scroll(this.onScroll) fetchPage: -> # the isLoaderDivVisible check if the div is already in the view pane to load more content # the $loader.is(:visible) is here to avoid trigerring two concurrent fetchPage calls if this.isLoaderDivVisible() and not this.$loader.is(":visible") and not this.EOF this.$loader.show() $.get(this.path, this.filter).success this.onSuccess this.filter.page += 1 onSuccess: (data) -> this.EOF = true if $.trim(data) is "" this.$results.append data this.$loader.hide() this.$el.trigger "scroll:success", data $window: -> $(window) isLoaderDivVisible: -> this.$loaderDiv.is(":visible") and this.$window().scrollTop() + this.$window().height() > this.$loaderDiv.offset().top onScroll: (event) -> this.fetchPage()
Neighborly.InfiniteScroll = setupScroll: -> _.bindAll(this, 'onScroll', 'onSuccess') this.$window().scroll(this.onScroll) fetchPage: -> # the isLoaderDivVisible check if the div is already in the view pane to load more content # the $loader.is(:visible) is here to avoid trigerring two concurrent fetchPage calls if this.isLoaderDivVisible() and not this.$loader.is(":visible") and not this.EOF this.$loader.show() $.get(this.path, this.filter).success this.onSuccess this.filter.page += 1 onSuccess: (data) -> this.EOF = true if $.trim(data) is "" this.$results.append data unless this.use_custom_append? && this.use_custom_append == true this.$loader.hide() this.$el.trigger "scroll:success", data $window: -> $(window) isLoaderDivVisible: -> this.$loaderDiv.is(":visible") and this.$window().scrollTop() + this.$window().height() > this.$loaderDiv.offset().top onScroll: (event) -> this.fetchPage()
Add option to not append the data on infinite scroll module
Add option to not append the data on infinite scroll module
CoffeeScript
mit
jinutm/silverclass,jinutm/silveralms.com,jinutm/silveralms.com,rockkhuya/taydantay,jinutm/silverpro,rockkhuya/taydantay,raksonibs/raimcrowd,MicroPasts/micropasts-crowdfunding,jinutm/silverpro,gustavoguichard/neighborly,jinutm/silverprod,jinutm/silvfinal,jinutm/silverclass,gustavoguichard/neighborly,jinutm/silverme,jinutm/silverme,jinutm/silverpro,jinutm/silveralms.com,jinutm/silverclass,MicroPasts/micropasts-crowdfunding,gustavoguichard/neighborly,jinutm/silverme,jinutm/silvfinal,jinutm/silvfinal,raksonibs/raimcrowd,raksonibs/raimcrowd,MicroPasts/micropasts-crowdfunding,raksonibs/raimcrowd,jinutm/silverprod,rockkhuya/taydantay,jinutm/silverprod,MicroPasts/micropasts-crowdfunding
cc2da735c738852fcfaf4d60946b0e47c7eeac13
app/assets/javascripts/polls.js.coffee
app/assets/javascripts/polls.js.coffee
App.Polls = generateToken: -> rand = Math.random().toString(36).substr(2) # remove `0.` token = rand + rand # to make it longer return token replaceToken: -> for link in $('.js-question-answer') token_param = link.search.slice(-6) if token_param == "token=" link.href = link.href + @token initialize: -> @token = App.Polls.generateToken() App.Polls.replaceToken() $(".js-question-answer").on click: => token_message = $(".js-token-message") if !token_message.is(':visible') token_message.html(token_message.html() + "<br><strong>" + @token + "</strong>"); token_message.show() false
App.Polls = generateToken: -> token = '' for n in [0..5] rand = Math.random().toString(36).substr(2) # remove `0.` token = token + rand; token = token.substring(0, 64) return token replaceToken: -> for link in $('.js-question-answer') token_param = link.search.slice(-6) if token_param == "token=" link.href = link.href + @token initialize: -> @token = App.Polls.generateToken() App.Polls.replaceToken() $(".js-question-answer").on click: => token_message = $(".js-token-message") if !token_message.is(':visible') token_message.html(token_message.html() + "<br><strong>" + @token + "</strong>"); token_message.show() false
Set token to 64 characters
Set token to 64 characters
CoffeeScript
agpl-3.0
consul/consul,consul/consul,AjuntamentdeCastello/consul,consul/consul,usabi/consul_san_borondon,AyuntamientoPuertoReal/decidePuertoReal,AyuntamientoMadrid/participacion,CDJ11/CDJ,AyuntamientoMadrid/participacion,lalibertad/consul,deivid-rodriguez/participacion,AjuntamentdeCastello/consul,AyuntamientoMadrid/consul,lalibertad/consul,AyuntamientoMadrid/consul,consul/consul,AyuntamientoPuertoReal/decidePuertoReal,AjuntamentdeCastello/consul,lalibertad/consul,CDJ11/CDJ,AyuntamientoMadrid/consul,AyuntamientoMadrid/participacion,AyuntamientoMadrid/participacion,deivid-rodriguez/participacion,consul/consul,CDJ11/CDJ,AjuntamentdeCastello/consul,AyuntamientoPuertoReal/decidePuertoReal,usabi/consul_san_borondon,AyuntamientoMadrid/consul,usabi/consul_san_borondon,deivid-rodriguez/participacion,deivid-rodriguez/participacion,lalibertad/consul,usabi/consul_san_borondon,CDJ11/CDJ
c8a420e9311d48b7bcc02c19bad009b701d33de0
keymaps/tree-view.cson
keymaps/tree-view.cson
'body': 'meta-\\': 'tree-view:toggle' 'meta-|': 'tree-view:reveal-active-file' '.tree-view': 'right': 'tree-view:expand-directory' 'ctrl-]': 'tree-view:expand-directory' 'left': 'tree-view:collapse-directory' 'ctrl-[': 'tree-view:collapse-directory' 'enter': 'tree-view:open-selected-entry' 'm': 'tree-view:move' 'a': 'tree-view:add' 'delete': 'tree-view:remove' 'backspace': 'tree-view:remove' '.tree-view-dialog .mini.editor': 'enter': 'core:confirm' 'escape': 'core:cancel'
'body': 'meta-\\': 'tree-view:toggle' 'meta-|': 'tree-view:reveal-active-file' '.tree-view': 'right': 'tree-view:expand-directory' 'ctrl-]': 'tree-view:expand-directory' 'left': 'tree-view:collapse-directory' 'ctrl-[': 'tree-view:collapse-directory' 'enter': 'tree-view:open-selected-entry' 'm': 'tree-view:move' 'a': 'tree-view:add' 'delete': 'tree-view:remove' 'backspace': 'tree-view:remove' 'k': 'core:move-up' 'j': 'core:move-down' '.tree-view-dialog .mini.editor': 'enter': 'core:confirm' 'escape': 'core:cancel'
Support moving up/down in tree view with k/j keys
Support moving up/down in tree view with k/j keys
CoffeeScript
mit
tomekwi/tree-view,ayumi/tree-view,samu/tree-view,ALEXGUOQ/tree-view,jarig/tree-view,learn-co/learn-ide-tree,Galactix/tree-view,thgaskell/tree-view,cgrabowski/webgl-studio-tree-view,matthewbauer/tree-view,tbryant/tree-view,benjaminRomano/tree-view,atom/tree-view,rajendrant/tree-view-remote,jasonhinkle/tree-view,pombredanne/tree-view-1,laituan245/tree-view
df44a3c1e2268d623366e2d9ad9379548c9f4f92
atom/snippets.cson
atom/snippets.cson
# Your snippets # # Atom snippets allow you to enter a simple prefix in the editor and hit tab to # expand the prefix into a larger code block with templated values. # # You can create a new snippet in this file by typing "snip" and then hitting # tab. # # An example CoffeeScript snippet to expand log to console.log: # # '.source.coffee': # 'Console log': # 'prefix': 'log' # 'body': 'console.log $1' # # Each scope (e.g. '.source.coffee' above) can only be declared once. # # This file uses CoffeeScript Object Notation (CSON). # If you are unfamiliar with CSON, you can read more about it in the # Atom Flight Manual: # https://atom.io/docs/latest/using-atom-basic-customization#cson '.source.js': 'Redux container': 'prefix': 'rcont' 'body': """ import { connect } from 'react-redux' import $1 from '../components/$1' export default connect()($1) """ 'Stylesheet (React Native)': 'prefix': 'rnss' 'body': """ import { StyleSheet } from 'react-native' export default StyleSheet.create({ }) """
# Your snippets # # Atom snippets allow you to enter a simple prefix in the editor and hit tab to # expand the prefix into a larger code block with templated values. # # You can create a new snippet in this file by typing "snip" and then hitting # tab. # # An example CoffeeScript snippet to expand log to console.log: # # '.source.coffee': # 'Console log': # 'prefix': 'log' # 'body': 'console.log $1' # # Each scope (e.g. '.source.coffee' above) can only be declared once. # # This file uses CoffeeScript Object Notation (CSON). # If you are unfamiliar with CSON, you can read more about it in the # Atom Flight Manual: # https://atom.io/docs/latest/using-atom-basic-customization#cson '.source.js': 'Redux container': 'prefix': 'rcont' 'body': """ import { connect } from 'react-redux' import $1 from '../components/$1' export default connect()($1) """ 'Stylesheet (React Native)': 'prefix': 'rnss' 'body': """ import { StyleSheet } from 'react-native' export default StyleSheet.create({ $1 }) """
Add a placeholder to rnss snippet
Add a placeholder to rnss snippet That way, the cursor ends up at the right place for entering styles.
CoffeeScript
mit
randycoulman/dotfiles
7736e14ded0029545b2ba05b00b0d25dfbe9fe4a
src/util/render.coffee
src/util/render.coffee
{my} = require '../my' {draw} = require './draw' exports.render = (root) -> T = root.T() get_style = (world) -> { border: "1px solid #{world.get('stroke')}" background: world.get 'fill' height: world.get 'height' width: world.get 'width' } render_children = (world) -> world.map_children (child) -> return draw(child) if child.get('path')? render_world(child) render_world = (world) -> dict = { id: world class: world.labels(['render', 'world']) style: get_style(world) } T.div dict, world.bind() -> render_children(world) render_world(root)
{my} = require '../my' {draw} = require './draw' exports.render = (root) -> T = root.T() get_style = (world) -> { border: "1px solid #{world.get('stroke')}" background: world.get 'fill' height: world.get 'height' width: world.get 'width' position: 'absolute' left: world.get 'x' top: world.get 'y' } render_children = (world) -> results = world.map_children (child) -> return draw(child) if child.get('path')? render_world(child) name = world.get('name') results.push T.span(name) if name? results render_world = (world) -> dict = { id: world class: world.labels(['render', 'world']) style: get_style(world) } T.div dict, render_children(world) #world.bind() -> render_world(root)
Use x y positioning for controls
Use x y positioning for controls
CoffeeScript
isc
TheSwanFactory/hourofnode,TheSwanFactory/hourofnode
a239fe2ee74e1db0f2aea62458d57a25265a9130
lms/static/coffee/src/main.coffee
lms/static/coffee/src/main.coffee
AjaxPrefix.addAjaxPrefix(jQuery, -> Courseware.prefix) $ -> $.ajaxSetup headers : { 'X-CSRFToken': $.cookie 'csrftoken' } dataType: 'json' window.onTouchBasedDevice = -> navigator.userAgent.match /iPhone|iPod|iPad/i $('body').addClass 'touch-based-device' if onTouchBasedDevice() # $("a[rel*=leanModal]").leanModal() $('#csrfmiddlewaretoken').attr 'value', $.cookie('csrftoken') new Calculator new FeedbackForm if $('body').hasClass('courseware') Courseware.start() # Preserved for backward compatibility window.submit_circuit = (circuit_id) -> $("input.schematic").each (index, el) -> el.schematic.update_value() schematic_value $("#schematic_#{circuit_id}").attr("value") $.postWithPrefix "/save_circuit/#{circuit_id}", schematic: schematic_value, (data) -> alert('Saved') if data.results == 'success' window.postJSON = (url, data, callback) -> $.postWithPrefix url, data, callback $('#login').click -> $('#login_form input[name="email"]').focus() false $('#signup').click -> $('#signup-modal input[name="email"]').focus() false
AjaxPrefix.addAjaxPrefix(jQuery, -> Courseware.prefix) $ -> $.ajaxSetup headers : { 'X-CSRFToken': $.cookie 'csrftoken' } dataType: 'json' window.onTouchBasedDevice = -> navigator.userAgent.match /iPhone|iPod|iPad/i $('body').addClass 'touch-based-device' if onTouchBasedDevice() # $("a[rel*=leanModal]").leanModal() $('#csrfmiddlewaretoken').attr 'value', $.cookie('csrftoken') new Calculator new FeedbackForm if $('body').hasClass('courseware') Courseware.start() # Preserved for backward compatibility window.submit_circuit = (circuit_id) -> $("input.schematic").each (index, el) -> el.schematic.update_value() schematic_value $("#schematic_#{circuit_id}").attr("value") $.postWithPrefix "/save_circuit/#{circuit_id}", schematic: schematic_value, (data) -> alert('Saved') if data.results == 'success' window.postJSON = (url, data, callback) -> $.postWithPrefix url, data, callback $('#login').click -> $('#login_form input[name="email"]').focus() _gaq.push(['_trackPageview', '/login']) false $('#signup').click -> $('#signup-modal input[name="email"]').focus() _gaq.push(['_trackPageview', '/signup']) false
Add google analytics to model signup and login panels
Add google analytics to model signup and login panels [# 40805407]
CoffeeScript
agpl-3.0
wwj718/ANALYSE,cpennington/edx-platform,hamzehd/edx-platform,benpatterson/edx-platform,cecep-edu/edx-platform,Livit/Livit.Learn.EdX,eestay/edx-platform,chauhanhardik/populo,openfun/edx-platform,UOMx/edx-platform,OmarIthawi/edx-platform,kamalx/edx-platform,playm2mboy/edx-platform,pepeportela/edx-platform,apigee/edx-platform,kxliugang/edx-platform,ahmadio/edx-platform,cognitiveclass/edx-platform,bigdatauniversity/edx-platform,rue89-tech/edx-platform,AkA84/edx-platform,openfun/edx-platform,PepperPD/edx-pepper-platform,jamiefolsom/edx-platform,bigdatauniversity/edx-platform,mahendra-r/edx-platform,nttks/edx-platform,IITBinterns13/edx-platform-dev,kalebhartje/schoolboost,zubair-arbi/edx-platform,teltek/edx-platform,prarthitm/edxplatform,caesar2164/edx-platform,iivic/BoiseStateX,morenopc/edx-platform,Stanford-Online/edx-platform,mjirayu/sit_academy,msegado/edx-platform,IITBinterns13/edx-platform-dev,Semi-global/edx-platform,hkawasaki/kawasaki-aio8-0,polimediaupv/edx-platform,ESOedX/edx-platform,a-parhom/edx-platform,dsajkl/123,pelikanchik/edx-platform,knehez/edx-platform,ahmadio/edx-platform,yokose-ks/edx-platform,hmcmooc/muddx-platform,sudheerchintala/LearnEraPlatForm,sudheerchintala/LearnEraPlatForm,IndonesiaX/edx-platform,Lektorium-LLC/edx-platform,edx-solutions/edx-platform,DefyVentures/edx-platform,EduPepperPDTesting/pepper2013-testing,rationalAgent/edx-platform-custom,itsjeyd/edx-platform,shurihell/testasia,shurihell/testasia,shabab12/edx-platform,martynovp/edx-platform,ak2703/edx-platform,B-MOOC/edx-platform,beacloudgenius/edx-platform,Kalyzee/edx-platform,Ayub-Khan/edx-platform,JCBarahona/edX,jamesblunt/edx-platform,TsinghuaX/edx-platform,devs1991/test_edx_docmode,jamiefolsom/edx-platform,mtlchun/edx,ovnicraft/edx-platform,jswope00/griffinx,openfun/edx-platform,beacloudgenius/edx-platform,shubhdev/edx-platform,nanolearning/edx-platform,Endika/edx-platform,DNFcode/edx-platform,jswope00/GAI,philanthropy-u/edx-platform,zubair-arbi/edx-platform,EduPepperPD/pepper2013,jbzdak/edx-platform,cselis86/edx-platform,Lektorium-LLC/edx-platform,zofuthan/edx-platform,fly19890211/edx-platform,ahmadio/edx-platform,10clouds/edx-platform,Endika/edx-platform,eemirtekin/edx-platform,ahmadiga/min_edx,eemirtekin/edx-platform,Edraak/circleci-edx-platform,Edraak/edx-platform,mitocw/edx-platform,philanthropy-u/edx-platform,mjirayu/sit_academy,appliedx/edx-platform,knehez/edx-platform,solashirai/edx-platform,eduNEXT/edx-platform,bigdatauniversity/edx-platform,bitifirefly/edx-platform,morenopc/edx-platform,gsehub/edx-platform,leansoft/edx-platform,rhndg/openedx,mjirayu/sit_academy,BehavioralInsightsTeam/edx-platform,chudaol/edx-platform,AkA84/edx-platform,fly19890211/edx-platform,waheedahmed/edx-platform,ESOedX/edx-platform,edry/edx-platform,peterm-itr/edx-platform,halvertoluke/edx-platform,jazkarta/edx-platform-for-isc,motion2015/a3,lduarte1991/edx-platform,edx/edx-platform,4eek/edx-platform,jbassen/edx-platform,arbrandes/edx-platform,procangroup/edx-platform,carsongee/edx-platform,shabab12/edx-platform,fintech-circle/edx-platform,4eek/edx-platform,zubair-arbi/edx-platform,B-MOOC/edx-platform,amir-qayyum-khan/edx-platform,jswope00/griffinx,Ayub-Khan/edx-platform,Edraak/edraak-platform,bitifirefly/edx-platform,TeachAtTUM/edx-platform,yokose-ks/edx-platform,dcosentino/edx-platform,mjirayu/sit_academy,atsolakid/edx-platform,BehavioralInsightsTeam/edx-platform,dcosentino/edx-platform,ubc/edx-platform,nanolearningllc/edx-platform-cypress-2,AkA84/edx-platform,Semi-global/edx-platform,wwj718/edx-platform,PepperPD/edx-pepper-platform,Stanford-Online/edx-platform,kmoocdev/edx-platform,jbassen/edx-platform,hkawasaki/kawasaki-aio8-1,stvstnfrd/edx-platform,motion2015/a3,leansoft/edx-platform,mjg2203/edx-platform-seas,raccoongang/edx-platform,iivic/BoiseStateX,kamalx/edx-platform,kalebhartje/schoolboost,10clouds/edx-platform,xuxiao19910803/edx-platform,waheedahmed/edx-platform,xuxiao19910803/edx,CredoReference/edx-platform,shashank971/edx-platform,PepperPD/edx-pepper-platform,chrisndodge/edx-platform,defance/edx-platform,UXE/local-edx,zofuthan/edx-platform,cognitiveclass/edx-platform,nagyistoce/edx-platform,jolyonb/edx-platform,jamesblunt/edx-platform,atsolakid/edx-platform,doganov/edx-platform,teltek/edx-platform,abdoosh00/edx-rtl-final,dsajkl/123,jbzdak/edx-platform,deepsrijit1105/edx-platform,prarthitm/edxplatform,wwj718/ANALYSE,fly19890211/edx-platform,jruiperezv/ANALYSE,dsajkl/123,shubhdev/edx-platform,IITBinterns13/edx-platform-dev,motion2015/a3,jelugbo/tundex,nttks/edx-platform,SravanthiSinha/edx-platform,xingyepei/edx-platform,marcore/edx-platform,ovnicraft/edx-platform,J861449197/edx-platform,xuxiao19910803/edx-platform,y12uc231/edx-platform,ahmedaljazzar/edx-platform,zerobatu/edx-platform,angelapper/edx-platform,EDUlib/edx-platform,ahmadio/edx-platform,SivilTaram/edx-platform,Edraak/circleci-edx-platform,simbs/edx-platform,martynovp/edx-platform,morenopc/edx-platform,hamzehd/edx-platform,jazztpt/edx-platform,shubhdev/edxOnBaadal,eestay/edx-platform,IONISx/edx-platform,EduPepperPDTesting/pepper2013-testing,Edraak/circleci-edx-platform,nttks/jenkins-test,pelikanchik/edx-platform,pabloborrego93/edx-platform,caesar2164/edx-platform,pdehaye/theming-edx-platform,cselis86/edx-platform,morenopc/edx-platform,dkarakats/edx-platform,pku9104038/edx-platform,SravanthiSinha/edx-platform,dcosentino/edx-platform,SravanthiSinha/edx-platform,Semi-global/edx-platform,chrisndodge/edx-platform,playm2mboy/edx-platform,jruiperezv/ANALYSE,mjg2203/edx-platform-seas,shubhdev/edxOnBaadal,louyihua/edx-platform,zhenzhai/edx-platform,UOMx/edx-platform,antoviaque/edx-platform,hastexo/edx-platform,shashank971/edx-platform,jonathan-beard/edx-platform,SivilTaram/edx-platform,Shrhawk/edx-platform,shubhdev/edxOnBaadal,4eek/edx-platform,arbrandes/edx-platform,naresh21/synergetics-edx-platform,10clouds/edx-platform,eemirtekin/edx-platform,andyzsf/edx,LICEF/edx-platform,mahendra-r/edx-platform,tanmaykm/edx-platform,abdoosh00/edx-rtl-final,solashirai/edx-platform,abdoosh00/edraak,chauhanhardik/populo_2,arifsetiawan/edx-platform,LICEF/edx-platform,kursitet/edx-platform,mahendra-r/edx-platform,mushtaqak/edx-platform,alexthered/kienhoc-platform,valtech-mooc/edx-platform,DNFcode/edx-platform,eemirtekin/edx-platform,alu042/edx-platform,abdoosh00/edraak,jamiefolsom/edx-platform,y12uc231/edx-platform,miptliot/edx-platform,wwj718/ANALYSE,Ayub-Khan/edx-platform,Stanford-Online/edx-platform,adoosii/edx-platform,MSOpenTech/edx-platform,mbareta/edx-platform-ft,playm2mboy/edx-platform,kursitet/edx-platform,nanolearningllc/edx-platform-cypress,knehez/edx-platform,analyseuc3m/ANALYSE-v1,a-parhom/edx-platform,xinjiguaike/edx-platform,zadgroup/edx-platform,auferack08/edx-platform,UXE/local-edx,wwj718/edx-platform,a-parhom/edx-platform,wwj718/edx-platform,fly19890211/edx-platform,LICEF/edx-platform,rismalrv/edx-platform,cyanna/edx-platform,procangroup/edx-platform,J861449197/edx-platform,jswope00/GAI,angelapper/edx-platform,mitocw/edx-platform,simbs/edx-platform,valtech-mooc/edx-platform,sameetb-cuelogic/edx-platform-test,ZLLab-Mooc/edx-platform,andyzsf/edx,wwj718/ANALYSE,longmen21/edx-platform,Kalyzee/edx-platform,xuxiao19910803/edx-platform,praveen-pal/edx-platform,analyseuc3m/ANALYSE-v1,carsongee/edx-platform,apigee/edx-platform,tiagochiavericosta/edx-platform,zhenzhai/edx-platform,zofuthan/edx-platform,CourseTalk/edx-platform,syjeon/new_edx,utecuy/edx-platform,MSOpenTech/edx-platform,iivic/BoiseStateX,chauhanhardik/populo,jjmiranda/edx-platform,TsinghuaX/edx-platform,J861449197/edx-platform,vismartltd/edx-platform,nttks/jenkins-test,rhndg/openedx,edx/edx-platform,devs1991/test_edx_docmode,gsehub/edx-platform,ferabra/edx-platform,defance/edx-platform,marcore/edx-platform,TsinghuaX/edx-platform,jonathan-beard/edx-platform,dsajkl/reqiop,TeachAtTUM/edx-platform,torchingloom/edx-platform,shubhdev/openedx,jruiperezv/ANALYSE,zadgroup/edx-platform,syjeon/new_edx,kxliugang/edx-platform,yokose-ks/edx-platform,adoosii/edx-platform,apigee/edx-platform,chrisndodge/edx-platform,arbrandes/edx-platform,prarthitm/edxplatform,Unow/edx-platform,IndonesiaX/edx-platform,don-github/edx-platform,kmoocdev/edx-platform,Edraak/edraak-platform,Ayub-Khan/edx-platform,a-parhom/edx-platform,rhndg/openedx,lduarte1991/edx-platform,JioEducation/edx-platform,jolyonb/edx-platform,pepeportela/edx-platform,ZLLab-Mooc/edx-platform,mushtaqak/edx-platform,ZLLab-Mooc/edx-platform,DefyVentures/edx-platform,EduPepperPDTesting/pepper2013-testing,dkarakats/edx-platform,miptliot/edx-platform,chauhanhardik/populo_2,mushtaqak/edx-platform,polimediaupv/edx-platform,yokose-ks/edx-platform,chauhanhardik/populo_2,chudaol/edx-platform,nikolas/edx-platform,RPI-OPENEDX/edx-platform,vikas1885/test1,nagyistoce/edx-platform,bigdatauniversity/edx-platform,kxliugang/edx-platform,OmarIthawi/edx-platform,rue89-tech/edx-platform,franosincic/edx-platform,zubair-arbi/edx-platform,procangroup/edx-platform,nttks/jenkins-test,unicri/edx-platform,eduNEXT/edx-platform,shubhdev/edxOnBaadal,cecep-edu/edx-platform,jamiefolsom/edx-platform,PepperPD/edx-pepper-platform,caesar2164/edx-platform,DefyVentures/edx-platform,hamzehd/edx-platform,olexiim/edx-platform,Edraak/circleci-edx-platform,Kalyzee/edx-platform,kmoocdev2/edx-platform,tanmaykm/edx-platform,inares/edx-platform,shabab12/edx-platform,dkarakats/edx-platform,cpennington/edx-platform,abdoosh00/edx-rtl-final,antonve/s4-project-mooc,alu042/edx-platform,rationalAgent/edx-platform-custom,zerobatu/edx-platform,dsajkl/reqiop,jzoldak/edx-platform,jzoldak/edx-platform,hmcmooc/muddx-platform,arifsetiawan/edx-platform,shubhdev/edx-platform,rhndg/openedx,jamiefolsom/edx-platform,y12uc231/edx-platform,appsembler/edx-platform,kmoocdev/edx-platform,kmoocdev2/edx-platform,TsinghuaX/edx-platform,zadgroup/edx-platform,Shrhawk/edx-platform,angelapper/edx-platform,simbs/edx-platform,arifsetiawan/edx-platform,nanolearningllc/edx-platform-cypress,inares/edx-platform,IndonesiaX/edx-platform,zhenzhai/edx-platform,naresh21/synergetics-edx-platform,rismalrv/edx-platform,pdehaye/theming-edx-platform,angelapper/edx-platform,Edraak/edx-platform,jazztpt/edx-platform,shurihell/testasia,mcgachey/edx-platform,dkarakats/edx-platform,antoviaque/edx-platform,Shrhawk/edx-platform,etzhou/edx-platform,hkawasaki/kawasaki-aio8-2,ubc/edx-platform,doismellburning/edx-platform,naresh21/synergetics-edx-platform,EduPepperPDTesting/pepper2013-testing,chand3040/cloud_that,valtech-mooc/edx-platform,doganov/edx-platform,mushtaqak/edx-platform,nikolas/edx-platform,xinjiguaike/edx-platform,IONISx/edx-platform,don-github/edx-platform,hkawasaki/kawasaki-aio8-2,philanthropy-u/edx-platform,IONISx/edx-platform,vasyarv/edx-platform,MSOpenTech/edx-platform,nagyistoce/edx-platform,cognitiveclass/edx-platform,nikolas/edx-platform,chand3040/cloud_that,unicri/edx-platform,hkawasaki/kawasaki-aio8-1,y12uc231/edx-platform,ampax/edx-platform,analyseuc3m/ANALYSE-v1,edx-solutions/edx-platform,praveen-pal/edx-platform,raccoongang/edx-platform,rationalAgent/edx-platform-custom,MakeHer/edx-platform,alexthered/kienhoc-platform,kmoocdev2/edx-platform,inares/edx-platform,SivilTaram/edx-platform,chand3040/cloud_that,arifsetiawan/edx-platform,longmen21/edx-platform,stvstnfrd/edx-platform,utecuy/edx-platform,rismalrv/edx-platform,wwj718/edx-platform,pku9104038/edx-platform,CourseTalk/edx-platform,unicri/edx-platform,ferabra/edx-platform,doganov/edx-platform,Softmotions/edx-platform,lduarte1991/edx-platform,msegado/edx-platform,EduPepperPDTesting/pepper2013-testing,playm2mboy/edx-platform,4eek/edx-platform,shubhdev/openedx,EduPepperPD/pepper2013,stvstnfrd/edx-platform,atsolakid/edx-platform,Softmotions/edx-platform,tanmaykm/edx-platform,mtlchun/edx,Edraak/edx-platform,eduNEXT/edunext-platform,sameetb-cuelogic/edx-platform-test,nagyistoce/edx-platform,dsajkl/123,pdehaye/theming-edx-platform,jswope00/GAI,zhenzhai/edx-platform,jelugbo/tundex,hastexo/edx-platform,xingyepei/edx-platform,JCBarahona/edX,gymnasium/edx-platform,vismartltd/edx-platform,alexthered/kienhoc-platform,RPI-OPENEDX/edx-platform,ahmedaljazzar/edx-platform,morpheby/levelup-by,ahmedaljazzar/edx-platform,fintech-circle/edx-platform,appsembler/edx-platform,proversity-org/edx-platform,torchingloom/edx-platform,EduPepperPD/pepper2013,jazztpt/edx-platform,pomegranited/edx-platform,ahmadiga/min_edx,LICEF/edx-platform,procangroup/edx-platform,cselis86/edx-platform,antoviaque/edx-platform,synergeticsedx/deployment-wipro,mushtaqak/edx-platform,itsjeyd/edx-platform,itsjeyd/edx-platform,zerobatu/edx-platform,jbassen/edx-platform,hamzehd/edx-platform,jzoldak/edx-platform,shubhdev/openedx,tanmaykm/edx-platform,xingyepei/edx-platform,cecep-edu/edx-platform,beacloudgenius/edx-platform,xinjiguaike/edx-platform,jruiperezv/ANALYSE,jelugbo/tundex,Kalyzee/edx-platform,abdoosh00/edraak,iivic/BoiseStateX,UOMx/edx-platform,EDUlib/edx-platform,kamalx/edx-platform,wwj718/edx-platform,y12uc231/edx-platform,LICEF/edx-platform,nanolearningllc/edx-platform-cypress-2,motion2015/a3,EduPepperPDTesting/pepper2013-testing,jamesblunt/edx-platform,gsehub/edx-platform,halvertoluke/edx-platform,romain-li/edx-platform,cyanna/edx-platform,valtech-mooc/edx-platform,CourseTalk/edx-platform,pomegranited/edx-platform,WatanabeYasumasa/edx-platform,adoosii/edx-platform,edx/edx-platform,jzoldak/edx-platform,fintech-circle/edx-platform,alexthered/kienhoc-platform,carsongee/edx-platform,jazztpt/edx-platform,rue89-tech/edx-platform,simbs/edx-platform,mbareta/edx-platform-ft,LearnEra/LearnEraPlaftform,Softmotions/edx-platform,longmen21/edx-platform,motion2015/edx-platform,motion2015/edx-platform,cognitiveclass/edx-platform,IONISx/edx-platform,louyihua/edx-platform,CredoReference/edx-platform,shurihell/testasia,nttks/edx-platform,mjg2203/edx-platform-seas,10clouds/edx-platform,etzhou/edx-platform,hmcmooc/muddx-platform,waheedahmed/edx-platform,mcgachey/edx-platform,xuxiao19910803/edx,deepsrijit1105/edx-platform,antonve/s4-project-mooc,hkawasaki/kawasaki-aio8-2,IndonesiaX/edx-platform,doismellburning/edx-platform,halvertoluke/edx-platform,IONISx/edx-platform,nanolearningllc/edx-platform-cypress,jbzdak/edx-platform,adoosii/edx-platform,utecuy/edx-platform,praveen-pal/edx-platform,ovnicraft/edx-platform,antonve/s4-project-mooc,xuxiao19910803/edx-platform,jazkarta/edx-platform,DNFcode/edx-platform,zofuthan/edx-platform,auferack08/edx-platform,syjeon/new_edx,cpennington/edx-platform,olexiim/edx-platform,solashirai/edx-platform,Endika/edx-platform,leansoft/edx-platform,jazkarta/edx-platform-for-isc,waheedahmed/edx-platform,Lektorium-LLC/edx-platform,jswope00/griffinx,iivic/BoiseStateX,dcosentino/edx-platform,jazkarta/edx-platform,WatanabeYasumasa/edx-platform,gymnasium/edx-platform,Edraak/circleci-edx-platform,nttks/jenkins-test,mtlchun/edx,miptliot/edx-platform,chand3040/cloud_that,jonathan-beard/edx-platform,jjmiranda/edx-platform,nttks/jenkins-test,jonathan-beard/edx-platform,hastexo/edx-platform,shabab12/edx-platform,ampax/edx-platform-backup,doismellburning/edx-platform,doismellburning/edx-platform,MSOpenTech/edx-platform,proversity-org/edx-platform,JCBarahona/edX,rismalrv/edx-platform,hkawasaki/kawasaki-aio8-1,jazkarta/edx-platform-for-isc,pku9104038/edx-platform,synergeticsedx/deployment-wipro,olexiim/edx-platform,stvstnfrd/edx-platform,bigdatauniversity/edx-platform,eestay/edx-platform,gsehub/edx-platform,beacloudgenius/edx-platform,martynovp/edx-platform,beni55/edx-platform,xuxiao19910803/edx,etzhou/edx-platform,JioEducation/edx-platform,chand3040/cloud_that,cognitiveclass/edx-platform,shurihell/testasia,nanolearningllc/edx-platform-cypress-2,nanolearningllc/edx-platform-cypress,arifsetiawan/edx-platform,zerobatu/edx-platform,jswope00/griffinx,motion2015/edx-platform,openfun/edx-platform,eduNEXT/edunext-platform,Ayub-Khan/edx-platform,appliedx/edx-platform,knehez/edx-platform,miptliot/edx-platform,edry/edx-platform,alu042/edx-platform,shubhdev/openedx,ak2703/edx-platform,tiagochiavericosta/edx-platform,EDUlib/edx-platform,JioEducation/edx-platform,eduNEXT/edunext-platform,rismalrv/edx-platform,shubhdev/edxOnBaadal,martynovp/edx-platform,ESOedX/edx-platform,synergeticsedx/deployment-wipro,sudheerchintala/LearnEraPlatForm,vasyarv/edx-platform,zhenzhai/edx-platform,jbassen/edx-platform,valtech-mooc/edx-platform,eduNEXT/edunext-platform,appsembler/edx-platform,pelikanchik/edx-platform,amir-qayyum-khan/edx-platform,rue89-tech/edx-platform,vasyarv/edx-platform,hkawasaki/kawasaki-aio8-0,don-github/edx-platform,defance/edx-platform,TeachAtTUM/edx-platform,nanolearning/edx-platform,rationalAgent/edx-platform-custom,xuxiao19910803/edx,antonve/s4-project-mooc,bdero/edx-platform,BehavioralInsightsTeam/edx-platform,wwj718/ANALYSE,kursitet/edx-platform,teltek/edx-platform,vasyarv/edx-platform,antoviaque/edx-platform,andyzsf/edx,RPI-OPENEDX/edx-platform,yokose-ks/edx-platform,Livit/Livit.Learn.EdX,jazkarta/edx-platform-for-isc,vismartltd/edx-platform,mahendra-r/edx-platform,cyanna/edx-platform,DNFcode/edx-platform,ahmedaljazzar/edx-platform,franosincic/edx-platform,4eek/edx-platform,ferabra/edx-platform,xinjiguaike/edx-platform,doismellburning/edx-platform,jelugbo/tundex,nagyistoce/edx-platform,sameetb-cuelogic/edx-platform-test,ferabra/edx-platform,auferack08/edx-platform,cecep-edu/edx-platform,Edraak/edx-platform,nanolearning/edx-platform,zofuthan/edx-platform,devs1991/test_edx_docmode,DefyVentures/edx-platform,nanolearningllc/edx-platform-cypress-2,pomegranited/edx-platform,SravanthiSinha/edx-platform,syjeon/new_edx,jazztpt/edx-platform,bitifirefly/edx-platform,inares/edx-platform,praveen-pal/edx-platform,AkA84/edx-platform,Softmotions/edx-platform,nikolas/edx-platform,appliedx/edx-platform,devs1991/test_edx_docmode,jswope00/GAI,mbareta/edx-platform-ft,UXE/local-edx,atsolakid/edx-platform,jamesblunt/edx-platform,OmarIthawi/edx-platform,pabloborrego93/edx-platform,ferabra/edx-platform,zerobatu/edx-platform,devs1991/test_edx_docmode,ampax/edx-platform-backup,SravanthiSinha/edx-platform,kmoocdev2/edx-platform,polimediaupv/edx-platform,nanolearningllc/edx-platform-cypress,itsjeyd/edx-platform,B-MOOC/edx-platform,devs1991/test_edx_docmode,IITBinterns13/edx-platform-dev,olexiim/edx-platform,abdoosh00/edraak,hkawasaki/kawasaki-aio8-2,LearnEra/LearnEraPlaftform,ubc/edx-platform,romain-li/edx-platform,romain-li/edx-platform,mcgachey/edx-platform,UXE/local-edx,solashirai/edx-platform,mcgachey/edx-platform,chudaol/edx-platform,bitifirefly/edx-platform,ampax/edx-platform-backup,ampax/edx-platform,hamzehd/edx-platform,Unow/edx-platform,romain-li/edx-platform,jazkarta/edx-platform-for-isc,edry/edx-platform,arbrandes/edx-platform,jbassen/edx-platform,cecep-edu/edx-platform,peterm-itr/edx-platform,Unow/edx-platform,pepeportela/edx-platform,eestay/edx-platform,zubair-arbi/edx-platform,Livit/Livit.Learn.EdX,mitocw/edx-platform,chauhanhardik/populo,teltek/edx-platform,nttks/edx-platform,torchingloom/edx-platform,kalebhartje/schoolboost,benpatterson/edx-platform,carsongee/edx-platform,appliedx/edx-platform,AkA84/edx-platform,lduarte1991/edx-platform,polimediaupv/edx-platform,peterm-itr/edx-platform,jbzdak/edx-platform,vikas1885/test1,ahmadiga/min_edx,jonathan-beard/edx-platform,hmcmooc/muddx-platform,vikas1885/test1,Lektorium-LLC/edx-platform,bdero/edx-platform,MSOpenTech/edx-platform,ampax/edx-platform,gymnasium/edx-platform,playm2mboy/edx-platform,jazkarta/edx-platform,JioEducation/edx-platform,adoosii/edx-platform,eduNEXT/edx-platform,unicri/edx-platform,gymnasium/edx-platform,amir-qayyum-khan/edx-platform,jswope00/griffinx,atsolakid/edx-platform,torchingloom/edx-platform,cyanna/edx-platform,pepeportela/edx-platform,kmoocdev2/edx-platform,knehez/edx-platform,doganov/edx-platform,polimediaupv/edx-platform,tiagochiavericosta/edx-platform,xuxiao19910803/edx-platform,franosincic/edx-platform,MakeHer/edx-platform,fintech-circle/edx-platform,ovnicraft/edx-platform,prarthitm/edxplatform,ZLLab-Mooc/edx-platform,tiagochiavericosta/edx-platform,RPI-OPENEDX/edx-platform,rhndg/openedx,chauhanhardik/populo_2,proversity-org/edx-platform,benpatterson/edx-platform,dsajkl/reqiop,franosincic/edx-platform,ak2703/edx-platform,Shrhawk/edx-platform,beni55/edx-platform,morpheby/levelup-by,ESOedX/edx-platform,alexthered/kienhoc-platform,jelugbo/tundex,amir-qayyum-khan/edx-platform,cyanna/edx-platform,xinjiguaike/edx-platform,ovnicraft/edx-platform,andyzsf/edx,don-github/edx-platform,synergeticsedx/deployment-wipro,waheedahmed/edx-platform,kmoocdev/edx-platform,vikas1885/test1,peterm-itr/edx-platform,inares/edx-platform,devs1991/test_edx_docmode,auferack08/edx-platform,RPI-OPENEDX/edx-platform,edx-solutions/edx-platform,MakeHer/edx-platform,IndonesiaX/edx-platform,kursitet/edx-platform,philanthropy-u/edx-platform,LearnEra/LearnEraPlaftform,nanolearningllc/edx-platform-cypress-2,LearnEra/LearnEraPlaftform,jjmiranda/edx-platform,sameetb-cuelogic/edx-platform-test,marcore/edx-platform,abdoosh00/edx-rtl-final,mahendra-r/edx-platform,kursitet/edx-platform,TeachAtTUM/edx-platform,louyihua/edx-platform,don-github/edx-platform,jolyonb/edx-platform,devs1991/test_edx_docmode,chauhanhardik/populo_2,ahmadiga/min_edx,eduNEXT/edx-platform,vismartltd/edx-platform,ZLLab-Mooc/edx-platform,CredoReference/edx-platform,ubc/edx-platform,fly19890211/edx-platform,Stanford-Online/edx-platform,naresh21/synergetics-edx-platform,jolyonb/edx-platform,romain-li/edx-platform,rue89-tech/edx-platform,SivilTaram/edx-platform,utecuy/edx-platform,defance/edx-platform,CredoReference/edx-platform,hkawasaki/kawasaki-aio8-0,EDUlib/edx-platform,hastexo/edx-platform,edx/edx-platform,rationalAgent/edx-platform-custom,edry/edx-platform,J861449197/edx-platform,tiagochiavericosta/edx-platform,pku9104038/edx-platform,Semi-global/edx-platform,hkawasaki/kawasaki-aio8-0,WatanabeYasumasa/edx-platform,raccoongang/edx-platform,EduPepperPD/pepper2013,edry/edx-platform,msegado/edx-platform,JCBarahona/edX,bdero/edx-platform,edx-solutions/edx-platform,shubhdev/edx-platform,nikolas/edx-platform,OmarIthawi/edx-platform,chudaol/edx-platform,zadgroup/edx-platform,shubhdev/edx-platform,Edraak/edraak-platform,chudaol/edx-platform,Edraak/edraak-platform,louyihua/edx-platform,UOMx/edx-platform,beni55/edx-platform,shashank971/edx-platform,motion2015/a3,xingyepei/edx-platform,deepsrijit1105/edx-platform,halvertoluke/edx-platform,olexiim/edx-platform,Livit/Livit.Learn.EdX,ampax/edx-platform,mtlchun/edx,vikas1885/test1,DefyVentures/edx-platform,jamesblunt/edx-platform,eemirtekin/edx-platform,motion2015/edx-platform,PepperPD/edx-pepper-platform,msegado/edx-platform,marcore/edx-platform,Softmotions/edx-platform,leansoft/edx-platform,longmen21/edx-platform,Unow/edx-platform,appsembler/edx-platform,mbareta/edx-platform-ft,EduPepperPD/pepper2013,mtlchun/edx,dcosentino/edx-platform,nanolearning/edx-platform,pelikanchik/edx-platform,unicri/edx-platform,jbzdak/edx-platform,J861449197/edx-platform,nanolearning/edx-platform,martynovp/edx-platform,Kalyzee/edx-platform,motion2015/edx-platform,SivilTaram/edx-platform,ampax/edx-platform-backup,beacloudgenius/edx-platform,cselis86/edx-platform,nttks/edx-platform,B-MOOC/edx-platform,ahmadio/edx-platform,zadgroup/edx-platform,pomegranited/edx-platform,Endika/edx-platform,franosincic/edx-platform,ampax/edx-platform-backup,benpatterson/edx-platform,alu042/edx-platform,deepsrijit1105/edx-platform,longmen21/edx-platform,B-MOOC/edx-platform,shubhdev/openedx,utecuy/edx-platform,dsajkl/123,morpheby/levelup-by,shashank971/edx-platform,benpatterson/edx-platform,apigee/edx-platform,beni55/edx-platform,kmoocdev/edx-platform,ak2703/edx-platform,cpennington/edx-platform,JCBarahona/edX,pabloborrego93/edx-platform,bdero/edx-platform,kalebhartje/schoolboost,BehavioralInsightsTeam/edx-platform,kalebhartje/schoolboost,openfun/edx-platform,chauhanhardik/populo,jazkarta/edx-platform,halvertoluke/edx-platform,pabloborrego93/edx-platform,analyseuc3m/ANALYSE-v1,chauhanhardik/populo,Semi-global/edx-platform,eestay/edx-platform,WatanabeYasumasa/edx-platform,kxliugang/edx-platform,DNFcode/edx-platform,chrisndodge/edx-platform,pomegranited/edx-platform,doganov/edx-platform,morenopc/edx-platform,pdehaye/theming-edx-platform,morpheby/levelup-by,Edraak/edx-platform,jazkarta/edx-platform,ahmadiga/min_edx,proversity-org/edx-platform,kamalx/edx-platform,dsajkl/reqiop,ak2703/edx-platform,mjg2203/edx-platform-seas,solashirai/edx-platform,MakeHer/edx-platform,MakeHer/edx-platform,etzhou/edx-platform,msegado/edx-platform,shashank971/edx-platform,beni55/edx-platform,xingyepei/edx-platform,simbs/edx-platform,mjirayu/sit_academy,mitocw/edx-platform,ubc/edx-platform,Shrhawk/edx-platform,dkarakats/edx-platform,caesar2164/edx-platform,xuxiao19910803/edx,bitifirefly/edx-platform,mcgachey/edx-platform,cselis86/edx-platform,jruiperezv/ANALYSE,kxliugang/edx-platform,vasyarv/edx-platform,appliedx/edx-platform,sameetb-cuelogic/edx-platform-test,jjmiranda/edx-platform,leansoft/edx-platform,antonve/s4-project-mooc,vismartltd/edx-platform,etzhou/edx-platform,raccoongang/edx-platform,torchingloom/edx-platform,CourseTalk/edx-platform,kamalx/edx-platform,sudheerchintala/LearnEraPlatForm,hkawasaki/kawasaki-aio8-1
e4e6957e020de574ee2d455bdbf8f19659ec4b39
components/Store.coffee
components/Store.coffee
noflo = require 'noflo' debug = require('debug') 'noflo-ui:store' exports.getComponent = -> c = new noflo.Component c.inPorts.add 'action', datatype: 'all' c.inPorts.add 'state', datatype: 'object' c.outPorts.add 'pass', datatype: 'object' scoped: false c.state = {} c.tearDown = (callback) -> c.state = {} do callback c.forwardBrackets = {} c.process (input, output) -> if input.hasData 'state' c.state = input.getData 'state' output.done() return return unless input.hasStream 'action' packets = [] brackets = [] input.getStream('action').forEach (ip) -> if ip.type is 'openBracket' brackets.push ip.data if ip.type is 'closeBracket' brackets.pop() if ip.type is 'data' packets.push data: ip.data brackets: brackets.slice 0 for packet in packets data = packet.data if data and typeof data is 'object' and data.payload and data.action # New-style action object if data.state # Keep track of last state c.state = data.state else debug "#{data.action} was sent without state, using previous state" output.send pass: action: data.action state: c.state payload: data.payload continue # Old-style action with only payload, and action defined by brackets action = packet.brackets.join ':' debug "#{action} was sent in legacy payload-only format" output.send pass: action: action state: c.state payload: data output.done() return
noflo = require 'noflo' debug = require('debug') 'noflo-ui:store' exports.getComponent = -> c = new noflo.Component c.inPorts.add 'action', datatype: 'all' c.inPorts.add 'state', datatype: 'object' c.outPorts.add 'pass', datatype: 'object' scoped: false c.state = {} c.tearDown = (callback) -> c.state = {} do callback c.forwardBrackets = {} c.process (input, output) -> if input.hasData 'state' c.state = input.getData 'state' output.done() return return unless input.hasStream 'action' packets = input.getStream('action').filter((ip) -> ip.type is 'data' ).map (ip) -> ip.data for data in packets unless data.action console.error 'Received action without expected payload', data output.done() if data and typeof data is 'object' and data.payload and data.action # New-style action object if data.state # Keep track of last state c.state = data.state else debug "#{data.action} was sent without state, using previous state" output.send pass: action: data.action state: c.state payload: data.payload continue output.done() return
Drop support for legacy bracketed actions
Drop support for legacy bracketed actions
CoffeeScript
mit
noflo/noflo-ui,noflo/noflo-ui
3d78a2f89d57ef29557b44bcc1608243a5133270
lib/minimap-highlight-selected-view.coffee
lib/minimap-highlight-selected-view.coffee
{View} = require 'atom' module.exports = -> highlightSelectedPackage = atom.packages.getLoadedPackage('highlight-selected') highlightSelected = require (highlightSelectedPackage.path) HighlightedAreaView = require (highlightSelectedPackage.path + '/lib/highlighted-area-view') class FakeEditor constructor: (@minimap) -> getActiveMinimap: -> @minimap.getActiveMinimap() getActiveTextEditor: -> @getActiveMinimap().getTextEditor() ['markBufferRange', 'scanInBufferRange', 'getEofBufferPosition', 'getSelections', 'getLastSelection', 'bufferRangeForBufferRow', 'getTextInBufferRange'].forEach (key) -> FakeEditor::[key] = -> @getActiveTextEditor()[key](arguments...) ['decorateMarker'].forEach (key) -> FakeEditor::[key] = -> @getActiveMinimap()[key](arguments...) class MinimapHighlightSelectedView extends HighlightedAreaView constructor: (minimap) -> super @fakeEditor = new FakeEditor(minimap) getActiveEditor: -> @fakeEditor
{View} = require 'atom' module.exports = -> highlightSelectedPackage = atom.packages.getLoadedPackage('highlight-selected') highlightSelected = require (highlightSelectedPackage.path) HighlightedAreaView = require (highlightSelectedPackage.path + '/lib/highlighted-area-view') class FakeEditor constructor: (@minimap) -> getActiveMinimap: -> @minimap.getActiveMinimap() getActiveTextEditor: -> @getActiveMinimap()?.getTextEditor() ['markBufferRange', 'scanInBufferRange', 'getEofBufferPosition', 'getSelections', 'getLastSelection', 'bufferRangeForBufferRow', 'getTextInBufferRange'].forEach (key) -> FakeEditor::[key] = -> @getActiveTextEditor()[key](arguments...) ['decorateMarker'].forEach (key) -> FakeEditor::[key] = -> @getActiveMinimap()[key](arguments...) class MinimapHighlightSelectedView extends HighlightedAreaView constructor: (minimap) -> super @fakeEditor = new FakeEditor(minimap) getActiveEditor: -> @fakeEditor handleSelection: -> return unless atom.workspace.getActiveTextEditor()? super
Fix error raised when typing in a mini editor
:bug: Fix error raised when typing in a mini editor
CoffeeScript
mit
atom-minimap/minimap-highlight-selected
7feb9b65333b8009951695e2cc897758f0ae0f36
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 nearBottom = () -> $(window).scrollTop() > $(document).height() - $(window).height() - 600 page = 1 loading = false infiniteScroll = every 200, () -> if not loading and nearBottom() loading = true $('.queue').append($('<div id="loading">Loading...</div>')) page++ $.ajax(window.location.pathname + (window.location.search || '?') + "&page=#{ page }", { dataType: 'script', complete: (resp) -> if resp.responseText $('#loading').remove() $('.videoList').append(resp.responseText) affixTags($(".video[data-page='#{ page }'] .tagEntry")) loading = false else clearInterval(infiniteScroll) $('#loading').remove() })
$ -> # Don't run on non-video pages return if not $('.videos .videoList').length nearBottom = () -> $(window).scrollTop() > $(document).height() - $(window).height() - 600 page = 1 loading = false infiniteScroll = every 200, () -> if not loading and nearBottom() loading = true $('.queue').append($('<div id="loading">Loading...</div>')) page++ $.ajax(window.location.pathname + (window.location.search || '?') + "&page=#{ page }", { dataType: 'script', complete: (resp) -> if resp.responseText $('#loading').remove() $('.videoList').append(resp.responseText) affixTags($(".video[data-page='#{ page }'] .tagEntry")) loading = false else clearInterval(infiniteScroll) $('#loading').remove() })
Return on all videos pages
Return on all videos pages
CoffeeScript
mit
BrettBukowski/CatchLater,BrettBukowski/CatchLater,BrettBukowski/CatchLater
39892b9eebe1633741f57d686fc92b1b378ff15a
tutor/src/components/student-dashboard/event-info-icon.cjsx
tutor/src/components/student-dashboard/event-info-icon.cjsx
React = require 'react' BS = require 'react-bootstrap' S = require '../../helpers/string' {TimeStore} = require '../../flux/time' moment = require 'moment' TH = require '../../helpers/task' module.exports = React.createClass displayName: 'EventInfoIcon' propTypes: event: React.PropTypes.object.isRequired render: -> due = moment(@props.event.due_at) now = TimeStore.getNow() return null if due.isAfter(now, 'd') and TH.hasLateWork(@props.event) # use 'day' granularity for checking if the due date is today or after today status = if due.isSame(now, 'd') then 'incomplete' else 'late' tooltip = <BS.Tooltip id="event-info-icon-#{@props.event.id}"> <b>{S.capitalize(status)}</b> </BS.Tooltip> <BS.OverlayTrigger placement='top' overlay={tooltip}> <i className="info #{status}"/> </BS.OverlayTrigger>
React = require 'react' BS = require 'react-bootstrap' S = require '../../helpers/string' {TimeStore} = require '../../flux/time' moment = require 'moment' module.exports = React.createClass displayName: 'EventInfoIcon' propTypes: event: React.PropTypes.object.isRequired render: -> {event} = @props now = TimeStore.getNow() dueAt = moment(event.due_at) isIncomplete = event.complete_exercise_count isnt event.exercise_count pastDue = event.type is 'homework' and dueAt.isBefore(now, 'd') workedLate = moment(event.last_worked_at).isAfter(dueAt) return null unless workedLate or (pastDue and isIncomplete) # use 'day' granularity for checking if the due date is today or after today status = if dueAt.isSame(now, 'd') then 'incomplete' else 'late' tooltip = <BS.Tooltip id="event-info-icon-#{event.id}"> <b>{S.capitalize(status)}</b> </BS.Tooltip> <BS.OverlayTrigger placement='top' overlay={tooltip}> <i className="info #{status}"/> </BS.OverlayTrigger>
Fix logic, task lacks correct keys forTaskHelper
Fix logic, task lacks correct keys forTaskHelper
CoffeeScript
agpl-3.0
openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js
4449d9565b055a576940dc4eb3fda6b75159258b
app/assets/javascripts/helpers/formatted_timestamp.js.coffee
app/assets/javascripts/helpers/formatted_timestamp.js.coffee
Ember.Handlebars.helper 'formattedTime', (time) -> new Handlebars.SafeString $.timeago(time)
Ember.Handlebars.helper 'formattedTime', (time) -> time ||= new Date() new Handlebars.SafeString $.timeago(time)
Set timeago to current time if no time is given
Set timeago to current time if no time is given When objects are initially created by ember, they don't have a 'createdAt' attribute until the promise resolves. new Date() will result in the same markup, so the user won't see a difference when the app receives the server response.
CoffeeScript
mit
johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi
fd11d1c765b52d370971ef68498bf9ceb79821b4
app/assets/javascripts/neighborly/neighborly.js.coffee
app/assets/javascripts/neighborly/neighborly.js.coffee
#= require_self #= require_tree . window.Neighborly = Common: initPage: -> that = this unless window.Turbolinks is undefined $(document).bind "page:fetch", -> that.Loading.show() $(document).bind "page:restore", -> that.Loading.hide() $(document).bind "page:change", -> $(window).scrollTop(0) try FB.XFBML.parse() try twttr.widgets.load() init: -> $(document).foundation('reveal', {animation: 'fadeIn', animationSpeed: 100}) $(document).foundation() $('.search-button').click -> if $('.discover-form-input').val() != '' $('form.discover-form').submit() else $('.discover-form-input').toggleClass('show').focus() return false finish: -> Loading: show: -> $('#loading #back-overlay, #loading #front-overlay').fadeIn(2) hide: -> $('#loading #back-overlay, #loading #front-overlay').hide()
#= require_self #= require_tree . window.Neighborly = Common: initPage: -> that = this unless window.Turbolinks is undefined $(document).bind "page:fetch", -> that.Loading.show() $(document).bind "page:restore", -> that.Loading.hide() $(document).bind "page:change", -> $(window).scrollTop(0) try FB.XFBML.parse() try twttr.widgets.load() init: -> $(document).foundation('reveal', {animation: 'fadeIn', animationSpeed: 100}) $(document).foundation() $('.button.disabled').click -> return false $('.search-button').click -> if $('.discover-form-input').val() != '' $('form.discover-form').submit() else $('.discover-form-input').toggleClass('show').focus() return false finish: -> Loading: show: -> $('#loading #back-overlay, #loading #front-overlay').fadeIn(2) hide: -> $('#loading #back-overlay, #loading #front-overlay').hide()
Add default behavior on disabled buttons
Add default behavior on disabled buttons
CoffeeScript
mit
MicroPasts/micropasts-crowdfunding,rockkhuya/taydantay,jinutm/silverprod,jinutm/silverme,jinutm/silverpro,jinutm/silverprod,jinutm/silvfinal,jinutm/silverclass,jinutm/silverme,raksonibs/raimcrowd,raksonibs/raimcrowd,jinutm/silverme,MicroPasts/micropasts-crowdfunding,MicroPasts/micropasts-crowdfunding,raksonibs/raimcrowd,rockkhuya/taydantay,jinutm/silveralms.com,jinutm/silvfinal,jinutm/silverpro,rockkhuya/taydantay,gustavoguichard/neighborly,jinutm/silvfinal,gustavoguichard/neighborly,gustavoguichard/neighborly,jinutm/silveralms.com,MicroPasts/micropasts-crowdfunding,jinutm/silverprod,jinutm/silverclass,raksonibs/raimcrowd,jinutm/silverclass,jinutm/silverpro,jinutm/silveralms.com
605000c98ffd25f75b236e460076a8940d9b8cfc
client/app/js/collections/user_list.coffee
client/app/js/collections/user_list.coffee
class @UserList extends Backbone.Collection model: User comparator: (a, b) => aAuthority = a.get('authority') bAuthority = b.get('authority') aName = a.id.toLowerCase() bName = b.id.toLowerCase() if aAuthority < bAuthority then 1 else if aAuthority > bAuthority then -1 else if aName < bName then -1 else if aName > bName then 1 else 0 initialize: =>
class @UserList extends Backbone.Collection model: User comparator: (a, b) => aAuthority = a.get('authority') bAuthority = b.get('authority') aName = "#{a.id}".toLowerCase() bName = "#{b.id}".toLowerCase() if aAuthority < bAuthority then 1 else if aAuthority > bAuthority then -1 else if aName < bName then -1 else if aName > bName then 1 else 0 initialize: =>
Fix problem with numeric alt names.
Client: Fix problem with numeric alt names. But we should probably be disallowing that anyway...
CoffeeScript
mit
sarenji/pokebattle-sim,sarenji/pokebattle-sim,sarenji/pokebattle-sim
86cba6e9044040baf7b2b411e7faeffe5afb9a85
app/assets/javascripts/admin/products/controllers/edit_units_controller.js.coffee
app/assets/javascripts/admin/products/controllers/edit_units_controller.js.coffee
angular.module("admin.products").controller "editUnitsCtrl", ($scope, VariantUnitManager) -> $scope.product = variant_unit: angular.element('#variant_unit').val() variant_unit_scale: angular.element('#variant_unit_scale').val() $scope.variant_unit_options = VariantUnitManager.variantUnitOptions() if $scope.product.variant_unit == 'items' $scope.variant_unit_with_scale = 'items' else $scope.variant_unit_with_scale = $scope.product.variant_unit + '_' + $scope.product.variant_unit_scale $scope.setFields = -> if $scope.variant_unit_with_scale == 'items' variant_unit = 'items' variant_unit_scale = null else options = $scope.variant_unit_with_scale.split('_') variant_unit = options[0] variant_unit_scale = options[1] $scope.product.variant_unit = variant_unit $scope.product.variant_unit_scale = variant_unit_scale
angular.module("admin.products").controller "editUnitsCtrl", ($scope, VariantUnitManager) -> $scope.product = variant_unit: angular.element('#variant_unit').val() variant_unit_scale: angular.element('#variant_unit_scale').val() $scope.variant_unit_options = VariantUnitManager.variantUnitOptions() if $scope.product.variant_unit == 'items' $scope.variant_unit_with_scale = 'items' else $scope.variant_unit_with_scale = $scope.product.variant_unit + '_' + $scope.product.variant_unit_scale.replace(/\.0$/, ''); $scope.setFields = -> if $scope.variant_unit_with_scale == 'items' variant_unit = 'items' variant_unit_scale = null else options = $scope.variant_unit_with_scale.split('_') variant_unit = options[0] variant_unit_scale = options[1] $scope.product.variant_unit = variant_unit $scope.product.variant_unit_scale = variant_unit_scale
Remove trailing `.0` from variant unit scale
Remove trailing `.0` from variant unit scale - As VariantUnitManager.variantUnitOptions() returns array formatted like this: `"Weight (g)", "weight_1"` and `product.variant_unit_scale` is formatted like this `weight_1.0` there is no possible match for the <select /> element - So, remove the trailing `.0` from `product.variant_unit_scale` to match the options
CoffeeScript
agpl-3.0
mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork
7e61a188ed04c239842aa4db83905b11e2d94f38
src/utils.coffee
src/utils.coffee
_ = require "underscore" Fuse = require "fuse.js" class Utils @robot: null @findRoom: (msg) -> room = msg.envelope.room if _.isUndefined(room) room = msg.envelope.user.reply_to room @getRoom: (context) -> room = @robot.adapter.client.rtm.dataStore.getChannelOrGroupByName context.message.room room = @robot.adapter.client.rtm.dataStore.getChannelGroupOrDMById context.message.room unless room room @getUsers: -> Utils.robot.adapter?.client?.rtm?.dataStore?.users or Utils.robot.brain.users() @lookupUserWithGithub: (github) -> return Promise.resolve() unless github findMatch = (user) -> name = user.name or user.login return unless name users = Utils.getUsers() users = _(users).keys().map (id) -> u = users[id] id: u.id name: u.name real_name: u.real_name f = new Fuse users, keys: ['real_name'] shouldSort: yes verbose: no threshold: 0.55 results = f.search name result = if results? and results.length >=1 then results[0] else undefined return Promise.resolve result if github.fetch? github.fetch().then findMatch else findMatch github module.exports = Utils
_ = require "underscore" Fuse = require "fuse.js" class Utils @robot: null @findRoom: (msg) -> room = msg.envelope.room if _.isUndefined(room) room = msg.envelope.user.reply_to room @getRoom: (context) -> room = @robot.adapter.client.rtm.dataStore.getChannelOrGroupByName context.message.room room = @robot.adapter.client.rtm.dataStore.getChannelGroupOrDMById context.message.room unless room room = @robot.adapter.client.rtm.dataStore.getDMByUserId context.message.room unless room room = @robot.adapter.client.rtm.dataStore.getDMByName context.message.room unless room room @getUsers: -> Utils.robot.adapter?.client?.rtm?.dataStore?.users or Utils.robot.brain.users() @lookupUserWithGithub: (github) -> return Promise.resolve() unless github findMatch = (user) -> name = user.name or user.login return unless name users = Utils.getUsers() users = _(users).keys().map (id) -> u = users[id] id: u.id name: u.name real_name: u.real_name f = new Fuse users, keys: ['real_name'] shouldSort: yes verbose: no threshold: 0.55 results = f.search name result = if results? and results.length >=1 then results[0] else undefined return Promise.resolve result if github.fetch? github.fetch().then findMatch else findMatch github module.exports = Utils
Allow for discovery of users for DMs
Allow for discovery of users for DMs
CoffeeScript
mit
ndaversa/hubot-github-bot
b8b507c8f58e69d7df0866b42cc6343f5bc5bedb
src/routing/params.coffee
src/routing/params.coffee
#= require ../hash/hash class Batman.Params extends Batman.Hash constructor: (@hash, @navigator) -> super(@hash) @url = new Batman.UrlParams({}, @navigator, this) @accessor 'url', -> @url class Batman.UrlParams extends Batman.Hash constructor: (@hash, @navigator, @params) -> super(@hash) @replace(@_paramsFromUri()) @updateParams() @on 'change', (obj) => obj.updateUrl() obj.updateParams() updateUrl: -> @navigator.pushState(null, '', @_pathFromParams()) updateParams: -> @params.update(@toObject()) _paramsFromUri: -> @_currentUri().queryParams _currentPath: -> @params.get('path') _currentUri: -> new Batman.URI(@_currentPath()) _pathFromRoutes: -> route = @navigator.app.get('currentRoute') params = controller: route.controller action: route.action Batman.mixin(params, @toObject()) @navigator.app.get('dispatcher').pathFromParams(params) _pathFromParams: -> if path = @_pathFromRoutes() return path uri = @_currentUri() uri.queryParams = @toObject() uri.toString()
#= require ../hash/hash class Batman.Params extends Batman.Hash constructor: (@hash, @navigator) -> super(@hash) @url = new Batman.UrlParams({}, @navigator, this) @accessor 'url', -> @url class Batman.UrlParams extends Batman.Hash constructor: (@hash, @navigator, @params) -> super(@hash) @replace(@_paramsFromUri()) @_updateParams() @on 'change', (obj) -> obj._updateUrl() obj._updateParams() _updateUrl: -> @navigator.pushState(null, '', @_pathFromParams()) _updateParams: -> @params.update(@toObject()) _paramsFromUri: -> @_currentUri().queryParams _currentPath: -> @params.get('path') _currentUri: -> new Batman.URI(@_currentPath()) _pathFromRoutes: -> route = @navigator.app.get('currentRoute') params = controller: route.controller action: route.action Batman.mixin(params, @toObject()) @navigator.app.get('dispatcher').pathFromParams(params) _pathFromParams: -> if path = @_pathFromRoutes() return path uri = @_currentUri() uri.queryParams = @toObject() uri.toString()
Mark all methods as private
Mark all methods as private
CoffeeScript
mit
getshuvo/batman,getshuvo/batman
8dbd3f8c3b80e0af6a19397759e9701183046e3c
apps/artist/client/index.coffee
apps/artist/client/index.coffee
_ = require 'underscore' Backbone = require 'backbone' Artist = require '../../../models/artist.coffee' CurrentUser = require '../../../models/current_user.coffee' ArtistRouter = require './router.coffee' analytics = require './analytics.coffee' attachArtworkModal = require '../../../components/page_modal/index.coffee' module.exports.init = -> analytics.listenToEvents() model = new Artist sd.ARTIST user = CurrentUser.orNull() router = new ArtistRouter model: model, user: user Backbone.history.start pushState: true if user?.isAdmin?() attachArtworkModal '.carousel-figure, .artwork-item-image-link', { 'artist/:id': 'close' 'artwork/:id': 'modal' } analytics.trackArtistPageView model
_ = require 'underscore' Backbone = require 'backbone' Artist = require '../../../models/artist.coffee' CurrentUser = require '../../../models/current_user.coffee' ArtistRouter = require './router.coffee' analytics = require './analytics.coffee' attachArtworkModal = require '../../../components/page_modal/index.coffee' module.exports.init = -> analytics.listenToEvents() model = new Artist sd.ARTIST user = CurrentUser.orNull() router = new ArtistRouter model: model, user: user Backbone.history.start pushState: true if user?.isAdmin?() selectors = [ '.carousel-figure a[href^="/artwork"]' '#artwork-section .artwork-item-image-link' ] attachArtworkModal selectors.join(', '), { 'artist/:id': 'close' 'artwork/:id': 'modal' } analytics.trackArtistPageView model
Fix selectors for enabled test
Fix selectors for enabled test
CoffeeScript
mit
oxaudo/force,mzikherman/force,cavvia/force-1,yuki24/force,xtina-starr/force,izakp/force,cavvia/force-1,xtina-starr/force,damassi/force,cavvia/force-1,joeyAghion/force,mzikherman/force,TribeMedia/force-public,kanaabe/force,joeyAghion/force,anandaroop/force,izakp/force,artsy/force,kanaabe/force,dblock/force,joeyAghion/force,yuki24/force,anandaroop/force,kanaabe/force,dblock/force,damassi/force,xtina-starr/force,kanaabe/force,yuki24/force,izakp/force,damassi/force,xtina-starr/force,eessex/force,izakp/force,yuki24/force,anandaroop/force,erikdstock/force,oxaudo/force,erikdstock/force,cavvia/force-1,dblock/force,eessex/force,artsy/force-public,joeyAghion/force,mzikherman/force,erikdstock/force,mzikherman/force,TribeMedia/force-public,eessex/force,anandaroop/force,erikdstock/force,artsy/force-public,oxaudo/force,artsy/force,damassi/force,artsy/force,eessex/force,kanaabe/force,artsy/force,oxaudo/force
feed995848a16c370b421bc8ce9f9fab724ad822
atom.symlink/config.cson
atom.symlink/config.cson
"*": core: disabledPackages: [ "linter-pylint" ] themes: [ "seti-ui" "base16-tomorrow-dark-theme" ] editor: fontSize: 13 invisibles: {} "exception-reporting": userId: "da976a4b-6a5d-3f34-7d9b-6bfdb74474ed" "git-diff": showIconsInEditorGutter: true "git-plus": {} linter: {} "linter-clang": execPath: "/usr/bin/clang" verboseDebug: true "linter-pylint": executable: "/usr/local/bin/pylint" "one-dark-ui": {} "vim-mode": {} welcome: showOnStartup: false whitespace: removeTrailingWhitespace: false
"*": core: disabledPackages: [ "linter-pylint" ] themes: [ "seti-ui" "base16-tomorrow-dark-theme" ] editor: fontSize: 13 invisibles: {} "exception-reporting": userId: "da976a4b-6a5d-3f34-7d9b-6bfdb74474ed" "git-diff": showIconsInEditorGutter: true "git-plus": {} linter: {} "linter-clang": execPath: "/usr/bin/clang" verboseDebug: true "linter-pylint": executable: "/usr/local/bin/pylint" "one-dark-ui": {} "seti-ui": compactView: true themeColor: "Steel" "vim-mode": {} welcome: showOnStartup: false whitespace: removeTrailingWhitespace: false
Change atom seti theme colour to steel
Change atom seti theme colour to steel
CoffeeScript
mit
jamesnoble/dotfiles,jamesnoble/dotfiles,jamesnoble/dotfiles
196e92582c1ca9618b6aef43d64b8fb4358e5c5c
spec/javascripts/fixtures/users.coffee
spec/javascripts/fixtures/users.coffee
window.FIXTURES = {} if window.FIXTURES is undefined FIXTURES.user = (id = 1)-> user: id: id bio: null created_at: "2014-07-04T12:42:41+00:00" email: "foo@bar.name" facebook_url: null linkedin_url: null other_url: null profile_type: "personal" twitter_url: null name: "Foo Bar" image_url: "http://neighbor.ly/uploads/user/uploaded_image/18/thumb_avatar_image.jpg" total_contributed: "70.0" admin: false url: "http://neighbor.ly/api/contributions/18" html_url: "http://neighbor.ly/neighbors/18-mrs-abigayle-gaylord" FIXTURES.users = (page = 3)-> users: [FIXTURES.user(1).user, FIXTURES.user(2).user] meta: page: page total: 2 total_pages: 10
window.FIXTURES = {} if window.FIXTURES is undefined FIXTURES.user = (id = 1)-> user: id: id bio: null created_at: "2014-07-04T12:42:41+00:00" email: "foo@bar.name" facebook_url: null linkedin_url: null other_url: null profile_type: "personal" twitter_url: null name: "Foo Bar" image_url: "http://neighbor.ly/uploads/user/uploaded_image/18/thumb_avatar_image.jpg" total_contributed: "70.0" admin: true url: "http://neighbor.ly/api/contributions/18" html_url: "http://neighbor.ly/neighbors/18-mrs-abigayle-gaylord" FIXTURES.users = (page = 3)-> users: [FIXTURES.user(1).user, FIXTURES.user(2).user] meta: page: page total: 2 total_pages: 10
Change user fixture to be an admin
Change user fixture to be an admin
CoffeeScript
mit
FromUte/dune-dashboard,FromUte/dune-dashboard,FromUte/dune-dashboard
2bce35c579a030bf62a8c61c9eeba6c016679b55
src/view/bindings/insertion_binding.coffee
src/view/bindings/insertion_binding.coffee
class Batman.DOM.InsertionBinding extends Batman.DOM.AbstractBinding onlyObserve: Batman.BindingDefinitionOnlyObserve.Data bindImmediately: false constructor: (definition) -> {@invert} = definition super @placeholderNode = document.createComment("batman-insertif=\"#{@keyPath}\"") ready: -> @bind() dataChange: (value) -> view = Batman.View.viewForNode(@node, false) parentNode = @placeholderNode.parentNode || @node.parentNode if !!value is !@invert # Show view?.fire('viewWillShow') if not @node.parentNode? parentNode.insertBefore(@node, @placeholderNode) Batman.DOM.destroyNode(@placeholderNode) view?.fire('viewDidShow') else # Hide view?.fire('viewWillHide') if @node.parentNode? parentNode.insertBefore(@placeholderNode, @node) Batman.DOM.destroyNode(@node) view?.fire('viewDidHide') die: -> @placeholderNode = null super
class Batman.DOM.InsertionBinding extends Batman.DOM.AbstractBinding onlyObserve: Batman.BindingDefinitionOnlyObserve.Data bindImmediately: false constructor: (definition) -> {@invert} = definition super @placeholderNode = document.createComment("batman-insertif=\"#{@keyPath}\"") ready: -> @bind() dataChange: (value) -> view = Batman.View.viewForNode(@node, false) parentNode = @placeholderNode.parentNode || @node.parentNode if !!value is !@invert # Show view?.fire('viewWillShow') if not @node.parentNode? parentNode.insertBefore(@node, @placeholderNode) parentNode.removeChild(@placeholderNode) view?.fire('viewDidShow') else # Hide view?.fire('viewWillHide') if @node.parentNode? parentNode.insertBefore(@placeholderNode, @node) parentNode.removeChild(@node) view?.fire('viewDidHide') die: -> @placeholderNode = null super
Fix insertion bindings destroying their nodes rather than removing them
Fix insertion bindings destroying their nodes rather than removing them
CoffeeScript
mit
getshuvo/batman,getshuvo/batman
779b8aa9af73015e83626170a81989d6f3ba9065
app/assets/javascripts/tenon/features/date_time_picker.js.coffee
app/assets/javascripts/tenon/features/date_time_picker.js.coffee
class Tenon.features.DateTimePicker constructor: -> @$els = $("[data-behaviour~='datetime-picker']") @format = "MMM. DD, YYYY [at] hh:mm A" $.each(@$els, @_formatDate) @_enableDateTimePicker() @_setupUnfocus() _formatDate: (i, el) => $el = $(el) if $el.val() != '' && $el.val().match(/^\d{4}\-\d{2}\-\d{2}.*$/) railsFormat = "YYYY-MM-DD HH:mm:ss ZZ" reformatted = moment($el.val(), railsFormat).format(@format) $(el).val(reformatted) _enableDateTimePicker: => @$els.datetimepicker pick12HourFormat: true, pickSeconds: false, format: @format # Blur the element when it's focused, preventing a soft-keyboard # from appearing _setupUnfocus: => @$els.attr('readonly', true)
class Tenon.features.DateTimePicker constructor: -> @$els = $("[data-behaviour~='datetime-picker']") @format = "MMM. DD, YYYY [at] hh:mm A Z" $.each(@$els, @_formatDate) @_enableDateTimePicker() @_setupUnfocus() _formatDate: (i, el) => $el = $(el) if $el.val() != '' && $el.val().match(/^\d{4}\-\d{2}\-\d{2}.*$/) railsFormat = "YYYY-MM-DD HH:mm:ss ZZ" reformatted = moment($el.val(), railsFormat).format(@format) $(el).val(reformatted) _enableDateTimePicker: => @$els.datetimepicker pick12HourFormat: true, pickSeconds: false, format: @format # Blur the element when it's focused, preventing a soft-keyboard # from appearing _setupUnfocus: => @$els.attr('readonly', true)
Add UTC offset to the datetime format
Add UTC offset to the datetime format
CoffeeScript
mit
factore/tenon,factore/tenon,factore/tenon,factore/tenon
2662dc8c023afd7a38fb4cc366cb73ae7b8026a4
servers/lib/server/handlers/api/gitlab/testhelpers.coffee
servers/lib/server/handlers/api/gitlab/testhelpers.coffee
# Export generic testhelpers testhelpers = require '../../../../../testhelper' { expect request generateUrl checkBongoConnectivity generateRequestParamsEncodeBody } = testhelpers utils = require './utils' testhelpers.gitlabApiUrl = generateUrl { route : '-/api/gitlab' } testhelpers.gitlabDefaultHeaders = { 'x-gitlab-event': 'System Hook', 'x-gitlab-token': utils.GITLAB_TOKEN } testhelpers.getSampleDataFor = (event) -> return (require './_sampledata')[event] ? { 'event_name': event } testhelpers.parseEvent = utils.parseEvent module.exports = testhelpers
# Export generic testhelpers testhelpers = require '../../../../../testhelper' { expect request generateUrl checkBongoConnectivity generateRequestParamsEncodeBody } = testhelpers utils = require './utils' testhelpers.gitlabApiUrl = generateUrl { route : '-/api/gitlab' } testhelpers.gitlabDefaultHeaders = { 'x-gitlab-event': 'System Hook', 'x-gitlab-token': utils.GITLAB_TOKEN } testhelpers.getSampleDataFor = (event) -> return (require './_sampledata')[event] ? { 'event_name': event } testhelpers.parseEvent = utils.parseEvent testhelpers.doRequestFor = (event, callback) -> { scope, method } = utils.parseEvent event params = generateRequestParamsEncodeBody url : testhelpers.gitlabApiUrl headers : testhelpers.gitlabDefaultHeaders body : testhelpers.getSampleDataFor event request.post params, callback module.exports = testhelpers
Test helpers for generic requests on tests
GitLab: Test helpers for generic requests on tests
CoffeeScript
agpl-3.0
sinan/koding,acbodine/koding,usirin/koding,mertaytore/koding,kwagdy/koding-1,andrewjcasal/koding,rjeczalik/koding,szkl/koding,cihangir/koding,usirin/koding,mertaytore/koding,jack89129/koding,andrewjcasal/koding,kwagdy/koding-1,usirin/koding,gokmen/koding,drewsetski/koding,acbodine/koding,jack89129/koding,rjeczalik/koding,mertaytore/koding,drewsetski/koding,andrewjcasal/koding,alex-ionochkin/koding,acbodine/koding,kwagdy/koding-1,usirin/koding,mertaytore/koding,gokmen/koding,koding/koding,alex-ionochkin/koding,gokmen/koding,szkl/koding,sinan/koding,szkl/koding,acbodine/koding,cihangir/koding,gokmen/koding,rjeczalik/koding,alex-ionochkin/koding,sinan/koding,jack89129/koding,jack89129/koding,alex-ionochkin/koding,drewsetski/koding,koding/koding,rjeczalik/koding,rjeczalik/koding,sinan/koding,cihangir/koding,drewsetski/koding,koding/koding,jack89129/koding,usirin/koding,kwagdy/koding-1,cihangir/koding,sinan/koding,koding/koding,koding/koding,rjeczalik/koding,cihangir/koding,sinan/koding,szkl/koding,andrewjcasal/koding,szkl/koding,drewsetski/koding,drewsetski/koding,kwagdy/koding-1,szkl/koding,kwagdy/koding-1,sinan/koding,jack89129/koding,andrewjcasal/koding,koding/koding,usirin/koding,szkl/koding,gokmen/koding,szkl/koding,jack89129/koding,acbodine/koding,acbodine/koding,jack89129/koding,andrewjcasal/koding,alex-ionochkin/koding,mertaytore/koding,gokmen/koding,rjeczalik/koding,cihangir/koding,acbodine/koding,kwagdy/koding-1,kwagdy/koding-1,koding/koding,sinan/koding,mertaytore/koding,andrewjcasal/koding,andrewjcasal/koding,drewsetski/koding,alex-ionochkin/koding,acbodine/koding,cihangir/koding,gokmen/koding,koding/koding,usirin/koding,usirin/koding,gokmen/koding,alex-ionochkin/koding,alex-ionochkin/koding,rjeczalik/koding,mertaytore/koding,mertaytore/koding,cihangir/koding,drewsetski/koding
580b9eef2ef2e7f0cfd7dc04d4d7207a2a87dc27
src/RuleProcessor.coffee
src/RuleProcessor.coffee
regexes = nonEnglishOperators: /[&|\||\=]{2}|\!\=/ module.exports = class RuleProcessor rule: name: 'prefer_english_operator' description: ''' This rule prohibits &&, ||, == and !=. Use and, or, is, and isnt instead. ''' level: 'warn' message: 'Don\'t use &&, ||, == and !=' lintLine: (line, lineApi) -> lineTokens = lineApi.getLineTokens() for token in lineTokens if token[0] in ['COMPARE', 'LOGIC'] location = token[2] substring = line[location.first_column..location.last_column] hasNonEnglishOperators = substring.match regexes.nonEnglishOperators if hasNonEnglishOperators return {context: "Found: #{hasNonEnglishOperators[0]}"}
module.exports = class RuleProcessor rule: name: 'prefer_english_operator' description: ''' This rule prohibits &&, ||, ==, != and !. Use and, or, is, isnt, and not instead. !! for converting to a boolean is ignored. ''' level: 'ignore' doubleNotLevel: 'ignore' message: 'Don\'t use &&, ||, ==, !=, or !' tokens: ['COMPARE', 'UNARY_MATH', 'LOGIC'] lintToken: (token, tokenApi) -> config = tokenApi.config[@rule.name] level = config.level # Compare the actual token with the lexed token. { first_column, last_column } = token[2] line = tokenApi.lines[tokenApi.lineNumber] actual_token = line[first_column..last_column] context = switch actual_token when '==' then 'Replace "==" with "is"' when '!=' then 'Replace "!=" with "isnt"' when '||' then 'Replace "||" with "or"' when '&&' then 'Replace "&&" with "and"' when '!' # `not not expression` seems awkward, so `!!expression` # gets special handling. if tokenApi.peek(1)?[0] is 'UNARY_MATH' level = config.doubleNotLevel '"?" is usually better than "!!"' else if tokenApi.peek(-1)?[0] is 'UNARY_MATH' # Ignore the 2nd half of the double not undefined else 'Replace "!" with "not"' else undefined if context? { level, context }
Update source to latest in `coffeelint`
Update source to latest in `coffeelint`
CoffeeScript
mit
gasi/coffeelint-prefer-english-operator-streamline
ca8a5f77ce6ce79cad7d22745832d9a79ef26096
app/assets/javascripts/controllers/projects/index.coffee
app/assets/javascripts/controllers/projects/index.coffee
Dashboard.ProjectsTabController = Ember.Controller.extend Dashboard.SearchableBaseController, baseRouteName: 'projects' search: pg_search: null Dashboard.ProjectsSearchController = Dashboard.ProjectsTabController.extend Dashboard.SearchableController, baseRouteName: 'projects'
Dashboard.ProjectsTabController = Ember.Controller.extend Dashboard.SearchableBaseController, baseRouteName: 'projects' search: query: null between_created_at: starts_at: null ends_at: null between_expires_at: starts_at: null ends_at: null between_online_date: starts_at: null ends_at: null Dashboard.ProjectsSearchController = Dashboard.ProjectsTabController.extend Dashboard.SearchableController, baseRouteName: 'projects'
Define search fields for projects
Define search fields for projects
CoffeeScript
mit
FromUte/dune-dashboard,FromUte/dune-dashboard,FromUte/dune-dashboard