commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
fa4e78a1629007f7972c9c9a0034e7df5c674b21
full/amd/app/js/app/collections/notes.js
full/amd/app/js/app/collections/notes.js
define([ "underscore", "backbone", "app/config", "app/models/note", "backbone.localStorage" // Patches Backbone. ], function (_, Backbone, config, NoteModel) { "use strict"; // Notes Collection // ---------------- var NotesCollection; // Decide whether to use localStorage or REST. if (window._US...
define([ "underscore", "backbone", "app/config", "app/models/note", "backbone.localStorage" // Patches Backbone. ], function (_, Backbone, config, NoteModel) { "use strict"; // Notes Collection // ---------------- var NotesCollection; // Decide whether to use localStorage or REST. if (window._US...
Fix missing model on model.
Fix missing model on model.
JavaScript
mit
FormidableLabs/notes
7e243e497d920b78d43c823f5df6290c624d606b
src/js/lib/smooth-scroll.js
src/js/lib/smooth-scroll.js
/** * Initialize smooth-scroll plugin. */ var jQuery = require('jquery') , config = { easing: 'swing' }; require('jquery-smooth-scroll'); if (jQuery.fn.smoothScroll) jQuery('a[href^="#"]').smoothScroll(config);
/** * Initialize smooth-scroll plugin. */ var jQuery = require('jquery') , config = { easing: 'swing', preventDefault: false }; require('jquery-smooth-scroll'); if (jQuery.fn.smoothScroll) jQuery('a[href^="#"]').smoothScroll(config);
Make smooth scroll update hash.
Make smooth scroll update hash.
JavaScript
mit
TallerWebSolutions/site-taller,TallerWebSolutions/tallerwebsolutions.github.io,TallerWebSolutions/tallerwebsolutions.github.io,TallerWebSolutions/site-taller,TallerWebSolutions/tallerwebsolutions.github.io
e199d698f5509b4081a5dcdf7260478ece259fb9
src/mobile/js/services/geolocation.js
src/mobile/js/services/geolocation.js
'use strict'; var GeolocationService = function ($rootScope, DeviceReadyService, $q) { return { getCurrentPosition: function(onSuccess, onError, options) { return DeviceReadyService.ready.then(function () { var deferred; deferred = $q.defer(); nav...
'use strict'; var GeolocationService = function ($rootScope, DeviceReadyService, $q) { return { getCurrentPosition: function(onSuccess, onError, options) { return DeviceReadyService.ready.then(function () { var deferred; deferred = $q.defer(); nav...
Fix geo location on mobile
Fix geo location on mobile
JavaScript
mit
Leerstandsmelder/leerstandsmelder-angular-frontend,Leerstandsmelder/leerstandsmelder-angular-frontend
487d82725b2c98e24b21a6c42862e64ace933f8c
demo/browser.js
demo/browser.js
'use strict'; const ipc = require('ipc'); ipc.on('shortcut-pressed', shortcut => { document.querySelector('#shortcut-title').textContent = shortcut; }); ipc.on('shortcut-status', status => { document.querySelector('#shortcut-status').textContent = status; });
'use strict'; const {ipcRenderer} = require('electron'); ipcRenderer.on('shortcut-pressed', (e, shortcut) => { document.querySelector('#shortcut-title').textContent = shortcut; }); ipcRenderer.on('shortcut-status', (e, status) => { document.querySelector('#shortcut-status').textContent = status; });
Update source as following update Electron
Update source as following update Electron
JavaScript
mit
ragingwind/electron-shortcut,ragingwind/electron-shortcut
1b1ce98dad6f9921d399b99bd13d109943c5d828
routes/auth/index.js
routes/auth/index.js
"use strict"; var db = require('../../models'); var config = require('../../config'); var authHelper = require('../../lib/auth-helper'); module.exports = function(app) { var logger = app.get('logger'); app.get('/logout', function(req, res) { req.logout(); res.redirect('/'); }); app.get('/protected',...
"use strict"; var db = require('../../models'); var config = require('../../config'); var authHelper = require('../../lib/auth-helper'); module.exports = function(app) { var logger = app.get('logger'); app.get('/logout', function(req, res) { req.logout(); res.redirect('/'); }); app.get('/protected',...
Use config to load available id providers
Use config to load available id providers
JavaScript
bsd-3-clause
ebu/cpa-auth-provider
79f6de279bdb4bb73420419a7d43acf0e775fbc3
src/scripts/app/objects/LinkButton.js
src/scripts/app/objects/LinkButton.js
class LinkButton extends Phaser.Button { constructor (game, x, key, url = null) { super(game, x, 47, 'graphics', this._openPopup, this); this.setFrames(`button-link-${key}-over`, `button-link-${key}-out`); this.anchor.set(0.5, 0); this.input.useHandCursor = true; this.url = url; } // -----...
class LinkButton extends Phaser.Button { constructor (game, x, key, url = null) { super(game, x, 47, 'graphics', () => this._openPopup()); this.setFrames(`button-link-${key}-over`, `button-link-${key}-out`); this.anchor.set(0.5, 0); this.input.useHandCursor = true; this.url = url; } // ---...
Fix illegal use of this before super()
Fix illegal use of this before super()
JavaScript
mit
rblopes/heart-star,rblopes/heart-star
2ff980dedebd51e0a8f966f25012cf03563ec8b4
guacamole/src/main/webapp/app/index/filters/arrayFilter.js
guacamole/src/main/webapp/app/index/filters/arrayFilter.js
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
Remove debug console.log() from toArrayFilter().
GUACAMOLE-526: Remove debug console.log() from toArrayFilter().
JavaScript
apache-2.0
glyptodon/guacamole-client,necouchman/incubator-guacamole-client,jmuehlner/incubator-guacamole-client,glyptodon/guacamole-client,jmuehlner/incubator-guacamole-client,mike-jumper/incubator-guacamole-client,necouchman/incubator-guacamole-client,necouchman/incubator-guacamole-client,glyptodon/guacamole-client,necouchman/i...
25abf94c803ac5d1f56261a652e8ffa4a3845aea
src/windshaft/filters/bounding_box.js
src/windshaft/filters/bounding_box.js
cdb.windshaft.filters.BoundingBoxFilter = cdb.core.Model.extend({ initialize: function(bounds) { this.setBounds(bounds); }, setBounds: function(bounds) { this.southLatitude = bounds[0][1]; this.westLatitude = bounds[0][0]; this.eastLatitude = bounds[1][1]; this.northLatitude = bounds[1][0]; ...
cdb.windshaft.filters.BoundingBoxFilter = cdb.core.Model.extend({ initialize: function(bounds) { this.setBounds(bounds); }, setBounds: function(bounds) { this.set({ westLatitude: bounds[0][0], southLatitude: bounds[0][1], northLatitude: bounds[1][0], eastLatitude: bounds[1][1] ...
Use model attributes instead of instance variables
Use model attributes instead of instance variables
JavaScript
bsd-3-clause
splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js
00308c73282f6e88998a5c0517713e9e200342cb
tasks/minify-css.js
tasks/minify-css.js
'use strict'; var gulp = require('gulp'); var paths = require('./_paths'); var minifyCss = require('gulp-minify-css'); var rename = require('gulp-rename'); gulp.task('minify-css', ['sass'], function() { return gulp .src(paths.dest + 'stylesheets/**/*.css') .pipe(minifyCss()) .pipe(rename({ suffix: '.min...
'use strict'; var gulp = require('gulp'); var paths = require('./_paths'); var minifyCss = require('gulp-minify-css'); var rename = require('gulp-rename'); gulp.task('minify-css', ['sass'], function() { return gulp .src(paths.dest + 'stylesheets/**/*.css') .pipe(minifyCss({ noAdvanced: true })) .pipe(re...
Disable advanced optimisations when minifying CSS
TASKS: Disable advanced optimisations when minifying CSS
JavaScript
mit
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
f2879aa3cfce9e1c6acf9359cbf2cabc23ded935
src/components/Grid/Grid.js
src/components/Grid/Grid.js
import React from 'react'; import SquareRow from './SquareRow'; import './Grid.css'; const Grid = ({ size, }) => { const [height, width] = size.split('x').map(el => Number(el)); if (isNaN(height) || isNaN(width)) { return null; } if (height * width > 10_000) ...
import React from 'react'; import SquareRow from './SquareRow'; import './Grid.css'; const Grid = ({ size, }) => { const [height, width] = size.split('x').map(el => Number(el)); if (isNaN(height) || isNaN(width)) { return null; } if (height <= 0 || width <= 0...
Check if grid dimensions are positive
Check if grid dimensions are positive
JavaScript
mit
HichamBenjelloun/react-examples,HichamBenjelloun/react-examples
a04ee63bd2c87150bd6a09ff319eb25dc1fa0e21
src/components/TextInput.js
src/components/TextInput.js
import React from 'react'; import PropTypes from 'prop-types'; import Control from './Control'; class TextInput extends Control { static propTypes = { className: PropTypes.string, id: PropTypes.string, name: PropTypes.string.isRequired, placeholder: PropTypes.string, style: PropTypes.string, ...
import React from 'react'; import PropTypes from 'prop-types'; import {updateValue} from '../actions/controls'; import {connect} from '../store'; const TextInput = ({placeholder, id, type='text', name, className, style, value='', updateValue}) => <input placeholder={placeholder} id={id} className={class...
Simplify text input to functional component and to use connect
Simplify text input to functional component and to use connect
JavaScript
mit
darrikonn/react-chloroform,darrikonn/react-chloroform,darrikonn/react-chloroform
4eb2f295f668e5a13da8384f9518cc5056a1df46
src/publishers/snapcraft.js
src/publishers/snapcraft.js
import fs from 'fs-extra'; import path from 'path'; import Snapcraft from 'electron-installer-snap/snapcraft'; import asyncOra from '../util/ora-handler'; /** * `forgeConfig.snapStore`: * * `release`: comma-separated list of channels to release to */ export default async ({ dir, artifacts, forgeConfig }) => { co...
import fs from 'fs-extra'; import path from 'path'; import Snapcraft from 'electron-installer-snap/snapcraft'; import asyncOra from '../util/ora-handler'; /** * `forgeConfig.snapStore`: * * `release`: comma-separated list of channels to release to */ export default async ({ dir, artifacts, forgeConfig }) => { co...
Update copy based on PR feedback
Update copy based on PR feedback
JavaScript
mit
electron-userland/electron-forge,electron-userland/electron-forge,electron-userland/electron-forge,electron-userland/electron-forge
03e38b2468a8f34e639db5a31e2762ad292ac037
resources/public/javascripts/application.js
resources/public/javascripts/application.js
$(document).ready(function() { var matrixSettings = { id : $('#matrix-id').text(), decay : 60000 }; $('h1, p, li, form input, table').hide(0, function() { $('h1').fadeIn(1000); $('p, li, form input, table').fadeIn(1500); }); if ($('#matrix-id').length > 0) { var socket = new WebSo...
$(document).ready(function () { 'use strict'; var matrixSettings, socket; matrixSettings = { id : $('#matrix-id').text(), decay : 60000 }; $('h1, p, li, form input, table').hide(0, function () { $('h1').fadeIn(1000); $('p, li, form input, table').fadeIn(1500); }); if ($(...
Replace matrix rows when stream too tall.
Replace matrix rows when stream too tall. Clean JS very much so.
JavaScript
mit
tiredpixel/mtrx9
0f41687acd0f3f7ca48bb3c6d114ca8134c10345
src/www/js/app/ui/pageviews/EmployeesView.js
src/www/js/app/ui/pageviews/EmployeesView.js
define(function(require) { var BasePageView = require('./BasePageView'), TimeSelectorView = require('app/ui/views/TimeSelectorView'), BarChartView = require('app/ui/views/BarChartView'), revenueByEmployeeCollection = require('app/models/RevenueByEmployeeCollection'), SmallRevenueByCategoryVie...
define(function(require) { var BasePageView = require('./BasePageView'), TimeSelectorView = require('app/ui/views/TimeSelectorView'), BarChartView = require('app/ui/views/BarChartView'), revenueByCategoryCollection = require('app/models/RevenueByCategoryCollection'), SmallRevenueByCategoryVie...
Fix data source for employees page
Fix data source for employees page
JavaScript
mit
mutualmobile/clover-reporting
0c7998f6e1a216f470822404f693be12e5533189
public/app/js/global-requires.js
public/app/js/global-requires.js
const $ = jQuery = require("jquery") const localforage = require("localforage") const moment = require("moment") const path = require("path") const Audiosearch = require("audiosearch-client-node") const audiosearch = new Audiosearch( process.env.CBUS_AUDIOSEARCH_APPLICATION_ID, process.env.CBUS_AUDIOSEARCH...
const $ = jQuery = require("jquery") const localforage = require("localforage") const moment = require("moment") const path = require("path") const Audiosearch = require("audiosearch-client-node") const audiosearch = new Audiosearch( require("../../audiosearch_config.json").application_id, require("../../a...
Switch back to getting AS creds from file
Switch back to getting AS creds from file
JavaScript
apache-2.0
z-------------/cumulonimbus,z-------------/cumulonimbus,z-------------/cumulonimbus
2e4586a4806c2046435196245baa506dcc70aeae
server/api/entries/dal/getLatestComplete.js
server/api/entries/dal/getLatestComplete.js
const getManyComplete = require('./getManyComplete'); module.exports = (range, callback) => { // Get latest entries with their attachments and urls completed. // // Parameters: // range // skip // limit // callback // function (err, entries) // return getManyComplete({ deleted: ...
const getManyComplete = require('./getManyComplete'); module.exports = (range, callback) => { // Get latest entries with their attachments and urls completed. // // Parameters: // range // skip // limit // callback // function (err, entries) // return getManyComplete({ deleted: ...
Sort latest entries by activeAt
Sort latest entries by activeAt
JavaScript
mit
axelpale/tresdb,axelpale/tresdb
2085e55286d0c890e737e6f0fdc3fb84826e421f
src/entities/SelectInput.js
src/entities/SelectInput.js
import { Component } from 'substance' export default class SelectInput extends Component { render($$) { const label = this.props.label const value = this.props.value const options = this.props.availableOptions const el = $$('div').addClass('sc-select-input') const selectEl = $$('select').addClass...
import { Component } from 'substance' export default class SelectInput extends Component { render($$) { const label = this.props.label const value = this.props.value const options = this.props.availableOptions const el = $$('div').addClass('sc-select-input') const selectEl = $$('select').addClass...
Use a new updating strategy.
Use a new updating strategy.
JavaScript
mit
substance/texture,substance/texture
f640a59b35dbd3a39136dece908ad9b8015d1fca
server/socket.js
server/socket.js
module.exports = { setUpListeners: function(socket) { socket.on('get:subscriptions', function() { socket.emit('got:subscriptions', ['OWSLA', 'Dirtybird']); }); } };
module.exports = { setUpListeners: setUpListeners }; function setUpListeners(socket) { socket.on('get:subscriptions', function() { socket.emit('got:subscriptions', ['OWSLA', 'Dirtybird']); }); }
Move function out of module.exports to leave space
Move function out of module.exports to leave space
JavaScript
mit
cobalamin/dripdownode
60040d16fcdde2eb13529362c587ff06ca5eb04a
templates/CRM/Fastactionlinks/Page/FastActionLink.js
templates/CRM/Fastactionlinks/Page/FastActionLink.js
CRM.$(function ($) { displayActionEntity(); $('#action_type').change(function () { displayActionEntity(); }); }); /** * Set up the display of the action_entity_id field. * Hide if this action doesn't use it; if it does, set the label correctly, * * @returns {undefined} */ function displayActionEntity()...
CRM.$(function ($) { displayActionEntity(); $('#action_type').change(function () { CRM.$('#action_entity_id').val(""); displayActionEntity(); }); }); /** * Set up the display of the action_entity_id field. * Hide if this action doesn't use it; if it does, set the label correctly, * * @returns {undef...
Fix display of the action when loaded a saved FAL
Fix display of the action when loaded a saved FAL
JavaScript
agpl-3.0
PalanteJon/org.takethestreets.fastactionlinks,PalanteJon/org.takethestreets.fastactionlinks
7f87d63d7deb4069c29d5ee0962311a3d12bb61f
packages/email/messenger.js
packages/email/messenger.js
const log = require('@cardstack/logger')('cardstack/email'); const nodemailer = require('nodemailer'); module.exports = class EmailMessenger { static create(params) { return new this(params); } constructor(params) { this.params = params; ['smtpPasswordEnvVar', 'smtpHost', 'smtpUser', 'defaultFrom'].f...
const log = require('@cardstack/logger')('cardstack/email'); const nodemailer = require('nodemailer'); module.exports = class EmailMessenger { static create(params) { return new this(params); } constructor(params) { this.params = params; if(params.useSes) { // If SES is required, you must add ...
Allow email sink to use SES configured automatically from env vars
Allow email sink to use SES configured automatically from env vars
JavaScript
mit
cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack
feae07fbaddd87d04ee5e4c9f5921af1b3a6f6f5
controllers/contact.js
controllers/contact.js
const nodemailer = require('nodemailer'); const transporter = nodemailer.createTransport({ service: 'SendGrid', auth: { user: process.env.SENDGRID_USER, pass: process.env.SENDGRID_PASSWORD } }); /** * GET /contact * Contact form page. */ exports.getContact = (req, res) => { res.render('contact', { ...
const nodemailer = require('nodemailer'); const Contact = require('../models/Contact'); const transporter = nodemailer.createTransport({ service: 'SendGrid', auth: { user: process.env.SENDGRID_USER, pass: process.env.SENDGRID_PASSWORD } }); /** * GET /contact * Contact form page. */ exports.getContact...
Update on the mission page in controller folder
Update on the mission page in controller folder
JavaScript
mit
vuyaniShabangu/now.next,vuyaniShabangu/now.next,vuyaniShabangu/now.next,vuyaniShabangu/now.next
fc2ac5214666a49af129be94b6cad7e188fe2a2c
test/update-license-test.js
test/update-license-test.js
var fs = require('fs'); var expect = require('chai').expect; var updateLicense = require('../lib/update-license'); describe("update-license", function() { it("updates 2015 to 2015-2016", function() { var yearInfo = 'Copyright (c) 2015 Sung Won Cho'; var result = updateLicense(yearInfo); expect(result).t...
var fs = require('fs'); var expect = require('chai').expect; var updateLicense = require('../lib/update-license'); describe("update-license", function() { it("updates 2015 to 2015-2016", function(done) { var yearInfo = 'Copyright (c) 2015 Sung Won Cho'; var result = updateLicense(yearInfo, function (err, up...
Fix test using new asynchronous API
Fix test using new asynchronous API
JavaScript
mit
sungwoncho/license-up
2475ba98fe9a87d003f502525b92c04de7aa930b
tests/e2e/pages/taxonomy.js
tests/e2e/pages/taxonomy.js
/*global browser:false, element:false, by:false */ 'use strict'; var Synonyms = require('./synonyms'); var Taxonomy = function(id){ this.id = id; }; Taxonomy.prototype.getSynonyms = function(conceptName) { var synonyms = new Synonyms(this.id, conceptName); return synonyms; }; Taxonomy.prototype.get = fu...
/*global browser:false, element:false, by:false */ 'use strict'; var Synonyms = require('./synonyms'); var Taxonomy = function(id){ this.id = id; }; Taxonomy.prototype.getSynonyms = function(conceptName) { var synonyms = new Synonyms(this.id, conceptName); return synonyms; }; Taxonomy.prototype.get = fu...
Remove useless promise in test suite
Remove useless promise in test suite
JavaScript
apache-2.0
28msec/nolap-report-editor
f624ee9079034aafac24db43ce64867b33159d4f
app/assets/javascripts/application/add_toggle_link.js
app/assets/javascripts/application/add_toggle_link.js
(function($) { var _addToggleLink = function(contentSelector) { var section = $(this); var content = $(contentSelector, section); content.hide(); var toggleLink = $.a("show", {"class": "toggle", href: "#"}); $("h1", section).append(toggleLink); toggleLink.click(function() { var currentL...
(function($) { var _addToggleLink = function(contentSelector) { var section = $(this); var content = $(contentSelector, section); content.hide(); var toggleLink = $.a("show", {"class": "toggle", href: "#"}); $("h1", section).append(toggleLink); toggleLink.click(function() { var currentL...
Stop jumping to the top of the page.
Stop jumping to the top of the page.
JavaScript
mit
alphagov/whitehall,ggoral/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,robinwhittleton/whitehall,alphagov/whitehall,ggoral/whitehall,askl56/whitehall,ggoral/whitehall,alphagov/whitehall,hotvulcan/whitehall,askl56/whitehall,hotvulcan/whitehall,askl56/whitehall,hotvulcan/whitehall,robinwhittleton...
17f6777d4244257ce6920ac5f8ad2c915d3ebe7f
code-generator-utils.js
code-generator-utils.js
define(function (require, exports, module) { 'use strict'; function CodeWriter(indentString) { this.lines = []; this.indentString = (indentString ? indentString : ' '); this.indentations = []; } CodeWriter.prototype.indent = function () { this.indentations.push(this.indentString); }; Cod...
define(function (require, exports, module) { 'use strict'; function CodeWriter(indentString) { this.lines = []; this.indentString = (indentString ? indentString : ' '); this.indentations = []; } CodeWriter.prototype.indent = function () { this.indentations.push(this.indentString); }; Cod...
Add function to change string to upper camel case
Add function to change string to upper camel case
JavaScript
mit
meisyal/staruml-ruby
97e6641ed84863c30a40b0434472afc00b8365f1
localization/jquery-ui-timepicker-tr.js
localization/jquery-ui-timepicker-tr.js
/* Turkish translation for the jQuery Timepicker Addon */ /* Written by Fehmi Can Saglam */ (function($) { $.timepicker.regional['tr'] = { timeOnlyTitle: 'Zaman Seçiniz', timeText: 'Zaman', hourText: 'Saat', minuteText: 'Dakika', secondText: 'Saniye', millisecText: 'Milisaniyelik', timezoneText: 'Zaman D...
/* Turkish translation for the jQuery Timepicker Addon */ /* Written by Fehmi Can Saglam, Edited by Goktug Ozturk */ (function($) { $.timepicker.regional['tr'] = { timeOnlyTitle: 'Zaman Seçiniz', timeText: 'Zaman', hourText: 'Saat', minuteText: 'Dakika', secondText: 'Saniye', millisecText: 'Milisaniye', ...
Update Turkish translation by Goktug Ozturk
Update Turkish translation by Goktug Ozturk
JavaScript
mit
ssyang0102/jQuery-Timepicker-Addon,nicofrand/jQuery-Timepicker-Addon,Youraiseme/jQuery-Timepicker-Addon,brenosilver/jQuery-Timepicker-Addon,nicofrand/jQuery-Timepicker-Addon,ristovskiv/jQuery-Timepicker-Addon,gaissa/jQuery-Timepicker-Addon,ssyang0102/jQuery-Timepicker-Addon,pyonnuka/jQuery-Timepicker-Addon,trentrichard...
77845e0af7b892ca3c7ca2eb5aa0bfb72bebb754
components/link/Link.js
components/link/Link.js
import React, { Fragment, PureComponent } from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import theme from './theme.css'; class Link extends PureComponent { render() { const { children, className, icon, iconPlacement, element, inherit, ...others } = this.props; const classNam...
import React, { Fragment, PureComponent } from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import theme from './theme.css'; class Link extends PureComponent { render() { const { children, className, icon, iconPlacement, element, inherit, ...others } = this.props; const classNam...
Add string as a possible prop type
Add string as a possible prop type
JavaScript
mit
teamleadercrm/teamleader-ui
f7ea4e7780a487412608f5f10a5eb6a124185303
client/views/foundbill.js
client/views/foundbill.js
Template.foundbill.created = function(){ Meteor.subscribe("allbills"); Session.set('message', ''); }; Template.foundbill.events({ "submit form": function(e){ e.preventDefault(); var serial = e.target.serialnumber.value; serial = serial.toLowerCase(); var zip = e.target.zip.value; var h...
Template.foundbill.created = function(){ Meteor.subscribe("allbills"); Session.set('message', ''); }; Template.foundbill.events({ "submit form": function(e){ e.preventDefault(); var serial = e.target.serialnumber.value; //serial = serial.toLowerCase(); var zip = e.target.zip.value; var...
Change location of lower case conversion to fix issue.
Change location of lower case conversion to fix issue.
JavaScript
mit
celsom3/undocumoney,celsom3/undocumoney
4fff518174f6ec295099aa9f8d6fab7bcd90fad6
scripts/helpers/latestversion.js
scripts/helpers/latestversion.js
'use strict' const semver = require('semver') exports.stable = (versions) => { const matched = versions.find((version) => typeof version.lts === 'undefined').version return semver.gte(matched, '5.0.0') ? matched : undefined } exports.lts = (versions) => versions.find((version) => typeof version.lts !== 'undefine...
'use strict' const semver = require('semver') exports.stable = (releases) => { const match = releases.find((release) => !release.lts && semver.gte(release.version, '5.0.0')) return match && match.version } exports.lts = (releases) => releases.find((release) => release.lts).version
Fix bug calling v5 LTS.
Fix bug calling v5 LTS. Closes #298
JavaScript
mit
nodejs/new.nodejs.org,nodejs/new.nodejs.org,phillipj/new.nodejs.org,abdelrahmansaeedhassan/yuri,phillipj/new.nodejs.org,boneskull/new.nodejs.org,matthewloring/new.nodejs.org,strawbrary/nodejs.org,marocchino/new.nodejs.org,strawbrary/nodejs.org,wonderdogone/new.nodejs.org,matthewloring/new.nodejs.org,rnsloan/new.nodejs....
94219e4c2d5bcf75bf02409f551f1946237408e1
angular-typescript-webpack-jasmine/webpack/loaders.js
angular-typescript-webpack-jasmine/webpack/loaders.js
module.exports = [ { test: /\.ts(x?)$/, loader: 'ts-loader' }, { test: /\.css$/, loader: 'style-loader!css-loader' }, { test: /\.scss$/, loader: 'style-loader!css-loader!sass-loader' }, { test: /\.html$/, exclude: /node_modules/, lo...
module.exports = [ { test: /\.ts(x?)$/, loader: "ts-loader" }, { test: /\.css$/, loader: "style-loader!css-loader" }, { test: /\.scss$/, loader: "style-loader!css-loader!sass-loader" }, { test: /\.html$/, exclude: /node_modules/, lo...
Replace single quotes -> double quotes
Refactoring: Replace single quotes -> double quotes
JavaScript
mit
var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training
aa9591697d69da2d2b7d96ed3d5a517b2aa43681
src/router/index.js
src/router/index.js
import Vue from 'vue'; import Router from 'vue-router'; import Home from '@/pages/Home'; import Blog from '@/pages/Blog'; import Page from '@/pages/Page'; Vue.use(Router); export default new Router({ routes: [ { path: '/', name: 'Home', component: Home, }, { path: '/blog', ...
import Vue from 'vue'; import Router from 'vue-router'; import Home from '@/pages/Home'; import Blog from '@/pages/Blog'; import Page from '@/pages/Page'; Vue.use(Router); export default new Router({ mode: 'history', routes: [ { path: '/', name: 'Home', component: Home, }, { pa...
Change router mode to 'history'
Change router mode to 'history'
JavaScript
mit
zorexsalvo/zorexsalvo.github.io,zorexsalvo/zorexsalvo.github.io
55aa0d51f54cee993b955a6636992b562436f998
src/server/index.js
src/server/index.js
require('babel-register'); const serverConfig = require('./config'); const WebpackIsomorphicTools = require('webpack-isomorphic-tools'); const webpackIsomorphicAssets = require('../../webpack/assets'); const rootDir = require('path').resolve(__dirname, '..', '..'); // if (!process.env.NODE_ENV) // throw new Error('...
require('babel-register'); const serverConfig = require('./config'); const WebpackIsomorphicTools = require('webpack-isomorphic-tools'); const webpackIsomorphicAssets = require('../../webpack/assets'); const rootDir = require('path').resolve(__dirname, '..', '..'); if (!process.env.NODE_ENV) throw new Error( 'E...
Put server process.env.NODE_ENV check back
Put server process.env.NODE_ENV check back When you deploy app to Heroku, and you forget to set NODE_ENV environment variable, this will warn you. Of course you have to set to production on Heroku.
JavaScript
mit
aindre/este-example,steida/este,TheoMer/este,christophediprima/este,GarrettSmith/schizophrenia,abelaska/este,AugustinLF/este,GarrettSmith/schizophrenia,syroegkin/mikora.eu,skallet/este,sikhote/davidsinclair,amrsekilly/updatedEste,SidhNor/este-cordova-starter-kit,skyuplam/debt_mgmt,sikhote/davidsinclair,estaub/my-este,T...
dec4bea43dca93d4576da886868a19660d94bfe0
udata/migrations/2019-07-23-reversed-date-range.js
udata/migrations/2019-07-23-reversed-date-range.js
/** * Swap reversed DateRange values */ var updated = 0; // Match all Dataset having temporal_coverage.start > temporal_coverage.end const pipeline = [ {$project: { cmp: {$cmp: ['$temporal_coverage.start', '$temporal_coverage.end']}, obj: '$$ROOT' }}, {$match: {cmp: {$gt: 0}}}, {$rep...
/** * Swap reversed DateRange values */ var updated = 0; // Match all Dataset having temporal_coverage.start > temporal_coverage.end const pipeline = [ {$project: { cmp: {$cmp: ['$temporal_coverage.start', '$temporal_coverage.end']}, dataset: '$$ROOT' }}, {$match: {cmp: {$gt: 0}}} ]; d...
Fix reverse date range migration for Mongo 3.2
Fix reverse date range migration for Mongo 3.2
JavaScript
agpl-3.0
opendatateam/udata,etalab/udata,etalab/udata,opendatateam/udata,etalab/udata,opendatateam/udata
671db82648087c16decc7cb021f9095414cf9cb0
web_context_tunnel/static/src/js/context_tunnel.js
web_context_tunnel/static/src/js/context_tunnel.js
openerp.web_context_tunnel = function(instance) { instance.web.form.FormWidget.prototype.build_context = function() { var v_context = false; var fields_values = false; // instead of using just the attr context, we merge any attr starting with context for (var key in this.node.attrs)...
openerp.web_context_tunnel = function(instance) { instance.web.form.FormWidget.prototype.build_context = function() { var v_context = false; var fields_values = false; // instead of using just the attr context, we merge any attr starting with context for (var key in this.node.attrs)...
Fix lp:1302500 by evaluating an empty context to avoid error
Fix lp:1302500 by evaluating an empty context to avoid error
JavaScript
agpl-3.0
acsone/server-tools,osiell/server-tools,mdietrichc2c/server-tools,gdgellatly/server-tools,lepistone/server-tools,odoomrp/server-tools,acsone/server-tools,lepistone/server-tools,gurneyalex/server-tools,rschnapka/server-tools,Comunitea/server-tools,ovnicraft/server-tools,JayVora-SerpentCS/server-tools,factorlibre/server-...
8906054c870672ec9fabfdda087e328328397349
src/mmw/js/src/data_catalog/controllers.js
src/mmw/js/src/data_catalog/controllers.js
"use strict"; var App = require('../app'), coreUtils = require('../core/utils'), models = require('./models'), views = require('./views'); var DataCatalogController = { dataCatalog: function() { App.map.setDataCatalogSize(); App.state.set({ 'active_page': coreUtils.dataCat...
"use strict"; var App = require('../app'), router = require('../router').router, coreUtils = require('../core/utils'), models = require('./models'), views = require('./views'); var DataCatalogController = { dataCatalogPrepare: function() { if (!App.map.get('areaOfInterest')) { ...
Exit /search if no area of interest
Exit /search if no area of interest Previously we would query APIs with the bounding box of the entire map in view. Now as we prepare to switch to searching for the area of interest only, we disable being able to come to this page without an area of interest drawn already.
JavaScript
apache-2.0
WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed
3a4a850d1cc36ab3fd410db8b1b72e4688fa1c20
source/static.js
source/static.js
Stirrup.prototype.buildStaticFunctions = function(constructor) { var staticFuncs = this.getConfig().staticFuncs; for(var i = 0, len = staticFuncs.length; i < len; i++) { var def = staticFuncs[i]; var staticFunc = null; //If using native promises, and native promises implements //the given function...
Stirrup.prototype.buildStaticFunctions = function(constructor) { var staticFuncs = this.getConfig().staticFuncs; for(var i = 0, len = staticFuncs.length; i < len; i++) { var def = staticFuncs[i]; var staticFunc = null; //If using native promises, and native promises implements //the given function...
Fix logic and show proper error
Fix logic and show proper error
JavaScript
mit
asakusuma/stirrup
c7d69aaab3d91d19ec5c9fef2b3e9b40e52367ca
gh-pages/src/common/hexBoard/hexBoard.js
gh-pages/src/common/hexBoard/hexBoard.js
var angular = require('angular'); var Board = require('../../../../src/HexBoard.js'); // var paper = require('browserifyable-paper'); module.exports = angular.module( 'hexBoard', [] ) .directive( 'hexBoard', ['$window', function($window) { return { link: function( scope, element, attrs ) { scope.boar...
var angular = require('angular'); var Board = require('../../../../src/HexBoard.js'); // module.exports = angular.module( 'hexBoard', [] ) .directive( 'hexBoard', ['$window', function($window) { return { link: function( scope, element, attrs ) { scope.board = new Board(scope.hexDimensions, element[0]...
Remove (hopefully final) references to browserifyable-paper
Remove (hopefully final) references to browserifyable-paper
JavaScript
mit
chad-autry/hex-grid-map-3D,chad-autry/hex-grid-map-3D,chad-autry/hex-grid-map-3D
35d271cd591b8cb8c678a7845035d67db27b0360
src/javascript/binary/static/profittable.js
src/javascript/binary/static/profittable.js
pjax_config_page("profit_table", function(){ return { onLoad: function() { if (!getCookieItem("login")) { window.location = window.location.host + "/login"; return; } BinarySocket.init({ onmessage: function(msg){ ...
pjax_config_page("profit_table", function(){ return { onLoad: function() { BinarySocket.init({ onmessage: function(msg){ var response = JSON.parse(msg.data); if (response) { var type = response.msg_type; ...
Revert "client side redirect for unauth user"
Revert "client side redirect for unauth user" This reverts commit 8577dc1dd2675aa06538954d299d1a47a40f9174.
JavaScript
apache-2.0
junbon/binary-static-www2,junbon/binary-static-www2
adab71c18ce100bf8a9ec45920424af17a6e0198
lib/template-conversion.js
lib/template-conversion.js
var Hogan = require('hogan.js'), fs = require('fs'), path = require('path'), govukDir = path.normalize(__dirname + '/../govuk_modules'), govukConfig = require(__dirname + '/template-config'), compiledTemplate, govukTemplate, handleErr; handleErr = function (err) { if (err) { throw err...
var Hogan = require('hogan.js'), fs = require('fs'), path = require('path'), govukDir = path.normalize(__dirname + '/../govuk_modules/govuk_template'), govukConfig = require(__dirname + '/template-config'), compiledTemplate, govukTemplate, handleErr; handleErr = function (err) { if (err) ...
Update path to convert template
Update path to convert template
JavaScript
mit
joelanman/govuk_elements,joelanman/govuk_elements
ee886b82d87d28f6010ba5522820a18f98225655
frappe/website/doctype/website_theme/website_theme.js
frappe/website/doctype/website_theme/website_theme.js
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // MIT License. See license.txt frappe.require('assets/frappe/js/lib/jscolor/jscolor.js'); frappe.provide("frappe.website_theme"); $.extend(frappe.website_theme, { color_variables: ["background_color", "top_bar_color", "top_bar_text_color", "foo...
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // MIT License. See license.txt frappe.require('assets/frappe/js/lib/jscolor/jscolor.js'); frappe.provide("frappe.website_theme"); $.extend(frappe.website_theme, { color_variables: ["background_color", "top_bar_color", "top_bar_text_color", "foo...
Enable save button if custom and not in developer mode
[fix] Enable save button if custom and not in developer mode
JavaScript
mit
vjFaLk/frappe,paurosello/frappe,mbauskar/helpdesk-frappe,elba7r/builder,indautgrp/frappe,vCentre/vFRP-6233,saguas/frappe,paurosello/frappe,bohlian/frappe,vqw/frappe,mbauskar/frappe,anandpdoshi/frappe,indictranstech/osmosis-frappe,vCentre/vFRP-6233,drukhil/frappe,saurabh6790/frappe,maxtorete/frappe,adityahase/frappe,mba...
3d6eba4f3162990caf01c57ab5944ee036e2ab1f
stockflux-launcher/src/toolbar/CloseButton.js
stockflux-launcher/src/toolbar/CloseButton.js
import React from 'react'; import { FaTimes } from 'react-icons/fa'; import './CloseButton.css'; export default ( <button className="close" onClick={() => { // eslint-disable-next-line no-undef var application = fin.desktop.Application.getCurrent(); application.close(); }} > <FaTi...
import React from 'react'; import { FaTimes } from 'react-icons/fa'; import './CloseButton.css'; export default ( <button className="close" onClick={() => window.fin.Window.getCurrentSync().close()} > <FaTimes /> </button> );
Use simpler close button logic
Use simpler close button logic
JavaScript
mit
ScottLogic/StockFlux,ScottLogic/bitflux-openfin,owennw/OpenFinD3FC,owennw/OpenFinD3FC,ScottLogic/StockFlux,ScottLogic/bitflux-openfin
f21c36ed85f277522593f1aed902d18f787a34b1
src/addDigits.js
src/addDigits.js
/** * Copyright 2003-present Greg Hurrell. All rights reserved. * Licensed under the terms of the MIT license. * * @flow */ export default function addDigits( aDigits: Array<number>, bDigits: Array<number>, base: number ): Array<number> { let result = []; let carry = 0; const aLength = aDigits.length;...
/** * Copyright 2003-present Greg Hurrell. All rights reserved. * Licensed under the terms of the MIT license. * * @flow */ export default function addDigits( aDigits: Array<number>, bDigits: Array<number>, base: number ): Array<number> { let result = []; let carry = 0; const aLength = aDigits.length;...
Replace `unshift()` with `push()` plus `reverse()`
Replace `unshift()` with `push()` plus `reverse()` As predicted, this is faster. Not sure if as fast as what I had before. Will do actual profiling and revert to prior state if it ends up being better.
JavaScript
mit
wincent/hextrapolate,wincent/hextrapolate,wincent/hextrapolate
38bad0038995b36bdd46ad44eb5881f22ea8e30e
src/common/display/text/index.js
src/common/display/text/index.js
//Dependencies. var builder = require('focus').component.builder; var React = require('react'); var type = require('focus').component.types; /** * Input text mixin. * @type {Object} */ var displayTextMixin = { /** @inheritdoc */ getDefaultProps: function getInputDefaultProps() { return { value: undefi...
//Dependencies. const builder = require('focus').component.builder; const React = require('react'); const type = require('focus').component.types; /** * Input text mixin. * @type {Object} */ const displayTextMixin = { /** @inheritdoc */ getDefaultProps(){ return { formatter: (data)=> data }; }, ...
Rewrite component and pass all props to the children.
[display] Rewrite component and pass all props to the children.
JavaScript
mit
KleeGroup/focus-components,Ephrame/focus-components,JRLK/focus-components,sebez/focus-components,JRLK/focus-components,asimsir/focus-components,JabX/focus-components,sebez/focus-components,JabX/focus-components,JRLK/focus-components,KleeGroup/focus-components,Ephrame/focus-components,asimsir/focus-components,get-focus/...
8791e7e17114e689cb585c38c520084661b68e26
src/cg-inject.js
src/cg-inject.js
(function (ng) { 'use strict'; /** * Angular.js utility for cleaner dependency injection. */ var $inject = function (cls, self, args) { var i; var key; var str; var func; var depNames = []; var deps = []; var l = cls.$inject.length; // Inject all dependencies into the self ...
(function (ng) { 'use strict'; /** * Angular.js utility for cleaner dependency injection. */ var $inject = function (cls, self, args) { var i; var key; var str; var func; var depNames = []; var deps = []; var l = cls.$inject.length; // Inject all dependencies into the self ...
Fix bug when no DI for methods is used
Fix bug when no DI for methods is used
JavaScript
mit
ngonzalvez/cg-inject
aabfd5e536606950436745e47fb6e057802ac0f1
test/algorithms/math/testExtendedEuclidean.js
test/algorithms/math/testExtendedEuclidean.js
/* eslint-env mocha */ const extendedEuclidean = require('../../../src').algorithms.math.extendedEuclidean; const assert = require('assert'); describe('Extended Euclidean', () => { it('should check for both numbers as 0', () => { assert.deepStrictEqual(extendedEuclidean(35, 15), { gcd: 5, x: 1, y: -2 }); }); ...
/* eslint-env mocha */ const extendedEuclidean = require('../../../src').algorithms.math.extendedEuclidean; const assert = require('assert'); describe('Extended Euclidean', () => { it('should check for numbers as 0', () => { assert.deepStrictEqual(extendedEuclidean(35, 0), { gcd: 35, x: 1, y: 0 }); assert.d...
Test Extended Euclidean: Add more test cases
Test Extended Euclidean: Add more test cases
JavaScript
mit
ManrajGrover/algorithms-js
6d481e04d262822b62b35ce22491307838b04437
js/character.js
js/character.js
var React = require('react'); var Character = React.createClass({ getThumbnail: function() { var image = this.props.character.thumbnail.path+'.'+this.props.character.thumbnail.extension; return ( <img className="character-image" src={image}/> ) }, getName: function() { return ( <spa...
var React = require('react'); var Character = React.createClass({ getThumbnail: function() { var image = 'http://placehold.it/250x250'; if(this.props.character.thumbnail) { image = this.props.character.thumbnail.path+'.'+this.props.character.thumbnail.extension; } return ( <img classNa...
Fix the error when there's no thumbnail available
Fix the error when there's no thumbnail available In case the API returns null for the thumbnail, a dummy image is set as the thumbnail prop
JavaScript
mit
adrrian17/excelsior
f51005c38bc572600ae7f21d91214894fad35ea7
tests/dummy/config/content-security-policy.js
tests/dummy/config/content-security-policy.js
module.exports = function () { return { delivery: ['meta'], policy: { 'default-src': ["'none'"], 'script-src': ["'self'"], 'font-src': ["'self'"], 'connect-src': ["'self'"], 'img-src': [ "'self'", // Bootstrap 4 uses data URL for some SVG images in CSS 'da...
module.exports = function () { return { delivery: ['meta'], policy: { 'default-src': ["'none'"], 'script-src': ["'self'"], 'font-src': ["'self'"], 'connect-src': ["'self'"], 'img-src': [ "'self'", // Bootstrap 4 uses data URL for some SVG images in CSS 'da...
Fix CSP failures in FastBoot tests
Fix CSP failures in FastBoot tests This was caused by several facts: * `ember-a11y-testing` adds two styles tags with inline content * `ember-cli-fastboot-testing` parses the FastBoot rendered HTML string here: https://github.com/embermap/ember-cli-fastboot-testing/blob/47882cebaaf9fb482df3e3b1eae1067807726890/addon-t...
JavaScript
mit
kaliber5/ember-bootstrap,kaliber5/ember-bootstrap
999f53124b2c08e8585fa5add1b55574e919f444
tests/js/web/PulsarSortableComponentTest.js
tests/js/web/PulsarSortableComponentTest.js
/*jshint multistr: true, unused: false*/ 'use strict'; var $ = require('jquery'), PulsarSortableComponent = require('../../../js/PulsarSortableComponent'); $.fx.off = !$.fx.off; describe('Sortable component', function() { beforeEach(function() { this.$html = $('<div class="fake-html"></div>').appen...
/*jshint multistr: true, unused: false*/ 'use strict'; var $ = require('jquery'), PulsarSortableComponent = require('../../../js/PulsarSortableComponent'); $.fx.off = !$.fx.off; describe('Sortable component', function() { beforeEach(function() { this.$html = $('<div class="fake-html"></div>').appen...
Tweak sortable selector for sortable tests
Tweak sortable selector for sortable tests
JavaScript
mit
jadu/pulsar,jadu/pulsar,jadu/pulsar
7226d51c88b9d0437d4b87cd105a4673ecc36770
htdocs/components/15_PopulationGraph.js
htdocs/components/15_PopulationGraph.js
// $Revision$ Ensembl.Panel.PopulationGraph = Ensembl.Panel.Piechart.extend({ init: function () { // Allele colours this.graphColours = { 'A' : '#00BB00', 'T' : '#FF0000', 'G' : '#FFD700', 'C' : '#0000FF', 'default' : [ '#222222', '#FF00FF', '#008080', '#...
// $Revision$ Ensembl.Panel.PopulationGraph = Ensembl.Panel.Piechart.extend({ init: function () { // Allele colours this.graphColours = { 'A' : '#00A000', 'T' : '#FF0000', 'G' : '#FFCC00', 'C' : '#0000FF', '-' : '#000000', 'default' : [ '#0080...
Change the colours of the 'A' and 'G' to make them slightly darker and them more consistent with the colours of the genotypes on the website
Change the colours of the 'A' and 'G' to make them slightly darker and them more consistent with the colours of the genotypes on the website
JavaScript
apache-2.0
Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode
aa53f501e459b3b42b997057c83b8bb366872f76
gulpfile.js
gulpfile.js
'use strict'; /*global jasmine:true */ var clean = require('./lib/clean'), middle = require('@whitneyit/middle'), gulp = require('gulp'), eslint = require('gulp-eslint'), istanbul = require('gulp-istanbul'), jasmine = require('gulp-jasmine'), jscs = require('gulp-jscs'), ...
'use strict'; /*global jasmine:true */ var clean = require('./lib/clean'), middle = require('@whitneyit/middle'), gulp = require('gulp'), eslint = require('gulp-eslint'), istanbul = require('gulp-istanbul'), jasmine = require('gulp-jasmine'), jscs = require('gulp-jscs'), ...
Update `istanbul` to report on `untested` code
Update `istanbul` to report on `untested` code
JavaScript
mit
whitneyit/clean
7c119743fd1087ce738309a21fee8c21c8945344
gulpfile.js
gulpfile.js
// Include gulp var gulp = require('gulp'); // Include plugins var concat = require('gulp-concat'); // Concatenate JS Files gulp.task('scripts', function() { return gulp.src(['app/bower_components/mousetrap/mousetrap.js', 'app/bower_components/angular-hotkeys/src/hotkeys.js', ...
// Include gulp var gulp = require('gulp'), watch = require('gulp-watch'); // Include plugins var concat = require('gulp-concat'); // Concatenate JS Files gulp.task('scripts', function() { return watch(['app/bower_components/mousetrap/mousetrap.js', 'app/bower_components/angular-hotkeys/s...
Add gulp-watch ability to auto build
Add gulp-watch ability to auto build This way we don't forget to build as it will just watch the files and build when I change any file in helmsman
JavaScript
mit
map7/helmsman,map7/helmsman
4c85220e3bdbd273573c14624358701713eadc53
src/js/common.js
src/js/common.js
/* exported trace */ // Logging utility function. function trace(arg) { var now = (window.performance.now() / 1000).toFixed(3); console.log(now + ': ', arg); }
/* exported trace */ // Logging utility function. function trace(arg) { const now = (window.performance.now() / 1000).toFixed(3) console.log(`${now}: `, arg); }
Update trace function to template string.
Update trace function to template string.
JavaScript
bsd-3-clause
fippo/webrtc,fippo/webrtc,webrtc/samples,webrtc/samples
2032efcddba2895a6c3c3b21a7caabc41cffa4a3
app/assets/javascripts/components/commons/IFrame.js
app/assets/javascripts/components/commons/IFrame.js
import React from 'react'; import LoadingSpinner from './LoadingSpinner'; class IFrame extends React.Component { constructor() { super(); this.state = { loaded: false, height: 400 }; } componentDidMount() { this.refs.iframe.addEventListener('load', () => this.onLoad()); } onLoad...
import React from 'react'; import LoadingSpinner from './LoadingSpinner'; class IFrame extends React.Component { constructor() { super(); this.state = { loaded: false, height: 400 }; } componentDidMount() { this.refs.iframe.addEventListener('load', () => this.onLoad()); } compon...
Remove listener on component unmount
Remove listener on component unmount
JavaScript
mit
resource-watch/preparedness-for-resilience,resource-watch/preparedness-for-resilience,resource-watch/preparedness-for-resilience
56ef341ad800d5f47ad16ff61d50667b9cc6c968
lib/markdown.js
lib/markdown.js
var marked = require('marked'); var fs = require('fs'); var markedRenderer = new marked.Renderer(); marked.setOptions({ renderer: markedRenderer, gfm: true, tables: true, breaks: false, pedantic: false, sanitize: false, smartLists: true, smartypants: false }); // override renderer mar...
var marked = require('marked'); var fs = require('fs'); var markedRenderer = new marked.Renderer(); marked.setOptions({ renderer: markedRenderer, gfm: true, tables: true, breaks: false, pedantic: false, sanitize: false, smartLists: true, smartypants: false }); // override renderer mar...
Support set anchor to header
Support set anchor to header
JavaScript
mit
ChanggyunCho/md-docs-express,ChanggyunCho/md-docs-express
25437d93049180268332c8d69a940062d0220838
src/mongoose/membership-finder.js
src/mongoose/membership-finder.js
"use strict"; function membershipFinder(schema, options) { schema.pre('init', function(next, data) { var queries = []; var query = {}; query[options.field] = data._id; queries.push(query); queries.push({'member.@type': this.constructor.modelName, 'member.id': data._id}); this.model('Membershi...
"use strict"; /** * Find memberships that are associated with the current object and * populate them. This is necessary because memberships are stored in * a separate collections to people and organizations, but it makes * sense to return them inline. * * @param {mongoose.Schema} schema The schema to augment wit...
Document the membershipFinder mongoose plugin
Document the membershipFinder mongoose plugin
JavaScript
agpl-3.0
Sinar/popit-api,mysociety/popit-api,Sinar/popit-api,mysociety/popit-api
4098df5752f46841879d06d2ed91bdd53746a4aa
src/options_ui/new-option-form.js
src/options_ui/new-option-form.js
import m from 'mithril'; export const Col = (el) => m('div.col', [el]) export class NewOptionForm { oninit(vnode) { vnode.state.newOption = { name: '', pattern: '', selector: '', enabled: true }; } view(vnode) { const { name, pattern, selector, enabled } = vnode.state.newOption; ...
import m from 'mithril'; export const validateForm = ({ name, pattern }) => Boolean(name && pattern); export const Col = el => m('div.col', [el]); export class NewOptionForm { oninit(vnode) { vnode.state.newOption = { name: '', pattern: '', selector: '', enabled: true, }; } vie...
Disable button if name & pattern are empty; prettify
Disable button if name & pattern are empty; prettify
JavaScript
mit
solkaz/source-copy,solkaz/source-copy
39d48bca13a369ea74ca8686adb6b8312eb95489
public/javascripts/controllers.js
public/javascripts/controllers.js
// require('./Pad.js') function DrawingAppCtrl($scope, socket, drawingPad) { console.log("starting"); $socket = socket; $scope.message; $scope.messages = []; $scope.joined = false; $scope.username; drawingPad.initialize(socket); $scope.sendMsg = function (message) { $scope.messages.push(message)...
// require('./Pad.js') function DrawingAppCtrl($scope, socket, drawingPad) { console.log("starting"); $socket = socket; $scope.message; $scope.messages = []; $scope.joined = false; $scope.username; drawingPad.initialize(socket); $scope.sendMsg = function (message) { $scope.messages.push({msg: me...
Fix bug with messages not showing up for the user that sends the message
Fix bug with messages not showing up for the user that sends the message
JavaScript
mit
tbrown1979/drawing-app
ea57fbd7f8785a4cff50e94f007724c31f858a6d
server/routes/UserRoutes.js
server/routes/UserRoutes.js
import express from 'express'; import UserController from '../controllers/UserController'; const userRouter = express.Router(); userRouter.post('/api/user/signup', UserController.createUser()); userRouter.post('/api/user/signin', [ UserController.validateRequest(), UserController.authenticateUser() ]); userRouter....
import express from 'express'; import UserController from '../controllers/UserController'; const userRouter = express.Router(); userRouter.post('/api/user/signup', UserController.createUser()); userRouter.post('/api/user/signin', [ UserController.validateRequest(), UserController.authenticateUser() ]); userRouter....
Write updateUser and deleteUser as one route
[refactor]: Write updateUser and deleteUser as one route
JavaScript
mit
tomipaul/PostIt,tomipaul/PostIt
461db34e64bddfcdaf53d3b2dfed674809d68b3a
node_modules_build/kwf-webpack/loader/kwfup-loader.js
node_modules_build/kwf-webpack/loader/kwfup-loader.js
var loaderUtils = require("loader-utils"); module.exports = function(source, map) { var query = loaderUtils.parseQuery(this.query); if (!query.uniquePrefix) { this.emitError("Missing loader parameter uniquePrefix"); return; } this.cacheable(); var r = query.uniquePrefix; if (...
var loaderUtils = require("loader-utils"); module.exports = function(source, map) { var query = loaderUtils.parseQuery(this.query); if (!query.uniquePrefix) { this.emitError("Missing loader parameter uniquePrefix"); return; } this.cacheable(); var r = query.uniquePrefix; if (...
Replace kwfLocal, begin with lower-case letter
Replace kwfLocal, begin with lower-case letter In order to target classes generated by a react application from component.scss, the class name needs to start with a lower-case letter. kwcClass and kwcBem start with lower-case letter as well.
JavaScript
bsd-2-clause
koala-framework/koala-framework,koala-framework/koala-framework
46525649b62b9687e6a3d6cd0cb629b0598c87ec
test/filter.specs.js
test/filter.specs.js
'use strict'; const expect = require('chai').expect; const jsdomify = require('jsdomify').default; const Controller = require('../source/components/filter/filter.controller.js'); describe('For the controller', () => { it('expect it to have two testing filters', () => { let controller = new Controller(); ...
'use strict'; const expect = require('chai').expect; const jsdomify = require('jsdomify').default; const m = require('mithril'); const Filter = require('../source/models/filter.js'); const Controller = require('../source/components/filter/filter.controller.js'); const views = require('../source/components/filter/filt...
Test the single filter view
Test the single filter view
JavaScript
mit
brycekbargar/bryce-finds-an-apartment,brycekbargar/bryce-finds-an-apartment,brycekbargar/bryce-finds-an-apartment
3ea2e62beae27160db21390c41fa19e40b9344c4
babel-transform.js
babel-transform.js
var module_ = require("module") var babel exports.init = function(path) { var dummyMod = { id: path, paths: module_._nodeModulePaths(path).concat(module_.globalPaths) } var resolved = module_._resolveFilename("babel-core", dummyMod) babel = require(resolved) } exports.transform = function(path, text) ...
var module_ = require("module") var babel exports.init = function(path) { var dummyMod = { id: path, paths: module_._nodeModulePaths(path).concat(module_.globalPaths) } var resolved = module_._resolveFilename("babel-core", dummyMod) babel = require(resolved) } exports.transform = function(path, text) ...
Enable source maps in default Babel transform
Enable source maps in default Babel transform
JavaScript
mit
marijnh/moduleserve
dc8c9fc1e63ed7fa3fd6d5cd2cab5816c1907a12
tests/dummy/config/environment.js
tests/dummy/config/environment.js
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contr...
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contr...
Add CSP to make console less noisy during testing
Add CSP to make console less noisy during testing
JavaScript
mit
mfeckie/Semantic-UI-Ember,mfeckie/Semantic-UI-Ember
27b504fc60f76b4fce52b2ffdf61a3974ae9600c
src/Services/Terminal/TerminalParser.js
src/Services/Terminal/TerminalParser.js
import { TerminalRuntimeError, TerminalParsingError, } from './TerminalErrors'; const errorHandler = (rsp) => { throw new TerminalRuntimeError(rsp); }; const createSession = (rsp) => { if ( !rsp[`common_${this.uapi_version}:HostToken`] || !rsp[`common_${this.uapi_version}:HostToken`]._ ) { throw...
import { TerminalRuntimeError, TerminalParsingError, } from './TerminalErrors'; function errorHandler(rsp) { throw new TerminalRuntimeError(rsp); } function createSession(rsp) { if ( !rsp[`common_${this.uapi_version}:HostToken`] || !rsp[`common_${this.uapi_version}:HostToken`]._ ) { throw new Te...
Fix of the terminal parser functions passed without context
Fix of the terminal parser functions passed without context
JavaScript
mit
Travelport-Ukraine/uapi-json
629cf6ec5dd5308a1d24234950943e9a6ca676f2
src/common/InlineEventHandlerRewrite.js
src/common/InlineEventHandlerRewrite.js
// Rewrite in-line event handlers (eg. <input ... onclick=""> for a sub-set of common standard events) document.addEventListener('DOMContentLoaded', function(e) { var selectors = ['load', 'click', 'mouseover', 'mouseout', 'keydown', 'keypress', 'keyup', 'blur', 'focus']; for(var i = 0, l = selectors.length; i...
opera.isReady(function() { // Rewrite in-line event handlers (eg. <input ... onclick=""> for a sub-set of common standard events) document.addEventListener('DOMContentLoaded', function(e) { var selectors = ['load', 'beforeunload', 'unload', 'click', 'dblclick', 'mouseover', 'mousemove', ...
Add a broader set of events for inline event handler rewrite function
Add a broader set of events for inline event handler rewrite function
JavaScript
mit
operasoftware/operaextensions.js,operasoftware/operaextensions.js,operasoftware/operaextensions.js
4f0a6ed5d8490eeb9cf056f686c734e83bd90de3
spec/marker-manager-spec.js
spec/marker-manager-spec.js
/** @babel */ import helpers from './spec-helpers' import MarkerManager from '../lib/marker-manager' describe('MarkerManager', () => { beforeEach(() => { waitsForPromise(() => { return helpers.activatePackages() }) }) describe('addMarkers', () => { it('verifies that only messages that have a ...
/** @babel */ import helpers from './spec-helpers' import MarkerManager from '../lib/marker-manager' describe('MarkerManager', () => { beforeEach(() => { waitsForPromise(() => { return helpers.activatePackages() }) }) describe('addMarkers', () => { let editor, manager beforeEach(() => { ...
Add test for reset flag
Add test for reset flag
JavaScript
mit
thomasjo/atom-latex,thomasjo/atom-latex,thomasjo/atom-latex
361b76e3b403e30c2f8dd6024f6291743bb189e6
lib/calendar.js
lib/calendar.js
var icalendar = require('icalendar'); exports.generateIcal = function(boards) { var ical = new icalendar.iCalendar(); boards.each(function(board) { board.cards().each(function(card) { // no arm, no chocolate if (!card.get('badges').due) return; var event = new icalen...
var icalendar = require('icalendar'); exports.generateIcal = function(boards) { var ical = new icalendar.iCalendar(); boards.each(function(board) { board.cards().each(function(card) { // no arm, no chocolate if (!card.get('badges').due) return; var event = new icalen...
Add uid and another URL property.
Add uid and another URL property. Signed-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@stormz.me>
JavaScript
agpl-3.0
francois2metz/trello-calendar,francois2metz/trello-calendar
941053b7e7a5f94638b2c2bb6a9dd5b76587ac2c
codebrag-ui/src/main/webapp/scripts/commits/generalLikes.js
codebrag-ui/src/main/webapp/scripts/commits/generalLikes.js
angular.module('codebrag.commits') .directive('generalLikes', function (authService) { return { restrict: 'E', replace: true, scope: { author: '=', likesCollection: '=', submitLike: '&' }, templateU...
angular.module('codebrag.commits') .directive('generalLikes', function (authService) { return { restrict: 'E', scope: { author: '=', likesCollection: '=', submitLike: '&' }, templateUrl: 'generalLikes', ...
Revert back not replacing content for general likes directive
Revert back not replacing content for general likes directive
JavaScript
agpl-3.0
cazacugmihai/codebrag,softwaremill/codebrag,cazacugmihai/codebrag,softwaremill/codebrag,softwaremill/codebrag,cazacugmihai/codebrag,softwaremill/codebrag,cazacugmihai/codebrag,cazacugmihai/codebrag
31c0deff80bf7e2b21b21b9c0dacf747eb3703f8
lib/detector.js
lib/detector.js
/** * Expose */ module.exports = { /** * @param {Request} req * @return {Boolean} */ hasEscapedFragment: function(req) { return !!req.query['_escaped_fragment_']; }, /** * @param {String} ua * @return {Boolean} */ isRequestByCrawler: function(ua) { return ua.indexOf('googlebot') !...
/** * Expose */ module.exports = { /** * @param {Request} req * @return {Boolean} */ hasEscapedFragment: function(req) { return !!req.query['_escaped_fragment_']; }, /** * @param {String} ua * @return {Boolean} */ isRequestByCrawler: function(ua) { return ua.indexOf('googlebot') !...
Add yahoo bot user agent
Add yahoo bot user agent
JavaScript
mit
ahomu/middleware-html-snapshot
546893b2dd37519354da6956bacc62a9aa92c626
lib/document.js
lib/document.js
'use strict'; var util = require('util'); var Node = require('./node'); var Element = require('./nodes/element'); var makeElement = require('./nodes/make-element'); function Document(markup, options) { if (typeof markup !== 'string') { options = markup; markup = null; } Node.call(this, { tagName: 'html', ...
'use strict'; var util = require('util'); var Node = require('./node'); var Element = require('./nodes/element'); var makeElement = require('./nodes/make-element'); function Document(options) { Node.call(this, { tagName: 'html', nodeType: 9, parseOptions: options }); this.documentElement = new Element({ t...
Remove markup-accepting signature of Document
Remove markup-accepting signature of Document
JavaScript
mit
jugglinmike/stringdom
8be567b0742a5eeedad00463b3ee12bae4c60c8f
lib/marathon.js
lib/marathon.js
'use strict'; var request = require('request'); function removeEmptyItemFilter(item) { return item.length > 0; } function tasksFromTextToObject(text) { return text .replace(/([ \t]+)/gm, ' ') // Remove duplicate spaces .split('\n') // Create an array with the tasks .filter(remo...
'use strict'; var request = require('request'); function removeEmptyItemFilter(item) { return item.length > 0; } function tasksFromTextToObject(text) { return text .replace(/([ \t]+)/gm, ' ') // Remove duplicate spaces .split('\n') // Create an array with the tasks .filter(remo...
Use toString() to print the error coming from the API request
Use toString() to print the error coming from the API request
JavaScript
mit
MiLk/frontrunner,Wizcorp/frontrunner
f1c003039f6e369e9e2a7520b6b14fa2bc65af4e
jupyterlab/make-release.js
jupyterlab/make-release.js
var childProcess = require('child_process'); var fs = require('fs-extra'); var glob = require('glob'); var path = require('path'); var sortPackageJson = require('sort-package-json'); // Update the core. require('./update-core'); // Update the package.app.json file. var data = require('./package.json'); data['scripts'...
var childProcess = require('child_process'); var fs = require('fs-extra'); var glob = require('glob'); var path = require('path'); var sortPackageJson = require('sort-package-json'); // Run a production build with Typescript source maps. childProcess.execSync('npm run build:prod', {stdio:[0,1,2]}); // Update the pack...
Clean up the make release script
Clean up the make release script
JavaScript
bsd-3-clause
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab
0409c91ebe6bbf24c3c7b8af81cc25e66cdc2486
source/assets/javascripts/locastyle/_char-counter.js
source/assets/javascripts/locastyle/_char-counter.js
var locastyle = locastyle || {}; locastyle.charCounter = (function() { 'use strict'; function updateCounter(index, count) { $('.ls-number-counter-'+index).text(count); } function countText() { $('[data-ls-module="charCounter"]').each(function(index, field) { var limit = $(field).attr('maxlength...
var locastyle = locastyle || {}; locastyle.charCounter = (function() { 'use strict'; function updateCounter(index, count) { $('.ls-number-counter-'+index).text(count); } function countText() { $('[data-ls-module="charCounter"]').each(function(index, field) { var limit = $(field).attr('maxlength...
Break the char counter long line
Break the char counter long line
JavaScript
mit
deividmarques/locawebstyle,locaweb/locawebstyle,deividmarques/locawebstyle,locaweb/locawebstyle,deividmarques/locawebstyle,locaweb/locawebstyle
9d2d49afcbb74561b1a0ed70d2b3f824c096dbcc
src/styles/theme-manager.js
src/styles/theme-manager.js
var Extend = require('../utils/extend'); var Types = { LIGHT: require('./themes/light-theme'), DARK: require('./themes/dark-theme') }; var ThemeManager = function() { return { types: Types, template: Types.LIGHT, spacing: Types.LIGHT.spacing, contentFontFamily: 'Roboto, sans-serif', palett...
var Extend = require('../utils/extend'); var Types = { LIGHT: require('./themes/light-theme'), DARK: require('./themes/dark-theme') }; var ThemeManager = function() { return { types: Types, template: Types.LIGHT, spacing: Types.LIGHT.spacing, contentFontFamily: 'Roboto, sans-serif', palett...
Update component if spacing has been changed
Update component if spacing has been changed
JavaScript
mit
ziad-saab/material-ui,RickyDan/material-ui,bratva/material-ui,AllenSH12/material-ui,checkraiser/material-ui,JAStanton/material-ui,adamlee/material-ui,ghondar/material-ui,kybarg/material-ui,VirtueMe/material-ui,staticinstance/material-ui,mtnk/material-ui,vmaudgalya/material-ui,oliverfencott/material-ui,CalebEverett/mate...
eebad166367d85ff61846961a332030c6c81b4f5
src/test/getTestDocument.js
src/test/getTestDocument.js
/** * Copyright 2013 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
/** * Copyright 2013 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
Use an iframe to create a testDocument… instead of `createHTMLDocument` since it isn't fully support by the browsers we care about.
Use an iframe to create a testDocument… instead of `createHTMLDocument` since it isn't fully support by the browsers we care about. fixes #606 fixes #454
JavaScript
mit
kolmstead/react,leohmoraes/react,yiminghe/react,dilidili/react,10fish/react,zs99/react,gxr1020/react,thomasboyt/react,billfeller/react,jmptrader/react,ZhouYong10/react,iOSDevBlog/react,usgoodus/react,TaaKey/react,gregrperkins/react,misnet/react,Rafe/react,chrisjallen/react,skevy/react,ledrui/react,trueadm/react,quip/re...
2520e8ac06a92c63b1e5d30d6433d860eb0dd79a
src/theme/BootstrapTheme.js
src/theme/BootstrapTheme.js
var BootstrapTheme = Theme.extend({ classes: { widget: 'fc-bootstrap3', tableGrid: 'table-bordered', // avoid `table` class b/c don't want margins. only border color tableList: 'table table-striped', // `table` class creates bottom margin but who cares buttonGroup: 'btn-group', button: 'btn btn-default',...
var BootstrapTheme = Theme.extend({ classes: { widget: 'fc-bootstrap3', tableGrid: 'table-bordered', // avoid `table` class b/c don't want margins. only border color tableList: 'table table-striped', // `table` class creates bottom margin but who cares buttonGroup: 'btn-group', button: 'btn btn-default',...
Tweak the class for 'today' in the bootstrap theme
Tweak the class for 'today' in the bootstrap theme
JavaScript
mit
laoneo/fullcalendar,kleisauke/fullcalendar,fullcalendar/fullcalendar,kleisauke/fullcalendar,arshaw/fullcalendar,kleisauke/fullcalendar,oleg-babintsev/fullcalendar,kleisauke/fullcalendar,fullcalendar/fullcalendar,pietervisser/fullcalendar,arshaw/fullcalendar,pietervisser/fullcalendar,laoneo/fullcalendar,arshaw/fullcalen...
f679ac22e95d89aaa3a69b9db710889e5cee5065
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher-new/source/test/setupTests.js
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher-new/source/test/setupTests.js
/* * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
/* * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
Update Jest test setup to add mock document.createRance method and refactor global exposed methods
Update Jest test setup to add mock document.createRance method and refactor global exposed methods
JavaScript
apache-2.0
prasa7/carbon-apimgt,praminda/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,nuwand/carbon-apimgt,harsha89/carbon-apimgt,ruks/carbon-apimgt,uvindra/carbon-apimgt,harsha89/carbon-apimgt,tharindu1st/carbon-apimgt,Rajith90/carbon-apimgt,uvindra/carbon-apimgt,prasa7/carbon-apimgt,ruks/carbon-apimgt,isharac/carbon-apimgt,th...
b2c3139d2b2675e02d6e09654f6e58e100aa0afa
src/main/web/florence/js/functions/_handleApiError.js
src/main/web/florence/js/functions/_handleApiError.js
/** * Generic error handler method for ajax responses. * Apply your specific requirements for an error response and then call this method to take care of the rest. * @param response */ function handleApiError(response) { if (!response || response.status === 200) return; if (response.status === 403...
/** * Generic error handler method for ajax responses. * Apply your specific requirements for an error response and then call this method to take care of the rest. * @param response */ function handleApiError(response) { if (!response || response.status === 200) return; if (response.status === 403...
Add alert and logout when no login details given
Add alert and logout when no login details given Former-commit-id: 78b396c1adfca2470a9e0f44a36e91513779f424
JavaScript
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
d93acad465ad367568ddf1cdcca0773e0ef05abd
src/main/resources/static/js/service.js
src/main/resources/static/js/service.js
(function () { var moneyTracker = angular.module("moneyTracker"); moneyTracker.service("ExpenseService", ["traverson", "$http", function (traverson, $http) { traverson.registerMediaType(TraversonJsonHalAdapter.mediaType, TraversonJsonHalAdapter); var myTraverson = traverson.from("http://localhost:8080/api"...
(function () { var moneyTracker = angular.module("moneyTracker"); moneyTracker.service("ExpenseService", ["traverson", "$http", function (traverson, $http) { traverson.registerMediaType(TraversonJsonHalAdapter.mediaType, TraversonJsonHalAdapter); var myTraverson = traverson.from("/api").jsonHal().useAngula...
Use relative path for HTTP requests. This way it doesn't matter where the application is deployed.
Use relative path for HTTP requests. This way it doesn't matter where the application is deployed.
JavaScript
mit
dennisstritzke/money-tracker,dennisstritzke/money-tracker,dennisstritzke/money-tracker
87cca716f49b9d6cd76406cc323581975abd925b
src/main/webapp/components/BuildSnapshotContainer.js
src/main/webapp/components/BuildSnapshotContainer.js
import * as React from "react"; import {BuildSnapshot} from "./BuildSnapshot"; /** * Container Component for BuildSnapshots. * * @param {*} props input property containing an array of build data to be * rendered through BuildSnapshot. */ export const BuildSnapshotContainer = React.memo((props) => { const S...
import * as React from "react"; import {BuildSnapshot} from "./BuildSnapshot"; /** * Container Component for BuildSnapshots. * * @param {*} props input property containing an array of build data to be * rendered through BuildSnapshot. */ export const BuildSnapshotContainer = React.memo((props) => { const S...
Resolve promise before setting JSON
Resolve promise before setting JSON
JavaScript
apache-2.0
googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020
cd1d3581965977249231675e41939da72c7d9d41
src/server.js
src/server.js
const db = function () { let localData = JSON.parse(localStorage.getItem("data")); return localData || { index: 0 }; }; let server = { add(item) { const data = db(); data.index++; debugger; item.id = data.index; data[data.index] = item; localStorage.setItem("d...
const db = function () { let localData = JSON.parse(localStorage.getItem("data")); return localData || { index: 0 }; }; const save = function (data) { localStorage.setItem("data", JSON.stringify(data)); }; let server = { add(item) { const data = db(); data.index++; item.id = data...
Add save method to temp db serv
Add save method to temp db serv
JavaScript
mit
gregorysl/date-minder,gregorysl/date-minder
b2052eb86e3a0086597c6586395697a3672ecdee
src/syntax.js
src/syntax.js
/** * The MIT License (MIT) * Copyright (c) 2015-present Dmitry Soshnikov <dmitry.soshnikov@gmail.com> */ // To require local modules from root. global.ROOT = __dirname + '/'; // Tokenizer. export {default as Tokenizer} from './tokenizer'; // Grammar classes. export {default as Grammar} from './grammar/grammar'; ...
/** * The MIT License (MIT) * Copyright (c) 2015-present Dmitry Soshnikov <dmitry.soshnikov@gmail.com> */ // To require local modules from root. global.ROOT = __dirname + '/'; // Tokenizer. export {default as Tokenizer} from './tokenizer'; // Grammar classes. export {default as Grammar} from './grammar/grammar'; ...
Remove reference to Closure, expose State instead
Remove reference to Closure, expose State instead Closure was removed in 32e3b21.
JavaScript
mit
DmitrySoshnikov/syntax,DmitrySoshnikov/syntax,DmitrySoshnikov/syntax,DmitrySoshnikov/syntax,DmitrySoshnikov/syntax,DmitrySoshnikov/syntax,DmitrySoshnikov/syntax,DmitrySoshnikov/syntax,DmitrySoshnikov/syntax
0d76516055444dca6643bbddc7e7dd79ae52f2e2
task/build.js
task/build.js
process.env.NODE_ENV = process.env.NODE_ENV || 'production' const ora = require('ora') const rm = require('rimraf') const path = require('path') const chalk = require('chalk') const webpack = require('webpack') const config = require('../config') const webpackConfig = require('../config/webpack') const spinner = ora(...
process.env.NODE_ENV = process.env.NODE_ENV || 'production' const ora = require('ora') const rm = require('rimraf') const chalk = require('chalk') const webpack = require('webpack') const config = require('../config') const webpackConfig = require('../config/webpack') const spinner = ora(`Building for env:${process.e...
Update @ Mon Mar 13 2017 11:13:52 GMT+0800 (CST)
Update @ Mon Mar 13 2017 11:13:52 GMT+0800 (CST)
JavaScript
mit
zce/dashboard,zce/dashboard,zce/dashboard
49a8067058f026f24e8e56ee1b80e3df884e1f58
app/components/link-to-username/component.js
app/components/link-to-username/component.js
import Ember from 'ember'; const { computed } = Ember; export default Ember.Component.extend({ username: null, role: computed('username', function() { if (this.get('username').startsWith('@')) { return 'op'; } else { return 'normal'; } }), usernameWithoutPrefix: computed('username'...
import Ember from 'ember'; const { computed } = Ember; export default Ember.Component.extend({ username: null, role: computed('username', function() { if (this.get('username').startsWith('@')) { return 'op'; } else if (this.get('username').startsWith('%')) { return 'half-op'; } else if ...
Support voices and half operators as well
Support voices and half operators as well
JavaScript
mpl-2.0
67P/hyperchannel,67P/hyperchannel
359ed0f15568d06183a89c12a33bfea4eb287ac7
app/controllers/programyearobjectives/new.js
app/controllers/programyearobjectives/new.js
import Ember from 'ember'; export default Ember.Controller.extend({ title: null, competency: null, needs: ['programyear'], programYear: Ember.computed.alias("controllers.programyear"), competencies: function(){ return this.get('programYear.competencies'); }.property('programYear.competencies.[]'), ac...
import Ember from 'ember'; export default Ember.Controller.extend({ title: null, competency: null, needs: ['programyear'], programYear: Ember.computed.alias("controllers.programyear"), competencies: function(){ return this.get('programYear.competencies'); }.property('programYear.competencies.[]'), ac...
Fix save objectve to use a default competency.
Fix save objectve to use a default competency.
JavaScript
mit
ilios/frontend,jrjohnson/frontend,gboushey/frontend,thecoolestguy/frontend,djvoa12/frontend,jrjohnson/frontend,stopfstedt/frontend,gabycampagna/frontend,djvoa12/frontend,ilios/frontend,thecoolestguy/frontend,stopfstedt/frontend,gboushey/frontend,dartajax/frontend,gabycampagna/frontend,dartajax/frontend
073184a6293f466de8c91579c8cb509b63cbe6ac
modules/isup.js
modules/isup.js
var request = require( 'request' ); module.exports = { commands: { isup: { aliases: [ 'get', 'web' ], privileged: true, help: 'Performs a HTTP(S) request to an arbitrary host.', usage: [ 'host' ], command: function ( bot, msg ) { request( msg.args.host, function ( err, res, body ) { if ( err ...
var request = require( 'request' ); module.exports = { commands: { isup: { aliases: [ 'get', 'web' ], privileged: true, help: 'Performs a HTTP(S) request to an arbitrary host.', usage: [ 'host' ], command: function ( bot, msg ) { request( msg.args.host, function ( err, res, body ) { if ( err ...
Remove dupe vars and bad syntax; tidy string
Remove dupe vars and bad syntax; tidy string
JavaScript
isc
zuzakistan/civilservant,zuzakistan/civilservant
26a535ec0852586db84287676816e79f06f3f237
src/components/icon/Icon.js
src/components/icon/Icon.js
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Box from '../box'; import cx from 'classnames'; import theme from './theme.css'; class Icon extends PureComponent { render() { const { children, className, color, tint, opacity, ...others } = this.props; const className...
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Box from '../box'; import cx from 'classnames'; import theme from './theme.css'; class Icon extends PureComponent { render() { const { children, className, color, tint, opacity, ...others } = this.props; const className...
Use flex to fix vertical alignment issue
Use flex to fix vertical alignment issue
JavaScript
mit
teamleadercrm/teamleader-ui
76fef7a0707f8451afe5c93f97e83bb0ffc33dd2
test/karma/drawer/labels.js
test/karma/drawer/labels.js
import labels from '../../../lib/drawer/labels'; describe('Labels drawer', () => { const scales = { x: d3.time.scale(), y: d3.scale.ordinal(), }; const config = { labelsWidth: 50, }; const domain = [new Date('2014-01-01'), new Date('2014-05-01')]; const data = [{ name:...
import labels from '../../../lib/drawer/labels'; describe('Labels drawer', () => { const scales = { x: d3.time.scale(), y: d3.scale.ordinal(), }; const config = { labelsWidth: 50, }; const domain = [new Date('2014-01-01'), new Date('2014-05-01')]; const data = [{ name:...
Add unit test for label event count (complex data)
Add unit test for label event count (complex data)
JavaScript
mit
marmelab/EventDrops,Smart-Sports/EventDrops,Smart-Sports/EventDrops
6170573c290e980987cb1b1d9b78631e1b633f83
render/vnode.js
render/vnode.js
function Vnode(tag, key, attrs, children, text, dom) { return {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: {}, events: undefined, instance: undefined, skip: false} } Vnode.normalize = function(node) { if (Array.isArray(node)) return Vnode("[", undefined, unde...
function Vnode(tag, key, attrs, children, text, dom) { return {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: {}, events: undefined, instance: undefined, skip: false} } Vnode.normalize = function(node) { if (Array.isArray(node)) return Vnode("[", undefined, unde...
Return empty string node for `false` values
feat: Return empty string node for `false` values Very specifically doing a strict `false` check here to try & avoid coercion perf costs.
JavaScript
mit
tivac/mithril.js,pygy/mithril.js,pygy/mithril.js,lhorie/mithril.js,MithrilJS/mithril.js,impinball/mithril.js,MithrilJS/mithril.js,tivac/mithril.js,barneycarroll/mithril.js,impinball/mithril.js,lhorie/mithril.js,barneycarroll/mithril.js
714486c00e8a4a94410ac11c8191d44a8f657cc3
addon/components/ember-favourite-heart.js
addon/components/ember-favourite-heart.js
import Ember from 'ember'; import layout from '../templates/components/ember-favourite-heart'; export default Ember.Component.extend({ layout: layout, liked: false, likeCount: 0, heartClass: function(){ if(this.get('liked')){ return "heart heartAnimation"; }else{ return "heart"; } }....
import Ember from 'ember'; import layout from '../templates/components/ember-favourite-heart'; export default Ember.Component.extend({ layout: layout, liked: false, likeCount: 0, heartClass: Ember.computed('liked', function() { if(this.get('liked')){ return "heart heartAnimation"; }else{ ...
Use Ember.computed instead of using prototype extension
Use Ember.computed instead of using prototype extension - This will work with consumer applications that must run with the Prototype Extensions turned off.
JavaScript
mit
anilmaurya/ember-favourite-heart,anilmaurya/ember-favourite-heart
9f713937397d766f038165808465d57731d101b1
managementGUI/client/src/utils/http-common.js
managementGUI/client/src/utils/http-common.js
import axios from 'axios'; export const HTTP = axios.create({ });
import axios from 'axios'; // disable IE ajax request caching axios.defaults.headers.get['If-Modified-Since'] = '0'; export const HTTP = axios.create({ });
Disable IE ajax request caching
Disable IE ajax request caching
JavaScript
agpl-3.0
transition-connect/transition-connect-server,transition-connect/transition-connect-server
b4f2914bf918060d02669a5d115c6942d0e05268
docs/quad-view/load-frames.js
docs/quad-view/load-frames.js
function loadTheFrame() { document.getElementById('upper-left').src = window.localStorage.getItem('upper-left'); document.getElementById('upper-right').src = window.localStorage.getItem('upper-right'); document.getElementById('lower-left').src = window.localStorage.getItem('lower-left'); document.getEle...
const BOXES = [ 'upper-right', 'upper-left', 'lower-right', 'lower-left' ]; function loadTheFrame() { const searchParams = new URLSearchParams(location.search); BOXES.forEach(box => { if (searchParams.has(box)) { window.localStorage.setItem(box, searchParams.get(box)) ...
Update with new functionality for quad view
Update with new functionality for quad view
JavaScript
mit
terodox/andrew-desmarais,terodox/andrew-desmarais
1905d3cb8d7a12cf1251ba629d801bf658bc398b
native/connected-status-bar.react.js
native/connected-status-bar.react.js
// @flow import PropTypes from 'prop-types'; import React from 'react'; import { StatusBar, Platform } from 'react-native'; import { globalLoadingStatusSelector } from 'lib/selectors/loading-selectors'; import type { LoadingStatus } from 'lib/types/loading-types'; import { connect } from 'lib/utils/redux-utils'; imp...
// @flow import React from 'react'; import { StatusBar, Platform } from 'react-native'; import { globalLoadingStatusSelector } from 'lib/selectors/loading-selectors'; import { useSelector } from './redux/redux-utils'; type Props = {| +barStyle?: 'default' | 'light-content' | 'dark-content', +animated?: boolean,...
Use hook instead of connect functions and HOC in ConnectedStatusBar
[native] Use hook instead of connect functions and HOC in ConnectedStatusBar Summary: Switched to hooks instead of the connect function for the ConnectedStatusBar class Test Plan: Made sure the statusbar still showed up and functioned normally. Reviewers: ashoat, palys-swm Reviewed By: ashoat Subscribers: KatPo, z...
JavaScript
bsd-3-clause
Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal
02196c5f4913ca06c3d44e39ccbdd2d9cd29baf3
shared/chat/conversation/error/conversation-error.js
shared/chat/conversation/error/conversation-error.js
// @flow import React from 'react' import {Box, CopyableText, Text} from '../../../common-adapters' import {globalStyles, globalMargins} from '../../../styles' export type Props = { conversationErrorText: string, } const ConversationError = ({conversationErrorText}: Props) => ( <Box style={styleContainer}> <T...
// @flow import React from 'react' import {Box, CopyableText, HeaderHoc, Text} from '../../../common-adapters' import {globalStyles, globalMargins} from '../../../styles' export type Props = { conversationErrorText: string, } const ConversationError = ({conversationErrorText}: Props) => ( <Box style={styleContain...
Add HeaderHoc to ConversationError component so you can navigate back
Add HeaderHoc to ConversationError component so you can navigate back
JavaScript
bsd-3-clause
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
f1e95d366a731f30327c0c636c2414c4034e7d11
client/components/mongoose-error/mongoose-error.directive.js
client/components/mongoose-error/mongoose-error.directive.js
'use strict'; /** * Removes server error when user updates input */ angular.module('its110App') .directive('mongooseError', function () { return { restrict: 'A', require: 'ngModel', link: function (scope, element, attrs, ngModel) { element.on('keydown', function () { return ...
'use strict'; /** * Removes server error when user updates input */ angular.module('bitfit.directives.mongoose-error') .directive('mongooseError', function () { return { restrict: 'A', require: 'ngModel', link: function (scope, element, attrs, ngModel) { element.on('keydown', function...
Update mongoose error module name
Update mongoose error module name
JavaScript
mit
celinaberg/BitFit,celinaberg/BitFit,celinaberg/BitFit
7836646ca7349987aa5165e9d9175e0f091395e0
Source/Trait/Grid.js
Source/Trait/Grid.js
LSD.Trait.Grid = new Class({ sort: function() { }, filter: function() { } })
/* --- script: Grid.js description: Filters and sort datasets (and widgets) license: Public domain (http://unlicense.org). requires: - LSD provides: - LSD.Trait.Grid ... */ LSD.Trait.Grid = new Class({ sort: function() { }, filter: function() { } });
Add grid trait file header
Add grid trait file header
JavaScript
unlicense
Inviz/lsd
47bbc2076d5c19e8a90a609ad6aa5024ed54d9ac
app/scripts/lib/publications/publication.js
app/scripts/lib/publications/publication.js
/** * Publication that represents a publication to novel sites. */ export default class Publication { /** * @param {Object} settings - Publication settings. * @param {String} settings.title - Title of the article. * @param {String} settings.body - Body of the article. * @param {String|Date} settings.tim...
/** * Publication that represents a publication to novel sites. */ export default class Publication { /** * @param {Object} settings - Publication settings. * @param {String} settings.title - Title of the article. * @param {String} settings.body - Body of the article. * @param {String|Date} settings.tim...
Fix Publication should convert time into Date at setter
Fix Publication should convert time into Date at setter
JavaScript
mit
io-monad/novelous-extension,io-monad/novelous-extension
b10fd792cb55fcdfc2069625bb0a387c8b44bd7b
src/js/components/Camera.js
src/js/components/Camera.js
import {Entity} from 'aframe-react'; import React from 'react'; import CameraAnimation from './CameraAnimation'; import Cursor from './Cursor'; export default class Camera extends React.Component { constructor(props) { super(props); } render() { return ( <Entity position={[10, 0, 20]} ...
import {Entity} from 'aframe-react'; import React from 'react'; import CameraAnimation from './CameraAnimation'; import Cursor from './Cursor'; export default class Camera extends React.Component { constructor(props) { super(props); this.state = { currentPosition: [10, 0, 20]} } render() { retur...
Change camera position to use state
Change camera position to use state
JavaScript
mit
csepreghy/VR-Cinema-Website-with-React.js,csepreghy/VR-Cinema-Website-with-React.js
e2f3c311c7d4f5bfcd9e5b5c928f88509679c78d
src/client/app/components/basket/basket.template.js
src/client/app/components/basket/basket.template.js
import { Util } from "../../util.js"; export class BasketTemplate { static update(render, state, events) { const headerClasses = "fw6 bb b--black-20 tl pb1 pr1 bg-black-10"; const trClasses = "pv1 pr1 bb b--black-20"; const trClassesLink = `${trClasses} pointer dim`; /* eslint-disa...
import { Util } from "../../util.js"; export class BasketTemplate { static update(render, state, events) { const headerClasses = "fw6 bb b--black-20 tl pb1 pr1 bg-black-10"; const trClasses = "pv1 pr1 bb b--black-20"; const trClassesLink = `${trClasses} pointer dim`; /* eslint-disa...
Add padding to the basket input.
Add padding to the basket input.
JavaScript
mit
albertosantini/node-conpa,albertosantini/node-conpa
f50d62e50cd231f214c0961079333ce17103bb93
backend/server/resources/projects-routes.js
backend/server/resources/projects-routes.js
module.exports = function(model) { 'use strict'; let validateProjectAccess = require('./project-access')(model.access); let schema = require('.././schema')(model); let router = require('koa-router')(); let projects = require('./projects')(model.projects); let samples = require('./samples')(mode...
module.exports = function(model) { 'use strict'; let validateProjectAccess = require('./project-access')(model.access); let schema = require('.././schema')(model); let router = require('koa-router')(); let projects = require('./projects')(model.projects); let samples = require('./samples')(mode...
Add route for creating processes.
Add route for creating processes.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
f97f08e5e436dedda5e84fca09fdf55e3d3a302a
blueprints/ember-cli-image-cropper/index.js
blueprints/ember-cli-image-cropper/index.js
module.exports = { description: '', // locals: function(options) { // // Return custom template variables here. // return { // foo: options.entity.options.foo // }; // } afterInstall: function(options) { return this.addBowerPackageToProject('imageLoader').then(function(){ return th...
module.exports = { description: '', normalizeEntityName: function() { // allows us to run ember -g ember-cli-image-cropper and not blow up // because ember cli normally expects the format // ember generate <entitiyName> <blueprint> }, afterInstall: function(options) { return this.addBowerPacka...
Enable running blueprint without entity name
Enable running blueprint without entity name
JavaScript
mit
dasnixon/ember-cli-image-cropper,mhretab/ember-cli-image-cropper,mhretab/ember-cli-image-cropper,dasnixon/ember-cli-image-cropper