conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
dragTail(zoomMode);
showDoubleClickNotifier(gd);
=======
dragTail();
if(SHOWZOOMOUTTIP && gd.data && gd._context.showTips) {
Lib.notifier(Lib._(gd, 'Double-click to zoom back out'), 'long');
SHOWZOOMOUTTIP = false;
}
>>>>>>>
dragTail();
showDoubleClickNotifier(gd); |
<<<<<<<
=======
// allocate any extra select buffers
var bufferCount = this.groupCount()
while(this.selectBuffers.length < bufferCount) {
this.selectBuffers.push(
createSelect(
this.shell.gl,
[this.shell.height,this.shell.width]))
}
if(!this.axisSpikes) {
this.axisSpikes = createSpikes(this.shell.gl);
}
return;
>>>>>>> |
<<<<<<<
'nowatch', 'verbose', 'randomize',
'failFast', 'doNotFailOnEmptyTestSuite',
'Chrome', 'Firefox', 'IE11'
=======
'nowatch', 'failFast', 'randomize',
'Chrome', 'Firefox', 'IE11',
'verbose', 'showSkipped', 'report-progress', 'report-spec', 'report-dots'
>>>>>>>
'nowatch', 'randomize',
'failFast', 'doNotFailOnEmptyTestSuite',
'Chrome', 'Firefox', 'IE11',
'verbose', 'showSkipped', 'report-progress', 'report-spec', 'report-dots'
<<<<<<<
verbose: false,
=======
>>>>>>>
<<<<<<<
failFast: false,
doNotFailOnEmptyTestSuite: false,
=======
failFast: false,
>>>>>>>
failFast: false,
doNotFailOnEmptyTestSuite: false,
<<<<<<<
suppressErrorSummary: true,
suppressFailed: true,
suppressPassed: true,
suppressSkipped: false,
showSpecTiming: false
},
// set to `true` e.g. for mapbox suites where:
// --tags=gl --skip-tags=noCI result in empty test run
failOnEmptyTestSuite: !argv.doNotFailOnEmptyTestSuite
=======
suppressErrorSummary: false,
suppressFailed: !hasSpecReporter,
suppressPassed: !hasSpecReporter,
// use 'karma-spec-reporter' to log info about skipped specs
suppressSkipped: !argv.showSkipped,
showSpecTiming: true
}
>>>>>>>
suppressErrorSummary: false,
suppressFailed: !hasSpecReporter,
suppressPassed: !hasSpecReporter,
// use 'karma-spec-reporter' to log info about skipped specs
suppressSkipped: !argv.showSkipped,
showSpecTiming: true
},
// set to `true` e.g. for mapbox suites where:
// --tags=gl --skip-tags=noCI result in empty test run
failOnEmptyTestSuite: !argv.doNotFailOnEmptyTestSuite |
<<<<<<<
=======
const util = require('../../tools/util');
>>>>>>>
const util = require('../../tools/util'); |
<<<<<<<
CHAT_TEXT: 'chat', // TODO
CHAT_UNREAD: '{0} ({1})', // 0 -> CHAT_TEXT, 1 -> number]
READ_MORE: 'Read More',
SHOW_IMAGE: 'Show Image',
HIDE_IMAGE: 'Hide Image',
CHAT_MESSAGE_BOX_PLACEHOLDER: 'Message',
SIGN_UP_CHAT: 'Sign Up To Chat',
JOIN_CHAT: 'Set Username To Chat'
},
INVALID_USERNAME: 'USERNAME must be between 3 and 15 characters long. Only contains lowercase, numbers and underscore', // TODO
USERNAME_TAKEN: 'This USERNAME has already been taken. Please try another.', // TODO
USERNAME_LABEL: 'USERNAME (used for chat)', // TODO
USERNAME_PLACEHOLDER: 'USERNAME', // TODO
TAB_USERNAME: 'USERNAME', // TODO
USERNAME_WARNING: 'Your USERNAME can only be changed once. Please assure your username is desirable.', // TODO
USERNAME_CANNOT_BE_CHANGED: 'USERNAME can not be changed' // TODO
=======
CHAT_TEXT: 'چت',
CHAT_UNREAD: '({1}) {0}'
},
INVALID_USERNAME: 'طول نام کاربری باید بین 3 تا 15 حرف باید باشد. فقط از حروف انگلیسی کوچک، اعداد و کاراکتر underscore استفاده نمایید.',
USERNAME_TAKEN: 'نام کاربری انتخاب شده توسط شما، قبلا توسط دیگر کاربران انتخاب شده است، لطفا نام دیگری انتخاب نمایید. ',
USERNAME_LABEL: 'ام مستعار(جهت نمایش در چت)',
USERNAME_PLACEHOLDER: 'USERNAME',
TAB_USERNAME: 'نام کاربری',
USERNAME_WARNING: 'نام کاربری شما فقط یکبار می تواند تغییر یابد. لطفا در انتخاب نام کاربری خود دقت فرمایید.',
USERNAME_CANNOT_BE_CHANGED: 'نام کاربری نمی تواند تغییر یابد.',
UPGRADE_LEVEL: 'سطح دسترسی کاربری خود را افزایش دهید.',
LEVELS: {
LABEL_LEVEL: 'سطح کاربری',
LABEL_LEVEL_1: 'مبتدی',
LABEL_LEVEL_2: 'معمولی',
LABEL_LEVEL_3: 'حرفه ای',
LABEL_MAKER_FEE: 'کارمزد سفارش گذار',
LABEL_TAKER_FEE: 'کارمزد پذیرنده سفارش',
LABEL_FIAT_DEPOSIT: 'محدودیت واریز روزانه تومانی',
LABEL_FIAT_WITHDRAWAL: 'محدودیت برداشت روزانه تومانی',
LABEL_BTC_DEPOSIT: 'محدودیت واریز روزانه بیتکوین',
LABEL_BTC_WITHDRAWAL: 'محدودیت برداشت روزانه بیتکوین',
UNLIMITED: 'نامحدود',
BLOCKED: '0'
}
>>>>>>>
CHAT_TEXT: 'چت',
CHAT_UNREAD: '({1}) {0}'
READ_MORE: 'Read More',
SHOW_IMAGE: 'Show Image',
HIDE_IMAGE: 'Hide Image',
CHAT_MESSAGE_BOX_PLACEHOLDER: 'Message',
SIGN_UP_CHAT: 'Sign Up To Chat',
JOIN_CHAT: 'Set Username To Chat'
},
INVALID_USERNAME: 'طول نام کاربری باید بین 3 تا 15 حرف باید باشد. فقط از حروف انگلیسی کوچک، اعداد و کاراکتر underscore استفاده نمایید.',
USERNAME_TAKEN: 'نام کاربری انتخاب شده توسط شما، قبلا توسط دیگر کاربران انتخاب شده است، لطفا نام دیگری انتخاب نمایید. ',
USERNAME_LABEL: 'ام مستعار(جهت نمایش در چت)',
USERNAME_PLACEHOLDER: 'USERNAME',
TAB_USERNAME: 'نام کاربری',
USERNAME_WARNING: 'نام کاربری شما فقط یکبار می تواند تغییر یابد. لطفا در انتخاب نام کاربری خود دقت فرمایید.',
USERNAME_CANNOT_BE_CHANGED: 'نام کاربری نمی تواند تغییر یابد.',
UPGRADE_LEVEL: 'سطح دسترسی کاربری خود را افزایش دهید.',
LEVELS: {
LABEL_LEVEL: 'سطح کاربری',
LABEL_LEVEL_1: 'مبتدی',
LABEL_LEVEL_2: 'معمولی',
LABEL_LEVEL_3: 'حرفه ای',
LABEL_MAKER_FEE: 'کارمزد سفارش گذار',
LABEL_TAKER_FEE: 'کارمزد پذیرنده سفارش',
LABEL_FIAT_DEPOSIT: 'محدودیت واریز روزانه تومانی',
LABEL_FIAT_WITHDRAWAL: 'محدودیت برداشت روزانه تومانی',
LABEL_BTC_DEPOSIT: 'محدودیت واریز روزانه بیتکوین',
LABEL_BTC_WITHDRAWAL: 'محدودیت برداشت روزانه بیتکوین',
UNLIMITED: 'نامحدود',
BLOCKED: '0'
} |
<<<<<<<
import { APP, LS_PREFERENCES_KEY, SUPPORTED_CARDS } from './Constants';
=======
import { BsFillBookmarksFill } from "react-icons/bs"
import { APP, LS_PREFERENCES_KEY, SUPPORTED_CARDS, SUPPORTED_TAGS } from './Constants';
>>>>>>>
import { APP, LS_PREFERENCES_KEY, SUPPORTED_CARDS } from './Constants';
import { BsFillBookmarksFill } from "react-icons/bs"
<<<<<<<
userSelectedTags: supportedTags.filter((t) => t.value === "javascript"),
=======
userSelectedTags: SUPPORTED_TAGS.filter((t) => t.value === "javascript"),
userBookmarks: [],
>>>>>>>
userSelectedTags: supportedTags.filter((t) => t.value === "javascript"),
userBookmarks: [], |
<<<<<<<
const RoomLinkValidator = require("./components/room-link-validator").RoomLinkValidator;
const RLVStatus = require("./components/room-link-validator").validationStatuses;
=======
const log = require("./components/logging").get("bridge");
>>>>>>>
const RoomLinkValidator = require("./components/room-link-validator").RoomLinkValidator;
const RLVStatus = require("./components/room-link-validator").validationStatuses;
const log = require("./components/logging").get("bridge"); |
<<<<<<<
diagram.fieldCounter = 0;
diagram.fieldRelsCounter = 0;
diagram.nodetypesCounter = [];
diagram.reltypesCounter = [];
diagram.fieldsForRels = {};
diagram.stringValues = {
'e' : gettext("equals"),
'le': gettext("is less than or equal to"),
'lt': gettext("is less than"),
'gt': gettext("is greater than"),
'ge': gettext("is greater than or equal to"),
'b' : gettext("is between"),
'ne': gettext("does not equal"),
'v' : gettext("has some value"),
'nv': gettext("has no value"),
'c' : gettext("contains"),
'nc': gettext("doesn't contain"),
's' : gettext("starts with"),
'en': gettext("ends with")
};
diagram.lookupsAllValues = [
diagram.stringValues['e'],
diagram.stringValues['le'],
diagram.stringValues['lt'],
diagram.stringValues['gt'],
diagram.stringValues['ge'],
diagram.stringValues['b'],
diagram.stringValues['ne'],
diagram.stringValues['v'],
diagram.stringValues['nv']
];
diagram.lookupsSpecificValues = [
diagram.stringValues['e'],
diagram.stringValues['ne'],
diagram.stringValues['v'],
diagram.stringValues['nv']
];
diagram.lookupsTextValues = [
diagram.stringValues['e'],
diagram.stringValues['ne'],
diagram.stringValues['v'],
diagram.stringValues['nv'],
diagram.stringValues['c'],
diagram.stringValues['nc'],
diagram.stringValues['s'],
diagram.stringValues['en']
];
diagram.lookupsValuesType = {
's': diagram.lookupsTextValues,
'b': diagram.lookupsSpecificValues,
'n': diagram.lookupsAllValues,
'x': diagram.lookupsTextValues,
'd': diagram.lookupsAllValues,
't': diagram.lookupsAllValues,
'c': diagram.lookupsSpecificValues,
'f': diagram.lookupsAllValues,
'r': diagram.lookupsSpecificValues,
'w': diagram.lookupsAllValues,
'a': diagram.lookupsAllValues,
'i': diagram.lookupsAllValues,
'o': diagram.lookupsAllValues,
'e': diagram.lookupsSpecificValues
};
=======
diagram.fieldCounter = 0;
diagram.nodetypesCounter = [];
diagram.colorsForLabels = [];
diagram.stringValues = {
'e' : gettext("equals"),
'le': gettext("is less than or equal to"),
'lt': gettext("is less than"),
'gt': gettext("is greater than"),
'ge': gettext("is greater than or equal to"),
'b' : gettext("is between"),
'ne': gettext("does not equal"),
'v' : gettext("has some value"),
'nv': gettext("has no value"),
'c' : gettext("contains"),
'nc': gettext("doesn't contain"),
's' : gettext("starts with"),
'en': gettext("ends with")
};
diagram.lookupsAllValues = [
diagram.stringValues['e'],
diagram.stringValues['le'],
diagram.stringValues['lt'],
diagram.stringValues['gt'],
diagram.stringValues['ge'],
diagram.stringValues['b'],
diagram.stringValues['ne'],
diagram.stringValues['v'],
diagram.stringValues['nv']
];
diagram.lookupsSpecificValues = [
diagram.stringValues['e'],
diagram.stringValues['ne'],
diagram.stringValues['v'],
diagram.stringValues['nv']
];
diagram.lookupsTextValues = [
diagram.stringValues['e'],
diagram.stringValues['ne'],
diagram.stringValues['v'],
diagram.stringValues['nv'],
diagram.stringValues['c'],
diagram.stringValues['nc'],
diagram.stringValues['s'],
diagram.stringValues['en']
];
diagram.lookupsValuesType = {
's': diagram.lookupsTextValues,
'b': diagram.lookupsSpecificValues,
'n': diagram.lookupsAllValues,
'x': diagram.lookupsTextValues,
'd': diagram.lookupsAllValues,
't': diagram.lookupsAllValues,
'c': diagram.lookupsSpecificValues,
'f': diagram.lookupsAllValues,
'r': diagram.lookupsSpecificValues,
'w': diagram.lookupsAllValues,
'a': diagram.lookupsAllValues,
'i': diagram.lookupsAllValues,
'o': diagram.lookupsAllValues,
'e': diagram.lookupsSpecificValues
};
>>>>>>>
diagram.fieldCounter = 0;
diagram.fieldRelsCounter = 0;
diagram.nodetypesCounter = [];
diagram.reltypesCounter = [];
diagram.fieldsForRels = {};
diagram.stringValues = {
'e' : gettext("equals"),
'le': gettext("is less than or equal to"),
'lt': gettext("is less than"),
'gt': gettext("is greater than"),
'ge': gettext("is greater than or equal to"),
'b' : gettext("is between"),
'ne': gettext("does not equal"),
'v' : gettext("has some value"),
'nv': gettext("has no value"),
'c' : gettext("contains"),
'nc': gettext("doesn't contain"),
's' : gettext("starts with"),
'en': gettext("ends with")
};
diagram.lookupsAllValues = [
diagram.stringValues['e'],
diagram.stringValues['le'],
diagram.stringValues['lt'],
diagram.stringValues['gt'],
diagram.stringValues['ge'],
diagram.stringValues['b'],
diagram.stringValues['ne'],
diagram.stringValues['v'],
diagram.stringValues['nv']
];
diagram.lookupsSpecificValues = [
diagram.stringValues['e'],
diagram.stringValues['ne'],
diagram.stringValues['v'],
diagram.stringValues['nv']
];
diagram.lookupsTextValues = [
diagram.stringValues['e'],
diagram.stringValues['ne'],
diagram.stringValues['v'],
diagram.stringValues['nv'],
diagram.stringValues['c'],
diagram.stringValues['nc'],
diagram.stringValues['s'],
diagram.stringValues['en']
];
diagram.lookupsValuesType = {
's': diagram.lookupsTextValues,
'b': diagram.lookupsSpecificValues,
'n': diagram.lookupsAllValues,
'x': diagram.lookupsTextValues,
'd': diagram.lookupsAllValues,
't': diagram.lookupsAllValues,
'c': diagram.lookupsSpecificValues,
'f': diagram.lookupsAllValues,
'r': diagram.lookupsSpecificValues,
'w': diagram.lookupsAllValues,
'a': diagram.lookupsAllValues,
'i': diagram.lookupsAllValues,
'o': diagram.lookupsAllValues,
'e': diagram.lookupsSpecificValues
};
<<<<<<<
=======
/**
* Iterate for outgoing relations from modelName to the CurrentModels
* - graphName.
* - modelName.
*/
diagram.addRelations = function(graphName, modelName) {
var sourceId, targetId, model, lengthRelations, relationIndex, relation;
model = diagram.Models[graphName][modelName];
lengthRelations = model.relations.length;
for(var relationIndex = 0; relationIndex < lengthRelations; relationIndex++) {
relation = model.relations[relationIndex];
if ((diagram.CurrentModels.indexOf(graphName +"."+ relation.source) >= 0)
&& (diagram.CurrentModels.indexOf(graphName +"."+ relation.target) >= 0)) {
sourceId = "diagramBox-"+ relation.source;
if (relation.source === relation.target) {
// Reflexive relationships
targetId = "inlineDeleteLink_"+ relation.target;
} else {
targetId = "diagramBox-"+ relation.target;
}
diagram.addRelation(sourceId, targetId, relation.label);
}
}
}
/**
* Create a relation between a pattern with id sourceId and targetId
* - sourceId.
* - targetId.
* - label.
* - relStyle.
*/
diagram.addRelation = function(sourceId, targetId, label, relStyle) {
var connection, connectionKey, currentLabel;
connectionKey = sourceId +"~"+ targetId;
if (!(connectionKey in diagram.CurrentRelations)) {
if (!relStyle || (relStyle !== "single" && relStyle !== "double")) {
relStyle = "single"
}
connection = jsPlumb.connect({
scope: "diagramBox",
source: sourceId,
target: targetId,
detachable:false,
connector:"Flowchart",
paintStyle: diagram.Defaults[relStyle].paintStyle,
backgroundPaintStyle: diagram.Defaults[relStyle].backgroundPaintStyle,
overlays: diagram.Defaults[relStyle].overlays({
label: label,
cssClass: "connection",
id: connectionKey
}),
endpoint: "Blank",
anchor:"Continuous"
});
diagram.CurrentRelations[connectionKey] = connection;
} else {
connection = diagram.CurrentRelations[connectionKey].getOverlay(connectionKey);
currentLabel = connection.getLabel();
connection.setLabel(currentLabel + "<br/>"+ label);
}
}
>>>>>>>
<<<<<<<
if((modelName.localeCompare(typeName)) == 0) {
// Node type counter for the node type select field
if(diagram.nodetypesCounter[typeName] >= 0) {
diagram.nodetypesCounter[typeName]++;
} else {
diagram.nodetypesCounter[typeName] = 0;
}
diagram.addBox(graph, modelName, typeName);
modelNameValue = models[modelName].name;
}
=======
if((modelName.localeCompare(typeName)) == 0) {
// Node type counter for the node type select field
if(diagram.nodetypesCounter[typeName] >= 0) {
diagram.nodetypesCounter[typeName]++;
} else {
diagram.nodetypesCounter[typeName] = 0;
}
diagram.addBox(graph, modelName, typeName);
}
>>>>>>>
if((modelName.localeCompare(typeName)) == 0) {
// Node type counter for the node type select field
if(diagram.nodetypesCounter[typeName] >= 0) {
diagram.nodetypesCounter[typeName]++;
} else {
diagram.nodetypesCounter[typeName] = 0;
}
diagram.addBox(graph, modelName, typeName);
modelNameValue = models[modelName].name;
} |
<<<<<<<
import {allowSaves, forbidSaves} from 'gModules/canvas_state/actions'
import * as spaceActions from 'gModules/spaces/actions'
=======
import * as spaceActions from 'gModules/spaces/actions.js'
import {undo, redo} from 'gModules/checkpoints/actions'
>>>>>>>
import {allowSaves, forbidSaves} from 'gModules/canvas_state/actions'
import * as spaceActions from 'gModules/spaces/actions'
import {undo, redo} from 'gModules/checkpoints/actions' |
<<<<<<<
const {inSelectedCell, metric, hovered, isInScreenshot} = this.props
const relationshipClass = relationshipClasses[relationshipType(metric.edges)]
=======
const {inSelectedCell, hovered} = this.props
const {canvasState: {metricCardView}} = this.props
const relationshipClass = relationshipClasses[this._relationshipType()]
>>>>>>>
const {inSelectedCell, hovered, isInScreenshot} = this.props
const relationshipClass = relationshipClasses[this._relationshipType()]
<<<<<<<
isInScreenshot,
=======
exportedAsFact,
>>>>>>>
isInScreenshot,
exportedAsFact,
<<<<<<<
{shouldShowDistributionEditor &&
=======
{inSelectedCell && !this.state.modalIsOpen &&
>>>>>>>
{shouldShowDistributionEditor && !this.state.modalIsOpen && |
<<<<<<<
const hasRequisiteProperties = hasAllNonEmpty(
=======
const isErrorFree = _.isEmpty(_.get(this, 'state.fact.simulation.sample.errors'))
const hasRequisiteProperties = factIsHydrated(
>>>>>>>
const hasRequisiteProperties = factIsHydrated( |
<<<<<<<
// {
// title: STRINGS.USER_VERIFICATION.TITLE_BANK_ACCOUNT,
// subtitle: bank_account.card_number,
// content: (
// <BankForm initialValues={bank_account} formValues={bankFormValues}>
// <InformationSection
// text={
// bank_account.verified
// ? ''
// : STRINGS.USER_VERIFICATION.PENDING_VERIFICATION_BANK
// }
// onChangeValue={this.onOpenContactForm}
// />
// </BankForm>
// ),
// notification: this.generateNotification(
// bank_account.verified,
// bank_account.provided,
// STRINGS.USER_VERIFICATION.VERIFY_BANK_ACCOUNT
// )
// },
=======
{
title: STRINGS.USER_VERIFICATION.TITLE_BANK_ACCOUNT,
subtitle: bank_account.card_number,
content: bank_account.provided ? (
<BankForm initialValues={bank_account} formValues={bankFormValues}>
<InformationSection
text={
!bank_account.verified && bank_account.provided
? STRINGS.USER_VERIFICATION.PENDING_VERIFICATION_BANK
: ''
}
onChangeValue={this.onOpenContactForm}
/>
</BankForm>
) : (
<div>
<InformationSection
text=""
onChangeValue={this.onOpenContactForm}
/>
</div>
),
notification: this.generateNotification(
bank_account.verified,
bank_account.provided,
STRINGS.USER_VERIFICATION.VERIFY_BANK_ACCOUNT
)
},
>>>>>>>
// {
// title: STRINGS.USER_VERIFICATION.TITLE_BANK_ACCOUNT,
// subtitle: bank_account.card_number,
// content: bank_account.provided ? (
// <BankForm initialValues={bank_account} formValues={bankFormValues}>
// <InformationSection
// text={
// !bank_account.verified && bank_account.provided
// ? STRINGS.USER_VERIFICATION.PENDING_VERIFICATION_BANK
// : ''
// }
// onChangeValue={this.onOpenContactForm}
// />
// </BankForm>
// ) : (
// <div>
// <InformationSection
// text=""
// onChangeValue={this.onOpenContactForm}
// />
// </div>
// ),
// notification: this.generateNotification(
// bank_account.verified,
// bank_account.provided,
// STRINGS.USER_VERIFICATION.VERIFY_BANK_ACCOUNT
// )
// }, |
<<<<<<<
import ClosedSpaceSidebar from './closed_sidebar'
=======
import SpacesShowToolbar from './Toolbar/index'
import ClosedSpaceSidebar from './closed_sidebar.js'
>>>>>>>
import SpacesShowToolbar from './Toolbar/index'
<<<<<<<
import {allowEdits, forbidEdits} from 'gModules/canvas_state/actions'
import * as spaceActions from 'gModules/spaces/actions'
=======
import * as spaceActions from 'gModules/spaces/actions.js'
import * as copiedActions from 'gModules/copied/actions'
>>>>>>>
import {allowEdits, forbidEdits} from 'gModules/canvas_state/actions'
import * as spaceActions from 'gModules/spaces/actions.js'
import * as copiedActions from 'gModules/copied/actions'
<<<<<<<
<div className='hero-unit container-fluid'>
<div className='row'>
<div className='col-md-10'>
<SpacesShowHeader
isLoggedIn={isLoggedIn}
onDestroy={this.destroy.bind(this)}
onSaveName={this.onSaveName.bind(this)}
onSave={this.onSave.bind(this)}
onCopy={this._handleCopy.bind(this)}
name={space.name}
isPrivate={space.is_private}
editableByMe={space.editableByMe}
editsAllowed={space.canvasState.editsAllowed}
onAllowEdits={() => {this.props.dispatch(allowEdits())}}
onForbidEdits={() => {this.props.dispatch(forbidEdits())}}
actionState={space.canvasState.actionState}
canBePrivate={canBePrivate}
onPublicSelect={this.onPublicSelect.bind(this)}
onPrivateSelecundot={this.onPrivateSelect.bind(this)}
onUndo={this.onUndo.bind(this)}
onRedo={this.onRedo.bind(this)}
canUndo={space.checkpointMetadata.head !== space.checkpointMetadata.length - 1}
canRedo={space.checkpointMetadata.head !== 0}
/>
</div>
<div className='col-md-2'>
{!!space.organization &&
<a className='ui image label' href={`/organizations/${space.organization.id}`}>
<img src={space.organization.picture}/>
{space.organization.name}
</a>
}
{!space.organization && space.user && !space.editableByMe &&
<a className='ui image label' href={`/users/${space.user.id}`}>
<img src={space.user.picture}/>
{space.user.name}
</a>
}
</div>
</div>
=======
<div className='hero-unit'>
<SpacesShowHeader
isLoggedIn={isLoggedIn}
onSaveName={this.onSaveName.bind(this)}
name={space.name}
isPrivate={space.is_private}
editableByMe={space.editableByMe}
actionState={space.canvasState.actionState}
canBePrivate={canBePrivate}
onPublicSelect={this.onPublicSelect.bind(this)}
onPrivateSelect={this.onPrivateSelect.bind(this)}
onPrivateSelecundot={this.onPrivateSelect.bind(this)}
space={space}
/>
<SpacesShowToolbar
isLoggedIn={isLoggedIn}
onDestroy={this.destroy.bind(this)}
onCopyModel={this._handleCopyModel.bind(this)}
onCopyMetrics={this.onCopy.bind(this)}
onPasteMetrics={this.onPaste.bind(this)}
onCutMetrics={this.onCut.bind(this)}
isPrivate={space.is_private}
editableByMe={space.editableByMe}
actionState={space.canvasState.actionState}
onUndo={this.onUndo.bind(this)}
onRedo={this.onRedo.bind(this)}
canUndo={space.checkpointMetadata.head !== space.checkpointMetadata.length - 1}
canRedo={space.checkpointMetadata.head !== 0}
/>
>>>>>>>
<div className='hero-unit'>
<SpacesShowHeader
isLoggedIn={isLoggedIn}
onSaveName={this.onSaveName.bind(this)}
name={space.name}
isPrivate={space.is_private}
editableByMe={space.editableByMe}
actionState={space.canvasState.actionState}
canBePrivate={canBePrivate}
onPublicSelect={this.onPublicSelect.bind(this)}
onPrivateSelect={this.onPrivateSelect.bind(this)}
onPrivateSelecundot={this.onPrivateSelect.bind(this)}
space={space}
/>
<SpacesShowToolbar
editsAllowed={space.canvasState.editsAllowed}
onAllowEdits={() => {this.props.dispatch(allowEdits())}}
onForbidEdits={() => {this.props.dispatch(forbidEdits())}}
isLoggedIn={isLoggedIn}
onDestroy={this.destroy.bind(this)}
onCopyModel={this._handleCopyModel.bind(this)}
onCopyMetrics={this.onCopy.bind(this)}
onPasteMetrics={this.onPaste.bind(this)}
onCutMetrics={this.onCut.bind(this)}
isPrivate={space.is_private}
editableByMe={space.editableByMe}
actionState={space.canvasState.actionState}
onUndo={this.onUndo.bind(this)}
onRedo={this.onRedo.bind(this)}
canUndo={space.checkpointMetadata.head !== space.checkpointMetadata.length - 1}
canRedo={space.checkpointMetadata.head !== 0}
/> |
<<<<<<<
organizationShow(id) { this.render(<OrganizationShow organizationId={id}/>, {backgroundColor: 'GREY'}) },
organizationsNew() { this.render(<CreateOrganizationPageContainer/>, {backgroundColor: 'GREY'}) },
=======
organizationShow(id) { this.render(<OrganizationShow organizationId={id} key={id}/>, {backgroundColor: 'GREY'}) },
>>>>>>>
organizationShow(id) { this.render(<OrganizationShow organizationId={id} key={id}/>, {backgroundColor: 'GREY'}) },
organizationsNew() { this.render(<CreateOrganizationPageContainer/>, {backgroundColor: 'GREY'}) }, |
<<<<<<<
export function changeMetricClickMode(metricClickMode) {
return { type: 'CHANGE_CANVAS_STATE', values: {metricClickMode: _.isEmpty(metricClickMode) ? 'DEFAULT' : metricClickMode} }
}
export function changeActionState(actionState) {
return { type: 'CHANGE_CANVAS_STATE', values: {actionState} }
=======
export function changeActionState(value) {
return { type: 'CHANGE_CANVAS_STATE', values: {actionState: value} };
}
export function analyzeMetricId(id) {
return { type: 'CHANGE_CANVAS_STATE', values: {analysisMetricId: id} };
}
export function endAnalysis(id) {
return { type: 'CHANGE_CANVAS_STATE', values: {analysisMetricId: ''} };
>>>>>>>
export function changeMetricClickMode(metricClickMode) {
return { type: 'CHANGE_CANVAS_STATE', values: {metricClickMode: _.isEmpty(metricClickMode) ? 'DEFAULT' : metricClickMode} }
}
export function changeActionState(actionState) {
return { type: 'CHANGE_CANVAS_STATE', values: {actionState} }
}
export function analyzeMetricId(id) {
return { type: 'CHANGE_CANVAS_STATE', values: {analysisMetricId: id} };
}
export function endAnalysis(id) {
return { type: 'CHANGE_CANVAS_STATE', values: {analysisMetricId: ''} }; |
<<<<<<<
if (this.needsNewScales(nextProps)) {
this.computeNewScales(nextProps)
}
}
needsNewScales(prevProps) {
return (prevProps.width !== this.props.width) ||
(prevProps.cutOffRatio !== this.props.cutOffRatio) ||
(prevProps.bins !== this.props.bins) ||
(_.get(prevProps, 'simulation.stats') !== _.get(this.props ,'simulation.stats'))
}
computeNewScales(props) {
let { bins, data, width, height, cutOffRatio, onChangeXScale } = props
=======
let { bins, data, width, height, cutOffRatio, onChangeXScale } = nextProps;
>>>>>>>
let { bins, data, width, height, cutOffRatio, onChangeXScale } = nextProps
<<<<<<<
let barWidth = width/histogramData.length
if (!_.isFinite(width)) { return false }
=======
let barWidth = width/histogramData.length;
if (!_.isFinite(width) || !_.isFinite(barWidth)){ return false }
>>>>>>>
let barWidth = width/histogramData.length
if (!_.isFinite(width) || !_.isFinite(barWidth)){ return false } |
<<<<<<<
=======
</div>
<div className='col-md-5'><span className='name'>{fact.name}</span></div>
<div className='col-md-2'>
<div className='variableName'>
<span className='prefix'>#</span>
<span className='variable'>{fact.variable_name}</span>
>>>>>>>
<<<<<<<
<div className='name'>{fact.name}</div>
</div>
<div className='section-help'>
<span className='ui button tiny options' onClick={onEdit}>Edit</span>
=======
<div className='col-md-2'>
<span className='ui button options' onClick={onEdit}>Edit</span>
<span className='ui button options' onClick={onDelete}>Delete</span>
</div>
>>>>>>>
<div className='name'>{fact.name}</div>
</div>
<div className='section-help'>
<span className='ui button tiny options' onClick={onEdit}>Edit</span>
<span className='ui button tiny options' onClick={onDelete}>Delete</span> |
<<<<<<<
function AddAtIndex(l, e, destIndex) {
const index = l.findIndex(el => el === e)
if (index >= destIndex) { return [...l.slice(0, destIndex), e, ...l.slice(destIndex, index), ...l.slice(index+1)] }
else { return [...l.slice(0, index), ...l.slice(index+1, destIndex+1), e, ...l.slice(destIndex+1)] }
}
@connect(newCalculatorSelector, dispatch => bindActionCreators({create, fetchById}, dispatch))
=======
@connect(null, dispatch => bindActionCreators({create, fetchById}, dispatch))
>>>>>>>
function AddAtIndex(l, e, destIndex) {
const index = l.findIndex(el => el === e)
if (index >= destIndex) { return [...l.slice(0, destIndex), e, ...l.slice(destIndex, index), ...l.slice(index+1)] }
else { return [...l.slice(0, index), ...l.slice(index+1, destIndex+1), e, ...l.slice(destIndex+1)] }
}
@connect(null, dispatch => bindActionCreators({create, fetchById}, dispatch)) |
<<<<<<<
import cuid from 'cuid'
=======
>>>>>>>
<<<<<<<
import * as userOrganizationMembershipActions from 'gModules/userOrganizationMemberships/actions.js'
import * as userOrganizationInvitationActions from 'gModules/userOrganizationInvitations/actions.js'
=======
>>>>>>>
<<<<<<<
dispatch(sActions.fetchSuccess([organization]))
const memberships = !!organization.memberships ? organization.memberships : []
const invitations = !!organization.invitations ? organization.invitations : []
dispatch(userOrganizationMembershipActions.fetchSuccess(memberships))
dispatch(userOrganizationInvitationActions.fetchSuccess(invitations))
=======
dispatch(userOrganizationMembershipActions.fetchByOrganizationId(organizationId))
dispatch(oActions.fetchSuccess([organization]))
>>>>>>>
dispatch(oActions.fetchSuccess([organization]))
const memberships = !!organization.memberships ? organization.memberships : []
const invitations = !!organization.invitations ? organization.invitations : []
dispatch(userOrganizationMembershipActions.fetchSuccess(memberships))
dispatch(userOrganizationInvitationActions.fetchSuccess(invitations))
<<<<<<<
const formatted = organizations.map(o => _.pick(o, ['id', 'name', 'picture', 'admin_id']))
dispatch(sActions.fetchSuccess(formatted))
=======
const formatted = organizations.map(o => _.pick(o, ['id', 'name', 'picture']))
dispatch(oActions.fetchSuccess(formatted))
}
}
export function create(name) {
return (dispatch, getState) => {
const cid = cuid()
let object = {id: cid, organization: {name} }
// TODO(matthew): Track pending create request.
const action = oActions.createStart(object);
api(getState()).organizations.create(object, (err, value) => {
if (err) {
// TODO(matthew): Track if request errors out.
captureApiError('OrganizationsCreate', null, null, err, {url: 'OrganizationsCreate'})
} else if (value) {
dispatch(oActions.createSuccess(value, cid))
app.router.history.navigate('/organizations/' + value.id)
}
})
>>>>>>>
const formatted = organizations.map(o => _.pick(o, ['id', 'name', 'picture', 'admin_id']))
dispatch(oActions.fetchSuccess(formatted))
}
}
export function create(name) {
return (dispatch, getState) => {
const cid = cuid()
let object = {id: cid, organization: {name} }
// TODO(matthew): Track pending create request.
const action = oActions.createStart(object);
api(getState()).organizations.create(object, (err, value) => {
if (err) {
// TODO(matthew): Track if request errors out.
captureApiError('OrganizationsCreate', null, null, err, {url: 'OrganizationsCreate'})
} else if (value) {
dispatch(oActions.createSuccess(value, cid))
app.router.history.navigate('/organizations/' + value.id)
}
}) |
<<<<<<<
organizationId={this.props.denormalizedSpace.organization_id}
=======
metricIdsMap={this.metricIdsMap()}
>>>>>>>
organizationId={this.props.denormalizedSpace.organization_id}
metricIdsMap={this.metricIdsMap()} |
<<<<<<<
import {Category} from './categories/category'
import {CategoryForm} from './categories/form'
=======
import {FactListContainer} from 'gComponents/facts/list/container.js'
import {FactGraph} from './facts/factGraph'
>>>>>>>
import {Category} from './categories/category'
import {CategoryForm} from './categories/form'
import {FactListContainer} from 'gComponents/facts/list/container.js'
import {FactGraph} from './facts/factGraph'
<<<<<<<
render () {
const {
props: {organizationId, organizationFacts, members, memberships, invitations, globalFactCategories},
state: {openTab},
} = this
const factCategories = e.collections.filter(globalFactCategories, organizationId, 'organization_id')
=======
render() {
const {organizationId, organizations, organizationFacts, members, memberships, invitations} = this.props
const {openTab} = this.state
>>>>>>>
render() {
const {
props: {organizationId, organizations, organizationFacts, members, memberships, invitations, globalFactCategories},
state: {openTab},
} = this
const factCategories = e.collections.filter(globalFactCategories, organizationId, 'organization_id') |
<<<<<<<
import {actionCreatorsFor} from 'redux-crud'
import $ from 'jquery'
=======
import {actionCreatorsFor} from 'redux-crud';
>>>>>>>
import {actionCreatorsFor} from 'redux-crud'
<<<<<<<
else if (value) {
dispatch(sActions.fetchSuccess([value]))
dispatch(initSpace(spaceId, value.graph))
// TODO(matthew): Right now, the space has an embedded user and organization record... why are we doing this
// extra fetching?
fetchUserIfNeeded(dispatch, value.user_id, getState().users)
fetchOrganizationIfNeeded(dispatch, value.organization_id, getState().organizations)
=======
dispatch(sActions.fetchSuccess([value]))
const user = _.get(value, '_embedded.user')
const organization = _.get(value, '_embedded.organization')
if (!!organization) {dispatch(organizationActions.fetchSuccess([organization]))}
if (!!user) {
dispatch(userActions.fetchSuccess([user]))
} else {
console.warn("No user returned with a space.")
>>>>>>>
dispatch(sActions.fetchSuccess([value]))
dispatch(initSpace(spaceId, value.graph))
const user = _.get(value, '_embedded.user')
const organization = _.get(value, '_embedded.organization')
if (!!organization) {dispatch(organizationActions.fetchSuccess([organization]))}
if (!!user) {
dispatch(userActions.fetchSuccess([user]))
} else {
console.warn("No user returned with a space.") |
<<<<<<<
import math from 'mathjs'
var jStat = require('jstat').jStat
=======
import math from 'mathjs';
import {jStat} from 'jstat'
>>>>>>>
import math from 'mathjs'
import {jStat} from 'jstat' |
<<<<<<<
spaceShowEmbed(id) { this.render(<SpaceShow spaceId={id} embed={true}/>, {isFluid: true, showFooter: false, embed: true}) },
=======
scratchpad() { this.render(<SpaceShow spaceId={5170}/>, {isFluid: true, showFooter: false}) },
>>>>>>>
spaceShowEmbed(id) { this.render(<SpaceShow spaceId={id} embed={true}/>, {isFluid: true, showFooter: false, embed: true}) },
scratchpad() { this.render(<SpaceShow spaceId={5170}/>, {isFluid: true, showFooter: false}) }, |
<<<<<<<
// TODO(matthew): Unnecessary requests.
dispatch(userOrganizationMembershipActions.fetchByOrganizationId(organizationId))
dispatch(userOrganizationInvitationActions.fetchByOrganizationId(organizationId))
=======
>>>>>>> |
<<<<<<<
import {SpaceToolbar} from './Toolbar/index'
import SpaceSidebar from './sidebar'
=======
import SpacesShowToolbar from './Toolbar/index'
import {SpaceSidebar} from './sidebar'
>>>>>>>
import {SpaceToolbar} from './Toolbar/index'
import {SpaceSidebar} from './sidebar' |
<<<<<<<
import multipleSelectionR from './multiple_selection/reducer'
import displayErrorR from './displayErrors/reducer.js';
=======
import displayErrorR from './displayErrors/reducer.js'
>>>>>>>
import multipleSelectionR from './multiple_selection/reducer'
import displayErrorR from './displayErrors/reducer.js' |
<<<<<<<
const [{errors, width, value}, {editorState}] = [this.props, this.state]
const hasErrors = !_.isEmpty(errors)
const className = `TextInput ${width}` + (!_.isEmpty(value) && hasErrors ? ' hasErrors' : '')
=======
const [{hasErrors, width, value, validInputs, errorInputs}, {editorState}] = [this.props, this.state]
const className = `TextInput ${width}` + (_.isEmpty(value) && hasErrors ? ' hasErrors' : '')
>>>>>>>
const className = `TextInput ${width}` + (_.isEmpty(value) && hasErrors ? ' hasErrors' : '')
<<<<<<<
<div>
<span
className={className}
onClick={this.focus.bind(this)}
onKeyDown={e => {e.stopPropagation()}}
onFocus={this.handleFocus.bind(this)}
>
<Editor
onFocus={this.props.onFocus}
onEscape={this.props.onEscape}
editorState={editorState}
handleReturn={e => this.props.onReturn(e.shiftKey)}
onTab={this.handleTab.bind(this)}
onBlur={this.handleBlur.bind(this)}
onChange={this.onChange.bind(this)}
ref='editor'
placeholder={'value'}
/>
</span>
</div>
=======
<span
className={className}
onClick={this.focus.bind(this)}
onKeyDown={e => {this.setState({decoratorsUpToDate: false}); e.stopPropagation()}}
onFocus={this.handleFocus.bind(this)}
>
<Editor
onFocus={this.props.onFocus}
onEscape={this.props.onEscape}
editorState={editorState}
handleReturn={e => this.props.onReturn(e.shiftKey)}
onTab={this.handleTab.bind(this)}
onBlur={this.handleBlur.bind(this)}
onChange={this.onChange.bind(this)}
ref='editor'
placeholder={'value'}
/>
</span>
>>>>>>>
<span
className={className}
onClick={this.focus.bind(this)}
onKeyDown={e => {this.setState({decoratorsUpToDate: false}); e.stopPropagation()}}
onFocus={this.handleFocus.bind(this)}
>
<Editor
onFocus={this.props.onFocus}
onEscape={this.props.onEscape}
editorState={editorState}
handleReturn={e => this.props.onReturn(e.shiftKey)}
onTab={this.handleTab.bind(this)}
onBlur={this.handleBlur.bind(this)}
onChange={this.onChange.bind(this)}
ref='editor'
placeholder={'value'}
/>
</span> |
<<<<<<<
readableId={readableId}
shouldShowReadableId={shouldShowReadableId}
onOpenModal={onOpenModal}
=======
readableId={metric.readableId}
anotherFunctionSelected={anotherFunctionSelected}
onToggleSidebar={onToggleSidebar}
>>>>>>>
readableId={readableId}
shouldShowReadableId={shouldShowReadableId}
onToggleSidebar={onToggleSidebar} |
<<<<<<<
const SpaceHeader = ({canMakeMorePrivateModels, space, onSave, onDestroy, onPublicSelect, onPrivateSelect, onSaveName}) => {
let privacy_header = (<span> <Icon name='globe'/> Public </span>)
=======
const SpaceHeader = ({canMakeMorePrivateModels, space, isLoggedIn, onSave, onCopy, onDestroy, onPublicSelect, onPrivateSelect, onSaveName, canUsePrivateModels}) => {
let privacy_header = (<span><Icon name='globe'/> Public</span>)
>>>>>>>
const SpaceHeader = ({canMakeMorePrivateModels, space, isLoggedIn, onSave, onCopy, onDestroy, onPublicSelect, onPrivateSelect, onSaveName}) => {
let privacy_header = (<span><Icon name='globe'/> Public</span>) |
<<<<<<<
// Make sure that we're not overwritting `help`, `init,` or `version` args in generators
if (argv._.length === 0) {
// handle request for usage and options
if (argv.help || argv.h) {
out.displayHelpScreen();
process.exit(0);
}
// handle request for initializing a new plopfile
if (argv.init || argv.i) {
return out.createInitPlopfile(env.cwd, function (err) {
if (err) {
console.log(err);
process.exit(1);
}
process.exit(0);
});
}
// handle request for version number
if (argv.version || argv.v) {
if (env.modulePackage.version !== globalPkg.version) {
console.log(chalk.yellow('CLI version'), globalPkg.version);
console.log(chalk.yellow('Local version'), env.modulePackage.version);
} else {
console.log(globalPkg.version);
}
return;
}
}
// See if there are args to pass to generator
const eoaIndex = args.indexOf('--');
const {plopArgV, eoaArg} = eoaIndex === -1 ? {plopArgV: []} : {
plopArgV: minimist(args.slice(eoaIndex + 1, args.length)),
eoaArg: args[eoaIndex + 1]
};
const plopfilePath = env.configPath;
// abort if there's no plopfile found
if (plopfilePath == null) {
console.error(chalk.red('[PLOP] ') + 'No plopfile found');
out.displayHelpScreen();
process.exit(1);
}
// set the default base path to the plopfile directory
const plop = nodePlop(plopfilePath, {
force: argv.force || argv.f
});
const generators = plop.getGeneratorList();
const generatorNames = generators.map((v) => v.name);
// locate the generator name based on input and take the rest of the
// user's input as prompt bypass data to be passed into the generator
let generatorName = '';
let bypassArr = [];
for (let i = 0; i < argv._.length; i++) {
const nameTest = (generatorName.length ? generatorName + ' ' : '') + argv._[i];
if (listHasOptionThatStartsWith(generatorNames, nameTest)) {
generatorName = nameTest;
} else {
let index = argv._.findIndex(arg => arg === eoaArg);
// If can't find index, slice until the very end - allowing all `_` to be passed
index = index !== -1 ? index : argv._.length;
// Force `'_'` to become undefined in nameless bypassArr
bypassArr = argv._.slice(i, index).map(arg => arg === '_' ? undefined : arg);
break;
}
}
// hmmmm, couldn't identify a generator in the user's input
if (!generatorName && !generators.length) {
// no generators?! there's clearly something wrong here
console.error(chalk.red('[PLOP] ') + 'No generator found in plopfile');
process.exit(1);
} else if (!generatorName && generators.length === 1) {
// only one generator in this plopfile... let's assume they
// want to run that one!
handlePromptBypass(plop.getGenerator(generatorNames[0]), bypassArr, plopArgV);
} else if (!generatorName && generators.length > 1 && !bypassArr.length) {
// more than one generator? we'll have to ask the user which
// one they want to run.
out.chooseOptionFromList(generators, plop.getWelcomeMessage())
.then((generatorName) => {
handlePromptBypass(plop.getGenerator(generatorName), bypassArr, plopArgV);
})
.catch((err) => {
console.error(chalk.red('[PLOP] ') + 'Something went wrong with selecting a generator', err);
});
} else if (generatorNames.includes(generatorName)) {
// we have found the generator, run it!
handlePromptBypass(plop.getGenerator(generatorName), bypassArr, plopArgV);
} else {
// we just can't make sense of your input... sorry :-(
const fuzyGenName = (generatorName + ' ' + bypassArr.join(' ')).trim();
console.error(chalk.red('[PLOP] ') + 'Could not find a generator for "' + fuzyGenName + '"');
process.exit(1);
}
}
/**
*
* @param generator - Name of the generator to be ran
* @param bypassArr - The array of overwritten properties
* @param plopArgV - The original args passed to plop without using names
*/
function handlePromptBypass(generator, bypassArr, plopArgV) {
// Get named prompts that are passed to the command line
const promptNames = generator.prompts.map((prompt) => prompt.name);
// Check if bypassArr is too long for promptNames
if (bypassArr.length > promptNames.length) {
console.error(chalk.red('[PLOP] ') + 'Too many bypass arguments passed for "' + generator.name + '"');
out.getHelpMessage(generator);
process.exit(1);
}
if (Object.keys(plopArgV).length > 0) {
// Let's make sure we made no whoopsy-poos (AKA passing incorrect inputs)
let errors = false;
Object.keys(plopArgV).forEach((arg) => {
if (!(promptNames.find((name) => name === arg)) && arg !== '_') {
console.error(chalk.red('[PLOP] ') + '"' + arg + '"' + ' is an invalid argument for "' + generator.name + '"');
errors = true;
}
});
if (errors) {
out.getHelpMessage(generator);
process.exit(1);
}
const namedBypassArr = promptNames.map((name) => plopArgV[name] ? plopArgV[name] : undefined);
const bypass = mergeArrays(bypassArr, namedBypassArr);
doThePlop(generator, bypass);
} else {
doThePlop(generator, bypassArr);
}
=======
const plopfilePath = env.configPath;
// handle request for usage and options
if (argv.help || argv.h) {
out.displayHelpScreen();
process.exit(0);
}
// handle request for initializing a new plopfile
if (argv.init || argv.i) {
return out.createInitPlopfile(env.cwd, function(err){
if (err){
console.log(err);
process.exit(1);
}
process.exit(0);
});
}
// handle request for version number
if (argv.version || argv.v) {
if (env.modulePackage.version !== globalPkg.version) {
console.log(chalk.yellow('CLI version'), globalPkg.version);
console.log(chalk.yellow('Local version'), env.modulePackage.version);
} else {
console.log(globalPkg.version);
}
return;
}
// abort if there's no plopfile found
if (plopfilePath == null) {
console.error(chalk.red('[PLOP] ') + 'No plopfile found');
out.displayHelpScreen();
process.exit(1);
}
// set the default base path to the plopfile directory
const plop = nodePlop(plopfilePath, {
force: argv.force || argv.f
});
const generators = plop.getGeneratorList();
const generatorNames = generators.map(function (v) { return v.name; });
// locate the generator name based on input and take the rest of the
// user's input as prompt bypass data to be passed into the generator
let generatorName = '';
let bypassArr = [];
for (let i=0; i < argv._.length; i++) {
const nameTest = (generatorName.length ? generatorName + ' ' : '') + argv._[i];
if (listHasOptionThatStartsWith(generatorNames, nameTest)) {
generatorName = nameTest;
} else {
bypassArr = argv._.slice(i);
break;
}
}
// hmmmm, couldn't identify a generator in the user's input
if (!generatorName && !generators.length) {
// no generators?! there's clearly something wrong here
console.error(chalk.red('[PLOP] ') + 'No generator found in plopfile');
process.exit(1);
} else if (!generatorName && generators.length === 1) {
// only one generator in this plopfile... let's assume they
// want to run that one!
doThePlop(plop.getGenerator(generatorNames[0]), bypassArr);
} else if (!generatorName && generators.length > 1 && !bypassArr.length) {
// more than one generator? we'll have to ask the user which
// one they want to run.
out.chooseOptionFromList(generators, plop.getWelcomeMessage()).then(function (generatorName) {
doThePlop(plop.getGenerator(generatorName));
});
} else if (generatorNames.indexOf(generatorName) >= 0) {
// we have found the generator, run it!
doThePlop(plop.getGenerator(generatorName), bypassArr);
} else {
// we just can't make sense of your input... sorry :-(
const fuzyGenName = (generatorName + ' ' + bypassArr.join(' ')).trim();
console.error(chalk.red('[PLOP] ') + 'Could not find a generator for "' + fuzyGenName + '"');
process.exit(1);
}
>>>>>>>
// Make sure that we're not overwritting `help`, `init,` or `version` args in generators
if (argv._.length === 0) {
// handle request for usage and options
if (argv.help || argv.h) {
out.displayHelpScreen();
process.exit(0);
}
// handle request for initializing a new plopfile
if (argv.init || argv.i) {
return out.createInitPlopfile(env.cwd, function (err) {
if (err) {
console.log(err);
process.exit(1);
}
process.exit(0);
});
}
// handle request for version number
if (argv.version || argv.v) {
if (env.modulePackage.version !== globalPkg.version) {
console.log(chalk.yellow('CLI version'), globalPkg.version);
console.log(chalk.yellow('Local version'), env.modulePackage.version);
} else {
console.log(globalPkg.version);
}
return;
}
}
const plopfilePath = env.configPath;
// abort if there's no plopfile found
if (plopfilePath == null) {
console.error(chalk.red('[PLOP] ') + 'No plopfile found');
out.displayHelpScreen();
process.exit(1);
}
// See if there are args to pass to generator
const eoaIndex = args.indexOf('--');
const {plopArgV, eoaArg} = eoaIndex === -1 ? {plopArgV: []} : {
plopArgV: minimist(args.slice(eoaIndex + 1, args.length)),
eoaArg: args[eoaIndex + 1]
};
// set the default base path to the plopfile directory
const plop = nodePlop(plopfilePath, {
force: argv.force || argv.f
});
const generators = plop.getGeneratorList();
const generatorNames = generators.map((v) => v.name);
// locate the generator name based on input and take the rest of the
// user's input as prompt bypass data to be passed into the generator
let generatorName = '';
let bypassArr = [];
for (let i=0; i < argv._.length; i++) {
const nameTest = (generatorName.length ? generatorName + ' ' : '') + argv._[i];
if (listHasOptionThatStartsWith(generatorNames, nameTest)) {
generatorName = nameTest;
} else {
let index = argv._.findIndex(arg => arg === eoaArg);
// If can't find index, slice until the very end - allowing all `_` to be passed
index = index !== -1 ? index : argv._.length;
// Force `'_'` to become undefined in nameless bypassArr
bypassArr = argv._.slice(i, index).map(arg => arg === '_' ? undefined : arg);
break;
}
}
// hmmmm, couldn't identify a generator in the user's input
if (!generatorName && !generators.length) {
// no generators?! there's clearly something wrong here
console.error(chalk.red('[PLOP] ') + 'No generator found in plopfile');
process.exit(1);
} else if (!generatorName && generators.length === 1) {
// only one generator in this plopfile... let's assume they
// want to run that one!
handlePromptBypass(plop.getGenerator(generatorNames[0]), bypassArr, plopArgV);
} else if (!generatorName && generators.length > 1 && !bypassArr.length) {
// more than one generator? we'll have to ask the user which
// one they want to run.
out.chooseOptionFromList(generators, plop.getWelcomeMessage())
.then((generatorName) => {
handlePromptBypass(plop.getGenerator(generatorName), bypassArr, plopArgV);
})
.catch((err) => {
console.error(chalk.red('[PLOP] ') + 'Something went wrong with selecting a generator', err);
});
} else if (generatorNames.includes(generatorName)) {
// we have found the generator, run it!
handlePromptBypass(plop.getGenerator(generatorName), bypassArr, plopArgV);
} else {
// we just can't make sense of your input... sorry :-(
const fuzyGenName = (generatorName + ' ' + bypassArr.join(' ')).trim();
console.error(chalk.red('[PLOP] ') + 'Could not find a generator for "' + fuzyGenName + '"');
process.exit(1);
}
}
/**
*
* @param generator - Name of the generator to be ran
* @param bypassArr - The array of overwritten properties
* @param plopArgV - The original args passed to plop without using names
*/
function handlePromptBypass(generator, bypassArr, plopArgV) {
// Get named prompts that are passed to the command line
const promptNames = generator.prompts.map((prompt) => prompt.name);
// Check if bypassArr is too long for promptNames
if (bypassArr.length > promptNames.length) {
console.error(chalk.red('[PLOP] ') + 'Too many bypass arguments passed for "' + generator.name + '"');
out.getHelpMessage(generator);
process.exit(1);
}
if (Object.keys(plopArgV).length > 0) {
// Let's make sure we made no whoopsy-poos (AKA passing incorrect inputs)
let errors = false;
Object.keys(plopArgV).forEach((arg) => {
if (!(promptNames.find((name) => name === arg)) && arg !== '_') {
console.error(chalk.red('[PLOP] ') + '"' + arg + '"' + ' is an invalid argument for "' + generator.name + '"');
errors = true;
}
});
if (errors) {
out.getHelpMessage(generator);
process.exit(1);
}
const namedBypassArr = promptNames.map((name) => plopArgV[name] ? plopArgV[name] : undefined);
const bypass = mergeArrays(bypassArr, namedBypassArr);
doThePlop(generator, bypass);
} else {
doThePlop(generator, bypassArr);
}
<<<<<<<
generator.runPrompts(bypassArr)
.then(generator.runActions)
.then(function (result) {
result.changes.forEach(function (line) {
console.log(chalk.green('[SUCCESS]'), line.type, line.path);
});
result.failures.forEach(function (line) {
const logs = [chalk.red('[FAILED]')];
if (line.type) {
logs.push(line.type);
}
if (line.path) {
logs.push(line.path);
}
const error = line.error || line.message;
logs.push(chalk.red(error));
console.log.apply(console, logs);
});
})
.catch(function (err) {
console.error(chalk.red('[ERROR]'), err.message);
process.exit(1);
});
=======
console.clear();
generator.runPrompts(bypassArr)
.then(answers => {
console.clear();
const noMap = (argv['show-type-names'] || argv.t);
const progress = ora();
const onComment = (msg) => {
progress.info(msg); progress.start();
};
const onSuccess = (change) => {
let line = '';
if (change.type) { line += ` ${out.typeMap(change.type, noMap)}`; }
if (change.path) { line += ` ${change.path}`; }
progress.succeed(line); progress.start();
};
const onFailure = (fail) => {
let line = '';
if (fail.type) { line += ` ${out.typeMap(fail.type, noMap)}`; }
if (fail.path) { line += ` ${fail.path}`; }
const errMsg = fail.error || fail.message;
if (errMsg) { line += ` ${errMsg}` };
progress.fail(line); progress.start();
};
progress.start();
return generator.runActions(answers, {onSuccess, onFailure, onComment})
.then(() => progress.stop());
})
.catch(function (err) {
console.error(chalk.red('[ERROR]'), err.message);
process.exit(1);
});
>>>>>>>
console.clear();
generator.runPrompts(bypassArr)
.then(answers => {
console.clear();
const noMap = (argv['show-type-names'] || argv.t);
const progress = ora();
const onComment = (msg) => {
progress.info(msg); progress.start();
};
const onSuccess = (change) => {
let line = '';
if (change.type) { line += ` ${out.typeMap(change.type, noMap)}`; }
if (change.path) { line += ` ${change.path}`; }
progress.succeed(line); progress.start();
};
const onFailure = (fail) => {
let line = '';
if (fail.type) { line += ` ${out.typeMap(fail.type, noMap)}`; }
if (fail.path) { line += ` ${fail.path}`; }
const errMsg = fail.error || fail.message;
if (errMsg) { line += ` ${errMsg}` };
progress.fail(line); progress.start();
};
progress.start();
return generator.runActions(answers, {onSuccess, onFailure, onComment})
.then(() => progress.stop());
})
.catch(function (err) {
console.error(chalk.red('[ERROR]'), err.message);
process.exit(1);
}); |
<<<<<<<
isInScreenshot,
editing,
=======
exportedAsFact,
>>>>>>>
isInScreenshot,
exportedAsFact,
<<<<<<<
{(hovered || shouldShowReadableId || hasGuesstimateDescription) &&
<MetricToken
readableId={readableId}
shouldShowReadableId={shouldShowReadableId}
onToggleSidebar={onToggleSidebar}
hasGuesstimateDescription={hasGuesstimateDescription}
/>
}
=======
<div className='MetricToken'>
{ this.renderToken() }
</div>
>>>>>>>
<div className='MetricToken'>
{ this.renderToken() }
</div> |
<<<<<<<
var changeCase = require('change-case');
var handlebars = require('handlebars');
=======
var inquirer = require('inquirer'),
changeCase = require('change-case'),
handlebars = require('handlebars');
>>>>>>>
var inquirer = require('inquirer');
var handlebars = require('handlebars');
var changeCase = require('change-case');
<<<<<<<
addPartial: addPartial,
=======
addPrompt: addPrompt,
>>>>>>>
addPartial: addPartial,
addPrompt: addPrompt, |
<<<<<<<
pad = " ",
items = [],
util = require('util'),
tty = require('tty'),
charm = require('charm')(process),
running = false,
drawn = false,
auto_stamp = false,
looper = null,
settings = {
invert: true,
interval: 250
};
=======
pad = " ",
items = [],
util = require('util'),
tty = require('tty'),
charm = require('charm')(process),
running = false,
drawn = false,
auto_stamp = false,
current_row = 0,
current_pos = null,
looper = null,
settings = {
invert: true,
uptime: true,
interval: 250
};
var config = exports.config = function(opts) {
opts.hasOwnProperty('invert') && (settings.invert = opts.invert);
opts.hasOwnProperty('interval') && (settings.interval = opts.interval);
opts.hasOwnProperty('uptime') && (settings.uptime = opts.uptime);
};
//
// Some cursor functions. Lifted these from Mocha's reporter, but it's just standard writing stuff.
//
cursor = {
hide: function() {
process.stdout.write('\u001b[?25l');
},
show: function() {
process.stdout.write('\u001b[?25h');
},
deleteLine: function() {
process.stdout.write('\u001b[2K');
},
position: function() {
process.stdout.write('\033[6n');
},
beginningOfLine: function() {
process.stdout.write('\u001b[0G');
},
CR: function() {
cursor.deleteLine();
cursor.beginningOfLine();
},
up: function(n) {
process.stdout.write('\u001b[' + n + 'A');
},
>>>>>>>
pad = " ",
items = [],
util = require('util'),
tty = require('tty'),
charm = require('charm')(process),
running = false,
drawn = false,
auto_stamp = false,
looper = null,
settings = {
invert: true,
uptime: true,
interval: 250
};
<<<<<<<
}
if (out !== "") {
out = "Status @ " + nicetime(process.uptime(), true) + " |" + out;
}
return out;
=======
if (settings.uptime && out !== "") {
out = "Status @ " + nicetime(process.uptime(), true) + " |" + out;
}
return out;
>>>>>>>
}
if (settings.uptime && out !== "") {
out = "Status @ " + nicetime(process.uptime(), true) + " |" + out;
}
return out; |
<<<<<<<
var fonts = config.fonts || [
'"Arial", "Helvetica", sans-serif',
=======
var fonts = [
'"Arial", "Helvetica", sans-serif'
>>>>>>>
var fonts = config.fonts || [
'"Arial", "Helvetica", sans-serif' |
<<<<<<<
// add to cache
URL_TO_ID_CACHE[url] = storageId
return storageId
=======
>>>>>>> |
<<<<<<<
userCtrl.loadingModal = $uibModal
=======
$rootScope.pageLoadingProgress = 0;
user.loadingModal = $uibModal
>>>>>>>
$rootScope.pageLoadingProgress = 0;
userCtrl.loadingModal = $uibModal |
<<<<<<<
scimUser.id = user.id;
scimUser.schemas = [];
scimUser.schemas[0] = "urn:ietf:params:scim:schemas:core:2.0:User";
scimUser.displayName = editUserCtrl.user.givenName + " "
+ editUserCtrl.user.familyName;
scimUser.name = {
givenName : editUserCtrl.user.givenName,
familyName : editUserCtrl.user.familyName,
middleName : ""
};
scimUser.emails = [ {
type : "work",
value : editUserCtrl.user.email,
primary : true
} ];
scimUser.userName = editUserCtrl.user.userName;
scimUser.active = true;
scimUser.photos = [{
type : "photo",
value : editUserCtrl.user.picture
}];
console.info("Adding user ... ", scimUser);
scimFactory.updateUser(scimUser).then(
=======
console.info($scope.userUpdateForm.name.$pristine);
console.info($scope.userUpdateForm.surname.$pristine);
console.info($scope.userUpdateForm.email.$pristine);
console.info($scope.userUpdateForm.username.$pristine);
console.info($scope.userUpdateForm.picture.$pristine);
if ($scope.userUpdateForm.name.$dirty || $scope.userUpdateForm.surname.$dirty) {
scimUser.displayName = editUserCtrl.user.name + " "
+ editUserCtrl.user.surname;
scimUser.name = {
givenName : editUserCtrl.user.name,
familyName : editUserCtrl.user.surname,
middleName : ""
};
}
if ($scope.userUpdateForm.email.$dirty) {
scimUser.emails = [ {
type : "work",
value : editUserCtrl.user.email,
primary : true
} ];
}
if ($scope.userUpdateForm.username.$dirty) {
scimUser.userName = editUserCtrl.user.username;
}
if ($scope.userUpdateForm.picture.$dirty) {
scimUser.picture = editUserCtrl.user.picture;
}
console.info("Edited user ... ", scimUser);
scimFactory.updateUser(user.id, scimUser).then(
>>>>>>>
if ($scope.userUpdateForm.name.$dirty || $scope.userUpdateForm.surname.$dirty) {
scimUser.displayName = editUserCtrl.user.name + " "
+ editUserCtrl.user.surname;
scimUser.name = {
givenName : editUserCtrl.user.name,
familyName : editUserCtrl.user.surname,
middleName : ""
};
}
if ($scope.userUpdateForm.email.$dirty) {
scimUser.emails = [ {
type : "work",
value : editUserCtrl.user.email,
primary : true
} ];
}
if ($scope.userUpdateForm.username.$dirty) {
scimUser.userName = editUserCtrl.user.username;
}
if ($scope.userUpdateForm.picture.$dirty) {
scimUser.picture = editUserCtrl.user.picture;
}
console.info("Edited user ... ", scimUser);
scimFactory.updateUser(user.id, scimUser).then( |
<<<<<<<
, button: { fullscreen: true, preview: true }
, autogrow: false
=======
, button: { fullscreen: true
, preview: true
, bar: "auto"
}
>>>>>>>
, autogrow: false
, button: { fullscreen: true
, preview: true
, bar: "auto"
} |
<<<<<<<
const sinon = require("sinon");
=======
const SynchronousPromise = require("synchronous-promise").SynchronousPromise;
>>>>>>>
const sinon = require("sinon");
const SynchronousPromise = require("synchronous-promise").SynchronousPromise; |
<<<<<<<
let overlay;
function AnnulusFilter() {
PIXI.Filter.call(this, null, shaderContent);
this.uniforms.worldCoordinates = new Float32Array([0.0, 0.0]);
this.uniforms.worldSize = new Float32Array([1000.0, 1400.0]);
this.uniforms.magicMatrix = new PIXI.Matrix;
}
AnnulusFilter.prototype = Object.create(PIXI.Filter.prototype);
AnnulusFilter.prototype.constructor = AnnulusFilter;
Object.defineProperties(AnnulusFilter.prototype,
{
worldCoordinates: {
get: function () {return this.uniforms.worldCoordinates;},
set: function (value) {this.uniforms.worldCoordinates = value;}
},
worldSize: {
get: function () {return this.uniforms.worldSize;},
set: function (value) {this.uniforms.worldSize = value;}
}
});
AnnulusFilter.prototype.apply = function (filterManager, input, output)
{
filterManager.calculateNormalizedScreenSpaceMatrix(this.uniforms.magicMatrix);
filterManager.applyFilter(this, input, output);
};
let shaderContent = require('raw!../shaders/annulus_fog.frag');
let fogShader = new AnnulusFilter();
const webSocketMessageReceived = (e) => {
var fileReader = new FileReader();
fileReader.onload = function() {
ships = Space.decode(this.result).spaceships
=======
document.body.appendChild(renderer.view);
>>>>>>>
let overlay;
function AnnulusFilter() {
PIXI.Filter.call(this, null, shaderContent);
this.uniforms.worldCoordinates = new Float32Array([0.0, 0.0]);
this.uniforms.worldSize = new Float32Array([1000.0, 1400.0]);
this.uniforms.magicMatrix = new PIXI.Matrix;
}
AnnulusFilter.prototype = Object.create(PIXI.Filter.prototype);
AnnulusFilter.prototype.constructor = AnnulusFilter;
Object.defineProperties(AnnulusFilter.prototype,
{
worldCoordinates: {
get: function () {return this.uniforms.worldCoordinates;},
set: function (value) {this.uniforms.worldCoordinates = value;}
},
worldSize: {
get: function () {return this.uniforms.worldSize;},
set: function (value) {this.uniforms.worldSize = value;}
}
});
AnnulusFilter.prototype.apply = function (filterManager, input, output)
{
filterManager.calculateNormalizedScreenSpaceMatrix(this.uniforms.magicMatrix);
filterManager.applyFilter(this, input, output);
};
let shaderContent = require('raw!../shaders/annulus_fog.frag');
let fogShader = new AnnulusFilter();
document.body.appendChild(renderer.view);
<<<<<<<
if (ships.length > 0) {
myShip = ships.find(function(ship) { return ship.id == myID })
var ownPosition = {x: myShip.position.x/100, y: myShip.position.y/100};
viewport = {vx: ownPosition.x, vy: ownPosition.y, width: 800, height: 600};
}
for (var idx in ships) {
let ship = ships[idx]
let sprite = sprites[ship.id];
let thrust = thrusts[ship.id];
let container = shipContainers[ship.id];
if (ship.inputThrust) {
thrust.visible = true;
}
else {
thrust.visible = false;
}
var translatedPosition = translateToViewport(ship.position.x/100, ship.position.y/100, viewport)
container.position.set(translatedPosition.x, translatedPosition.y);
container.pivot.set(sprite.width / 2, sprite.height / 2);
container.rotation = ship.facing;
// movie.anchor.set(0.5);
thrust.animationSpeed = 0.5;
thrust.play();
=======
if (globalState.spaceshipMap.size > 0) {
myShip = globalState.spaceshipMap.get(globalState.clientId);
viewport = myShip.viewport();
>>>>>>>
if (globalState.spaceshipMap.size > 0) {
myShip = globalState.spaceshipMap.get(globalState.clientId);
viewport = myShip.viewport();
<<<<<<<
sendInput();
=======
>>>>>>> |
<<<<<<<
arch: arch,
version: "0.35.4",
=======
arch: "x64",
version: "0.36.0",
>>>>>>>
arch: arch,
version: "0.36.0", |
<<<<<<<
return "in "+seconds+" seconds";
=======
return seconds + " seconds ago";
>>>>>>>
return seconds + " seconds ago";
<<<<<<<
} else if ( minutes === 1 ) {
return "one minute ago";
} else {
return minutes+" minutes ago";
=======
>>>>>>>
<<<<<<<
return filesize;
};
/*!
linebreaks
Replaces line breaks in plain text with appropriate HTML; a single newline becomes an HTML line break (<br />) and a new line followed by a blank line becomes a paragraph break (</p>).
For example:
{{ value|linebreaks }}
If value is Joel\nis a slug, the output will be <p>Joel<br />is a slug</p>.
/**/
Humanize.linebreaks = function( str ) {
str = str.replace( /(\r\n|\n|\r){2}/gm, "</p><p>" );
str = str.replace( /(\r\n|\n|\r)/gm, "<br />" );
return '<p>' + str + '</p>';
};
/*!
linebreaksbr
Converts all newlines in a piece of plain text to HTML line breaks (<br />).
For example:
{{ value|linebreaksbr }}
If value is Joel\nis a slug, the output will be Joel<br />is a slug.
/**/
Humanize.linebreaksbr = function( str ) {
return str.replace( /(\r\n|\n|\r)/gm, "<br />" );
};
/*!
pluralize
Returns a plural suffix if the value is not 1. By default, this suffix is 's'.
Example:
You have {{ num_messages }} message{{ num_messages|pluralize }}.
If num_messages is 1, the output will be You have 1 message. If num_messages is 2 the output will be You have 2 messages.
For words that require a suffix other than 's', you can provide an alternate suffix as a parameter to the filter.
Example:
You have {{ num_walruses }} walrus{{ num_walruses|pluralize:"es" }}.
For words that don't pluralize by simple suffix, you can specify both a singular and plural suffix, separated by a comma.
Example:
You have {{ num_cherries }} cherr{{ num_cherries|pluralize:"y,ies" }}.
/**/
Humanize.pluralize = function( number, suffix1, suffix2 ) {
var singular = '', plural = 's';
if ( suffix2 !== undefined ) {
singular = suffix1;
plural = suffix2;
} else if ( suffix1 !== undefined ) {
plural = suffix1;
}
return parseInt( number ) === 1 ? singular : plural;
};
/*!
truncatechars
New in Django 1.4: Please see the release notes
Truncates a string if it is longer than the specified number of characters. Truncated strings will end with a translatable ellipsis sequence ("…").
Argument: Number of characters to truncate to
For example:
{{ value|truncatechars:9 }}
If value is "Joel is a slug", the output will be "Joel is …".
/**/
Humanize.truncatechars = function( string, length ) {
if ( string.length > length ) {
return string.substr( 0,length -1 ) + '…';
} else {
return string;
}
};
/*!
truncatewords
Truncates a string after a certain number of words.
=======
/*!
linebreaks
Replaces line breaks in plain text with appropriate HTML; a single newline becomes an HTML line break (<br />) and a new line followed by a blank line becomes a paragraph break (</p>).
For example:
{{ value|linebreaks }}
If value is Joel\nis a slug, the output will be <p>Joel<br />is a slug</p>.
/**/
Humanize.linebreaks = function( str ) {
str = str.replace( /(\r\n|\n|\r){2}/gm, "</p><p>" );
str = str.replace( /(\r\n|\n|\r)/gm, "<br />" );
return '<p>' + str + '</p>';
};
/*!
linebreaksbr
Converts all newlines in a piece of plain text to HTML line breaks (<br />).
>>>>>>>
return filesize;
};
/*!
linebreaks
Replaces line breaks in plain text with appropriate HTML; a single newline becomes an HTML line break (<br />) and a new line followed by a blank line becomes a paragraph break (</p>).
For example:
{{ value|linebreaks }}
If value is Joel\nis a slug, the output will be <p>Joel<br />is a slug</p>.
/**/
Humanize.linebreaks = function( str ) {
str = str.replace( /(\r\n|\n|\r){2}/gm, "</p><p>" );
str = str.replace( /(\r\n|\n|\r)/gm, "<br />" );
return '<p>' + str + '</p>';
};
/*!
linebreaksbr
Converts all newlines in a piece of plain text to HTML line breaks (<br />).
For example:
{{ value|linebreaksbr }}
If value is Joel\nis a slug, the output will be Joel<br />is a slug.
/**/
Humanize.linebreaksbr = function( str ) {
return str.replace( /(\r\n|\n|\r)/gm, "<br />" );
};
/*!
pluralize
Returns a plural suffix if the value is not 1. By default, this suffix is 's'.
Example:
You have {{ num_messages }} message{{ num_messages|pluralize }}.
If num_messages is 1, the output will be You have 1 message. If num_messages is 2 the output will be You have 2 messages.
For words that require a suffix other than 's', you can provide an alternate suffix as a parameter to the filter.
Example:
You have {{ num_walruses }} walrus{{ num_walruses|pluralize:"es" }}.
For words that don't pluralize by simple suffix, you can specify both a singular and plural suffix, separated by a comma.
Example:
You have {{ num_cherries }} cherr{{ num_cherries|pluralize:"y,ies" }}.
/**/
Humanize.pluralize = function( number, suffix1, suffix2 ) {
var singular = '', plural = 's';
if ( suffix2 !== undefined ) {
singular = suffix1;
plural = suffix2;
} else if ( suffix1 !== undefined ) {
plural = suffix1;
}
return parseInt( number ) === 1 ? singular : plural;
};
/*!
truncatechars
New in Django 1.4: Please see the release notes
Truncates a string if it is longer than the specified number of characters. Truncated strings will end with a translatable ellipsis sequence ("…").
Argument: Number of characters to truncate to
For example:
{{ value|truncatechars:9 }}
If value is "Joel is a slug", the output will be "Joel is …".
/**/
Humanize.truncatechars = function( string, length ) {
if ( string.length > length ) {
return string.substr( 0,length -1 ) + '…';
} else {
return string;
}
};
/*!
truncatewords
Truncates a string after a certain number of words.
/*!
linebreaks
Replaces line breaks in plain text with appropriate HTML; a single newline becomes an HTML line break (<br />) and a new line followed by a blank line becomes a paragraph break (</p>).
For example:
{{ value|linebreaks }}
If value is Joel\nis a slug, the output will be <p>Joel<br />is a slug</p>.
/**/
Humanize.linebreaks = function( str ) {
str = str.replace( /(\r\n|\n|\r){2}/gm, "</p><p>" );
str = str.replace( /(\r\n|\n|\r)/gm, "<br />" );
return '<p>' + str + '</p>';
};
/*!
linebreaksbr
Converts all newlines in a piece of plain text to HTML line breaks (<br />).
<<<<<<<
{{ value|truncatewords:2 }}
If value is "Joel is a slug", the output will be "Joel is …".
=======
Example:
>>>>>>>
Example: |
<<<<<<<
breadcrumbs: false,
=======
data: false,
>>>>>>>
breadcrumbs: false,
data: false, |
<<<<<<<
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
=======
var React = require('react');
var ReactDOM = require('react-dom');
var sha384 = require('js-sha512').sha384;
>>>>>>>
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
var sha384 = require('js-sha512').sha384;
<<<<<<<
username: username,
showUsernameModal: true,
messages: [],
isLoadingMessages: true,
=======
username: '',
authToken: '',
keyPair: null,
mID: '', // miniLock ID
wsMsgs: null, // WebSockets connection for getting/sending messages
messages: [],
showUsernameModal: false,
>>>>>>>
username: username,
showUsernameModal: true,
isLoadingMessages: true,
authToken: '',
keyPair: null,
mID: '', // miniLock ID
wsMsgs: null, // WebSockets connection for getting/sending messages
messages: [], |
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true |
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true |
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true |
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true |
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true |
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true
<<<<<<<
'enumerable': false
=======
'enumberable': false,
'configurable': true
>>>>>>>
'enumerable': false,
'configurable': true |
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true |
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true
<<<<<<<
"enumerable": false
=======
"enumberable": false,
"configurable": true
>>>>>>>
"enumerable": false,
"configurable": true |
<<<<<<<
description: $(modal).find('#id_description_ifr').contents().find("[data-id=id_description]").html(),
=======
activity_type: $(modal).find('#id_activity_type').val(),
description: $(modal).find('#id_description').val(),
>>>>>>>
description: $(modal).find('#id_description_ifr').contents().find("[data-id=id_description]").html(),
activity_type: $(modal).find('#id_activity_type').val(),
description: $(modal).find('#id_description').val(), |
<<<<<<<
PipEncode: require('./lib/pipencode'),
=======
PipMap: require('./lib/pipmap'),
>>>>>>>
PipEncode: require('./lib/pipencode'),
PipMap: require('./lib/pipmap'), |
<<<<<<<
if(this.dependencySet_){
this.setupDependencies();
}
=======
this.getDirector().eventDispatcher.updateDispatchOrder(this);
>>>>>>>
if(this.dependencySet_){
this.setupDependencies();
}
this.getDirector().eventDispatcher.updateDispatchOrder(this); |
<<<<<<<
if(charge < maxCharge){
charge = Math.max(charge - chargeDecayRate, 0);
}
=======
// Lock charge at 100 once user reaches 100
if(charge < 100){
charge = Math.max(charge - chargeDecayRate, 0);
}
>>>>>>>
// Lock charge at 100 once user reaches 100
if(charge < maxCharge){
charge = Math.max(charge - chargeDecayRate, 0);
} |
<<<<<<<
body.removeClass().addClass('header-fixed header-light sidebar-dark sidebar-fixed sidebar-minified-out')
window.isMinified = false; // Because It is not minified (aka it is opened)
window.isCollapsed = false;
=======
body.removeClass('sidebar-fixed-offcanvas sidebar-static sidebar-static-offcanvas sidebar-collapse sidebar-collapse-out sidebar-minified sidebar-minified-out').addClass('sidebar-fixed')
>>>>>>>
body.removeClass('sidebar-fixed-offcanvas sidebar-static sidebar-static-offcanvas sidebar-collapse sidebar-collapse-out sidebar-minified sidebar-minified-out').addClass('sidebar-fixed')
window.isMinified = false; // Because It is not minified (aka it is opened)
window.isCollapsed = false;
<<<<<<<
body.removeClass().addClass('header-fixed header-light sidebar-dark sidebar-fixed-offcanvas sidebar-collapse')
window.isCollapsed = true;
window.isMinified = false;
=======
body.removeClass('sidebar-static sidebar-static-offcanvas sidebar-collapse-out sidebar-minified sidebar-minified-out sidebar-fixed').addClass('sidebar-fixed-offcanvas sidebar-collapse')
>>>>>>>
body.removeClass('sidebar-static sidebar-static-offcanvas sidebar-collapse-out sidebar-minified sidebar-minified-out sidebar-fixed').addClass('sidebar-fixed-offcanvas sidebar-collapse')
window.isCollapsed = true;
window.isMinified = false;
<<<<<<<
body.removeClass().addClass('header-fixed header-light sidebar-dark header-fixed header-light sidebar-static sidebar-minified')
window.isMinified = true;
window.isCollapsed = false;
=======
body.removeClass('sidebar-fixed-offcanvas sidebar-static-offcanvas sidebar-collapse sidebar-collapse-out sidebar-minified-out sidebar-fixed').addClass('sidebar-static sidebar-minified')
>>>>>>>
body.removeClass('sidebar-fixed-offcanvas sidebar-static-offcanvas sidebar-collapse sidebar-collapse-out sidebar-minified-out sidebar-fixed').addClass('sidebar-static sidebar-minified')
window.isMinified = true;
window.isCollapsed = false;
<<<<<<<
body.removeClass().addClass('header-fixed header-light sidebar-dark sidebar-static-offcanvas sidebar-collapse');
window.isCollapsed = true;
window.isMinified = false;
=======
body.removeClass('sidebar-fixed-offcanvas sidebar-static sidebar-collapse-out sidebar-minified sidebar-minified-out sidebar-fixed').addClass('sidebar-static-offcanvas sidebar-collapse');
>>>>>>>
body.removeClass('sidebar-fixed-offcanvas sidebar-static sidebar-collapse-out sidebar-minified sidebar-minified-out sidebar-fixed').addClass('sidebar-static-offcanvas sidebar-collapse');
window.isCollapsed = true;
window.isMinified = false; |
<<<<<<<
assert.equal(
base.apply_array(
seqs.from_diff("this is a test", "calculus was a hard test"),
"this is a test"),
"calculus was a hard test");
=======
// t.equal(
// base.apply_array(
// seqs.from_string_rep(values.SET("this is a test", "calculus was a hard test")),
// "this is a test"),
// "calculus was a hard test");
t.end();
});
>>>>>>>
t.equal(
base.apply_array(
seqs.from_diff("this is a test", "calculus was a hard test"),
"this is a test"),
"calculus was a hard test");
t.end();
}); |
<<<<<<<
localStorage.setItem('latestStoppedEntry', JSON.stringify(TogglButton.$latestStoppedEntry));
PopUp.$resumeButton.setAttribute('data-event', 'resume');
PopUp.$resumeButtonContainer.style.display = "block";
=======
p = TogglButton.findProjectByPid(TogglButton.$latestStoppedEntry.pid);
p = (!!p) ? " - " + p.name : "";
PopUp.$resumeButton.title = TogglButton.$latestStoppedEntry.description + p;
PopUp.$timerRow.classList.add("has-resume");
>>>>>>>
p = TogglButton.findProjectByPid(TogglButton.$latestStoppedEntry.pid);
p = (!!p) ? " - " + p.name : "";
PopUp.$resumeButton.title = TogglButton.$latestStoppedEntry.description + p;
PopUp.$timerRow.classList.add("has-resume");
localStorage.setItem('latestStoppedEntry', JSON.stringify(TogglButton.$latestStoppedEntry));
PopUp.$resumeButton.setAttribute('data-event', 'resume');
PopUp.$resumeButtonContainer.style.display = "block"; |
<<<<<<<
projectElem = $(".title .project-item-select-holder") || $(".breadcrumbs-list li:nth-child(2) .breadcrumb-item-text");
=======
projectElem = $(".breadcrumbs-list li:nth-last-child(3) .breadcrumb-item-text");
>>>>>>>
projectElem = $(".title .project-item-select-holder") || $(".breadcrumbs-list li:nth-last-child(3) .breadcrumb-item-text");
<<<<<<<
projectElem = $(".title .project-item-select-holder") || $(".breadcrumbs-list li:nth-child(2) .breadcrumb-item-text");
=======
projectElem = $(".breadcrumbs-list li:nth-last-child(3) .breadcrumb-item-text");
>>>>>>>
projectElem = $(".title .project-item-select-holder") || $(".breadcrumbs-list li:nth-last-child(3) .breadcrumb-item-text"); |
<<<<<<<
$permissionsList: document.querySelector("#permissions-list"),
$newPermission: document.querySelector("#new-permission"),
$originsSelect: document.querySelector("#origins"),
origins: [],
=======
$pomodoroStopTimeTracking: null,
$stopAtDayEnd: null,
>>>>>>>
$permissionsList: document.querySelector("#permissions-list"),
$newPermission: document.querySelector("#new-permission"),
$originsSelect: document.querySelector("#origins"),
origins: [],
$pomodoroStopTimeTracking: null,
$stopAtDayEnd: null,
<<<<<<<
// Add custom permission (custom domain)
document.querySelector('#add-permission').addEventListener('click', function(e) {
var domain = "*://" + Settings.$newPermission.value + "/",
permission = {origins: [domain]},
e = Settings.$originsSelect;
chrome.permissions.request(permission, function(result) {
if (result) {
console.log(domain +" > [ " + document.querySelector("#origins").value + " ]");
Db.setOrigin(Settings.$newPermission.value, o.value);
Settings.$newPermission.value = "";
}
Settings.loadSitesIntoList();
if (result) {
document.location.hash = domain;
}
});
});
document.querySelector('#permissions-list').addEventListener('click', function(e) {
var permission = {origins: [e.target.getAttribute("data-host")]};
if (e.target.checked) {
chrome.permissions.request(permission, function(result) {
if (result) {
e.target.parentNode.classList.remove("disabled");
}
});
} else {
chrome.permissions.contains(permission, function(allowed) {
if (allowed) {
chrome.permissions.remove(permission, function(result) {
if (result) {
e.target.parentNode.classList.add("disabled");
}
});
} else {
alert('No "' + Settings.origins[e.target.getAttribute("data-id")] + '" host permission found.');
}
});
}
});
=======
document.querySelector("#day-end-time").addEventListener('blur', function (e) {
if (e.target.value < 1) {
e.target.value = 1;
return;
}
Settings.saveSetting((document.querySelector('#day-end-time').value), "toggle-day-end-time");
});
document.querySelector(".container").addEventListener("transitionend", function (e) {
if (e.propertyName === "height"
&& e.target.className === "subsettings-details"
&& e.target.clientHeight > 0) {
e.target.scrollIntoView();
}
}, false);
>>>>>>>
// Add custom permission (custom domain)
document.querySelector('#add-permission').addEventListener('click', function(e) {
var domain = "*://" + Settings.$newPermission.value + "/",
permission = {origins: [domain]},
e = Settings.$originsSelect;
chrome.permissions.request(permission, function(result) {
if (result) {
console.log(domain +" > [ " + document.querySelector("#origins").value + " ]");
Db.setOrigin(Settings.$newPermission.value, o.value);
Settings.$newPermission.value = "";
}
Settings.loadSitesIntoList();
if (result) {
document.location.hash = domain;
}
});
});
document.querySelector('#permissions-list').addEventListener('click', function(e) {
var permission = {origins: [e.target.getAttribute("data-host")]};
if (e.target.checked) {
chrome.permissions.request(permission, function(result) {
if (result) {
e.target.parentNode.classList.remove("disabled");
}
});
} else {
chrome.permissions.contains(permission, function(allowed) {
if (allowed) {
chrome.permissions.remove(permission, function(result) {
if (result) {
e.target.parentNode.classList.add("disabled");
}
});
} else {
alert('No "' + Settings.origins[e.target.getAttribute("data-id")] + '" host permission found.');
}
});
}
});
document.querySelector("#day-end-time").addEventListener('blur', function (e) {
if (e.target.value < 1) {
e.target.value = 1;
return;
}
Settings.saveSetting((document.querySelector('#day-end-time').value), "toggle-day-end-time");
});
document.querySelector(".container").addEventListener("transitionend", function (e) {
if (e.propertyName === "height"
&& e.target.className === "subsettings-details"
&& e.target.clientHeight > 0) {
e.target.scrollIntoView();
}
}, false); |
<<<<<<<
},
tabUpdated: function (tabId, changeInfo, tab) {
console.log (tabId);
console.log (changeInfo);
console.log (tab);
if (changeInfo.status === "complete") {
var domain = TogglButton.extractDomain(tab.url),
permission = {origins: domain.origins},
origins,
html = "";
console.log(permission);
//Db.checkUrl();
chrome.permissions.getAll(function(results){
origins = results.origins;
console.log(results);
/*
for (var i = origins.length - 1; i >= 0; i--) {
html = "<option id='origin' data-id='"+ i +"'>"+origins[i]+"</option>" + html;
};
document.querySelector("#origins").innerHTML = html;
*/
});
chrome.permissions.contains(permission, function(result) {
console.log("url ["+permission.origins+"] | Tabs: " + result);
if (result) {
chrome.tabs.executeScript({
code: 'document.body.style.backgroundColor="red"'
});
console.log("FILE: " + domain.file);
/*
chrome.tabs.insertCSS(tabId, {file: "styles/style.css"});
chrome.tabs.executeScript(tabId, {file: "scripts/common.js"});
chrome.tabs.executeScript(tabId, {file: "scripts/content/" + domain.file});
*/
}
});
}
},
extractDomain: function (url) {
var domain,
origin,
file;
//find & remove protocol (http, ftp, etc.) and get domain
if (url.indexOf("://") > -1) {
domain = url.split('/')[2];
}
else {
domain = url.split('/')[0];
}
//find & remove port number
domain = domain.split(':')[0];
origin = Db.getOrigin(domain);
if (!!origin) {
file = origin.split(".")[0] + ".js";
} else {
file = domain.split(".")[0] + ".js";
}
return {
file: file,
origins: [
"*://" + domain + "/*"
]
}
=======
},
toggleRightClickButton: function (show) {
if (show) {
chrome.contextMenus.create({"title": "Start timer", "contexts": ["page"], "onclick": TogglButton.contextMenuClick});
chrome.contextMenus.create({"title": "Start timer with description '%s'", "contexts": ["selection"], "onclick": TogglButton.contextMenuClick});
} else {
chrome.contextMenus.removeAll();
}
},
startAutomatically: function () {
if (!TogglButton.$curEntry && Db.get("startAutomatically") && !!TogglButton.$user) {
var lastEntryString, lastEntry;
lastEntryString = Db.get("latestStoppedEntry");
if (lastEntryString) {
lastEntry = JSON.parse(lastEntryString);
TogglButton.$latestStoppedEntry = lastEntry;
TogglButton.createTimeEntry(TogglButton.$latestStoppedEntry, null);
TogglButton.hideNotification('remind-to-track-time');
}
}
},
stopTrackingOnBrowserClosed: function () {
openWindowsCount--;
if (Db.get("stopAutomatically") && openWindowsCount === 0 && TogglButton.$curEntry) {
TogglButton.stopTimeEntry(TogglButton.$curEntry);
}
>>>>>>>
},
tabUpdated: function (tabId, changeInfo, tab) {
console.log (tabId);
console.log (changeInfo);
console.log (tab);
if (changeInfo.status === "complete") {
var domain = TogglButton.extractDomain(tab.url),
permission = {origins: domain.origins},
origins,
html = "";
console.log(permission);
//Db.checkUrl();
chrome.permissions.getAll(function(results){
origins = results.origins;
console.log(results);
/*
for (var i = origins.length - 1; i >= 0; i--) {
html = "<option id='origin' data-id='"+ i +"'>"+origins[i]+"</option>" + html;
};
document.querySelector("#origins").innerHTML = html;
*/
});
chrome.permissions.contains(permission, function(result) {
console.log("url ["+permission.origins+"] | Tabs: " + result);
if (result) {
chrome.tabs.executeScript({
code: 'document.body.style.backgroundColor="red"'
});
console.log("FILE: " + domain.file);
/*
chrome.tabs.insertCSS(tabId, {file: "styles/style.css"});
chrome.tabs.executeScript(tabId, {file: "scripts/common.js"});
chrome.tabs.executeScript(tabId, {file: "scripts/content/" + domain.file});
*/
}
});
}
},
extractDomain: function (url) {
var domain,
origin,
file;
//find & remove protocol (http, ftp, etc.) and get domain
if (url.indexOf("://") > -1) {
domain = url.split('/')[2];
}
else {
domain = url.split('/')[0];
}
//find & remove port number
domain = domain.split(':')[0];
origin = Db.getOrigin(domain);
if (!!origin) {
file = origin.split(".")[0] + ".js";
} else {
file = domain.split(".")[0] + ".js";
}
return {
file: file,
origins: [
"*://" + domain + "/*"
]
}
},
toggleRightClickButton: function (show) {
if (show) {
chrome.contextMenus.create({"title": "Start timer", "contexts": ["page"], "onclick": TogglButton.contextMenuClick});
chrome.contextMenus.create({"title": "Start timer with description '%s'", "contexts": ["selection"], "onclick": TogglButton.contextMenuClick});
} else {
chrome.contextMenus.removeAll();
}
},
startAutomatically: function () {
if (!TogglButton.$curEntry && Db.get("startAutomatically") && !!TogglButton.$user) {
var lastEntryString, lastEntry;
lastEntryString = Db.get("latestStoppedEntry");
if (lastEntryString) {
lastEntry = JSON.parse(lastEntryString);
TogglButton.$latestStoppedEntry = lastEntry;
TogglButton.createTimeEntry(TogglButton.$latestStoppedEntry, null);
TogglButton.hideNotification('remind-to-track-time');
}
}
},
stopTrackingOnBrowserClosed: function () {
openWindowsCount--;
if (Db.get("stopAutomatically") && openWindowsCount === 0 && TogglButton.$curEntry) {
TogglButton.stopTimeEntry(TogglButton.$curEntry);
}
<<<<<<<
chrome.tabs.onUpdated.addListener(TogglButton.tabUpdated);
chrome.alarms.onAlarm.addListener(TogglButton.pomodoroAlarmStop);
=======
TogglButton.startCheckingDayEnd(Db.get("stopAtDayEnd"));
>>>>>>>
chrome.tabs.onUpdated.addListener(TogglButton.tabUpdated);
chrome.alarms.onAlarm.addListener(TogglButton.pomodoroAlarmStop);
TogglButton.startCheckingDayEnd(Db.get("stopAtDayEnd")); |
<<<<<<<
$stopAtDayEnd: null,
=======
$pomodoroStopTimeTracking: null,
>>>>>>>
$pomodoroStopTimeTracking: null,
$stopAtDayEnd: null,
<<<<<<<
Settings.$stopAtDayEnd = document.querySelector("#stop-at-day-end");
=======
Settings.$pomodoroStopTimeTracking = document.querySelector("#pomodoro-stop-time");
>>>>>>>
Settings.$pomodoroStopTimeTracking = document.querySelector("#pomodoro-stop-time");
Settings.$stopAtDayEnd = document.querySelector("#stop-at-day-end");
<<<<<<<
Settings.$stopAtDayEnd.addEventListener('click', function (e) {
Settings.toggleSetting(e.target, (localStorage.getItem("stopAtDayEnd") !== "true"), "toggle-stop-at-day-end");
});
=======
Settings.$pomodoroStopTimeTracking.addEventListener('click', function (e) {
Settings.toggleSetting(e.target, (localStorage.getItem("pomodoroStopTimeTrackingWhenTimerEnds") !== "true"), "toggle-pomodoro-stop-time");
});
>>>>>>>
Settings.$pomodoroStopTimeTracking.addEventListener('click', function (e) {
Settings.toggleSetting(e.target, (localStorage.getItem("pomodoroStopTimeTrackingWhenTimerEnds") !== "true"), "toggle-pomodoro-stop-time");
});
Settings.$stopAtDayEnd.addEventListener('click', function (e) {
Settings.toggleSetting(e.target, (localStorage.getItem("stopAtDayEnd") !== "true"), "toggle-stop-at-day-end");
}); |
<<<<<<<
this.intentRunner.registerIntent({
name: "tabs.openWindow",
description: "Opens a new (blank) window",
examples: ["open window"],
match: `
open window
open (a |) (new | blank |) window (for me|)
new (blank |) window
`,
async run(context) {
await browser.windows.create({});
},
});
this.intentRunner.registerIntent({
name: "tabs.openPrivateWindow",
description: "Opens a new private window",
examples: ["open private window"],
match: `
open (a |) (new | blank |) (private | incognito) window (for me|)
new (private | incognito) window
`,
async run(context) {
const isAllowed = browser.extension.isAllowedIncognitoAccess();
if (isAllowed === true) {
await browser.windows.create({ incognito: true });
} else {
const e = new Error("Failed to open private window");
e.displayMessage = "Extension does not have permission for incognito mode";
throw e;
}
},
});
=======
this.intentRunner.registerIntent({
name: "tabs.reload",
description: "Reload the active tab of the current window",
examples: ["reload this page"],
match: `
(reload | refresh) (this | current |) (tab | page |) (for me |)
`,
async run(context) {
await browser.tabs.reload();
},
});
>>>>>>>
this.intentRunner.registerIntent({
name: "tabs.reload",
description: "Reload the active tab of the current window",
examples: ["reload this page"],
match: `
(reload | refresh) (this | current |) (tab | page |) (for me |)
`,
async run(context) {
await browser.tabs.reload();
},
});
this.intentRunner.registerIntent({
name: "tabs.openWindow",
description: "Opens a new (blank) window",
examples: ["open window"],
match: `
open window
open (a |) (new | blank |) window (for me|)
new (blank |) window
`,
async run(context) {
await browser.windows.create({});
},
});
this.intentRunner.registerIntent({
name: "tabs.openPrivateWindow",
description: "Opens a new private window",
examples: ["open private window"],
match: `
open (a |) (new | blank |) (private | incognito) window (for me|)
new (private | incognito) window
`,
async run(context) {
const isAllowed = browser.extension.isAllowedIncognitoAccess();
if (isAllowed === true) {
await browser.windows.create({ incognito: true });
} else {
const e = new Error("Failed to open private window");
e.displayMessage = "Extension does not have permission for incognito mode";
throw e;
}
},
}); |
<<<<<<<
'timezone.js',
'ical.js',
'fcmoment.js',
'request.js',
'shell/calendarshell.js',
'shell/rightset.js',
'shell/calendarrightshell.js',
'shell/calendarcollectionshell.js',
'components/event-date-edition.js',
'components/event-date-consultation.js',
'components/event-alarm-edition.js',
'components/event-alarm-consultation.js',
'components/mail-to-attendees.js',
'components/attendee-list-item.js',
'components/attendees-list.js',
'components/attendees-autocomplete-input.js',
'components/event-recurrence-edition.js',
'components/calendars-list.js',
'components/calendar-color-picker.js',
'components/event-create-button.js',
'components/mini-calendar/directive.js',
'components/mini-calendar/controller.js',
'components/mini-calendar/service.js',
'calendar-configuration/calendar-edit.js',
'calendar-configuration/calendars-edit.js',
'calendar/apis.js',
'calendar/controllers.js',
'calendar/directives.js',
'calendar/services/calendar-attendee-service.js',
'calendar/services/calendar-current-view.js',
'calendar/services/calendar-event-emitter.js',
'calendar/services/calendar-event-source.js',
'calendar/services/calendar-home.js',
'calendar/services/calendar-service.js',
'calendar/services/calendar-utils.js',
'calendar/services/calendar-visibility.js',
'calendar/services/event-service.js',
'calendar/services/event-utils.js',
'calendar/services/master-event-cache.js',
'calendar/services/cached-event-source.js',
'calendar/services/events-provider.js',
'calendar/services/delegation-edition-helper.js',
'event-form/controllers.js',
'event-form/services.js',
'event-form/filters.js',
'event-message/directives.js',
'event-consult-form/directives.js',
'event-quick-form/directives.js',
'event-full-form/directives.js'
];
=======
>>>>>>> |
<<<<<<<
=======
VelocityMirrors.update({
framework: options.framework,
port: parseInt(options.port)
}, {
$set: {
state: 'ready',
lastModified: Date.now()
}
});
>>>>>>> |
<<<<<<<
},
userParams && {
init: {
exposeGlobals: userParams.initGlobals,
reinstallApp: negateDefined(userParams.reuse),
},
},
deviceConfig.behavior,
detoxConfig.behavior,
{
init: {
exposeGlobals: true,
reinstallApp: true,
},
cleanup: {
shutdownDevice: false,
},
}
);
=======
deviceConfig.behavior,
detoxConfig.behavior,
{
init: {
exposeGlobals: true,
reinstallApp: undefined,
launchApp: true,
},
launchApp: 'auto',
cleanup: {
shutdownDevice: false,
},
}
)
.tap(config => {
if (config.init.reinstallApp === undefined) {
config.init.reinstallApp = config.launchApp !== 'manual';
}
})
.value();
>>>>>>>
deviceConfig.behavior,
detoxConfig.behavior,
{
init: {
exposeGlobals: true,
reinstallApp: undefined,
},
launchApp: 'auto',
cleanup: {
shutdownDevice: false,
},
}
)
.tap(config => {
if (config.init.reinstallApp === undefined) {
config.init.reinstallApp = config.launchApp !== 'manual';
}
})
.value(); |
<<<<<<<
(runnerConfig.runnerConfig ? `--opts ${runnerConfig.runnerConfig}` : ''),
(cliConfig.configuration ? `--configuration ${cliConfig.configuration}` : ''),
(cliConfig.loglevel ? `--loglevel ${cliConfig.loglevel}` : ''),
(cliConfig.noColor ? '--no-colors' : ''),
(cliConfig.cleanup ? `--cleanup` : ''),
(cliConfig.reuse ? `--reuse` : ''),
(isFinite(cliConfig.debugSynchronization) ? `--debug-synchronization ${cliConfig.debugSynchronization}` : ''),
(platform ? `--invert --grep ${getPlatformSpecificString()}` : ''),
(cliConfig.headless ? `--headless` : ''),
(cliConfig.gpu ? `--gpu ${cliConfig.gpu}` : ''),
(hasCustomValue('record-logs') ? `--record-logs ${cliConfig.recordLogs}` : ''),
(hasCustomValue('take-screenshots') ? `--take-screenshots ${cliConfig.takeScreenshots}` : ''),
(hasCustomValue('record-videos') ? `--record-videos ${cliConfig.recordVideos}` : ''),
(hasCustomValue('record-performance') ? `--record-performance ${cliConfig.recordPerformance}` : ''),
(cliConfig.artifactsLocation ? `--artifacts-location "${cliConfig.artifactsLocation}"` : ''),
(cliConfig.deviceName ? `--device-name "${cliConfig.deviceName}"` : ''),
(cliConfig.useCustomLogger ? `--use-custom-logger "${cliConfig.useCustomLogger}"` : ''),
(cliConfig.forceAdbInstall ? `--force-adb-install "${cliConfig.forceAdbInstall}"` : ''),
=======
(runnerConfig ? `--${configParam} ${runnerConfig}` : ''),
(program.configuration ? `--configuration ${program.configuration}` : ''),
(program.loglevel ? `--loglevel ${program.loglevel}` : ''),
(program.noColor ? '--no-colors' : ''),
(program.cleanup ? `--cleanup` : ''),
(program.reuse ? `--reuse` : ''),
(isFinite(program.debugSynchronization) ? `--debug-synchronization ${program.debugSynchronization}` : ''),
(platform ? `--grep ${getPlatformSpecificString()} --invert` : ''),
(program.headless ? `--headless` : ''),
(program.gpu ? `--gpu ${program.gpu}` : ''),
(hasCustomValue('record-logs') ? `--record-logs ${program.recordLogs}` : ''),
(hasCustomValue('take-screenshots') ? `--take-screenshots ${program.takeScreenshots}` : ''),
(hasCustomValue('record-videos') ? `--record-videos ${program.recordVideos}` : ''),
(hasCustomValue('record-performance') ? `--record-performance ${program.recordPerformance}` : ''),
(program.artifactsLocation ? `--artifacts-location "${program.artifactsLocation}"` : ''),
(program.deviceName ? `--device-name "${program.deviceName}"` : ''),
(program.useCustomLogger ? `--use-custom-logger "${program.useCustomLogger}"` : ''),
(program.forceAdbInstall ? `--force-adb-install "${program.forceAdbInstall}"` : ''),
>>>>>>>
(runnerConfig.runnerConfig ? `--${configParam} ${runnerConfig.runnerConfig}` : ''),
(cliConfig.configuration ? `--configuration ${cliConfig.configuration}` : ''),
(cliConfig.loglevel ? `--loglevel ${cliConfig.loglevel}` : ''),
(cliConfig.noColor ? '--no-colors' : ''),
(cliConfig.cleanup ? `--cleanup` : ''),
(cliConfig.reuse ? `--reuse` : ''),
(isFinite(cliConfig.debugSynchronization) ? `--debug-synchronization ${cliConfig.debugSynchronization}` : ''),
(platform ? `--invert --grep ${getPlatformSpecificString()}` : ''),
(cliConfig.headless ? `--headless` : ''),
(cliConfig.gpu ? `--gpu ${cliConfig.gpu}` : ''),
(hasCustomValue('record-logs') ? `--record-logs ${cliConfig.recordLogs}` : ''),
(hasCustomValue('take-screenshots') ? `--take-screenshots ${cliConfig.takeScreenshots}` : ''),
(hasCustomValue('record-videos') ? `--record-videos ${cliConfig.recordVideos}` : ''),
(hasCustomValue('record-performance') ? `--record-performance ${cliConfig.recordPerformance}` : ''),
(cliConfig.artifactsLocation ? `--artifacts-location "${cliConfig.artifactsLocation}"` : ''),
(cliConfig.deviceName ? `--device-name "${cliConfig.deviceName}"` : ''),
(cliConfig.useCustomLogger ? `--use-custom-logger "${cliConfig.useCustomLogger}"` : ''),
(cliConfig.forceAdbInstall ? `--force-adb-install "${cliConfig.forceAdbInstall}"` : ''), |
<<<<<<<
//Leo: I've disabled calendar events as they are exactly the same as push in the code. You may enable them for Android if needed, but set as ":android:".
=======
const {
userNotificationPushTrigger,
userNotificationCalendarTrigger,
} = require('./utils/notifications');
>>>>>>>
//Leo: I've disabled calendar events as they are exactly the same as push in the code. You may enable them for Android if needed, but set as ":android:".
const {
userNotificationPushTrigger,
userNotificationCalendarTrigger,
} = require('./utils/notifications'); |
<<<<<<<
{this.renderScreenButton('Animations', Screens.AnimationsScreen)}
=======
{this.renderScreenButton('Orientation', Screens.Orientation)}
>>>>>>>
{this.renderScreenButton('Orientation', Screens.Orientation)}
{this.renderScreenButton('Animations', Screens.AnimationsScreen)} |
<<<<<<<
=======
const whichSync = require('which').sync;
const { parse, quote } = require('./utils/shellQuote');
>>>>>>>
const whichSync = require('which').sync; |
<<<<<<<
import AnimationsScreen from './AnimationsScreen';
=======
import Orientation from './Orientation';
>>>>>>>
import Orientation from './Orientation';
import AnimationsScreen from './AnimationsScreen';
<<<<<<<
TimeoutsScreen,
AnimationsScreen
=======
TimeoutsScreen,
Orientation
>>>>>>>
TimeoutsScreen,
Orientation,
AnimationsScreen |
<<<<<<<
, embedly = require('../lib/embedly')
=======
, embedly = require('../')
, require_either = embedly.utils.require_either
>>>>>>>
, embedly = require('../')
<<<<<<<
;[" http://blog.embed.ly/bob | http://posterous.com "
, " http://blog.embed.ly/boston-hack-day | http://posterous.com "
, " http://www.guardian.co.uk/media/2011/jan/21/andy-coulson-phone-hacking-statement | http://www.guardian.co.uk "
=======
;[" http://blog.embed.ly/bob | http://blog.embed.ly/ "
, " http://blog.embed.ly/boston-hack-day | http://blog.embed.ly/ "
, " http://www.guardian.co.uk/media/2011/jan/21/andy-coulson-phone-hacking-statement | http://www.guardian.co.uk/ "
>>>>>>>
;[" http://blog.embed.ly/bob | http://posterous.com "
, " http://blog.embed.ly/boston-hack-day | http://posterous.com "
, " http://www.guardian.co.uk/media/2011/jan/21/andy-coulson-phone-hacking-statement | http://www.guardian.co.uk " |
<<<<<<<
=======
>>>>>>>
<<<<<<<
, embedly = require('../lib/embedly')
=======
, embedly = require('../')
, require_either = embedly.utils.require_either
>>>>>>>
, embedly = require('../') |
<<<<<<<
return jsDbgPromise(JsDbg.ReadPointer, that._pointer.toString())
=======
return jsDbgPromise(MemoryCache.ReadPointer, that._pointer)
>>>>>>>
return jsDbgPromise(MemoryCache.ReadPointer, that._pointer.toString())
<<<<<<<
return jsDbgPromise(JsDbg.ReadNumber, that._pointer.toString(), structSize, unsigned, that._isFloat());
=======
return jsDbgPromise(MemoryCache.ReadNumber, that._pointer, structSize, unsigned, that._isFloat());
>>>>>>>
return jsDbgPromise(MemoryCache.ReadNumber, that._pointer.toString(), structSize, unsigned, that._isFloat());
<<<<<<<
.then(function(structSize) { return jsDbgPromise(JsDbg.ReadArray, that._pointer.toString(), structSize, that._isPointer() || that._isUnsigned, that._isFloat(), count); })
=======
.then(function(structSize) { return jsDbgPromise(MemoryCache.ReadArray, that._pointer, structSize, that._isPointer() || that._isUnsigned, that._isFloat(), count); })
>>>>>>>
.then(function(structSize) { return jsDbgPromise(MemoryCache.ReadArray, that._pointer.toString(), structSize, that._isPointer() || that._isUnsigned, that._isFloat(), count); })
<<<<<<<
return jsDbgPromise(JsDbg.ReadPointer, this._pointer.toString())
=======
return jsDbgPromise(MemoryCache.ReadPointer, pointer)
>>>>>>>
return jsDbgPromise(MemoryCache.ReadPointer, this._pointer.toString()) |
<<<<<<<
if (urlParams.has('hands')){
session.raisehands = true;
}
var screensharebutton=false;
if (urlParams.has('ssb')){
var screensharebutton=true;;
}
if (urlParams.has('bigbutton')){
session.bigmutebutton=true;
getById("mutebutton").style.width = "min(40vh,40vw)";
getById("mutebutton").style.height = "min(40vh,40vw)";
getById("mutetoggle").style.width = "min(40vh,40vw)";
getById("mutetoggle").style.height = "min(40vh,40vw)";
}
=======
if (urlParams.has('hands')){
session.raisehands = true;
}
var screensharebutton=false;
if (urlParams.has('ssb')){
var screensharebutton=true;;
}
>>>>>>>
if (urlParams.has('hands')){
session.raisehands = true;
}
var screensharebutton=false;
if (urlParams.has('ssb')){
var screensharebutton=true;;
}
if (urlParams.has('bigbutton')){
session.bigmutebutton=true;
getById("mutebutton").style.width = "min(40vh,40vw)";
getById("mutebutton").style.height = "min(40vh,40vw)";
getById("mutetoggle").style.width = "min(40vh,40vw)";
getById("mutetoggle").style.height = "min(40vh,40vw)";
}
<<<<<<<
try{
if (location.hostname === "rtc.ninja"){ // an extra-brand-free version of OBS.Ninja
if (session.label===false){
document.title = "";
}
getById("qos").innerHTML = "";
getById("logoname").innerHTML = "";
getById("helpbutton").style.display = "none";
getById("helpbutton").style.opacity = 0;
getById("reportbutton").style.display = "none";
getById("mainmenu").style.opacity = 1;
getById("mainmenu").style.margin = "30px 0";
getById("translateButton").style.display = "none";
getById("translateButton").style.opacity = 0;
getById("info").style.display = "none";
getById("info").style.opacity = 0;
getById("chatBody").innerHTML = "";
} else if (location.hostname !== "obs.ninja"){
if (session.label===false){
document.title = location.hostname;
}
getById("qos").innerHTML = location.hostname;
getById("logoname").innerHTML = getById("qos").outerHTML;
getById("helpbutton").style.display = "none";
getById("reportbutton").style.display = "none";
}
} catch(e){}
function miniTranslate(ele, ident=false){
if (ident){
ele.dataset.translate = ident;
} else {
ident = ele.dataset.translate;
}
try {
if (ident in translation.innerHTML){
ele.innerHTML = translation.innerHTML[ident];
}
} catch(e){}
}
=======
function miniTranslate(ele, ident=false){
if (ident){
ele.dataset.translate = ident;
} else {
ident = ele.dataset.translate;
}
try {
if (ident in translation.innerHTML){
ele.innerHTML = translation.innerHTML[ident];
}
} catch(e){}
}
>>>>>>>
try{
if (location.hostname === "rtc.ninja"){ // an extra-brand-free version of OBS.Ninja
if (session.label===false){
document.title = "";
}
getById("qos").innerHTML = "";
getById("logoname").innerHTML = "";
getById("helpbutton").style.display = "none";
getById("helpbutton").style.opacity = 0;
getById("reportbutton").style.display = "none";
getById("mainmenu").style.opacity = 1;
getById("mainmenu").style.margin = "30px 0";
getById("translateButton").style.display = "none";
getById("translateButton").style.opacity = 0;
getById("info").style.display = "none";
getById("info").style.opacity = 0;
getById("chatBody").innerHTML = "";
} else if (location.hostname !== "obs.ninja"){
if (session.label===false){
document.title = location.hostname;
}
getById("qos").innerHTML = location.hostname;
getById("logoname").innerHTML = getById("qos").outerHTML;
getById("helpbutton").style.display = "none";
getById("reportbutton").style.display = "none";
}
} catch(e){}
function miniTranslate(ele, ident=false){
if (ident){
ele.dataset.translate = ident;
} else {
ident = ele.dataset.translate;
}
try {
if (ident in translation.innerHTML){
ele.innerHTML = translation.innerHTML[ident];
}
} catch(e){}
}
<<<<<<<
analyser.getByteFrequencyData(dataArray);
var total = 0;
for (var i = 0; i < dataArray.length; i++)
total += dataArray[i];
total = total/100;
if (total==0){
getById("meter1").style.width = "1px";
getById("meter2").style.width = "0px";
} else if (total<=1){
getById("meter1").style.width = "1px";
getById("meter2").style.width = "0px";
} else if (total<=150){
getById("meter1").style.width = total+"px";
getById("meter2").style.width = "0px";
} else if (total>150){
if (total>200){total=200;}
getById("meter1").style.width = "150px";
getById("meter2").style.width = (total-150)+"px";
meter2
=======
if (stream.getAudioTracks().length){
window.AudioContext = window.AudioContext || window.webkitAudioContext;
//audioContext = new AudioContext();
///
// TODO: DOES THIS WORK?
audioContext = new AudioContext({
latencyHint: 5.0,
sampleRate: 48000
});
///
mediaStreamSource = audioContext.createMediaStreamSource(stream); // clone to fix iOS issue
meter = createAudioMeter(audioContext);
mediaStreamSource.connect(meter);
clearInterval(drawLoopLimiter);
drawLoopLimiter = setTimeout(function(){drawLoop();},1)
>>>>>>>
analyser.getByteFrequencyData(dataArray);
var total = 0;
for (var i = 0; i < dataArray.length; i++)
total += dataArray[i];
total = total/100;
if (total==0){
getById("meter1").style.width = "1px";
getById("meter2").style.width = "0px";
} else if (total<=1){
getById("meter1").style.width = "1px";
getById("meter2").style.width = "0px";
} else if (total<=150){
getById("meter1").style.width = total+"px";
getById("meter2").style.width = "0px";
} else if (total>150){
if (total>200){total=200;}
getById("meter1").style.width = "150px";
getById("meter2").style.width = (total-150)+"px";
meter2
<<<<<<<
var broadcastFlag = getById("broadcastFlag");
try{
if (broadcastFlag.checked){
broadcastFlag=true;
} else {
broadcastFlag=false;
}
} catch (e){broadcastFlag=false;}
var broadcastString = "";
if (broadcastFlag){
broadcastString = "&broadcast";
}
///////
var codecGroupFlag = getById("codecGroupFlag");
if (codecGroupFlag.value){
if (codecGroupFlag.value==="vp9"){
codecGroupFlag = "&codec=vp9";
} else if (codecGroupFlag.value==="h264"){
codecGroupFlag = "&codec=h264";
} else if (codecGroupFlag.value==="vp8"){
codecGroupFlag = "&codec=vp8";
} else{
codecGroupFlag = "";
}
} else {
codecGroupFlag = "";
}
if (codecGroupFlag){
session.codecGroupFlag = codecGroupFlag;
}
////////
=======
var broadcastFlag = getById("broadcastFlag");
try{
if ((broadcastFlag) && (broadcastFlag.checked)){
broadcastFlag=true;
} else {
broadcastFlag=false;
}
} catch (e){broadcastFlag=false;}
var broadcastString = "";
if (broadcastFlag){
broadcastString = "&broadcast";
}
>>>>>>>
var broadcastFlag = getById("broadcastFlag");
try{
if (broadcastFlag.checked){
broadcastFlag=true;
} else {
broadcastFlag=false;
}
} catch (e){broadcastFlag=false;}
var broadcastString = "";
if (broadcastFlag){
broadcastString = "&broadcast";
}
var codecGroupFlag = getById("codecGroupFlag");
if (codecGroupFlag.value){
if (codecGroupFlag.value==="vp9"){
codecGroupFlag = "&codec=vp9";
} else if (codecGroupFlag.value==="h264"){
codecGroupFlag = "&codec=h264";
} else if (codecGroupFlag.value==="vp8"){
codecGroupFlag = "&codec=vp8";
} else{
codecGroupFlag = "";
}
} else {
codecGroupFlag = "";
}
if (codecGroupFlag){
session.codecGroupFlag = codecGroupFlag;
<<<<<<<
warnlog(event);
if (session.streamSrc===null){return;}
if (document.getElementById("videosource")===null){return;}
=======
warnlog(event);
if (session.streamSrc===null){return;}
if (getById("videosource")===null){return;}
>>>>>>>
warnlog(event);
if (session.streamSrc===null){return;}
if (document.getElementById("videosource")===null){return;}
<<<<<<<
if (session.streamSrc){
session.streamSrc.getAudioTracks().forEach(function(track){
log("track: " +track.id);
=======
var oldstream = getById(eleName).srcObject;
if (oldstream){
oldstream.getAudioTracks().forEach(function(track){
log("track: " +track.id);
log(track);
>>>>>>>
if (session.streamSrc){
session.streamSrc.getAudioTracks().forEach(function(track){
log("track: " +track.id); |
<<<<<<<
AccountController = RouteController.extend({
=======
UserEditController = FastRender.RouteController.extend({
>>>>>>>
UserEditController = RouteController.extend({
<<<<<<<
return {
user : Meteor.user(),
invites: Invites.find({invitingUserId:Meteor.userId()})
};
},
fastRender: true
=======
var user = Meteor.users.findOne({slug: this.params.slug});
var data = {
user: user
}
if (user) {
data.invites = Invites.find({invitingUserId: user._id});
}
return data;
}
>>>>>>>
var user = Meteor.users.findOne({slug: this.params.slug});
var data = {
user: user
}
if (user) {
data.invites = Invites.find({invitingUserId: user._id});
}
return data;
},
fastRender: true |
<<<<<<<
);
},
'click .not-upvoted .upvote': function(e, instance){
e.preventDefault();
if(!Meteor.user()){
Meteor.Router.to('/signin');
throwError(i18n.t("Please log in first"));
}
Meteor.call('upvoteComment', this._id, function(error, result){
trackEvent("post upvoted", {'commentId':instance.data._id, 'postId': instance.data.post, 'authorId':instance.data.userId});
});
},
'click .upvoted .upvote': function(e, instance){
e.preventDefault();
if(!Meteor.user()){
Meteor.Router.to('/signin');
throwError(i18n.t("Please log in first"));
}
Meteor.call('cancelUpvoteComment', this._id, function(error, result){
trackEvent("post upvote cancelled", {'commentId':instance.data._id, 'postId': instance.data.post, 'authorId':instance.data.userId});
});
},
'click .not-downvoted .downvote': function(e, instance){
e.preventDefault();
if(!Meteor.user()){
Meteor.Router.to('/signin');
throwError(i18n.t("Please log in first"));
}
Meteor.call('downvoteComment', this._id, function(error, result){
trackEvent("post downvoted", {'commentId':instance.data._id, 'postId': instance.data.post, 'authorId':instance.data.userId});
});
=======
}
);
>>>>>>>
}
);
<<<<<<<
'click .downvoted .downvote': function(e, instance){
e.preventDefault();
if(!Meteor.user()){
Meteor.Router.to('/signin');
throwError(i18n.t("Please log in first"));
}
Meteor.call('cancelDownvoteComment', this._id, function(error, result){
trackEvent("post downvote cancelled", {'commentId':instance.data._id, 'postId': instance.data.post, 'authorId':instance.data.userId});
});
=======
'click .not-upvoted .upvote': function(e, instance){
e.preventDefault();
if(!Meteor.user()){
Router.go('/signin');
throwError("Please log in first");
>>>>>>>
'click .not-upvoted .upvote': function(e, instance){
e.preventDefault();
if(!Meteor.user()){
Router.go('/signin');
throwError(i18n.t("Please log in first")); |
<<<<<<<
clearSeenErrors();
var content = $commentForm.val();
=======
clearSeenMessages();
var content = instance.editor.exportFile();
>>>>>>>
clearSeenMessages();
var content = $commentForm.val(); |
<<<<<<<
sc_require('system/text_selection') ;
=======
sc_require('mixins/static_layout') ;
>>>>>>>
sc_require('system/text_selection') ;
sc_require('views/field') ;
sc_require('mixins/static_layout') ;
<<<<<<<
},
selectStart: function(evt) {
return YES;
=======
},
fieldValueDidChange: function(partialChange) {
// save the cursor's position
var element = this.$field()[0];
var start = element.selectionStart;
var end = element.selectionEnd;
sc_super();
// restore the cursor's position
element.setSelectionRange(start, end);
>>>>>>>
},
selectStart: function(evt) {
return YES;
},
fieldValueDidChange: function(partialChange) {
// save the cursor's position
var element = this.$field()[0];
var start = element.selectionStart;
var end = element.selectionEnd;
sc_super();
// restore the cursor's position
element.setSelectionRange(start, end); |
<<<<<<<
// ..........................................................
// CONSTANTS
//
// Implementation note: We use two spaces after four-letter prefixes and one
// after five-letter prefixes so things align in monospaced consoles.
/**
If {@link SC.Logger.format} is true, this delimiter will be put between arguments.
@property {String}
*/
SC.LOGGER_LOG_DELIMITER = ", ";
/**
If {@link SC.Logger.error} falls back onto {@link SC.Logger.log}, this will be
prepended to the output.
@property {String}
*/
SC.LOGGER_LOG_ERROR = "ERROR: ";
/**
If {@link SC.Logger.info} falls back onto {@link SC.Logger.log}, this will be
prepended to the output.
@property {String}
*/
SC.LOGGER_LOG_INFO = "INFO: ";
/**
If {@link SC.Logger.warn} falls back onto {@link SC.Logger.log}, this will be
prepended to the output.
@property {String}
*/
SC.LOGGER_LOG_WARN = "WARN: ";
/**
If {@link SC.Logger.debug} falls back onto {@link SC.Logger.log}, this will be
prepended to the output.
@property {String}
*/
SC.LOGGER_LOG_DEBUG = "DEBUG: ";
/**
If {@link SC.Logger.group} falls back onto {@link SC.Logger.log}, this will
be prepended to the output.
@property {String}
*/
SC.LOGGER_LOG_GROUP_HEADER = "** %@"; // The variable is the group title
/**
If the reporter does not support group(), then we’ll add our own indentation
to our output. This constant represents one level of indentation.
@property {String}
*/
SC.LOGGER_LOG_GROUP_INDENTATION = " ";
/**
When reporting recorded log messages, the timestamp is included with this
prefix.
@property {String}
*/
SC.LOGGER_RECORDED_LOG_TIMESTAMP_PREFIX = "%@: ";
SC.LOGGER_LEVEL_DEBUG = 'debug';
SC.LOGGER_LEVEL_INFO = 'info';
SC.LOGGER_LEVEL_WARN = 'warn';
SC.LOGGER_LEVEL_ERROR = 'error';
SC.LOGGER_LEVEL_NONE = 'none';
=======
>>>>>>>
// ..........................................................
// CONSTANTS
//
// Implementation note: We use two spaces after four-letter prefixes and one
// after five-letter prefixes so things align in monospaced consoles.
/**
If {@link SC.Logger.format} is true, this delimiter will be put between arguments.
@property {String}
*/
SC.LOGGER_LOG_DELIMITER = ", ";
/**
If {@link SC.Logger.error} falls back onto {@link SC.Logger.log}, this will be
prepended to the output.
@property {String}
*/
SC.LOGGER_LOG_ERROR = "ERROR: ";
/**
If {@link SC.Logger.info} falls back onto {@link SC.Logger.log}, this will be
prepended to the output.
@property {String}
*/
SC.LOGGER_LOG_INFO = "INFO: ";
/**
If {@link SC.Logger.warn} falls back onto {@link SC.Logger.log}, this will be
prepended to the output.
@property {String}
*/
SC.LOGGER_LOG_WARN = "WARN: ";
/**
If {@link SC.Logger.debug} falls back onto {@link SC.Logger.log}, this will be
prepended to the output.
@property {String}
*/
SC.LOGGER_LOG_DEBUG = "DEBUG: ";
/**
If {@link SC.Logger.group} falls back onto {@link SC.Logger.log}, this will
be prepended to the output.
@property {String}
*/
SC.LOGGER_LOG_GROUP_HEADER = "** %@"; // The variable is the group title
/**
If the reporter does not support group(), then we’ll add our own indentation
to our output. This constant represents one level of indentation.
@property {String}
*/
SC.LOGGER_LOG_GROUP_INDENTATION = " ";
/**
When reporting recorded log messages, the timestamp is included with this
prefix.
@property {String}
*/
SC.LOGGER_RECORDED_LOG_TIMESTAMP_PREFIX = "%@: ";
SC.LOGGER_LEVEL_DEBUG = 'debug';
SC.LOGGER_LEVEL_INFO = 'info';
SC.LOGGER_LEVEL_WARN = 'warn';
SC.LOGGER_LEVEL_ERROR = 'error';
SC.LOGGER_LEVEL_NONE = 'none';
<<<<<<<
The current log level determining what is output to the reporter object
(usually your browser’s console). Valid values are:
* SC.LOGGER_LEVEL_DEBUG
* SC.LOGGER_LEVEL_INFO
* SC.LOGGER_LEVEL_WARN
* SC.LOGGER_LEVEL_ERROR
* SC.LOGGER_LEVEL_NONE
If you do not specify this value, it will default to SC.LOGGER_LEVEL_DEBUG
when running in development mode and SC.LOGGER_LEVEL_INFO when running in
production mode.
@property: {Constant}
*/
logOutputLevel: null, // If null, set appropriately during init()
/**
The current log level determining what is output to the reporter object
(usually your browser’s console). Valid values are the same as with
'logOutputLevel':
* SC.LOGGER_LEVEL_DEBUG
* SC.LOGGER_LEVEL_INFO
* SC.LOGGER_LEVEL_WARN
* SC.LOGGER_LEVEL_ERROR
* SC.LOGGER_LEVEL_NONE
If you do not specify this value, it will default to SC.LOGGER_LEVEL_NONE.
@property: {Constant}
*/
logRecordingLevel: SC.LOGGER_LEVEL_NONE,
/**
All recorded log messages. You generally should not need to interact with
this array, as most commonly-used functionality can be achieved via the
{@link SC.Logger.outputRecordedLogMessages} and
{@link SC.Logger.stringifyRecordedLogMessages} methods.
This array will be lazily created when the first message is recorded.
Format:
For efficiency, each entry in the array is a simple hash rather than a
full SC.Object instance. Furthermore, to minimize memory usage, niceties
like “type of entry: message” are avoided; if you need to parse this
structure, you can determine which type of entry you’re looking at by
checking for the 'message' and 'indentation' fields.
Log entry:
{
type: {Constant} (SC.LOGGER_LEVEL_DEBUG, etc.)
message: {String | Boolean}
originalArguments: {Arguments} // optional
timestamp: {Date}
}
=======
If console.log does not exist, SC.Logger will use window.alert instead.
>>>>>>>
The current log level determining what is output to the reporter object
(usually your browser’s console). Valid values are:
* SC.LOGGER_LEVEL_DEBUG
* SC.LOGGER_LEVEL_INFO
* SC.LOGGER_LEVEL_WARN
* SC.LOGGER_LEVEL_ERROR
* SC.LOGGER_LEVEL_NONE
If you do not specify this value, it will default to SC.LOGGER_LEVEL_DEBUG
when running in development mode and SC.LOGGER_LEVEL_INFO when running in
production mode.
@property: {Constant}
*/
logOutputLevel: null, // If null, set appropriately during init()
/**
The current log level determining what is output to the reporter object
(usually your browser’s console). Valid values are the same as with
'logOutputLevel':
* SC.LOGGER_LEVEL_DEBUG
* SC.LOGGER_LEVEL_INFO
* SC.LOGGER_LEVEL_WARN
* SC.LOGGER_LEVEL_ERROR
* SC.LOGGER_LEVEL_NONE
If you do not specify this value, it will default to SC.LOGGER_LEVEL_NONE.
@property: {Constant}
*/
logRecordingLevel: SC.LOGGER_LEVEL_NONE,
/**
All recorded log messages. You generally should not need to interact with
this array, as most commonly-used functionality can be achieved via the
{@link SC.Logger.outputRecordedLogMessages} and
{@link SC.Logger.stringifyRecordedLogMessages} methods.
This array will be lazily created when the first message is recorded.
Format:
For efficiency, each entry in the array is a simple hash rather than a
full SC.Object instance. Furthermore, to minimize memory usage, niceties
like “type of entry: message” are avoided; if you need to parse this
structure, you can determine which type of entry you’re looking at by
checking for the 'message' and 'indentation' fields.
Log entry:
{
type: {Constant} (SC.LOGGER_LEVEL_DEBUG, etc.)
message: {String | Boolean}
originalArguments: {Arguments} // optional
timestamp: {Date}
}
<<<<<<<
Computed property that checks for the existence of the reporter object.
@property {Boolean}
*/
exists: function() {
return !SC.none(this.get('reporter'));
}.property('reporter').cacheable(),
/**
If console.log does not exist, SC.Logger will use window.alert instead
when {@link SC.Logger.log} is invoked.
Note that this property has no effect for messages initiated via the
debug/info/warn/error methods, on the assumption that it is better to
simply utilize the message recording mechanism than put up a bunch of
alerts when there is no browser console.
=======
Whether or not to format multiple arguments together
or let the browser deal with that.
>>>>>>>
Computed property that checks for the existence of the reporter object.
@property {Boolean}
*/
exists: function() {
return !SC.none(this.get('reporter'));
}.property('reporter').cacheable(),
/**
If console.log does not exist, SC.Logger will use window.alert instead
when {@link SC.Logger.log} is invoked.
Note that this property has no effect for messages initiated via the
debug/info/warn/error methods, on the assumption that it is better to
simply utilize the message recording mechanism than put up a bunch of
alerts when there is no browser console. |
<<<<<<<
view.triggerItemAtIndex(1);
SC.RunLoop.begin();
view.set('isEnabled', YES);
SC.RunLoop.end();
equals(view.get('value'), "Item2", "the second item should be selected.");
var items=view.displayItems();
equals(items[0].title, "Item1", 'Computed properties should match');
equals(items[0].value, "Item1", 'Computed properties should match');
equals(items[0].isEnabled, true, 'Computed properties should match');
equals(items[0].icon, iconURL, 'Computed properties should match');
equals(items[0].width, null, 'Computed properties should match');
equals(items[0].toolTip, null, 'Computed properties should match');
equals(items[0].index, 0, 'Computed properties should match');
var firstItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect1.left + 1, clientY: rect1.top + 1 });
view.mouseDown(firstItemEvent);
equals(view._isMouseDown, YES, 'mousedown');
equals(view.get('activeIndex'), 0, '');
});
test("Check that mouse actions work", function() {
view.triggerItemAtIndex(1);
SC.RunLoop.begin();
view.set('isEnabled', YES);
SC.RunLoop.end();
// Test Mouse Down
// it now gets the item by the position, so we have to pass a position
var firstItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect1.left + 1, clientY: rect1.top + 1 });
view.mouseDown(firstItemEvent);
equals(view._isMouseDown, YES, 'Mouse down flag on mousedown should be ');
equals(view.get('activeIndex'), 0, 'The active item is the first segment.');
// Test Mouse Up
elem = view.get('layer').childNodes[1];
view.mouseUp(firstItemEvent);
equals(view._isMouseDown, NO, 'Mouse down flag on mouseup should be ');
equals(view.get('activeIndex'), -1, 'There shouldnt be any active item');
// Test third item
elem = view.get('layer').childNodes[2];
var thirdItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect3.left + 1, client: rect3.top + 1 });
// mouse down and move
view.mouseDown(thirdItemEvent);
view.mouseMoved(thirdItemEvent);
equals(view._isMouseDown, YES, 'Mouse down flag on mousemoved should be ');
equals(view.get('activeIndex'), 2, 'The active item is the third segment.');
// try moving mouse while mouse down
var secondItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect2.left + 1, clientY: rect2.top + 1 });
view.mouseMoved(secondItemEvent);
equals(view._isMouseDown, YES, 'Mouse down flag on mousemoved should be ');
equals(view.get('activeIndex'), 1, 'The active item should have changed to the second segment.');
// and check that mouse out cancels.
var noItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect1.left - 5, clientY: rect1.top - 5 });
view.mouseExited(noItemEvent);
equals(view._isMouseDown, YES, 'Mouse down flag on mouseout should still be ');
equals(view.get('activeIndex'), -1, 'The active item is no longer specified.');
});
test("Check that aria-selected is set to correct values, based on the state of the segment", function() {
view.triggerItemAtIndex(1);
SC.RunLoop.begin();
view.set('isEnabled', YES);
SC.RunLoop.end();
var segments = view.get('childViews'),
segment1 = segments[0],
layer, segmentEvent;
//aria-selected should be false when segment is not selected
equals(segment1.$().attr('aria-selected'), "false", "aria-selected is set to false when segment is not selected");
layer = segment1.get('layer');
//trigerring mousedown
segmentEvent = SC.Event.simulateEvent(layer, 'mousedown', { clientX: rect1.left + 1, clientY: rect1.top + 1 });
SC.Event.trigger(layer, 'mousedown', [segmentEvent]);
//trigerring mouseup
segmentEvent = SC.Event.simulateEvent(layer, 'mouseup', { clientX: rect1.left + 1, clientY: rect1.top + 1 });
SC.Event.trigger(layer, 'mouseup', [segmentEvent]);
//aria-selected should be true when segment is selected
equals(segment1.$().attr('aria-selected'), "true", "aria-selected is set to true when segment is selected");
});
=======
view.triggerItemAtIndex(1);
SC.RunLoop.begin();
view.set('isEnabled', YES);
SC.RunLoop.end();
equals(view.get('value'), "Item2", "the second item should be selected.");
var childViews = view.get('childViews');
equals(childViews[0].title, "Item1", 'Computed properties should match');
equals(childViews[0].value, "Item1", 'Computed properties should match');
equals(childViews[0].isEnabled, true, 'Computed properties should match');
equals(childViews[0].icon, iconURL, 'Computed properties should match');
equals(childViews[0].width, null, 'Computed properties should match');
equals(childViews[0].toolTip, null, 'Computed properties should match');
equals(childViews[0].index, 0, 'Computed properties should match');
});
>>>>>>>
view.triggerItemAtIndex(1);
SC.RunLoop.begin();
view.set('isEnabled', YES);
SC.RunLoop.end();
equals(view.get('value'), "Item2", "the second item should be selected.");
var childViews = view.get('childViews');
equals(childViews[0].title, "Item1", 'Computed properties should match');
equals(childViews[0].value, "Item1", 'Computed properties should match');
equals(childViews[0].isEnabled, true, 'Computed properties should match');
equals(childViews[0].icon, iconURL, 'Computed properties should match');
equals(childViews[0].width, null, 'Computed properties should match');
equals(childViews[0].toolTip, null, 'Computed properties should match');
equals(childViews[0].index, 0, 'Computed properties should match');
});
test("Check that mouse actions work", function() {
view.triggerItemAtIndex(1);
SC.RunLoop.begin();
view.set('isEnabled', YES);
SC.RunLoop.end();
// Test Mouse Down
// it now gets the item by the position, so we have to pass a position
var firstItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect1.left + 1, clientY: rect1.top + 1 });
view.mouseDown(firstItemEvent);
equals(view._isMouseDown, YES, 'Mouse down flag on mousedown should be ');
equals(view.get('activeIndex'), 0, 'The active item is the first segment.');
// Test Mouse Up
elem = view.get('layer').childNodes[1];
view.mouseUp(firstItemEvent);
equals(view._isMouseDown, NO, 'Mouse down flag on mouseup should be ');
equals(view.get('activeIndex'), -1, 'There shouldnt be any active item');
// Test third item
elem = view.get('layer').childNodes[2];
var thirdItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect3.left + 1, client: rect3.top + 1 });
// mouse down and move
view.mouseDown(thirdItemEvent);
view.mouseMoved(thirdItemEvent);
equals(view._isMouseDown, YES, 'Mouse down flag on mousemoved should be ');
equals(view.get('activeIndex'), 2, 'The active item is the third segment.');
// try moving mouse while mouse down
var secondItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect2.left + 1, clientY: rect2.top + 1 });
view.mouseMoved(secondItemEvent);
equals(view._isMouseDown, YES, 'Mouse down flag on mousemoved should be ');
equals(view.get('activeIndex'), 1, 'The active item should have changed to the second segment.');
// and check that mouse out cancels.
var noItemEvent = SC.Event.simulateEvent(elem, 'mousedown', { clientX: rect1.left - 5, clientY: rect1.top - 5 });
view.mouseExited(noItemEvent);
equals(view._isMouseDown, YES, 'Mouse down flag on mouseout should still be ');
equals(view.get('activeIndex'), -1, 'The active item is no longer specified.');
}); |
<<<<<<<
isOverflowSegment: YES,
layoutDirection: this.get('layoutDirection')
=======
isOverflowSegment: YES,
isVisible: this.get('shouldHandleOverflow')
>>>>>>>
isOverflowSegment: YES,
layoutDirection: this.get('layoutDirection'),
isVisible: this.get('shouldHandleOverflow')
<<<<<<<
// Reset our measurements (which depend on width/height or title) and adjust visible views
this.invokeLast(this.remeasure);
=======
// Reset our measurements (which depend on width or title) and adjust visible views
if (this.get('shouldHandleOverflow')) {
this.invokeLast(this.remeasure);
}
>>>>>>>
// Reset our measurements (which depend on width/height or title) and adjust visible views
if (this.get('shouldHandleOverflow')) {
this.invokeLast(this.remeasure);
}
<<<<<<<
var isHorizontal = this.get('layoutDirection') === SC.LAYOUT_HORIZONTAL,
visibleDim = isHorizontal ? this.$().width() : this.$().height();
// Only overflow if we've gone below the minimum dimension required to fit all the segments
if (this.isOverflowing || visibleDim <= this.cachedMinimumDim) this.adjustOverflow();
=======
var visibleWidth = this.$().width();
// Only overflow if we've gone below the minimum width required to fit all the segments
if (this.get('shouldHandleOverflow') && (this.isOverflowing || visibleWidth <= this.cachedMinimumWidth)) {
this.adjustOverflow();
}
>>>>>>>
var isHorizontal = this.get('layoutDirection') === SC.LAYOUT_HORIZONTAL,
visibleDim = isHorizontal ? this.$().width() : this.$().height();
// Only overflow if we've gone below the minimum dimension required to fit all the segments
if (this.get('shouldHandleOverflow') && (this.isOverflowing || visibleDim <= this.cachedMinimumDim)) {
this.adjustOverflow();
}
<<<<<<<
return this.indexForClientPosition(evt.clientX, evt.clientY);
=======
var renderDelegate = this.get('renderDelegate');
if (renderDelegate && renderDelegate.indexForClientPosition) {
var x = evt.clientX;
var y = evt.clientY;
// Accessibility workaround: <rdar://problem/10467360> WebKit sends all event coords as 0,0 for all AXPress-triggered events
if (x === 0 && y === 0) {
var el = evt.target;
if (el) {
var offset = SC.offset(el);
x = offset.x + Math.round(el.offsetWidth/2);
y = offset.y + Math.round(el.offsetHeight/2);
}
}
return renderDelegate.indexForClientPosition(this, x, y);
}
>>>>>>>
var renderDelegate = this.get('renderDelegate');
if (renderDelegate && renderDelegate.indexForClientPosition) {
var x = evt.clientX;
var y = evt.clientY;
// Accessibility workaround: <rdar://problem/10467360> WebKit sends all event coords as 0,0 for all AXPress-triggered events
if (x === 0 && y === 0) {
var el = evt.target;
if (el) {
var offset = SC.offset(el);
x = offset.x + Math.round(el.offsetWidth/2);
y = offset.y + Math.round(el.offsetHeight/2);
}
}
return renderDelegate.indexForClientPosition(this, x, y);
} |
<<<<<<<
afterEach(function(done) {
outSession.close(done);
});
afterEach(function(done) {
inSession.close(done);
});
function client(done) {
var chan = outSession.sendChannel();
var msg = jschan.msg({ hello: 'world' });
=======
describe('basic reply subChannel', function() {
>>>>>>>
afterEach(function(done) {
outSession.close(done);
});
afterEach(function(done) {
inSession.close(done);
});
describe('basic reply subChannel', function() { |
<<<<<<<
},
{
"city": "Victoria",
"name": "Discovery Coffee House and Lounge",
"country": "Canada",
"address": "664 Discovery Street",
"coordinates": ["48.4320183", "-123.3650072"],
"description": {
"Internet": "Free open internet",
"Power Outlets": "There are a few",
"Seating": "Coffee shop and quiet lounge with couches and large tables for meetings",
"Service": "Very friendly",
"Provision": "Coffee, tea, juices, doughnuts, pastries",
},
"link": {"homepage":"http://www.discoverycoffee.com/"}
},
{
"city": "London",
"country": "UK",
"name": "Campus London",
"address": "4-5 BONHILL STREET LONDON EC2A 4BX",
"coordinates": ["51.522669", "-0.085818"],
"description": {
"Access": "You need to be a member, it's free, check website",
"Internet": "Free, 65Mbps up and down",
"Power Outlets": "Lots",
"Seating": "Plenty, but get there early it fills up quick",
"Service": "Very friendly",
"Provision": "Coffee, tea, more..",
},
"link": {"homepage":"http://www.campuslondon.com/"}
},
{
"city": "Waterloo",
"country": "Canada",
"name": "Death Valley's Little Brother",
"address": "84 King St N, Waterloo, ON N2J 2X4",
"coordinates": ["43.467711", "-80.5229581"],
"description": {
"Internet": "Free wifi, good speed, ask for the password",
"Power Outlets": "There are a few",
"Seating": "Wooden furnishing, very relaxing",
"Provision": "Coffee, tea, alchohol, muffins, scones, etc",
},
"link": {"homepage":"http://dvlb.ca"}
}
=======
},
{
"city": "Gothenburg",
"country": "SE",
"name": "Espresso House",
"address": "Vasagatan 22",
"coordinates": ["57.698283", "11.9663"],
"description": {
"Internet": "Free wifi, reliable and good speed",
"Power Outlets": "There are a few",
"Seating": "Fairly comfortable seats",
"Service": "Okay service",
"Provision": "Coffee, tea, juices, cake, salads, sandwiches",
},
"link": {"homepage":"http://www.espressohouse.se/hitta-oss/sverige/goeteborg/"}
}
>>>>>>>
},
{
"city": "Victoria",
"name": "Discovery Coffee House and Lounge",
"country": "Canada",
"address": "664 Discovery Street",
"coordinates": ["48.4320183", "-123.3650072"],
"description": {
"Internet": "Free open internet",
"Power Outlets": "There are a few",
"Seating": "Coffee shop and quiet lounge with couches and large tables for meetings",
"Service": "Very friendly",
"Provision": "Coffee, tea, juices, doughnuts, pastries",
},
"link": {"homepage":"http://www.discoverycoffee.com/"}
},
{
"city": "London",
"country": "UK",
"name": "Campus London",
"address": "4-5 BONHILL STREET LONDON EC2A 4BX",
"coordinates": ["51.522669", "-0.085818"],
"description": {
"Access": "You need to be a member, it's free, check website",
"Internet": "Free, 65Mbps up and down",
"Power Outlets": "Lots",
"Seating": "Plenty, but get there early it fills up quick",
"Service": "Very friendly",
"Provision": "Coffee, tea, more..",
},
"link": {"homepage":"http://www.campuslondon.com/"}
},
{
"city": "Waterloo",
"country": "Canada",
"name": "Death Valley's Little Brother",
"address": "84 King St N, Waterloo, ON N2J 2X4",
"coordinates": ["43.467711", "-80.5229581"],
"description": {
"Internet": "Free wifi, good speed, ask for the password",
"Power Outlets": "There are a few",
"Seating": "Wooden furnishing, very relaxing",
"Provision": "Coffee, tea, alchohol, muffins, scones, etc",
},
"link": {"homepage":"http://dvlb.ca"}
},
{
"city": "Gothenburg",
"country": "SE",
"name": "Espresso House",
"address": "Vasagatan 22",
"coordinates": ["57.698283", "11.9663"],
"description": {
"Internet": "Free wifi, reliable and good speed",
"Power Outlets": "There are a few",
"Seating": "Fairly comfortable seats",
"Service": "Okay service",
"Provision": "Coffee, tea, juices, cake, salads, sandwiches",
},
"link": {"homepage":"http://www.espressohouse.se/hitta-oss/sverige/goeteborg/"}
} |
<<<<<<<
},
{
"city": "Victoria",
"name": "Discovery Coffee House and Lounge",
"country": "Canada",
"address": "664 Discovery Street",
"coordinates": ["48.4320183", "-123.3650072"],
"description": {
"Internet": "Free open internet",
"Power Outlets": "There are a few",
"Seating": "Coffee shop and quiet lounge with couches and large tables for meetings",
"Service": "Very friendly",
"Provision": "Coffee, tea, juices, doughnuts, pastries",
},
"link": {"homepage":"http://www.discoverycoffee.com/"}
},
{
"city": "London",
"country": "UK",
"name": "Campus London",
"address": "4-5 BONHILL STREET LONDON EC2A 4BX",
"coordinates": ["51.522669", "-0.085818"],
"description": {
"Access": "You need to be a member, it's free, check website",
"Internet": "Free, 65Mbps up and down",
"Power Outlets": "Lots",
"Seating": "Plenty, but get there early it fills up quick",
"Service": "Very friendly",
"Provision": "Coffee, tea, more..",
},
"link": {"homepage":"http://www.campuslondon.com/"}
},
{
"city": "Waterloo",
"country": "Canada",
"name": "Death Valley's Little Brother",
"address": "84 King St N, Waterloo, ON N2J 2X4",
"coordinates": ["43.467711", "-80.5229581"],
"description": {
"Internet": "Free wifi, good speed, ask for the password",
"Power Outlets": "There are a few",
"Seating": "Wooden furnishing, very relaxing",
"Provision": "Coffee, tea, alchohol, muffins, scones, etc",
},
"link": {"homepage":"http://dvlb.ca"}
},
{
"city": "Gothenburg",
"country": "SE",
"name": "Espresso House",
"address": "Vasagatan 22",
"coordinates": ["57.698283", "11.9663"],
"description": {
"Internet": "Free wifi, reliable and good speed",
"Power Outlets": "There are a few",
"Seating": "Fairly comfortable seats",
"Service": "Okay service",
"Provision": "Coffee, tea, juices, cake, salads, sandwiches",
},
"link": {"homepage":"http://www.espressohouse.se/hitta-oss/sverige/goeteborg/"}
=======
},
{
"city": "Waterloo",
"country": "CA",
"name": "Coffee Culture Café and Eatery",
"address": "31 King Street North, N2J 2W6",
"coordinates": ["43.46602", "-80.52265"],
"description": {
"Internet": "Not sure if there's free wifi",
"Power Outlets": "There are a few",
"Seating": "Comfortable seats",
"Service": "Very friendly",
"Provision": "Coffee, tea, juices, cake, meals",
},
"link": {"homepage":"http://www.coffeeculturecafe.com/"}
>>>>>>>
},
{
"city": "Victoria",
"name": "Discovery Coffee House and Lounge",
"country": "Canada",
"address": "664 Discovery Street",
"coordinates": ["48.4320183", "-123.3650072"],
"description": {
"Internet": "Free open internet",
"Power Outlets": "There are a few",
"Seating": "Coffee shop and quiet lounge with couches and large tables for meetings",
"Service": "Very friendly",
"Provision": "Coffee, tea, juices, doughnuts, pastries",
},
"link": {"homepage":"http://www.discoverycoffee.com/"}
},
{
"city": "London",
"country": "UK",
"name": "Campus London",
"address": "4-5 BONHILL STREET LONDON EC2A 4BX",
"coordinates": ["51.522669", "-0.085818"],
"description": {
"Access": "You need to be a member, it's free, check website",
"Internet": "Free, 65Mbps up and down",
"Power Outlets": "Lots",
"Seating": "Plenty, but get there early it fills up quick",
"Service": "Very friendly",
"Provision": "Coffee, tea, more..",
},
"link": {"homepage":"http://www.campuslondon.com/"}
},
{
"city": "Waterloo",
"country": "Canada",
"name": "Death Valley's Little Brother",
"address": "84 King St N, Waterloo, ON N2J 2X4",
"coordinates": ["43.467711", "-80.5229581"],
"description": {
"Internet": "Free wifi, good speed, ask for the password",
"Power Outlets": "There are a few",
"Seating": "Wooden furnishing, very relaxing",
"Provision": "Coffee, tea, alchohol, muffins, scones, etc",
},
"link": {"homepage":"http://dvlb.ca"}
},
{
"city": "Gothenburg",
"country": "SE",
"name": "Espresso House",
"address": "Vasagatan 22",
"coordinates": ["57.698283", "11.9663"],
"description": {
"Internet": "Free wifi, reliable and good speed",
"Power Outlets": "There are a few",
"Seating": "Fairly comfortable seats",
"Service": "Okay service",
"Provision": "Coffee, tea, juices, cake, salads, sandwiches",
},
"link": {"homepage":"http://www.espressohouse.se/hitta-oss/sverige/goeteborg/"}
},
{
"city": "Waterloo",
"country": "Canada",
"name": "Coffee Culture Café and Eatery",
"address": "31 King Street North, N2J 2W6",
"coordinates": ["43.46602", "-80.52265"],
"description": {
"Internet": "Not sure if there's free wifi",
"Power Outlets": "There are a few",
"Seating": "Comfortable seats",
"Service": "Very friendly",
"Provision": "Coffee, tea, juices, cake, meals",
},
"link": {"homepage":"http://www.coffeeculturecafe.com/"} |
<<<<<<<
import {
awsRegionLocations,
logo,
dateFormats,
DEPLOYMENT_STATUS,
} from './constants';
=======
import { awsRegionLocations, logo, dateFormats } from './constants';
import { helpModal } from './modals';
>>>>>>>
import {
awsRegionLocations,
logo,
dateFormats,
DEPLOYMENT_STATUS,
} from './constants';
import { awsRegionLocations, logo, dateFormats } from './constants';
import { helpModal } from './modals';
<<<<<<<
const open = require('open');
const { exec } = require('child_process');
const emoji = require('node-emoji');
let slsDevToolsConfig;
try {
console.log('Loading config');
// eslint-disable-next-line global-require, import/no-dynamic-require
slsDevToolsConfig = require(`${process.cwd()}/slsdevtools.config.js`);
} catch (e) {
console.log('No config provided, using defaults');
}
=======
const open = require('open');
>>>>>>>
const open = require('open');
const { exec } = require('child_process');
const emoji = require('node-emoji');
let slsDevToolsConfig;
try {
console.log('Loading config');
// eslint-disable-next-line global-require, import/no-dynamic-require
slsDevToolsConfig = require(`${process.cwd()}/slsdevtools.config.js`);
} catch (e) {
console.log('No config provided, using defaults');
}
<<<<<<<
const profile = program.profile || 'default';
const location = program.location || process.cwd();
let provider = '';
if (program.sam) {
provider = 'SAM';
} else {
provider = 'serverlessFramework';
}
const credentials = new AWS.SharedIniFileCredentials({ profile });
AWS.config.credentials = credentials;
=======
AWS.config.credentials = getAWSCredentials();
>>>>>>>
const profile = program.profile || 'default';
const location = program.location || process.cwd();
let provider = '';
if (program.sam) {
provider = 'SAM';
} else {
provider = 'serverlessFramework';
}
AWS.config.credentials = getAWSCredentials();
<<<<<<<
[this.funcName] = item.data;
this.fullFuncName = `${program.stackName}-${this.funcName}`;
=======
[this.funcName] = item.data;
>>>>>>>
[this.funcName] = item.data;
this.fullFuncName = `${program.stackName}-${this.funcName}`;
<<<<<<<
if (this.log.content === '') {
this.log.setContent('ERROR: No log streams found for this function.');
}
=======
this.lambdaLog.setContent('ERROR: No log streams found for this function.');
>>>>>>>
if (this.log.content === '') {
this.log.setContent('ERROR: No log streams found for this function.');
} |
<<<<<<<
src: 'core/client/**/*.js'
},
exclude: [
'core/client/templates/**/*.js'
]
=======
src: [
'core/client/**/*.js',
// Ignore files
'!core/client/assets/vendor/**/*.js',
'!core/client/tpl/**/*.js'
]
}
>>>>>>>
src: [
'core/client/**/*.js',
// Ignore files
'!core/client/assets/vendor/**/*.js',
'!core/client/tpl/**/*.js'
]
}
<<<<<<<
'core/shared/vendor/jquery/jquery.js',
'core/shared/vendor/jquery/jquery-ui-1.10.3.custom.min.js',
'core/clientold/assets/lib/jquery-utils.js',
'core/clientold/assets/lib/uploader.js',
'core/shared/vendor/lodash.underscore.js',
'core/shared/vendor/backbone/backbone.js',
'core/shared/vendor/handlebars/handlebars-runtime.js',
'core/shared/vendor/moment.js',
'core/shared/vendor/jquery/jquery.ui.widget.js',
'core/shared/vendor/jquery/jquery.iframe-transport.js',
'core/shared/vendor/jquery/jquery.fileupload.js',
'core/clientold/assets/vendor/codemirror/codemirror.js',
'core/clientold/assets/vendor/codemirror/addon/mode/overlay.js',
'core/clientold/assets/vendor/codemirror/mode/markdown/markdown.js',
'core/clientold/assets/vendor/codemirror/mode/gfm/gfm.js',
'core/clientold/assets/vendor/showdown/showdown.js',
'core/clientold/assets/vendor/showdown/extensions/ghostdown.js',
'core/shared/vendor/showdown/extensions/github.js',
'core/clientold/assets/vendor/shortcuts.js',
'core/clientold/assets/vendor/validator-client.js',
'core/clientold/assets/vendor/countable.js',
'core/clientold/assets/vendor/to-title-case.js',
'core/clientold/assets/vendor/packery.pkgd.min.js',
'core/clientold/assets/vendor/fastclick.js',
'core/clientold/assets/vendor/nprogress.js'
=======
'bower_components/jquery/dist/jquery.js',
'bower_components/jquery-ui/ui/jquery-ui.js',
'core/client/assets/lib/jquery-utils.js',
'core/client/assets/lib/uploader.js',
'bower_components/lodash/dist/lodash.underscore.js',
'bower_components/backbone/backbone.js',
'bower_components/handlebars.js/dist/handlebars.runtime.js',
'bower_components/moment/moment.js',
'bower_components/jquery-file-upload/js/jquery.fileupload.js',
'bower_components/codemirror/lib/codemirror.js',
'bower_components/codemirror/addon/mode/overlay.js',
'bower_components/codemirror/mode/markdown/markdown.js',
'bower_components/codemirror/mode/gfm/gfm.js',
'bower_components/showdown/src/showdown.js',
'bower_components/validator-js/validator.js',
'core/client/assets/lib/showdown/extensions/ghostdown.js',
'core/shared/lib/showdown/extensions/typography.js',
'core/shared/lib/showdown/extensions/github.js',
// ToDo: Remove or replace
'core/client/assets/vendor/shortcuts.js',
'core/client/assets/vendor/to-title-case.js',
'bower_components/Countable/Countable.js',
'bower_components/fastclick/lib/fastclick.js',
'bower_components/nprogress/nprogress.js'
>>>>>>>
'bower_components/jquery/dist/jquery.js',
'bower_components/jquery-ui/ui/jquery-ui.js',
'core/clientold/assets/lib/jquery-utils.js',
'core/clientold/assets/lib/uploader.js',
'bower_components/lodash/dist/lodash.underscore.js',
'bower_components/backbone/backbone.js',
'bower_components/handlebars.js/dist/handlebars.runtime.js',
'bower_components/moment/moment.js',
'bower_components/jquery-file-upload/js/jquery.fileupload.js',
'bower_components/codemirror/lib/codemirror.js',
'bower_components/codemirror/addon/mode/overlay.js',
'bower_components/codemirror/mode/markdown/markdown.js',
'bower_components/codemirror/mode/gfm/gfm.js',
'bower_components/showdown/src/showdown.js',
'bower_components/validator-js/validator.js',
'core/clientold/assets/lib/showdown/extensions/ghostdown.js',
'core/shared/lib/showdown/extensions/typography.js',
'core/shared/lib/showdown/extensions/github.js',
// ToDo: Remove or replace
'core/clientold/assets/vendor/shortcuts.js',
'core/clientold/assets/vendor/to-title-case.js',
'bower_components/Countable/Countable.js',
'bower_components/fastclick/lib/fastclick.js',
'bower_components/nprogress/nprogress.js'
<<<<<<<
'core/shared/vendor/jquery/jquery.js',
'core/shared/vendor/jquery/jquery-ui-1.10.3.custom.min.js',
'core/clientold/assets/lib/jquery-utils.js',
'core/clientold/assets/lib/uploader.js',
'core/shared/vendor/lodash.underscore.js',
'core/shared/vendor/backbone/backbone.js',
'core/shared/vendor/handlebars/handlebars-runtime.js',
'core/shared/vendor/moment.js',
'core/shared/vendor/jquery/jquery.ui.widget.js',
'core/shared/vendor/jquery/jquery.iframe-transport.js',
'core/shared/vendor/jquery/jquery.fileupload.js',
'core/clientold/assets/vendor/codemirror/codemirror.js',
'core/clientold/assets/vendor/codemirror/addon/mode/overlay.js',
'core/clientold/assets/vendor/codemirror/mode/markdown/markdown.js',
'core/clientold/assets/vendor/codemirror/mode/gfm/gfm.js',
'core/clientold/assets/vendor/showdown/showdown.js',
'core/clientold/assets/vendor/showdown/extensions/ghostdown.js',
'core/shared/vendor/showdown/extensions/github.js',
'core/clientold/assets/vendor/shortcuts.js',
'core/clientold/assets/vendor/validator-client.js',
'core/clientold/assets/vendor/countable.js',
'core/clientold/assets/vendor/to-title-case.js',
'core/clientold/assets/vendor/packery.pkgd.min.js',
'core/clientold/assets/vendor/fastclick.js',
'core/clientold/assets/vendor/nprogress.js',
=======
'bower_components/jquery/dist/jquery.js',
'bower_components/jquery-ui/ui/jquery-ui.js',
'core/client/assets/lib/jquery-utils.js',
'core/client/assets/lib/uploader.js',
'bower_components/lodash/dist/lodash.underscore.js',
'bower_components/backbone/backbone.js',
'bower_components/handlebars.js/dist/handlebars.runtime.js',
'bower_components/moment/moment.js',
'bower_components/jquery-file-upload/js/jquery.fileupload.js',
'bower_components/codemirror/lib/codemirror.js',
'bower_components/codemirror/addon/mode/overlay.js',
'bower_components/codemirror/mode/markdown/markdown.js',
'bower_components/codemirror/mode/gfm/gfm.js',
'bower_components/showdown/src/showdown.js',
'bower_components/validator-js/validator.js',
'core/client/assets/lib/showdown/extensions/ghostdown.js',
'core/shared/lib/showdown/extensions/typography.js',
'core/shared/lib/showdown/extensions/github.js',
// ToDo: Remove or replace
'core/client/assets/vendor/shortcuts.js',
'core/client/assets/vendor/to-title-case.js',
'bower_components/Countable/Countable.js',
'bower_components/fastclick/lib/fastclick.js',
'bower_components/nprogress/nprogress.js',
>>>>>>>
'bower_components/jquery/dist/jquery.js',
'bower_components/jquery-ui/ui/jquery-ui.js',
'core/clientold/assets/lib/jquery-utils.js',
'core/clientold/assets/lib/uploader.js',
'bower_components/lodash/dist/lodash.underscore.js',
'bower_components/backbone/backbone.js',
'bower_components/handlebars.js/dist/handlebars.runtime.js',
'bower_components/moment/moment.js',
'bower_components/jquery-file-upload/js/jquery.fileupload.js',
'bower_components/codemirror/lib/codemirror.js',
'bower_components/codemirror/addon/mode/overlay.js',
'bower_components/codemirror/mode/markdown/markdown.js',
'bower_components/codemirror/mode/gfm/gfm.js',
'bower_components/showdown/src/showdown.js',
'bower_components/validator-js/validator.js',
'core/clientold/assets/lib/showdown/extensions/ghostdown.js',
'core/shared/lib/showdown/extensions/typography.js',
'core/shared/lib/showdown/extensions/github.js',
// ToDo: Remove or replace
'core/clientold/assets/vendor/shortcuts.js',
'core/clientold/assets/vendor/to-title-case.js',
'bower_components/Countable/Countable.js',
'bower_components/fastclick/lib/fastclick.js',
'bower_components/nprogress/nprogress.js',
<<<<<<<
'emberBuild',
=======
'copy:dev',
>>>>>>>
'emberBuild',
'copy:dev',
<<<<<<<
grunt.registerTask('default', 'Build CSS, JS & templates for development', ['update_submodules', 'sass:compress', 'handlebars', 'concat', 'emberBuild']);
=======
grunt.registerTask('default', 'Build CSS, JS & templates for development', ['update_submodules', 'sass:compress', 'handlebars', 'concat', 'copy:dev']);
>>>>>>>
grunt.registerTask('default', 'Build CSS, JS & templates for development', ['update_submodules', 'sass:compress', 'handlebars', 'concat', 'copy:dev', 'emberBuild']); |
<<<<<<<
var FileList = require('filelist').FileList;
=======
var fs = require('fs')
, FileList = require('./file_list').FileList;
>>>>>>>
var fs = require('fs')
, FileList = require('filelist').FileList; |
<<<<<<<
Jsonary.pageContext = pageContext;
function render(element, data, uiStartingState, contextCallback) {
var context = pageContext.render(element, data, null, uiStartingState, contextCallback);
=======
setInterval(function () {
// Clean-up sweep of pageContext's element lookup
var keysToRemove = [];
for (var key in pageContext.elementLookup) {
var elementIds = pageContext.elementLookup[key];
var found = false;
for (var i = 0; i < elementIds.length; i++) {
var element = document.getElementById(elementIds[i]);
if (element) {
found = true;
break;
}
}
if (!found) {
keysToRemove.push(key);
}
}
for (var i = 0; i < keysToRemove.length; i++) {
delete pageContext.elementLookup[keysToRemove[i]];
}
}, 30000); // Every 30 seconds
function render(element, data, uiStartingState) {
pageContext.render(element, data, null, uiStartingState);
>>>>>>>
setInterval(function () {
// Clean-up sweep of pageContext's element lookup
var keysToRemove = [];
for (var key in pageContext.elementLookup) {
var elementIds = pageContext.elementLookup[key];
var found = false;
for (var i = 0; i < elementIds.length; i++) {
var element = document.getElementById(elementIds[i]);
if (element) {
found = true;
break;
}
}
if (!found) {
keysToRemove.push(key);
}
}
for (var i = 0; i < keysToRemove.length; i++) {
delete pageContext.elementLookup[keysToRemove[i]];
}
}, 30000); // Every 30 seconds
function render(element, data, uiStartingState, contextCallback) {
var context = pageContext.render(element, data, null, uiStartingState, contextCallback); |
<<<<<<<
if (isNotFound(err)) {
// New accounts will start out as sequence zero
callback(null, 0);
=======
if (err &&
"object" === typeof err &&
"object" === typeof err.remote &&
err.remote.error === "actNotFound") {
// New accounts will start out as sequence one
callback(null, 1);
>>>>>>>
if (isNotFound(err)) {
// New accounts will start out as sequence one
callback(null, 1); |
<<<<<<<
this.editor = window.layoutEditor;
=======
this.editor = layoutEditor;
this.isFormSubmitting = false;
>>>>>>>
this.editor = layoutEditor;
<<<<<<<
window.Orchard.Layouts.LayoutEditorHost = window.Orchard.Layouts.LayoutEditorHost || {};
$(function () {
window.layoutDesignerHost = new LayoutDesignerHost($(".layout-designer"));
$(".layout-designer").each(function (e) {
var designer = $(this);
var dialog = designer.find(".layout-editor-help-dialog");
designer.find(".layout-editor-help-link").click(function (e) {
dialog.dialog({
modal: true,
width: 840
});
e.preventDefault();
});
});
});
=======
window.Orchard.Layouts.LayoutDesignerHost = LayoutDesignerHost;
>>>>>>>
window.Orchard.Layouts.LayoutDesignerHost = LayoutDesignerHost; |
<<<<<<<
var AuthInfo = require('./authinfo').AuthInfo;
var blobClient = require('./blob').BlobClient;
var crypt = require('./crypt').Crypt;
=======
var async = require('async');
var blobClient = require('./blob');
var AuthInfo = require('./authinfo').AuthInfo;
var crypt = require('./crypt').Crypt;
>>>>>>>
var async = require('async');
var blobClient = require('./blob').BlobClient;
var AuthInfo = require('./authinfo').AuthInfo;
var crypt = require('./crypt').Crypt;
<<<<<<<
if (!opts) opts = {};
else if (typeof opts === "string") opts = {domain:opts};
this.domain = opts.domain || 'ripple.com';
this.authInfo = new AuthInfo();
this.infos = {};
}
/**
* Reduce username to standardized form.
* Strips whitespace at beginning and end.
* @param {string} username - Username to normalize
*/
VaultClient.prototype.normalizeUsername = function (username) {
username = ""+username;
username = username.trim();
return username;
};
=======
if (!opts) {
opts = { };
}
>>>>>>>
if (!opts) {
opts = { };
}
<<<<<<<
VaultClient.prototype.exists = function (username, fn) {
this.authInfo.get(this.domain, username.toLowerCase(), function(err, authInfo){
if (err) return fn(err);
return fn(null, !!authInfo.exists);
});
};
=======
>>>>>>>
<<<<<<<
blobClient.verify(authInfo.blobvault, username.toLowerCase(), token, fn);
});
};
=======
if (typeof authInfo.blobvault !== 'string') {
return callback(new Error('No blobvault specified in the authinfo.'));
}
>>>>>>>
if (typeof authInfo.blobvault !== 'string') {
return callback(new Error('No blobvault specified in the authinfo.'));
}
<<<<<<<
VaultClient.prototype.register = function (options, fn) {
var self = this,
username = this.normalizeUsername(options.username),
password = this.normalizePassword(options.password);
self.authInfo.get(self.domain, username, function(err, authInfo){
if (err) return fn(err);
if ("string" !== typeof authInfo.blobvault) {
return fn(new Error("No blobvault specified in the authinfo."));
}
if (!authInfo.pakdf) {
return fn(new Error("No settings for PAKDF in auth packet."));
}
//derive login keys
crypt.derive(authInfo.pakdf, 'login', username.toLowerCase(), password, function(err, loginKeys){
if (err) return fn(err);
//derive unlock key
crypt.derive(authInfo.pakdf, 'unlock', username.toLowerCase(), password, function(err, unlockKeys){
if (err) return fn(err);
var params = {
'url' : authInfo.blobvault,
'id' : loginKeys.id,
'crypt' : loginKeys.crypt,
'unlock' : unlockKeys.unlock,
'username' : username,
'email' : options.email,
'masterkey' : options.masterkey || crypt.createMaster(),
'activateLink' : options.activateLink,
'oldUserBlob' : options.oldUserBlob
};
blobClient.create(params, function(err, blob){
if (err) return fn(err);
fn(null, blob, loginKeys, authInfo.username);
});
=======
VaultClient.prototype.register = function(options, fn) {
var self = this;
var username = String(options.username).trim();
var password = String(options.password).trim();
function getAuthInfo(callback) {
self.authInfo.get(self.domain, username, function(err, authInfo) {
if (err) {
return callback(err);
}
if (typeof authInfo.blobvault !== 'string') {
return callback(new Error('No blobvault specified in the authinfo.'));
}
if (!authInfo.pakdf) {
return callback(new Error('No settings for PAKDF in auth packet.'));
}
callback(null, authInfo);
});
};
function deriveKeys(authInfo, callback) {
// derive unlock and login keys
var keys = { };
function deriveKey(keyType, callback) {
crypt.derive(authInfo.pakdf, keyType, username.toLowerCase(), password, function(err, key) {
if (err) {
callback(err);
} else {
keys[keyType] = key;
callback();
}
>>>>>>>
VaultClient.prototype.register = function(options, fn) {
var self = this;
var username = String(options.username).trim();
var password = String(options.password).trim();
function getAuthInfo(callback) {
self.authInfo.get(self.domain, username, function(err, authInfo) {
if (err) {
return callback(err);
}
if (typeof authInfo.blobvault !== 'string') {
return callback(new Error('No blobvault specified in the authinfo.'));
}
if (!authInfo.pakdf) {
return callback(new Error('No settings for PAKDF in auth packet.'));
}
callback(null, authInfo);
});
};
function deriveKeys(authInfo, callback) {
// derive unlock and login keys
var keys = { };
function deriveKey(keyType, callback) {
crypt.derive(authInfo.pakdf, keyType, username.toLowerCase(), password, function(err, key) {
if (err) {
callback(err);
} else {
keys[keyType] = key;
callback();
}
<<<<<<<
module.exports.VaultClient = VaultClient;
=======
exports.VaultClient = VaultClient;
>>>>>>>
exports.VaultClient = VaultClient; |
<<<<<<<
var crypt = require('./crypt').Crypt;
var request = require('superagent');
var async = require('async');
var extend = require("extend");
var BlobClient = {};
=======
var request = require('superagent');
var extend = require('extend');
var crypt = require('./crypt').Crypt;
>>>>>>>
var crypt = require('./crypt').Crypt;
var request = require('superagent');
var extend = require("extend");
var BlobClient = {};
<<<<<<<
//Identity fields
var identityRoot = 'identityVault';
var identityFields = [
'name',
'entityType',
'email',
'phone',
'address',
'nationalID',
'birthday',
'birthplace'
];
var entityTypes = [
'individual',
'organization',
'corporation'
]
var addressFields = [
'contact',
'line1',
'line2',
'city',
'region', //state/province/region
'postalCode',
'country'
];
var nationalIDFields = [
'number',
'type',
'country',
];
var idTypeFields = [
'ssn',
'taxID',
'passport',
'driversLicense',
'other'
];
/*
=======
/**
>>>>>>>
//Identity fields
var identityRoot = 'identityVault';
var identityFields = [
'name',
'entityType',
'email',
'phone',
'address',
'nationalID',
'birthday',
'birthplace'
];
var entityTypes = [
'individual',
'organization',
'corporation'
]
var addressFields = [
'contact',
'line1',
'line2',
'city',
'region', //state/province/region
'postalCode',
'country'
];
var nationalIDFields = [
'number',
'type',
'country',
];
var idTypeFields = [
'ssn',
'taxID',
'passport',
'driversLicense',
'other'
];
/**
<<<<<<<
fn(null, self);//return with newly decrypted blob
}).timeout(8000);
};
=======
if (successful) {
self.consolidate();
}
}
>>>>>>>
if (successful) {
self.consolidate();
}
}
<<<<<<<
};
=======
};
>>>>>>>
};
<<<<<<<
}
/***** identity ****/
/**
* Identity class
*
*/
var Identity = function (blob) {
var self = this;
self.blob = blob;
//make sure the identity setup is valid
self.validate = function(fn) {
if (!self.blob) return fn(new Error("Identity must be associated with a blob"));
else if (!self.blob.data) return fn(new Error("Invalid Blob"));
else if (!self.blob.data[identityRoot]) {
self.blob.set(identityRoot, {}, function(err, res){
if (err) return fn(err);
else return fn(null, true);
});
} else return fn(null, true);
};
};
=======
};
>>>>>>>
}
/***** identity ****/
/**
* Identity class
*
*/
var Identity = function (blob) {
var self = this;
self.blob = blob;
//make sure the identity setup is valid
self.validate = function(fn) {
if (!self.blob) return fn(new Error("Identity must be associated with a blob"));
else if (!self.blob.data) return fn(new Error("Invalid Blob"));
else if (!self.blob.data[identityRoot]) {
self.blob.set(identityRoot, {}, function(err, res){
if (err) return fn(err);
else return fn(null, true);
});
} else return fn(null, true);
};
};
<<<<<<<
*/
BlobClient.Blob = BlobObj;
=======
*/
exports.Blob = BlobObj
>>>>>>>
*/
exports.Blob = BlobObj;
<<<<<<<
module.exports.getRippleName = function (url, address, fn) {
if (!crypt.isValidAddress(address)) return fn (new Error("Invalid ripple address"));
request.get(url + '/v1/user/' + address, function(err, resp){
if (err) return fn(new Error("Unable to access vault sever"));
else if (resp.body && resp.body.username) return fn(null, resp.body.username);
else if (resp.body && resp.body.exists === false) return fn (new Error("No ripple name for this address"));
else return fn(new Error("Unable to determine if ripple name exists"));
});
};
=======
>>>>>>>
<<<<<<<
BlobClient.get = function (url, id, crypt, fn) {
=======
exports.get = function(url, id, crypt, fn) {
>>>>>>>
BlobClient.get = function (url, id, crypt, fn) {
<<<<<<<
};
=======
};
>>>>>>>
};
<<<<<<<
BlobClient.verify = function (url, username, token, fn) {
=======
exports.verify = function(url, username, token, fn) {
>>>>>>>
BlobClient.verify = function(url, username, token, fn) {
<<<<<<<
if (err) return fn(err);
else if (resp.body && resp.body.result === 'success') return fn(null, data);
else return fn(new Error("Failed to verify the account"));
});
};
=======
if (err) {
fn(err);
} else if (resp.body && resp.body.result === 'success') {
fn(null, data);
} else {
fn(new Error('Failed to verify the account'));
}
});
};
>>>>>>>
if (err) {
fn(err);
} else if (resp.body && resp.body.result === 'success') {
fn(null, data);
} else {
fn(new Error('Failed to verify the account'));
}
});
};
<<<<<<<
BlobClient.create = function (options, fn) {
var blob = new BlobObj(options.url, options.id, options.crypt);
=======
exports.create = function(options, fn) {
var blob = new BlobObj(options.url, options.id, options.crypt);
>>>>>>>
BlobClient.create = function(options, fn) {
var blob = new BlobObj(options.url, options.id, options.crypt);
<<<<<<<
if (err) return fn(err);
else if (resp.body && resp.body.result === 'success') return fn(null, blob,resp.body);
else return fn(new Error("Could not create blob"));
});
};
module.exports.BlobClient = BlobClient;
=======
if (err) {
fn(err);
} else if (resp.body && resp.body.result === 'success') {
fn(null, blob,resp.body);
} else {
fn(new Error('Could not create blob'));
}
});
};
>>>>>>>
if (err) {
fn(err);
} else if (resp.body && resp.body.result === 'success') {
fn(null, blob,resp.body);
} else {
fn(new Error('Could not create blob'));
}
});
};
exports.BlobClient = BlobClient; |
<<<<<<<
var assert = require('assert'),
RippleTxt = require('../src/js/ripple/rippletxt').RippleTxt,
AuthInfo = require('../src/js/ripple/authinfo').AuthInfo,
VaultClient = require('../src/js/ripple/vaultclient').VaultClient,
Blob = require('../src/js/ripple/blob').BlobClient.Blob,
UInt256 = require('../src/js/ripple/uint256').UInt256;
=======
var assert = require('assert');
var RippleTxt = require('../src/js/ripple/rippletxt').RippleTxt;
var AuthInfo = require('../src/js/ripple/authinfo').AuthInfo;
var VaultClient = require('../src/js/ripple/vaultclient').VaultClient;
var Blob = require('../src/js/ripple/blob').Blob;
var UInt256 = require('../src/js/ripple/uint256').UInt256;
>>>>>>>
var assert = require('assert');
var RippleTxt = require('../src/js/ripple/rippletxt').RippleTxt;
var AuthInfo = require('../src/js/ripple/authinfo').AuthInfo;
var VaultClient = require('../src/js/ripple/vaultclient').VaultClient;
var Blob = require('../src/js/ripple/blob').Blob;
var UInt256 = require('../src/js/ripple/uint256').UInt256;
<<<<<<<
describe('Ripple Txt', function () {
it('should get the context of a ripple.txt file from a given domain', function (done){
=======
describe('Ripple Txt', function() {
it('should get the content of a ripple.txt file from a given domain', function(done) {
>>>>>>>
describe('Ripple Txt', function() {
it('should get the content of a ripple.txt file from a given domain', function(done) {
<<<<<<<
describe('#initialization', function () {
it('should be initialized with a domain', function () {
=======
describe('initialization', function() {
it('should be initialized with a domain', function() {
>>>>>>>
describe('#initialization', function() {
it('should be initialized with a domain', function() {
<<<<<<<
describe('#exists', function () {
it('should determine if a username exists on the domain', function (done) {
=======
describe('#exists', function() {
it('should determine if a username exists on the domain', function(done) {
>>>>>>>
describe('#exists', function() {
it('should determine if a username exists on the domain', function(done) {
<<<<<<<
describe('#relogin', function () {
it('should retrieve the decrypted blob with blob vault url, id, and crypt key', function (done) {
=======
describe('#relogin', function() {
it('should retrieve the decrypted blob with blob vault url, id, and crypt key', function(done) {
>>>>>>>
describe('#relogin', function() {
it('should retrieve the decrypted blob with blob vault url, id, and crypt key', function(done) {
<<<<<<<
client.unlock(exampleData.username, exampleData.password, exampleData.encrypted_secret, function (err, resp) {
=======
client.unlock(exampleData.username, exampleData.password, exampleData.encrypted_secret, function(err, resp) {
>>>>>>>
client.unlock(exampleData.username, exampleData.password, exampleData.encrypted_secret, function(err, resp) {
<<<<<<<
client.loginAndUnlock(exampleData.username, exampleData.password, function (err, resp) {
=======
client.loginAndUnlock(exampleData.username, exampleData.password, function(err, resp) {
>>>>>>>
client.loginAndUnlock(exampleData.username, exampleData.password, function(err, resp) {
<<<<<<<
vaultClient.login(exampleData.username, exampleData.password, function (err,resp){
=======
vaultClient.login(exampleData.username, exampleData.password, function(err,resp) {
>>>>>>>
vaultClient.login(exampleData.username, exampleData.password, function(err,resp) {
<<<<<<<
});
/********* Identity tests ***********/
describe('#identity_set', function () {
it('should set an identity property', function (done) {
this.timeout(10000);
blob.identity.set('address', exampleData.unlock, {city:"San Francisco", region:"CA"}, function (err, resp) {
assert.ifError(err);
assert.equal(resp.result, 'success');
done();
});
});
});
describe('#identity_get', function () {
it('should retreive an identity property given the property name and encryption key', function () {
var property = blob.identity.get('address', exampleData.unlock);
assert.ifError(property.error);
assert.equal(typeof property.encrypted, 'boolean');
assert.notEqual(typeof property.value, 'undefined');
});
});
describe('#identity_getAll', function () {
it('should retreive all identity properties given the encryption key', function () {
var obj = blob.identity.getAll(exampleData.unlock);
assert.equal(typeof obj, 'object');
});
});
describe('#identity_getFullAddress', function () {
it('should retreive the address as a string', function () {
var address = blob.identity.getFullAddress(exampleData.unlock);
assert.equal(typeof address, 'string');
});
});
describe('#identity_unset', function () {
it('should remove an identity property', function (done) {
this.timeout(10000);
blob.identity.unset('name', exampleData.unlock, function (err, resp) {
assert.ifError(err);
assert.equal(resp.result, 'success');
done();
});
});
});
=======
});
>>>>>>>
});
/********* Identity tests ***********/
describe('#identity_set', function () {
it('should set an identity property', function (done) {
this.timeout(10000);
blob.identity.set('address', exampleData.unlock, {city:"San Francisco", region:"CA"}, function (err, resp) {
assert.ifError(err);
assert.equal(resp.result, 'success');
done();
});
});
});
describe('#identity_get', function () {
it('should retreive an identity property given the property name and encryption key', function () {
var property = blob.identity.get('address', exampleData.unlock);
assert.ifError(property.error);
assert.equal(typeof property.encrypted, 'boolean');
assert.notEqual(typeof property.value, 'undefined');
});
});
describe('#identity_getAll', function () {
it('should retreive all identity properties given the encryption key', function () {
var obj = blob.identity.getAll(exampleData.unlock);
assert.equal(typeof obj, 'object');
});
});
describe('#identity_getFullAddress', function () {
it('should retreive the address as a string', function () {
var address = blob.identity.getFullAddress(exampleData.unlock);
assert.equal(typeof address, 'string');
});
});
describe('#identity_unset', function () {
it('should remove an identity property', function (done) {
this.timeout(10000);
blob.identity.unset('name', exampleData.unlock, function (err, resp) {
assert.ifError(err);
assert.equal(resp.result, 'success');
done();
});
});
}); |
<<<<<<<
// ND: We could consider sharing the work with tx_blob when doing
// local_signing
tx.addId(tx.hash());
=======
>>>>>>> |
<<<<<<<
'publish',
=======
'editContentTools',
>>>>>>>
'editContentTools',
'publish', |
<<<<<<<
cssnano = require("gulp-cssnano"),
=======
sass = require("gulp-sass"),
autoprefixer = require("gulp-autoprefixer"),
minify = require("gulp-minify-css"),
>>>>>>>
cssnano = require("gulp-cssnano"),
sass = require("gulp-sass"), |
<<<<<<<
setTimeout(function () {
if (that.settings.mode === 'structure') {
=======
if (this.settings.mode === 'structure') {
// FIXME this setTimeout is needed because
// plugins are initialized after all the scripts are processed
// which should be fixed btw. _resizeBoard wants plugins to be initialized,
// otherwise throws errors
setTimeout(function () {
>>>>>>>
// FIXME this setTimeout is needed because
// plugins are initialized after all the scripts are processed
// which should be fixed btw. _resizeBoard wants plugins to be initialized,
// otherwise throws errors
setTimeout(function () {
if (that.settings.mode === 'structure') {
<<<<<<<
} else {
// triggering hide here to switch proper classnames on switcher
that.hide(true);
}
}, 100);
=======
}, 0);
}
>>>>>>>
} else {
// triggering hide here to switch proper classnames on switcher
that.hide(true);
}
}, 0);
<<<<<<<
this.sortables.nestedSortable({
items: '.cms-draggable:not(.cms-draggable-disabled .cms-draggable)',
=======
this.ui.sortables.nestedSortable({
items: '.cms-draggable',
>>>>>>>
this.ui.sortables.nestedSortable({
items: '.cms-draggable:not(.cms-draggable-disabled .cms-draggable)', |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.