Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Remove java-specific wrap guide, add 120
"*": "exception-reporting": userId: "f3cfa406-9a70-3680-f858-0c412c97f37e" welcome: showOnStartup: false metrics: userId: "a22f0efc-41ce-ed43-e5c0-88884b9fac7c" editor: invisibles: {} fontSize: 12 fontFamily: "Hack" scrollPastEnd: true showIndentGuide: true core: useReactEd...
"*": "exception-reporting": userId: "f3cfa406-9a70-3680-f858-0c412c97f37e" welcome: showOnStartup: false metrics: userId: "a22f0efc-41ce-ed43-e5c0-88884b9fac7c" editor: invisibles: {} fontSize: 12 fontFamily: "Hack" scrollPastEnd: true showIndentGuide: true core: useReactEd...
Refactor assignedTasks property on Paper Controller
ETahi.PaperController = Ember.ObjectController.extend needs: ['application'] downloadLink: ( -> "/papers/#{@get('id')}/download" ).property() authorTasks: Ember.computed.filterBy('allTasks', 'role', 'author') assignedTasks: (-> assignedTasks = @get('allTasks').filterBy 'assignee', @get('controllers...
ETahi.PaperController = Ember.ObjectController.extend needs: ['application'] downloadLink: ( -> "/papers/#{@get('id')}/download" ).property() authorTasks: Ember.computed.filterBy('allTasks', 'role', 'author') assignedTasks: (-> assignedTasks = @get('allTasks').filterBy 'assignee', @get('controllers...
Use SetPaths to support older Atom versions
FS = require('fs') module.exports = Save:-> try Files = [] ActiveEditor = atom.workspace.getActiveEditor() atom.workspace.eachEditor (editor)-> File = editor.getPath() return unless File Files.push File CurrentFile = ActiveEditor && ActiveEditor.getPath() || null;...
FS = require('fs') module.exports = Save:-> try Files = [] ActiveEditor = atom.workspace.getActiveEditor() atom.workspace.eachEditor (editor)-> File = editor.getPath() return unless File Files.push File CurrentFile = ActiveEditor && ActiveEditor.getPath() || null;...
Make enter key trigger click on IE and Chrome
Species.ElibrarySearchFormView = Ember.View.extend templateName: 'species/elibrary_search_form' classNames: ['search-block'] keyDown: (event) -> if event.keyCode == 13 $('.elibrary-search-button').click() actions: toggleSearchOptions: () -> @.$('.search-form').toggle() tag = @.$('.se...
Species.ElibrarySearchFormView = Ember.View.extend templateName: 'species/elibrary_search_form' classNames: ['search-block'] keyDown: (event) -> if event.keyCode == 13 $('.elibrary-search-button').focus().trigger('click') actions: toggleSearchOptions: () -> @.$('.search-form').toggle() ...
Fix throwing error for editor pane.
class EditorPane extends Pane constructor: (options = {}, data) -> options.cssClass = KD.utils.curry "editor-pane", options.cssClass super options, data @createEditor() createEditor: -> {file, content} = @getOptions() isLocalFile = no unless file instanceof FSFile return new ...
class EditorPane extends Pane constructor: (options = {}, data) -> options.cssClass = KD.utils.curry "editor-pane", options.cssClass super options, data @createEditor() createEditor: -> {file, content} = @getOptions() unless file instanceof FSFile throw new TypeError "File must be an...
Change name to teaching period to rollover
angular.module('doubtfire.teaching-periods.states.edit.directives.teaching-period-units', []) .directive('teachingPeriodUnits', -> replace: true restrict: 'E' templateUrl: 'teaching-periods/states/edit/directives/teaching-period-units/teaching-period-units.tpl.html' controller: ($scope, $state, alertService, R...
angular.module('doubtfire.teaching-periods.states.edit.directives.teaching-period-units', []) .directive('teachingPeriodUnits', -> replace: true restrict: 'E' templateUrl: 'teaching-periods/states/edit/directives/teaching-period-units/teaching-period-units.tpl.html' controller: ($scope, $state, alertService, R...
Allow SMTP server with no login
buildMailURL = _.debounce -> console.log 'Updating process.env.MAIL_URL' if RocketChat.settings.get('SMTP_Host') and RocketChat.settings.get('SMTP_Username') and RocketChat.settings.get('SMTP_Password') process.env.MAIL_URL = "smtp://" + encodeURIComponent(RocketChat.settings.get('SMTP_Username')) + ':' + encodeURI...
buildMailURL = _.debounce -> console.log 'Updating process.env.MAIL_URL' if RocketChat.settings.get('SMTP_Host') process.env.MAIL_URL = "smtp://" if RocketChat.settings.get('SMTP_Username') and RocketChat.settings.get('SMTP_Password') process.env.MAIL_URL += encodeURIComponent(RocketChat.s...
Add demo user api key to URL if not specified
class Workbench.Routers.WorkbenchRouter extends Backbone.Router initialize: (options) -> if (location.search.length < 1) # Demo user read-only key apiKey = "3359a8ffba94a54978aa6c645e3c617a" else params = $.deparam(location.search.split('?')[1]) apiKey = params.api_key Workbench.s...
class Workbench.Routers.WorkbenchRouter extends Backbone.Router initialize: (options) -> if (location.search.length < 1) # Demo user read-only key @apiKey = "3359a8ffba94a54978aa6c645e3c617a" else params = $.deparam(location.search.split('?')[1]) @apiKey = params.api_key Workbench...
Update helper method to user Ember.Handlebars.helper
Ember.Handlebars.registerBoundHelper('date', (dateString) -> if dateString && Ember.typeOf(dateString) == 'string' date = new Date(dateString.toString()) date.toLocaleDateString() )
Ember.Handlebars.helper('date', (dateString) -> if dateString && Ember.typeOf(dateString) == 'string' date = new Date(dateString.toString()) date.toLocaleDateString() )
Add San Francisco to list of cities on /collect
module.exports = fullyQualifiedLocations: [ 'New York, NY, USA', 'London, United Kingdom', 'Los Angeles, CA, USA', 'Paris, France', 'Berlin, Germany', 'Hong Kong, Hong Kong' ]
module.exports = fullyQualifiedLocations: [ 'New York, NY, USA', 'London, United Kingdom', 'Los Angeles, CA, USA', 'Paris, France', 'Berlin, Germany', 'San Francisco, CA, USA' 'Hong Kong, Hong Kong' ]
Make sure all DomainEvents are stored before calling the callback
_ = require 'underscore' Backbone = require 'backbone' class DomainEventService _.extend @prototype, Backbone.Events constructor: (@_eventStore) -> saveAndTrigger: (domainEvents, callback) -> # TODO: this should be an transaction to guarantee the consistency of the aggregate for domainEvent in domain...
_ = require 'underscore' async = require 'async' Backbone = require 'backbone' class DomainEventService _.extend @prototype, Backbone.Events constructor: (@_eventStore) -> saveAndTrigger: (domainEvents, callback) -> # TODO: this should be an transaction to guarantee the consistency of the aggregate a...
Comment specs back in but pend them
# StorageManager = require '../src/storage-manager' # # # This spec file cannot be included with other specs because it requires a pristine # # StorageManager singleton instance. Instead, ensure this works by commenting it in # # and running it by itself # # describe 'Singleton#get with window.base.data', -> # stubbe...
StorageManager = require '../src/storage-manager' # This spec file cannot be included with other specs because it requires a pristine # StorageManager singleton instance. Instead, ensure this works by unpending it and # focusing. xdescribe 'Singleton#get with window.base.data', -> stubbedStorageManager = null be...
Make sure the backbone extensions are only loaded once
ti = require 'tb/lib/ti' module.exports = load: -> Backbone.$ = ti.$ @extendView() extendView: -> # The default `viewName` for a View is `"View"`, which serves as # the base of all Titanium views. Backbone.View::viewName = 'View' # Delegate tagName to viewName to reduce the number of ...
ti = require 'tb/lib/ti' load = _.once -> Backbone.$ = ti.$ @extendView() extended = true module.exports = load: load extendView: -> # The default `viewName` for a View is `"View"`, which serves as # the base of all Titanium views. Backbone.View::viewName = 'View' # Delegate tagName to v...
Fix bug with opt out of add to home screen
# Manages add to home screen button. Gather.Views.AddToHomeScreenView = Backbone.View.extend initialize: (options) -> @options = options window.addEventListener('beforeinstallprompt', (event) => # Prevent Chrome 67 and earlier from automatically showing the prompt event.preventDefault() unle...
# Manages add to home screen button. Gather.Views.AddToHomeScreenView = Backbone.View.extend initialize: (options) -> @options = options window.addEventListener('beforeinstallprompt', (event) => # Prevent Chrome 67 and earlier from automatically showing the prompt event.preventDefault() unle...
Correct error message on failed enrol student
angular.module('doubtfire.units.modals.unit-student-enrolment-modal', []) # # Modal to enrol a student in the given tutorial # .factory('UnitStudentEnrolmentModal', ($modal) -> UnitStudentEnrolmentModal = {} # Must provide unit UnitStudentEnrolmentModal.show = (unit) -> $modal.open controller: 'UnitStu...
angular.module('doubtfire.units.modals.unit-student-enrolment-modal', []) # # Modal to enrol a student in the given tutorial # .factory('UnitStudentEnrolmentModal', ($modal) -> UnitStudentEnrolmentModal = {} # Must provide unit UnitStudentEnrolmentModal.show = (unit) -> $modal.open controller: 'UnitStu...
Update local setup to alert on command execution
require [ "jquery" "app" "../extension/hotkey" ], ( $ App ) -> class LocalSetup constructor: -> @loadCommands() App.on "execute.commands", @executeCommand.bind(this) loadCommands: -> $.getJSON("http://api.backtick.io/commands") .success((response) => App.trigger "load.comm...
require [ "jquery" "app" "../extension/hotkey" ], ( $ App ) -> class LocalSetup constructor: -> @loadCommands() App.on "fetch.commands", @fetchCommand.bind(this) loadCommands: -> $.getJSON("http://api.backtick.io/commands") .success((response) => App.trigger "load.commands...
Fix empty mini pie charts
angular.module('loomioApp').controller 'MiniProposalPieChartController', ($scope) -> $scope.pieChartData = [ { value : 0, color : "#90D490" }, { value : 0, color : "#F0BB67" }, { value : 0, color : "#D49090" }, { value : 0, color : "#dd0000"} ] $scope.pieChartOptions = animation: false s...
angular.module('loomioApp').controller 'MiniProposalPieChartController', ($scope) -> $scope.pieChartData = [ { value : 0, color : "#90D490" }, { value : 0, color : "#F0BB67" }, { value : 0, color : "#D49090" }, { value : 0, color : "#dd0000" }, { value : 0, color : "#cccccc" } ] $scope.pieCh...
Support dismissing the dialog just with Enter.
define [ "base" ], (App) -> App.controller "FeatureOnboardingController", ($scope, settings) -> $scope.innerStep = 1 $scope.turnCodeCheckOn = () -> settings.saveSettings({ syntaxValidation: true }) $scope.settings.syntaxValidation = true navToInnerStep2() $scope.turnCodeCheckOff = () -> setting...
define [ "base" ], (App) -> App.controller "FeatureOnboardingController", ($scope, settings) -> $scope.innerStep = 1 $scope.turnCodeCheckOn = () -> settings.saveSettings({ syntaxValidation: true }) $scope.settings.syntaxValidation = true navToInnerStep2() $scope.turnCodeCheckOff = () -> setting...
Use function instead of instance variable in helper methods
Backbone.Factlink ||= {} class Backbone.Factlink.Collection extends Backbone.Collection constructor: (args...) -> super args... @_loading = false @on 'before:fetch', => @_loading = true @on 'reset', => @_loading = false loading: -> @_loading waitForFetch: (callback) -> if @_loading ...
Backbone.Factlink ||= {} class Backbone.Factlink.Collection extends Backbone.Collection constructor: (args...) -> super args... @_loading = false @on 'before:fetch', => @_loading = true @on 'reset', => @_loading = false loading: -> @_loading waitForFetch: (callback) -> if @loading() ...
Allow empty results prop to MainAreaBottom
#= require ./start/start_main #= require ./results/results_main ###* @jsx React.DOM ### window.MainAreaBottom = React.createClass propTypes: store: React.PropTypes.object.isRequired statechart: React.PropTypes.object.isRequired corpus: React.PropTypes.object.isRequired results: React.PropTypes.objec...
#= require ./start/start_main #= require ./results/results_main ###* @jsx React.DOM ### window.MainAreaBottom = React.createClass propTypes: store: React.PropTypes.object.isRequired statechart: React.PropTypes.object.isRequired corpus: React.PropTypes.object.isRequired results: React.PropTypes.objec...
Remove grid version of Turtle
exports.draw_grid = (S, grid_size, cell_size) -> draw_leg = (x, y) -> size = cell_size * 0.5 S.rect { x: x y: y height: size width: size / 2 fill: "#00aa00" } draw_arc = (width, x_sign, y_sign) -> "a#{width},#{width} 0 0,1 #{x_sign*width},#{y_sign*width} " draw_ellip...
exports.draw_grid = (SVG, grid_size, cell_size) -> draw_leg = (x, y) -> size = cell_size * 0.5 SVG.rect { x: x y: y height: size width: size / 2 fill: "#00aa00" } grid_path = "" for n in [0..grid_size] by cell_size grid_path += "M#{n},1 V#{grid_size-1} M1,...
Add rendering of rails flash messages in ember.
Wheelmap.FlashMessagesController = Ember.ArrayController.extend pushMessage: (type, message)-> @pushObject Wheelmap.FlashMessage.create type: type message: message actions: removed: (message)-> @removeObject(message) Wheelmap.FlashMessage = Ember.Object.extend type: 'notice' message:...
Wheelmap.FlashMessagesController = Ember.ArrayController.extend init: (args...)-> @_super.apply(@, args) data = JSON.parse $.cookie("flash") types = ['alert', 'notice', 'error', 'success']; for type in types if (data[type]) @pushMessage(type, data[type]); $.cookie('flash', null, ...
Remove unused logger, so Signal actually works
define [ 'dispatcher' 'action-manager' 'store' 'invariant' 'signals' ], (dispatcher, actionManager, Store, invariant, logger, {Signal}) -> return { dispatcher actionManager Store invariant Signal }
define [ 'dispatcher' 'action-manager' 'store' 'invariant' 'signals' ], (dispatcher, actionManager, Store, invariant, {Signal}) -> return { dispatcher actionManager Store invariant Signal }
Allow imported users to register themselves
Meteor.methods registerUser: (formData) -> check formData, Object if RocketChat.settings.get('Accounts_RegistrationForm') is 'Disabled' throw new Meteor.Error 'error-user-registration-disabled', 'User registration is disabled', { method: 'registerUser' } else if RocketChat.settings.get('Accounts_Registrati...
Meteor.methods registerUser: (formData) -> check formData, Object if RocketChat.settings.get('Accounts_RegistrationForm') is 'Disabled' throw new Meteor.Error 'error-user-registration-disabled', 'User registration is disabled', { method: 'registerUser' } else if RocketChat.settings.get('Accounts_Registrati...
Add subscription for session data context and autosave on change
define [ 'environ' 'mediator' 'underscore' 'serrano' ], (environ, mediator, _, Serrano) -> class DataContexts extends Serrano.DataContexts url: environ.absolutePath '/api/contexts/' initialize: -> @deferred = @fetch() getNamed: -> @filter (model) ->...
define [ 'environ' 'mediator' 'underscore' 'serrano' ], (environ, mediator, _, Serrano) -> class DataContexts extends Serrano.DataContexts url: environ.absolutePath '/api/contexts/' initialize: -> @deferred = @fetch() getNamed: -> @filter (model) ->...
Add description view option to stack template editor view
BaseStackEditorView = require './basestackeditorview' module.exports = class StackTemplateEditorView extends BaseStackEditorView constructor: (options = {}, data) -> unless options.content options.content = require '../defaulttemplate' super options, data if options.showHelpContent @onc...
BaseStackEditorView = require './basestackeditorview' module.exports = class StackTemplateEditorView extends BaseStackEditorView constructor: (options = {}, data) -> unless options.content options.content = require '../defaulttemplate' super options, data if options.showHelpContent @onc...
Add de and fr translations.
I18n.translations ||= en: readmore: button_text: open: 'Read more' close: 'Read less' de: readmore: button_text: open: 'Open' close: 'Close'
I18n.translations ||= en: readmore: button_text: open: 'Read more' close: 'Read less' de: readmore: button_text: open: 'Mehr lesen' close: 'Weniger lesen' fr: readmore: button_text: open: 'Lire la suite' close: 'Afficher moins'
Tidy up mobile select group manager
define ['jsmin'], ($) -> class SelectGroup constructor: (@parent = null, @callback = false) -> @selectParent = (if @parent != null then $(@parent) else $('.js-select-group')) @addHandlers() addHandlers: -> @selectParent.on 'change', (e) => e.preventDefault() result = e.tar...
define ['jsmin'], ($) -> class SelectGroup constructor: (parent, callback) -> @parent = (if parent then $(parent) else $('.js-select-group')) @addHandlers() addHandlers: -> @parent.on 'change', (e) => e.preventDefault() result = e.target.options[e.target.selectedIndex].tex...
Disable display of anchoring pips in sidebar
Guest = require('../../../../../h/h/static/scripts/annotator/guest.coffee'); extend = require('extend') Annotator = require('annotator') $ = Annotator.$ class GuestExt extends Guest html: extend {}, Annotator::html, adder: ''' <div class="annotator-adder"> <button class="h-icon-insert-comm...
Guest = require('../../../../../h/h/static/scripts/annotator/guest.coffee'); extend = require('extend') Annotator = require('annotator') $ = Annotator.$ class GuestExt extends Guest html: extend {}, Annotator::html, adder: ''' <div class="annotator-adder"> <button class="h-icon-insert-comm...
Use correct github auth behaviour in test
AppConfig = require('../initializers/config') Deploy = require('../lib/deploy') range_check = require('range_check') tagRefersToServer = (tag, serverName) -> return new RegExp("^#{serverName}").test(tag) getIpFromRequest = (req) -> req.connection.remoteAddress GITHUB_IP_RANGE = "192.30.252.0/22" ipIsFromGithub ...
AppConfig = require('../initializers/config') Deploy = require('../lib/deploy') range_check = require('range_check') tagRefersToServer = (tag, serverName) -> return new RegExp("^#{serverName}").test(tag) getIpFromRequest = (req) -> req.connection.remoteAddress GITHUB_IP_RANGE = "192.30.252.0/22" ipIsFromGithub ...
Verify selection on key up
# Copyright (c) 2012 Mattes Groeger # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, dist...
# Copyright (c) 2012 Mattes Groeger # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, dist...
Update description of the hubot integration.
# Description: # Allows Hubot interact with mercure # # Commands: # hubot download me <url> util = require 'util' url = require 'url' MERCURE_URL = process.env.MERCURE_URL MERCURE_TOKEN = process.env.MERCURE_TOKEN HUBOT_URL = process.env.HUBOT_URL module.exports = (robot) -> robot.respond /download me (....
# Description: # Allows Hubot interact with mercure # # Configuration: # MERCURE_URL - The URL of the mercure instance # MERCURE_TOKEN - The private token # HUBOT_URL - the URL of the this hubot # # Commands: # hubot download me <url> # # URLS: # /mercure/callback/:room - the callback URL when to download i...
Use ffmpeg for wav file conversion
FileEditorView = require './file-editor-view' exec = require('child_process').execSync module.exports = class WAVEditorView extends FileEditorView @content: -> @div class: 'xoreos-editor', tabindex: -1, => @div class: 'xoreos-container', => @div class: 'audio-container', => @div class: '...
FileEditorView = require './file-editor-view' exec = require('child_process').execSync module.exports = class WAVEditorView extends FileEditorView @content: -> @div class: 'xoreos-editor', tabindex: -1, => @div class: 'xoreos-container', => @div class: 'audio-container', => @div class: '...
Remove redundent doc in comment
### grunt-commonjs-coffee https://github.com/tuxracer/grunt-commonjs-coffee Copyright (c) 2013 Team Delicious, AVOS Systems Inc. Licensed under the MIT license. ### path = require 'path' grunt = require 'grunt' # commonjs: { # modules: { # cwd: 'assets/', # src: ['assets/*.coffee'], # dest: 'dist/' # } #...
### grunt-commonjs-coffee https://github.com/tuxracer/grunt-commonjs-coffee Copyright (c) 2013 Team Delicious, AVOS Systems Inc. Licensed under the MIT license. ### path = require 'path' grunt = require 'grunt' indentStr = (str) -> str.replace(/(\r\n|\n|\r)/g, '\n ') isCoffeeScript = (filepath) -> filepath.sli...
Use proper createRecord function call
Review.PermissionCellComponent = Ember.Component.extend tagName: 'th' classNames: ['permissions', 'text-center'] classNameBindings: ['permission.isAllowed:success:danger'] permission: (() -> user = @get('user') project = @get('project') permission = user.get('permissions').find((item) -> item.get('...
Review.PermissionCellComponent = Ember.Component.extend tagName: 'th' classNames: ['permissions', 'text-center'] classNameBindings: ['permission.isAllowed:success:danger'] permission: (() -> user = @get('user') project = @get('project') permission = user.get('permissions').find((item) -> item.get('...
Set the y axis to a minimum of 0.
$(document).ready -> chart = new Highcharts.Chart chart: renderTo: 'weekly-performance-graph', defaultSeriesType: 'spline', backgroundColor: '#f7f7f7', width: 600 title: [ text: 'Weekly Performance' ], series: [ { name: 'views', data: [['Mon', 10], [...
$(document).ready -> chart = new Highcharts.Chart chart: renderTo: 'weekly-performance-graph', defaultSeriesType: 'spline', backgroundColor: '#f7f7f7', width: 600 title: [ text: 'Weekly Performance' ], series: [ { name: 'views', data: [['Mon', 10], [...
Add auto scroll on question selection to user graph
window.GraphQuestionList = React.createClass propTypes: questions: React.PropTypes.array.isRequired activeQuestion: React.PropTypes.number.isRequired answerTexts: React.PropTypes.array.isRequired render: -> questions = (`<DisplayQuestion question={q} index={i} key={i} active={this.props.activeQuestion==...
window.GraphQuestionList = React.createClass propTypes: questions: React.PropTypes.array.isRequired activeQuestion: React.PropTypes.number.isRequired answerTexts: React.PropTypes.array.isRequired getInitialState: -> return { height: window.innerHeight - (50+1+20 + 1 + 320) scrollTop: 0 } ha...
Fix focusing input with content (focus at end)
Marbles.Views.MentionsAutoCompleteTextarea = class MentionsAutoCompleteTextareaView extends Marbles.View @view_name: 'mentions_autocomplete_textarea' constructor: (options = {}) -> super @initInlineMentionsManager() initInlineMentionsManager: => @inline_mentions_manager = new TentStatus.InlineMenti...
Marbles.Views.MentionsAutoCompleteTextarea = class MentionsAutoCompleteTextareaView extends Marbles.View @view_name: 'mentions_autocomplete_textarea' constructor: (options = {}) -> super @initInlineMentionsManager() initInlineMentionsManager: => @inline_mentions_manager = new TentStatus.InlineMenti...
Fix trigger "select" with event & atom (dispatcher)
class Atoms.Molecule.Navigation extends Atoms.Core.Class.Molecule template: """ <nav molecule-class="{{className}}" class="{{style}}"></nav> """ bindings: link: ["click"] button: ["click"] constructor: -> @atoms = link: [], button: [] super linkClick: (event, atom) => @_trigger e...
class Atoms.Molecule.Navigation extends Atoms.Core.Class.Molecule template: """ <nav molecule-class="{{className}}" class="{{style}}"></nav> """ bindings: link: ["click"] button: ["click"] constructor: -> @atoms = link: [], button: [] super linkClick: (event, atom) => @_trigger e...
Set color by the severity
NotificationPlugin = require "../../notification-plugin.js" class Slack extends NotificationPlugin @errorAttachment = (event) -> fallback: "Something happened", fields: [ { title: "Error" value: (event.error.exceptionClass + (if event.error.message then ": #{event.error.message}")).trun...
NotificationPlugin = require "../../notification-plugin.js" class Slack extends NotificationPlugin @errorAttachment = (event) -> attachment = fallback: "Something happened", fields: [ { title: "Error" value: (event.error.exceptionClass + (if event.error.message then ": #{e...
Add more event emitter wildcard tests
should = require 'should' sinon = require 'sinon' shouldSinon = require 'should-sinon' KDEventEmitterWildcard = require '../../lib/core/eventemitterwildcard' describe 'KDEventEmitterWildcard', -> beforeEach -> @instance = new KDEventEmitterWildcard it 'exists', -> KDEventEmitterWildcard.should.exist d...
should = require 'should' sinon = require 'sinon' shouldSinon = require 'should-sinon' KDEventEmitterWildcard = require '../../lib/core/eventemitterwildcard' describe 'KDEventEmitterWildcard', -> beforeEach -> @instance = new KDEventEmitterWildcard emitSpy = sinon.spy @instance.emit it 'exists', -> K...
Use Time component for displaying when task was last worked
React = require 'react' moment = require 'moment' CellStatusMixin = require './cell-status-mixin' ConceptCoachCell = React.createClass mixins: [CellStatusMixin] # prop validation lastWorked: -> moment(@props.task.last_worked_at).format('MMM. D') render: -> <div className="cc-cell"> <div classN...
React = require 'react' moment = require 'moment' Time = require '../time' CellStatusMixin = require './cell-status-mixin' ConceptCoachCell = React.createClass mixins: [CellStatusMixin] # prop validation render: -> <div className="cc-cell"> <div className="score">{@props.task.correct_exercise_count} ...
Add MessageSerializer; Messages relation to Room; change createdAt to string for date
App.User = DS.Model.extend firstName: DS.attr("string") lastName: DS.attr("string") email: DS.attr("string") role: DS.attr("string") password: DS.attr("string") App.CurrentUser = App.User.extend({}) App.Room = DS.Model.extend name: DS.attr("string") roomUserState: DS.belongsTo("room_user_state") ...
App.User = DS.Model.extend firstName: DS.attr("string") lastName: DS.attr("string") email: DS.attr("string") role: DS.attr("string") password: DS.attr("string") App.CurrentUser = App.User.extend({}) App.Room = DS.Model.extend name: DS.attr("string") roomUserState: DS.belongsTo("room_user_state") ...
Fix file input not adding new field after change bug.
# Image upload control class @ImageUpload uploadMethod: null constructor: (@container)-> @setupNestedAttributes() @setupSwtiching() setupNestedAttributes: -> @container.nestedAttributes bindAddTo: $(".actions .add") collectionName: 'images' collectIdAttributes: false $clone:...
# Image upload control class @ImageUpload uploadMethod: null constructor: (@container)-> @setupNestedAttributes() @setupSwtiching() setupNestedAttributes: -> @container.nestedAttributes bindAddTo: $(".actions .add") collectionName: 'images' collectIdAttributes: false $clone:...
Load and initialize epic editor on question form
# 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/
# 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/ # #= require epiceditor Inquest.Questions ||= {} Inquest.Questions.init = -> new EpicEdi...
Add event to post message
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/
@flash_element = (element) -> oldBG = element.style.background oldTra = element.style.transition element.style.backgroundColor = '#faa' setTimeout(-> element.style.transitionDuration = '.5s' element.style.transitionProperty= 'background-color' element.style.backgroundColor = 'transparent' , 300) ...
Switch to using jQuery's on() function instead of live for tandem_content events.
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. $(document).ready -> $('.page_link').colorbox onCleanup: -> location.reload() if $('#tandem_page_links').length > 0 $('body').addClass('tandem-admin-bar') ...
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. $(document).ready -> $('.page_link').colorbox onCleanup: -> location.reload() if $('#tandem_page_links').length > 0 $('body').addClass('tandem-admin-bar') ...
Update to be more idiomatic
define [ '../core' ], (c) -> class Model extends c.Backbone.Model url: -> if @isNew() then super else @links.self constructor: (attrs, options) -> @links = {} super(attrs, options) parse: (attrs, options) -> if attrs? and attrs._links? ...
define [ '../core' ], (c) -> class Model extends c.Backbone.Model url: -> if @isNew() then super else @links.self constructor: (attrs, options) -> @links = {} super(attrs, options) parse: (attrs, options) -> if attrs? and attrs._links? ...
Add a row with bigger height in demo
module.exports = config: undefinedDisplay: type: 'string' default: '' activate: (state) -> atom.workspaceView.command 'table-edit:demo', => @openDemo() @openDemo() deactivate: -> serialize: -> openDemo: -> Table = require './table' TableView = require './table-view' ...
module.exports = config: undefinedDisplay: type: 'string' default: '' activate: (state) -> atom.workspaceView.command 'table-edit:demo', => @openDemo() @openDemo() deactivate: -> serialize: -> openDemo: -> Table = require './table' TableView = require './table-view' ...
Use evalAsync instead of timeout
define [ "base" ], (App) -> App.directive "reviewPanelSorted", ($timeout) -> return { link: (scope, element, attrs) -> layout = () -> entries = [] for el in element.find(".rp-entry") entries.push { el: el scope: angular.element(el).scope() } entries.sort (a,b) -> a.s...
define [ "base" ], (App) -> App.directive "reviewPanelSorted", ($timeout) -> return { link: (scope, element, attrs) -> layout = () -> entries = [] for el in element.find(".rp-entry") entries.push { el: el scope: angular.element(el).scope() } entries.sort (a,b) -> a.s...
Remove property calls for default ones
ETahi.AdminJournalUserController = Ember.ObjectController.extend resetPasswordSuccess: (-> false ).property() resetPasswordFailure: (-> false ).property() modalId: (-> "#{@get('id')}-#{@get('username')}" ).property('username', 'id') actions: saveUser: -> @get('model').save() ...
ETahi.AdminJournalUserController = Ember.ObjectController.extend resetPasswordSuccess: false resetPasswordFailure: false modalId: (-> "#{@get('id')}-#{@get('username')}" ).property('username', 'id') actions: saveUser: -> @get('model').save() rollbackUser: -> @get('model').rollback(...
Improve display of no data values
class Workbench.Views.DatastreamLatestView extends Backbone.View template: JST["workbench/workbench/templates/latest"] initialize: -> # Animate out, update content, animate back in swapHtml: ($element, content) -> $element.transition(rotateX: '90deg').promise().done(-> @html(content).transition(rota...
class Workbench.Views.DatastreamLatestView extends Backbone.View template: JST["workbench/workbench/templates/latest"] initialize: -> # Animate out, update content, animate back in swapHtml: ($element, content) -> $element.transition(rotateX: '90deg').promise().done(-> @html(content).transition(rota...
Add tests for object clone().
uri = require('../lib/util/uri-helpers') xdescribe 'resolveURL()', -> it 'should replace the last segment', -> expect(uri.resolveURL('a', 'b')).toBe 'b' expect(uri.resolveURL('x/y', 'z')).toBe 'x/z' expect(uri.resolveURL('m', 'n/o')).toBe 'n/o' expect(uri.resolveURL('a/b', 'c/d')).toBe 'a/c/d' it ...
uri = require('../lib/util/uri-helpers') clone = require('../lib/util/clone-obj') xdescribe 'resolveURL()', -> it 'should replace the last segment', -> expect(uri.resolveURL('a', 'b')).toBe 'b' expect(uri.resolveURL('x/y', 'z')).toBe 'x/z' expect(uri.resolveURL('m', 'n/o')).toBe 'n/o' expect(uri.reso...
Add es6 promise polyfill to the spec setup
if typeof window isnt 'undefined' root = window else root = global if !root._spec_setup root.sinon = require 'sinon' root.mockery = require 'mockery' root.chai = require 'chai' root.expect = chai.expect root.sandbox = sinon.sandbox.create() sinonChai = require 'sinon-chai' chai.use sinonC...
require('es6-promise').polyfill() if typeof window isnt 'undefined' root = window else root = global if !root._spec_setup root.sinon = require 'sinon' root.mockery = require 'mockery' root.chai = require 'chai' root.expect = chai.expect root.sandbox = sinon.sandbox.create() sinonChai = req...
Simplify resize and make it work outside of doc
Bacon = require("baconjs") # Observe mouse move and provide callback functions to react accordingly # # @param mouseDownEvent: {Event} Initial event that should be called prior to starting to observe changes here module.exports = (mouseDownEvent) -> mouseDoneStream = Bacon.fromEvent(document.body, "mouseup").merge(B...
Bacon = require 'baconjs' # Observe mouse move and provide callback functions to react accordingly # # @param initialEvent: {Event} Initial event that should be called prior to starting to observe changes here module.exports = (initialEvent) -> mouseUpStream = Bacon.fromEvent document, 'mouseup' mouseUpStream.onVa...
Add support for mac and linux with wine
path = require 'path' {spawn} = require 'child_process' pairSettings = ['version-string'] singleSettings = ['file-version', 'product-version', 'icon'] module.exports = (exe, options, callback) -> rcedit = path.resolve __dirname, '..', 'bin', 'rcedit.exe' args = [exe] for name in pairSettings if options[nam...
path = require 'path' {spawn} = require 'child_process' pairSettings = ['version-string'] singleSettings = ['file-version', 'product-version', 'icon'] module.exports = (exe, options, callback) -> rcedit = path.resolve __dirname, '..', 'bin', 'rcedit.exe' args = [exe] for name in pairSettings if options[nam...
Use readonly transactions for read operations.
class @PodsStore update: (new_records) -> @writeObjects(new_records) all: -> records = [] promise = new Promise (resolve, reject) => @database (db) -> t = db.transaction 'pods', 'readwrite' store = t.objectStore('pods') keyRange = IDBKeyRange.lowerBound(0) r = store...
class @PodsStore update: (new_records) -> @writeObjects(new_records) all: -> records = [] promise = new Promise (resolve, reject) => @database (db) -> t = db.transaction 'pods', 'readonly' store = t.objectStore('pods') keyRange = IDBKeyRange.lowerBound(0) r = store....
Update the shared queries collection when a new query is created
### The 'main' script for bootstrapping the default Cilantro client. Projects can use this directly or emulate the functionality in their own script. ### require ['cilantro'], (c) -> # Session options options = url: c.config.get('url') credentials: c.config.get('credentials') # Open the d...
### The 'main' script for bootstrapping the default Cilantro client. Projects can use this directly or emulate the functionality in their own script. ### require ['cilantro'], (c) -> # Session options options = url: c.config.get('url') credentials: c.config.get('credentials') # Open the d...
Make sure REPL sockets are cleaned up no matter how the server shuts down
nconf = require 'nconf' net = require 'net' pkgman = require 'pkgman' repl = require 'repl' exports.$initialized = -> replServer = null # Feed all the goodies into a REPL for ultimate awesome. replServer = net.createServer (socket) -> s = repl.start( prompt: "shrub> " input: socket output: socket ...
fs = require 'fs' nconf = require 'nconf' net = require 'net' pkgman = require 'pkgman' repl = require 'repl' exports.$initialized = -> filename = "#{__dirname}/socket" replServer = null # Feed all the goodies into a REPL for ultimate awesome. replServer = net.createServer (socket) -> s = repl.start( p...
Fix loading of Rich Text page in Test Controls
define [ "base" "ace/ace" ], (App) -> App.controller "TestControlsController", ($scope) -> $scope.openProjectLinkedFileModal = () -> window.openProjectLinkedFileModal() $scope.openLinkedFileModal = () -> window.openLinkedFileModal() $scope.richText = () -> window.location.href = window.location.toS...
define [ "base" "ace/ace" ], (App) -> App.controller "TestControlsController", ($scope) -> $scope.openProjectLinkedFileModal = () -> window.openProjectLinkedFileModal() $scope.openLinkedFileModal = () -> window.openLinkedFileModal() $scope.richText = () -> current = window.location.toString() ta...
Fix a typo in last commit
class DirectionalSound extends Wage.MeshSound constructor: (name, mesh, @angles, options) -> super name, mesh, options _init: (options) -> @panner.coneInnerAngle = angles.innerAngleDegrees @panner.coneOuterAngle = angles.outerAngleDegrees @panner.coneOuterGain = angles.outerGain...
class DirectionalSound extends Wage.MeshSound constructor: (name, mesh, @angles, options) -> super name, mesh, options _init: (options) -> @panner.coneInnerAngle = @angles.innerAngleDegrees @panner.coneOuterAngle = @angles.outerAngleDegrees @panner.coneOuterGain = @angles.outerG...
Add some debug logging for socket connections
Backbone = require('backbone') [Control, Controls] = require('./Control.coffee') Router = require('./Router.coffee') AppView = require('./AppView.coffee') module.exports = class App extends Backbone.Model initialize: -> @log "Jarvis web client here" Backbone.$ = window.$ @router = new Router(app: this) ...
Backbone = require('backbone') [Control, Controls] = require('./Control.coffee') Router = require('./Router.coffee') AppView = require('./AppView.coffee') module.exports = class App extends Backbone.Model initialize: -> @log "Jarvis web client here" Backbone.$ = window.$ @router = new Router(app: this) ...
Hide subchannels when showing all factlinks in topic
class window.ChannelView extends Backbone.Marionette.Layout template: 'channels/channel' regions: factList: '.js-region-fact-list' subChannelsRegion: '.js-region-sub-channels' addToChannelRegion: '.js-region-add-to-channel' creatorProfileRegion: ".js-region-creator-profile" events: 'change ....
class window.ChannelView extends Backbone.Marionette.Layout template: 'channels/channel' regions: factList: '.js-region-fact-list' subChannelsRegion: '.js-region-sub-channels' addToChannelRegion: '.js-region-add-to-channel' creatorProfileRegion: ".js-region-creator-profile" events: 'change ....
Add a mocha workaround for diffs.
require 'coffee-script/register' require './setup' {eachGroup} = require('../lib/specs_iterator') eachGroup (group) -> run = if group.pending then xdescribe else describe run group.name, -> group.specs.forEach (spec) -> it spec.name, do (spec) -> -> result = js2coffee(spec.input) try ...
require 'coffee-script/register' require './setup' {eachGroup} = require('../lib/specs_iterator') eachGroup (group) -> run = if group.pending then xdescribe else describe run group.name, -> group.specs.forEach (spec) -> it spec.name, do (spec) -> -> result = js2coffee(spec.input) try ...
Make sure that there's only one form for each type of records.
RECORDS = {} init_records = (name) -> ($ ".current_xml").append RECORDS[name] = ($ "<#{name}>") init_records "clients" init_records "groups" @open_clients = -> menu_slide -> ($ ".groupform").remove() ($ ".arena").append form().addClass "clientform" ($ ".arena").append form().addClass "groupform" ...
RECORDS = {} init_records = (name) -> ($ ".current_xml").append RECORDS[name] = ($ "<#{name}>") init_records "clients" init_records "groups" @open_clients = -> menu_slide -> ($ ".clientform").remove() ($ ".groupform").remove() ($ ".arena").append form().addClass "clientform" ($ ".arena").append f...
Fix what was supposed to be a temp path
supervisor = require 'supervisor' main = () -> supervisor.run [ '--quiet' '--exec', 'node' '--no-restart-on', 'exit' '--extensions', 'coffee,js,json,yml' '/Users/a/code/ReclaimSoftware/rs-runner/devrun.js' ] module.exports = {main}
fs = require 'fs' supervisor = require 'supervisor' main = () -> supervisor.run [ '--quiet' '--exec', 'node' '--no-restart-on', 'exit' '--extensions', 'coffee,js,json,yml' fs.realpathSync("#{__dirname}/devrun.js") ] module.exports = {main}
Add atom prefix to rootView reference
StyleguideView = null styleguideUri = 'atom://styleguide' createStyleguideView = (state) -> StyleguideView ?= require './styleguide-view' new StyleguideView(state) deserializer = name: 'StyleguideView' deserialize: (state) -> createStyleguideView(state) atom.deserializers.add(deserializer) module.exports = ...
StyleguideView = null styleguideUri = 'atom://styleguide' createStyleguideView = (state) -> StyleguideView ?= require './styleguide-view' new StyleguideView(state) deserializer = name: 'StyleguideView' deserialize: (state) -> createStyleguideView(state) atom.deserializers.add(deserializer) module.exports = ...
Revert "use helper to preserve cell widths" because the other rows' cells' widths are not preserved.
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ # http://stackoverflow.com/questions/1307705/jquery-ui-sortable-with-table-and-tr-width/1372954#1372954 # ht...
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ jQuery -> $('#call_list td').each (index, element) -> $(element).css('width', $(element).width()...
Fix unknown props on TutorialButton
React = require 'react' Tutorial = require '../lib/tutorial' module.exports = React.createClass getDefaultProps: -> workflow: null project: null user: null getInitialState: -> tutorial: null componentDidMount: -> @fetchTutorialFor @props.workflow componentWillReceiveProps: (nextProps) ->...
React = require 'react' Tutorial = require '../lib/tutorial' module.exports = React.createClass getDefaultProps: -> workflow: null project: null user: null getInitialState: -> tutorial: null componentDidMount: -> @fetchTutorialFor @props.workflow componentWillReceiveProps: (nextProps) ->...
Improve Names of Choice EDSL Parameters
angular.module 'qbn.edsl', ['qbn.quality', 'qbn.storylet', 'qbn.choice'] .factory 'qbnEdsl', (qualities, storylets, frontalChoices, choiceFactory) -> api = quality: (id, name, description, args = {}) -> {value, progress, maxProgress, hasProgress, progressEscalation, visible} = args ...
angular.module 'qbn.edsl', ['qbn.quality', 'qbn.storylet', 'qbn.choice'] .factory 'qbnEdsl', (qualities, storylets, frontalChoices, choiceFactory) -> api = quality: (id, name, description, args = {}) -> {value, progress, maxProgress, hasProgress, progressEscalation, visible} = args value ?= ...
Remove extra "/" in Scenario url_path
class @Scenario extends Backbone.Model api_session_id: => key = App.settings.get('api_session_id') return if key? then key else null api_attributes: => s = App.settings data = area_code: s.get('area_code') end_year: s.get('end_year') preset_scenario_id: s.get('preset_scenario_id')...
class @Scenario extends Backbone.Model api_session_id: => key = App.settings.get('api_session_id') return if key? then key else null api_attributes: => s = App.settings data = area_code: s.get('area_code') end_year: s.get('end_year') preset_scenario_id: s.get('preset_scenario_id')...
Add hotkey for "reply with selected text" to Issueable
#= require shortcuts_navigation class @ShortcutsIssueable extends ShortcutsNavigation constructor: (isMergeRequest) -> super() Mousetrap.bind('a', -> $('.js-assignee').select2('open') return false ) Mousetrap.bind('m', -> $('.js-milestone').select2('open') return false ) ...
#= require shortcuts_navigation class @ShortcutsIssueable extends ShortcutsNavigation constructor: (isMergeRequest) -> super() Mousetrap.bind('a', -> $('.js-assignee').select2('open') return false ) Mousetrap.bind('m', -> $('.js-milestone').select2('open') return false ) ...
Disable for now, lets keep conversations with users own name.
class ChatConversationListItemTitle extends JView constructor:(options = {}, data)-> options.cssClass = 'chat-item' data = [nick for nick in data when nick isnt KD.nick()].first super viewAppended:-> invitees = @getData() @accounts = [] for invitee in invitees KD.remote.cacheable i...
class ChatConversationListItemTitle extends JView constructor:(options = {}, data)-> options.cssClass = 'chat-item' # data = [nick for nick in data when nick isnt KD.nick()].first super viewAppended:-> invitees = @getData() @accounts = [] for invitee in invitees KD.remote.cacheable...
Support setting currency with a number
class Skr.Components.Currency extends Lanes.React.Component getDefaultProps: -> amount: _.bigDecimal('0.0') symbol: '$' propTypes: amount: React.PropTypes.instanceOf(_.bigDecimal) symbol: React.PropTypes.string render: -> className = _.classnames 'currency', @props...
class Skr.Components.Currency extends Lanes.React.Component getDefaultProps: -> amount: _.bigDecimal('0.0') symbol: '$' propTypes: amount: React.PropTypes.oneOfType([ React.PropTypes.number, React.PropTypes.instanceOf(_.bigDecimal) ]) symbol: Rea...
Increase the delay for sending buffer updates to analysis server
Utils = require './utils' {CompositeDisposable} = require 'atom' module.exports = class BufferUpdateComponent constructor: (@editor, @analysisAPI) -> @events = new CompositeDisposable() @events.add @editor.onDidStopChanging => descriptors = @editor.getRootScopeDescriptor() # We only support pure ...
_ = require 'lodash' Utils = require './utils' {CompositeDisposable} = require 'atom' module.exports = class BufferUpdateComponent constructor: (@editor, @analysisAPI) -> @events = new CompositeDisposable() updateFile = => descriptors = @editor.getRootScopeDescriptor() # We only support pure Dart...
Add a classname attribute and refactor progress bar
### @todo Add a circular progress variant ### require './style' module.exports = React.createClass # -- Properties propTypes: buffer : React.PropTypes.number max : React.PropTypes.number min : React.PropTypes.number value : React.PropTypes.number indetermina...
### @todo Add a circular progress variant ### require './style' module.exports = React.createClass # -- Properties propTypes: buffer : React.PropTypes.number className : React.PropTypes.string indeterminate : React.PropTypes.bool max : React.PropTypes.number min ...
Enable display on the RPi
config = require './config' api = require './api' capture = require './capture' display = require './display' # Set the interval for the operations interval = 1000 busy = false device_url = null api.registerDevice (err, result) -> device_url = result.device.url console.log device_url captureTask = (task) -> ...
config = require './config' api = require './api' capture = require './capture' display = require './display' # Set the interval for the operations interval = 1000 busy = false device_url = null api.registerDevice (err, result) -> device_url = result.device.url console.log device_url captureTask = (task) -> ...
Fix stdin probing on Linux
js2coffee = require('./js2coffee') _ = require('underscore') fs = require('fs') path = require('path') UnsupportedError = js2coffee.UnsupportedError basename = path.basename cmd = basename(process.argv[1]) build_and_show = (fname) -> contents = fs.readFileSync(fname, 'utf-8') output = js2coffee.build...
js2coffee = require('./js2coffee') _ = require('underscore') fs = require('fs') path = require('path') tty = require('tty') UnsupportedError = js2coffee.UnsupportedError basename = path.basename cmd = basename(process.argv[1]) build_and_show = (fname) -> contents = fs.readFileSync(fname, 'utf-8') outp...
Use More Sensible Default for Choice Reqs
angular.module 'qbn.edsl', ['qbn.quality', 'qbn.storylet', 'qbn.choice'] .factory 'qbnEdsl', (qualities, storylets, frontalChoices, choiceFactory) -> api = quality: (id, name, description, args = {}) -> {value, progress, maxProgress, hasProgress, progressEscalation, visible} = args value ?= ...
angular.module 'qbn.edsl', ['qbn.quality', 'qbn.storylet', 'qbn.choice'] .factory 'qbnEdsl', (qualities, storylets, frontalChoices, choiceFactory) -> api = quality: (id, name, description, args = {}) -> {value, progress, maxProgress, hasProgress, progressEscalation, visible} = args value ?= ...
Set spec type after all specs in the category are required
require 'window' measure 'spec suite require time', -> fsUtils = require 'fs-utils' path = require 'path' require 'spec-helper' requireSpecs = (directoryPath, specType) -> for specPath in fsUtils.listTreeSync(path.join(directoryPath, 'spec')) when /-spec\.coffee$/.test specPath require specPath ...
require 'window' measure 'spec suite require time', -> fsUtils = require 'fs-utils' path = require 'path' require 'spec-helper' requireSpecs = (directoryPath, specType) -> for specPath in fsUtils.listTreeSync(path.join(directoryPath, 'spec')) when /-spec\.coffee$/.test specPath require specPath s...
Improve weapon position player clone
Crafty.c 'PlayerClone', init: -> @requires 'Enemy, playerShip' playerClone: (attr = {}) -> @attr _.defaults(attr, h: 45, w: 71, health: 900) @origin 'center' @flipX() @colorOverride '#808080', 'partial' @enemy() this
Crafty.c 'PlayerClone', init: -> @requires 'Enemy, playerShip' playerClone: (attr = {}) -> @attr _.defaults(attr, h: 45, w: 71, health: 900, weaponOrigin: [5, 30] ) @origin 'center' @flipX() @colorOverride '#808080', 'partial' @enemy() this
Fix default values for tablength and line length
'.source.rust': 'editor': 'commentStart': '// ' 'increaseIndentPattern': '(?x) ^ .* \\{ [^}"\']* $ |^ .* \\( [^\\)"\']* $ |^ \\s* \\{ \\} $ ' 'decreaseIndentPattern': '(?x) ^ \\s* (\\s* /[*] .* [*]/ \\s*)* \\} |^ \\s* (\\s* /[*] .* [*]/ \\s*)* \\) ' 'tabLeng...
'.source.rust': 'editor': 'commentStart': '// ' 'increaseIndentPattern': '(?x) ^ .* \\{ [^}"\']* $ |^ .* \\( [^\\)"\']* $ |^ \\s* \\{ \\} $ ' 'decreaseIndentPattern': '(?x) ^ \\s* (\\s* /[*] .* [*]/ \\s*)* \\} |^ \\s* (\\s* /[*] .* [*]/ \\s*)* \\) ' 'tabLeng...
Add freeOnly to static mock
props = permissions: [] anonymous: true preferredLanguage: 'en' exports.serverConfig = codeNinja: false static: true exports.features = playViewsOnly: false exports.me = isStudent: () -> false isAnonymous: () -> @get('anonymous') isTeacher: () -> false isAdmin: () -> false level: () -> 1 ...
props = permissions: [] anonymous: true preferredLanguage: 'en' exports.serverConfig = codeNinja: false static: true exports.features = playViewsOnly: false exports.me = isStudent: () -> false isAnonymous: () -> @get('anonymous') isTeacher: () -> false isAdmin: () -> false level: () -> 1 ...
Make Emmet work in .php and .phtml files too
# language-specific Tab triggers # you can add more triggers by changing `grammar` attribute values 'atom-text-editor[data-grammar="text html basic"]:not([mini]), atom-text-editor[data-grammar~="jade"]:not([mini]), atom-text-editor[data-grammar~="css"]:not([mini]), atom-text-editor[data-grammar~="sass"]:not([mini])': ...
# language-specific Tab triggers # you can add more triggers by changing `grammar` attribute values 'atom-text-editor[data-grammar="text html basic"]:not([mini]), atom-text-editor[data-grammar~="jade"]:not([mini]), atom-text-editor[data-grammar~="css"]:not([mini]), atom-text-editor[data-grammar~="sass"]:not([mini]), at...
Add brackets to increase code legibility
child_process = require "child_process" module.exports = run: (path, args) -> # TODO: Add support killing the process. proc = child_process.exec(path + " " + args.join " ") proc.on "close", (code, signal) => if code == 0 # TODO: Display a more visible success message. console.info ...
child_process = require "child_process" module.exports = run: (path, args) -> # TODO: Add support killing the process. proc = child_process.exec(path + " " + args.join(" ")) proc.on "close", (code, signal) => if code == 0 # TODO: Display a more visible success message. console.info...
Make map input placeholder message useful
Darkswarm.directive 'mapSearch', ($timeout)-> # Install a basic search field in a map restrict: 'E' require: '^googleMap' replace: true template: '<input id="pac-input"></input>' link: (scope, elem, attrs, ctrl)-> $timeout => map = ctrl.getMap() input = (document.getElementById("pac-input")...
Darkswarm.directive 'mapSearch', ($timeout)-> # Install a basic search field in a map restrict: 'E' require: '^googleMap' replace: true template: '<input id="pac-input" placeholder="Type in a location..."></input>' link: (scope, elem, attrs, ctrl)-> $timeout => map = ctrl.getMap() input = (...
Remove call to deleted function
app = require 'app' ChildProcess = require 'child_process' fs = require 'fs' path = require 'path' updateDotExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe') exeName = path.basename(process.execPath) # Spawn the Update.exe with the given arguments and invoke the callback when # the command comple...
app = require 'app' ChildProcess = require 'child_process' fs = require 'fs' path = require 'path' updateDotExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe') exeName = path.basename(process.execPath) # Spawn the Update.exe with the given arguments and invoke the callback when # the command comple...
Load performance store and use options for learning guide
React = require 'react' LearningGuide = require '../flux/learning-guide' LoadableItem = require './loadable-item' Teacher = require './learning-guide/teacher' Student = require './learning-guide/student' LearningGuideStudentShell = React.createClass contextTypes: router: React.PropTypes.func render: -> ...
React = require 'react' LearningGuide = require '../flux/learning-guide' LoadableItem = require './loadable-item' TeacherComponent = require './learning-guide/teacher' StudentComponent = require './learning-guide/student' TeacherStudentComponent = require './learning-guide/teacher-student' {PerformanceStore, Performan...
Use noItemFoundText instead of noItemFoundWidget
kd = require 'kd' KDCustomHTMLView = kd.CustomHTMLView PendingInvitationsView = require './pendinginvitationsview' module.exports = class AcceptedInvitationsView extends PendingInvitationsView constructor: (options = {}, data) -> options.statusType = 'accepted' options.l...
kd = require 'kd' KDCustomHTMLView = kd.CustomHTMLView PendingInvitationsView = require './pendinginvitationsview' module.exports = class AcceptedInvitationsView extends PendingInvitationsView constructor: (options = {}, data) -> options.statusType = 'accepted' options.l...
Use simple hash as magic ZOG cookie
### Running copy of myself in background ### # Magic cookie magic = "<#{PACKAGE.version}>" find = (cmd)-> require('./zogi')[cmd] # Run background process module.exports = exports = (cmd, args...)-> return unless find cmd run.apply @, [0, argv0, "version", magic, cmd].concat args return # See whether we ar...
### Running copy of myself in background ### hash = (s)-> n = 0 i = s.length while i-- n = ~(n + (i & 0xFF ^ s.charCodeAt i)) n & 0xFFFF # Magic cookie magic = "<#{hash do argv0.load}>" find = (cmd)-> require('./zogi')[cmd] # Run background process module.exports = exports = (cmd, args...)-> retur...
Check for a volumes object.
define ['angular', 'lodash', 'timeSeries', 'volume'], (ng, _) -> imageSequence = ng.module('qiprofile.imagesequence', ['qiprofile.timeseries', 'qiprofile.volume']) imageSequence.factory 'ImageSequence', ['TimeSeries', 'Volume', (TimeSeries, Volume) -> # @param imageSequence the sc...
define ['angular', 'lodash', 'timeSeries', 'volume'], (ng, _) -> imageSequence = ng.module('qiprofile.imagesequence', ['qiprofile.timeseries', 'qiprofile.volume']) imageSequence.factory 'ImageSequence', ['TimeSeries', 'Volume', (TimeSeries, Volume) -> # @param imageSequence the sc...
Add backwards compatibility to semantic URLs for events Assume that if title_id is invalid then it is a deprecated event_id URL
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) ...
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) ...
Add unsubscribe and return promise.
kd = require 'kd' ###* * The KlientEventManager is a wrapper over Klient events (from * `client.Subscribe`) that have repeating callbacks. It serves to * provide a cleaner pubsub interface for methods of Klient * that make sense using this style. ### module.exports = class KlientEventManager extends kd.Object #...
kd = require 'kd' ###* * The KlientEventManager is a wrapper over Klient events (from * `client.Subscribe`) that have repeating callbacks. It serves to * provide a cleaner pubsub interface for methods of Klient * that make sense using this style. ### module.exports = class KlientEventManager extends kd.Object #...
Remove proxy_to_reflection middleware to test serving Force directly
_ = require 'underscore' { APP_URL, REFERRER, MEDIUM, SESSION_ID } = require('sharify').data Backbone = require 'backbone' Cookies = require '../../../../components/cookies/index.coffee' module.exports = class Form extends Backbone.Model url: "#{APP_URL}/apply/form" defaults: oid: '00DC0000000PWQJ' '00NC0...
_ = require 'underscore' { APP_URL, REFERRER, MEDIUM, SESSION_ID } = require('sharify').data Backbone = require 'backbone' Cookies = require '../../../../components/cookies/index.coffee' module.exports = class Form extends Backbone.Model url: "#{APP_URL}/apply/form" defaults: oid: '00DC0000000PWQJ' '00NC0...
Allow null for app.ValidationError prop.
goog.provide 'app.ValidationError' class app.ValidationError ###* @param {string} prop @param {string} message @constructor ### constructor: (@prop, @message) ->
goog.provide 'app.ValidationError' class app.ValidationError ###* @param {?string} prop @param {string} message @constructor ### constructor: (@prop, @message) ->
Remove useless (and missing) require
# React = require 'react' assign = require 'object-assign' excludeMethods = componentDidMount: true, componentWillUnmount: true, componentDidUpdate: true, included: true class Component extends React.Component @include = (mixin, config = {}) -> if typeof mixin == 'function' mixin = mixin config ...
# React = require 'react' excludeMethods = componentDidMount: true, componentWillUnmount: true, componentDidUpdate: true, included: true class Component extends React.Component @include = (mixin, config = {}) -> if typeof mixin == 'function' mixin = mixin config for name, _ of mixin when not ...
Fix for analytics hooks specs
# # A simple meditor specifically for providing custom analytics hooks in app code, # leaving the tracking code inside /analytics. # _ = require 'underscore' Backbone = require 'backbone' module.exports = window.analyticsHooks ?= _.extend({}, Backbone.Events)
# # A simple meditor specifically for providing custom analytics hooks in app code, # leaving the tracking code inside /analytics. # _ = require 'underscore' Backbone = require 'backbone' analyticsHooks = _.extend {}, Backbone.Events module.exports = (window?.analyticsHooks ?= analyticsHooks) or analyticsHooks
Fix tabs script to work with new AdminLTE template
show_tab = -> if location.hash.match(/^#tab-/) $(".nav-tabs a[href=##{location.hash.replace('#tab-', '')}]").tab('show') show_default_tab = -> if $('.nav-tabs').length > 0 default_hash = $('.nav-tabs .active a')[0].hash.replace('#', '') window.history.replaceState({}, '', ("#tab-" + default_hash)) sho...
show_tab = -> if location.hash.match(/^#tab-/) $(".wrapper .nav-tabs a[href=##{location.hash.replace('#tab-', '')}]").tab('show') show_default_tab = -> if $('.wrapper .nav-tabs').length > 0 default_hash = $('.wrapper .nav-tabs .active a')[0].hash.replace('#', '') window.history.replaceState({}, '', ("#...
Support for aliases that are folders of packages
path = require 'path' transformTools = require 'browserify-transform-tools' module.exports = transformTools.makeRequireTransform "aliasify", (args, opts, cb) -> aliases = opts.config?.aliases verbose = opts.config?.verbose if (args.length > 0) and aliases? and aliases[args[0]]? replacement = aliase...
path = require 'path' transformTools = require 'browserify-transform-tools' getReplacement = (file, aliases)-> if aliases[file] return aliases[file] else fileParts = /^([^\/]*)(\/.*)$/.exec(file) pkg = aliases[fileParts?[1]] if pkg? return pkg+fileParts[2] return...
Fix unknown props on MiniCourseButton
React = require 'react' MiniCourse = require '../lib/mini-course' module.exports = React.createClass displayName: 'MiniCourseButton' getDefaultProps: -> user: null project: null getInitialState: -> minicourse: null componentDidMount: -> @fetchMiniCourseFor @props.workflow componentWillR...
React = require 'react' MiniCourse = require '../lib/mini-course' module.exports = React.createClass displayName: 'MiniCourseButton' getDefaultProps: -> user: null project: null getInitialState: -> minicourse: null componentDidMount: -> @fetchMiniCourseFor @props.workflow componentWillR...