conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
brackets.fs.readFile(blob._fullPath, encoding, function (err, data) {
=======
brackets.fs.readFile( blob._fullPath, encoding, function( err, data) {
>>>>>>>
brackets.fs.readFile(blob._fullPath, encoding, function (err, data) {
<<<<<<<
if (err) {
this.readyState = this.DONE;
if (self.onerror) {
=======
if( err ){
self.readyState = self.DONE;
if( self.onerror ){
>>>>>>>
if (err) {
self.readyState = self.DONE;
if (self.onerror) {
<<<<<<<
} else {
this.readyState = this.DONE;
=======
}
else{
self.readyState = self.DONE;
>>>>>>>
} else {
self.readyState = self.DONE;
<<<<<<<
// TODO: this.onabort not currently supported since our native implementation doesn't support it
// if (self.onabort)
=======
// TODO: onabort not currently supported since our native implementation doesn't support it
// if( self.onabort )
>>>>>>>
// TODO: onabort not currently supported since our native implementation doesn't support it
// if (self.onabort) |
<<<<<<<
var _ = require("thirdparty/lodash"),
AppInit = require("utils/AppInit"),
EditorManager = require("editor/EditorManager"),
Editor = require("editor/Editor").Editor,
KeyEvent = require("utils/KeyEvent"),
LanguageManager = require("language/LanguageManager"),
StatusBar = require("widgets/StatusBar"),
Strings = require("strings"),
StringUtils = require("utils/StringUtils");
=======
var AppInit = require("utils/AppInit"),
AnimationUtils = require("utils/AnimationUtils"),
EditorManager = require("editor/EditorManager"),
Editor = require("editor/Editor").Editor,
KeyEvent = require("utils/KeyEvent"),
StatusBar = require("widgets/StatusBar"),
Strings = require("strings"),
StringUtils = require("utils/StringUtils");
>>>>>>>
var _ = require("thirdparty/lodash"),
AnimationUtils = require("utils/AnimationUtils"),
AppInit = require("utils/AppInit"),
EditorManager = require("editor/EditorManager"),
Editor = require("editor/Editor").Editor,
KeyEvent = require("utils/KeyEvent"),
LanguageManager = require("language/LanguageManager"),
StatusBar = require("widgets/StatusBar"),
Strings = require("strings"),
StringUtils = require("utils/StringUtils");
<<<<<<<
// When language select clicked, fully populate the dropdown before it opens
// (which occurs on mouseup)
$languageSelect.on("mousedown", function () {
// Lock width of <select>, else it changes when it's populated
// (this is reverted in _updateLanguageInfo())
$languageSelect.css("width", $languageSelect.css("width"));
_populateLanguageSelect(EditorManager.getActiveEditor().document);
});
// Language select change handler
$languageSelect.on("change", function () {
var document = EditorManager.getActiveEditor().document,
selectedLang = LanguageManager.getLanguage($languageSelect.val()),
defaultLang = LanguageManager.getLanguageForPath(document.file.fullPath);
// if default language selected, don't "force" it
// (passing in null will reset the force flag)
document.setLanguageOverride(selectedLang === defaultLang ? null : selectedLang);
});
=======
$statusOverwrite.on("click", _updateEditorOverwriteMode);
>>>>>>>
// When language select clicked, fully populate the dropdown before it opens
// (which occurs on mouseup)
$languageSelect.on("mousedown", function () {
// Lock width of <select>, else it changes when it's populated
// (this is reverted in _updateLanguageInfo())
$languageSelect.css("width", $languageSelect.css("width"));
_populateLanguageSelect(EditorManager.getActiveEditor().document);
});
// Language select change handler
$languageSelect.on("change", function () {
var document = EditorManager.getActiveEditor().document,
selectedLang = LanguageManager.getLanguage($languageSelect.val()),
defaultLang = LanguageManager.getLanguageForPath(document.file.fullPath);
// if default language selected, don't "force" it
// (passing in null will reset the force flag)
document.setLanguageOverride(selectedLang === defaultLang ? null : selectedLang);
});
$statusOverwrite.on("click", _updateEditorOverwriteMode); |
<<<<<<<
require("spec/QuickOpen-test");
=======
require("spec/StringMatch-test");
>>>>>>>
require("spec/QuickOpen-test");
require("spec/StringMatch-test"); |
<<<<<<<
.append(Mustache.render(searchResultsTemplate, {searchList: searchList}))
=======
.append(Mustache.render(searchResultsTemplate, {searchList: searchList, Strings: Strings}))
.scrollTop(0) // Otherwise scroll pos from previous contents is remembered
>>>>>>>
.append(Mustache.render(searchResultsTemplate, {searchList: searchList, Strings: Strings})) |
<<<<<<<
var defaultPrefs = { enabled: true },
enabled, // Only show preview if true
prefs = null, // Preferences
previewMark, // CodeMirror marker highlighting the preview text
$previewContainer, // Preview container
currentImagePreviewContent = "", // Current image preview content, or "" if no content is showing.
lastPreviewedColorOrGradient = "", // Color/gradient value of last previewed.
lastPreviewedImagePath = ""; // Image path of last previewed.
=======
var defaultPrefs = { enabled: true },
enabled, // Only show preview if true
prefs = null, // Preferences
previewMark, // CodeMirror marker highlighting the preview text
$previewContainer, // Preview container
$previewContent, // Preview content holder
currentImagePreviewContent = ""; // Current image preview content, or "" if no content is showing.
>>>>>>>
var defaultPrefs = { enabled: true },
enabled, // Only show preview if true
prefs = null, // Preferences
previewMark, // CodeMirror marker highlighting the preview text
$previewContainer, // Preview container
$previewContent, // Preview content holder
currentImagePreviewContent = "", // Current image preview content, or "" if no content is showing.
lastPreviewedColorOrGradient = "", // Color/gradient value of last previewed.
lastPreviewedImagePath = ""; // Image path of last previewed. |
<<<<<<<
exports.FILE_QUICK_NAVIGATE_FILE = "file.quickNaviateFile";
exports.FILE_QUICK_NAVIGATE_DEFINITION = "file.quickNaviateDefinition";
exports.FILE_QUICK_NAVIGATE_LINE = "file.quickNaviateLine";
=======
exports.FILE_QUICK_NAVIGATE = "file.quickNaviate";
exports.FIND_IN_FILES = "findInFiles";
>>>>>>>
exports.FILE_QUICK_NAVIGATE_FILE = "file.quickNaviateFile";
exports.FILE_QUICK_NAVIGATE_DEFINITION = "file.quickNaviateDefinition";
exports.FILE_QUICK_NAVIGATE_LINE = "file.quickNaviateLine";
exports.FIND_IN_FILES = "findInFiles"; |
<<<<<<<
/*global define, $, Mustache, window */
=======
/*global define, $, window, Mustache */
>>>>>>>
/*global define, $, window, Mustache */
<<<<<<<
var _naturalWidth = 0,
_fullPath;
=======
var _naturalWidth = 0,
_scale = 100,
_scaleDivInfo = null; // coordinates of hidden scale sticker
>>>>>>>
var _naturalWidth = 0,
_fullPath,
_scale = 100,
_scaleDivInfo = null; // coordinates of hidden scale sticker
<<<<<<<
// make sure the file in display is still there when window gets focus.
// close and warn if the file is gone.
window.addEventListener("focus", _checkFileExists);
=======
minimumPixels = Math.floor(minimumPixels * 100 / _scale);
// If the image size is too narrow in width or height, then
// show the crosshair cursor since guides are almost invisible
// in narrow images.
if (this.naturalWidth < minimumPixels || this.naturalHeight < minimumPixels) {
$("#img-preview").css("cursor", "crosshair");
$(".img-guide").css("cursor", "crosshair");
}
>>>>>>>
// make sure the file in display is still there when window gets focus.
// close and warn if the file is gone.
window.addEventListener("focus", _checkFileExists);
minimumPixels = Math.floor(minimumPixels * 100 / _scale);
// If the image size is too narrow in width or height, then
// show the crosshair cursor since guides are almost invisible
// in narrow images.
if (this.naturalWidth < minimumPixels || this.naturalHeight < minimumPixels) {
$("#img-preview").css("cursor", "crosshair");
$(".img-guide").css("cursor", "crosshair");
} |
<<<<<<<
* - be resolved with a document for the specified file path or
* - be resolved without document, i.e. when an image is displayed or
* - be rejected with FileSystemError if the file can not be read.
=======
* - be resolved with a file for the specified file path or
* - be rejected if the file can not be read.
* If paneId is undefined, the ACTIVE_PANE constant
>>>>>>>
* - be resolved with a file for the specified file path or
* - be rejected with FileSystemError if the file can not be read.
* If paneId is undefined, the ACTIVE_PANE constant
<<<<<<<
function _cleanup(fileError, fullFilePath) {
if (!fullFilePath || EditorManager.showingCustomViewerForPath(fullFilePath)) {
// We get here only after the user renames a file that makes it no longer belong to a
// custom viewer but the file is still showing in the current custom viewer. This only
// occurs on Mac since opening a non-text file always fails on Mac and triggers an error
// message that in turn calls _cleanup() after the user clicks OK in the message box.
// So we need to explicitly close the currently viewing image file whose filename is
// no longer valid. Calling notifyPathDeleted will close the image vieer and then select
// the previously opened text file or show no-editor if none exists.
EditorManager.notifyPathDeleted(fullFilePath);
} else {
// For performance, we do lazy checking of file existence, so it may be in working set
DocumentManager.removeFromWorkingSet(FileSystem.getFileForPath(fullFilePath));
EditorManager.focusEditor();
=======
function _cleanup(fullFilePath) {
if (fullFilePath) {
// For performance, we do lazy checking of file existence, so it may be in workingset
MainViewManager._removeView(paneId, FileSystem.getFileForPath(fullFilePath));
MainViewManager.focusActivePane();
>>>>>>>
function _cleanup(fileError, fullFilePath) {
if (fullFilePath) {
// For performance, we do lazy checking of file existence, so it may be in workingset
MainViewManager._removeView(paneId, FileSystem.getFileForPath(fullFilePath));
MainViewManager.focusActivePane();
<<<<<<<
throw new Error("doOpen() called without fullPath");
=======
console.error("_doOpen() called without fullPath");
result.reject();
>>>>>>>
throw new Error("_doOpen() called without fullPath"); |
<<<<<<<
/**
* Designates the DOM node that will contain the currently active editor instance. EditorManager
* will own the content of this DOM node.
* @param {!jQueryObject} holder
*/
function setEditorHolder(holder) {
if (_currentEditor)
throw new Error("Cannot change editor area after an editor has already been created!");
_editorHolder = holder;
}
/**
* Creates a new CodeMirror editor instance containing text from the
* specified fileEntry and wraps it in a new Document tied to the given
* file. The editor is not yet visible; to display it in the main
* editor UI area, ask DocumentManager to make this the current document.
* @param {!FileEntry} file The file being edited. Need not lie within the project.
* @return {Deferred} a jQuery Deferred that will be resolved with a new
* document for the fileEntry, or rejected if the file can not be read.
*/
function createDocumentAndEditor(fileEntry) {
var result = new $.Deferred()
, editorResult = _createEditor(fileEntry);
editorResult.done(function(editor, readTimestamp) {
// Create the Document wrapping editor & binding it to a file
var doc = new DocumentManager.Document(fileEntry, editor, readTimestamp);
result.resolve(doc);
});
editorResult.fail(function(error) {
result.reject(error);
});
return result;
}
/**
* Creates a new CodeMirror editor instance containing text from the
* specified fileEntry. The editor is not yet visible.
* @param {!FileEntry} file The file being edited. Need not lie within the project.
* @return {Deferred} a jQuery Deferred that will be resolved with the new editor and
* the file's timestamp at the time it was read, or rejected if the file cannot be read.
*/
function _createEditor(fileEntry) {
var result = new $.Deferred()
, reader = DocumentManager.readAsText(fileEntry);
reader.done(function(text, readTimestamp) {
var editor = CodeMirror(_editorHolder.get(0), {
indentUnit : 4,
lineNumbers: true,
extraKeys: {
"Tab" : _handleTabKey,
"Left" : function(instance) {
if (!_handleSoftTabNavigation(instance, -1, "moveH"))
CodeMirror.commands.goCharLeft(instance);
},
"Right" : function(instance) {
if (!_handleSoftTabNavigation(instance, 1, "moveH"))
CodeMirror.commands.goCharRight(instance);
},
"Backspace" : function(instance) {
if (!_handleSoftTabNavigation(instance, -1, "deleteH"))
CodeMirror.commands.delCharLeft(instance);
},
"Delete" : function(instance) {
if (!_handleSoftTabNavigation(instance, 1, "deleteH"))
CodeMirror.commands.delCharRight(instance);
}
}
});
// Set code-coloring mode
EditorUtils.setModeFromFileExtension(editor, fileEntry.fullPath);
// Initially populate with text. This will send a spurious change event, but that's ok
// because no one's listening yet (and we clear the undo stack below)
editor.setValue(text);
// Make sure we can't undo back to the empty state before setValue()
editor.clearHistory();
result.resolve(editor, readTimestamp);
});
reader.fail(function(error) {
result.reject(error);
});
return result;
}
=======
>>>>>>>
<<<<<<<
editorResult.done(function(editor, readTimestamp) {
document._setEditor(editor, readTimestamp);
=======
editorResult.done(function (editor) {
document._setEditor(editor);
>>>>>>>
editorResult.done(function (editor, readTimestamp) {
document._setEditor(editor, readTimestamp); |
<<<<<<<
startLoad.done(function () {
// Clear project path map
_projectInitialLoad = {
previous : [], /* array of arrays containing full paths to open at each depth of the tree */
id : 0, /* incrementing id */
fullPathToIdMap : {} /* mapping of fullPath to tree node id attr */
};
// restore project tree state from last time this project was open
_projectInitialLoad.previous = _prefs.getValue(_getTreeStateKey(rootPath)) || [];
// Populate file tree as long as we aren't running in the browser
if (!brackets.inBrowser) {
if (!isUpdating) {
_watchProjectRoot(rootPath);
}
// Point at a real folder structure on local disk
var rootEntry = FileSystem.getDirectoryForPath(rootPath);
rootEntry.exists(function (err, exists) {
if (exists) {
var projectRootChanged = (!_projectRoot || !rootEntry) ||
_projectRoot.fullPath !== rootEntry.fullPath;
var i;
// Success!
var perfTimerName = PerfUtils.markStart("Load Project: " + rootPath);
_projectRoot = rootEntry;
_projectBaseUrl = _prefs.getValue(_getBaseUrlKey()) || "";
// If this is the most current welcome project, record it. In future launches, we want
// to substitute the latest welcome project from the current build instead of using an
// outdated one (when loading recent projects or the last opened project).
if (rootPath === _getWelcomeProjectPath()) {
addWelcomeProjectPath(rootPath);
=======
// Clear project path map
_projectInitialLoad = {
previous : [], /* array of arrays containing full paths to open at each depth of the tree */
id : 0, /* incrementing id */
fullPathToIdMap : {} /* mapping of fullPath to tree node id attr */
};
var result = new $.Deferred(),
resultRenderTree;
// restore project tree state from last time this project was open
_projectInitialLoad.previous = _prefs.getValue(_getTreeStateKey(rootPath)) || [];
// Populate file tree as long as we aren't running in the browser
if (!brackets.inBrowser) {
if (!isUpdating) {
_watchProjectRoot(rootPath);
}
// Point at a real folder structure on local disk
var rootEntry = FileSystem.getDirectoryForPath(rootPath);
rootEntry.exists(function (err, exists) {
if (exists) {
PreferencesManager._setCurrentEditingFile(rootPath);
var projectRootChanged = (!_projectRoot || !rootEntry) ||
_projectRoot.fullPath !== rootEntry.fullPath;
var i;
// Success!
var perfTimerName = PerfUtils.markStart("Load Project: " + rootPath);
_projectRoot = rootEntry;
_projectBaseUrl = _prefs.getValue(_getBaseUrlKey()) || "";
// If this is the most current welcome project, record it. In future launches, we want
// to substitute the latest welcome project from the current build instead of using an
// outdated one (when loading recent projects or the last opened project).
if (rootPath === _getWelcomeProjectPath()) {
addWelcomeProjectPath(rootPath);
}
// The tree will invoke our "data provider" function to populate the top-level items, then
// go idle until a node is expanded - at which time it'll call us again to fetch the node's
// immediate children, and so on.
resultRenderTree = _renderTree(_treeDataProvider);
resultRenderTree.always(function () {
if (projectRootChanged) {
// Allow asynchronous event handlers to finish before resolving result by collecting promises from them
var promises = [];
$(exports).triggerHandler({ type: "projectOpen", promises: promises }, [_projectRoot]);
$.when.apply($, promises).then(result.resolve, result.reject);
} else {
$(exports).triggerHandler("projectRefresh", _projectRoot);
result.resolve();
>>>>>>>
startLoad.done(function () {
// Clear project path map
_projectInitialLoad = {
previous : [], /* array of arrays containing full paths to open at each depth of the tree */
id : 0, /* incrementing id */
fullPathToIdMap : {} /* mapping of fullPath to tree node id attr */
};
// restore project tree state from last time this project was open
_projectInitialLoad.previous = _prefs.getValue(_getTreeStateKey(rootPath)) || [];
// Populate file tree as long as we aren't running in the browser
if (!brackets.inBrowser) {
if (!isUpdating) {
_watchProjectRoot(rootPath);
}
// Point at a real folder structure on local disk
var rootEntry = FileSystem.getDirectoryForPath(rootPath);
rootEntry.exists(function (err, exists) {
if (exists) {
PreferencesManager._setCurrentEditingFile(rootPath);
var projectRootChanged = (!_projectRoot || !rootEntry) ||
_projectRoot.fullPath !== rootEntry.fullPath;
var i;
// Success!
var perfTimerName = PerfUtils.markStart("Load Project: " + rootPath);
_projectRoot = rootEntry;
_projectBaseUrl = _prefs.getValue(_getBaseUrlKey()) || "";
// If this is the most current welcome project, record it. In future launches, we want
// to substitute the latest welcome project from the current build instead of using an
// outdated one (when loading recent projects or the last opened project).
if (rootPath === _getWelcomeProjectPath()) {
addWelcomeProjectPath(rootPath); |
<<<<<<<
// Linting/errors/warnings
"CMD_TOGGLE_LINTING" : "Lint Files on Save",
"CMD_GOTO_FIRST_ERROR" : "Go to First Error/Warning",
"ERRORS_PANEL_TITLE" : "{0} Errors",
"SINGLE_ERROR" : "1 {0} Error",
"MULTIPLE_ERRORS" : "{1} {0} Errors",
"NO_ERRORS" : "No {0} errors - good job!",
"LINT_DISABLED" : "Linting is disabled",
"NO_LINT_AVAILABLE" : "No linter available for {0}",
"NOTHING_TO_LINT" : "Nothing to lint",
=======
"CMD_SHOW_PARAMETER_HINT" : "Show Parameter Hint",
"NO_ARGUMENTS" : "<no parameters>",
>>>>>>>
"CMD_SHOW_PARAMETER_HINT" : "Show Parameter Hint",
"NO_ARGUMENTS" : "<no parameters>",
// Linting/errors/warnings
"CMD_TOGGLE_LINTING" : "Lint Files on Save",
"CMD_GOTO_FIRST_ERROR" : "Go to First Error/Warning",
"ERRORS_PANEL_TITLE" : "{0} Errors",
"SINGLE_ERROR" : "1 {0} Error",
"MULTIPLE_ERRORS" : "{1} {0} Errors",
"NO_ERRORS" : "No {0} errors - good job!",
"LINT_DISABLED" : "Linting is disabled",
"NO_LINT_AVAILABLE" : "No linter available for {0}",
"NOTHING_TO_LINT" : "Nothing to lint", |
<<<<<<<
if (DocumentManager.getCurrentDocument()) {
=======
// Update all nodes in the project tree.
// All other updating is done by DocumentManager.notifyPathNameChanged() below
var nodes = _projectTree.find(".jstree-leaf, .jstree-open, .jstree-closed"),
i;
for (i = 0; i < nodes.length; i++) {
var node = $(nodes[i]);
FileUtils.updateFileEntryPath(node.data("entry"), oldName, newName, isFolder);
}
// Notify that one of the project files has changed
$(exports).triggerHandler("projectFilesChange");
// Tell the document manager about the name change. This will update
// all of the model information and send notification to all views
DocumentManager.notifyPathNameChanged(oldName, newName, isFolder);
// Finally, re-open the selected document
if (EditorManager.getCurrentlyViewedPath()) {
>>>>>>>
if (EditorManager.getCurrentlyViewedPath()) { |
<<<<<<<
/** Handles removals from DocumentManager's working set list */
function _onWorkingSetRemove(event, removedDoc) {
// There's one case where an editor should be disposed even though the current document
// didn't change: removing a document from the working set (via the "X" button). (This may
// also cover the case where the document WAS current, if the editor-swap happens before the
// removal from the working set.
_destroyEditorIfUnneeded(removedDoc);
}
// Note: there are several paths that can lead to an editor getting destroyed
// - file was in working set, but not open; then closed (via working set "X" button)
// --> handled by _onWorkingSetRemove()
// - file was open, but not in working set; then navigated away from
// --> handled by _onCurrentDocumentChange()
// - file was open, but not in working set; then closed (via File > Close) (and thus implicitly
// navigated away from)
// --> handled by _onCurrentDocumentChange()
// - file was open AND in working set; then closed (via File > Close OR working set "X" button)
// (and thus implicitly navigated away from)
// --> handled by _onWorkingSetRemove() currently, but could be _onCurrentDocumentChange()
// just as easily (depends on the order of events coming from DocumentManager)
/**
* Designates the DOM node that will contain the currently active editor instance. EditorManager
* will own the content of this DOM node.
* @param {!jQueryObject} holder
*/
function setEditorHolder(holder) {
if (_currentEditor)
throw new Error("Cannot change editor area after an editor has already been created!");
_editorHolder = holder;
}
/**
* Creates a new CodeMirror editor instance containing text from the
* specified fileEntry and wraps it in a new Document tied to the given
* file. The editor is not yet visible; to display it in the main
* editor UI area, ask DocumentManager to make this the current document.
* @param {!FileEntry} file The file being edited. Need not lie within the project.
* @return {Deferred} a jQuery Deferred that will be resolved with a new
* document for the fileEntry, or rejected if the file can not be read.
*/
function createDocumentAndEditor(fileEntry) {
var result = new $.Deferred()
, editorResult = _createEditor(fileEntry);
editorResult.done(function(editor) {
// Create the Document wrapping editor & binding it to a file
var doc = new DocumentManager.Document(fileEntry, editor);
result.resolve(doc);
});
editorResult.fail(function(error) {
result.reject(error);
});
return result;
}
/**
* Creates a new CodeMirror editor instance containing text from the
* specified fileEntry. The editor is not yet visible.
* @param {!FileEntry} file The file being edited. Need not lie within the project.
* @return {Deferred} a jQuery Deferred that will be resolved with a new
* editor for the fileEntry, or rejected if the file can not be read.
*/
function _createEditor(fileEntry) {
var result = new $.Deferred()
, reader = DocumentManager.readAsText(fileEntry);
reader.done(function(text) {
var editor = CodeMirror(_editorHolder.get(0), {
indentUnit : 4,
lineNumbers: true,
extraKeys: {
"Tab" : _handleTabKey,
"Left" : function(instance) {
if (!_handleSoftTabNavigation(instance, -1, "moveH"))
CodeMirror.commands.goCharLeft(instance);
},
"Right" : function(instance) {
if (!_handleSoftTabNavigation(instance, 1, "moveH"))
CodeMirror.commands.goCharRight(instance);
},
"Backspace" : function(instance) {
if (!_handleSoftTabNavigation(instance, -1, "deleteH"))
CodeMirror.commands.delCharLeft(instance);
},
"Delete" : function(instance) {
if (!_handleSoftTabNavigation(instance, 1, "deleteH"))
CodeMirror.commands.delCharRight(instance);
},
"F3": "findNext",
"Shift-F3": "findPrev",
"Ctrl-H": "replace",
"Shift-Delete": "cut"
}
});
// Set code-coloring mode
EditorUtils.setModeFromFileExtension(editor, fileEntry.fullPath);
// Initially populate with text. This will send a spurious change event, but that's ok
// because no one's listening yet (and we clear the undo stack below)
editor.setValue(text);
// Make sure we can't undo back to the empty state before setValue()
editor.clearHistory();
result.resolve(editor);
});
reader.fail(function(error) {
result.reject(error);
});
return result;
}
=======
>>>>>>> |
<<<<<<<
require("spec/CSSManager-test.js");
=======
require("spec/KeyMap-test.js");
>>>>>>>
require("spec/KeyMap-test.js");
require("spec/CSSManager-test.js"); |
<<<<<<<
=======
/**
* A stack of keydown event handler functions that corresponds to the
* current stack of modal dialogs.
*
* @type {Array.<Function>}
*/
var _keydownListeners = [];
>>>>>>>
/**
* A stack of keydown event handler functions that corresponds to the
* current stack of modal dialogs.
*
* @type {Array.<Function>}
*/
var _keydownListeners = [];
<<<<<<<
* @param {$.Element} $dlg - The dialog jQuery element
* @param {$.Promise} promise - A promise that will be resolved with the ID of the clicked button when the dialog
=======
* @param {string} template A string template or jQuery object to use as the dialog HTML.
* @param {string=} title The title of the error dialog. Can contain HTML markup. If unspecified, title in
* the HTML template is used unchanged.
* @param {string=} message The message to display in the error dialog. Can contain HTML markup. If
* unspecified, body in the HTML template is used unchanged.
* @param {boolean=} autoDismiss Whether to automatically dismiss the dialog when one of the buttons
* is clicked. Default true. If false, you'll need to manually handle button clicks and the Esc
* key, and dismiss the dialog yourself when ready with `cancelModalDialogIfOpen()`.
* @return {$.Promise} a promise that will be resolved with the ID of the clicked button when the dialog
>>>>>>>
* @param {$.Element} $dlg - The dialog jQuery element
* @param {$.Promise} promise - A promise that will be resolved with the ID of the clicked button when the dialog
<<<<<<<
function Dialog($dlg, promise) {
this._$dlg = $dlg;
this._promise = promise;
}
/** @type {$.Element} The dialog jQuery element */
Dialog.prototype.getElement = function () {
return this._$dlg;
};
/** @type {$.Promise} The dialog promise */
Dialog.prototype.getPromise = function () {
return this._promise;
};
/**
* Closes the dialog if is visible
*/
Dialog.prototype.close = function () {
if (this._$dlg.is(":visible")) { // Bootstrap breaks if try to hide dialog that's already hidden
_dismissDialog(this._$dlg, DIALOG_CANCELED);
}
};
/**
* Creates a new modal dialog from a given template.
* The template can either be a string or a jQuery object representing a DOM node that is *not* in the current DOM.
*
* @param {string} template - A string template or jQuery object to use as the dialog HTML.
* @return {Dialog}
*/
function showModalDialogUsingTemplate(template) {
=======
function showModalDialogUsingTemplate(template, title, message, autoDismiss) {
if (autoDismiss === undefined) {
autoDismiss = true;
}
>>>>>>>
function Dialog($dlg, promise) {
this._$dlg = $dlg;
this._promise = promise;
}
/** @type {$.Element} The dialog jQuery element */
Dialog.prototype.getElement = function () {
return this._$dlg;
};
/** @type {$.Promise} The dialog promise */
Dialog.prototype.getPromise = function () {
return this._promise;
};
/**
* Closes the dialog if is visible
*/
Dialog.prototype.close = function () {
if (this._$dlg.is(":visible")) { // Bootstrap breaks if try to hide dialog that's already hidden
_dismissDialog(this._$dlg, DIALOG_CANCELED);
}
};
/**
* Creates a new modal dialog from a given template.
* The template can either be a string or a jQuery object representing a DOM node that is *not* in the current DOM.
*
* @param {string} template A string template or jQuery object to use as the dialog HTML.
* @param {boolean=} autoDismiss Whether to automatically dismiss the dialog when one of the buttons
* is clicked. Default true. If false, you'll need to manually handle button clicks and the Esc
* key, and dismiss the dialog yourself when ready with `cancelModalDialogIfOpen()`.
* @return {Dialog}
*/
function showModalDialogUsingTemplate(template, autoDismiss) {
if (autoDismiss === undefined) {
autoDismiss = true;
}
<<<<<<<
KeyBindingManager.setEnabled(true);
=======
// Remove this dialog's listener from the stack of listeners. (It
// might not be on the top of the stack if the dialogs are somehow
// dismissed out of order.)
_keydownListeners = _keydownListeners.filter(function (listener) {
return listener !== handleKeyDown;
});
// Restore the previous listener if there was one; otherwise return
// control to the KeyBindingManager.
if (_keydownListeners.length > 0) {
var previousListener = _keydownListeners[_keydownListeners.length - 1];
window.document.body.addEventListener("keydown", previousListener, true);
} else {
KeyBindingManager.setEnabled(true);
}
>>>>>>>
// Remove this dialog's listener from the stack of listeners. (It
// might not be on the top of the stack if the dialogs are somehow
// dismissed out of order.)
_keydownListeners = _keydownListeners.filter(function (listener) {
return listener !== handleKeyDown;
});
// Restore the previous listener if there was one; otherwise return
// control to the KeyBindingManager.
if (_keydownListeners.length > 0) {
var previousListener = _keydownListeners[_keydownListeners.length - 1];
window.document.body.addEventListener("keydown", previousListener, true);
} else {
KeyBindingManager.setEnabled(true);
} |
<<<<<<<
exports.FILE_QUICK_NAVIGATE = "file.quickNaviate";
=======
exports.DEBUG_RUN_UNIT_TESTS = "debug.runUnitTests";
exports.DEBUG_JSLINT = "debug.jslint";
exports.DEBUG_SHOW_PERF_DATA = "debug.showPerfData";
>>>>>>>
exports.FILE_QUICK_NAVIGATE = "file.quickNaviate";
exports.DEBUG_RUN_UNIT_TESTS = "debug.runUnitTests";
exports.DEBUG_JSLINT = "debug.jslint";
exports.DEBUG_SHOW_PERF_DATA = "debug.showPerfData"; |
<<<<<<<
_removePopUp($popUp, true);
// TODO: right now Menus and Context Menus do not take focus away from
// the editor. We need to have a focus manager to correctly manage focus
// between editors and other UI elements.
// For now we don't set focus here and assume individual popups
// adjust focus if necessary
// See story in Trello card #404
//EditorManager.focusEditor();
=======
removePopUp($popUp);
EditorManager.focusEditor();
>>>>>>>
removePopUp($popUp);
// TODO: right now Menus and Context Menus do not take focus away from
// the editor. We need to have a focus manager to correctly manage focus
// between editors and other UI elements.
// For now we don't set focus here and assume individual popups
// adjust focus if necessary
// See story in Trello card #404
//EditorManager.focusEditor(); |
<<<<<<<
* Sets the cursor position in the document.
* @param {number} line The 0 based line number.
* @param {number} char The 0 based character position.
*/
Document.prototype.setCursor = function (line, char) {
this._editor.setCursor(line, char);
};
/**
* Sets the selection in the document.
* @param {number} from The 0 based starting char position
* @param {number} to The 0 based ending char position
*/
Document.prototype.setSelection = function (from, to) {
this._editor.setSelection(from, to);
};
/**
=======
>>>>>>>
* Sets the cursor position in the document.
* @param {number} line The 0 based line number.
* @param {number} char The 0 based character position.
*/
Document.prototype.setCursor = function (line, char) {
this._editor.setCursor(line, char);
};
/**
* Sets the cursor position in the document.
* @param {number} line The 0 based line number.
* @param {number} char The 0 based character position.
*/
Document.prototype.setCursor = function (line, char) {
this._editor.setCursor(line, char);
};
/** |
<<<<<<<
var mode = LanguageManager.getLanguageForPath(entry.fullPath).getMode();
if (mode === HintUtils.MODE_NAME) {
files.push(file);
=======
var languageID = LanguageManager.getLanguageForPath(entry.fullPath).getId();
if (languageID === HintUtils.LANGUAGE_ID) {
DocumentManager.getDocumentForPath(path).done(function (document) {
refreshOuterScope(dir, file, document.getText());
});
>>>>>>>
var languageID = LanguageManager.getLanguageForPath(entry.fullPath).getId();
if (languageID === HintUtils.LANGUAGE_ID) {
files.push(file); |
<<<<<<<
// Notify all open documents
CollectionUtils.forEach(_openDocuments, function (doc, id) {
// TODO: Only notify affected documents? For now _notifyFilePathChange
// just updates the language if the extension changed, so it's fine
// to call for all open docs.
doc._notifyFilePathChanged();
=======
// Update open documents. This will update _currentDocument too, since
// the current document is always open.
var keysToDelete = [];
_.forEach(_openDocuments, function (doc, path) {
if (FileUtils.isAffectedWhenRenaming(path, oldName, newName, isFolder)) {
// Copy value to new key
var newKey = path.replace(oldName, newName);
_openDocuments[newKey] = doc;
keysToDelete.push(path);
// Update document file
FileUtils.updateFileEntryPath(doc.file, oldName, newName, isFolder);
doc._notifyFilePathChanged();
}
});
// Delete the old keys
keysToDelete.forEach(function (fullPath) {
delete _openDocuments[fullPath];
});
// Update working set
_workingSet.forEach(function (fileEntry) {
FileUtils.updateFileEntryPath(fileEntry, oldName, newName, isFolder);
>>>>>>>
// Notify all open documents
_.forEach(_openDocuments, function (doc, id) {
// TODO: Only notify affected documents? For now _notifyFilePathChange
// just updates the language if the extension changed, so it's fine
// to call for all open docs.
doc._notifyFilePathChanged(); |
<<<<<<<
/**
* Sets the auto close brackets. Affects all Editors.
* @param {boolean} value
*/
Editor.setCloseBrackets = function (value) {
_closeBrackets = value;
_instances.forEach(function (editor) {
editor._codeMirror.setOption("autoCloseBrackets", _closeBrackets);
});
_prefs.setValue("closeBrackets", Boolean(_closeBrackets));
};
/** @type {boolean} Gets whether all Editors use auto close brackets */
Editor.getCloseBrackets = function () {
return _closeBrackets;
};
// Global commands that affect the currently focused Editor instance, wherever it may be
CommandManager.register(Strings.CMD_SELECT_ALL, Commands.EDIT_SELECT_ALL, _handleSelectAll);
=======
>>>>>>>
/**
* Sets the auto close brackets. Affects all Editors.
* @param {boolean} value
*/
Editor.setCloseBrackets = function (value) {
_closeBrackets = value;
_instances.forEach(function (editor) {
editor._codeMirror.setOption("autoCloseBrackets", _closeBrackets);
});
_prefs.setValue("closeBrackets", Boolean(_closeBrackets));
};
/** @type {boolean} Gets whether all Editors use auto close brackets */
Editor.getCloseBrackets = function () {
return _closeBrackets;
}; |
<<<<<<<
currentDocument, // doc for change event
currentImagePreviewContent = "", // Current image preview content, or "" if no content is showing.
lastPreviewedColorOrGradient = "", // Color/gradient value of last previewed.
lastPreviewedImagePath = ""; // Image path of last previewed.
=======
lastPos; // Last line/ch pos processed by handleMouseMove
>>>>>>>
currentDocument, // doc for change event
lastPos; // Last line/ch pos processed by handleMouseMove |
<<<<<<<
* @private
* Get all current theme objects
*
* @return {array} collection of the current theme instances
*/
=======
* @private
* Will trigger a refresh of codemirror instance and editor resize so that
* inline widgets get properly rendered
*
* @param {CodeMirror} cm code mirror instance to refresh
*/
function refreshEditor(cm) {
// Really dislike timing issues with CodeMirror. I have to refresh
// the editor after a little bit of time to make sure that themes
// are properly applied to quick edit widgets
setTimeout(function () {
cm.refresh();
EditorManager.resizeEditor();
}, 100);
}
/**
* @private
* Get all current theme objects
*
* @return {Array.<Theme>} collection of the current theme instances
*/
>>>>>>>
* @private
* Get all current theme objects
*
* @return {Array.<Theme>} collection of the current theme instances
*/ |
<<<<<<<
entry = entries[entryI];
if (shouldShow(entry)) {
jsonEntry = {
data: entry.name,
attr: { id: "node" + _projectInitialLoad.id++ },
metadata: { entry: entry }
};
if (entry.isDirectory) {
jsonEntry.children = [];
jsonEntry.state = "closed";
jsonEntry.data = _.escape(jsonEntry.data);
} else {
jsonEntry.data = ViewUtils.getFileEntryDisplay(entry);
}
// For more info on jsTree's JSON format see: http://www.jstree.com/documentation/json_data
jsonEntryList.push(jsonEntry);
// Map path to ID to initialize loaded and opened states
_projectInitialLoad.fullPathToIdMap[entry.fullPath] = jsonEntry.attr.id;
}
=======
jsonEntryList.push(_entryToJSON(entries[entryI]));
>>>>>>>
jsonEntryList.push(_entryToJSON(entries[entryI]));
<<<<<<<
// Since html_titles are enabled, we have to reset the text without markup.
// And we also need to explicitly escape all html-sensitive characters.
_projectTree.jstree("set_text", selected, _.escape(entry.name));
=======
// since html_titles are enabled, we have to reset the text without markup
_projectTree.jstree("set_text", $selected, entry.name);
>>>>>>>
// Since html_titles are enabled, we have to reset the text without markup.
// And we also need to explicitly escape all html-sensitive characters.
_projectTree.jstree("set_text", $selected, _.escape(entry.name)); |
<<<<<<<
selectors.push({selector: currentSelector.trim(), line: selectorStartLine, character: currentPosition, selectorEndLine: i, selectorEndChar: stream.start});
currentSelector = "";
currentPosition = -1;
=======
selectors.push({selector: currentSelector.trim(), line: selectorStartLine, character: currentPosition});
>>>>>>>
selectors.push({selector: currentSelector.trim(), line: selectorStartLine, character: currentPosition, selectorEndLine: i, selectorEndChar: stream.start}); |
<<<<<<<
$(this.hostEditor).off("scroll", this._updateRelatedContainer);
// de-ref all the Documents in the search results
this._rules.forEach(function (searchResult) {
searchResult.textRange.dispose();
});
=======
$(this).off("offsetTopChanged", this._updateRelatedContainer);
$(window).off("resize", this._updateRelatedContainer);
};
/**
* @private
* Set _relatedContainerInserted flag once the $relatedContainer is inserted in the DOM.
*/
CSSInlineEditor.prototype._relatedContainerInsertedHandler = function () {
this.$relatedContainer.off("DOMNodeInserted", this._relatedContainerInsertedHandler);
this._relatedContainerInserted = true;
>>>>>>>
$(this).off("offsetTopChanged", this._updateRelatedContainer);
$(window).off("resize", this._updateRelatedContainer);
// de-ref all the Documents in the search results
this._rules.forEach(function (searchResult) {
searchResult.textRange.dispose();
});
};
/**
* @private
* Set _relatedContainerInserted flag once the $relatedContainer is inserted in the DOM.
*/
CSSInlineEditor.prototype._relatedContainerInsertedHandler = function () {
this.$relatedContainer.off("DOMNodeInserted", this._relatedContainerInsertedHandler);
this._relatedContainerInserted = true; |
<<<<<<<
=======
MainViewManager = require("view/MainViewManager"),
FileUtils = require("file/FileUtils"),
>>>>>>>
MainViewManager = require("view/MainViewManager"),
<<<<<<<
PanelManager.createBottomPanel("errors", $(panelHtml), 100);
=======
var resultsPanel = WorkspaceManager.createBottomPanel("errors", $(panelHtml), 100);
>>>>>>>
WorkspaceManager.createBottomPanel("errors", $(panelHtml), 100); |
<<<<<<<
// utils
const createMap = (keys, create) => {
// "Map" here means JavaScript Object not JavaScript Map.
const obj = {};
for (let i = 0; i < keys.length; i += 1) {
const key = keys[i];
obj[key] = create(key);
}
return obj;
};
const canTrap = (state) => {
// XXX should we do like shouldInstrument?
return typeof state === 'object';
};
=======
// helper hooks
const forcedReducer = state => !state;
const useForceUpdate = () => useReducer(forcedReducer, false)[1];
>>>>>>>
// utils
const createMap = (keys, create) => {
// "Map" here means JavaScript Object not JavaScript Map.
const obj = {};
for (let i = 0; i < keys.length; i += 1) {
const key = keys[i];
obj[key] = create(key);
}
return obj;
};
const canTrap = (state) => {
// XXX should we do like shouldInstrument?
return typeof state === 'object';
};
<<<<<<<
=======
// update ref
const lastProxyfied = useRef(null);
useLayoutEffect(() => {
lastProxyfied.current = {
state,
affected: collectValuables(trapped.affected),
};
});
>>>>>>>
<<<<<<<
lastProxyfied.current.originalState,
store.getState(),
=======
lastProxyfied.current.state,
nextState,
>>>>>>>
lastProxyfied.current.state,
nextState,
<<<<<<<
export const useReduxSelectors = (selectorMap) => {
const forceUpdate = useForceUpdate();
// redux store
const store = useContext(ReduxStoreContext);
// redux state
const state = store.getState();
// keys
const keys = Object.keys(selectorMap);
// cache
const cacheRef = useRef({
proxyfied: new WeakMap(),
});
// proxyfied
const proxyfiedMap = createMap(keys, (key) => {
const selector = selectorMap[key];
if (cacheRef.current.proxyfied.has(selector)) {
const cached = cacheRef.current.proxyfied.get(selector);
delete cached.trappedState; // we don't track this time.
cached.originalState = state;
return cached;
}
const proxyfied = createProxyfied(state);
cacheRef.current.proxyfied.set(selector, proxyfied);
return proxyfied;
});
// mapped
const mapped = createMap(keys, (key) => {
const proxyfied = proxyfiedMap[key];
const partialState = selectorMap[key](proxyfied.trappedState || proxyfied.originalState);
return createProxyfied(partialState);
});
// update ref
const lastProxyfied = useRef(null);
useEffect(() => {
const affected = [];
keys.forEach((key) => {
if (mapped[key].affected.length) {
affected.push(...proxyfiedMap[key].affected);
}
});
lastProxyfied.current = {
originalState: state,
affected: collectValuables(affected),
};
});
// subscription
useEffect(() => {
const callback = () => {
const changed = !proxyCompare(
lastProxyfied.current.originalState,
store.getState(),
lastProxyfied.current.affected,
);
drainDifference();
if (changed) {
forceUpdate();
}
};
// run once in case the state is already changed
callback();
const unsubscribe = store.subscribe(callback);
return unsubscribe;
}, [store]); // eslint-disable-line react-hooks/exhaustive-deps
return createMap(keys, key => mapped[key].trappedState || mapped[key].originalState);
};
=======
>>>>>>>
export const useReduxSelectors = (selectorMap) => {
const forceUpdate = useForceUpdate();
// redux store
const store = useContext(ReduxStoreContext);
// redux state
const state = store.getState();
// keys
const keys = Object.keys(selectorMap);
// cache
const cacheRef = useRef({
proxyfied: new WeakMap(),
});
// proxyfied
const proxyfiedMap = createMap(keys, (key) => {
const selector = selectorMap[key];
if (cacheRef.current.proxyfied.has(selector)) {
const cached = cacheRef.current.proxyfied.get(selector);
delete cached.trappedState; // we don't track this time.
cached.originalState = state;
return cached;
}
const proxyfied = createProxyfied(state);
cacheRef.current.proxyfied.set(selector, proxyfied);
return proxyfied;
});
// mapped
const mapped = createMap(keys, (key) => {
const proxyfied = proxyfiedMap[key];
const partialState = selectorMap[key](proxyfied.trappedState || proxyfied.originalState);
return createProxyfied(partialState);
});
// update ref
const lastProxyfied = useRef(null);
useLayoutEffect(() => {
const affected = [];
keys.forEach((key) => {
if (mapped[key].affected.length) {
affected.push(...proxyfiedMap[key].affected);
}
});
lastProxyfied.current = {
originalState: state,
affected: collectValuables(affected),
};
});
// subscription
useEffect(() => {
const callback = () => {
const changed = !proxyCompare(
lastProxyfied.current.originalState,
store.getState(),
lastProxyfied.current.affected,
);
drainDifference();
if (changed) {
forceUpdate();
}
};
// run once in case the state is already changed
callback();
const unsubscribe = store.subscribe(callback);
return unsubscribe;
}, [store]); // eslint-disable-line react-hooks/exhaustive-deps
return createMap(keys, key => mapped[key].trappedState || mapped[key].originalState);
}; |
<<<<<<<
/**
* Update file name if necessary
*/
function _onFileNameChange(e, oldName, newName) {
if (_currentlyViewedPath === oldName) {
_setCurrentlyViewedPath(newName);
}
}
=======
/**
* Return the provider of a custom viewer for the given path if one exists.
* Otherwise, return null.
*
* @param {!string} fullPath - file path to be checked for a custom viewer
* @return {?Object}
*/
function getCustomViewerForPath(fullPath) {
var lang = LanguageManager.getLanguageForPath(fullPath);
if (lang.getId() === "image") {
// TODO: Extensibility
// For now we only have the image viewer, so just return ImageViewer object.
// Once we have each viewer registers with EditorManager as a provider,
// then we return the provider registered with the language id.
return ImageViewer;
}
return null;
}
>>>>>>>
/**
* Update file name if necessary
*/
function _onFileNameChange(e, oldName, newName) {
if (_currentlyViewedPath === oldName) {
_setCurrentlyViewedPath(newName);
}
}
/**
* Return the provider of a custom viewer for the given path if one exists.
* Otherwise, return null.
*
* @param {!string} fullPath - file path to be checked for a custom viewer
* @return {?Object}
*/
function getCustomViewerForPath(fullPath) {
var lang = LanguageManager.getLanguageForPath(fullPath);
if (lang.getId() === "image") {
// TODO: Extensibility
// For now we only have the image viewer, so just return ImageViewer object.
// Once we have each viewer registers with EditorManager as a provider,
// then we return the provider registered with the language id.
return ImageViewer;
}
return null;
} |
<<<<<<<
exports.isTextFile = isTextFile;
=======
exports.getDirectoryPath = getDirectoryPath;
>>>>>>>
exports.getDirectoryPath = getDirectoryPath;
exports.isTextFile = isTextFile; |
<<<<<<<
var CLICK_RENAME_MINIMUM = 500,
MIDDLE_MOUSE_BUTTON = 2;
=======
var CLICK_RENAME_MINIMUM = 500,
LEFT_MOUSE_BUTTON = 0;
>>>>>>>
var CLICK_RENAME_MINIMUM = 500,
MIDDLE_MOUSE_BUTTON = 2,
LEFT_MOUSE_BUTTON = 0;
<<<<<<<
// If we're renaming, allow the click to go through to the rename input.
if (this.props.entry.get("rename")) {
return true;
}
=======
if (e.button !== LEFT_MOUSE_BUTTON) {
return;
}
>>>>>>>
// If we're renaming, allow the click to go through to the rename input.
if (this.props.entry.get("rename")) {
return true;
}
if (e.button !== LEFT_MOUSE_BUTTON) {
return;
} |
<<<<<<<
SpecRunnerUtils = require("spec/SpecRunnerUtils"),
FileSystem = require("filesystem/FileSystem"),
FileSystemError = require("filesystem/FileSystemError"),
FileUtils = require("file/FileUtils"),
Async = require("utils/Async"),
Strings = require("strings"),
_ = require("thirdparty/lodash");
var promisify = Async.promisify; // for convenience
=======
SpecRunnerUtils = require("spec/SpecRunnerUtils"),
StringUtils = require("utils/StringUtils"),
Strings = require("strings");
>>>>>>>
SpecRunnerUtils = require("spec/SpecRunnerUtils"),
FileSystem = require("filesystem/FileSystem"),
FileSystemError = require("filesystem/FileSystemError"),
FileUtils = require("file/FileUtils"),
Async = require("utils/Async"),
LanguageManager = require("language/LanguageManager"),
StringUtils = require("utils/StringUtils"),
Strings = require("strings"),
_ = require("thirdparty/lodash");
var promisify = Async.promisify; // for convenience
<<<<<<<
it("should find all occurences in folder", function () {
var dirEntry = FileSystem.getDirectoryForPath(testPath + "/css/");
openSearchBar(dirEntry);
=======
it("should ignore binary files", function () {
var $dlg, actualMessage, expectedMessage,
exists = false,
done = false,
imageDirPath = testPath + "/images";
runs(function () {
// Set project to have only images
SpecRunnerUtils.loadProjectInTestWindow(imageDirPath);
// Verify an image exists in folder
var file = FileSystem.getFileForPath(testPath + "/images/icon_twitter.png");
file.exists(function (fileError, fileExists) {
exists = fileExists;
done = true;
});
});
waitsFor(function () {
return done;
}, "file.exists");
runs(function () {
expect(exists).toBe(true);
openSearchBar();
});
runs(function () {
// Launch filter editor
$(".filter-picker button").click();
// Dialog should state there are 0 files in project
$dlg = $(".modal");
expectedMessage = StringUtils.format(Strings.FILTER_FILE_COUNT_ALL, 0, Strings.FIND_IN_FILES_NO_SCOPE);
});
// Message loads asynchronously, but dialog should evetually state: "Allows all 0 files in project"
waitsFor(function () {
actualMessage = $dlg.find(".exclusions-filecount").text();
return (actualMessage === expectedMessage);
}, "display file count");
runs(function () {
// Dismiss filter dialog
$dlg.find(".btn.primary").click();
// Close search bar
var $searchField = $(".modal-bar #find-group input");
SpecRunnerUtils.simulateKeyEvent(KeyEvent.DOM_VK_ESCAPE, "keydown", $searchField[0]);
});
runs(function () {
// Set project back to main test folder
SpecRunnerUtils.loadProjectInTestWindow(testPath);
});
});
it("should find all occurences in folder", function () {
var dirEntry = FileSystem.getDirectoryForPath(testPath + "/css/");
openSearchBar(dirEntry);
runs(function () {
>>>>>>>
it("should ignore binary files", function () {
var $dlg, actualMessage, expectedMessage,
exists = false,
done = false,
imageDirPath = testPath + "/images";
runs(function () {
// Set project to have only images
SpecRunnerUtils.loadProjectInTestWindow(imageDirPath);
// Verify an image exists in folder
var file = FileSystem.getFileForPath(testPath + "/images/icon_twitter.png");
file.exists(function (fileError, fileExists) {
exists = fileExists;
done = true;
});
});
waitsFor(function () {
return done;
}, "file.exists");
runs(function () {
expect(exists).toBe(true);
openSearchBar();
});
runs(function () {
// Launch filter editor
$(".filter-picker button").click();
// Dialog should state there are 0 files in project
$dlg = $(".modal");
expectedMessage = StringUtils.format(Strings.FILTER_FILE_COUNT_ALL, 0, Strings.FIND_IN_FILES_NO_SCOPE);
});
// Message loads asynchronously, but dialog should evetually state: "Allows all 0 files in project"
waitsFor(function () {
actualMessage = $dlg.find(".exclusions-filecount").text();
return (actualMessage === expectedMessage);
}, "display file count");
runs(function () {
// Dismiss filter dialog
$dlg.find(".btn.primary").click();
// Close search bar
var $searchField = $(".modal-bar #find-group input");
SpecRunnerUtils.simulateKeyEvent(KeyEvent.DOM_VK_ESCAPE, "keydown", $searchField[0]);
});
runs(function () {
// Set project back to main test folder
SpecRunnerUtils.loadProjectInTestWindow(testPath);
});
});
it("should find all occurences in folder", function () {
var dirEntry = FileSystem.getDirectoryForPath(testPath + "/css/");
openSearchBar(dirEntry);
<<<<<<<
runs(function () {
var fileResults = FindInFiles._searchResults[filePath];
expect(fileResults).toBeTruthy();
expect($("#search-results").is(":visible")).toBeTruthy();
expect($(".modal-bar").length).toBe(0);
});
=======
runs(function () {
var fileResults = FindInFiles._searchResults[filePath];
expect(fileResults).toBeTruthy();
expect($("#find-in-files-results").is(":visible")).toBeTruthy();
expect($(".modal-bar").length).toBe(0);
>>>>>>>
runs(function () {
var fileResults = FindInFiles._searchResults[filePath];
expect(fileResults).toBeTruthy();
expect($("#find-in-files-results").is(":visible")).toBeTruthy();
expect($(".modal-bar").length).toBe(0);
});
<<<<<<<
expect($("#search-results").is(":visible")).toBeFalsy();
expect($(".modal-bar").length).toBe(1);
=======
expect($("#find-in-files-results").is(":visible")).toBeFalsy();
expect($(".modal-bar").length).toBe(1);
>>>>>>>
expect($("#find-in-files-results").is(":visible")).toBeFalsy();
expect($(".modal-bar").length).toBe(1);
<<<<<<<
// Get panel
var $searchResults = $("#search-results");
expect($searchResults.is(":visible")).toBeTruthy();
=======
// Get panel
var $searchResults = $("#find-in-files-results");
expect($searchResults.is(":visible")).toBeTruthy();
>>>>>>>
// Get panel
var $searchResults = $("#find-in-files-results");
expect($searchResults.is(":visible")).toBeTruthy();
<<<<<<<
// Get list in panel
var $panelResults = $("#search-results table.bottom-panel-table tr");
expect($panelResults.length).toBe(5); // 4 hits + 1 file section
=======
// Get list in panel
var $panelResults = $("#find-in-files-results table.bottom-panel-table tr");
expect($panelResults.length).toBe(5); // 4 hits + 1 file section
>>>>>>>
// Get list in panel
var $panelResults = $("#find-in-files-results table.bottom-panel-table tr");
expect($panelResults.length).toBe(5); // 4 hits + 1 file section
<<<<<<<
runs(function () {
// Verify current selection
var editor = EditorManager.getActiveEditor();
expect(editor.getSelectedText().toLowerCase()).toBe("foo");
=======
// Get list in panel
$panelResults = $("#find-in-files-results table.bottom-panel-table tr");
expect($panelResults.length).toBe(panelListLen);
>>>>>>>
runs(function () {
// Verify current selection
var editor = EditorManager.getActiveEditor();
expect(editor.getSelectedText().toLowerCase()).toBe("foo"); |
<<<<<<<
=======
},
function (error) {
$("#img-data").html(dimensionString);
>>>>>>> |
<<<<<<<
case STATE_INSTALL_CANCELLED:
if (newState === STATE_INSTALL_CANCELLED) {
// TODO: do we need to wait for acknowledgement? That will require adding a new
// "waiting for cancelled" state.
var success = this._installer.cancel();
console.assert(success);
}
=======
case STATE_INSTALL_CANCELED:
this.$spinner.removeClass("spin");
>>>>>>>
case STATE_INSTALL_CANCELED:
<<<<<<<
// TODO: nicer formatting, especially for validation errors where there might be > 1 error code
msg = Strings.INSTALL_FAILED;
=======
msg = Strings.INSTALL_FAILED + "\n" + this._errorMessage;
>>>>>>>
msg = Strings.INSTALL_FAILED; |
<<<<<<<
=======
/**
* @private
* @type{?jQuery.Promise}
* Holds the most recent promise from startServer(). Used in
* StaticServerProvider.readyToServe
*/
var _serverStartupPromise = null;
/**
* @private
* @type{StaticServerProvider}
* Stores the singleton StaticServerProvider for use in unit testing.
*/
var _staticServerProvider;
/**
* @private
* Calls staticServer.getServer to start a new server at the project root
*
* @return promise which is:
* - rejected if there is no node connection
* - resolved when staticServer.getServer() callback returns
*/
function startServer() {
var deferred = $.Deferred();
if (_nodeConnection) {
var projectPath = ProjectManager.getProjectRoot().fullPath;
_nodeConnection.domains.staticServer.getServer(
projectPath
).done(function (address) {
_baseUrl = "http://" + address.address + ":" + address.port + "/";
deferred.resolve();
}).fail(function () {
_baseUrl = "";
deferred.reject();
});
} else {
deferred.reject();
}
return deferred.promise();
}
>>>>>>>
/**
* @private
* @type{?jQuery.Promise}
* Holds the most recent promise from startServer(). Used in
* StaticServerProvider.readyToServe
*/
var _serverStartupPromise = null;
/**
* @private
* @type{StaticServerProvider}
* Stores the singleton StaticServerProvider for use in unit testing.
*/
var _staticServerProvider;
/**
* @private
* Calls staticServer.getServer to start a new server at the project root
*
* @return promise which is:
* - rejected if there is no node connection
* - resolved when staticServer.getServer() callback returns
*/
function startServer() {
var deferred = $.Deferred();
if (_nodeConnection) {
var projectPath = ProjectManager.getProjectRoot().fullPath;
_nodeConnection.domains.staticServer.getServer(
projectPath
).done(function (address) {
_baseUrl = "http://" + address.address + ":" + address.port + "/";
deferred.resolve();
}).fail(function () {
_baseUrl = "";
deferred.reject();
});
} else {
deferred.reject();
}
return deferred.promise();
}
<<<<<<<
=======
// projectOpen event handler
function _projectOpen() {
_serverStartupPromise = startServer();
}
/**
* @private
* @return {StaticServerProvider} The singleton StaticServerProvider initialized
* on app ready.
*/
function _getStaticServerProvider() {
return _staticServerProvider;
}
>>>>>>>
/**
* @private
* @return {StaticServerProvider} The singleton StaticServerProvider initialized
* on app ready.
*/
function _getStaticServerProvider() {
return _staticServerProvider;
} |
<<<<<<<
/// Copyright (c) <%= new Date().getFullYear() %> Fazli Sapuan, Matthew Saw and Eugene Cheah
///
=======
/// Copyright (c) <%= new Date().getFullYear() %> gpu.js Team
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/// THE SOFTWARE.
///
/// Making sure the parser, and all the various messy class files
/// have proper closure, and does not leak out
GPU = (function() {
>>>>>>>
/// Copyright (c) <%= new Date().getFullYear() %> gpu.js Team
/// |
<<<<<<<
function u(){}
u.BASE_URL = 'https://api.stormpath.com/v1';
/** adds '/v1' to relative URL, to work with nock request mocker */
u.v1 = function(s){return '/v1' + s;};
=======
function random(){
return '' + Math.random()*Date.now();
}
>>>>>>>
function u(){}
u.BASE_URL = 'https://api.stormpath.com/v1';
/** adds '/v1' to relative URL, to work with nock request mocker */
u.v1 = function(s){return '/v1' + s;};
function random(){
return '' + Math.random()*Date.now();
} |
<<<<<<<
app.get('/login/:token', mw.ga, mw.addTitle('Open Collective'), render);
app.get('/login', mw.ga, mw.addTitle('Open Collective Login'), render);
=======
app.get('/', mw.ga, mw.addTitle('OpenCollective - Collect and disburse money transparently'), render);
>>>>>>>
app.get('/', mw.ga, mw.addTitle('OpenCollective - Collect and disburse money transparently'), render);
app.get('/login/:token', mw.ga, mw.addTitle('Open Collective'), render);
app.get('/login', mw.ga, mw.addTitle('Open Collective Login'), render);
<<<<<<<
app.get('/connect/:service(github)', mw.ga, render);
app.get('/subscriptions', mw.ga, mw.addTitle('My Subscriptions'), render);
=======
app.get('/connect/github', mw.ga, render);
app.get('/:slug/connect/twitter', mw.ga, render);
app.get('/subscriptions/:token', mw.ga, mw.fetchSubscriptionsByUserWithToken, mw.addTitle('My Subscriptions'), render);
app.get('/subscriptions', mw.ga, mw.fetchSubscriptionsByUserWithToken, mw.addTitle('My Subscriptions'), render);
>>>>>>>
app.get('/connect/github', mw.ga, render);
app.get('/:slug/connect/twitter', mw.ga, render);
app.get('/subscriptions', mw.ga, mw.addTitle('My Subscriptions'), render); |
<<<<<<<
/**
* Authentication
*/
app.get('/api/auth/:service(github)', aN.authenticateService);
app.get('/auth/:service(github)/callback', aN.authenticateServiceCallback);
=======
// For some reason during OAuth, the redirect through piping automatically changes
// the body, but not the window location -> instead redirect manually
app.all('/api/connected-accounts/github', (req, res) => {
req.pipe(request(apiUrl(req.url))
.on('response', () => res.redirect(req._readableState.pipes.uri.href)));
});
>>>>>>>
// For some reason during OAuth, the redirect through piping automatically changes
// the body, but not the window location -> instead redirect manually
app.all('/api/connected-accounts/github', (req, res) => {
req.pipe(request(apiUrl(req.url))
.on('response', () => res.redirect(req._readableState.pipes.uri.href)));
});
<<<<<<<
app.get('/github/apply/:token', mw.ga, mw.extractGithubUsernameFromToken, mw.addTitle('Sign up your Github repository'), render);
app.get('/github/apply', mw.ga, mw.addTitle('Sign up your Github repository'), render);
=======
app.get('/github/apply', mw.ga, mw.addTitle('Open Source Collective'), render);
app.get('/connect/:service(github)', mw.ga, render);
>>>>>>>
app.get('/github/apply/:token', mw.ga, mw.extractGithubUsernameFromToken, mw.addTitle('Sign up your Github repository'), render);
app.get('/github/apply', mw.ga, mw.addTitle('Sign up your Github repository'), render);
app.get('/connect/:service(github)', mw.ga, render); |
<<<<<<<
const versionResult = execa(
'npm',
['version', version, '--userconfig', npmrc, '--no-git-tag-version', '--allow-same-version'],
{
cwd: basePath,
env,
}
);
versionResult.stdout.pipe(
stdout,
{end: false}
);
versionResult.stderr.pipe(
stderr,
{end: false}
);
=======
const versionResult = execa('npm', ['version', version, '--userconfig', npmrc, '--no-git-tag-version'], {
cwd: basePath,
env,
});
versionResult.stdout.pipe(stdout, {end: false});
versionResult.stderr.pipe(stderr, {end: false});
>>>>>>>
const versionResult = execa(
'npm',
['version', version, '--userconfig', npmrc, '--no-git-tag-version', '--allow-same-version'],
{
cwd: basePath,
env,
}
);
versionResult.stdout.pipe(stdout, {end: false});
versionResult.stderr.pipe(stderr, {end: false}); |
<<<<<<<
WorkflowManager.androidDownload(url, filename, rev, length);
},
"click [name='ins_attach_isNode']": function (event, template, attachVersion) {
// var url = Meteor.absoluteUrl("api/files/instances/") + attachVersion._rev + "/" + attachVersion.filename;
var furl = event.target.dataset.downloadurl;
var filename = template.data.current.filename;
var os = require('os');
// 判断当前操作系统
var platform = os.platform();
if (platform == 'darwin'){
window.location.href = furl;
}else{
SteedosOffice.editFile(furl,filename);
}
}
=======
Steedos.androidDownload(url, filename, rev, length);
},
"click [name='ins_attach_edit']": function (event, template) {
Session.set("attach_id", event.target.id);
Modal.show('ins_attach_edit_modal');
},
>>>>>>>
Steedos.androidDownload(url, filename, rev, length);
},
"click [name='ins_attach_isNode']": function (event, template, attachVersion) {
// var url = Meteor.absoluteUrl("api/files/instances/") + attachVersion._rev + "/" + attachVersion.filename;
var furl = event.target.dataset.downloadurl;
var filename = template.data.current.filename;
var os = require('os');
// 判断当前操作系统
var platform = os.platform();
if (platform == 'darwin'){
window.location.href = furl;
}else{
SteedosOffice.editFile(furl,filename);
}
},
"click [name='ins_attach_edit']": function (event, template) {
Session.set("attach_id", event.target.id);
Modal.show('ins_attach_edit_modal');
},
<<<<<<<
url = Meteor.absoluteUrl("api/files/instances/") + attachVersion._rev + "/" + attachVersion.filename;
if (!Steedos.isMobile())
=======
// url = Meteor.absoluteUrl("api/files/instances/") + attachVersion._rev + "/" + attachVersion.filename;
url = Meteor.absoluteUrl("api/files/instances/") + attachVersion._rev;
if (!Steedos.isMobile())
>>>>>>>
// url = Meteor.absoluteUrl("api/files/instances/") + attachVersion._rev + "/" + attachVersion.filename;
url = Meteor.absoluteUrl("api/files/instances/") + attachVersion._rev;
if (!Steedos.isMobile()) |
<<<<<<<
api.use('steedos:[email protected]');
api.use('steedos:[email protected]');
api.use('steedos:[email protected]_4');
=======
api.use('steedos:[email protected]_6');
>>>>>>>
api.use('steedos:[email protected]');
api.use('steedos:[email protected]');
api.use('steedos:[email protected]_6'); |
<<<<<<<
WorkflowManager.canAdd = function(fl, curSpaceUser, organization) {
=======
WorkflowManager.canAdd = function (fl, curSpaceUser, organizations) {
>>>>>>>
WorkflowManager.getCategoriesForms = function(categorieId) {
var re = new Array();
var forms = db.forms.find({
category: categorieId,
state: "enabled"
});
forms.forEach(function(f) {
re.push(f)
});
return re;
};
WorkflowManager.getUnCategoriesForms = function() {
var re = new Array();
var forms = db.forms.find({
category: {
$in: [null, ""]
},
state: "enabled"
});
forms.forEach(function(f) {
re.push(f)
});
return re;
};
WorkflowManager.getFormFlows = function(formId) {
var re = new Array();
var flows = db.flows.find({
form: formId,
state: "enabled"
})
flows.forEach(function(f) {
re.push(f)
});
return re;
};
WorkflowManager.getSpaceFlows = function(spaceId) {
var re = new Array();
var r = db.flows.find();
r.forEach(function(c) {
re.push(c);
});
return re;
};
WorkflowManager.canAdd = function(fl, curSpaceUser, organizations) {
<<<<<<<
WorkflowManager.canAdmin = function(fl, curSpaceUser, organization) {
=======
WorkflowManager.canAdmin = function (fl, curSpaceUser, organizations) {
>>>>>>>
WorkflowManager.canAdmin = function(fl, curSpaceUser, organizations) {
<<<<<<<
WorkflowManager.canMonitor = function(fl, curSpaceUser, organization) {
=======
WorkflowManager.canMonitor = function (fl, curSpaceUser, organizations) {
>>>>>>>
WorkflowManager.canMonitor = function(fl, curSpaceUser, organizations) {
<<<<<<<
var curSpaceUser = db.space_users.findOne({
space: spaceId,
'user': curUserId
});
var organization = db.organizations.findOne(curSpaceUser.organization);
=======
var curSpaceUser = db.space_users.findOne({space: spaceId, 'user': curUserId});
var organizations = db.organizations.find({_id: {$in: curSpaceUser.organizations}}).fetch();
>>>>>>>
var curSpaceUser = db.space_users.findOne({
space: spaceId,
'user': curUserId
});
var organizations = db.organizations.find({
_id: {
$in: curSpaceUser.organizations
}
}).fetch(); |
<<<<<<<
"weixin-pay": "1.1.7",
"xml2js": "0.4.17"
=======
mkdirp: "0.3.5"
>>>>>>>
"weixin-pay": "1.1.7",
"xml2js": "0.4.17"
mkdirp: "0.3.5" |
<<<<<<<
api.addFiles('lib/models/billing_pay_records.coffee');
=======
api.addFiles('lib/models/space_settings.coffee');
>>>>>>>
api.addFiles('lib/models/billing_pay_records.coffee');
api.addFiles('lib/models/space_settings.coffee'); |
<<<<<<<
import VaSlider from './vuestic-components/va-slider/VaSlider.vue'
=======
>>>>>>>
<<<<<<<
import VaDatePicker
from './vuestic-components/va-date-picker/VaDatePicker'
import Card from './vuestic-components/vuestic-card/VuesticCard'
=======
import DatePicker
from './vuestic-components/vuestic-date-picker/VuesticDatePicker'
>>>>>>>
import VaDatePicker
from './vuestic-components/va-date-picker/VaDatePicker' |
<<<<<<<
model.get('errors').add('meta_title', '优化标题不能超过 150 个字符。');
=======
model.get('errors').add('metaTitle', 'Meta Title cannot be longer than 150 characters.');
>>>>>>>
model.get('errors').add('metaTitle', '优化标题不能超过 150 个字符。');
<<<<<<<
model.get('errors').add('meta_description', '优化描述不能超过 200 个字符。');
=======
model.get('errors').add('metaDescription', 'Meta Description cannot be longer than 200 characters.');
>>>>>>>
model.get('errors').add('metaDescription', '优化描述不能超过 200 个字符。'); |
<<<<<<<
export const MEDIUM_SCREEN_WIDTH = 992;
export const APP_CONTAINER_MAX_WIDTH = 1400;
export const IDEA_PREVIEW_MAX_WIDTH = 350;
// export const IDEA_PREVIEW_MIN_WIDTH = 280;
export const NB_IDEA_PREVIEW_TO_SHOW = 4;
export const APP_CONTAINER_PADDING = 15;
=======
export const MEDIUM_SCREEN_WIDTH = 992;
export const PublicationStates = {
DRAFT: 'DRAFT',
SUBMITTED_IN_EDIT_GRACE_PERIOD: 'SUBMITTED_IN_EDIT_GRACE_PERIOD',
PUBLISHED: 'PUBLISHED',
MODERATED_TEXT_ON_DEMAND: 'MODERATED_TEXT_ON_DEMAND',
MODERATED_TEXT_NEVER_AVAILABLE: 'MODERATED_TEXT_NEVER_AVAILABLE',
DELETED_BY_USER: 'DELETED_BY_USER',
DELETED_BY_ADMIN: 'DELETED_BY_ADMIN'
};
export const BlockingPublicationStates = {};
BlockingPublicationStates[PublicationStates.MODERATED_TEXT_NEVER_AVAILABLE] = PublicationStates.MODERATED_TEXT_NEVER_AVAILABLE;
BlockingPublicationStates[PublicationStates.DELETED_BY_USER] = PublicationStates.DELETED_BY_USER;
BlockingPublicationStates[PublicationStates.DELETED_BY_ADMIN] = PublicationStates.DELETED_BY_ADMIN;
export const ModeratedPublicationStates = {};
ModeratedPublicationStates[PublicationStates.MODERATED_TEXT_NEVER_AVAILABLE] = PublicationStates.MODERATED_TEXT_NEVER_AVAILABLE;
ModeratedPublicationStates[PublicationStates.MODERATED_TEXT_ON_DEMAND] = PublicationStates.MODERATED_TEXT_ON_DEMAND;
export const DeletedPublicationStates = {};
DeletedPublicationStates[PublicationStates.DELETED_BY_USER] = PublicationStates.DELETED_BY_USER;
DeletedPublicationStates[PublicationStates.DELETED_BY_ADMIN] = PublicationStates.DELETED_BY_ADMIN;
>>>>>>>
export const MEDIUM_SCREEN_WIDTH = 992;
export const APP_CONTAINER_MAX_WIDTH = 1400;
export const IDEA_PREVIEW_MAX_WIDTH = 350;
// export const IDEA_PREVIEW_MIN_WIDTH = 280;
export const NB_IDEA_PREVIEW_TO_SHOW = 4;
export const APP_CONTAINER_PADDING = 15;
export const PublicationStates = {
DRAFT: 'DRAFT',
SUBMITTED_IN_EDIT_GRACE_PERIOD: 'SUBMITTED_IN_EDIT_GRACE_PERIOD',
PUBLISHED: 'PUBLISHED',
MODERATED_TEXT_ON_DEMAND: 'MODERATED_TEXT_ON_DEMAND',
MODERATED_TEXT_NEVER_AVAILABLE: 'MODERATED_TEXT_NEVER_AVAILABLE',
DELETED_BY_USER: 'DELETED_BY_USER',
DELETED_BY_ADMIN: 'DELETED_BY_ADMIN'
};
export const BlockingPublicationStates = {};
BlockingPublicationStates[PublicationStates.MODERATED_TEXT_NEVER_AVAILABLE] = PublicationStates.MODERATED_TEXT_NEVER_AVAILABLE;
BlockingPublicationStates[PublicationStates.DELETED_BY_USER] = PublicationStates.DELETED_BY_USER;
BlockingPublicationStates[PublicationStates.DELETED_BY_ADMIN] = PublicationStates.DELETED_BY_ADMIN;
export const ModeratedPublicationStates = {};
ModeratedPublicationStates[PublicationStates.MODERATED_TEXT_NEVER_AVAILABLE] = PublicationStates.MODERATED_TEXT_NEVER_AVAILABLE;
ModeratedPublicationStates[PublicationStates.MODERATED_TEXT_ON_DEMAND] = PublicationStates.MODERATED_TEXT_ON_DEMAND;
export const DeletedPublicationStates = {};
DeletedPublicationStates[PublicationStates.DELETED_BY_USER] = PublicationStates.DELETED_BY_USER;
DeletedPublicationStates[PublicationStates.DELETED_BY_ADMIN] = PublicationStates.DELETED_BY_ADMIN; |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
_readFile(file, callback) {
const reader = new FileReader();
reader.onload = (event) => {
const data = event.target.result;
callback(data)
}
reader.readAsDataURL(file)
},
>>>>>>>
<<<<<<<
return this._readFile(src, () => {
this._crop(src, source, options, callback);
});
=======
return this._readFile(src, (data) => {
this._crop(data, source, options, callback);
})
>>>>>>>
return this._readFile(src, (data) => {
this._crop(data, source, options, callback);
})
<<<<<<<
rotate(source, degree, callback) {
const { src, type } = this._getSrc(source);
=======
rotate (source, degree, callback) {
const { src, type } = this._getSrc(source);
>>>>>>>
rotate(source, degree, callback) {
const { src, type } = this._getSrc(source);
<<<<<<<
=======
>>>>>>>
<<<<<<<
if (degree === 90 || degree === 270) {
=======
if (degree == 90 || degree == 270) {
>>>>>>>
if (degree === 90 || degree === 270) {
<<<<<<<
ctx.rotate((degree * Math.PI) / 180);
ctx.drawImage(image, -image.naturalWidth / 2, -image.naturalHeight / 2);
=======
ctx.rotate(degree * Math.PI / 180);
ctx.drawImage(image, -image.naturalWidth / 2, -image.naturalHeight / 2);
>>>>>>>
ctx.rotate((degree * Math.PI) / 180);
ctx.drawImage(image, -image.naturalWidth / 2, -image.naturalHeight / 2);
<<<<<<<
=======
_isVideoElement(el) {
return (typeof el === 'object' && el.tagName === 'VIDEO');
},
>>>>>>>
_isVideoElement(el) {
return (typeof el === 'object' && el.tagName === 'VIDEO');
},
<<<<<<<
=======
>>>>>>> |
<<<<<<<
'router.async.router': 'first',
'router.sync.router': 'first', // TODO rm
'styles.css': 'reduce',
=======
'router.sync.router': 'first',
>>>>>>>
<<<<<<<
// Catch errors
// TODO - change this error handler error page annomaly
// Note I'm still using a sync router just to ge this working (mix)
var { container: errorPage, addError } = api.router.sync.router('/errors')
window.addEventListener('error', ev => {
if (!tabs.has('/errors')) tabs.add(errorPage, true)
addError(ev.error || ev)
})
/// /// TODO - extract this to keep patch-lite isolated from electron
const { getCurrentWebContents, getCurrentWindow } = electron.remote
window.addEventListener('resize', () => {
var wc = getCurrentWebContents()
wc && wc.getZoomFactor((zf) => {
api.settings.sync.set({
electron: {
zoomFactor: zf,
windowBounds: getCurrentWindow().getBounds()
}
})
})
})
var zoomFactor = api.settings.sync.get('electron.zoomFactor')
if (zoomFactor) { getCurrentWebContents().setZoomFactor(zoomFactor) }
var bounds = api.settings.sync.get('electron.windowBounds')
if (bounds) { getCurrentWindow().setBounds(bounds) }
/// ///
=======
>>>>>>> |
<<<<<<<
.use(require('ssb-server/plugins/onion'))
=======
.use(require('ssb-server/plugins/local'))
.use(require('ssb-gossip'))
.use(require('ssb-replicate'))
.use(require('ssb-friends'))
.use(require('ssb-invite'))
.use(require('ssb-blobs'))
.use(require('ssb-ws'))
>>>>>>>
.use(require('ssb-server/plugins/onion'))
.use(require('ssb-server/plugins/local'))
.use(require('ssb-gossip'))
.use(require('ssb-replicate'))
.use(require('ssb-friends'))
.use(require('ssb-invite'))
.use(require('ssb-blobs'))
.use(require('ssb-ws'))
<<<<<<<
.use(require('ssb-friends'))
.use(require('ssb-friend-pub'))
=======
>>>>>>>
.use(require('ssb-friend-pub')) |
<<<<<<<
THREADED: {
id: "threaded",
label: i18n._('Threaded view')
},
CHRONOLOGICAL: {
id: "chronological",
label: i18n._('Chronological view')
},
REVERSE_CHRONOLOGICAL: {
id: "reverse_chronological",
label: i18n._('Activity feed view')
}
=======
THREADED: {id: "threaded",
label: i18n._('Threaded view')
},
CHRONOLOGICAL: {id: "chronological",
label: i18n._('Chronological view')
},
REVERSE_CHRONOLOGICAL: {id: "reverse_chronological",
label: i18n._('Activity feed view')
}
>>>>>>>
THREADED: {
id: "threaded",
label: i18n._('Threaded view')
},
CHRONOLOGICAL: {
id: "chronological",
label: i18n._('Chronological view')
},
REVERSE_CHRONOLOGICAL: {
id: "reverse_chronological",
label: i18n._('Activity feed view')
}
<<<<<<<
=======
/*
console.log("messageIdsToDisplay is: ");
console.log(that.messageIdsToDisplay);
*/
>>>>>>>
<<<<<<<
=======
console.log("messageList:render() is firing, collection is: ");
this.messages.map(function(message){
console.log(message.getId())
})
>>>>>>>
console.log("messageList:render() is firing, collection is: ");
this.messages.map(function(message){
console.log(message.getId())
}) |
<<<<<<<
"relationships.js": require('./relationships.js'),
=======
"git.js": require('./git.js'),
>>>>>>>
"relationships.js": require('./relationships.js'),
"git.js": require('./git.js'), |
<<<<<<<
},
{
label: 'Check for updates',
click () {
checkForUpdates();
}
=======
},
{
type: 'separator'
},
{
label: 'About',
click () {
const version = app.getVersion();
const electronVersion = process.versions.electron;
const chromeVersion = process.versions.chrome;
const nodeVersion = process.versions.node;
const OSInfo = `${os.type()} ${os.arch()} ${os.release()}`;
const detail = `Version: ${version}\nElectron: ${electronVersion}\nChrome: ${chromeVersion}\nNode.js: ${nodeVersion}\nOS: ${OSInfo}`;
dialog.showMessageBox(BrowserWindow.getFocusedWindow(),
{
title: 'Time to Leave',
message: 'Time to Leave',
type: 'info',
detail: `\n${detail}`
});
}
>>>>>>>
},
{
label: 'Check for updates',
click () {
checkForUpdates();
}
},
{
type: 'separator'
},
{
label: 'About',
click () {
const version = app.getVersion();
const electronVersion = process.versions.electron;
const chromeVersion = process.versions.chrome;
const nodeVersion = process.versions.node;
const OSInfo = `${os.type()} ${os.arch()} ${os.release()}`;
const detail = `Version: ${version}\nElectron: ${electronVersion}\nChrome: ${chromeVersion}\nNode.js: ${nodeVersion}\nOS: ${OSInfo}`;
dialog.showMessageBox(BrowserWindow.getFocusedWindow(),
{
title: 'Time to Leave',
message: 'Time to Leave',
type: 'info',
detail: `\n${detail}`
});
} |
<<<<<<<
=======
languages: ['en', 'pt-BR', 'es', 'it', 'zh-TW', 'de-DE','hi', 'mr', 'pl', 'ko'],
>>>>>>> |
<<<<<<<
io.set('log level', 1);
app.use(methodOverride());
app.use(bodyParser());
app.use(cookieParser());
app.use(express.static(__dirname + '/client'));
app.use(errorhandler({
dumpExceptions: true,
showStack: true
}));
=======
app.configure(function() {
app.use(express.methodOverride());
app.use(express.bodyParser());
app.use(express.cookieParser());
app.use(express.static(__dirname + '/client'));
app.use(express.errorHandler({
dumpExceptions: true,
showStack: true
}));
app.use(app.router);
});
>>>>>>>
app.use(methodOverride());
app.use(bodyParser());
app.use(cookieParser());
app.use(express.static(__dirname + '/client'));
app.use(errorhandler({
dumpExceptions: true,
showStack: true
})); |
<<<<<<<
describe('Get A Contact By Id Batch', function(){
it('Should return a contact record based on a array of ids', function (done) {
client.contacts.getByIdBatch({
ids: [1, 2]
},function(err, data, res) {
if (err) { throw err; }
expect(res.statusCode).to.equal(200);
expect(res).to.be.defined;
done();
})
});
});
describe('Get A Contact By Email', function(){
it('Should return a contact record based on the email', function (done) {
client.contacts.getByEmail('[email protected]',function(err, data, res) {
if (err) { throw err; }
expect(res.statusCode).to.equal(200);
expect(data).to.be.defined;
expect(data.properties).to.be.defined;
done();
})
});
=======
describe('Get A Contact By Email', function(){
it('Should return a contact record based on the email', function (done) {
client.contacts.getByEmail('[email protected]',function(err, data, res) {
if (err) { throw err; }
expect(res.statusCode).to.equal(200);
expect(data).to.be.a('object');
expect(data.properties).to.be.a('object');
done();
})
>>>>>>>
describe('Get A Contact By Id Batch', function(){
it('Should return a contact record based on a array of ids', function (done) {
client.contacts.getByIdBatch({
ids: [1, 2]
},function(err, data, res) {
if (err) { throw err; }
expect(res.statusCode).to.equal(200);
expect(res).to.be.defined;
done();
})
});
});
describe('Get A Contact By Email', function(){
it('Should return a contact record based on the email', function (done) {
client.contacts.getByEmail('[email protected]',function(err, data, res) {
if (err) { throw err; }
expect(res.statusCode).to.equal(200);
expect(data).to.be.a('object');
expect(data.properties).to.be.a('object');
done();
})
}); |
<<<<<<<
await pubsub.publish( STREAM_CREATED, { userStreamCreated: { id: id, ...args.stream }, ownerId: context.userId } )
=======
await pubsub.publish( USER_STREAM_CREATED, { userStreamCreated: { id: id, ...args.stream }, ownerId: context.userId } )
>>>>>>>
await pubsub.publish( USER_STREAM_CREATED, { userStreamCreated: { id: id, ...args.stream }, ownerId: context.userId } )
<<<<<<<
await pubsub.publish( STREAM_DELETED, { userStreamDeleted: { streamId: args.id }, ownerId: context.userId } )
=======
>>>>>>>
<<<<<<<
userStreamCreated: {
subscribe: withFilter( () => pubsub.asyncIterator( [ STREAM_CREATED ] ),
( payload, variables ) => {
=======
userStreamCreated: {
subscribe: withFilter(
( ) => pubsub.asyncIterator( [ USER_STREAM_CREATED ] ),
( payload, variables, context, info ) => {
console.log( 'woot ' )
return payload.ownerId === variables.ownerId
} )
},
userStreamDeleted: {
subscribe: withFilter(
( ) => pubsub.asyncIterator( [ USER_STREAM_DELETED ] ),
( payload, variables, context, info ) => {
>>>>>>>
userStreamCreated: {
subscribe: withFilter( () => pubsub.asyncIterator( [ USER_STREAM_CREATED ] ),
( payload, variables ) => {
<<<<<<<
userStreamDeleted: {
subscribe: withFilter( () => pubsub.asyncIterator( [ STREAM_DELETED ] ),
=======
streamDeleted: {
subscribe: withFilter(
( ) => pubsub.asyncIterator( [ STREAM_DELETED ] ),
>>>>>>>
userStreamDeleted: {
subscribe: withFilter( () => pubsub.asyncIterator( [ USER_STREAM_DELETED ] ), |
<<<<<<<
const SpriteSmithPlugin = require('webpack-spritesmith');
=======
>>>>>>>
<<<<<<<
{test: /\.ts$/, loader: 'ts-loader'},
{test: /\.scss$/, loaders: ['style?insertAt=bottom', 'css?sourceMap', 'resolve-url', 'sass?sourceMap']},
{test: /\.(gif|svg|png|jpe?g|ttf|woff2?|eot)$/, loader: 'url?limit=8182'}
=======
{ test: /\.ts$/, loader: 'ts-loader' },
{ test: /\.scss$/, loaders: ['style?insertAt=bottom', 'css?sourceMap', 'resolve-url', 'sass?sourceMap'] },
{ test: /\.(gif|svg|png|jpe?g|ttf|woff2?|eot)$/, loader: 'url?limit=8182' }
>>>>>>>
{ test: /\.ts$/, loader: 'ts-loader' },
{ test: /\.scss$/, loaders: ['style?insertAt=bottom', 'css?sourceMap', 'resolve-url', 'sass?sourceMap'] },
{ test: /\.(gif|svg|png|jpe?g|ttf|woff2?|eot)$/, loader: 'url?limit=8182' } |
<<<<<<<
import ButtonsExample from './ButtonsExample';
import DividerExample from './DividerExample';
=======
import ButtonExample from './ButtonExample';
>>>>>>>
import ButtonExample from './ButtonExample';
import DividerExample from './DividerExample';
<<<<<<<
=======
card: CardExample,
button: ButtonExample,
>>>>>>> |
<<<<<<<
var genSelfSigned = function(hostname, outputKey, outputCert, callback) {
=======
exports.genSelfSigned = function(outputKey, outputCert, options, callback) {
>>>>>>>
var genSelfSigned = function(outputKey, outputCert, options, callback) {
<<<<<<<
*
* @param {String} hostname Hostname to be used as CN.
=======
>>>>>>>
<<<<<<<
var getCSR = function(hostname, inputKey, callback) {
=======
exports.genCSR = function(inputKey, outputCSR, options, callback) {
>>>>>>>
var genCSR = function(inputKey, outputCSR, options, callback) { |
<<<<<<<
};
exports['test_getExportedMember'] = function(test, assert) {
var modulePath = __filename;
async.parallel([
function testGetFailedToLoadModule(callback) {
misc.getExportedMember('/some/unknown/path-foo-bar', 'member', function(err, value) {
assert.ok(err);
assert.match(err.message, /failed to load module/i);
callback();
});
},
function testGetNull(callback) {
misc.getExportedMember(modulePath, 'member', function(err, value) {
assert.ifError(err);
assert.equal(value, null);
callback();
});
},
function testGetSuccess(callback) {
misc.getExportedMember(modulePath, 'test_getExportedMember', function(err, value) {
assert.ifError(err);
assert.ok((typeof value === 'function'));
callback();
});
},
function testGetRelativePath(callback) {
misc.getExportedMember('simple/util-misc.js', 'test_getExportedMember', function(err, value) {
assert.ifError(err);
assert.ok((typeof value === 'function'));
callback();
});
}
],
function(err) {
assert.ifError(err);
test.finish();
});
};
exports['test_filterObjectValues'] = function(test, assert) {
var obj = {
'foo': 'bar',
'bar': null,
'bar1': undefined,
'bar2': '',
'bar3': 3
};
var expectedObj = {
'foo': 'bar',
'bar2': '',
'bar3': 3
};
assert.deepEqual(misc.filterObjectValues(obj, [null, undefined]),
expectedObj);
test.finish();
=======
};
exports['test_filterList'] = function(test, assert) {
var i, len, item;
var values = [
[
[ {'a': 1}, {'a': 1}, {'c': 2}, {'d': '1'}, {'a': '1'} ],
[ {'a': 1}, {'a': 1} ],
[ 'a', 1]
],
[
[ {'a': 'a'}, {'a': 'b'}, {'a': 2}],
[ {'a': 'a'} ],
[ 'a', 'a' ]
]
];
for (i = 0, len = values.length; i < len; i++) {
item = values[i];
assert.deepEqual(misc.filterList(item[0], item[2][0], item[2][1]),
item[1]);
}
test.finish();
>>>>>>>
};
exports['test_getExportedMember'] = function(test, assert) {
var modulePath = __filename;
async.parallel([
function testGetFailedToLoadModule(callback) {
misc.getExportedMember('/some/unknown/path-foo-bar', 'member', function(err, value) {
assert.ok(err);
assert.match(err.message, /failed to load module/i);
callback();
});
},
function testGetNull(callback) {
misc.getExportedMember(modulePath, 'member', function(err, value) {
assert.ifError(err);
assert.equal(value, null);
callback();
});
},
function testGetSuccess(callback) {
misc.getExportedMember(modulePath, 'test_getExportedMember', function(err, value) {
assert.ifError(err);
assert.ok((typeof value === 'function'));
callback();
});
},
function testGetRelativePath(callback) {
misc.getExportedMember('simple/util-misc.js', 'test_getExportedMember', function(err, value) {
assert.ifError(err);
assert.ok((typeof value === 'function'));
callback();
});
}
],
function(err) {
assert.ifError(err);
test.finish();
});
};
exports['test_filterObjectValues'] = function(test, assert) {
var obj = {
'foo': 'bar',
'bar': null,
'bar1': undefined,
'bar2': '',
'bar3': 3
};
var expectedObj = {
'foo': 'bar',
'bar2': '',
'bar3': 3
};
assert.deepEqual(misc.filterObjectValues(obj, [null, undefined]),
expectedObj);
};
exports['test_filterList'] = function(test, assert) {
var i, len, item;
var values = [
[
[ {'a': 1}, {'a': 1}, {'c': 2}, {'d': '1'}, {'a': '1'} ],
[ {'a': 1}, {'a': 1} ],
[ 'a', 1]
],
[
[ {'a': 'a'}, {'a': 'b'}, {'a': 2}],
[ {'a': 'a'} ],
[ 'a', 'a' ]
]
];
for (i = 0, len = values.length; i < len; i++) {
item = values[i];
assert.deepEqual(misc.filterList(item[0], item[2][0], item[2][1]),
item[1]);
}
test.finish(); |
<<<<<<<
import vSwitch from './components/switch';
import { col, row } from './components/grid';
import spin from './components/spin';
import cascader from './components/cascader';
import input from './components/input';
import select from './components/select';
import timePicker from './components/timePicker';
import morePanel from './components/morePanel';
import radio from './components/radio';
import checkbox from './components/checkbox';
import upload from './components/upload';
import form from './components/form';
import locale from './locale';
import tooltip from './components/tooltip';
import notification from './components/notification';
import tooltipd from './directive/tooltipd'
=======
import vSwitch from './components/switch'
import { col, row } from './components/grid'
import spin from './components/spin'
import cascader from './components/cascader'
import input from './components/input'
import inputNumber from './components/inputNumber'
import select from './components/select'
import timePicker from './components/timePicker'
import message from './components/message'
import morePanel from './components/morePanel'
import radio from './components/radio'
import checkbox from './components/checkbox'
import upload from './components/upload'
import notification from './components/notification'
import form from './components/form'
import tooltip from './components/tooltip'
import locale from './locale'
>>>>>>>
import vSwitch from './components/switch'
import { col, row } from './components/grid'
import spin from './components/spin'
import cascader from './components/cascader'
import input from './components/input'
import inputNumber from './components/inputNumber'
import select from './components/select'
import timePicker from './components/timePicker'
import message from './components/message'
import morePanel from './components/morePanel'
import radio from './components/radio'
import checkbox from './components/checkbox'
import upload from './components/upload'
import notification from './components/notification'
import form from './components/form'
import tooltip from './components/tooltip'
import locale from './locale'
import tooltipd from './directive/tooltipd'
<<<<<<<
tooltipd,
=======
message
}
message.install = function (Vue) {
Vue.$message = Vue.prototype.$message = message
}
notification.install = function (Vue) {
Vue.$notification = Vue.prototype.$notification = notification
>>>>>>>
tooltipd,
message
}
message.install = function (Vue) {
Vue.$message = Vue.prototype.$message = message
}
notification.install = function (Vue) {
Vue.$notification = Vue.prototype.$notification = notification |
<<<<<<<
self.nodes.delete(connectorId);
connectornode.obliterate();
=======
delete self.nodes[connectorId];
connectornode.disable();
>>>>>>>
self.nodes.delete(connectorId);
connectornode.disable();
<<<<<<<
for (var child of children.values()) {
=======
let changedChildren = json.children ? json.children : [];
let childEditTimeMap = new Map(changedChildren);
for (var childId in children) {
var child = children[childId];
>>>>>>>
let changedChildren = json.children ? json.children : [];
let childEditTimeMap = new Map(changedChildren);
for (var child of children.values()) { |
<<<<<<<
var setAllLayersSuspended = function(value)
{
project.getStacks().forEach(function(stack) {
var existingLayer = stack.getLayer(getTracingLayerName(stack));
if (existingLayer) {
existingLayer.svgOverlay.setAllSuspended(value)
}
});
};
var updateNodesinAllLayers = function()
{
project.getStacks().forEach(function(stack) {
var existingLayer = stack.getLayer(getTracingLayerName(stack));
if (existingLayer) {
existingLayer.svgOverlay.updateNodes()
}
});
};
/**
* Return a unique name for the tracing layer of a given stack.
*/
var getTracingLayerName = function(stack)
{
return "TracingLayer" + stack.id;
};
=======
var disableLayerUpdate = function() {
CATMAID.warn("Temporary disabling node update until panning is over");
tracingLayer.svgOverlay.noUpdate = true;
};
>>>>>>>
var setAllLayersSuspended = function(value)
{
project.getStacks().forEach(function(stack) {
var existingLayer = stack.getLayer(getTracingLayerName(stack));
if (existingLayer) {
existingLayer.svgOverlay.setAllSuspended(value)
}
});
};
var updateNodesinAllLayers = function()
{
project.getStacks().forEach(function(stack) {
var existingLayer = stack.getLayer(getTracingLayerName(stack));
if (existingLayer) {
existingLayer.svgOverlay.updateNodes()
}
});
};
/**
* Return a unique name for the tracing layer of a given stack.
*/
var getTracingLayerName = function(stack)
{
return "TracingLayer" + stack.id;
};
var disableLayerUpdate = function() {
CATMAID.warn("Temporary disabling node update until panning is over");
tracingLayer.svgOverlay.noUpdate = true;
};
<<<<<<<
// Put tracing layer in "don't update" model
setAllLayersSuspended(true);
// Handle mouse event
=======
// Attach to the node limit hit event to disable node updates
// temporary if the limit was hit. This allows for smoother panning
// when many nodes are visible.
tracingLayer.svgOverlay.on(tracingLayer.svgOverlay.EVENT_HIT_NODE_DISPLAY_LIMIT,
disableLayerUpdate, tracingLayer);
// Cancel any existing update timeout, if there is one
if (updateTimeout) {
clearTimeout(updateTimeout);
updateTimeout = undefined;
}
>>>>>>>
// Put tracing layer in "don't update" model
setAllLayersSuspended(true);
// Attach to the node limit hit event to disable node updates
// temporary if the limit was hit. This allows for smoother panning
// when many nodes are visible.
tracingLayer.svgOverlay.on(tracingLayer.svgOverlay.EVENT_HIT_NODE_DISPLAY_LIMIT,
disableLayerUpdate, tracingLayer);
// Cancel any existing update timeout, if there is one
if (updateTimeout) {
clearTimeout(updateTimeout);
updateTimeout = undefined;
}
// Handle mouse event
<<<<<<<
// Wake tracing overlays up again
setAllLayersSuspended(false);
// Recreate nodes by feching them from the database for the new field of view
updateNodesinAllLayers();
=======
tracingLayer.svgOverlay.off(tracingLayer.svgOverlay.EVENT_HIT_NODE_DISPLAY_LIMIT,
disableLayerUpdate, tracingLayer);
if (tracingLayer.svgOverlay.noUpdate) {
// Wait a second before updating the view, just in case the user
// continues to pan to not hit the node limit again. Then make
// sure the next update is not stopped.
updateTimeout = setTimeout(function() {
tracingLayer.svgOverlay.noUpdate = false;
// Recreate nodes by feching them from the database for the
// new field of view
tracingLayer.svgOverlay.updateNodes();
}, 1000);
} else {
// Recreate nodes by feching them from the database for the new
// field of view
tracingLayer.svgOverlay.updateNodes();
}
>>>>>>>
tracingLayer.svgOverlay.off(tracingLayer.svgOverlay.EVENT_HIT_NODE_DISPLAY_LIMIT,
disableLayerUpdate, tracingLayer);
if (tracingLayer.svgOverlay.noUpdate) {
// Wait a second before updating the view, just in case the user
// continues to pan to not hit the node limit again. Then make
// sure the next update is not stopped.
updateTimeout = setTimeout(function() {
tracingLayer.svgOverlay.noUpdate = false;
// Wake tracing overlays up again
setAllLayersSuspended(false);
// Recreate nodes by feching them from the database for the new
// field of view
updateNodesinAllLayers();
}, 1000);
} else {
// Wake tracing overlays up again
setAllLayersSuspended(false);
// Recreate nodes by feching them from the database for the new
// field of view
updateNodesinAllLayers();
} |
<<<<<<<
last_stack_viewer_closes_project: {
default: true
},
=======
warn_on_potential_gl_issues: {
default: true,
},
>>>>>>>
last_stack_viewer_closes_project: {
default: true,
},
warn_on_potential_gl_issues: {
default: true,
}, |
<<<<<<<
/**
* Get the fill color for an active node.
*/
=======
SkeletonAnnotations.getActiveNodeSubType = function() {
return this.atn.subtype;
};
>>>>>>>
SkeletonAnnotations.getActiveNodeSubType = function() {
return this.atn.subtype;
};
/**
* Get the fill color for an active node.
*/
<<<<<<<
/**
* Asynchronuously, create a link between the nodes @fromid and @toid of type
* @link_type. It is expected, that both nodes are existant. All nodes are
* updated after this.
*/
SkeletonAnnotations.SVGOverlay.prototype.createLink = function (fromid, toid,
link_type)
{
=======
SkeletonAnnotations.SVGOverlay.prototype.createLink = function (fromid, toid, link_type, afterCreate) {
>>>>>>>
/**
* Asynchronuously, create a link between the nodes @fromid and @toid of type
* @link_type. It is expected, that both nodes are existant. All nodes are
* updated after this.
*/
SkeletonAnnotations.SVGOverlay.prototype.createLink = function (fromid, toid,
link_type, afterCreate)
{
<<<<<<<
/**
* Create a single connector not linked to any treenode. If given a
* completionCallback function, it is invoked with one argument: the ID of the
* newly created connector.
*/
SkeletonAnnotations.SVGOverlay.prototype.createSingleConnector = function (
phys_x, phys_y, phys_z, pos_x, pos_y, pos_z, confval, completionCallback)
{
=======
/** Create a single connector not linked to any treenode.
* If given a completionCallback function, it is invoked with one argument: the ID of the newly created connector. */
SkeletonAnnotations.SVGOverlay.prototype.createSingleConnector = function (
phys_x, phys_y, phys_z, pos_x, pos_y, pos_z, confval, subtype, completionCallback) {
>>>>>>>
/**
* Create a single connector not linked to any treenode. If given a
* completionCallback function, it is invoked with one argument: the ID of the
* newly created connector.
*/
SkeletonAnnotations.SVGOverlay.prototype.createSingleConnector = function (
phys_x, phys_y, phys_z, pos_x, pos_y, pos_z, confval, subtype, completionCallback)
{
<<<<<<<
// create link : new treenode postsynaptic_to or presynaptic_to
// deactivated connectorID
self.createLink(nid, connectorID, link_type);
// Trigger skeleton change event
SkeletonAnnotations.trigger(SkeletonAnnotations.EVENT_SKELETON_CHANGED,
nn.skeleton_id);
=======
// create link : new treenode postsynaptic_to or presynaptic_to deactivated connectorID
self.createLink(nid, connectorID, link_type, function() {
// Use a new node reference, because createLink() triggers an update,
// which potentially re-initializes node objects.
var node = self.nodes[nid];
// Trigger skeleton change event
SkeletonAnnotations.trigger(SkeletonAnnotations.EVENT_SKELETON_CHANGED,
node.skeleton_id);
if (afterCreate) afterCreate(self, node);
});
>>>>>>>
// create link : new treenode postsynaptic_to or presynaptic_to
// deactivated connectorID
self.createLink(nid, connectorID, link_type, function() {
// Use a new node reference, because createLink() triggers an update,
// which potentially re-initializes node objects.
var node = self.nodes[nid];
// Trigger skeleton change event
SkeletonAnnotations.trigger(SkeletonAnnotations.EVENT_SKELETON_CHANGED,
node.skeleton_id);
if (afterCreate) afterCreate(self, node);
});
<<<<<<<
// and confidence, a[7]: whether the user can edit the connector
var z = this.stack.projectToStackZ(a[3], a[2], a[1]);
=======
// and confidence, a[7]: undirected nodes as array of arrays with treenode
// id, a[8]: whether the user can edit the connector
>>>>>>>
// and confidence, a[7]: undirected nodes as array of arrays with treenode
// id, a[8]: whether the user can edit the connector
var z = this.stack.projectToStackZ(a[3], a[2], a[1]);
<<<<<<<
a[0],
this.stack.projectToStackX(a[3], a[2], a[1]),
this.stack.projectToStackY(a[3], a[2], a[1]),
z, z - this.stack.z, a[4], a[7]);
=======
a[0], this.phys2pixX(a[1]),
this.phys2pixY(a[2]), this.phys2pixZ(a[3]),
(a[3] - pz) / this.stack.resolution.z, a[4], subtype, a[8]);
>>>>>>>
a[0],
this.stack.projectToStackX(a[3], a[2], a[1]),
this.stack.projectToStackY(a[3], a[2], a[1]),
z, z - this.stack.z, a[4], subtype, a[8]);
<<<<<<<
// Create a new connector and a new link
var synapse_type = e.altKey ? 'post' : 'pre';
CATMAID.statusBar.replaceLast("Created connector with " + synapse_type +
"synaptic treenode #" + atn.id);
var self = this;
=======
var msg, linkType, self = this;
if (SkeletonAnnotations.SUBTYPE_ABUTTING_CONNECTOR === SkeletonAnnotations.newConnectorType) {
// Create a new abutting connection
msg = "Created abutting connector with treenode #" + atn.id;
linkType = "abutting";
} else if (SkeletonAnnotations.SUBTYPE_SYNAPTIC_CONNECTOR === SkeletonAnnotations.newConnectorType) {
// Create a new synaptic connector
var synapseType = e.altKey ? 'post' : 'pre';
msg = "Created connector with " + synapseType + "synaptic treenode #" + atn.id;
linkType = synapseType + "synaptic_to";
} else {
CATMAID.warn("Unknown connector type selected");
return true;
}
CATMAID.statusBar.replaceLast(msg);
>>>>>>>
var msg, linkType, self = this;
if (SkeletonAnnotations.SUBTYPE_ABUTTING_CONNECTOR === SkeletonAnnotations.newConnectorType) {
// Create a new abutting connection
msg = "Created abutting connector with treenode #" + atn.id;
linkType = "abutting";
} else if (SkeletonAnnotations.SUBTYPE_SYNAPTIC_CONNECTOR === SkeletonAnnotations.newConnectorType) {
// Create a new synaptic connector
var synapseType = e.altKey ? 'post' : 'pre';
msg = "Created connector with " + synapseType + "synaptic treenode #" + atn.id;
linkType = synapseType + "synaptic_to";
} else {
CATMAID.warn("Unknown connector type selected");
return true;
}
CATMAID.statusBar.replaceLast(msg);
<<<<<<<
function (connectorID) {
self.promiseNode(targetTreenode).then(function(nid) {
self.createLink(nid, connectorID, synapse_type + "synaptic_to");
});
});
=======
SkeletonAnnotations.newConnectorType, function (connectorID) {
self.createLink(targetTreenodeID, connectorID, linkType);
});
>>>>>>>
SkeletonAnnotations.newConnectorType, function (connectorID) {
self.promiseNode(targetTreenode).then(function(nid) {
self.createLink(nid, connectorID, linkType);
});
});
<<<<<<<
// create new treenode (and skeleton) postsynaptic to activated connector
this.createPostsynapticTreenode(atn.id, phys_x, phys_y, phys_z,
-1, 5, pos_x, pos_y, pos_z);
CATMAID.statusBar.replaceLast("Created treenode #" + atn.id +
" postsynaptic to active connector");
e.stopPropagation();
=======
if (SkeletonAnnotations.SUBTYPE_SYNAPTIC_CONNECTOR === atn.subtype) {
// create new treenode (and skeleton) postsynaptic to activated connector
CATMAID.statusBar.replaceLast("Created treenode #" + atn.id + " postsynaptic to active connector");
this.createPostsynapticTreenode(atn.id, phys_x, phys_y, phys_z, -1, 5,
pos_x, pos_y, pos_z, postCreateFn);
e.stopPropagation();
} else if (SkeletonAnnotations.SUBTYPE_ABUTTING_CONNECTOR === atn.subtype) {
// create new treenode (and skeleton) postsynaptic to activated connector
CATMAID.statusBar.replaceLast("Created treenode #" + atn.id + " abutting to active connector");
this.createTreenodeWithLink(atn.id, phys_x, phys_y, phys_z, -1, 5,
pos_x, pos_y, pos_z, "abutting", postCreateFn);
e.stopPropagation();
}
>>>>>>>
if (SkeletonAnnotations.SUBTYPE_SYNAPTIC_CONNECTOR === atn.subtype) {
// create new treenode (and skeleton) postsynaptic to activated connector
CATMAID.statusBar.replaceLast("Created treenode #" + atn.id + " postsynaptic to active connector");
this.createPostsynapticTreenode(atn.id, phys_x, phys_y, phys_z, -1, 5,
pos_x, pos_y, pos_z, postCreateFn);
e.stopPropagation();
} else if (SkeletonAnnotations.SUBTYPE_ABUTTING_CONNECTOR === atn.subtype) {
// create new treenode (and skeleton) postsynaptic to activated connector
CATMAID.statusBar.replaceLast("Created treenode #" + atn.id + " abutting to active connector");
this.createTreenodeWithLink(atn.id, phys_x, phys_y, phys_z, -1, 5,
pos_x, pos_y, pos_z, "abutting", postCreateFn);
e.stopPropagation();
}
<<<<<<<
this.goToNode(treenode_id,
function() {
// If there was a measurement tool based radius selection started
// before, stop this.
if (self.nodes[treenode_id].surroundingCircleElements) {
hideCircleAndCallback();
} else {
self.nodes[treenode_id].drawSurroundingCircle(toStack,
stackToProject, hideCircleAndCallback);
// Attach a handler for the ESC key to cancel selection
$('body').on('keydown.catmaidRadiusSelect', function(event) {
if (27 === event.keyCode) {
// Unbind key handler and remove circle
$('body').off('keydown.catmaidRadiusSelect');
self.nodes[treenode_id].removeSurroundingCircle();
return true;
}
return false;
});
}
=======
// References the original node the selector was created for
var originalNode;
>>>>>>>
// References the original node the selector was created for
var originalNode;
<<<<<<<
/**
* Transform a layer coordinate into stack space.
*/
function toStack(r)
{
var offsetX = self.stack.x - self.stack.viewWidth / self.stack.scale / 2;
var offsetY = self.stack.y - self.stack.viewHeight / self.stack.scale / 2;
return {
x: (r.x / self.stack.scale) + offsetX,
y: (r.y / self.stack.scale) + offsetY
}
}
/**
* Transform a layer coordinate into world space.
*/
function stackToProject(s)
{
return {
x: self.stack.stackToProjectX(self.stack.z, s.y, s.x),
y: self.stack.stackToProjectY(self.stack.z, s.y, s.x)
};
=======
function verifyNode(treenode_id) {
var node = self.nodes[treenode_id];
if (!node || node !== originalNode) {
// This can happen if e.g. the section was changed and all nodes were
// updated.
CATMAID.warn('Canceling radius editing, because the edited node ' +
'cannot be found anymore or has changed.');
return false;
}
return node;
}
function toggleMeasurementTool() {
// Keep a reference to the original node
originalNode = self.nodes[treenode_id];
// If there was a measurement tool based radius selection started
// before, stop this.
if (originalNode.surroundingCircleElements) {
hideCircleAndCallback();
} else {
originalNode.drawSurroundingCircle(transform,
hideCircleAndCallback);
// Attach a handler for the ESC key to cancel selection
$('body').on('keydown.catmaidRadiusSelect', function(event) {
if (27 === event.keyCode) {
// Unbind key handler and remove circle
$('body').off('keydown.catmaidRadiusSelect');
originalNode.removeSurroundingCircle();
return true;
>>>>>>>
function verifyNode(treenode_id) {
var node = self.nodes[treenode_id];
if (!node || node !== originalNode) {
// This can happen if e.g. the section was changed and all nodes were
// updated.
CATMAID.warn('Canceling radius editing, because the edited node ' +
'cannot be found anymore or has changed.');
return false;
}
return node;
}
function toggleMeasurementTool() {
// Keep a reference to the original node
originalNode = self.nodes[treenode_id];
// If there was a measurement tool based radius selection started
// before, stop this.
if (originalNode.surroundingCircleElements) {
hideCircleAndCallback();
} else {
originalNode.drawSurroundingCircle(toStack, stackToProject,
hideCircleAndCallback);
// Attach a handler for the ESC key to cancel selection
$('body').on('keydown.catmaidRadiusSelect', function(event) {
if (27 === event.keyCode) {
// Unbind key handler and remove circle
$('body').off('keydown.catmaidRadiusSelect');
originalNode.removeSurroundingCircle();
return true;
<<<<<<<
self.promiseNode(treenode_id).then(function(nodeID) {
self.submit(
django_url + project.id + '/treenode/' + nodeID + '/radius',
{radius: radius,
option: choice.selectedIndex},
function(json) {
// Refresh 3d views if any
WebGLApplication.prototype.staticReloadSkeletons([self.nodes[nodeID].skeleton_id]);
// Reinit SVGOverlay to read in the radius of each altered treenode
self.updateNodes();
});
});
=======
updateRadius(radius, choice.selectedIndex);
>>>>>>>
updateRadius(radius, choice.selectedIndex); |
<<<<<<<
children;
=======
children,
level,
messageView;
>>>>>>>
children,
messageView; |
<<<<<<<
import { combineReducers } from 'redux'
import { routerReducer as routing } from 'react-router-redux'
import datasets from './datasets'
import settings from './settings'
import hydrating from './hydrating'
import newDataset from './newDataset'
=======
// @flow
import { combineReducers } from 'redux';
import { routerReducer as router } from 'react-router-redux';
import counter from './counter';
>>>>>>>
// @flow
import { combineReducers } from 'redux'
import { routerReducer } from 'react-router-redux'
import datasets from './datasets'
import settings from './settings'
import hydrating from './hydrating'
import newDataset from './newDataset'
<<<<<<<
datasets,
newDataset,
settings,
hydrating,
routing
})
=======
counter,
router,
});
>>>>>>>
routing: routerReducer,
datasets,
newDataset,
settings,
hydrating,
}) |
<<<<<<<
// new webpack.BannerPlugin(
// 'require("source-map-support").install();',
// { raw: true, entryOnly: false }
// ),
=======
// Add source map support for stack traces in node
// https://github.com/evanw/node-source-map-support
new webpack.BannerPlugin(
'require("source-map-support").install();',
{ raw: true, entryOnly: false }
),
// NODE_ENV should be production so that modules do not perform certain development checks
>>>>>>>
// Add source map support for stack traces in node
// https://github.com/evanw/node-source-map-support
// new webpack.BannerPlugin(
// 'require("source-map-support").install();',
// { raw: true, entryOnly: false }
// ), |
<<<<<<<
backgroundPageConnection.onMessage.addListener((logItem, sender) => {
let slimItem;
if (logItem.queries) {
slimItem = {
state: { queries: logItem.queries }
};
}
if (logItem.mutations) {
let mutations = logItem.mutations;
let mutationsArray = Object.keys(mutations).map(function(key, index) {
return [key, mutations[key]];
});
// chose 10 arbitrary so we only display 10 mutations in log
mutationsArray = mutationsArray.slice(
mutationsArray.length - 10,
mutationsArray.length
);
mutations = {};
mutationsArray.forEach(function(m) {
mutations[m[0]] = m[1];
});
slimItem = {
state: { mutations: logItem.mutations }
};
=======
backgroundPageConnection.onMessage.addListener((logItem, sender) => {
let mutations = logItem.mutations;
let mutationsArray = Object.keys(mutations).map(function(key, index) {
return [key, mutations[key]];
});
// chose 10 arbitrary so we only display 10 mutations in log
mutationsArray = mutationsArray.slice(mutationsArray.length - 10, mutationsArray.length);
mutations = {}
mutationsArray.forEach(function(m) {
mutations[m[0]] = m[1];
});
const slimItem = {
state: {
mutations: logItem.mutations,
queries: logItem.queries
}
>>>>>>>
backgroundPageConnection.onMessage.addListener((logItem, sender) => {
let slimItem;
if (logItem.queries) {
slimItem = {
state: { queries: logItem.queries }
};
}
if (logItem.mutations) {
let mutations = logItem.mutations;
let mutationsArray = Object.keys(mutations).map(function(key, index) {
return [key, mutations[key]];
});
// chose 10 arbitrary so we only display 10 mutations in log
mutationsArray = mutationsArray.slice(
mutationsArray.length - 10,
mutationsArray.length
);
mutations = {};
mutationsArray.forEach(function(m) {
mutations[m[0]] = m[1];
});
slimItem = {
state: { mutations: logItem.mutations }
};
<<<<<<<
=======
>>>>>>>
<<<<<<<
this.interval = setInterval(() => {}, 100);
=======
>>>>>>> |
<<<<<<<
/* eslint no-template-curly-in-string: "off" */
const routes = {
oldLogout: 'legacy/logout',
oldLogin: 'legacy/login',
oldDebate: 'debate/${slug}',
oldProfile: 'debate/${slug}/user/profile',
graphql: '${slug}/graphql',
styleguide: 'styleguide',
root: '',
login: 'login',
signup: 'signup',
changePassword: 'changePassword',
requestPasswordChange: 'requestPasswordChange',
ctxLogin: '${slug}/login',
ctxSignup: '${slug}/signup',
ctxChangePassword: '${slug}/changePassword',
ctxRequestPasswordChange: '${slug}/requestPasswordChange',
ctxOldLogout: 'debate/${slug}/logout',
ctxOldLogin: 'debate/${slug}/login',
home: '${slug}/home',
homeBare: '${slug}',
profile: '${slug}/profile/${userId}',
ideas: '${slug}/ideas',
syntheses: '${slug}/syntheses',
synthesis: '${slug}/syntheses/${synthesisId}',
debate: '${slug}/debate/${phase}',
rootDebate: '${slug}/debate',
community: '${slug}/community',
terms: '${slug}/terms',
legalNotice: '${slug}/legal-notice',
join: '${slug}/join',
theme: 'theme/${themeId}',
administration: '${slug}/administration',
unauthorizedAdministration: '${slug}/unauthorizedAdministration',
adminPhase: '${phase}',
post: '${slug}/debate/${phase}/theme/${themeId}/#${element}',
resourcesCenter: '${slug}/resourcescenter'
};
=======
const routes = require('../../../routes.json');
>>>>>>>
/* eslint no-template-curly-in-string: "off" */
const routes = require('../../../routes.json'); |
<<<<<<<
let tabData;
if (logItem.queries) {
tabData = {
state: { queries: logItem.queries }
};
}
if (logItem.mutations) {
let mutations = logItem.mutations;
console.log(mutations);
let mutationsArray = Object.keys(mutations).map(function (key, index) {
return [key, mutations[key]];
});
// chose 10 arbitrary so we only display 10 mutations in log
mutationsArray = mutationsArray.slice(
mutationsArray.length - 10,
mutationsArray.length
);
mutations = {};
mutationsArray.forEach(function (m) {
mutations[m[0]] = m[1];
});
tabData = {
state: { mutations: logItem.mutations }
};
}
if (logItem.inspector) {
tabData = {
state: { inspector: logItem.inspector }
};
}
=======
let slimItem;
if (logItem.queries) {
slimItem = {
state: { queries: logItem.queries }
};
}
if (logItem.mutations) {
let mutations = logItem.mutations;
let mutationsArray = Object.keys(mutations).map(function (key, index) {
return [key, mutations[key]];
});
// chose 10 arbitrary so we only display 10 mutations in log
mutationsArray = mutationsArray.slice(
mutationsArray.length - 10,
mutationsArray.length
);
mutations = {};
mutationsArray.forEach(function (m) {
mutations[m[0]] = m[1];
});
slimItem = {
state: { mutations: logItem.mutations }
};
}
>>>>>>>
let tabData;
if (logItem.queries) {
tabData = {
state: { queries: logItem.queries }
};
}
if (logItem.mutations) {
let mutations = logItem.mutations;
let mutationsArray = Object.keys(mutations).map(function (key, index) {
return [key, mutations[key]];
});
// chose 10 arbitrary so we only display 10 mutations in log
mutationsArray = mutationsArray.slice(
mutationsArray.length - 10,
mutationsArray.length
);
mutations = {};
mutationsArray.forEach(function (m) {
mutations[m[0]] = m[1];
});
tabData = {
state: { mutations: logItem.mutations }
};
}
if (logItem.inspector) {
tabData = {
state: { inspector: logItem.inspector }
};
}
<<<<<<<
=======
componentDidMount() {
this.lastActionId = null;
this.initLogger();
}
initLogger() {
evalInPage(
`
(function () {
if (window.__APOLLO_CLIENT__) {
// window.__action_log__ initialized in hook.js
window.__action_log__.push({
dataWithOptimisticResults: window.__APOLLO_CLIENT__.queryManager.getDataWithOptimisticResults(),
});
}
})()
`,
result => {
// Nothing
}
);
}
>>>>>>> |
<<<<<<<
import { Table, Input, Popconfirm, Typography } from 'antd'
import { trimEllip } from '../utils'
=======
import { blue, red } from '@ant-design/colors'
import { Table, Input, Popconfirm, Tooltip } from 'antd'
import NewForm from './new-form'
>>>>>>>
import { blue, red } from '@ant-design/colors'
import { trimEllip } from '../utils'
import { Table, Input, Popconfirm, Tooltip } from 'antd'
import NewForm from './new-form'
<<<<<<<
[searchText]
=======
[searchText, deletedRecord, onDeletePass]
>>>>>>>
[searchText, deletedRecord, onDeletePass] |
<<<<<<<
/**
* Get crash info from global config and setup crash reporter.
*/
getConfigField('crashReporterDetails').then(
function (data) {
crashReporter.setupCrashReporter({'window': 'main'}, data);
}
).catch(function (err) {
let title = 'Error loading configuration';
electron.dialog.showErrorBox(title, title + ': ' + err);
});
=======
log.send(logLevels.INFO, 'creating main window url: ' + url);
>>>>>>>
/**
* Get crash info from global config and setup crash reporter.
*/
getConfigField('crashReporterDetails').then(
function (data) {
crashReporter.setupCrashReporter({'window': 'main'}, data);
}
).catch(function (err) {
let title = 'Error loading configuration';
electron.dialog.showErrorBox(title, title + ': ' + err);
});
log.send(logLevels.INFO, 'creating main window url: ' + url); |
<<<<<<<
tokenVoteInstructions: "En fonction de l'objectif du module de jetons, incitez les participants à passer à l'action.",
gaugeVoteInstructions: "En fonction de l'objectif du module jauge, incitez les participants à passer à l'action."
=======
tokenVoteInstructions: "En fonction de l'objectif du module de jetons, incitez les participants à passer à l'action.",
landingPage: {
header:
"Bandeau image en haut de la page. Il contient le titre de la consultation, et un sous-titre informatif, ainsi qu'un bouton d'accès à la consultation.",
timeline:
"La section timeline met en avant les différentes phases de la consultation ainsi que le niveau de progression dans le temps. Elle contient un titre, un sous-titre, et pour chaque phase, un descriptif et des images associées. Pour la configuration du débat en phases, revenir au menu Éditer la discussion.",
tweets:
"La section Tweets met en avant les tweets relatifs à la consulation. Vous devez renseigner le titre de la section tweet, le #tag de recherche, et une image pour le fond de la section.",
chatbot:
"Il s'agit d'un bandeau de redirection vers un module chatbot messenger dédié à la consultation. Vous devez renseigner le titre, l'url du chatbot messenger et l'intitulé du bouton de redirection.",
news:
"Permet de mettre en avant une ou plusieurs actualités en rapport avec la consultation (publication d'une nouvelle synthèse, création d'une nouvelle thématique, …) avec des liens de redirection.",
introduction: "",
data: "",
footer: "",
video: "",
contact: "",
top_thematics: "",
partners: ""
}
>>>>>>>
tokenVoteInstructions: "En fonction de l'objectif du module de jetons, incitez les participants à passer à l'action.",
gaugeVoteInstructions: "En fonction de l'objectif du module jauge, incitez les participants à passer à l'action.",
landingPage: {
header:
"Bandeau image en haut de la page. Il contient le titre de la consultation, et un sous-titre informatif, ainsi qu'un bouton d'accès à la consultation.",
timeline:
"La section timeline met en avant les différentes phases de la consultation ainsi que le niveau de progression dans le temps. Elle contient un titre, un sous-titre, et pour chaque phase, un descriptif et des images associées. Pour la configuration du débat en phases, revenir au menu Éditer la discussion.",
tweets:
"La section Tweets met en avant les tweets relatifs à la consulation. Vous devez renseigner le titre de la section tweet, le #tag de recherche, et une image pour le fond de la section.",
chatbot:
"Il s'agit d'un bandeau de redirection vers un module chatbot messenger dédié à la consultation. Vous devez renseigner le titre, l'url du chatbot messenger et l'intitulé du bouton de redirection.",
news:
"Permet de mettre en avant une ou plusieurs actualités en rapport avec la consultation (publication d'une nouvelle synthèse, création d'une nouvelle thématique, …) avec des liens de redirection.",
introduction: "",
data: "",
footer: "",
video: "",
contact: "",
top_thematics: "",
partners: ""
}
<<<<<<<
tokenVoteInstructions: "Depending on the objective of the token module, incite the participants to take action.",
gaugeVoteInstructions: "Depending on the objective of the gauge module, incite the participants to take action."
=======
tokenVoteInstructions: "Depending on the objective of the token module, incite the participants to take action.",
landingPage: {
header:
"Top page header. It contains the consultation's title and subtitle and a button to access to the consultation.",
timeline: "",
tweets: "",
chatbot: "",
news: "",
introduction: "",
data: "",
footer: "",
video: "",
contact: "",
top_thematics: "",
partners: ""
}
>>>>>>>
tokenVoteInstructions: "Depending on the objective of the token module, incite the participants to take action.",
gaugeVoteInstructions: "Depending on the objective of the gauge module, incite the participants to take action.",
landingPage: {
header:
"Top page header. It contains the consultation's title and subtitle and a button to access to the consultation.",
timeline: "",
tweets: "",
chatbot: "",
news: "",
introduction: "",
data: "",
footer: "",
video: "",
contact: "",
top_thematics: "",
partners: ""
} |
<<<<<<<
* Close a mailbox
*
* @param {boolean} [autoExpunge=true] If autoExpunge is true, any messages marked as Deleted in the currently open mailbox will be remove
* @param {function} [callback] Optional callback, receiving signature (err)
* @returns {undefined|Promise} Returns a promise when no callback is specified, resolving to `boxName`
* @memberof ImapSimple
*/
ImapSimple.prototype.closeBox = function (autoExpunge=true, callback) {
var self = this;
if (typeof(autoExpunge) == 'function'){
callback = autoExpunge;
autoExpunge = true;
}
if (callback) {
return nodeify(this.closeBox(autoExpunge), callback);
}
return new Promise(function (resolve, reject) {
self.imap.closeBox(autoExpunge, function (err, result) {
if (err) {
reject(err);
return;
}
resolve(result);
});
});
};
/**
* Search an open box, and retrieve the results
=======
* Search the currently open mailbox, and retrieve the results
>>>>>>>
* Close a mailbox
*
* @param {boolean} [autoExpunge=true] If autoExpunge is true, any messages marked as Deleted in the currently open mailbox will be remove
* @param {function} [callback] Optional callback, receiving signature (err)
* @returns {undefined|Promise} Returns a promise when no callback is specified, resolving to `boxName`
* @memberof ImapSimple
*/
ImapSimple.prototype.closeBox = function (autoExpunge=true, callback) {
var self = this;
if (typeof(autoExpunge) == 'function'){
callback = autoExpunge;
autoExpunge = true;
}
if (callback) {
return nodeify(this.closeBox(autoExpunge), callback);
}
return new Promise(function (resolve, reject) {
self.imap.closeBox(autoExpunge, function (err, result) {
if (err) {
reject(err);
return;
}
resolve(result);
});
});
};
/**
* Search the currently open mailbox, and retrieve the results |
<<<<<<<
* Add a plugin to the sets of plugins already registered by Encore
*
* For example, if you want to add the "webpack.IgnorePlugin()", then:
* .addPlugin(new webpack.IgnorePlugin(requestRegExp, contextRegExp))
*
* @param {string} plugin
* @return {exports}
*/
addPlugin(plugin) {
webpackConfig.addPlugin(plugin);
return this;
},
/**
=======
* Adds a custom loader config
*
* @param {object} loader The loader config object
*
* @returns {exports}
*/
addLoader(loader) {
webpackConfig.addLoader(loader);
return this;
},
/**
* Alias to addLoader
*
* @param {object} rule
*
* @returns {exports}
*/
addRule(rule) {
this.addLoader(rule);
return this;
},
/**
>>>>>>>
* Add a plugin to the sets of plugins already registered by Encore
*
* For example, if you want to add the "webpack.IgnorePlugin()", then:
* .addPlugin(new webpack.IgnorePlugin(requestRegExp, contextRegExp))
*
* @param {string} plugin
* @return {exports}
*/
addPlugin(plugin) {
webpackConfig.addPlugin(plugin);
return this;
},
/**
* Adds a custom loader config
*
* @param {object} loader The loader config object
*
* @returns {exports}
*/
addLoader(loader) {
webpackConfig.addLoader(loader);
return this;
},
/**
* Alias to addLoader
*
* @param {object} rule
*
* @returns {exports}
*/
addRule(rule) {
this.addLoader(rule);
return this;
},
/** |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
this.envManager.init();
=======
this.filesystem.init();
>>>>>>>
this.envManager.init();
this.filesystem.init(); |
<<<<<<<
resolve(rest[0]) === "=>") => {
var res = enforest(rest.slice(1), context);
if (res.result.hasPrototype(Expr)) {
return step(ArrowFun.create(delim, rest[0], res.result.destruct()),
res.rest);
=======
unwrapSyntax(rest[0]) === "=>") => {
var arrowRes = enforest(rest.slice(1), context);
if (arrowRes.result.hasPrototype(Expr)) {
return step(ArrowFun.create(delim, rest[0], arrowRes.result.destruct()),
arrowRes.rest);
>>>>>>>
resolve(rest[0]) === "=>") => {
var arrowRes = enforest(rest.slice(1), context);
if (arrowRes.result.hasPrototype(Expr)) {
return step(ArrowFun.create(delim, rest[0], arrowRes.result.destruct()),
arrowRes.rest);
<<<<<<<
var vsRes = enforestVarStatement(rest, context, keyword);
if (vsRes) {
return step(LetStatement.create(head, vsRes.result),
vsRes.rest);
=======
var lsRes = enforestVarStatement(rest, context, true);
if (lsRes) {
return step(LetStatement.create(head, lsRes.result),
lsRes.rest);
>>>>>>>
var lsRes = enforestVarStatement(rest, context, keyword);
if (lsRes) {
return step(LetStatement.create(head, lsRes.result),
lsRes.rest);
<<<<<<<
var vsRes = enforestVarStatement(rest, context, keyword);
if (vsRes) {
return step(ConstStatement.create(head, vsRes.result),
vsRes.rest);
=======
var csRes = enforestVarStatement(rest, context, true);
if (csRes) {
return step(ConstStatement.create(head, csRes.result),
csRes.rest);
>>>>>>>
var csRes = enforestVarStatement(rest, context, keyword);
if (csRes) {
return step(ConstStatement.create(head, csRes.result),
csRes.rest);
<<<<<<<
var rt = transformer([head].concat(rest), transformerContext, prevStx, prevTerms);
=======
rt = transformer([head].concat(rest), transformerContext);
>>>>>>>
rt = transformer([head].concat(rest), transformerContext, prevStx, prevTerms); |
<<<<<<<
function cloneMatch(oldMatch) {
var newMatch = {
success: oldMatch.success,
rest: oldMatch.rest,
patternEnv: {}
};
for (var pat in oldMatch.patternEnv) {
if (oldMatch.patternEnv.hasOwnProperty(pat)) {
newMatch.patternEnv[pat] = oldMatch.patternEnv[pat];
}
}
return newMatch;
}
=======
function makeIdentityRule(pattern, isInfix) {
var _s = 1;
function traverse(s, infix) {
var pat = [];
var stx = [];
for (var i = 0; i < s.length; i++) {
var tok1 = s[i];
var tok2 = s[i + 1];
var tok3 = s[i + 2];
var tok4 = s[i + 3];
// Pattern vars, ignore classes
if (isPatternVar(tok1)) {
pat.push(tok1);
stx.push(tok1);
if (tok2 && tok2.token.type === parser.Token.Punctuator &&
tok2.token.value === ":" &&
tok3 && tok3.token.type === parser.Token.Identifier) {
pat.push(tok2, tok3);
i += 2;
if (tok3.token.value === "invoke" ||
tok3.token.value === "invokeOnce" && tok4) {
pat.push(tok4);
i += 1;
}
}
}
// Rename wildcards
else if (tok1.token.type === parser.Token.Identifier &&
tok1.token.value === "_") {
var uident = syntax.makeIdent("$__wildcard" + (_s++), tok1);
pat.push(uident);
stx.push(uident);
}
// Don't traverse literal groups
else if (tok1.token.type === parser.Token.Identifier &&
tok1.token.value === "$" &&
tok2 && tok2.token.type === parser.Token.Delimiter &&
tok2.token.value === "[]") {
pat.push(tok1, tok2);
stx.push(tok1, tok2);
i += 1;
}
// Traverse delimiters
else if (tok1.token.type === parser.Token.Delimiter) {
var sub = traverse(tok1.token.inner, false);
var clone = syntaxFromToken(_.clone(tok1.token), tok1);
tok1.token.inner = sub.pattern;
clone.token.inner = sub.body;
pat.push(tok1);
stx.push(clone);
}
// Skip infix bar
else if (infix && tok1.token.type === parser.Token.Punctuator &&
tok1.token.value === "|") {
infix = false;
pat.push(tok1);
}
// Tokens
else {
pat.push(tok1);
stx.push(tok1);
}
}
return {
pattern: pat,
body: stx
};
}
return traverse(pattern, isInfix);
}
>>>>>>>
function cloneMatch(oldMatch) {
var newMatch = {
success: oldMatch.success,
rest: oldMatch.rest,
patternEnv: {}
};
for (var pat in oldMatch.patternEnv) {
if (oldMatch.patternEnv.hasOwnProperty(pat)) {
newMatch.patternEnv[pat] = oldMatch.patternEnv[pat];
}
}
return newMatch;
}
function makeIdentityRule(pattern, isInfix) {
var _s = 1;
function traverse(s, infix) {
var pat = [];
var stx = [];
for (var i = 0; i < s.length; i++) {
var tok1 = s[i];
var tok2 = s[i + 1];
var tok3 = s[i + 2];
var tok4 = s[i + 3];
// Pattern vars, ignore classes
if (isPatternVar(tok1)) {
pat.push(tok1);
stx.push(tok1);
if (tok2 && tok2.token.type === parser.Token.Punctuator &&
tok2.token.value === ":" &&
tok3 && tok3.token.type === parser.Token.Identifier) {
pat.push(tok2, tok3);
i += 2;
if (tok3.token.value === "invoke" ||
tok3.token.value === "invokeOnce" && tok4) {
pat.push(tok4);
i += 1;
}
}
}
// Rename wildcards
else if (tok1.token.type === parser.Token.Identifier &&
tok1.token.value === "_") {
var uident = syntax.makeIdent("$__wildcard" + (_s++), tok1);
pat.push(uident);
stx.push(uident);
}
// Don't traverse literal groups
else if (tok1.token.type === parser.Token.Identifier &&
tok1.token.value === "$" &&
tok2 && tok2.token.type === parser.Token.Delimiter &&
tok2.token.value === "[]") {
pat.push(tok1, tok2);
stx.push(tok1, tok2);
i += 1;
}
// Traverse delimiters
else if (tok1.token.type === parser.Token.Delimiter) {
var sub = traverse(tok1.token.inner, false);
var clone = syntaxFromToken(_.clone(tok1.token), tok1);
tok1.token.inner = sub.pattern;
clone.token.inner = sub.body;
pat.push(tok1);
stx.push(clone);
}
// Skip infix bar
else if (infix && tok1.token.type === parser.Token.Punctuator &&
tok1.token.value === "|") {
infix = false;
pat.push(tok1);
}
// Tokens
else {
pat.push(tok1);
stx.push(tok1);
}
}
return {
pattern: pat,
body: stx
};
}
return traverse(pattern, isInfix);
}
<<<<<<<
exports.cloneMatch = cloneMatch;
=======
exports.makeIdentityRule = makeIdentityRule;
>>>>>>>
exports.cloneMatch = cloneMatch;
exports.makeIdentityRule = makeIdentityRule; |
<<<<<<<
}
describe "syntax objects" {
it "should have identifier testing functions" {
let m = macro {
case {_} => {
var s = makeIdent("foo", null);
if (s.isIdentifier()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have number testing functions" {
let m = macro {
case {_} => {
var s = makeValue(42, null);
if (s.isNumericLiteral()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have string testing functions" {
let m = macro {
case {_} => {
var s = makeValue("foo", null);
if (s.isStringLiteral()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have boolean testing functions" {
let m = macro {
case {_} => {
var s = makeValue(true, null);
if (s.isBooleanLiteral()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have null testing functions" {
let m = macro {
case {_} => {
var s = makeValue(null, null);
if (s.isNullLiteral()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have keyword testing functions" {
let m = macro {
case {_} => {
var s = makeKeyword("for", null);
if (s.isKeyword()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have regexp testing functions" {
let m = macro {
case {_} => {
var s = makeRegex("abc", "i", null);
if (s.isRegularExpression()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have punctuator testing functions" {
let m = macro {
case {_} => {
var s = makePunc(";", null);
if (s.isPunctuator()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have punctuator testing functions" {
let m = macro {
case {_} => {
var s = makePunc(";", null);
if (s.isPunctuator()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have delimiter testing functions" {
let m = macro {
case {_} => {
var s = makeDelim("()", [], null);
if (s.isDelimiter()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
=======
it "should handle localExpand" {
let m = macro {
case {_ ($e ...) } => {
var e = localExpand(#{$e ...});
if (unwrapSyntax(e[0]) === 42) {
return #{true}
}
return #{false}
}
}
let id = macro { rule { $x } => { $x } }
expect(m (id 42)).to.be(true);
}
>>>>>>>
it "should handle localExpand" {
let m = macro {
case {_ ($e ...) } => {
var e = localExpand(#{$e ...});
if (unwrapSyntax(e[0]) === 42) {
return #{true}
}
return #{false}
}
}
let id = macro { rule { $x } => { $x } }
expect(m (id 42)).to.be(true);
}
}
describe "syntax objects" {
it "should have identifier testing functions" {
let m = macro {
case {_} => {
var s = makeIdent("foo", null);
if (s.isIdentifier()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have number testing functions" {
let m = macro {
case {_} => {
var s = makeValue(42, null);
if (s.isNumericLiteral()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have string testing functions" {
let m = macro {
case {_} => {
var s = makeValue("foo", null);
if (s.isStringLiteral()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have boolean testing functions" {
let m = macro {
case {_} => {
var s = makeValue(true, null);
if (s.isBooleanLiteral()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have null testing functions" {
let m = macro {
case {_} => {
var s = makeValue(null, null);
if (s.isNullLiteral()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have keyword testing functions" {
let m = macro {
case {_} => {
var s = makeKeyword("for", null);
if (s.isKeyword()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have regexp testing functions" {
let m = macro {
case {_} => {
var s = makeRegex("abc", "i", null);
if (s.isRegularExpression()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have punctuator testing functions" {
let m = macro {
case {_} => {
var s = makePunc(";", null);
if (s.isPunctuator()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have punctuator testing functions" {
let m = macro {
case {_} => {
var s = makePunc(";", null);
if (s.isPunctuator()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
}
it "should have delimiter testing functions" {
let m = macro {
case {_} => {
var s = makeDelim("()", [], null);
if (s.isDelimiter()) {
return #{true}
}
return #{false}
}
}
expect(m).to.be(true);
} |
<<<<<<<
util.assignDeep(parsed, options);
=======
if (options) { util.objectAssign(parsed, options, true); }
>>>>>>>
util.objectAssign(parsed, options, true); |
<<<<<<<
<BookingModal
selectedBooking={selectedBooking}
onCloseBooking={this.onCloseBooking}
onDeleteBooking={onDeleteBooking}
roomData={roomData}
user={decodedToken.email}
/>
</Fragment>
)}
</Fragment>
))} />
=======
</div>
<BookingModal
selectedBooking={selectedBooking}
onCloseBooking={this.onCloseBooking}
onDeleteBooking={onDeleteBooking}
/>
</div>
</div>
)}
</Fragment>
))} />
>>>>>>>
</div>
</div>
<BookingModal
selectedBooking={selectedBooking}
onCloseBooking={this.onCloseBooking}
onDeleteBooking={onDeleteBooking}
roomData={roomData}
user={decodedToken.email}
/>
</div>
)}
</Fragment>
))} />
<<<<<<<
<BookingModal
selectedBooking={selectedBooking}
onCloseBooking={this.onCloseBooking}
onDeleteBooking={onDeleteBooking}
roomData={roomData}
user={decodedToken.email}
/>
</Fragment>
)}
</Fragment>
)
)} />
=======
</div>
<BookingModal
selectedBooking={selectedBooking}
onCloseBooking={this.onCloseBooking}
onDeleteBooking={onDeleteBooking}
/>
</div>
)}
</Fragment>
)
)} />
>>>>>>>
</div>
<BookingModal
selectedBooking={selectedBooking}
onCloseBooking={this.onCloseBooking}
onDeleteBooking={onDeleteBooking}
roomData={roomData}
user={decodedToken.email}
/>
</div>
)}
</Fragment>
)
)} /> |
<<<<<<<
calendarDate: new Date(),
currentRoom: {
_id: '5a5c0d782b191c21b1eebf4e',
name: 'Room 1',
floor: '8',
capacity: 18,
bookings: [],
assets: {
whiteBoard: false,
opWalls: false,
tv: false,
projector: false,
pcLab: true,
macLab: false
},
__v: 0
}
=======
calendarDate: null,
selectedBooking: null,
filterParams: filterParams,
capacityParams: capacityParams,
floorParam: null,
availabilityParam: null,
filteredData: null,
checked: null,
currentRoom: initialRoom
>>>>>>>
calendarDate: new Date(),
selectedBooking: null,
filterParams: filterParams,
capacityParams: capacityParams,
floorParam: null,
availabilityParam: null,
filteredData: null,
checked: null,
currentRoom: initialRoom
<<<<<<<
setCalendarDate = date => {
=======
// set current selected calendar date
getCalendarDate = date => {
>>>>>>>
setCalendarDate = date => {
<<<<<<<
=======
onShowBooking = booking => {
const selectedBooking = booking
this.setState(() => ({ selectedBooking }))
}
onCloseBooking = () => {
this.setState(() => ({ selectedBooking: null }))
}
>>>>>>>
onShowBooking = booking => {
const selectedBooking = booking
this.setState(() => ({ selectedBooking }))
}
onCloseBooking = () => {
this.setState(() => ({ selectedBooking: null }))
} |
<<<<<<<
function BookingForm({ onMakeBooking, user, roomData, date, updateCalendar, onShowBooking, calendarDate }) {
=======
function BookingForm({ onMakeBooking, user, roomData, date, updateCalendar, onShowBooking }) {
// Disable sunday (day 0) on the calendar as an booking option
>>>>>>>
function BookingForm({ onMakeBooking, user, roomData, date, updateCalendar, onShowBooking, calendarDate }) {
// Disable sunday (day 0) on the calendar as an booking option
<<<<<<<
<Fragment>
<div className="header__page">
<h2 className="header__heading header__heading--sub">Level {roomData.floor} | {roomData.name}</h2>
</div>
<form className="form__grid form" onSubmit={event => {
event.preventDefault()
// Extract date array from current date in state
const dateArray = moment(date)
.format('Y M D')
.split(' ')
.map(item => parseInt(item, 10))
dateArray[1] = dateArray[1] - 1
// Data from input
const formData = event.target.elements
const roomId = roomData._id
// startDate data
const startTime = formatTime(formData.startTime.value)
const startDate = [...dateArray, ...startTime]
// endDate data
const endTime = formatTime(formData.endTime.value)
const endDate = [...dateArray, ...endTime]
const businessUnit = formData.business.value
const purpose = formData.purpose.value
const description = formData.description.value
onMakeBooking({ startDate, endDate, businessUnit, purpose, roomId })
}}>
<div className="content__calendar">
<Datetime dateFormat="YYYY-MM-DD" timeFormat={false} input={false} utc={true} isValidDate={valid} onChange={event => handleDate(event._d)} />
=======
<form
onSubmit={event => {
event.preventDefault()
// Extract date array from current date in state
const dateArray = moment(date).format('Y M D').split(' ').map(item => parseInt(item, 10))
dateArray[1] = dateArray[1] - 1
// Data from input
const formData = event.target.elements
const roomId = roomData._id
// startDate data
const startTime = formatTime(formData.startTime.value)
const startDate = [...dateArray, ...startTime]
// endDate data
const endTime = formatTime(formData.endTime.value)
const endDate = [...dateArray, ...endTime]
// Booking specifics
const businessUnit = formData.business.value
const recurringEnd = [parseInt(formData.year.value), parseInt(formData.month.value), parseInt(formData.day.value)]
const recurringType = formData.recurring.value
let recurringData = handleRecurringData(recurringType, recurringEnd)
const purpose = formData.purpose.value
const description = formData.description.value
onMakeBooking({ startDate, endDate, businessUnit, purpose, roomId, recurringData })
}}
>
<h2>{roomData.name}</h2>
<div className="date-container">
<div className="left-container">
<Datetime
dateFormat="YYYY-MM-DD"
timeFormat={false}
input={false}
utc={true}
isValidDate={valid}
onChange={event => handleDate(event._d)}
/>
>>>>>>>
<Fragment>
<div className="header__page">
<h2 className="header__heading header__heading--sub">Level {roomData.floor} | {roomData.name}</h2>
</div>
<form className="form__grid form" onSubmit={event => {
event.preventDefault()
// Extract date array from current date in state
const dateArray = moment(date)
.format('Y M D')
.split(' ')
.map(item => parseInt(item, 10))
dateArray[1] = dateArray[1] - 1
// Data from input
const formData = event.target.elements
const roomId = roomData._id
// startDate data
const startTime = formatTime(formData.startTime.value)
const startDate = [...dateArray, ...startTime]
// endDate data
const endTime = formatTime(formData.endTime.value)
const endDate = [...dateArray, ...endTime]
// Booking specifics
const businessUnit = formData.business.value
const recurringEnd = [parseInt(formData.year.value), parseInt(formData.month.value), parseInt(formData.day.value)]
const recurringType = formData.recurring.value
let recurringData = handleRecurringData(recurringType, recurringEnd)
const purpose = formData.purpose.value
const description = formData.description.value
onMakeBooking({ startDate, endDate, businessUnit, purpose, roomId, recurringData })
}}>
<div className="content__calendar">
<Datetime
dateFormat="YYYY-MM-DD"
timeFormat={false}
input={false}
utc={true}
isValidDate={valid}
onChange={event => handleDate(event._d)}
/>
<<<<<<<
<div className="form__group">
<label className="form__label">
{'Business Unit'}
<select name="business" defaultValue="Business Unit 1" className="form__input--select">
<option value="Business Unit 1">Business Unit 1</option>
<option value="Business Unit 2">Business Unit 2</option>
<option value="Business Unit 3">Business Unit 3</option>
<option value="Business Unit 4">Business Unit 4</option>
<option value="Business Unit 5">Business Unit 5</option>
</select>
</label>
</div>
<div className="form__group">
<label className="form__label">
{'Purpose'}
<select name="purpose" defaultValue="Scheduled Class" className="form__input--select">
<option value="Scheduled Class">Scheduled Class</option>
<option value="Special Event">Special Event</option>
<option value="Ad-hoc Event">Ad-hoc Event</option>
</select>
</label>
</div>
<div className="form__group">
<label className="form__label">
=======
<label>
{'Business Unit:'}
<select name="business" defaultValue="Business Unit 1">
<option value="Business Unit 1">Business Unit 1</option>
<option value="Business Unit 2">Business Unit 2</option>
<option value="Business Unit 3">Business Unit 3</option>
<option value="Business Unit 4">Business Unit 4</option>
<option value="Business Unit 5">Business Unit 5</option>
</select>
</label>
<label>
{'Recurring:'}
<select name="recurring" defaultValue="none">
<option value="none">non recurring</option>
<option value="daily">Daily</option>
<option value="weekly">Weekly</option>
<option value="monthly">Monthly</option>
</select>
</label>
<div className="time-selector">
<label>
{'Recurring End Year:'}
<input name="year" type="number"/>
</label>
<label>
{'Recurring End Month:'}
<input name="month" type="number"/>
</label>
<label>
{'Recurring End Day:'}
<input name="day" type="number"/>
</label>
</div>
<label>
{'Purpose:'}
<select name="purpose" defaultValue="Scheduled Class">
<option value="Scheduled Class">Scheduled Class</option>
<option value="Special Event">Special Event</option>
<option value="Ad-hoc Event">Ad-hoc Event</option>
</select>
</label>
<div className="time-selector">
<label>
>>>>>>>
<div className="form__group">
<label className="form__label">
{'Business Unit'}
<select name="business" defaultValue="Business Unit 1" className="form__input--select">
<option value="Business Unit 1">Business Unit 1</option>
<option value="Business Unit 2">Business Unit 2</option>
<option value="Business Unit 3">Business Unit 3</option>
<option value="Business Unit 4">Business Unit 4</option>
<option value="Business Unit 5">Business Unit 5</option>
</select>
</label>
</div>
<div className="form__group">
<label className="form__label">
{'Recurring'}
<select name="recurring" defaultValue="none">
<option value="none">Non recurring</option>
<option value="daily">Daily</option>
<option value="weekly">Weekly</option>
<option value="monthly">Monthly</option>
</select>
</label>
</div>
<div className="form__group">
<label className="form__label">
{'Recurring End Year'}
<input name="year" type="number"/>
</label>
</div>
<div className="form__group">
<label className="form__label">
{'Recurring End Month'}
<input name="month" type="number"/>
</label>
</div>
<div className="form__group">
<label className="form__label">
{'Recurring End Day'}
<input name="day" type="number"/>
</label>
</div>
</div>
<div className="form__group">
<label className="form__label">
{'Purpose'}
<select name="purpose" defaultValue="Scheduled Class" className="form__input--select">
<option value="Scheduled Class">Scheduled Class</option>
<option value="Special Event">Special Event</option>
<option value="Ad-hoc Event">Ad-hoc Event</option>
</select>
</label>
</div>
<div className="form__group">
<label className="form__label"> |
<<<<<<<
import RoomsList from './components/RoomsList'
=======
import BookingForm from './components/BookingForm'
>>>>>>>
import RoomsList from './components/RoomsList'
import BookingForm from './components/BookingForm'
<<<<<<<
decodedToken: getDecodedToken(), // retrieves the token from local storage if valid, else will be null
rooms: null
=======
decodedToken: getDecodedToken(), // retrieves the token from local storage if valid, else will be null
roomData: null,
currentRoom: {
name: 'Room 1',
id: "5a5c0d782b191c21b1eebf52",
floor: '8',
capacity: 18,
assets: {
pcLab: true
}
},
>>>>>>>
decodedToken: getDecodedToken(), // retrieves the token from local storage if valid, else will be null
roomData: null,
currentRoom: {
name: 'Room 1',
id: "5a5c0d782b191c21b1eebf52",
floor: '8',
capacity: 18,
assets: {
pcLab: true
}
},
<<<<<<<
const { decodedToken, rooms } = this.state
=======
const { decodedToken, currentRoom } = this.state
>>>>>>>
const { decodedToken, roomData, currentRoom } = this.state
<<<<<<<
{signedIn ? (
<div>
<h3>Signed in User: {decodedToken.email}</h3>
<button onClick={this.onSignOut}>Log Out</button>
<RoomsList rooms={rooms} />
</div>
) : (
<SignInForm onSignIn={this.onSignIn} />
)}
=======
{
signedIn ? (
<div>
<h3>Signed in User: {decodedToken.email}</h3>
<button onClick={ this.onSignOut } >Log Out</button>
<BookingForm user={decodedToken.email} roomData={currentRoom} onMakeBooking={this.onMakeBooking} />
</div>
) : (
<SignInForm onSignIn={ this.onSignIn } />
)
}
>>>>>>>
{
signedIn ? (
<div>
<h3>Signed in User: {decodedToken.email}</h3>
<button onClick={ this.onSignOut } >Log Out</button>
<RoomsList rooms={roomData} />
<BookingForm user={decodedToken.email} roomData={currentRoom} onMakeBooking={this.onMakeBooking} />
</div>
) : (
<SignInForm onSignIn={ this.onSignIn } />
)
}
<<<<<<<
.then(rooms => {
this.setState({ rooms })
=======
.then((rooms) => {
this.setState({ roomData: rooms})
console.log('Room data on state:', this.state.roomData)
>>>>>>>
.then(rooms => {
this.setState({ roomData: rooms })
console.log('Room data on state:', this.state.roomData) |
<<<<<<<
debug(this.moveable.events);
/*dojo.connect(this.moveable, 'onMouseDown', this.moveable, function(ev){*/
/*if(ev.button == 2 && conf.menu){*/
/*if(dojo.isFF){*/
/*// Firefox is weird. If a moveable is defined, it overrides*/
/*// the menu. Safari does not have this issue. Other browsers*/
/*// are untested.*/
/*var menu = dijit.byId(conf.menu);*/
/*menu._openMyself(ev);*/
/*ev.preventDefault();*/
/*ev.stopPropagation();*/
/*}*/
/*return false;*/
/*}*/
/*});*/
=======
console.log(this.moveable.events);
if (navigator.appVersion.indexOf("Mac")!=-1 && dojo.isFF) {
dojo.connect(this.moveable, 'onMouseDown', this.moveable, function(ev){
if(ev.button == 2 && conf.menu){
// Firefox is weird. If a moveable is defined, it overrides
// the menu. Safari does not have this issue. Other browsers
// are untested.
var menu = dijit.byId(conf.menu);
menu._openMyself(ev);
ev.preventDefault();
ev.stopPropagation();
}
});
}
>>>>>>>
if (navigator.appVersion.indexOf("Mac")!=-1 && dojo.isFF) {
dojo.connect(this.moveable, 'onMouseDown', this.moveable, function(ev){
if(ev.button == 2 && conf.menu){
// Firefox is weird. If a moveable is defined, it overrides
// the menu. Safari does not have this issue. Other browsers
// are untested.
var menu = dijit.byId(conf.menu);
menu._openMyself(ev);
ev.preventDefault();
ev.stopPropagation();
}
});
} |
<<<<<<<
var queuerow = n.parentNode.parentNode.parentNode.parentNode.parentNode.rows[n.parentNode.parentNode.parentNode.parentNode.rowIndex - 2];
=======
var thistable = n.parentNode;
var queuerow = n.parentNode.parentNode.parentNode.parentNode.rows[n.parentNode.parentNode.parentNode.rowIndex - 2];
>>>>>>>
var thistable = n.parentNode;
var queuerow = n.parentNode.parentNode.parentNodeparentNode.parentNode.rows[n.parentNode.parentNodeparentNode.parentNode.rowIndex - 2];
<<<<<<<
var queuerow = n.parentNode.parentNode.parentNode.parentNode.parentNode.rows[n.parentNode.parentNode.parentNode.parentNode.rowIndex - 2];
=======
var thistable = n.parentNode;
var queuerow = n.parentNode.parentNode.parentNode.parentNode.rows[n.parentNode.parentNode.parentNode.rowIndex - 2];
>>>>>>>
var thistable = n.parentNode;
var queuerow = n.parentNode.parentNode.parentNode.parentNode.parentNode.rows[n.parentNode.parentNode.parentNode.parentNode.rowIndex - 2]; |
<<<<<<<
bunnies: {
key: "bunnies",
title: "Graph Databases for Bunnies",
type: "video",
author: "rvanbruggen",
thumbnail: asset("img/still/bunnies.png"),
introText: "Rik collected the <a href='http://blog.neo4j.org/2013/06/graphs-for-bunnies.html'>top ten questions about graph databases</a> and presents answers in this awesome slidecast.",
src: "http://player.vimeo.com/video/68035671"
},
importing_sample_data: {
=======
strata: {
key : "strata",
title: "Intro to Graph Databases, Emil Eifrem interviewed at Strata 2013",
type: "video",
author: "emileifrem",
thumbnail: "/assets/img/still/emil_strata_2013.gif",
introText: "Our CEO Emil Eifrem explains Graph Databases, Neo4j and the bigger NOSQL landscape",
src: "http://www.youtube.com/embed/GVkTBNgRrfw"
},
importing_sample_data : {
>>>>>>>
bunnies: {
key: "bunnies",
title: "Graph Databases for Bunnies",
type: "video",
author: "rvanbruggen",
thumbnail: asset("img/still/bunnies.png"),
introText: "Rik collected the <a href='http://blog.neo4j.org/2013/06/graphs-for-bunnies.html'>top ten questions about graph databases</a> and presents answers in this awesome slidecast.",
src: "http://player.vimeo.com/video/68035671"
},
strata: {
key : "strata",
title: "Intro to Graph Databases, Emil Eifrem interviewed at Strata 2013",
type: "video",
author: "emileifrem",
thumbnail: "/assets/img/still/emil_strata_2013.gif",
introText: "Our CEO Emil Eifrem explains Graph Databases, Neo4j and the bigger NOSQL landscape",
src: "http://www.youtube.com/embed/GVkTBNgRrfw"
},
importing_sample_data : {
<<<<<<<
price: "Free Ebook, Print $29.99",
logo: asset("img/books/graphdatabases_cover.gif"),
thumbnail: asset("img/books/graphdatabases_thumb.gif"),
introText: '<a href="http://graphdatabases.com">First Edition Now Available!</a> Get the definitive book on graph databases</em>, published by O'Reilly Media.<br />',
=======
price: "Early Release Ebook, free",
logo: asset("img/books/graphdatabases_v31.gif"),
thumbnail: asset("img/books/graphdatabases_small.gif"),
introText: '<a href="http://graphdatabases.com">Exclusive early access</a> to the definitive book on graph databases</em>, published by O"Reilly Media.<br />',
text: "Graph Databases, published by O’Reilly Media, discusses the problems that are well aligned with graph databases, " +
"with examples drawn from practical, real-world use cases. This book also looks at the ecosystem of complementary technologies, " +
"highlighting what differentiates graph databases from other database technologies, both relational and NOSQL. Graph Databases " +
"is written by Ian Robinson, Jim Webber, and Emil Eifrém, graph experts and enthusiasts at Neo Technology, creators of Neo4j.",
>>>>>>>
price: "Free Ebook, Print $29.99",
logo: asset("img/books/graphdatabases_cover.gif"),
thumbnail: asset("img/books/graphdatabases_thumb.gif"),
introText: '<a href="http://graphdatabases.com">First Edition Now Available!</a> Get the definitive book on graph databases</em>, published by O'Reilly Media.<br />',
text: "Graph Databases, published by O’Reilly Media, discusses the problems that are well aligned with graph databases, " +
"with examples drawn from practical, real-world use cases. This book also looks at the ecosystem of complementary technologies, " +
"highlighting what differentiates graph databases from other database technologies, both relational and NOSQL. Graph Databases " +
"is written by Ian Robinson, Jim Webber, and Emil Eifrém, graph experts and enthusiasts at Neo Technology, creators of Neo4j.", |
<<<<<<<
} from '@plexis/without-diacritics';
export {default as isAlpha} from '@plexis/is-alpha';
=======
} from '@plexis/without-diacritics';
export {default as isLowerCase, default as isLower} from '@plexis/is-lowercase';
>>>>>>>
} from '@plexis/without-diacritics';
export {default as isAlpha} from '@plexis/is-alpha';
export {default as isLowerCase, default as isLower} from '@plexis/is-lowercase'; |
<<<<<<<
export {default as startsWith} from '@plexis/starts-with';
export {
default as distance,
default as calcLevenshtein,
default as levenshtein
} from '@plexis/distance';
=======
export {default as startsWith} from '@plexis/starts-with';
export {default as isString} from '@plexis/is-string';
>>>>>>>
export {default as startsWith} from '@plexis/starts-with';
export {
default as distance,
default as calcLevenshtein,
default as levenshtein
} from '@plexis/distance';
export {default as isString} from '@plexis/is-string'; |
<<<<<<<
function getCategoryValues (definitionsElement) {
var categoryValues = [];
var categoryElements = definitionsElement.getElementsByTagNameNS(NS_BPMN_SEMANTIC, "categoryValue");
if (categoryElements.length != 0) {
for (var index = 0; index < categoryElements.length; index++) {
var value = createBpmnObject(categoryElements[index], null, []);
categoryValues.push(value);
}
}
return categoryValues;
}
=======
function getDataAssociations(definitionsElement, bpmnDiElementIndex) {
var associations = [];
var inputAssociationElements = definitionsElement.getElementsByTagNameNS(NS_BPMN_SEMANTIC, "dataInputAssociation");
var outputAssociationElements = definitionsElement.getElementsByTagNameNS(NS_BPMN_SEMANTIC, "dataOutputAssociation");
for (var j = 0, inputElement; !!(inputElement = inputAssociationElements[j]); j++) {
associations.push(createBpmnObject(inputElement, null, bpmnDiElementIndex));
}
for (var k = 0, outputElement; !!(outputElement = outputAssociationElements[k]); k++) {
associations.push(createBpmnObject(outputElement, null, bpmnDiElementIndex));
}
return associations;
}
function getMessages(definitionsElement, bpmnDiElementIndex) {
var messages = [];
var messageElements = definitionsElement.getElementsByTagNameNS(NS_BPMN_SEMANTIC, "message");
for (var i = 0; i < messageElements.length; i++) {
var m = createBpmnObject(messageElements[i], null, bpmnDiElementIndex);
messages.push(m);
}
return messages;
}
>>>>>>>
function getCategoryValues (definitionsElement) {
var categoryValues = [];
var categoryElements = definitionsElement.getElementsByTagNameNS(NS_BPMN_SEMANTIC, "categoryValue");
if (categoryElements.length != 0) {
for (var index = 0; index < categoryElements.length; index++) {
var value = createBpmnObject(categoryElements[index], null, []);
categoryValues.push(value);
}
}
return categoryValues;
}
function getDataAssociations(definitionsElement, bpmnDiElementIndex) {
var associations = [];
var inputAssociationElements = definitionsElement.getElementsByTagNameNS(NS_BPMN_SEMANTIC, "dataInputAssociation");
var outputAssociationElements = definitionsElement.getElementsByTagNameNS(NS_BPMN_SEMANTIC, "dataOutputAssociation");
for (var j = 0, inputElement; !!(inputElement = inputAssociationElements[j]); j++) {
associations.push(createBpmnObject(inputElement, null, bpmnDiElementIndex));
}
for (var k = 0, outputElement; !!(outputElement = outputAssociationElements[k]); k++) {
associations.push(createBpmnObject(outputElement, null, bpmnDiElementIndex));
}
return associations;
}
function getMessages(definitionsElement, bpmnDiElementIndex) {
var messages = [];
var messageElements = definitionsElement.getElementsByTagNameNS(NS_BPMN_SEMANTIC, "message");
for (var i = 0; i < messageElements.length; i++) {
var m = createBpmnObject(messageElements[i], null, bpmnDiElementIndex);
messages.push(m);
}
return messages;
} |
<<<<<<<
var id = '-not-found-';
=======
var id = 'unknown-vid';
var url = VIDEO_BASE + id;
>>>>>>>
var id = 'unknown-vid'; |
<<<<<<<
ytdl.getInfo(id, function(err, info) {
if (err) return done(err);
=======
ytdl.getInfo(url, function(err, info) {
assert.ifError(err);
>>>>>>>
ytdl.getInfo(id, function(err, info) {
assert.ifError(err);
<<<<<<<
var scope = nock(id, { get_video_info: true });
ytdl.getInfo(id, function(err) {
assert.ok(err);
=======
var scope = nock(id);
ytdl.getInfo(url, function(err) {
>>>>>>>
var scope = nock(id);
ytdl.getInfo(id, function(err) {
<<<<<<<
ytdl.getInfo(id, function(err, info) {
if (err) return done(err);
=======
ytdl.getInfo(url, function(err, info) {
assert.ifError(err);
>>>>>>>
ytdl.getInfo(id, function(err, info) {
assert.ifError(err); |
<<<<<<<
// memory store
this.store = {
jwt_token: null,
};
=======
// use external storage?
if(config.storage) {
this.storage = config.storage
} else {
this.storage = localStorage;
}
this.inMemory = {
jwt_token: null,
user_id: null,
exp: null,
};
>>>>>>>
// use external storage?
if(config.storage) {
this.storage = config.storage
} else {
this.storage = localStorage;
}
this.inMemory = {
jwt_token: null,
user_id: null,
exp: null,
};
<<<<<<<
=======
>>>>>>>
<<<<<<<
this.store = {
jwt_token,
};
=======
this.storage.clear();
this.storage.setItem('refetch_token', refetch_token);
this.storage.setItem('user_id', user_id);
this.inMemory['jwt_token'] = jwt_token;
this.inMemory['user_id'] = user_id;
this.inMemory['exp'] = (parseInt(claims.exp, 10) * 1000);
>>>>>>>
this.storage.clear();
this.storage.setItem('refetch_token', refetch_token);
this.storage.setItem('user_id', user_id);
this.inMemory['jwt_token'] = jwt_token;
this.inMemory['user_id'] = user_id;
this.inMemory['exp'] = (parseInt(claims.exp, 10) * 1000);
<<<<<<<
return this.store.jwt_token;
=======
return this.inMemory['jwt_token'];
>>>>>>>
return this.inMemory['jwt_token'];
<<<<<<<
async refreshToken() {
=======
async refetchToken() {
const user_id = this.storage.getItem('user_id');
const refetch_token = this.storage.getItem('refetch_token');
if (!user_id || !refetch_token) {
return this.logout();
}
>>>>>>>
async refetchToken() {
const user_id = this.storage.getItem('user_id');
const refetch_token = this.storage.getItem('refetch_token');
if (!user_id || !refetch_token) {
return this.logout();
}
<<<<<<<
return await this.logout();
=======
return this.logout();
>>>>>>>
return await this.logout();
<<<<<<<
async logout(all = false) {
window.localStorage.setItem('logout', Date.now())
if (all) {
const req = await axios(`${this.endpoint}/auth/logout-all`, {
method: 'post',
withCredentials: true,
});
} else {
const req = await axios(`${this.endpoint}/auth/logout`, {
method: 'post',
withCredentials: true,
});
}
this.clearStore();
=======
logout() {
this.inMemory = {
jwt_token: null,
user_id: null,
exp: null,
};
this.storage.clear();
>>>>>>>
async logout(all = false) {
window.localStorage.setItem('logout', Date.now())
if (all) {
const req = await axios(`${this.endpoint}/auth/logout-all`, {
method: 'post',
withCredentials: true,
});
} else {
const req = await axios(`${this.endpoint}/auth/logout`, {
method: 'post',
withCredentials: true,
});
}
this.inMemory = {
jwt_token: null,
user_id: null,
exp: null,
};
this.storage.clear(); |
<<<<<<<
"CREATE TABLE IF NOT EXISTS users(user_id INTEGER PRIMARY KEY, username TEXT UNIQUE NOT NULL, password TEXT NOT NULL);" +
"CREATE TABLE IF NOT EXISTS tokens(token TEXT PRIMARY KEY, timestamp INT DEFAULT (strftime('%s','now')), user_id INTEGER REFERENCES users(user_id));" +
"CREATE TABLE IF NOT EXISTS queries(query_id INTEGER PRIMARY KEY, query TEXT NOT NULL, timestamp INT DEFAULT (strftime('%s','now')), user_id INTEGER REFERENCES users(user_id));" +
"CREATE TABLE IF NOT EXISTS responses(query_id INTEGER PRIMARY KEY REFERENCES queries(query_id), response TEXT NOT NULL, skill TEXT NOT NULL);" +
"CREATE TABLE IF NOT EXISTS global_settings(key TEXT PRIMARY KEY, value TEXT);" +
"CREATE TABLE IF NOT EXISTS skill_settings(skill TEXT NOT NULL, key TEXT NOT NULL, value TEXT, PRIMARY KEY(skill, key));" +
"CREATE TABLE IF NOT EXISTS user_settings(user_id INTEGER REFERENCES users(user_id), skill TEXT NOT NULL, key TEXT NOT NULL, value TEXT, PRIMARY KEY(user_id, skill, key));" +
"CREATE TABLE IF NOT EXISTS version(version INTEGER);"
function * getVersion() {
return new Promise(function (resolve, reject) {
db.get("SELECT * FROM version LIMIT 1", function(err, row) {
if (err) {
reject(err)
} else {
if (row) {
resolve(row.version)
} else {
resolve(0)
}
}
})
})
}
function * setVersion(version) {
return new Promise(function (resolve, reject) {
db.get("INSERT OR REPLACE INTO version(version) VALUES (?)", version, function(err, row) {
if (err) {
reject(err)
} else {
resolve()
}
})
})
}
function * databaseV1Setup() {
return new Promise(function (resolve, reject) {
db.run("ALTER TABLE users ADD is_admin INTEGER DEFAULT 0", function (err) {
if (err) {
reject(err)
} else {
resolve()
}
})
})
}
=======
'CREATE TABLE IF NOT EXISTS users(user_id INTEGER PRIMARY KEY, username TEXT UNIQUE NOT NULL, password TEXT NOT NULL);' +
'CREATE TABLE IF NOT EXISTS tokens(token TEXT PRIMARY KEY, timestamp INT DEFAULT (strftime(\'%s\',\'now\')), user_id INTEGER REFERENCES users(user_id));' +
'CREATE TABLE IF NOT EXISTS queries(query_id INTEGER PRIMARY KEY, query TEXT NOT NULL, timestamp INT DEFAULT (strftime(\'%s\',\'now\')), user_id INTEGER REFERENCES users(user_id));' +
'CREATE TABLE IF NOT EXISTS responses(query_id INTEGER PRIMARY KEY REFERENCES queries(query_id), response TEXT NOT NULL, skill TEXT NOT NULL);' +
'CREATE TABLE IF NOT EXISTS global_settings(key TEXT PRIMARY KEY, value TEXT);' +
'CREATE TABLE IF NOT EXISTS skill_settings(skill TEXT NOT NULL, key TEXT NOT NULL, value TEXT, PRIMARY KEY(skill, key));' +
'CREATE TABLE IF NOT EXISTS user_settings(user_id INTEGER REFERENCES users(user_id), skill TEXT NOT NULL, key TEXT NOT NULL, value TEXT, PRIMARY KEY(user_id, skill, key));'
>>>>>>>
'CREATE TABLE IF NOT EXISTS users(user_id INTEGER PRIMARY KEY, username TEXT UNIQUE NOT NULL, password TEXT NOT NULL);' +
'CREATE TABLE IF NOT EXISTS tokens(token TEXT PRIMARY KEY, timestamp INT DEFAULT (strftime(\'%s\',\'now\')), user_id INTEGER REFERENCES users(user_id));' +
'CREATE TABLE IF NOT EXISTS queries(query_id INTEGER PRIMARY KEY, query TEXT NOT NULL, timestamp INT DEFAULT (strftime(\'%s\',\'now\')), user_id INTEGER REFERENCES users(user_id));' +
'CREATE TABLE IF NOT EXISTS responses(query_id INTEGER PRIMARY KEY REFERENCES queries(query_id), response TEXT NOT NULL, skill TEXT NOT NULL);' +
'CREATE TABLE IF NOT EXISTS global_settings(key TEXT PRIMARY KEY, value TEXT);' +
'CREATE TABLE IF NOT EXISTS skill_settings(skill TEXT NOT NULL, key TEXT NOT NULL, value TEXT, PRIMARY KEY(skill, key));' +
'CREATE TABLE IF NOT EXISTS user_settings(user_id INTEGER REFERENCES users(user_id), skill TEXT NOT NULL, key TEXT NOT NULL, value TEXT, PRIMARY KEY(user_id, skill, key));' +
'CREATE TABLE IF NOT EXISTS version(version INTEGER);'
function * getVersion() {
return new Promise((resolve, reject) => {
db.get('SELECT * FROM version LIMIT 1', function(err, row) {
if (err) {
reject(err)
} else {
if (row) {
resolve(row.version)
} else {
resolve(0)
}
}
})
})
}
function * setVersion(version) {
return new Promise((resolve, reject) => {
db.get('INSERT OR REPLACE INTO version(version) VALUES (?)', version, function(err, row) {
if (err) {
reject(err)
} else {
resolve()
}
})
})
}
function * databaseV1Setup() {
return new Promise((resolve, reject) => {
db.run('ALTER TABLE users ADD is_admin INTEGER DEFAULT 0', function (err) {
if (err) {
reject(err)
} else {
resolve()
}
})
})
}
<<<<<<<
const is_admin = (user.is_admin) ? user.is_admin : 0
return new Promise(function (resolve, reject) {
=======
return new Promise((resolve, reject) => {
>>>>>>>
const is_admin = (user.is_admin) ? user.is_admin : 0
return new Promise((resolve, reject) => {
<<<<<<<
db.run("UPDATE users SET username=?,password=?,is_admin=? WHERE user_id=?", user.username, user.password, is_admin, dbuser.user_id, function(err) {
=======
db.run('UPDATE users SET username=?,password=? WHERE user_id=?', user.username, user.password, dbuser.user_id, err => {
>>>>>>>
db.run('UPDATE users SET username=?,password=?,is_admin=? WHERE user_id=?', user.username, user.password, is_admin, dbuser.user_id, (err) => {
<<<<<<<
db.run("INSERT INTO users(username, password, is_admin) VALUES(?, ?, ?)", user.username, user.password, is_admin, function(err) {
=======
db.run('INSERT INTO users(username, password) VALUES(?, ?)', user.username, user.password, err => {
>>>>>>>
db.run('INSERT INTO users(username, password, is_admin) VALUES(?, ?, ?)', user.username, user.password, is_admin, (err) => {
<<<<<<<
const base = "SELECT skill, key, value FROM skill_settings"
const query = makeConditionalQuery(base, ['skill = ?', 'key = ?'], [skill, key])
return yield allQueryWrapper(query.query, query.values, key)
=======
return new Promise((resolve, reject) => {
db.get('SELECT value FROM skill_settings WHERE skill = ? AND key = ?', skill, key, (err, row) => {
if (err) {
reject(err)
} else if (row) {
resolve(JSON.parse(row.value))
} else {
resolve(undefined)
}
})
})
>>>>>>>
const base = 'SELECT skill, key, value FROM skill_settings'
const query = makeConditionalQuery(base, ['skill = ?', 'key = ?'], [skill, key])
return yield allQueryWrapper(query.query, query.values, key)
<<<<<<<
const base = 'SELECT key, value FROM global_settings'
const query = makeConditionalQuery(base, ['key = ?'], [key])
return yield allQueryWrapper(query.query, query.values, key)
=======
return new Promise((resolve, reject) => {
db.get('SELECT value FROM global_settings WHERE key = ?', key, (err, row) => {
if (err) {
reject(err)
} else if (row) {
resolve(JSON.parse(row.value))
} else {
resolve(undefined)
}
})
})
>>>>>>>
const base = 'SELECT key, value FROM global_settings'
const query = makeConditionalQuery(base, ['key = ?'], [key])
return yield allQueryWrapper(query.query, query.values, key)
<<<<<<<
=======
/* co(function * () {
const val = yield getUserFromName("demo")
console.log(val)
val.password = 'new_password'
yield saveUser(val)
yield setValue('timer', val, 'setting1', { val: 'value1'})
console.log(yield getValue('timer', val, 'setting1'))
yield setSkillValue('timer', 'setting1', { val: 'value1'})
console.log(yield getSkillValue('timer', 'setting1'))
yield setGlobalValue('setting1', { val: 'value1'})
console.log(yield getGlobalValue('setting1'))
yield addToken(val, "sdkjhfksdhfkjsdhfkjsdhf")
console.log(yield getUserFromToken("sdkjhfksdhfkjsdhfkjsdhf"))
yield addToken(val, "76853746tiuhsdfgjh")
console.log(yield getUserTokens(val))
}).catch(err => {
console.log(err)
throw err
}) */
>>>>>>> |
<<<<<<<
function * registerClient(socket) {
socket.on('get_name', function(msg) {
socket.emit('get_name', {name: name})
=======
function registerClient(socket) {
socket.on('get_name', msg => {
socket.emit('get_name', {name})
>>>>>>>
function * registerClient(socket) {
socket.on('get_name', msg => {
socket.emit('get_name', {name: name}) |
<<<<<<<
=======
var typeHandlers = {
'string': function(value) {
return value;
},
'date': function(value) {
return new Date(Date.parse(value) || Date.now());
},
'boolean': function(value) {
if (value === '') {
return true;
}
return value === 'false' ? false : !!value;
},
'number': function(value) {
var floatVal = parseFloat(value);
return (String(floatVal) === value) ? floatVal : value;
},
'object': function(value, defaultValue) {
if (!defaultValue) {
return value;
}
try {
// If the string is an object, we can parse is with the JSON library.
// include convenience replace for single-quotes. If the author omits
// quotes altogether, parse will fail.
return JSON.parse(value.replace(/'/g, '"'));
} catch(e) {
// The object isn't valid JSON, return the raw value
return value;
}
}
};
>>>>>>>
var typeHandlers = {
'string': function(value) {
return value;
},
'date': function(value) {
return new Date(Date.parse(value) || Date.now());
},
'boolean': function(value) {
if (value === '') {
return true;
}
return value === 'false' ? false : !!value;
},
'number': function(value) {
var floatVal = parseFloat(value);
return (String(floatVal) === value) ? floatVal : value;
},
'object': function(value, defaultValue) {
if (!defaultValue) {
return value;
}
try {
// If the string is an object, we can parse is with the JSON library.
// include convenience replace for single-quotes. If the author omits
// quotes altogether, parse will fail.
return JSON.parse(value.replace(/'/g, '"'));
} catch(e) {
// The object isn't valid JSON, return the raw value
return value;
}
}
};
<<<<<<<
Polymer.installInstanceAttributes = installInstanceAttributes;
=======
>>>>>>>
Polymer.installInstanceAttributes = installInstanceAttributes; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.