This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onEditorKeyUp: function(e) { | |
var intercepted = this.interceptKeyUpDownEventsForSuggestionView(e,false); | |
if ( !intercepted ) { | |
this.handleModifiedSuggestionsUnwrapping(); | |
this.startAutosaveTimerIfWordKey(e); | |
// /!\ The suggestion dropdown must absolutely be bound to keyup (and not keydown) | |
// because the currently typed char is not yet inserted in the editor! | |
this.maybeShowSuggestionsDropdownView(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var browserify = require('browserify'); | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var handleErrors = require('../util/handleErrors'); | |
var source = require('vinyl-source-stream'); | |
var wrench = require('wrench'); | |
var path = require('path'); | |
var fs = require('fs'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Stamples = React.createClass({ | |
mixins: [ScrollbarNearBottomMixin], | |
NumberOfItemsParPage: 10, | |
propTypes: { | |
appState: React.PropTypes.object.isRequired, | |
updateAppState: React.PropTypes.func.isRequired |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_readableState":{ | |
"highWaterMark":16384, | |
"buffer":[ | |
], | |
"length":0, | |
"pipes":null, | |
"pipesCount":0, | |
"flowing":false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Spaces = React.createClass({ | |
propTypes: { | |
appState: React.PropTypes.object.isRequired, | |
updateAppState: React.PropTypes.func.isRequired | |
}, | |
// TODO temporary to fluidify the carousel swipes, probably not so good | |
shouldComponentUpdate: function(nextProps,nextState) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var React = require("react/addons"); | |
var Q = require("q"); | |
var Main = require("components/layout/main"); | |
var CurrentUserService = require("services/currentUserService"); | |
var ApiRequestSessionHolder = require("repositories/utils/apiRequestSessionHolder"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AppState = function() { }; | |
AppState.prototype = { | |
updateAppState: function(updateFunction) { | |
console.debug("before updating:",this); | |
console.debug("before updating:",this.prototype.constructor); | |
console.debug("before updating:",this.constructor); | |
console.debug("before updating:",new this.constructor()); | |
console.debug("before updating:",new this.prototype.constructor()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AppState = function() { }; | |
AppState.prototype = { | |
updateAppState: function(updateFunction) { | |
console.debug("before updating:",this); | |
console.debug("before updating:",this.constructor); | |
console.debug("before updating:",new this.constructor()); | |
console.debug("before updating:",new this.prototype.constructor()); | |
Preconditions.checkMandatoryParameter(updateFunction,"updateFunction is required"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var React = require("react/addons"); | |
var DeepFreeze = require("common/deepFreeze"); | |
var AtomUtils = require("state/atom/atomUtils"); | |
var AtomCursor = require("state/atom/atomCursor"); | |
function noop() { } // Convenient but probably not performant: TODO ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setupAsyncValueSwapping(atom,path,asyncValue,promise) { | |
var deferred = Q.defer(); | |
promise | |
.then(function asyncCompletionSuccess(data) { | |
var swapped = atom.compareAndSwapPathValue(path,asyncValue,asyncValue.toSuccess(data)); | |
if ( swapped ) { | |
deferred.resolve(data); | |
} else { | |
deferred.reject(new Error("Async value completion for path "+path+" but swap=false")); |
OlderNewer