conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use proper relative paths in cache\n" }, { "from": "human", "value": "path = require 'path'\nCSON = require 'season'\nfs = require 'fs-plus'\n\nmodule.exports = (grunt) ->\n {spawn} = require('./task-helpers')(grunt)\n\n grunt.registerTask 'compile-packages-slug',...
coffeescript
chosen
[ { "from": "system", "value": "Allow click events to propagate for anchors with target=\"_blank\"\n" }, { "from": "human", "value": "#= require ./abstract_binding\n\nclass Batman.DOM.RouteBinding extends Batman.DOM.AbstractBinding\n onAnchorTag: false\n onlyObserve: Batman.BindingDefinitionOnly...
coffeescript
chosen
[ { "from": "system", "value": "Fix collection names to show up in search results\n" }, { "from": "human", "value": "\nexports.site_docs =\n index: (doc) ->\n blocks = ['site_intro','site_home']\n types = ['essay','scene','video','profile']\n \n if doc.site and doc.type and types.inde...
coffeescript
chosen
[ { "from": "system", "value": "Convert number animation to use TweenJS\n" }, { "from": "human", "value": "# Place all the behaviors and hooks related to the matching controller here.\n# All this logic will automatically be available in application.js.\n# You can use CoffeeScript in this file: htt...
coffeescript
chosen
[ { "from": "system", "value": "Add image chooser for logo\n" }, { "from": "human", "value": "class Skr.Screens.Locations extends Skr.Screens.Base\n\n dataObjects:\n location: ->\n @props.location || new Skr.Models.Location\n\n getInitialState: ->\n commands: new Lan...
coffeescript
chosen
[ { "from": "system", "value": "Hide test HTML on teardown, fix tests\n" }, { "from": "human", "value": "assert = chai.assert\n\n$ = Rye\n\nsuite 'Basic functionality', ->\n\n test 'Rye()', ->\n assert.instanceof Rye('div'), Rye, 'returns instance of Rye'\n\nsuite 'Querying', ->\n\n t...
coffeescript
chosen
[ { "from": "system", "value": "Fix js tests in client\n" }, { "from": "human", "value": "window.initClientCommunicator = ->\n local =\n showFactlink: (id) -> showUrl \"/client/facts/#{id}\"\n\n prepareNewFactlink: (displaystring, url, fact_title, current_user_opinion='no_vote') ->\n s...
coffeescript
chosen
[ { "from": "system", "value": "Remove Unpoly version from Jasmine spec runner\n" }, { "from": "human", "value": "showVersions = ->\n $('.jasmine-version').text \"\"\"\n jQuery #{$.fn.jquery}\n Unpoly #{up.version}\n Jasmine #{jasmine.version}\n \"\"\"\n\n$ ->\n # Give Jasmine time to initia...
coffeescript
chosen
[ { "from": "system", "value": "Move findContentView to page code\n\nThe way the Find Content bar was being inserted was causing it to\nappear twice.\n" }, { "from": "human", "value": "define (require) ->\n subjects = require('cs!collections/subjects')\n BaseView = require('cs!helpers/backbone/v...
coffeescript
chosen
[ { "from": "system", "value": "Handle with Process-Arguments and tidy\n" }, { "from": "human", "value": "class ParamHandler\n all: (callback) ->\n\n process = 'src/server --port 8000 --env development'\n match = process.match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g\n\n payload = {}\n\n match.m...
coffeescript
chosen
[ { "from": "system", "value": "Add MapCtrl to build markers grouped by district\n" }, { "from": "human", "value": "'use strict'\n\nangular.module('taarifaWaterpointsApp')\n .controller 'MainCtrl', ($scope, Waterpoint) ->\n $scope.waterpoints = Waterpoint.query()\n" }, { "from": "gpt",...
coffeescript
chosen
[ { "from": "system", "value": "node: Add Array::first and Array::last back\n" }, { "from": "human", "value": "_ = require 'underscore'\ntraverse = require 'traverse'\n\nKONFIG = {}\n\ntry\n module.exports = KONFIG = JSON.parse process.env.KONFIG_JSON\ncatch err\n console.error 'error: could no...
coffeescript
chosen
[ { "from": "system", "value": "Customize geojson markers based on dataset styles\n" }, { "from": "human", "value": "# Place all the behaviors and hooks related to the matching controller here.\n# All this logic will automatically be available in application.js.\n# You can use CoffeeScript in this...
coffeescript
chosen
[ { "from": "system", "value": "Add external group to worker environment mapping\n\nSigned-off-by: Sonmez Kartal <d2d15c3d37396a5f2a09f8b42cf5f27d43a3fbde@koding.com>\n" }, { "from": "human", "value": "proxies = [\n 'koding-proxy-ap-s-e-1'\n 'koding-proxy-us-east-1'\n 'koding-proxy-eu-west-1'\...
coffeescript
chosen
[ { "from": "system", "value": "Add a success message when saving a user\n" }, { "from": "human", "value": "_ = require 'underscore'\n\nView = require 'lib/view'\ntpl = require 'templates/users/edit'\nFormMixin = require 'views/base/mixins/form'\n\nmediator = require('chaplin').mediator\n\nmodule....
coffeescript
chosen
[ { "from": "system", "value": "Trim username for latest geolog\n" }, { "from": "human", "value": "debug = require('debug') 'gc:geologs'\nupsert = require '../db/upsert'\nPromise = require 'bluebird'\n\nmodule.exports = (db) ->\n upsert: (data) ->\n debug \"upsert #{data.Code?.toLowerCas...
coffeescript
chosen
[ { "from": "system", "value": "Allow for accessing data with dot-notation in simple column case as well\n" }, { "from": "human", "value": "React = require 'react'\ndeep = require 'deep-get-set'\n\nmodule.exports = React.createClass\n displayName: \"SimpleTable\"\n\n propTypes:\n columns: Rea...
coffeescript
chosen
[ { "from": "system", "value": "Switch to edit mode even with a hashtag in the URL" }, { "from": "human", "value": "# Ctrl-e switches to edit mode\n$(window).keydown (event) ->\n if event.ctrlKey && String.fromCharCode(event.keyCode) == \"E\"\n href = window.location.href.replace(/\\.html/, ''...
coffeescript
chosen
[ { "from": "system", "value": "Add css for no src image\n" }, { "from": "human", "value": "#--[ MEDIA SELECTED ]--#\n\n$(document).on \"dblclick\", \".mediaModalContainer img.selectable\", (event) ->\n event.preventDefault()\n mediaModalContainer = $(event.target).parents(\".mediaModalContainer...
coffeescript
chosen
[ { "from": "system", "value": "Update projects on oryx pro\n" }, { "from": "human", "value": "[\n {\n title: \"Spyns\"\n group: \"Development\"\n paths: [\n \"~/Development/spyns\"\n ]\n }\n {\n title: \"CSI-702: Homework02 Instructor Attempt\"\n group: \"Mason Fall 2017...
coffeescript
chosen
[ { "from": "system", "value": "Use correct interval for polling\n" }, { "from": "human", "value": "namespace 'SensuDashboard.Collections', (exports) ->\n\n class exports.Base extends Backbone.Collection\n longPolling: false\n\n intervalSeconds: 10\n\n startLongPolling: (intervalSeconds)...
coffeescript
chosen
[ { "from": "system", "value": "Add new msg posting to IndexController\n" }, { "from": "human", "value": "App.IndexController = Ember.ArrayController.extend\n needs: [\"application\"]\n currentUser: Ember.computed.alias(\"controllers.application.currentUser\")\n itemController: \"RoomUserStateI...
coffeescript
chosen
[ { "from": "system", "value": "Store ValidatableForm object on DOM element\n" }, { "from": "human", "value": "#= require comply/config\n#= require_tree .\n\n$ -> $('[data-validate-model]').each -> new Comply.ValidatableForm $(this)\n" }, { "from": "gpt", "value": "#= require comply/co...
coffeescript
chosen
[ { "from": "system", "value": "Create an anonymous session if one does not exist\n" }, { "from": "human", "value": "modalize = require '../modalize/index.coffee'\nFlashMessage = require '../flash/index.coffee'\n# We intentionally escape HTML in the template due to an XSS vulnerability.\n# Conscio...
coffeescript
chosen
[ { "from": "system", "value": "Use transitionTo instead of replaceWith on profile page\n" }, { "from": "human", "value": "`import TravisRoute from 'travis/routes/basic'`\n\nRoute = TravisRoute.extend\n redirect: ->\n # TODO: setting accounts model in ProfileRoute is wrong, but\n # at...
coffeescript
chosen
[ { "from": "system", "value": "Add $watch for Cart.current in CartCtrl\n" }, { "from": "human", "value": "Sprangular.controller \"CartCtrl\", (\n $scope,\n Cart,\n Account,\n Status,\n Angularytics,\n Env\n) ->\n\n $scope.user = Account.user\n $scope.cart = Cart.current\n $scope.status =...
coffeescript
chosen
[ { "from": "system", "value": "Revert \"intentionally failed the konacha test\"\n\nThis reverts commit 29026a7bbfb69445453e3ba7f5fb2c80c997c7f7.\n" }, { "from": "human", "value": "#= require application\n#= require frontend\n\ndescribe 'StartConversationView', ->\n it 'initial state', ->\n vi...
coffeescript
chosen
[ { "from": "system", "value": "Add plugin origin to created decorations\n" }, { "from": "human", "value": "{CompositeDisposable} = require 'event-kit'\n\nmodule.exports =\nclass MinimapSelectionView\n decorations: []\n\n constructor: (@minimap) ->\n editor = @minimap.getTextEditor()\n\n @...
coffeescript
chosen
[ { "from": "system", "value": "Set grammar data attr on link\n" }, { "from": "human", "value": "{View} = require 'atom'\n\n# View to show the grammar name in the status bar.\nmodule.exports =\nclass GrammarStatusView extends View\n @content: ->\n @div class: 'grammar-status', =>\n @a hre...
coffeescript
chosen
[ { "from": "system", "value": "Remove stale form validation messages when showing new confirmation sent message\n" }, { "from": "human", "value": "Darkswarm.controller \"SignupCtrl\", ($scope, $http, $window, $location, Redirections, AuthenticationService) ->\n $scope.path = \"/signup\"\n\n $sc...
coffeescript
chosen
[ { "from": "system", "value": "Work on RequireJS Jasmine test.\n" }, { "from": "human", "value": "describe \"RequireJS\", ->\n it \"check that the RequireJS object is present in the global namespace\", ->\n expect(true).toBe true\n" }, { "from": "gpt", "value": "describe \"Require...
coffeescript
chosen
[ { "from": "system", "value": "Enable commands only when a file pane is active\n\nIf there are no file panes open in Atom, it doesn't make sense to show the\ngithub:open and github:blame commands in the command palette. So, instead of\n_always_ making these commands available, let's make them available only ...
coffeescript
chosen
[ { "from": "system", "value": "Add tracking to logged out cta\n" }, { "from": "human", "value": "Cookies = require 'cookies-js'\n\nmodule.exports = ->\n $el = $('.lo-cta')\n\n unless Cookies.get('lo-cta')\n $el.addClass 'lo-cta--visible'\n\n $el.on 'click', '.lo-cta__close', (e) ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Use absolute path as URI\n" }, { "from": "human", "value": "path = require 'path'\narchive = require 'ls-archive'\n{File} = require 'pathwatcher'\nfs = require 'fs-plus'\nSerializable = require 'serializable'\n\nmodule.exports=\nclass ArchiveEditor extends Serializa...
coffeescript
chosen
[ { "from": "system", "value": "Fix for when an app has no displayName\n" }, { "from": "human", "value": "BaseCollection = require 'lib/base_collection'\nApplication = require 'models/application'\n\n\n\n# List of installed applications.\nmodule.exports = class ApplicationCollection extends BaseCo...
coffeescript
chosen
[ { "from": "system", "value": "Return JSON object instead of a primitive\n" }, { "from": "human", "value": "request = require 'request'\n_ = require 'lodash'\n\nclass TemperatureController\n celsius: (req, res) =>\n {city, state, country} = req.query\n location = _.compact([city, sta...
coffeescript
chosen
[ { "from": "system", "value": "CONFIG: Add refresh task end point\n" }, { "from": "human", "value": "angular.module(\"doubtfire.api.models.project\", [])\n\n.factory(\"Project\", (resourcePlus) ->\n Project = resourcePlus \"/projects/:id\", { id: \"@id\" }\n Project.tutorialEnrolment = resource...
coffeescript
chosen
[ { "from": "system", "value": "Clean up and annotate collection\n" }, { "from": "human", "value": "#\n# Collection for a group of results in a connection search\n#\n\nUserBlocks = require(\"./user_blocks.coffee\")\nsd = require(\"sharify\").data\n_ = require 'underscore'\nBlock = require(\"../mod...
coffeescript
chosen
[ { "from": "system", "value": "Add sanity-checking for load mechanism\n" }, { "from": "human", "value": "window.Save =\n save: new Bacon.Bus\n load: new Bacon.Bus\n\nGameState.state\n .sampledBy(Save.save)\n .onValue((state) -> window.localStorage['WRECK_SAVE'] = JSON.stringify(...
coffeescript
chosen
[ { "from": "system", "value": "Fix login prompt button shadows and outlines\n" }, { "from": "human", "value": "$(document).on 'ajax:error', (event, xhr, status, error) ->\n if error == 'Unauthorized'\n $.fancybox.open\n href: '#js-login-prompt'\n\n$('.js-login-confirm').click ->\n windo...
coffeescript
chosen
[ { "from": "system", "value": "Fix platform check when rendering logo\n" }, { "from": "human", "value": "React = require 'react'\n\nclass Header extends React.Component\n @displayName = 'Header'\n\n render: =>\n <div className=\"header-inner\">\n {@_renderLogo()}\n\n <ul className=...
coffeescript
chosen
[ { "from": "system", "value": "Send response instead of reply\n" }, { "from": "human", "value": "# Description:\n# Evaluate one line of Clojure script\n#\n# Dependencies:\n# None\n#\n# Configuration:\n# None\n#\n# Commands:\n# hubot clojure|clj <script> - Evaluate one line of Clojure scri...
coffeescript
chosen
[ { "from": "system", "value": "Fix ListString bug when pushing ListString elems\n" }, { "from": "human", "value": "_ = require 'lodash'\nassert = require 'assert'\n\nmodule.exports = class ListString\n string: \"\"\n\n push = (how, elems...) ->\n for elem in elems\n if _.i...
coffeescript
chosen
[ { "from": "system", "value": "Simplify the grammar settings code even further\n\nSince we're now using standard CoffeeScript object notation, the\ncode can be simplified even further to make things more modular and\nobvious.\n" }, { "from": "human", "value": "# Your init script\n#\n# Atom will e...
coffeescript
chosen
[ { "from": "system", "value": "Adjust user reloading, to ensure password is always empty\n" }, { "from": "human", "value": "Sprangular.controller 'AccountCtrl', ($scope, $location, $routeParams, Status, Account) ->\n Status.pageTitle = 'My Account'\n\n user = Account.user\n user.password = ''\...
coffeescript
chosen
[ { "from": "system", "value": "Make clearer social buttons = login, not share" }, { "from": "human", "value": "React = require 'react'\n\nmodule.exports = React.createClass\n displayName: 'YaleLogin'\n\n render:->\n return <div className=\"login-page\">\n <div className=\"hero-overl...
coffeescript
chosen
[ { "from": "system", "value": "Include type in refs and mentions for reposts\n" }, { "from": "human", "value": "Marbles.Views.PostActionRepost = class PostActionRepostView extends Marbles.Views.PostAction\n @view_name: 'post_action_repost'\n\n performAction: =>\n post = TentStatus.Models.Pos...
coffeescript
chosen
[ { "from": "system", "value": "fix(message-toolbar): Handle scenario where toolbar items rapidly removed (Sentry 2861)\n" }, { "from": "human", "value": "_ = require 'underscore'\nReact = require 'react'\nclassNames = require 'classnames'\n\n{Actions,\n WorkspaceStore,\n FocusedContentStore} = re...
coffeescript
chosen
[ { "from": "system", "value": "Send an actual flash error.\n" }, { "from": "human", "value": "uploader = new Slingshot.Upload('files')\n\nTemplate.fileList.helpers\n 'files': -> FileList.find {}, sort: LastModified: -1\n 'date': -> moment(@LastModified).fromNow()\n\nhandleFiles = (event) ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Update UserAvatar to use bem helper\n" }, { "from": "human", "value": "###\n# Copyright 2015-2017 ppy Pty. Ltd.\n#\n# This file is part of osu!web. osu!web is distributed with the hope of\n# attracting more community contributions to the core ecosystem of o...
coffeescript
chosen
[ { "from": "system", "value": "Format link to be proper Markdown link." }, { "from": "human", "value": "username_strategy =\n match: /(^|\\s)@(\\w*)$/;\n search: (name, callback)->\n search_call = $.getJSON(\"/user_lookup\",{query: name})\n search_call.done (result)->\n callback( res...
coffeescript
chosen
[ { "from": "system", "value": "Add links to zh-TW and ar help manual translations\n" }, { "from": "human", "value": "angular.module('loomioApp').factory 'UserHelpService', (CurrentUser) ->\n new class UserHelpService\n\n helpLocale: ->\n switch CurrentUser.locale\n when 'es', 'an'...
coffeescript
chosen
[ { "from": "system", "value": "Add resizing to toggled image panel" }, { "from": "human", "value": "class CMSimple.Panels.ImageLibrary extends Mercury.Panel\n @toggle: (region)->\n @instance ?= new CMSimple.Panels.ImageLibrary()\n @instance.toggle()\n\n constructor: ()->\n super(null, ...
coffeescript
chosen
[ { "from": "system", "value": "Fix weird discussion padding bug.\n" }, { "from": "human", "value": "#= require_tree ../../../templates/events\n#= require marked\n\nmarkdown = (text) ->\n marked(text || '')\n\nunderscore = (text) ->\n text.replace(/([a-z\\d])([A-Z]+)/g, '$1_$2')\n .replace(...
coffeescript
chosen
[ { "from": "system", "value": "Correct Mistake in file check" }, { "from": "human", "value": "fs = require('fs')\npath = require('path')\nSequelize = require('sequelize')\nlodash = require('lodash')\nconfig = require('../../config/config')\ndb = {}\n\nsequelize = new Sequelize config.db\n\nfs.rea...
coffeescript
chosen
[ { "from": "system", "value": "Fix the spec bootstrap to load the package file\n" }, { "from": "human", "value": "@pkgJson = require '../../package.json'\n\n# Start the crash reporter before anything else.\nrequire('crash-reporter').start(productName: @pkgJson.name, companyName: 'atom-shell-start...
coffeescript
chosen
[ { "from": "system", "value": "Fix dictionary page letters sorting problem\n" }, { "from": "human", "value": "class Controller\n constructor: ($scope, $rootScope, $location, entryService, i18nService) ->\n $rootScope.$emit 'navigationConfig',\n labelForTitle: i18nService.get 'dictionaryT...
coffeescript
chosen
[ { "from": "system", "value": "Resolve promise when shared_queries collection is reset\n" }, { "from": "human", "value": "define [\n '../core'\n './base'\n], (c, base) ->\n\n class QueryModel extends base.Model\n\n class QueryCollection extends base.Collection\n model: QueryMod...
coffeescript
chosen
[ { "from": "system", "value": "Add validation before add user to db\n\nChecking if token non empty\nAlso fix db link\n" }, { "from": "human", "value": "mongo = require 'mongoskin'\nuuid = require 'uuid'\nDB = process.env.DBPORT || 'users'\ndb = mongo.db('mongodb://localhost:27017/#{DB}', {native_...
coffeescript
chosen
[ { "from": "system", "value": "Add `recentV1TemplateIdsActivity` proxy to AnalyticRouter\n" }, { "from": "human", "value": "AuthenticationController = require './../Authentication/AuthenticationController'\nAnalyticsController = require('./AnalyticsController')\nAnalyticsProxy = require('./Analyt...
coffeescript
chosen
[ { "from": "system", "value": "Add test for whether players get an emitted event.\n" }, { "from": "human", "value": "{BattleServer} = require '../server'\n{Engine} = require '../engine'\nsinon = require 'sinon'\n\ndescribe 'BattleServer', ->\n describe '#queuePlayer', ->\n it \"adds a new pla...
coffeescript
chosen
[ { "from": "system", "value": "Fix attendance submission when clicking icon\n" }, { "from": "human", "value": "$('input.icon-check[type=\"checkbox\"]').each ->\n elm = $(this)\n icon = $('<i>', class: 'fa fa-fw clickable')\n icon.insertAfter(elm)\n change = ->\n if elm.is(':checked')\n ...
coffeescript
chosen
[ { "from": "system", "value": "Load the Facebook SDK on all pages if the app ID is set and enable xfbml\n" }, { "from": "human", "value": "# Listens for a ready event from the framework, trigger init()\n# if the application ID is configured.\n$(Sugar).bind \"ready\", ->\n @Facebook.init() if @C...
coffeescript
chosen
[ { "from": "system", "value": "Make sure callback exists before binding\n" }, { "from": "human", "value": "class Creator\n\n update: (el) =>\n model = el.getAttribute(ObserveJS.attributeName)\n if model?\n @create(el, model)\n else\n @destroy(el)\n\n create: (el) =>\n mode...
coffeescript
chosen
[ { "from": "system", "value": "Make action understand that timeout is in milliseconds\n" }, { "from": "human", "value": "import callApi from '../lib/callApi'\n\nimport {getRawData} from './getters'\n\nexport GET_DATA = 'GET_DATA'\nexport INVALIDATE_DATA = 'INVALIDATE_DATA'\nexport INVALIDATE_ALL_...
coffeescript
chosen
[ { "from": "system", "value": "[aphrodite] Add a limit to file upload\n" }, { "from": "human", "value": "$ ->\n return unless $('#new_document')\n\n $('#files_uploader').fileupload\n dataType: 'json'\n maxFileSize: 10000000\n acceptFileTypes: /(\\.|\\/)(pdf|txt|doc|docx|html)$/i\n #...
coffeescript
chosen
[ { "from": "system", "value": "Check if body is empty before submitting\n" }, { "from": "human", "value": "Template.newTaskForm.events\n 'submit #new-task, click #addTaskButton': (e) ->\n e.preventDefault()\n body = $('#new-task-text').val()\n $('#new-task-text').val(\"\")\n now = ne...
coffeescript
chosen
[ { "from": "system", "value": "Fix ruby like array convert\n" }, { "from": "human", "value": "angular.module('kassa').service('ProductService',[\n '$http'\n '$routeParams'\n ($http, $routeParams)->\n #handle price as a float, not a string\n convert = (resp)->\n products = Array(resp...
coffeescript
chosen
[ { "from": "system", "value": "Add event to add new playlist option\n" }, { "from": "human", "value": " $(\"#post_playlist_id\").select2({\n language: {\n noResults: () ->\n term = $('.select2-search__field')[0].value || Playlist\n return '<a href=\"http://google.com\">Add ...
coffeescript
chosen
[ { "from": "system", "value": "Use textContent instead of innerText\n" }, { "from": "human", "value": "window.Tahi ||= {}\n\nclass Tahi.PlaceholderElement\n constructor: (@element, options={}) ->\n @placeholder = @element.attributes['placeholder'].value\n $element = $(@element)\n $eleme...
coffeescript
chosen
[ { "from": "system", "value": "Change ridiculous WebSocketRails.Event description comments.\n" }, { "from": "human", "value": "###\nThe Event object stores all the releavant information for events\nthat are being queued for sending to the server.\n###\n\nclass WebSocketRails.Event\n\n constructo...
coffeescript
chosen
[ { "from": "system", "value": "Fix Menu Link editing error on jquery autocomplete\n" }, { "from": "human", "value": "class Georgia.Views.LinkFormContent extends Backbone.View\n template: JST['links/form_content']\n className: 'tab-pane'\n\n events:\n 'change input': 'attributeChanged'\n ...
coffeescript
chosen
[ { "from": "system", "value": "Tweak labels for filter button\n" }, { "from": "human", "value": "Darkswarm.factory \"FilterSelectorsService\", ->\n # This stores all filters so we can access in-use counts etc\n # Accessed via activeSelector Directive\n new class FilterSelectorsService\n sel...
coffeescript
chosen
[ { "from": "system", "value": "Reset sticky component before leaving the page using Turbolinks\n" }, { "from": "human", "value": "App.FoundationExtras =\n\n initialize: ->\n $(document).foundation()\n $(window).trigger \"load.zf.sticky\"\n $(window).trigger \"resize\"\n" }, { "f...
coffeescript
chosen
[ { "from": "system", "value": "Clear new message content on cancel.\n" }, { "from": "human", "value": "ETahi.MessageTaskController = ETahi.TaskController.extend\n newCommentBody: \"\"\n\n actions:\n clearMessageContent: -> null\n postComment: ->\n userId = Tahi.currentUser.id.toStrin...
coffeescript
chosen
[ { "from": "system", "value": "Use empty className for ExtendedFact\n\nBy default inherits .fact-block from the FactView\n\nSigned-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@north26.nl>\n" }, { "from": "human", "value": "#= require ./fact_view.js\n\nclass window.ExtendedFactView ext...
coffeescript
chosen
[ { "from": "system", "value": "ApplicationTabView: Increase margin value for use more free space on tab handler\n" }, { "from": "human", "value": "kd = require 'kd'\nKDTabView = kd.TabView\n\n\nmodule.exports = class ApplicationTabView extends KDTabView\n\n constructor: (options = {}, dat...
coffeescript
chosen
[ { "from": "system", "value": "Return an error if room not found\n" }, { "from": "human", "value": "Meteor.methods\n\tgetRoomIdByNameOrId: (rid) ->\n\t\tif not Meteor.userId()\n\t\t\tthrow new Meteor.Error 'error-invalid-user', 'Invalid user', { method: 'getRoomIdByNameOrId' }\n\n\t\troom = Rocke...
coffeescript
chosen
[ { "from": "system", "value": "Check for existence of hotkey label\n" }, { "from": "human", "value": "class Ribs.KeyboardHelpView extends Backbone.View\n\n className: \"ribs-keyboard-shortcuts-overlay\"\n\n events: \n 'click' : \"remove\"\n\n initialize: (options) ->\n @vie...
coffeescript
chosen
[ { "from": "system", "value": "FIX: Add missing ngModel attribute to task-def-selector\n" }, { "from": "human", "value": "angular.module('doubtfire.tasks.task-definition-selector',[])\n\n#\n# A switch that that the selection of a specified task definition\n# Only handles task definition - not tas...
coffeescript
chosen
[ { "from": "system", "value": "Set user to admin for spec\n" }, { "from": "human", "value": "describe \"Skr.Models.Customer\", ->\n\n it \"can be instantiated\", ->\n model = new Skr.Models.Customer()\n expect(model).toEqual(jasmine.any(Skr.Models.Customer))\n\n\n it \"sends f...
coffeescript
chosen
[ { "from": "system", "value": "Enable auto-indentation for literal blocks.\n" }, { "from": "human", "value": "'.text.restructuredtext':\n 'editor':\n 'commentStart': '.. '\n" }, { "from": "gpt", "value": "'.text.restructuredtext':\n 'editor':\n 'commentStart': '.. '\n 'incr...
coffeescript
chosen
[ { "from": "system", "value": "Add optional schema test for empty arrays\n" }, { "from": "human", "value": "assert = require 'assert'\njoi = require 'joi'\nschema = require '../../../coffee/helper/schema'\n\ndata =\n grupper : require '../../data/gruppe.json'\n bilder : require '../../da...
coffeescript
chosen
[ { "from": "system", "value": "Refresh a page automatically, without using turbolinks.\n" }, { "from": "human", "value": "#= require jquery\n#= require jquery_ujs\n\n#= require_self\n\nautoRefreshInterval = 3000\ntimeout = undefined\n\nscrollToBottom = ($container) ->\n if $container.length > 0\...
coffeescript
chosen
[ { "from": "system", "value": "Add a native confirm dialog\n" }, { "from": "human", "value": "BlockView = Backbone.View.extend(\n tagName: 'li'\n className: 'ui-model-blocks'\n events:\n 'click i.block-param': 'paramBlock'\n 'click i.block-remove': 'removeBlock'\n initialize: (options) ...
coffeescript
chosen
[ { "from": "system", "value": "FIX: Remove auth tokens from task completion url\n" }, { "from": "human", "value": "angular.module(\"doubtfire.api.models.task-completion-csv\", [])\n\n.service(\"TaskCompletionCsv\", (DoubtfireConstants, $window, currentUser, fileDownloaderService) ->\n this.downl...
coffeescript
chosen
[ { "from": "system", "value": "Add Authentication via API key\n" }, { "from": "human", "value": "Organization = require \"../../models/organization\"\n\n# Need to support authentication via Organization API key as well\n\nmodule.exports = (req, res, next) ->\n if req.session.org_id\n Organiza...
coffeescript
chosen
[ { "from": "system", "value": "FIX bug in coffeescript code when no preloader\n" }, { "from": "human", "value": "PlayScene =\n preload: ->\n\n create: ->\n\n update: ->\n\ngame = new Phaser.Game 640, 480, Phaser.AUTO, 'game'\ngame.state.add 'play', PlayScene\ngame.state.start.play\n" }, { ...
coffeescript
chosen
[ { "from": "system", "value": "Hide tabs unless current user\n" }, { "from": "human", "value": "window.ReactUserTabs = React.createBackboneClass\n render: ->\n spaced_middle_dot = \" \\u00b7 \"\n\n _div ['main-region-tabs'],\n _a [\n 'active' if @props.page == 'about'\n ...
coffeescript
chosen
[ { "from": "system", "value": "Remove hover class when leaving the drop zone.\n" }, { "from": "human", "value": "ignoreEvent = (event) ->\n event.stopPropagation()\n event.preventDefault()\n\nclass @JackUp.DragAndDrop\n constructor: (@droppableElement, @processor) ->\n @droppableElement\n ...
coffeescript
chosen
[ { "from": "system", "value": "Revert the slow fade :)\n" }, { "from": "human", "value": "Backbone.Factlink ||= {}\n\nclass Backbone.Factlink.CrossFadeRegion extends Backbone.Marionette.Region\n\n defaultFadeTime = 560\n\n initialize: -> @on 'close', -> @$el?.stop()\n\n crossFade: (newView) ->...
coffeescript
chosen
[ { "from": "system", "value": "Make editable and track changes\n" }, { "from": "human", "value": "define (require) ->\n $ = require('jquery')\n Mathjax = require('mathjax')\n BaseView = require('cs!helpers/backbone/views/base')\n template = require('hbs!./body-template')\n require('less!./bo...
coffeescript
chosen
[ { "from": "system", "value": "Fix fetching replies for conversation view\n" }, { "from": "human", "value": "TentStatus.Models.StatusPost = class StatusPostModel extends TentStatus.Models.Post\n @model_name: 'status_post'\n @post_type: new TentClient.PostType(TentStatus.config.POST_TYPES.STATUS...
coffeescript
chosen
[ { "from": "system", "value": "Fix one thing with s3\n" }, { "from": "human", "value": "AWS = Meteor.require 'aws-sdk'\n\nAWS.config.update\n 'accessKeyId' : \"AKIAJ4QROL3BSAMJTI7Q\",\n 'secretAccessKey' : \"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\",\n 'region' : \"us-west-2\"\ns...
coffeescript
chosen
[ { "from": "system", "value": "Use ExerciseCard component with all content shown\n" }, { "from": "human", "value": "_ = require 'underscore'\nReact = require 'react'\n\n{ExerciseCardMixin} = require '../task-plan/homework/exercises'\n{ExerciseStore} = require '../../flux/exercise'\nString = requi...
coffeescript
chosen
[ { "from": "system", "value": "Delete redirection on Trello authenticated\n" }, { "from": "human", "value": "angular.module 'NotSoShitty.login'\n.config ($stateProvider) ->\n $stateProvider\n .state 'trello-login',\n url: '/login/trello'\n controller: 'TrelloLoginCtrl'\n templateUrl: '...
coffeescript
chosen
[ { "from": "system", "value": "Move css setup to window.coffee\n" }, { "from": "human", "value": "require 'coffee-react/register'\nrequire \"#{ROOT}/views/env\"\n\n\n# i18n\n{join} = require 'path-extra'\nwindow.i18n = {}\n\nwindow.i18n.main = new(require 'i18n-2')\n locales: ['en-US', 'ja-JP', ...
coffeescript
chosen
[ { "from": "system", "value": "Update time zone on user when it changes\n" }, { "from": "human", "value": "angular.module('loomioApp').factory 'Session', ($rootScope, $translate, $window, Records, AppConfig) ->\n\n login: (data) ->\n Records.import(data)\n\n if @visitor()\n defaultPar...
coffeescript
chosen
[ { "from": "system", "value": "Use preventDefault instead of returning false (less implicit)\n" }, { "from": "human", "value": "popupCenter = (url, width, height, name) ->\n left = (screen.width/2)-(width/2)\n top = (screen.height/2)-(height/2)\n window.open(url, name, \"menubar=no,toolbar=no,...
coffeescript
chosen
[ { "from": "system", "value": "Fix profile graph x-axis scaling\n" }, { "from": "human", "value": "jQuery ->\n percentageFormatter = (x) -> x * 100.0 + \"%\"\n\n $('.tournament.plot').each (i, element) ->\n element_id = $(element).attr('id')\n data = $.parseJSON($(element).attr('data-rati...
coffeescript
chosen