commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
e052265d4e9415b63bb2fd81fb983bdd30754944 | web/test/components/portal/Portal.js | web/test/components/portal/Portal.js | import DomMock from '../../helpers/dom-mock';
import jsdom from 'mocha-jsdom';
import expect from 'expect';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import { Portal } from '../../../portal/src/containers/Portal';
import FBLogin from '../../../portal/src/components/FBLogin';
DomMock('... | import DomMock from '../../helpers/dom-mock';
import jsdom from 'mocha-jsdom';
import expect from 'expect';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import { Portal } from '../../../portal/src/containers/Portal';
import FBLogin from '../../../portal/src/components/FBLogin';
import Sub... | Add edit subject unit test in portal | Add edit subject unit test in portal
| JavaScript | mit | trendmicro/serverless-survey-forms,trendmicro/serverless-survey-forms | ---
+++
@@ -5,6 +5,7 @@
import TestUtils from 'react-addons-test-utils';
import { Portal } from '../../../portal/src/containers/Portal';
import FBLogin from '../../../portal/src/components/FBLogin';
+import Subject from '../../../portal/src/components/Popup/Subject';
DomMock('<html><body></body></html>');
@@ ... |
36c92e1e7c1ebeffec6f8f1d4597a4c3aceabbac | src/systems/tracked-controls-webxr.js | src/systems/tracked-controls-webxr.js | var registerSystem = require('../core/system').registerSystem;
/**
* Tracked controls system.
* Maintain list with available tracked controllers.
*/
module.exports.System = registerSystem('tracked-controls-webxr', {
init: function () {
this.controllers = [];
this.addSessionEventListeners = this.addSession... | var registerSystem = require('../core/system').registerSystem;
var utils = require('../utils');
/**
* Tracked controls system.
* Maintain list with available tracked controllers.
*/
module.exports.System = registerSystem('tracked-controls-webxr', {
init: function () {
this.controllers = [];
this.throttled... | Use system tick to retrieve controllers instead of unreliable inputsourceschange event. | Use system tick to retrieve controllers instead of unreliable inputsourceschange event.
| JavaScript | mit | aframevr/aframe,chenzlabs/aframe,ngokevin/aframe,aframevr/aframe,chenzlabs/aframe,ngokevin/aframe | ---
+++
@@ -1,4 +1,5 @@
var registerSystem = require('../core/system').registerSystem;
+var utils = require('../utils');
/**
* Tracked controls system.
@@ -7,21 +8,18 @@
module.exports.System = registerSystem('tracked-controls-webxr', {
init: function () {
this.controllers = [];
- this.addSessionEve... |
10693276f09beaf3cc46782a8b698fa8fb4f7a70 | http-random-user/src/main.js | http-random-user/src/main.js | import Cycle from '@cycle/core';
import {div, button, h1, h4, a, makeDOMDriver} from '@cycle/dom';
import {makeHTTPDriver} from '@cycle/http';
function main(sources) {
const getRandomUser$ = sources.DOM.select('.get-random').events('click')
.map(() => {
const randomNum = Math.round(Math.random() * 9) + 1;
... | import Cycle from '@cycle/core';
import {div, button, h1, h4, a, makeDOMDriver} from '@cycle/dom';
import {makeHTTPDriver} from '@cycle/http';
function main(sources) {
const getRandomUser$ = sources.DOM.select('.get-random').events('click')
.map(() => {
const randomNum = Math.round(Math.random() * 9) + 1;
... | Rename http-random-user key to category | Rename http-random-user key to category
| JavaScript | mit | mikekidder/cycle-examples,cyclejs/cycle-examples,mikekidder/cycle-examples,cyclejs/cycle-examples,mikekidder/cycle-examples | ---
+++
@@ -8,13 +8,13 @@
const randomNum = Math.round(Math.random() * 9) + 1;
return {
url: 'http://jsonplaceholder.typicode.com/users/' + String(randomNum),
- key: 'users',
+ category: 'users',
method: 'GET'
};
});
const user$ = sources.HTTP
- .filte... |
c23457181f01c0df8b9a262edbe0113ca550c504 | client/app/serializers/site.js | client/app/serializers/site.js | import DS from 'ember-data';
var SiteSerializer = DS.RESTSerializer.extend({
serialize: function(site, options) {
var fields = [ 'name', 'tagline', 'description', 'moreDesc', 'joinText' ];
var result = { };
fields.forEach(function(field) {
result[field] = site.get(field);
});
if (options ... | import DS from 'ember-data';
var SITE_SERIALIZER_FIELDS = [ 'name', 'tagline', 'description', 'moreDesc', 'joinText' ];
var SiteSerializer = DS.RESTSerializer.extend({
serialize: function(site, options) {
var result = site.getProperties(SITE_SERIALIZER_FIELDS);
if (options && options.includeId) {
res... | Use more idiomatic ember api | Use more idiomatic ember api
| JavaScript | mit | aymerick/kowa,aymerick/kowa | ---
+++
@@ -1,13 +1,10 @@
import DS from 'ember-data';
+
+var SITE_SERIALIZER_FIELDS = [ 'name', 'tagline', 'description', 'moreDesc', 'joinText' ];
var SiteSerializer = DS.RESTSerializer.extend({
serialize: function(site, options) {
- var fields = [ 'name', 'tagline', 'description', 'moreDesc', 'joinText' ... |
6d7aa555c3b2d554fe74cc0df4186c88965a21de | ckanext/googleanalytics/fanstatic_library/googleanalytics_event_tracking.js | ckanext/googleanalytics/fanstatic_library/googleanalytics_event_tracking.js | // Add Google Analytics Event Tracking to resource download links.
this.ckan.module('google-analytics', function(jQuery, _) {
return {
options: {
googleanalytics_resource_prefix: ''
},
initialize: function() {
jQuery('a.resource-url-analytics').on('click', function() {
var resource_p... | // Add Google Analytics Event Tracking to resource download links.
this.ckan.module('google-analytics', function(jQuery, _) {
return {
options: {
googleanalytics_resource_prefix: ''
},
initialize: function() {
jQuery('a.resource-url-analytics').on('click', function() {
var resource_u... | Fix resource download event tracking js | Fix resource download event tracking js
| JavaScript | agpl-3.0 | ckan/ckanext-googleanalytics,ckan/ckanext-googleanalytics,ckan/ckanext-googleanalytics | ---
+++
@@ -6,10 +6,9 @@
},
initialize: function() {
jQuery('a.resource-url-analytics').on('click', function() {
- var resource_prefix = this.options.googleanalytics_resource_prefix;
- var resource_url = resource_prefix + encodeURIComponent(jQuery(this).prop('href'));
+ var... |
48d7d841ffad787aca5652732e1a302ac5ab610e | grunt/config/sass.js | grunt/config/sass.js | // Compile SCSS files into CSS (dev mode is not compressed)
module.exports = {
dev: {
options: {
style: 'expanded'
},
files: {
'preview/vizabi.css': 'src/assets/style/vizabi.scss'
}
},
prod: {
options: {
style: 'compressed'
... | // Compile SCSS files into CSS (dev mode is not compressed)
module.exports = {
dev: {
options: {
style: 'expanded'
},
files: {
'dist/vizabi.css': 'src/assets/style/vizabi.scss'
}
},
prod: {
options: {
style: 'compressed'
},
... | Fix CSS not updating on development mode | Fix CSS not updating on development mode
| JavaScript | bsd-3-clause | acestudiooleg/vizabi,sergey-filipenko/vizabi,vizabi/vizabi,logicerpsolution/vizabi,maximhristenko/vizabi,logicerpsolution/vizabi,buchslava/vizabi,TBAPI-0KA/vizabi,jdk137/vizabi,alliance-timur/vizabi,sergey-filipenko/vizabi,alliance-timur/vizabi,dab2000/vizabi,logicerpsolution/vizabi,acestudiooleg/vizabi,maximhristenko/... | ---
+++
@@ -5,7 +5,7 @@
style: 'expanded'
},
files: {
- 'preview/vizabi.css': 'src/assets/style/vizabi.scss'
+ 'dist/vizabi.css': 'src/assets/style/vizabi.scss'
}
},
prod: { |
4d9fdf55de26dc1a26b6a181b01e433d0b035ed2 | packages/telescope-pages/lib/client/routes.js | packages/telescope-pages/lib/client/routes.js | Telescope.config.adminMenu.push({
route: 'pages',
label: 'Pages',
description: 'manage_static_pages'
});
Telescope.config.preloadSubscriptions.push('pages');
PageController = RouteController.extend({
getTitle: function () {
return Pages.collection.findOne({slug: this.params.slug}).title;
},
data: func... | Telescope.config.adminMenu.push({
route: 'pages',
label: 'Pages',
description: 'manage_static_pages'
});
Telescope.config.preloadSubscriptions.push('pages');
PageController = RouteController.extend({
currentPage: function () {
return Pages.collection.findOne({slug: this.params.slug});
},
getTitle: fun... | Handle case where Pages collection isn't loaded yet (although that should never happen…) | Handle case where Pages collection isn't loaded yet (although that should never happen…)
| JavaScript | mit | TodoTemplates/Telescope,MeteorHudsonValley/Telescope,hoihei/Telescope,tupeloTS/telescopety,NodeJSBarenko/Telescope,HelloMeets/HelloMakers,Scalingo/Telescope,manriquef/Vulcan,aykutyaman/Telescope,tupeloTS/grittynashville,Scalingo/Telescope,TribeMedia/Screenings,sungwoncho/Telescope,JstnEdr/Telescope,StEight/Telescope,ev... | ---
+++
@@ -7,11 +7,14 @@
Telescope.config.preloadSubscriptions.push('pages');
PageController = RouteController.extend({
+ currentPage: function () {
+ return Pages.collection.findOne({slug: this.params.slug});
+ },
getTitle: function () {
- return Pages.collection.findOne({slug: this.params.slug}).tit... |
9a2f2f3110d6aaa67fe7ac63d3f96bdd83636f21 | app/utils/constants.js | app/utils/constants.js | import packageJson from './package.json';
module.exports = {
backendRoot: 'https://obscure-woodland-71302.herokuapp.com/',
flaskRoot: 'http://localhost:5000',
/* flaskRoot: 'http://catapp-staging.herokuapp.com/',*/
/* graphQLRoot: (process.env.NODE_ENV !== 'production') ? '//localhost:5000/graphql' : '//catapp... | import packageJson from './package.json';
module.exports = {
backendRoot: 'https://obscure-woodland-71302.herokuapp.com/',
/* flaskRoot: 'http://localhost:5000',*/
flaskRoot: 'http://catapp-staging.herokuapp.com/',
/* graphQLRoot: (process.env.NODE_ENV !== 'production') ? '//localhost:5000/graphql' : '//catapp... | Put all URLs to public | Put all URLs to public
| JavaScript | mit | mhoffman/CatAppBrowser,mhoffman/CatAppBrowser | ---
+++
@@ -2,8 +2,8 @@
module.exports = {
backendRoot: 'https://obscure-woodland-71302.herokuapp.com/',
- flaskRoot: 'http://localhost:5000',
- /* flaskRoot: 'http://catapp-staging.herokuapp.com/',*/
+ /* flaskRoot: 'http://localhost:5000',*/
+ flaskRoot: 'http://catapp-staging.herokuapp.com/',
/* graph... |
82da6073179d7c4107c313093d6c2cab88e017fc | server/sessions/sessionsController.js | server/sessions/sessionsController.js | var Session = require( './sessions' );
module.exports = {
getAllSessions: function(request, response) {
Session.findAll()
.then( function(sessions) {
response.send(sessions);
})
},
addSession: function(request, response) {
var sessionName = request.body.sessionName;
Session.create( {... | var helpers = require( '../config/helpers' );
var Session = require( './sessions' );
module.exports = {
getAllSessions: function( reqw, res, next ) {
Session.findAll()
.then( function( sessions ) {
response.send( sessions );
})
},
addSession: function( req, res, next ) {
var sessionName =... | Add endpoint for retrieving a single session | Add endpoint for retrieving a single session
| JavaScript | mpl-2.0 | CantillatingZygote/rubiginouschanticleer,RubiginousChanticleer/rubiginouschanticleer,RubiginousChanticleer/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer | ---
+++
@@ -1,15 +1,16 @@
+var helpers = require( '../config/helpers' );
var Session = require( './sessions' );
module.exports = {
- getAllSessions: function(request, response) {
+ getAllSessions: function( reqw, res, next ) {
Session.findAll()
- .then( function(sessions) {
- response.send(sessio... |
44160a484f20585b95dd034f4a40c5138cac0c45 | hobbes/extensions.js | hobbes/extensions.js | require('./extensions/es5');
require('./extensions/json');
// Based on Crockford's http://javascript.crockford.com/inheritance.html
if (!Function.prototype.inherits) {
Function.prototype.inherits = function (parent) {
// Use new instance of parent as prototype
var d = {}, p = (this.prototype = new parent());... | require('./extensions/es5');
require('./extensions/json');
// Based on Crockford's http://javascript.crockford.com/inheritance.html
if (!Function.prototype.inherits) {
Function.prototype.inherits = function (parent, constructorMembers) {
// Use new instance of parent as prototype
var d = {}, p = (this.protot... | Add optional initialization hash to `inherits` | Add optional initialization hash to `inherits`
| JavaScript | mit | knuton/hobbes,knuton/hobbes,knuton/hobbes,knuton/hobbes | ---
+++
@@ -3,7 +3,7 @@
// Based on Crockford's http://javascript.crockford.com/inheritance.html
if (!Function.prototype.inherits) {
- Function.prototype.inherits = function (parent) {
+ Function.prototype.inherits = function (parent, constructorMembers) {
// Use new instance of parent as prototype
va... |
7b7739a4df8788cb1f163e0ad8fedf01f0a55071 | app/js/app.js | app/js/app.js | window.ContactManager = {
Models: {},
Collections: {},
Views: {},
start: function(data) {
var contacts = new ContactManager.Collections.Contacts(data.contacts),
router = new ContactManager.Router();
router.on('route:home', function() {
router.navigate('contacts', {
trigger: true,... | window.ContactManager = {
Models: {},
Collections: {},
Views: {},
start: function(data) {
var contacts = new ContactManager.Collections.Contacts(data.contacts),
router = new ContactManager.Router();
router.on('route:home', function() {
router.navigate('contacts', {
trigger: true,... | Add new contact on form submitted | Add new contact on form submitted
| JavaScript | mit | dmytroyarmak/backbone-contact-manager,SomilKumar/backbone-contact-manager,EaswarRaju/angular-contact-manager,vinnu-313/backbone-contact-manager,SomilKumar/backbone-contact-manager,giastfader/backbone-contact-manager,vinnu-313/backbone-contact-manager,hrundik/angular-contact-manager,giastfader/backbone-contact-manager,h... | ---
+++
@@ -25,6 +25,12 @@
router.on('route:newContact', function() {
var newContactForm = new ContactManager.Views.ContactForm();
+ newContactForm.on('form:submitted', function(attrs) {
+ attrs.id = contacts.isEmpty() ? 1 : (_.max(contacts.pluck('id')) + 1);
+ contacts.add(attrs);
+ ... |
15ee70dd5bfaa06eedfda8a75f6c7c796c6bbd2a | bot/utilities/media.js | bot/utilities/media.js | var settings = require(process.cwd() + '/settings.js').settings;
var request = require('request');
module.exports.currentLink = "";
module.exports.currentName = "";
module.exports.currentID = "";
module.exports.currentType = "";
module.exports.currentDJName = "";
module.exports.getLink = function(bot, callback) {
va... | var settings = require(process.cwd() + '/settings.js').settings;
var request = require('request');
module.exports.currentLink = "";
module.exports.currentName = "";
module.exports.currentID = "";
module.exports.currentType = "";
module.exports.currentDJName = "";
module.exports.getLink = function(bot, callback) {
va... | Add fallback if invalid or no Soundcloud API key is set | Add fallback if invalid or no Soundcloud API key is set
| JavaScript | mit | coryshaw1/SteveBot,the2hill/TonerBot | ---
+++
@@ -19,14 +19,20 @@
var responseBack = function(error, response, body) {
if(!error){
- var body = JSON.parse(body);
- return callback(body.permalink_url);
+ try{
+ var json = JSON.parse(body);
+ return c... |
061d634b72d081d49532be98e2248f14bf7112d6 | quick-sort.js | quick-sort.js | // Program to sort an array using recursion
function quickSort(arr) {
if(arr.length == 0) {
return [];
}
var left = [], right = [], pivot = arr[0];
for(var i = 1; i < arr.length; i++) {
if(arr[i] < pivot) {
left.push(arr[i]);
} else {
right.push(arr[i]);
}
}
return quickSort(left).concat(pivot, quic... | // Program to sort an array using recursion
function quickSort(arr) {
if(arr.length == 0) {
return [];
}
var left = [], right = [], pivot = arr[0];
// compare first element in array to the rest
for(var i = 1; i < arr.length; i++) {
// if element being looked at is less than first element, put it in left array... | Add pseudocode to quick sort function | Add pseudocode to quick sort function
| JavaScript | mit | derekmpham/interview-prep,derekmpham/interview-prep | ---
+++
@@ -1,16 +1,20 @@
// Program to sort an array using recursion
+
function quickSort(arr) {
if(arr.length == 0) {
return [];
}
var left = [], right = [], pivot = arr[0];
+ // compare first element in array to the rest
for(var i = 1; i < arr.length; i++) {
+ // if element being looked at is less th... |
cf2cde301e150254d023068d79d8bcc2e959fb4d | server.js | server.js | /** hapijs default hello world **/
'use strict';
const Hapi = require('hapi');
// Create a server with a host and port
const server = new Hapi.Server();
server.connection({
host: 'localhost',
port: 8000
});
// Add the route
server.route({
method: 'GET',
path:'/hello',
handler: function (request,... | /** hapijs default hello world **/
'use strict';
const Hapi = require('hapi');
// Create a server with a host and port
const server = new Hapi.Server();
server.connection({
port: 8000
});
// Add the route
server.route({
method: 'GET',
path:'/hello',
handler: function (request, reply) {
retu... | Remove host from hapijs so it is not binding to a specific host | Remove host from hapijs so it is not binding to a specific host
| JavaScript | mit | ResistanceCalendar/resistance-calendar-api,ResistanceCalendar/resistance-calendar-api | ---
+++
@@ -7,7 +7,6 @@
// Create a server with a host and port
const server = new Hapi.Server();
server.connection({
- host: 'localhost',
port: 8000
});
|
dbefbfdc2dc8645899c4af16cf0cbcd765070554 | server.js | server.js | <<<<<<< HEAD
var port = process.env.PORT || 8080;
var StaticServer = require('static-server');
var server = new StaticServer({
rootPath: '.', // required, the root of the server file tree
port: port, // optional, defaults to a random port
=======
var StaticServer = require('static-server');... | var port = process.env.PORT || 8080;
var StaticServer = require('static-server');
var server = new StaticServer({
rootPath: '.', // required, the root of the server file tree
port: port, // optional, defaults to a random port
cors: '*', // optional, defaults to undefined
... | Use port env to keep heroku happy | Use port env to keep heroku happy
| JavaScript | mit | orangedrink/head-game,orangedrink/head-game | ---
+++
@@ -1,15 +1,8 @@
-<<<<<<< HEAD
var port = process.env.PORT || 8080;
var StaticServer = require('static-server');
var server = new StaticServer({
rootPath: '.', // required, the root of the server file tree
port: port, // optional, defaults to a random port
-=======
-var Stati... |
8f62c8e39c747e88b28498e1bc44204340479dc5 | server.js | server.js | const path = require('path')
const express = require('express')
const app = express()
const port = process.env.PORT ? process.env.PORT : 8081
const dist = path.join(__dirname, 'public')
function ensureSecure(req, res, next) { // eslint-disable-line
if (req.secure) {
return next()
}
res.redirect(`https://... | const path = require('path')
const express = require('express')
const app = express()
const port = process.env.PORT ? process.env.PORT : 8081
const dist = path.join(__dirname, 'public')
app.use(express.static(dist))
app.all('/*', function (req, res, next) { // eslint-disable-line
if (/^http$/.test(req.protocol))... | Update ensure secure express middleware | Update ensure secure express middleware
| JavaScript | mit | developer239/workbox-webpack-react,developer239/workbox-webpack-react | ---
+++
@@ -7,16 +7,16 @@
const dist = path.join(__dirname, 'public')
-function ensureSecure(req, res, next) { // eslint-disable-line
- if (req.secure) {
- return next()
+app.use(express.static(dist))
+
+app.all('/*', function (req, res, next) { // eslint-disable-line
+ if (/^http$/.test(req.protocol)) {
+ ... |
ef0394aa91480462ebee8857d2f35fdd40402c9a | app/assets/javascripts/conversations.js | app/assets/javascripts/conversations.js | var conversations = {
onRespondLaterClick: function() {
var $listItem = $(this).parents('.conversation-row').parent();
var path = $(this).attr('data-account-conversation-path');
var pushToEndOfQueue = function() {
var $list = $listItem.parent();
$listItem.remove().appendTo($list);
}
... | var conversations = {
onRespondLaterClick: function() {
var $listItem = $(this).parents('.conversation-row').parent();
var path = $(this).attr('data-account-conversation-path');
var pushToEndOfQueue = function() {
var $list = $listItem.parent();
$listItem.remove().appendTo($list);
}
... | Make sure the info button works with turbolinks | Make sure the info button works with turbolinks
| JavaScript | agpl-3.0 | asm-helpful/helpful-web,asm-helpful/helpful-web,asm-helpful/helpful-web,asm-helpful/helpful-web | ---
+++
@@ -30,9 +30,12 @@
}
}
-$(document).on("ready", function(){
+$(document).on("ready", function() {
$('.list').delegate('.respond-later', 'click', conversations.onRespondLaterClick);
$('.list').delegate('.archive', 'click', conversations.onArchiveClick);
+});
+
+$(document).on('ready page:load', fun... |
9a6ce516d1e96f5c9f5d54e07f94a9d68783ec4d | app/components/partials/Footer/index.js | app/components/partials/Footer/index.js | import React from 'react';
const styles = {
footer: {
padding: '10px',
position: 'fixed',
left: '0px',
bottom: '0px',
height: '45px',
width: '100%',
background: 'linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 1))',
},
};
function Footer() {
return (
<footer style=... | import React from 'react';
import FlatButton from 'material-ui/FlatButton';
import Dialog from 'material-ui/Dialog';
const styles = {
footer: {
padding: '5px',
position: 'fixed',
left: '0px',
display: 'flex',
flexDirection: 'row',
bottom: '0px',
height: '50px',
width: '100%',
back... | Support button in the footer | Support button in the footer
| JavaScript | mit | aaronlangford31/ruah-web,aaronlangford31/ruah-web | ---
+++
@@ -1,23 +1,41 @@
import React from 'react';
+import FlatButton from 'material-ui/FlatButton';
+import Dialog from 'material-ui/Dialog';
const styles = {
footer: {
- padding: '10px',
+ padding: '5px',
position: 'fixed',
left: '0px',
+ display: 'flex',
+ flexDirection: 'row',
... |
0a3cf3af3f6be773a2bbd56e4f6f8e28e7b07e77 | web/jasmine/spec/specIntelliasTest.js | web/jasmine/spec/specIntelliasTest.js | describe("Checking correctly data in object projects", function() {
it("Length of object should to equal 4", function() {
expect(projects.length).toEqual(4)
});
var i = 0;
while(i < projects.length) {
(function (project) {
it('project "' + project.name + '" should be active', function () {
... | Deploy functionality related with testing. | Deploy functionality related with testing.
| JavaScript | mit | sfedyna/test-intellias,sfedyna/test-intellias,sfedyna/test-intellias | ---
+++
@@ -1,3 +1,50 @@
+describe("Checking correctly data in object projects", function() {
+
+ it("Length of object should to equal 4", function() {
+ expect(projects.length).toEqual(4)
+ });
+
+ var i = 0;
+ while(i < projects.length) {
+ (function (project) {
+
+ it('project "' + project.name + '"... | |
3836a6ede8f391a1039dd1aed2b82674bc1f94b5 | assets/js/main.js | assets/js/main.js | function setStyle(style) {
var range, sel;
if (window.getSelection) {
sel = window.getSelection();
if (sel.getRangeAt) {
range = sel.getRangeAt(0);
}
document.designMode = "on";
if (range) {
sel.removeAllRanges();
sel.addRange(range);
}
document.execCommand(style, fals... | function setStyle(style, param) {
var range, sel;
if (window.getSelection) {
sel = window.getSelection();
if (sel.getRangeAt) {
range = sel.getRangeAt(0);
}
document.designMode = "on";
if (range) {
sel.removeAllRanges();
sel.addRange(range);
}
document.execCommand(styl... | Add function to add images by draggin from desktop | Add function to add images by draggin from desktop
| JavaScript | mit | guilhermecomum/minimal-editor | ---
+++
@@ -1,4 +1,4 @@
-function setStyle(style) {
+function setStyle(style, param) {
var range, sel;
if (window.getSelection) {
@@ -11,7 +11,7 @@
sel.removeAllRanges();
sel.addRange(range);
}
- document.execCommand(style, false, null);
+ document.execCommand(style, false, param);
... |
d2337b21a2378d9ffb0243534338c8092ff78e63 | src/app/services/navigationService.js | src/app/services/navigationService.js | 'use strict';
var angular = require('angular');
module.exports = angular.module('myApp.services.navigationService', [
])
.service('NavigationService', function (
) {
return {
getMainNavItems: function () {
return [
{
title: 'Projects',
url: '/#/',
path: '/'
},
{
title: 'About',
... | 'use strict';
var angular = require('angular');
module.exports = angular.module('myApp.services.navigationService', [
])
.service('NavigationService', function (
) {
return {
getMainNavItems: function () {
return [
{
title: 'Projects',
url: '/#/',
path: '/'
},
{
title: 'About',
... | Add play to the navigation | Add play to the navigation
| JavaScript | mit | SirKettle/myPortfolio,SirKettle/myPortfolio | ---
+++
@@ -20,6 +20,11 @@
path: '/about'
},
{
+ title: 'Play',
+ url: '/#/play',
+ path: '/play'
+ },
+ {
title: 'Resume',
url: 'http://bit.ly/1cGjA8X'
} |
5b50833ca0595d0939d53e54dc289910431dbeb7 | src/app/Chat/Message/MessageResult.js | src/app/Chat/Message/MessageResult.js | /* @flow */
import React from 'react'
import type { MessageResult } from 'types'
import styles from './style.css'
type RollsProps = {
rolls: Array<number>
}
const Rolls = (props: RollsProps) => {
return <span>
{props.rolls.map((roll, i, arr) => (
<span>
<span className={styles.roll}>
{ ... | /* @flow */
import React from 'react'
import type { MessageResult } from 'types'
import styles from './style.css'
type RollsProps = {
rolls: Array<number>
}
const Rolls = (props: RollsProps) => {
return <span>
{props.rolls.map((roll, i, arr) => (
<span key={i}>
<span className={styles.roll}>
... | Fix React warning regarding 'key' prop in render. | Fix React warning regarding 'key' prop in render.
| JavaScript | mit | jsonnull/aleamancer,jsonnull/aleamancer | ---
+++
@@ -9,7 +9,7 @@
const Rolls = (props: RollsProps) => {
return <span>
{props.rolls.map((roll, i, arr) => (
- <span>
+ <span key={i}>
<span className={styles.roll}>
{ roll }
</span> |
ec559a4be4b2dc852cfa7ca82d792918896801bd | src/fx.js | src/fx.js | // Zepto.js
// (c) 2010, 2011 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
(function($, undefined){
var supportedTransforms = [
'scale scaleX scaleY',
'translate', 'translateX', 'translateY', 'translate3d',
'skew', 'skewX', 'skewY',
'rotate', 'rot... | // Zepto.js
// (c) 2010, 2011 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
(function($, undefined){
var supportedTransforms = [
'scale scaleX scaleY',
'translate', 'translateX', 'translateY', 'translate3d',
'skew', 'skewX', 'skewY',
'rotate', 'rot... | Refactor usage cssProperties in $.fn.anim | Refactor usage cssProperties in $.fn.anim
| JavaScript | mit | huaziHear/zepto,Genie77998/zepto,zhangwei001/zepto,fbiz/zepto,wubian0517/zepto,yuhualingfeng/zepto,alatvanas9/zepto,treejames/zepto,nerdgore/zepto,afgoulart/zepto,kolf/zepto,assgod/zepto,wanglam/zepto,dajbd/zepto,wanglam/zepto,leolin1229/zepto,zhangwei001/zepto,vincent1988/zepto,GerHobbelt/zepto,zhengdai/zepto,GerHobbe... | ---
+++
@@ -30,13 +30,14 @@
else
setTimeout(wrappedCallback, 0);
+ if (transforms.length > 0) {
+ cssProperties['-webkit-transform'] = transforms.join(' ')
+ }
+
+ cssProperties['-webkit-transition'] = 'all ' + (duration !== undefined ? duration : 0.5) + 's ' + (ease || '');
+
setTime... |
27bf060e5aa061b748b8e20deb7215e800c9c249 | client/config/index.js | client/config/index.js | 'use strict'
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
... | 'use strict'
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
... | Change port for client development | Change port for client development
| JavaScript | agpl-3.0 | 1element/sc,1element/sc,1element/sc | ---
+++
@@ -25,7 +25,7 @@
},
dev: {
env: require('./dev.env'),
- port: 8080,
+ port: 8081,
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/', |
1039880516112abc388e660ab8e6cb782deea42e | clients/web/js/util.js | clients/web/js/util.js | // Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
module.exports = {
shortName: shortName,
firstShortName: firstShortName,
randomHex: randomHex
};
// Note, shortName and firstShortName are duplicat... | // Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
var security = require('vanadium').security;
module.exports = {
shortName: shortName,
firstShortName: firstShortName,
randomHex: randomHex
};
// N... | Fix chat to use security.ChainSeperator instead of hard-coded value. | Fix chat to use security.ChainSeperator instead of hard-coded value.
Change-Id: Ie83886089e802cad27d69df8b53b421f6a2aef72
| JavaScript | bsd-3-clause | vanadium/chat,vanadium/chat,vanadium/chat,vanadium/chat,vanadium/chat | ---
+++
@@ -1,6 +1,8 @@
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+
+var security = require('vanadium').security;
module.exports = {
shortName: shortName,
@@ -14,7 +16,7 @@
// Split i... |
2298e7cc99cd4d9c68c963046049969b0a076754 | generators/app/templates/Component.js | generators/app/templates/Component.js | import React, { Component } from 'react';
import s from './<%= componentName %>.scss';
import withStyles from '../withStyles';
class <%= componentName %> extends Component {
render() {
return <div></div>;
}
}
export default withStyles(<%= componentName %>, s);
| import React, { Component } from 'react';
<% if (componentStyleExtension !== 'none') { -%>
import withStyles from '../withStyles';
import s from './LoginPage.scss';
<% } -%>
class <%= componentName %> extends Component {
render() {
return <div></div>;
}
}
<% if (componentStyleExtension !== 'none') { -%>
exp... | Fix importing styles where there's none | Fix importing styles where there's none
| JavaScript | mit | gfpacheco/generator-react-starter-kit-component | ---
+++
@@ -1,6 +1,8 @@
import React, { Component } from 'react';
-import s from './<%= componentName %>.scss';
+<% if (componentStyleExtension !== 'none') { -%>
import withStyles from '../withStyles';
+import s from './LoginPage.scss';
+<% } -%>
class <%= componentName %> extends Component {
@@ -10,4 +12,8 @@... |
1f6fb464187db286087d2ec5a4c954c28c31e624 | spec/mobiread_test.js | spec/mobiread_test.js |
var loadFileUrl = function (url) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, false); // synchronous
// retrieve data unprocessed as a binary string
xhr.overrideMimeType("text/plain; charset=x-user-defined");
xhr.send();
if (xhr.status === 200) {
return xhr.response; // Note:... |
var loadFileUrl = function (url) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, false); // synchronous
// retrieve data unprocessed as a binary string
xhr.overrideMimeType("text/plain; charset=x-user-defined");
xhr.send();
if (xhr.status === 200) {
return xhr.response; // Note:... | Update location of local test file | Update location of local test file
| JavaScript | mit | daviddrysdale/jsebook,daviddrysdale/jsebook | ---
+++
@@ -22,7 +22,7 @@
it("should load and parse a valid file", function() {
var data;
var loadIt = function() {
- data = loadFileUrl("http://localhost/~dmd/current/jsebook/data/testbook.mobi");
+ data = loadFileUrl("http://localhost/~dmd/jsebook/data/testbook.mobi");
... |
11d1ad864ca23f9c5243ab85a015168e0a9faa34 | src/templates/infinite-scroll-link.js | src/templates/infinite-scroll-link.js | import React from 'react'
import Link from 'gatsby-link'
export default class InfiniteScrollLink extends React.Component {
constructor (props) {
super(props)
const observerOptions = {
root: null,
rootMargin: '0px',
threshold: 0.25
}
this.observerCallback = this.observerCallback.bi... | import React from 'react'
import Link from 'gatsby-link'
export default class InfiniteScrollLink extends React.Component {
constructor (props) {
super(props)
const observerOptions = {
root: null,
rootMargin: '0px',
threshold: 0.25
}
const callback = props.callback || (() => {})
... | Define a maximum number of calls to get more events; Request user action before requesting more; Remove unnecessary use of component state. | Define a maximum number of calls to get more events;
Request user action before requesting more;
Remove unnecessary use of component state.
| JavaScript | mit | LuisLoureiro/placard-wrapper | ---
+++
@@ -10,38 +10,52 @@
rootMargin: '0px',
threshold: 0.25
}
+ const callback = props.callback || (() => {})
this.observerCallback = this.observerCallback.bind(this)
-
- this.state = {
- observer: new window.IntersectionObserver(this.observerCallback(props.callback || (() => {... |
8d2e3aa557a754275062b829e74b71e98a162c6f | src/pages/workshops/drafts.js | src/pages/workshops/drafts.js | import React, { Fragment } from 'react'
import Link from 'gatsby-link'
import styled from 'styled-components'
import { Container, Flex, Heading } from '@hackclub/design-system'
import storage from '../../storage'
import BG from '../../components/BG'
import Sheet from '../../components/Sheet'
import FeatherIcon from '.... | import React, { Fragment } from 'react'
import Link from 'gatsby-link'
import styled from 'styled-components'
import { Container, Flex, Box, Heading, Text } from '@hackclub/design-system'
import ReactMarkdown from 'react-markdown'
import storage from '../../storage'
import BG from '../../components/BG'
import Sheet fr... | Add body to draft card | Add body to draft card
| JavaScript | mit | hackclub/website,hackclub/website,hackclub/website | ---
+++
@@ -1,7 +1,8 @@
import React, { Fragment } from 'react'
import Link from 'gatsby-link'
import styled from 'styled-components'
-import { Container, Flex, Heading } from '@hackclub/design-system'
+import { Container, Flex, Box, Heading, Text } from '@hackclub/design-system'
+import ReactMarkdown from 'react-... |
a85a6deefa094d1a79c9cdd7c7342605e6c27dda | js/functions.js | js/functions.js | function statusIdToText(id) {
if(id==0) {
return 'Offline';
}
else if(id==1) {
return 'Available';
}
else if(id==2) {
return 'Away';
}
else if(id==3){
return 'Occupied';
}
}
function getCurrentTimestamp(){
return Date.now();
}
function timestampToTimeOfDay(timestam... | function statusIdToText(id) {
if(id==0) {
return 'Offline';
}
else if(id==1) {
return 'Available';
}
else if(id==2) {
return 'Away';
}
else if(id==3){
return 'Occupied';
}
}
function getCurrentTimestamp(){
return Date.now() / 1000;
}
function timestampToTimeOfDay(t... | Fix timestamp function to give seconds | Fix timestamp function to give seconds
| JavaScript | mit | perrr/svada,perrr/svada | ---
+++
@@ -14,7 +14,7 @@
}
function getCurrentTimestamp(){
- return Date.now();
+ return Date.now() / 1000;
}
function timestampToTimeOfDay(timestamp) { |
274137fa8f11c6b53071c625ace15cffad526e9c | examples/client/services/account.js | examples/client/services/account.js | angular.module('MyApp')
.factory('Account', ['$http', '$window', function($http, $window) {
return {
getUserInfo: function() {
return $http.get('/api/me?token=' + $window.localStorage.token);
}
};
}]); | angular.module('MyApp')
.factory('Account', ['$http', '$window', function($http, $window) {
return {
getUserInfo: function() {
return $http.get('/api/me');
}
};
}]); | Remove token querystring from API call | Remove token querystring from API call
| JavaScript | mit | peterkim-ijet/satellizer,xxryan1234/satellizer,celrenheit/satellizer,jayzeng/satellizer,shikhardb/satellizer,maciekrb/satellizer,NikolayGalkin/satellizer,hsr-ba-fs15-dat/satellizer,amitport/satellizer,ELAPAKAHARI/satellizer,ELAPAKAHARI/satellizer,celrenheit/satellizer,redwood-strategic/satellizer,david300/satellizer,EL... | ---
+++
@@ -2,7 +2,7 @@
.factory('Account', ['$http', '$window', function($http, $window) {
return {
getUserInfo: function() {
- return $http.get('/api/me?token=' + $window.localStorage.token);
+ return $http.get('/api/me');
}
};
}]); |
c109f3bb3d6eac0a3fd2a39717c5d34a27678567 | landing/utils/auth/login/login.controller.js | landing/utils/auth/login/login.controller.js | (() => {
'use strict';
angular
.module('app')
.controller('LoginController', LoginController);
LoginController.$inject = ['growl', '$window', '$http', '$routeSegment', 'TokenService', 'Endpoints'];
function LoginController(growl, $window, $http, $routeSegment, TokenService, Endpoints)... | (() => {
'use strict';
angular
.module('app')
.controller('LoginController', LoginController);
LoginController.$inject = ['growl', '$window', '$http', '$routeSegment', 'TokenService', 'Endpoints'];
function LoginController(growl, $window, $http, $routeSegment, TokenService, Endpoints)... | Fix bug with reloading on Login page | Fix bug with reloading on Login page
| JavaScript | mit | royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app | ---
+++
@@ -44,7 +44,6 @@
$window.location.pathname = '/app/';
} else {
growl.info(res.data.data.message);
- $routeSegment.chain[0].reload();
}
}
|
d2f2523243a192a5d03dae1c1b33a6cdccc27c04 | src/assets/scripts/service-worker/service-worker.js | src/assets/scripts/service-worker/service-worker.js | // JavaScript Document
// Scripts written by YOURNAME @ YOURCOMPANY
// no service worker for previews
self.addEventListener("fetch", (event) => {
if (event.request.url.match(/preview=true/)) {
return;
}
});
// set up caching
toolbox.precache(["/", "../media/logo.svg", "../media/spritesheet.svg", "../... | // JavaScript Document
// Scripts written by YOURNAME @ YOURCOMPANY
// no service worker for previews
self.addEventListener("fetch", (event) => {
if (event.request.url.match(/preview=true/)) {
return;
}
});
// set up caching
toolbox.precache(["/", "../media/logo.svg", "../media/spritesheet.svg", "../... | Correct order of files to cache | Correct order of files to cache
| JavaScript | mit | JacobDB/new-site,revxx14/new-site,JacobDB/new-site,revxx14/new-site,JacobDB/new-site | ---
+++
@@ -10,7 +10,7 @@
});
// set up caching
-toolbox.precache(["/", "../media/logo.svg", "../media/spritesheet.svg", "../styles/modern.css", "../scripts/modern.js"]);
+toolbox.precache(["/", "../media/logo.svg", "../media/spritesheet.svg", "../scripts/modern.js", "../styles/modern.css"]);
toolbox.router.get(... |
575b107f092032f04d0169400d04e978449ac4af | src/devtools/model.js | src/devtools/model.js | // @flow
import type {Snapshot, SnapshotItem} from 'redux-ship';
export type State = {
logs: {action: mixed, snapshot: Snapshot<mixed, mixed>}[],
selectedLog: ?number,
selectedSnapshotItem: ?SnapshotItem<mixed, mixed>,
};
export const initialState: State = {
logs: [],
selectedLog: null,
selectedSnapshotIt... | // @flow
import type {Snapshot, SnapshotItem} from 'redux-ship';
export type State = {
logs: {action: mixed, snapshot: Snapshot<mixed, mixed>}[],
selectedLog: ?number,
selectedSnapshotItem: ?SnapshotItem<mixed, mixed>,
};
export const initialState: State = {
logs: [],
selectedLog: null,
selectedSnapshotIt... | Fix bug to display the default snapshot item | Fix bug to display the default snapshot item
| JavaScript | mit | clarus/redux-ship-devtools,clarus/redux-ship-devtools | ---
+++
@@ -40,7 +40,9 @@
selectedLog: typeof state.selectedLog !== 'number' ?
state.logs.length :
state.selectedLog,
- selectedSnapshotItem: commit.snapshot[0] || null,
+ selectedSnapshotItem: typeof state.selectedLog !== 'number' ?
+ commit.snapshot[0] || null :... |
9d12bf2ed95636b177dd3674a2e00f46b8efda2c | routes/priority_service_170315/intro/steps.js | routes/priority_service_170315/intro/steps.js | module.exports = {
'/': {
backLink: '/../priority_service_170301/filter/uncancelled',
next: '/what-you-need'
},
'/before-you-continue-overseas': {
backLink: '/../priority_service_170301/overseas/uncancelled',
next: '/what-you-need-overseas'
},
'/what-you-need': {
... | module.exports = {
'/': {
backLink: '/../priority_service_170315/filter/uncancelled',
next: '/what-you-need'
},
'/before-you-continue-overseas': {
backLink: '/../priority_service_170315/overseas/uncancelled',
next: '/what-you-need-overseas'
},
'/what-you-need': {
... | Fix back links in intro | Fix back links in intro
| JavaScript | mit | UKHomeOffice/passports-prototype,UKHomeOffice/passports-prototype | ---
+++
@@ -1,10 +1,10 @@
module.exports = {
'/': {
- backLink: '/../priority_service_170301/filter/uncancelled',
+ backLink: '/../priority_service_170315/filter/uncancelled',
next: '/what-you-need'
},
'/before-you-continue-overseas': {
- backLink: '/../priority_service_1... |
4cea628e0c215f2a13489022068f6e38cab5aaa4 | Libraries/Core/setUpReactRefresh.js | Libraries/Core/setUpReactRefresh.js | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
if (__DEV__) {
const NativeDevSettings = require('../NativeModules/specs/NativeDevSettings'... | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
if (__DEV__) {
const DevSettings = require('../Utilities/DevSettings');
if (typeof DevSe... | Add reloadWithReason to Fast Refresh | Add reloadWithReason to Fast Refresh
Summary: This diff adds reload reasons to Fast Refresh. This will help us understand why, for internal Facebook users, Fast Refresh is bailing out to a full reload so that we can improve it for everyone.
Reviewed By: cpojer
Differential Revision: D17499348
fbshipit-source-id: b6... | JavaScript | bsd-3-clause | pandiaraj44/react-native,myntra/react-native,pandiaraj44/react-native,hammerandchisel/react-native,exponent/react-native,javache/react-native,facebook/react-native,javache/react-native,hammerandchisel/react-native,janicduplessis/react-native,javache/react-native,exponentjs/react-native,arthuralee/react-native,janicdupl... | ---
+++
@@ -10,10 +10,9 @@
'use strict';
if (__DEV__) {
- const NativeDevSettings = require('../NativeModules/specs/NativeDevSettings')
- .default;
+ const DevSettings = require('../Utilities/DevSettings');
- if (typeof NativeDevSettings.reload !== 'function') {
+ if (typeof DevSettings.reload !== 'funct... |
d8b9ff420d60510c8d74de728923a60af78677b4 | node_modules_build/kwf-webpack/trl/trl-html-webpack-plugin.js | node_modules_build/kwf-webpack/trl/trl-html-webpack-plugin.js | 'use strict';
var HtmlWebpackPlugin = require('html-webpack-plugin');
var fs = require('fs');
class TrlHtmlWebpackPlugin extends HtmlWebpackPlugin
{
htmlWebpackPluginAssets(compilation, chunks) {
let language = this.options.language;
let ret = super.htmlWebpackPluginAssets(compilation, chunks);
... | 'use strict';
var HtmlWebpackPlugin = require('html-webpack-plugin');
var fs = require('fs');
class TrlHtmlWebpackPlugin extends HtmlWebpackPlugin
{
htmlWebpackPluginAssets(compilation, chunks) {
let language = this.options.language;
let ret = super.htmlWebpackPluginAssets(compilation, chunks);
... | Fix trl: Don't access filesystem, file doesn't get written when using dev-server | Fix trl: Don't access filesystem, file doesn't get written when using dev-server
| JavaScript | bsd-2-clause | koala-framework/koala-framework,koala-framework/koala-framework | ---
+++
@@ -9,7 +9,7 @@
let ret = super.htmlWebpackPluginAssets(compilation, chunks);
chunks.forEach(chunk => {
chunk.files.forEach(file => {
- if (fs.existsSync(compilation.options.output.path+'/' + language + '.' + file)) {
+ if (compilation.assets[langua... |
3067aa2d3c4beb1a2aca4ff59d7d2b88d33c8b84 | app/components/gh-content-view-container.js | app/components/gh-content-view-container.js | import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'section',
classNames: ['gh-view', 'content-view-container'],
previewIsHidden: false,
resizeService: Ember.inject.service(),
calculatePreviewIsHidden: function () {
if (this.$('.content-preview').length) {
... | import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'section',
classNames: ['gh-view', 'content-view-container'],
previewIsHidden: false,
resizeService: Ember.inject.service(),
_resizeListener: null,
calculatePreviewIsHidden: function () {
if (this.$('.conten... | Fix teardown of resize handler in content management screen | Fix teardown of resize handler in content management screen
refs #5659 ([comment](https://github.com/TryGhost/Ghost/issues/5659#issuecomment-137114898))
- cleans up resize handler on willDestroy hook of gh-content-view-container
| JavaScript | mit | TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin,kevinansfield/Ghost-Admin,acburdine/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,TryGhost/Ghost-Admin,JohnONolan/Ghost-Admin,acburdine/Ghost-Admin,dbalders/Ghost-Admin,airycanon/Ghost-Admin | ---
+++
@@ -8,6 +8,8 @@
resizeService: Ember.inject.service(),
+ _resizeListener: null,
+
calculatePreviewIsHidden: function () {
if (this.$('.content-preview').length) {
this.set('previewIsHidden', !this.$('.content-preview').is(':visible'));
@@ -16,8 +18,12 @@
didInsert... |
2d5eeac4f046d09d7f2bab77f7f65a89a84d5f46 | app/js/components/service_edit_attribute.js | app/js/components/service_edit_attribute.js | 'use strict';
$(document).ready(function() {
function enableOrDisableAttributeField() {
var rows = $(this)
.parents('.attribute-row-wrapper')
.find('.form-row');
if ($(this).is(':checked')) {
rows.removeClass('disabled');
var motivation = rows.find(... | 'use strict';
$(document).ready(function() {
function enableOrDisableAttributeField() {
var rows = $(this)
.parents('.attribute-row-wrapper')
.find('.form-row');
if ($(this).is(':checked')) {
rows.removeClass('disabled');
var motivation = rows.find(... | Fix service edit javascript bug | Fix service edit javascript bug
The value that was set was overwritten directly.
| JavaScript | apache-2.0 | SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard | ---
+++
@@ -11,7 +11,9 @@
var motivation = rows.find('input.motivation');
motivation.removeAttr('disabled');
- motivation.val(motivation.data('old-value'));
+ if (motivation.data('old-value')) {
+ motivation.val(motivation.data('old-value'));
+ ... |
62b7d5f8a318de1ab1a9656e063127ae1377dae5 | waffle/templates/waffle/waffle.js | waffle/templates/waffle/waffle.js | (function(){
var FLAGS = {
{% for flag, value in flags %}'{{ flag }}': {% if value %}true{% else %}false{% endif %}{% if not forloop.last %},{% endif %}{% endfor %}
},
SWITCHES = {
{% for switch, value in switches %}'{{ switch }}': {% if value %}true{% else %}false{% endif %}{% if not forloop.last %},... | (function(){
var FLAGS = {
{% for flag, value in flags %}'{{ flag }}': {% if value %}true{% else %}false{% endif %}{% if not forloop.last %},{% endif %}{% endfor %}
},
SWITCHES = {
{% for switch, value in switches %}'{{ switch }}': {% if value %}true{% else %}false{% endif %}{% if not forloop.last %},... | Add get_flags method to access all flags | Add get_flags method to access all flags
| JavaScript | bsd-3-clause | webus/django-waffle,groovecoder/django-waffle,mwaaas/django-waffle-session,engagespark/django-waffle,webus/django-waffle,ilanbm/django-waffle,rodgomes/django-waffle,rlr/django-waffle,rodgomes/django-waffle,rlr/django-waffle,JeLoueMonCampingCar/django-waffle,crccheck/django-waffle,groovecoder/django-waffle,isotoma/djang... | ---
+++
@@ -9,6 +9,9 @@
{% for sample, value in samples %}'{{ sample }}': {% if value %}true{% else %}false{% endif %}{% if not forloop.last %},{% endif %}{% endfor %}
};
window.waffle = {
+ "get_flags": function get_flags() {
+ return FLAGS;
+ },
"flag_is_active": function waffle_flag(fl... |
9ec283d23a5c7f85e47e0e6ea8f78dce74d756c4 | src/main/webapp/controllers/maincontroller.js | src/main/webapp/controllers/maincontroller.js | ords.controller('mainController', function($rootScope,$location, User, Project) {
//
// If we're not logged in, redirect to login
//
$rootScope.user = User.get(
function successCallback() {
$rootScope.loggedIn="yes"
//
// Load initial projects
//
Project.query({}, function(data)... | ords.controller('mainController', function(AuthService) {
//
// Conduct auth check
//
AuthService.check();
}); | Use AuthService rather than custom controller code | Use AuthService rather than custom controller code
| JavaScript | apache-2.0 | ox-it/ords-ui,ox-it/ords-ui,ox-it/ords-ui,ox-it/ords-ui,ox-it/ords-ui | ---
+++
@@ -1,23 +1,8 @@
-ords.controller('mainController', function($rootScope,$location, User, Project) {
-
- //
- // If we're not logged in, redirect to login
- //
- $rootScope.user = User.get(
- function successCallback() {
- $rootScope.loggedIn="yes"
- //
- // Load initial projects
- //... |
8e90194f7d38136be48bfebc8fc3c45d88dbc2d6 | shells/browser/shared/src/renderer.js | shells/browser/shared/src/renderer.js | /**
* In order to support reload-and-profile functionality, the renderer needs to be injected before any other scripts.
* Since it is a complex file (with imports) we can't just toString() it like we do with the hook itself,
* So this entry point (one of the web_accessible_resources) provcides a way to eagerly injec... | /**
* In order to support reload-and-profile functionality, the renderer needs to be injected before any other scripts.
* Since it is a complex file (with imports) we can't just toString() it like we do with the hook itself,
* So this entry point (one of the web_accessible_resources) provcides a way to eagerly injec... | Add comment about 3rd party integrations | Add comment about 3rd party integrations
| JavaScript | mit | facebook/react,TheBlasfem/react,mosoft521/react,terminatorheart/react,acdlite/react,acdlite/react,jzmq/react,chenglou/react,Simek/react,facebook/react,jzmq/react,flarnie/react,yungsters/react,rricard/react,flarnie/react,flarnie/react,camsong/react,ericyang321/react,tomocchino/react,Simek/react,camsong/react,camsong/rea... | ---
+++
@@ -15,6 +15,9 @@
'__REACT_DEVTOOLS_ATTACH__',
({
enumerable: false,
+ // This property needs to be configurable to allow third-party integrations
+ // to attach their own renderer. Note that using third-party integrations
+ // is not officially supported. Use at your own risk.
config... |
b9f5c1d83112dd6cd4ac4ccfb3d1d7e2d74c072e | public/app/scripts/services/user.js | public/app/scripts/services/user.js | angular.module('publicApp').service('UserService', ['$http','$location', function($http, $location) {
var user = {
isLogged: false,
username: '',
login: function(username, password) {
user = this
$http.post('/api/v1/sessions', {
name: username,
password: password
}).success(function(r... | angular.module('publicApp').service('UserService', ['$http','$location', function($http, $location) {
var user = {
isLogged: false,
username: '',
updateSession: function(fn){
$http.get('/api/v1/sessions').success(function(resp){
console.log('response')
console.log(resp)
if (... | Add the updateSession method to the UserService | [FEATURE] Add the updateSession method to the UserService
| JavaScript | isc | zealord/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,zealord/gatewayd | ---
+++
@@ -3,17 +3,31 @@
isLogged: false,
username: '',
+ updateSession: function(fn){
+ $http.get('/api/v1/sessions').success(function(resp){
+ console.log('response')
+ console.log(resp)
+ if (resp.success && resp.session) {
+ console.log('yes')
+ console.... |
142e8924e238a5eeae8a74a826ea3f66a21d969b | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Add bootstrap-sprockets to js manifest | Add bootstrap-sprockets to js manifest
| JavaScript | mit | RomanovRoman/react-webpack-rails-tutorial,justin808/react-webpack-rails-tutorial,stevecj/term_palette_maker,stevecj/term_palette_maker,thiagoc7/react-webpack-rails-tutorial,RomanovRoman/react-webpack-rails-tutorial,StanBoyet/react-webpack-rails-tutorial,csterritt/react-webpack-rails-tutorial,csmalin/react-webpack-rails... | ---
+++
@@ -13,6 +13,8 @@
//= require jquery
//= require jquery_ujs
+//= require bootstrap-sprockets
+
// Important to import jquery_ujs before rails-bundle as that patches jquery xhr to use the authenticity token!
//= require rails-bundle |
df1e74ea954460dd0379a11017d52d31b3f7df6c | src/scripts/config.js | src/scripts/config.js | 'use strict';
module.exports = {
CATEGORY_NAME_MAXLENGTH: 20,
NOTE_TITLE_MAXLENGTH: 20,
NOTE_BODY_MAXLENGTH: 500,
UNSPECIFIED_CATEGORY_NAME: 'Unspecified'
};
| 'use strict';
module.exports = {
CATEGORY_NAME_MAXLENGTH: 20,
NOTE_TITLE_MAXLENGTH: 20,
NOTE_BODY_MAXLENGTH: 1000,
UNSPECIFIED_CATEGORY_NAME: 'Unspecified'
};
| Increase note body max length | Increase note body max length
| JavaScript | mit | iuux/adrx-quicknotes,iuux/adrx-quicknotes | ---
+++
@@ -3,6 +3,6 @@
module.exports = {
CATEGORY_NAME_MAXLENGTH: 20,
NOTE_TITLE_MAXLENGTH: 20,
- NOTE_BODY_MAXLENGTH: 500,
+ NOTE_BODY_MAXLENGTH: 1000,
UNSPECIFIED_CATEGORY_NAME: 'Unspecified'
}; |
a353142806098899952ebaa5dfb799411422948a | test/unit/prototype/detach.js | test/unit/prototype/detach.js | /* eslint-env jasmine */
var editTypes = require('../helpers/edit-types')
var makeEditableElement = ('../helpers/make-editable-element')
var Edited = require('../../..')
describe('`detach` method', function () {
it('detaches the instance\'s event listener from the instance\'s element',
function () {
var elem... | /* eslint-env jasmine */
var editTypes = require('../helpers/edit-types')
var makeEditableElement = require('../helpers/make-editable-element')
var Edited = require('../../..')
describe('`detach` method', function () {
it('detaches the instance\'s event listener from the instance\'s element',
function () {
v... | Fix typo in unit test | Fix typo in unit test
| JavaScript | bsd-3-clause | PolicyStat/edited | ---
+++
@@ -1,6 +1,6 @@
/* eslint-env jasmine */
var editTypes = require('../helpers/edit-types')
-var makeEditableElement = ('../helpers/make-editable-element')
+var makeEditableElement = require('../helpers/make-editable-element')
var Edited = require('../../..')
describe('`detach` method', function () { |
0244e6d127837776eff2605fdd4d067eee8930d2 | elements/uql-apps-button/uql-apps-button.js | elements/uql-apps-button/uql-apps-button.js |
(function () {
Polymer({
is: 'uql-apps-button',
properties: {
/** Whether to display title of the button */
showTitle: {
type: Boolean,
value: true
},
/** Button title text */
buttonTitle: {
type: String,
value: "My Library"
},
/** Val... |
(function () {
Polymer({
is: 'uql-apps-button',
properties: {
/** Whether to display title of the button */
showTitle: {
type: Boolean,
value: true
},
/** Button title text */
buttonTitle: {
type: String,
value: "My Library"
},
/** Val... | Change My Library auth url | Change My Library auth url
| JavaScript | mit | uqlibrary/uqlibrary-reusable-components,uqlibrary/uqlibrary-reusable-components,uqlibrary/uqlibrary-reusable-components | ---
+++
@@ -16,7 +16,7 @@
/** Value of redirect URL */
redirectUrl: {
type: String,
- value: "https://app.library.uq.edu.au/auth/mylibrary"
+ value: "https://www..library.uq.edu.au/mylibrary"
}
},
|
47359eac53865925a8e97c5dffc7d064da7858ed | src/js/app/modules/user/RegisterController.js | src/js/app/modules/user/RegisterController.js | /**
* Registers a new user. After signing up, the user gets an activation code per mail. With this
* code, the user can activate his account.
*/
app.controller('RegisterController', function($scope, $location, $http){
// $scope.user = {
// username: "henkie",
// fullname: "Henkie Henk",
// email: "hen... | /**
* Registers a new user. After signing up, the user gets an activation code per mail. With this
* code, the user can activate his account.
*/
app.controller('RegisterController', function($scope, $location, $http){
// $scope.user = {
// username: "henkie",
// fullname: "Henkie Henk",
// email: "hen... | Use url encoded form data in http request | Use url encoded form data in http request
| JavaScript | mit | tuvokki/hunaJS,tuvokki/hunaJS | ---
+++
@@ -19,21 +19,29 @@
};
$scope.register = function(){
-
- $http.post('/api/user/create', {
+ $http({
+ method: 'POST',
+ url: '/api/user/create',
+ headers: {'Content-Type': 'application/x-www-form-urlencoded'},
+ transformRequest: function(obj) {
+ var str = [];
+... |
1eda62d0824e7f903d031429f1a029b1ba091a28 | tests/dummy/config/targets.js | tests/dummy/config/targets.js | /* eslint-env node */
module.exports = {
browsers: [
'ie 9',
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
]
};
| /* eslint-env node */
'use strict';
const browsers = [
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
];
const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';
if (isCI || isProduction) {
browsers.push('ie 11');
}
module.exports = {
brows... | Drop support for IE9 and IE10 in dummy app | Drop support for IE9 and IE10 in dummy app
| JavaScript | mit | jonathanKingston/ember-cli-eslint,ember-cli/ember-cli-eslint,jonathanKingston/ember-cli-eslint,ember-cli/ember-cli-eslint | ---
+++
@@ -1,10 +1,19 @@
/* eslint-env node */
+'use strict';
+
+const browsers = [
+ 'last 1 Chrome versions',
+ 'last 1 Firefox versions',
+ 'last 1 Safari versions'
+];
+
+const isCI = !!process.env.CI;
+const isProduction = process.env.EMBER_ENV === 'production';
+
+if (isCI || isProduction) {
+ browsers.pu... |
22fa345844216bd692b62692b91d19e83b2565e1 | tests/reducers/errors-test.js | tests/reducers/errors-test.js | import errors from '../../src/reducers/errors';
import { GET_DATA_FAILED } from '../../src/actions/data';
describe('errors reducer', () => {
describe(`action type ${GET_DATA_FAILED}`, () => {
it('returns the error passed in an errors array', () => {
expect(errors([], {
type: GET_DATA_FAILED,
... | import errors from '../../src/reducers/errors';
import { GET_DATA_FAILED } from '../../src/actions/data';
describe('errors reducer', () => {
describe(`action type ${GET_DATA_FAILED}`, () => {
it('returns the error passed in an errors array', () => {
expect(errors([], {
type: GET_DATA_FAILED,
... | Cover two uncovered lines in error reducer test | Cover two uncovered lines in error reducer test [skip ci]
| JavaScript | mit | bjacobel/react-redux-boilerplate,bjacobel/rak,bjacobel/react-redux-boilerplate,bjacobel/rak,bjacobel/rak | ---
+++
@@ -30,4 +30,15 @@
})).toEqual(['foo', 'bar', 'fizz', 'baz']);
});
});
+
+ describe('by default', () => {
+ it('does nothing', () => {
+ expect(errors({}, { type: 'foo' })).toEqual({});
+ });
+
+ it('preserves passed state', () => {
+ const state = { foo: 'bar' };
+ exp... |
902d7e748e7f20ab64c60ff4b1c8b3bc55881ce7 | greatbigcrane/media/js/jquery.lineeditor.js | greatbigcrane/media/js/jquery.lineeditor.js | (function($) {
jQuery.fn.lineeditor = function (options, callback) {
return this.each(function () {
var el = this;
var $el = $(this);
if ( el.nodeName.toLowerCase() != 'textarea' ) { return; }
var hidden = $('<input type="hidden"/>').attr('id', el.id);
var contain... | (function($) {
jQuery.fn.lineeditor = function (options, callback) {
return this.each(function () {
var el = this;
var $el = $(this);
if ( el.nodeName.toLowerCase() != 'textarea' ) { return; }
var hidden = $('<input type="hidden"/>').attr('id', el.id);
var contain... | Make sure the input value is kept up-to-date ... | Make sure the input value is kept up-to-date ...
| JavaScript | apache-2.0 | pnomolos/greatbigcrane,pnomolos/greatbigcrane | ---
+++
@@ -26,12 +26,22 @@
var node = $('<input type="text"/>').val(value?value.toString():'');
var delete_node = $('<a href="#delete" class="delete">Delete</a>').click(removeLine);
container.find('a:last').before(node, delete_node);
+ processValues();
}
functi... |
0ec75f2cc954d2012d7be5cc1301f6153989b4de | modules/drinks/client/controllers/list-drinks.client.controller.js | modules/drinks/client/controllers/list-drinks.client.controller.js | (function () {
'use strict';
angular
.module('drinks', ['ngAnimate', 'toastr'])
.controller('DrinksListController', DrinksListController);
DrinksListController.$inject = ['DrinksService', '$state' , '$scope', 'toastr'];
function DrinksListController(DrinksService, $state, $scope, toastr) {
var vm... | (function () {
'use strict';
angular
.module('drinks', ['ngAnimate', 'toastr'])
.controller('DrinksListController', DrinksListController);
DrinksListController.$inject = ['DrinksService', '$state' , '$scope', 'toastr'];
function DrinksListController(DrinksService, $state, $scope, toastr) {
var vm... | Comment and toast delete tested | Comment and toast delete tested
| JavaScript | mit | UF-SE-3B/SwampHead-Brewery,UF-SE-3B/SwampHead-Brewery,UF-SE-3B/SwampHead-Brewery | ---
+++
@@ -29,12 +29,20 @@
}
}
+ //Menu drink toggle notification via toastr
function mvOnMenu(drink) {
- toastr.success(drink.drinkName + ' was added to tap!');
+ toastr.success(
+ drink.drinkName + ' was added to tap!',
+ {
+ closeHtml: '<button></butto... |
6eecd63cbe03ce0b0373b5a616621a1305071d25 | examples/instances.js | examples/instances.js | var instances = require('./../taillard');
var NEH = require('./../neh');
// Iterate over filtered Taillard instances
var filteredInstances = instances.filter(50, 20);
for(var i = 0; i < filteredInstances.length; i++) {
console.log(' name:', filteredInstances[i].name);
console.log(' number of... | var instances = require('./../taillard');
var NEH = require('./../neh');
var seed = require('./../seed-random');
// Iterate over filtered Taillard instances
var filteredInstances = instances.filter(50, 20);
for(var i = 0; i < filteredInstances.length; i++) {
// Overwrite Math.random by number generator with seed
... | Use number generator with seed | Use number generator with seed
| JavaScript | mit | manfredbork/flowshop | ---
+++
@@ -1,9 +1,13 @@
var instances = require('./../taillard');
var NEH = require('./../neh');
+var seed = require('./../seed-random');
// Iterate over filtered Taillard instances
var filteredInstances = instances.filter(50, 20);
for(var i = 0; i < filteredInstances.length; i++) {
+
+ // Overwrite Math.r... |
88fb80bb09b7f73c27eff9e2bc5dc4551fdf8b71 | src/main/webapp/scripts/app/app.constants.js | src/main/webapp/scripts/app/app.constants.js | "use strict";
// DO NOT EDIT THIS FILE, EDIT THE GRUNT TASK NGCONSTANT SETTINGS INSTEAD WHICH GENERATES THIS FILE
angular.module('publisherApp')
.constant('ENV', 'dev')
.constant('VERSION', '1.1.3-SNAPSHOT')
; | "use strict";
// DO NOT EDIT THIS FILE, EDIT THE GRUNT TASK NGCONSTANT SETTINGS INSTEAD WHICH GENERATES THIS FILE
angular.module('publisherApp')
.constant('ENV', 'dev')
.constant('VERSION', '1.1.4-SNAPSHOT')
; | Update ngconstant version after releasing | Update ngconstant version after releasing
| JavaScript | apache-2.0 | EsupPortail/esup-publisher,EsupPortail/esup-publisher,GIP-RECIA/esup-publisher-ui,EsupPortail/esup-publisher,GIP-RECIA/esup-publisher-ui,EsupPortail/esup-publisher,GIP-RECIA/esup-publisher-ui | ---
+++
@@ -4,6 +4,6 @@
.constant('ENV', 'dev')
-.constant('VERSION', '1.1.3-SNAPSHOT')
+.constant('VERSION', '1.1.4-SNAPSHOT')
; |
5ef82e3cf4ee4d567a2a670278b1f93fe2cfe5e6 | dev/_/components/js/singleSourceModel.js | dev/_/components/js/singleSourceModel.js |
var AV = {}
AV.source = Backbone.Model.extend({
url: 'redirect.php',
defaults: {
name: '',
type: 'raw',
contentType: 'txt',
data: ''
}
});
|
var AV = {};
AV.source = Backbone.Model.extend({
url: 'redirect.php',
defaults: {
name: '',
type: 'raw',
contentType: 'txt',
data: ''
}
});
| Add missing semicolon, because JS is weird. | Add missing semicolon, because JS is weird.
| JavaScript | bsd-3-clause | Swarthmore/juxtaphor,Swarthmore/juxtaphor | ---
+++
@@ -1,5 +1,5 @@
-var AV = {}
+var AV = {};
AV.source = Backbone.Model.extend({
url: 'redirect.php', |
199aec30d6c5746f74f295f04c2509187ff0bcd5 | src/directives/conversationControl.js | src/directives/conversationControl.js | ;(function() {
'use strict';
angular.module('gebo-client-performatives.conversationControl',
['gebo-client-performatives.request',
'templates/server-reply-request.html',
'templates/client-reply-request.html',
'templates/server-propose-discharge-perform.html',
... | ;(function() {
'use strict';
angular.module('gebo-client-performatives.conversationControl',
['gebo-client-performatives.request',
'templates/server-reply-request.html',
'templates/client-reply-request.html',
'templates/server-propose-discharge-perform.html',
... | Create a new scope for this directive | Create a new scope for this directive
| JavaScript | mit | RaphaelDeLaGhetto/gebo-client-performatives | ---
+++
@@ -29,6 +29,7 @@
return {
restrict: 'E',
+ scope: true,
link: _link,
};
}); |
0fb5c958d6b210bfb1a55b9fb197b4c59e612951 | server/app.js | server/app.js | const express = require('express');
const morgan = require('morgan');
const path = require('path');
const app = express();
// Setup logger
app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms'));
// Serve static assets
app.use(expre... | const express = require('express');
const morgan = require('morgan');
const path = require('path');
const app = express();
// Setup logger
app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms'));
// Serve static assets
app.use(expre... | Change where the files are stored in the server | Change where the files are stored in the server
| JavaScript | mit | escudero89/my-npc-manager,escudero89/my-npc-manager | ---
+++
@@ -8,11 +8,11 @@
app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms'));
// Serve static assets
-app.use(express.static(path.resolve(__dirname, '..', 'build')));
+app.use(express.static(path.resolve('..', 'build')));
... |
82d5c2644f226b3f6e3403fd8234573691ab7917 | web-app/js/smartR/Heatmap/heatmapValidator.js | web-app/js/smartR/Heatmap/heatmapValidator.js | //# sourceURL=heatmapValidator.js
'use strict';
/**
* Heatmap Validator
*/
window.HeatmapValidator = (function() {
var validator = {
NO_SUBSET_ERR : 'No subsets are selected',
NO_HD_ERR : 'No high dimension data is selected.',
NUMERICAL_ERR : 'Input must be numeric'
};
validato... | //# sourceURL=heatmapValidator.js
'use strict';
/**
* Heatmap Validator
*/
window.HeatmapValidator = (function() {
var validator = {
NO_SUBSET_ERR : 'No subsets are selected',
NO_HD_ERR : 'No high dimension data is selected.',
NUMERICAL_ERR : 'Input must be numeric'
};
validato... | Fix validator for existance of subsets | Fix validator for existance of subsets
| JavaScript | apache-2.0 | thehyve/heim-SmartR,thehyve/naa-SmartR,agapow/smartr,thehyve/heim-SmartR,agapow/smartr,agapow/smartr,thehyve/heim-SmartR,agapow/smartr,thehyve/naa-SmartR,thehyve/naa-SmartR,thehyve/heim-SmartR | ---
+++
@@ -14,7 +14,8 @@
};
validator.isEmptySubset = function (subsets) {
- return subsets.length < 1;
+ // we need to filter out nulls
+ return subsets.filter(function(x) { return x; }).length < 1;
};
validator.isEmptyHighDimensionalData = function (hd) { |
f28561f4dcc6280c6f1b3bc3bbee3beb18209433 | src/main/features/core/customStyle.js | src/main/features/core/customStyle.js | import fs from 'fs';
Emitter.on('FetchMainAppCustomStyles', () => {
const mainAppPath = Settings.get('mainAppStyleFile');
const css = mainAppPath && fs.existsSync(mainAppPath) ? fs.readFileSync(mainAppPath, 'utf8') : '';
Emitter.sendToAll('LoadMainAppCustomStyles', css);
});
Emitter.on('FetchGPMCustomStyles', (... | import fs from 'fs';
Emitter.on('FetchMainAppCustomStyles', () => {
const mainAppPath = Settings.get('mainAppStyleFile');
if (mainAppPath && fs.existsSync(mainAppPath)) {
fs.readFile(mainAppPath, 'utf8', (err, css) => {
Emitter.sendToAll('LoadMainAppCustomStyles', err ? '' : css);
});
}
});
Emitte... | Handle dumb paths being given to the custom CSS tooling | Handle dumb paths being given to the custom CSS tooling
| JavaScript | mit | petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MarshallOfSound/Google-Play... | ---
+++
@@ -2,12 +2,18 @@
Emitter.on('FetchMainAppCustomStyles', () => {
const mainAppPath = Settings.get('mainAppStyleFile');
- const css = mainAppPath && fs.existsSync(mainAppPath) ? fs.readFileSync(mainAppPath, 'utf8') : '';
- Emitter.sendToAll('LoadMainAppCustomStyles', css);
+ if (mainAppPath && fs.exis... |
261f74e6601be137fbd707884bd245e81215ae69 | src/app/lib/feeder.js | src/app/lib/feeder.js | import events from 'events';
class Feeder extends events.EventEmitter {
queue = [];
pending = false;
changed = false;
constructor() {
super();
this.on('change', () => {
this.changed = true;
});
}
feed(data) {
this.queue = this.queue.concat(data);
... | import events from 'events';
class Feeder extends events.EventEmitter {
queue = [];
pending = false;
changed = false;
constructor() {
super();
this.on('change', () => {
this.changed = true;
});
}
get state() {
return {
queue: this.queue.... | Return the state object using getter | Return the state object using getter
| JavaScript | mit | cncjs/cncjs,cncjs/cncjs,cheton/cnc.js,cheton/piduino-grbl,cheton/piduino-grbl,cheton/cnc,cheton/cnc.js,cheton/cnc.js,cncjs/cncjs,cheton/cnc,cheton/piduino-grbl,cheton/cnc | ---
+++
@@ -11,6 +11,11 @@
this.on('change', () => {
this.changed = true;
});
+ }
+ get state() {
+ return {
+ queue: this.queue.length
+ };
}
feed(data) {
this.queue = this.queue.concat(data); |
9d4d798038a75531741a31e1b5d62be0924c970e | components/box.js | components/box.js | import React from 'react'
import PropTypes from 'prop-types'
const Box = ({ children }) => (
<div>
{children}
<style jsx>{`
@import 'colors';
div {
background-color: $white;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
padding: 1.6em 2em;
border-radius: 2px;
... | import React from 'react'
import PropTypes from 'prop-types'
const Box = ({ children, title }) => (
<div className='wrapper'>
{title && <h3>{title}</h3>}
<div className='inner'>
{children}
</div>
<style jsx>{`
@import 'colors';
.wrapper {
background-color: $white;
... | Allow specifying a title to Box component | Allow specifying a title to Box component
| JavaScript | mit | sgmap/inspire,sgmap/inspire | ---
+++
@@ -1,22 +1,39 @@
import React from 'react'
import PropTypes from 'prop-types'
-const Box = ({ children }) => (
- <div>
- {children}
+const Box = ({ children, title }) => (
+ <div className='wrapper'>
+ {title && <h3>{title}</h3>}
+ <div className='inner'>
+ {children}
+ </div>
<... |
2e20144758ec8de935f924f70de092816422e770 | components/pages/Create/CreatePage.js | components/pages/Create/CreatePage.js | /**
* Created by allen on 02/06/2015.
*/
import React from "react";
import _Store from "../../../stores/_Store.js";
const defaultProps = {
title : "New To Do | Mega awesome To Do List"
};
export default React.createClass({
getDefaultProps : () => defaultProps,
getInitialState : () => {
... | /**
* Created by allen on 02/06/2015.
*/
import React from "react";
import _Store from "../../../stores/_Store.js";
const defaultProps = {
title : "New To Do | Mega awesome To Do List"
};
export default React.createClass({
getDefaultProps : () => defaultProps,
getInitialState : () => {
... | Tidy up and apply bootstrap styles to the add to do task page. | Tidy up and apply bootstrap styles to the add to do task page.
| JavaScript | mit | allenevans/react-isomorphic-demo | ---
+++
@@ -22,15 +22,32 @@
this.setState({task: event.target.value});
},
+ handleTaskAdd : function() {
+ if (this.state.task) {
+ console.log("Add:", this.state.task);
+ }
+
+ this.setState({
+ task : ""
+ });
+
+ event.preventDefault();
+ ... |
fbb128ca7c499d4ed3514554b9eba955c2860868 | config/env/all.js | config/env/all.js | 'use strict';
var path = require('path');
var rootPath = path.normalize(__dirname + '/../../..');
const REVIEW_STATE_FIELD = ''; // TODO: Adjust this to a new field GUID.
module.exports = {
root: rootPath,
ip: process.env.IP || '0.0.0.0',
port: process.env.PORT || 9000,
cip: {
baseURL: 'http://www.neao... | 'use strict';
var path = require('path');
var rootPath = path.normalize(__dirname + '/../..');
const REVIEW_STATE_FIELD = ''; // TODO: Adjust this to a new field GUID.
module.exports = {
root: rootPath,
ip: process.env.IP || '0.0.0.0',
port: process.env.PORT || 9000,
cip: {
baseURL: 'http://www.neaonli... | Add license mapping to config | Add license mapping to config
| JavaScript | mit | CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder | ---
+++
@@ -1,7 +1,7 @@
'use strict';
var path = require('path');
-var rootPath = path.normalize(__dirname + '/../../..');
+var rootPath = path.normalize(__dirname + '/../..');
const REVIEW_STATE_FIELD = ''; // TODO: Adjust this to a new field GUID.
@@ -29,6 +29,7 @@
sortOptions: require('../sort-options.... |
448cee0d641ec8b3f75774a339d3044d6a86c037 | src/core/team-core.js | src/core/team-core.js | const {knex} = require('../util/database').connect();
import _ from 'lodash';
import {deepChangeKeyCase} from '../util';
function getTeams() {
return knex.raw(`SELECT teams.id, teams.name, SUM(COALESCE(action_types.value, 0)) AS score
FROM teams
LEFT JOIN actions ON teams.id = actions.team_id
LEFT JOIN action_... | const {knex} = require('../util/database').connect();
import _ from 'lodash';
import {deepChangeKeyCase} from '../util';
function getTeams() {
return knex.raw(`SELECT teams.id, teams.name, teams.image_path, SUM(COALESCE(action_types.value, 0)) AS score
FROM teams
LEFT JOIN actions ON teams.id = actions.team_id
... | Return also teams.image_path from getTeams | Return also teams.image_path from getTeams
| JavaScript | mit | futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend | ---
+++
@@ -3,7 +3,7 @@
import {deepChangeKeyCase} from '../util';
function getTeams() {
- return knex.raw(`SELECT teams.id, teams.name, SUM(COALESCE(action_types.value, 0)) AS score
+ return knex.raw(`SELECT teams.id, teams.name, teams.image_path, SUM(COALESCE(action_types.value, 0)) AS score
FROM teams
... |
70c1b3d7c216844748cc35bf1f71d23f568ce734 | config/js/main.js | config/js/main.js | (function() {
loadOptions();
submitHandler();
})();
function submitHandler() {
var $submitButton = $('#submitButton');
$submitButton.on('click', function() {
console.log('Submit');
var return_to = getQueryParam('return_to', 'pebblejs://close#');
document.location = return_to + encodeURIComponent(... | function submitHandler() {
var $submitButton = $('#submitButton');
$submitButton.on('click', function() {
console.log('Submit');
var return_to = getQueryParam('return_to', 'pebblejs://close#');
document.location = return_to + encodeURIComponent(JSON.stringify(getAndStoreConfigData()));
});
}
functi... | Add loadOptions and wrap submit logic. | Add loadOptions and wrap submit logic.
| JavaScript | mit | nevraw/Fitbit-images,nevraw/Phi-Ocular,nevraw/Phi-Ocular,nevraw/Web,nevraw/Flux,nevraw/Quadrant,nevraw/Quadrant,nevraw/Edge,nevraw/Doodle,nevraw/Dual,nevraw/Test_Rocky,nevraw/Web,nevraw/IdentityCrisis,nevraw/Testing,nevraw/Quasar,nevraw/Testing,nevraw/SotoX,nevraw/Quasar,nevraw/Flux,nevraw/Doodle,nevraw/Flux,nevraw/Ide... | ---
+++
@@ -1,8 +1,3 @@
-(function() {
- loadOptions();
- submitHandler();
-})();
-
function submitHandler() {
var $submitButton = $('#submitButton');
|
520dc27f969ef79e0b64b2151f07c7f5f9f68be1 | app/components/Views/Section/Home/SearchBox.js | app/components/Views/Section/Home/SearchBox.js | /**
* Poster v0.1.0
* A React webapp to list upcoming movies and maintain a watchlist, powered by TMDb
*
* Author: Kushal Pandya <kushalspandya@gmail.com> (https://doublslash.com)
* Date: 13 June, 2016
* License: MIT
*
* Section > Home -> [ SearchBox ]
*/
import React from "react";
export default
class Searc... | /**
* Poster v0.1.0
* A React webapp to list upcoming movies and maintain a watchlist, powered by TMDb
*
* Author: Kushal Pandya <kushalspandya@gmail.com> (https://doublslash.com)
* Date: 13 June, 2016
* License: MIT
*
* Section > Home -> [ SearchBox ]
*/
import React from "react";
export default
class Searc... | Change input box to <form> to enable search with Enter key. | Change input box to <form> to enable search with Enter key.
| JavaScript | mit | kushalpandya/poster,kushalpandya/poster | ---
+++
@@ -19,12 +19,12 @@
render() {
return (
- <div class="input-group">
+ <form class="input-group">
<input type="text" class="form-control" placeholder="Search movies or people..." />
<span class="input-group-btn">
- <butt... |
b36bf2a38c0000449670e9a26c38395c9877389a | koans/AboutObjects.js | koans/AboutObjects.js | describe("About Objects", function () {
describe("Shorthand Syntax", function () {
it('should understand initailiser shorthand', function() {
function passThrough(one, two) {
return {
one,
two
}
}
var data = passThrough('one', 'two');
expect(typeof ... | describe("About Objects", function () {
describe("Shorthand Syntax", function () {
it('should understand initailiser shorthand', function() {
function passThrough(one, two) {
return {
one,
two
}
}
var data = passThrough('one', 'two');
expect(typeof ... | Add koan about object duplicate properties | feat: Add koan about object duplicate properties
| JavaScript | mit | tawashley/es6-javascript-koans,tawashley/es6-javascript-koans,tawashley/es6-javascript-koans | ---
+++
@@ -31,7 +31,7 @@
});
describe('Computed Names', function() {
- it('should understanding computed names usage', function() {
+ it('should understand computed names usage', function() {
var car = 'ford';
var engine = 'Engine';
@@ -50,4 +50,18 @@
})
})
+
+ describe('Dupl... |
c110d65481448e454117a70104148283b4d263a3 | api/authenticate/index.js | api/authenticate/index.js | var async = require( 'async' );
var Validation = require( './validation' );
var Data = require( './data' );
var Output = require( './output' );
var utils = require( '../utils' );
exports.authenticate = function ( req, res ) {
async.waterfall( [
function ( callback ) {
Validation.forAuthentica... | var async = require( 'async' );
var Validation = require( './validation' );
var Data = require( './data' );
var Output = require( './output' );
var utils = require( '../utils' );
exports.authenticate = function ( req, res ) {
async.waterfall( [
function ( callback ) {
Validation.forAuthentica... | Update function signature in req handler | Update function signature in req handler
| JavaScript | mit | projectweekend/Node-Backend-Seed | ---
+++
@@ -12,7 +12,7 @@
Validation.forAuthenticate( req.body, callback );
},
function ( validatedRequest, callback ) {
- Data.verifyCredentials( req.body.username, req.body.password );
+ Data.verifyCredentials( req.body.email, req.body.password, callback );
... |
7a4ed741ffa0bfd8044f7854ecf456b61ef4ff17 | src/lock/sso/index.js | src/lock/sso/index.js | import { Map } from 'immutable';
import LastLoginScreen from './last_login_screen';
import LoadingScreen from '../loading_screen';
import { ui, isConnectionEnabled } from '../index';
export function renderSSOScreens(m) {
if (!ui.rememberLastLogin(m)) return null;
// TODO: loading pin check belongs here?
if (m.g... | import { Map } from 'immutable';
import LastLoginScreen from './last_login_screen';
import LoadingScreen from '../loading_screen';
import { ui, isConnectionEnabled } from '../index';
export function renderSSOScreens(m) {
// TODO: loading pin check belongs here?
if (m.getIn(["sso", "syncStatus"]) != "ok" || m.get("... | Fix bug that prevented showing the loading screen | Fix bug that prevented showing the loading screen
| JavaScript | mit | mike-casas/lock,mike-casas/lock,mike-casas/lock | ---
+++
@@ -4,12 +4,12 @@
import { ui, isConnectionEnabled } from '../index';
export function renderSSOScreens(m) {
- if (!ui.rememberLastLogin(m)) return null;
-
// TODO: loading pin check belongs here?
if (m.getIn(["sso", "syncStatus"]) != "ok" || m.get("isLoadingPanePinned")) {
return new LoadingSc... |
2c4f837529ddf930b0c92158f20bc2bf4cddaa6c | src/states/Stats.js | src/states/Stats.js | class Stats extends Phaser.State {
create() {
this.totalScore = this.game.state.states['Main'].totalScore
this.game.stage.backgroundColor = '#DFF4FF';
let statsHeader = "STATS"
let continuePhrase = "Tap to Continue"
this.statsHeaderText = this.game.add.text(650, 50, statsHeader, { font: "250px Revali... | class Stats extends Phaser.State {
create() {
this.totalScore = this.game.state.states['Main'].totalScore
this.game.stage.backgroundColor = '#DFF4FF';
let statsHeader = "STATS"
let continuePhrase = "Tap to Continue"
this.statsHeaderText = this.game.add.text(650, 50, statsHeader, { font: "250px Revali... | Add playerName and playerScore to stats page | Add playerName and playerScore to stats page
| JavaScript | mit | joshmun/cornman-the-game,joshmun/cornman-the-game | ---
+++
@@ -9,8 +9,9 @@
this.statsHeaderText = this.game.add.text(650, 50, statsHeader, { font: "250px Revalia", textalign: "center"});
this.continueText = this.game.add.text(820, 300, continuePhrase, { font: "50px Arial", textalign: "center"});
- this.playerScore = this.game.add.text(20, 20, "Your score: ... |
2507389838f8bbb2da5302882827f8e894ef6024 | src/util/filters.js | src/util/filters.js | export function filterByText(data, textFilter) {
if (textFilter === '') {
return data;
}
// case-insensitive
textFilter = textFilter.toLowerCase();
const exactMatches = [];
const substringMatches = [];
data.forEach(i => {
const name = i.name.toLowerCase();
if (name.split(' ').includes(textFil... | export function filterByText(data, textFilter) {
if (textFilter === '') {
return data;
}
// case-insensitive
textFilter = textFilter.toLowerCase();
const exactMatches = [];
const substringMatches = [];
data.forEach(i => {
const name = i.name.toLowerCase();
if (name.split(' ').includes(textFil... | Improve checkbox filter performance by checking key instead of iterating | Improve checkbox filter performance by checking key instead of iterating
| JavaScript | agpl-3.0 | Johj/cqdb,Johj/cqdb | ---
+++
@@ -23,9 +23,8 @@
export function filterByCheckbox(data, checkboxFilters) {
let filtered = data;
Object.keys(checkboxFilters).forEach(i => {
- const currentFilters = Object.keys(checkboxFilters[i]).filter(j => checkboxFilters[i][j]);
- if (currentFilters.length) {
- filtered = filtered.filte... |
fcdb11b2e4300e8195906a013355ac1eca64981f | spec/pageevaluatorSpec.js | spec/pageevaluatorSpec.js | /* global PageEvaluator */
describe("PageEvaluator", function () {
describe("getSelfReferences", function () {
it("should be able to return all self references", function () {
var anchor = document.createElement("a");
anchor.href = 'http://www.blablub';
var ... | /* global PageEvaluator */
describe("PageEvaluator", function () {
describe("evaluatePage", function () {
it("should be able to return all external links", function () {
var anchor = document.createElement("a");
anchor.href = 'http://www.blablub';
var selfAn... | Test for skipping already known links added. | Test for skipping already known links added.
| JavaScript | apache-2.0 | KaiHofstetter/link-stats | ---
+++
@@ -1,7 +1,7 @@
/* global PageEvaluator */
describe("PageEvaluator", function () {
- describe("getSelfReferences", function () {
- it("should be able to return all self references", function () {
+ describe("evaluatePage", function () {
+ it("should be able to return all external links",... |
697e848fbe0a2cab8a56ea8641f82f17d9b86c99 | plugins/backbone.js | plugins/backbone.js | /**
* Backbone.js plugin
*
* Patches Backbone.Events callbacks.
*/
;(function(window, Raven, Backbone) {
'use strict';
// quit if Backbone isn't on the page
if (!Backbone) {
return;
}
function makeBackboneEventsOn(oldOn) {
return function BackboneEventsOn(name, callback, context) {
var _callback = callb... | /**
* Backbone.js plugin
*
* Patches Backbone.Events callbacks.
*/
;(function(window, Raven, Backbone) {
'use strict';
// quit if Backbone isn't on the page
if (!Backbone) {
return;
}
function makeBackboneEventsOn(oldOn) {
return function BackboneEventsOn(name, callback, context) {
var wrapCallback = fu... | Update Backbone.js plugin to handle event map syntax. | Update Backbone.js plugin to handle event map syntax.
| JavaScript | bsd-2-clause | housinghq/main-raven-js,janmisek/raven-js,vladikoff/raven-js,danse/raven-js,benoitg/raven-js,janmisek/raven-js,clara-labs/raven-js,vladikoff/raven-js,hussfelt/raven-js,getsentry/raven-js,getsentry/raven-js,grelas/raven-js,Mappy/raven-js,getsentry/raven-js,housinghq/main-raven-js,eaglesjava/raven-js,danse/raven-js,PureB... | ---
+++
@@ -13,9 +13,24 @@
function makeBackboneEventsOn(oldOn) {
return function BackboneEventsOn(name, callback, context) {
- var _callback = callback._callback || callback;
- callback = Raven.wrap(callback);
- callback._callback = _callback;
+ var wrapCallback = function (cb) {
+ if (Object.... |
82655073c6e807281c50ae9d8ea0fe63951ff10e | resources/assets/js/extra/maps.js | resources/assets/js/extra/maps.js | var map = L.map('map', {
attributionControl: false
}).setView([37.944, 24.115], 6);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);
| var map = L.map('map', {
attributionControl: false
}).setView([37.944, 24.115], 6);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);
var markers = new L.FeatureGroup();
setTimeout(function() {
for (var i=0; i<gis_nodes.length; i++) {
var node_marker = L.marker([gis_nodes[i]["latitude"]... | Add node markers on the map after all nodes json data are fetched | Add node markers on the map after all nodes json data are fetched
| JavaScript | apache-2.0 | ehosp/eHOSP-Services-CE,ehosp/eHOSP-Services-CE,ehosp/eHOSP-Services-CE | ---
+++
@@ -3,3 +3,30 @@
}).setView([37.944, 24.115], 6);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);
+
+
+var markers = new L.FeatureGroup();
+setTimeout(function() {
+ for (var i=0; i<gis_nodes.length; i++) {
+ var node_marker = L.marker([gis_nodes[i]["latitude"], gis_nodes[i]["lon... |
bfe90fd47754e44a02f0d9c364656ec20bf26f41 | src/sunstone/public/app/utils/tips.js | src/sunstone/public/app/utils/tips.js | define(function(require) {
require('foundation.tooltip');
//Replaces all class"tip" divs with an information icon that
//displays the tip information on mouseover.
var _setup = function(context, position) {
//For each tip in this context
$('.tip', context).each(function() {
var obj = $(this);
... | define(function(require) {
require('foundation.tooltip');
//Replaces all class"tip" divs with an information icon that
//displays the tip information on mouseover.
var _setup = function(context, position) {
if (!context) {
context = $(document);
}
//For each tip in this context
$('.tip', ... | Define context for setupTips if undefined | Define context for setupTips if undefined | JavaScript | apache-2.0 | unistra/one,abelCoronado93/one,ggalancs/one,alvarosimon/one,juanmont/one,OpenNebula/one,juanmont/one,goberle/one,abelCoronado93/one,unistra/one,OpenNebula/one,hsanjuan/one,ggalancs/one,ohamada/one,ohamada/one,baby-gnu/one,ohamada/one,juanmont/one,unistra/one,juanmont/one,atodorov-storpool/one,fasrc/one,OpenNebula/one,g... | ---
+++
@@ -3,6 +3,10 @@
//Replaces all class"tip" divs with an information icon that
//displays the tip information on mouseover.
var _setup = function(context, position) {
+ if (!context) {
+ context = $(document);
+ }
+
//For each tip in this context
$('.tip', context).each(function()... |
a3e1f0d088052a9fee85e56a4a68b5527b692844 | example/app/entry-a.js | example/app/entry-a.js | var libA = require("./shared/lib-a");
var libB = require("./shared/lib-b");
console.log("entry-a:libA", libA);
console.log("entra-a:libB", libB);
| var libA = require("./shared/lib-a");
var libB = require("./shared/lib-b");
require("lodash");
console.log("entry-a:libA", libA);
console.log("entra-a:libB", libB);
| Add lodash to the build. | Add lodash to the build.
| JavaScript | mit | interlockjs/interlock,interlockjs/interlock | ---
+++
@@ -1,5 +1,6 @@
var libA = require("./shared/lib-a");
var libB = require("./shared/lib-b");
+require("lodash");
console.log("entry-a:libA", libA);
console.log("entra-a:libB", libB); |
bc1bd2e89a8b3713668ac2c0341875b0f59ac5ea | js/app/handlers/range-picker.js | js/app/handlers/range-picker.js | $(document).on('dp.change', '#ds-range-picker-from', function(e) {
var from = $('#ds-range-picker-from').data("DateTimePicker").getDate()
console.log('set from time: ' + moment(from).fromNow())
})
$(document).on('dp.change', '#ds-range-picker-until', function(e) {
var until = $('#ds-range-picker-until').data("Da... | $(document).on('dp.change', '#ds-range-picker-from', function(e) {
var from = $('#ds-range-picker-from').data("DateTimePicker").getDate()
console.log('set from time: ' + moment(from).fromNow())
})
$(document).on('dp.change', '#ds-range-picker-until', function(e) {
var until = $('#ds-range-picker-until').data("Da... | Set the 'until' field to now for now | Set the 'until' field to now for now
| JavaScript | apache-2.0 | section-io/tessera,urbanairship/tessera,jmptrader/tessera,tessera-metrics/tessera,Slach/tessera,section-io/tessera,tessera-metrics/tessera,aalpern/tessera,filippog/tessera,jmptrader/tessera,Slach/tessera,aalpern/tessera,filippog/tessera,urbanairship/tessera,aalpern/tessera,urbanairship/tessera,Slach/tessera,tessera-met... | ---
+++
@@ -16,8 +16,10 @@
$('.ds-recent-range-picker').hide()
$('.ds-custom-range-picker').show()
- // TODO - set initial values of from/until fields to something
- // reasonable
+ var now = moment() // TODO: quantize to 15-min interval
+ $('#ds-range-picker-until').data("DateTimePicker").set... |
26bf7d797840efe457fb08eb328e36dba2092d4f | test-support/helpers/ember-cognito.js | test-support/helpers/ember-cognito.js | /* global wait */
import { MockUser } from '../utils/ember-cognito';
import { set } from '@ember/object';
export function mockCognitoUser(app, userAttributes) {
const { __container__: container } = app;
const cognito = container.lookup('service:cognito');
set(cognito, 'user', MockUser.create(userAttributes));
... | /* global wait */
import { MockUser } from '../utils/ember-cognito';
import Ember from 'ember';
const { set } = Ember;
export function mockCognitoUser(app, userAttributes) {
const { __container__: container } = app;
const cognito = container.lookup('service:cognito');
set(cognito, 'user', MockUser.create(userAt... | Remove one more reference to @ember/object | Remove one more reference to @ember/object
| JavaScript | mit | paulcwatts/ember-cognito,paulcwatts/ember-cognito | ---
+++
@@ -1,6 +1,8 @@
/* global wait */
import { MockUser } from '../utils/ember-cognito';
-import { set } from '@ember/object';
+import Ember from 'ember';
+
+const { set } = Ember;
export function mockCognitoUser(app, userAttributes) {
const { __container__: container } = app; |
4118fe46abe8ebd048e4af13570e7b10ae3e886b | examples/weather-viewer/weatherman.js | examples/weather-viewer/weatherman.js | console.log ('I am the weatherman')
class Weather {
constructor (latitude, longitude) {
}
locate (latitude, longitude) {
const api = 'https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?'
+ 'lat=' + latitude
+ '&lon=' + longitude
+ '&appid=' + this.key
+ '&units=imp... | class Weather {
constructor (latitude, longitude) {
}
locate (latitude, longitude) {
const api = 'https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?'
+ 'lat=' + latitude
+ '&lon=' + longitude
+ '&appid=' + this.key
+ '&units=imperial'
return fetch (api)
... | Remove console.log statement from weather-viewer | Remove console.log statement from weather-viewer
| JavaScript | mit | devpunks/snuggsi,devpunks/snuggsi,devpunks/snuggsi,snuggs/snuggsi,snuggs/snuggsi,snuggs/snuggsi,devpunks/snuggsi,snuggs/snuggsi,devpunks/snuggsi | ---
+++
@@ -1,5 +1,3 @@
-console.log ('I am the weatherman')
-
class Weather {
constructor (latitude, longitude) { |
4ed8a540fed8e419bcf9ad1dbcf3694dc12b27d7 | test/components/Shared/Button.spec.js | test/components/Shared/Button.spec.js | // component test
import React from "react";
import ReactTestUtils from "react-addons-test-utils";
import Button from "src/components/Shared/Button.js";
describe("Button component", () => {
it("should exist", () => {
Button.should.exist;
});
it("should be react element", () => {
ReactTestUtils.isEleme... | // component test
import React from "react";
import ReactDOM from "react-dom";
import ReactTestUtils from "react-addons-test-utils";
import jsdom from "mocha-jsdom";
import Button from "src/components/Shared/Button.js";
describe("Button component", () => {
jsdom();
it("should exist", () => {
Button.should.e... | Add test for button click handler | Add test for button click handler
| JavaScript | mit | Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React | ---
+++
@@ -1,10 +1,14 @@
// component test
import React from "react";
+import ReactDOM from "react-dom";
import ReactTestUtils from "react-addons-test-utils";
+import jsdom from "mocha-jsdom";
import Button from "src/components/Shared/Button.js";
describe("Button component", () => {
+
+ jsdom();
it("s... |
e1351b93560897c8fd3516c5769f651a5c147c72 | src/dsp/Gain.js | src/dsp/Gain.js | /**
* @depends ../core/AudioletNode.js
*/
var Gain = new Class({
Extends: AudioletNode,
initialize: function(audiolet, gain) {
AudioletNode.prototype.initialize.apply(this, [audiolet, 2, 1]);
this.outputs[0].link(this.inputs[0]);
this.gain = new AudioletParameter(this, 1, gain || 1);
... | /**
* @depends ../core/AudioletNode.js
*/
var Gain = new Class({
Extends: AudioletNode,
initialize: function(audiolet, gain) {
AudioletNode.prototype.initialize.apply(this, [audiolet, 2, 1]);
this.outputs[0].link(this.inputs[0]);
this.gain = new AudioletParameter(this, 1, gain || 1);
... | Fix a stupid bug where gain read the value for the channel, not the sample | Fix a stupid bug where gain read the value for the channel, not the sample
| JavaScript | apache-2.0 | Kosar79/Audiolet,oampo/Audiolet,mcanthony/Audiolet,kn0ll/Audiolet,bobby-brennan/Audiolet,kn0ll/Audiolet,mcanthony/Audiolet,Kosar79/Audiolet,oampo/Audiolet,bobby-brennan/Audiolet,Kosar79/Audiolet | ---
+++
@@ -28,7 +28,7 @@
var outputChannel = outputBuffer.getChannelData(i);
var bufferLength = inputBuffer.length;
for (var j = 0; j < bufferLength; j++) {
- outputChannel[j] = inputChannel[j] * gain.getValue(i);
+ outputChannel[j] = inputChannel[... |
c7ecb64e84b2704d7bb10def5d2cb908a9a0002f | test/unit/specs/Dashboard.spec.js | test/unit/specs/Dashboard.spec.js | import Vue from 'vue'
import Dashboard from 'src/components/Dashboard'
import axios from 'axios'
describe('Dashboard.vue', () => {
let sandbox
beforeEach(function() {
sandbox = sinon.sandbox.create()
sandbox.stub(axios, 'get').returns(Promise.resolve('hi'))
})
afterEach(() => {
sandbox.restore()
... | import Vue from 'vue'
import Dashboard from 'src/components/Dashboard'
import axios from 'axios'
describe('Dashboard.vue', () => {
let sandbox
let vm
beforeEach(function() {
sandbox = sinon.sandbox.create()
sandbox.stub(axios, 'get').returns(Promise.resolve('hi'))
vm = new Vue({
el: document.cr... | Move Vue element creation to beforeEach | Move Vue element creation to beforeEach
| JavaScript | mit | blakecontreras/play-me,blakecontreras/play-me | ---
+++
@@ -4,18 +4,19 @@
describe('Dashboard.vue', () => {
let sandbox
+ let vm
beforeEach(function() {
sandbox = sinon.sandbox.create()
sandbox.stub(axios, 'get').returns(Promise.resolve('hi'))
+ vm = new Vue({
+ el: document.createElement('div'),
+ render: (h) => h(Dashboard)
+ ... |
003572e5c7daceb12971aaef76d323902343e963 | corehq/apps/cloudcare/static/cloudcare/js/formplayer/hq.events.js | corehq/apps/cloudcare/static/cloudcare/js/formplayer/hq.events.js | /*global FormplayerFrontend */
/**
* hq.events.js
*
* This is framework for allowing messages from HQ
*/
FormplayerFrontend.module("HQ.Events", function(Events, FormplayerFrontend) {
Events.Receiver = function(allowedHost) {
this.allowedHost = allowedHost;
return receiver.bind(this);
};
... | /*global FormplayerFrontend */
/**
* hq.events.js
*
* This is framework for allowing messages from HQ
*/
FormplayerFrontend.module("HQ.Events", function(Events, FormplayerFrontend) {
Events.Receiver = function(allowedHost) {
this.allowedHost = allowedHost;
return receiver.bind(this);
};
... | Remove ability to have callbacks | Remove ability to have callbacks
| JavaScript | bsd-3-clause | qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq | ---
+++
@@ -16,14 +16,8 @@
// For Chrome, the origin property is in the event.originalEvent object
var origin = event.origin || event.originalEvent.origin,
data = event.data,
- returnValue = null,
success = true;
- _.defaults(data, {
- success... |
16e675f5b899341172cff4fd1ee144faf934f8d1 | src/mainInstance.js | src/mainInstance.js | import { DEFAULT_CONFIG } from './core/config'
import { createCore } from './core/core'
import * as all from './factory'
import { ArgumentsError } from './error/ArgumentsError'
import { DimensionError } from './error/DimensionError'
import { IndexError } from './error/IndexError'
export function core (config) {
cons... | import { DEFAULT_CONFIG } from './core/config'
import { createCore } from './core/core'
import { values } from './utils/object'
import * as all from './factory'
import { ArgumentsError } from './error/ArgumentsError'
import { DimensionError } from './error/DimensionError'
import { IndexError } from './error/IndexError'... | Fix test broken on node.js 6 | Fix test broken on node.js 6
| JavaScript | apache-2.0 | josdejong/mathjs,FSMaxB/mathjs,josdejong/mathjs,FSMaxB/mathjs,FSMaxB/mathjs,FSMaxB/mathjs,josdejong/mathjs,josdejong/mathjs,josdejong/mathjs,FSMaxB/mathjs | ---
+++
@@ -1,5 +1,6 @@
import { DEFAULT_CONFIG } from './core/config'
import { createCore } from './core/core'
+import { values } from './utils/object'
import * as all from './factory'
import { ArgumentsError } from './error/ArgumentsError'
import { DimensionError } from './error/DimensionError'
@@ -21,7 +22,7 ... |
25cb4a7dd16e4dd3235ade582e78dab5afa72883 | src/loadNode.js | src/loadNode.js | var context = require('vm').createContext({
options: {
server: true,
version: 'dev'
},
Canvas: require('canvas'),
console: console,
require: require,
include: function(uri) {
var source = require('fs').readFileSync(__dirname + '/' + uri);
// For relative includes, we save the current directory and then... | var fs = require('fs'),
vm = require('vm'),
path = require('path');
// Create the context within which we will run the source files:
var context = vm.createContext({
options: {
server: true,
version: 'dev'
},
// Node Canvas library: https://github.com/learnboost/node-canvas
Canvas: require('canvas'),
// Cop... | Support running of PaperScript .pjs files. | Support running of PaperScript .pjs files.
| JavaScript | mit | superjudge/paper.js,iconexperience/paper.js,byte-foundry/paper.js,iconexperience/paper.js,byte-foundry/paper.js,proofme/paper.js,JunaidPaul/paper.js,Olegas/paper.js,luisbrito/paper.js,superjudge/paper.js,Olegas/paper.js,JunaidPaul/paper.js,lehni/paper.js,legendvijay/paper.js,fredoche/paper.js,proofme/paper.js,rgordeev/... | ---
+++
@@ -1,18 +1,28 @@
-var context = require('vm').createContext({
+var fs = require('fs'),
+ vm = require('vm'),
+ path = require('path');
+
+// Create the context within which we will run the source files:
+var context = vm.createContext({
options: {
server: true,
version: 'dev'
},
+ // Node Canvas li... |
07b3370e26d4e6c3e2b4ddb7bb05747aa48f2b11 | src/util.js | src/util.js | /**
* Assign properties from `props` to `obj`
* @template O, P The obj and props types
* @param {O} obj The object to copy properties to
* @param {P} props The object to copy properties from
* @returns {O & P}
*/
export function assign(obj, props) {
for (let i in props) obj[i] = props[i];
return /** @type {O & ... | /**
* Assign properties from `props` to `obj`
* @template O, P The obj and props types
* @param {O} obj The object to copy properties to
* @param {P} props The object to copy properties from
* @returns {O & P}
*/
export function assign(obj, props) {
for (let i in props) obj[i] = props[i];
return /** @type {O & ... | Add note about IE11 for removeNode | Add note about IE11 for removeNode
| JavaScript | mit | developit/preact,developit/preact | ---
+++
@@ -11,7 +11,9 @@
}
/**
- * Remove a child node from its parent if attached.
+ * Remove a child node from its parent if attached. This is a workaround for
+ * IE11 which doesn't support `Element.prototype.remove()`. Using this function
+ * is smaller than including a dedicated polyfill.
* @param {Node} ... |
e3fb80c7f7129dc0d735f8128e5ba4df226911fe | src/routes/index.js | src/routes/index.js | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import CoreLayout from '../layouts/CoreLayout/CoreLayout';
import Home from './UI/containers/HomeContainer';
import ViewTOSContainer from './ViewTOS/containers/ViewTOSContainer';
export default () => (
<Route path='/' component={CoreLayout}... | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import CoreLayout from '../layouts/CoreLayout/CoreLayout';
import HomeContainer from './UI/containers/HomeContainer';
import ViewTOSContainer from './ViewTOS/containers/ViewTOSContainer';
export default () => (
<Route path='/' component={Co... | Rename Home in routes.js to HomeContainer | Rename Home in routes.js to HomeContainer
| JavaScript | mit | City-of-Helsinki/helerm-ui,City-of-Helsinki/helerm-ui,City-of-Helsinki/helerm-ui | ---
+++
@@ -1,12 +1,12 @@
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import CoreLayout from '../layouts/CoreLayout/CoreLayout';
-import Home from './UI/containers/HomeContainer';
+import HomeContainer from './UI/containers/HomeContainer';
import ViewTOSContainer from './ViewTOS/c... |
59ee5513e39ae0e3f0c3435a6b7a012be9947da0 | src/upnp-service.js | src/upnp-service.js | var upnp = require("peer-upnp");
var http = require("http");
var server = http.createServer();
var PORT = 8080;
// start server on port 8080.
server.listen(PORT);
// Create a UPnP Peer.
var peer = upnp.createPeer({
prefix: "/upnp",
server: server
}).on("ready",function(peer){
console.log("ready");
//... | var upnp = require("peer-upnp");
var http = require("http");
var server = http.createServer();
var PORT = 8080;
var name="IOT-DEVICE";
var model="IoT Device";
var modelUrl="";
var version="1.00";
var serial="12345678";
var address="";
// Start server on port 8080.
server.listen(PORT);
// Create a UPnP Peer.
var pee... | Add variables for easy configiration and customisation. | Add variables for easy configiration and customisation.
| JavaScript | mit | srware/iotrp-upnp-service,srware/iotrp-upnp-service | ---
+++
@@ -3,7 +3,14 @@
var server = http.createServer();
var PORT = 8080;
-// start server on port 8080.
+var name="IOT-DEVICE";
+var model="IoT Device";
+var modelUrl="";
+var version="1.00";
+var serial="12345678";
+var address="";
+
+// Start server on port 8080.
server.listen(PORT);
// Create a UPnP Pee... |
ff1e5e08a86b7943b9cae4a472cbec3b73972917 | conversationStats.js | conversationStats.js | var accessToken = '';
var accessManager = Twilio.AccessManager(accessToken);
var client = Twilio.Conversations.Client(accessManager);
function handleConversationStats(conversation) {
console.log('Finish this next');
}
function onInviteAccepted(conversation) {
conversation.localMedia.attach('#local');
conversat... | var accessToken = '';
var accessManager = Twilio.AccessManager(accessToken);
var client = Twilio.Conversations.Client(accessManager);
function handleConversationStats(conversation) {
var dialog = conversation._dialogs.values().next().value;
var peerConnection = dialog.session.mediaHandler.peerConnection;
var sel... | Implement basic getStats call for FireFox | Implement basic getStats call for FireFox
| JavaScript | mit | sagnew/WebRTC-stats-with-Twilio-Video,sagnew/WebRTC-stats-with-Twilio-Video | ---
+++
@@ -3,7 +3,45 @@
var client = Twilio.Conversations.Client(accessManager);
function handleConversationStats(conversation) {
- console.log('Finish this next');
+ var dialog = conversation._dialogs.values().next().value;
+ var peerConnection = dialog.session.mediaHandler.peerConnection;
+ var selector = ... |
d4fa0d6ee68cc5848c048426ad96b876c3ba919e | generators/app/templates/gulp_tasks/webpack.js | generators/app/templates/gulp_tasks/webpack.js | const gulp = require('gulp');
const gutil = require('gulp-util');
const webpack = require('webpack');
const webpackConf = require('../conf/webpack.conf');
const webpackDistConf = require('../conf/webpack-dist.conf');
<% if (framework !== 'react') { -%>
const browsersync = require('browser-sync');
<% } -%>
gulp.task('... | const gulp = require('gulp');
const gutil = require('gulp-util');
const webpack = require('webpack');
const webpackConf = require('../conf/webpack.conf');
const webpackDistConf = require('../conf/webpack-dist.conf');
const gulpConf = require('../conf/gulp.conf');
<% if (framework !== 'react') { -%>
const browsersync =... | Fix errorHandler to come from gulp.conf | Fix errorHandler to come from gulp.conf
| JavaScript | mit | FountainJS/generator-fountain-webpack | ---
+++
@@ -4,6 +4,7 @@
const webpack = require('webpack');
const webpackConf = require('../conf/webpack.conf');
const webpackDistConf = require('../conf/webpack-dist.conf');
+const gulpConf = require('../conf/gulp.conf');
<% if (framework !== 'react') { -%>
const browsersync = require('browser-sync');
<% } -%>... |
f9e14c05bd39985b3a0baad55fb30e51b86e5229 | src/components/chat/AddChatMessage.js | src/components/chat/AddChatMessage.js | import React from 'react'
import PropTypes from 'prop-types'
/* Component with a state */
export default class AddChatMessage extends React.Component {
constructor(props) {
super(props)
this.state = {message: ''}
}
onChangeMessage = (e) => {
this.setState({message: e.target.value})
}
onSendCick = () => {
... | import React from 'react'
import PropTypes from 'prop-types'
/* Component with a state */
export default class AddChatMessage extends React.Component {
constructor(props) {
super(props)
this.state = {message: ''}
}
onChangeMessage = (e) => {
this.setState({message: e.target.value})
}
onSendCick = () => {
... | Send button disabled as long as there is no message | Send button disabled as long as there is no message
| JavaScript | mit | axax/lunuc,axax/lunuc,axax/lunuc | ---
+++
@@ -29,7 +29,7 @@
return (
<div>
<textarea ref={(e) => { this.textInput = e }} onChange={this.onChangeMessage} onKeyPress={this.handleKeyPress} value={this.state.message}/>
- <button onClick={this.onSendCick}>Send</button>
+ <button onClick={this.onSendCick} disabled={(this.state.message.tri... |
a0ffe902f0b63ec6f18d4339f6f0ff767907b3ca | tasks/concurrent.js | tasks/concurrent.js | 'use strict';
var lpad = require('lpad');
module.exports = function (grunt) {
grunt.registerMultiTask('concurrent', 'Run grunt tasks concurrently', function () {
var spawnOptions;
var cb = this.async();
var options = this.options();
// Set the tasks based on the config format
var tasks = this.data.tasks || ... | 'use strict';
var lpad = require('lpad');
var cpCache = [];
module.exports = function (grunt) {
grunt.registerMultiTask('concurrent', 'Run grunt tasks concurrently', function () {
var spawnOptions;
var cb = this.async();
var options = this.options();
// Set the tasks based on the config format
var tasks = t... | Kill any hanging processes when grunt exits | Kill any hanging processes when grunt exits
| JavaScript | mit | ekashida/grunt-concurrent,nqdy666/grunt-concurrent,jimf/grunt-concurrent,sindresorhus/grunt-concurrent | ---
+++
@@ -1,5 +1,6 @@
'use strict';
var lpad = require('lpad');
+var cpCache = [];
module.exports = function (grunt) {
grunt.registerMultiTask('concurrent', 'Run grunt tasks concurrently', function () {
@@ -16,7 +17,7 @@
lpad.stdout(' ');
grunt.util.async.forEach(tasks, function (task, next) {
- ... |
6b39b5481f6ff63353dd63749006423bb5aa8998 | tasks/contrib-ci.js | tasks/contrib-ci.js | /*
* grunt-contrib-internal
* http://gruntjs.com/
*
* Copyright (c) 2016 Tyler Kellen, contributors
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
var path = require('path');
grunt.registerTask('contrib-ci', 'Normalizes AppVeyor and Travis CI configs.', function(skipIf... | /*
* grunt-contrib-internal
* http://gruntjs.com/
*
* Copyright (c) 2016 Tyler Kellen, contributors
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
var path = require('path');
grunt.registerTask('contrib-ci', 'Normalizes AppVeyor and Travis CI configs.', function(skipIf... | Use skipIfExists instead of true | Use skipIfExists instead of true
| JavaScript | mit | gruntjs/grunt-contrib-internal | ---
+++
@@ -11,7 +11,7 @@
module.exports = function(grunt) {
var path = require('path');
grunt.registerTask('contrib-ci', 'Normalizes AppVeyor and Travis CI configs.', function(skipIfExists) {
- skipIfExists = skipIfExists === true;
+ skipIfExists = skipIfExists === "skipIfExists";
var travis = grun... |
46f34b40c88f5ddb680ae57e9eae14c640224272 | test/helpers/api.js | test/helpers/api.js | var
request = require('request'),
config = require('../../config');
exports.get = function () {
var query = arguments.length === 2 ? arguments[0] : null;
var callback = arguments[arguments.length - 1];
var options = {
uri: 'http://localhost:' + config.port + '/components',
timeout: 3000,
json: tr... | var
request = require('request'),
config = require('../../config');
exports.get = function () {
var query = arguments.length === 2 ? arguments[0] : null;
var callback = arguments[arguments.length - 1];
var options = {
uri: 'http://localhost:' + config.port + '/components',
timeout: 3000,
json: tr... | Correct API helper scripts for getScript and getBuild | Correct API helper scripts for getScript and getBuild
| JavaScript | mit | web-audio-components/web-audio-components-service | ---
+++
@@ -36,3 +36,12 @@
request.get(options, callback);
};
+
+exports.getBuild = function (pkg, callback) {
+ var options = {
+ uri: 'http://localhost:' + config.port + '/components/' + pkg + '/build.js',
+ timeout: 3000
+ };
+
+ request.get(options, callback);
+}; |
bc5c67d28c74bc05d5d4578b230dacb97b7b638e | html/tools/js/nrs.modals.accountinfo.js | html/tools/js/nrs.modals.accountinfo.js | var NRS = (function(NRS, $, undefined) {
NRS.forms.setAccountInfoComplete = function(response, data) {
var name = $.trim(String(data.name));
if (name) {
$("#account_name").html(name.escapeHTML());
} else {
$("#account_name").html("No name set");
}
}
return NRS;
}(NRS || {}, jQuery)); | var NRS = (function(NRS, $, undefined) {
$("#account_info_modal").on("show.bs.modal", function(e) {
$("#account_info_name").val(NRS.accountInfo.name);
$("#account_info_description").val(NRS.accountInfo.description);
});
NRS.forms.setAccountInfoComplete = function(response, data) {
var name = $.trim(String(dat... | Set current account name/description when opening modal. | Set current account name/description when opening modal.
| JavaScript | mit | duckx/nxt,metrospark/czarcraft,duckx/nxt,Ziftr/nxt,Ziftr/nxt,fimkrypto/nxt,metrospark/czarcraft,fimkrypto/nxt,duckx/nxt,fimkrypto/nxt,fimkrypto/nxt,Ziftr/nxt,metrospark/czarcraft | ---
+++
@@ -1,4 +1,9 @@
var NRS = (function(NRS, $, undefined) {
+ $("#account_info_modal").on("show.bs.modal", function(e) {
+ $("#account_info_name").val(NRS.accountInfo.name);
+ $("#account_info_description").val(NRS.accountInfo.description);
+ });
+
NRS.forms.setAccountInfoComplete = function(response, data)... |
e0f464f518765d28b95ab32563c5af7b9bef936c | test/steps/forms.js | test/steps/forms.js | var helper = require('massah/helper')
module.exports = (function() {
var library = helper.getLibrary()
.given('I enter \'(.*)\' in the \'(.*)\' field', function(value, field) {
this.driver.input('*[name="' + field + '"]').enter(value)
if (!this.params.fields) this.params.fields ... | var helper = require('massah/helper')
module.exports = (function() {
var library = helper.getLibrary()
.given('I enter \'(.*)\' in the \'(.*)\' field', function(value, field) {
this.driver.input('*[name="' + field + '"]').clear()
this.driver.input('*[name="' + field + '"]').enter(va... | Clear form fields before entering new values | Clear form fields before entering new values
| JavaScript | apache-2.0 | pinittome/pinitto.me,pinittome/pinitto.me,pinittome/pinitto.me | ---
+++
@@ -3,7 +3,8 @@
module.exports = (function() {
var library = helper.getLibrary()
.given('I enter \'(.*)\' in the \'(.*)\' field', function(value, field) {
- this.driver.input('*[name="' + field + '"]').enter(value)
+ this.driver.input('*[name="' + field + '"]').clear()... |
32eb10c7aa884fb03314be0cd5144064fc977a7d | src/shared/components/form/formEmail/formEmail.js | src/shared/components/form/formEmail/formEmail.js | import React, { Component } from 'react';
import FormInput from '../formInput/formInput';
class FormEmail extends Component {
render() {
const validEmailRegex = /(^[^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})/;
return (
<FormInput
{...this.props}
validationRegex={validEmailRegex}
valid... | import React, { Component } from 'react';
import FormInput from '../formInput/formInput';
class FormEmail extends Component {
render() {
const validEmailRegex = /(^[^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})/;
return (
<FormInput
{...this.props}
validationRegex={validEmailRegex}
vali... | Add blank line for readability | Add blank line for readability | JavaScript | mit | tal87/operationcode_frontend,hollomancer/operationcode_frontend,tal87/operationcode_frontend,hollomancer/operationcode_frontend,NestorSegura/operationcode_frontend,NestorSegura/operationcode_frontend,OperationCode/operationcode_frontend,tskuse/operationcode_frontend,tal87/operationcode_frontend,tskuse/operationcode_fro... | ---
+++
@@ -4,6 +4,7 @@
class FormEmail extends Component {
render() {
const validEmailRegex = /(^[^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})/;
+
return (
<FormInput
{...this.props} |
ab6c02edaa802dea6d4ee01ba4f56172d7605802 | app/javascripts/views/main_view.js | app/javascripts/views/main_view.js | Checklist.MainView = Ember.View.extend({
tagName: 'section',
templateName: 'main_view',
classNames: ['main'],
landingColorboxConfig: {
inline: true,
transition: 'fade',
close: 'x',
opacity: 0.8,
fixed: true,
maxWidth: 675,
innerWidth: 675,
open: true,
className: 'landing',
... | Checklist.MainView = Ember.View.extend({
tagName: 'section',
templateName: 'main_view',
classNames: ['main'],
landingColorboxConfig: {
inline: true,
transition: 'fade',
close: 'x',
opacity: 0.8,
fixed: true,
maxWidth: 675,
innerWidth: 675,
open: true,
className: 'landing',
... | Hide initial popup if popup param is 0 | Hide initial popup if popup param is 0
| JavaScript | bsd-3-clause | unepwcmc/cites-checklist,unepwcmc/cites-checklist,unepwcmc/cites-checklist | ---
+++
@@ -22,6 +22,11 @@
didInsertElement: function() {
var target = document.getElementById('loading');
var spinner = new Spinner(Checklist.CONFIG.spinner).spin(target);
+
+ var popup = location.href.split(/(&|\?)popup=/).pop()
+ if(popup !== undefined && popup == "0") {
+ $.cookie("Checkli... |
6475b88b11ff49d3b880a0f16a7951dcfc06af27 | src/wef.core.js | src/wef.core.js | /*!
* Wef
* Copyright (c) 2011 Pablo Escalada
* MIT Licensed
*/
/**
* wef module
*/
(function(global) {
var wef = function() {
return new wef.prototype.init();
};
wef.prototype = {
constructor:wef,
version: "0.0.1",
init: function() {
return this;
}... | /*!
* Wef
* Copyright (c) 2011 Pablo Escalada
* MIT Licensed
*/
/**
* wef module
*/
(function(global) {
var wef = function() {
return new wef.prototype.init();
};
wef.prototype = {
constructor:wef,
version: "0.0.1",
init: function() {
return this;
}... | Fix jslint warning in null checks | Fix jslint warning in null checks
| JavaScript | mit | diesire/wef,diesire/wef,diesire/wef | ---
+++
@@ -25,10 +25,10 @@
var tmp = receiver;
//both must be objects
if (typeof receiver === "object" && typeof giver === "object") {
- if (tmp == null) {
+ if (tmp === null) {
tmp = {};
}
- if (receiver == null) {
+ ... |
297921acf811fc8508b5581d4e761403a288f2b8 | lib/webhooks/riskOrderStatus.js | lib/webhooks/riskOrderStatus.js | /* LIB */
const radial = require('../../radial');
const authenticate = require('./authenticate');
/* MODULES */
const xmlConvert = require('xml-js');
/* CONSTRUCTOR */
(function () {
var RiskOrderStatus = {};
/* PRIVATE VARIABLES */
/* PUBLIC VARIABLES */
/* PUBLIC FUNCTIONS */
RiskOrderStatus.parse... | /* LIB */
const radial = require('../../radial');
const authenticate = require('./authenticate');
/* MODULES */
const xmlConvert = require('xml-js');
/* CONSTRUCTOR */
(function () {
var RiskOrderStatus = {};
/* PRIVATE VARIABLES */
/* PUBLIC VARIABLES */
/* PUBLIC FUNCTIONS */
RiskOrderStatus.parse... | Improve reply list response for risk status webhook. | Improve reply list response for risk status webhook.
| JavaScript | mit | giftnix/node-radial | ---
+++
@@ -30,9 +30,21 @@
}
var body = req.body;
- var reply = body.RiskAssessmentReplyList;
+ var reply = body.RiskAssessmentReplyList || body.riskassessmentreplylist;
+ var list = reply.RiskAssessmentReply || reply.riskassessmentreply;
- return fn(null, reply);
+ var repl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.