var SignupForm = form.Form.extend({
username: forms.CharField(),
/**
* @param {function(err, field, errorMessages)} cb
*/
cleanUsernameAsync: function(cb) {
// Return false to indicate that no async validation is being performed -
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>React <FilteredMultiSelect/></title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css"> | |
<script src="http://fb.me/react-0.12.2.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.12.2.js"></script> | |
<Script src="react-filtered-multiselect-single.js"></script> |
This file contains hidden or 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
void function() { 'use strict'; | |
var cx = (staticClasses, conditionalClasses) => { | |
var classNames = [] | |
if (typeof conditionalClasses == 'undefined') { | |
conditionalClasses = staticClasses | |
} | |
else { | |
classNames.push(staticClasses) | |
} |
This file contains hidden or 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
const path = require('path'); | |
const watchify = require('watchify'); | |
const browserify = require('browserify'); | |
const gulp = require('gulp'); | |
const changed = require('gulp-changed'); | |
const through2 = require('through2'); | |
const gutil = require('gulp-util'); | |
const source = require('vinyl-source-stream'); | |
import webidlClassGenerator from 'webidl-class-generator'; |
This file contains hidden or 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
<Form form={ProductForm} ref="productForm"> | |
<GridLayout> | |
<Row span="4"> | |
<Field name="productName" span="3"/> | |
<Field name="tags"/> | |
</Row> | |
<Row> | |
<Field name="vendor"/> | |
<Field name="productType"/> | |
</Row> |
This file contains hidden or 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 {Route, RouteHandler} = ReactRouter | |
var App = React.createClass({ | |
contextTypes: { | |
getRouteAtDepth: React.PropTypes.func.isRequired, | |
routeHandlers: React.PropTypes.array.isRequired | |
}, | |
render() { | |
var route = this.context.getRouteAtDepth(this.context.routeHandlers.length - 1) |
This file contains hidden or 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
/** | |
* Returns a function with a .cancel() function which can be used to prevent the | |
* given function from being called. | |
* | |
* Use case: triggering an asyncronous function with new data while an existing | |
* function for the same task but with old data is still pending a callback, so | |
* the callback only gets called for the last one to run. | |
*/ | |
function cancellable(func) { | |
var cancelled = false |
This file contains hidden or 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 CULTURE_SHIP_NAMES = [ | |
"5*Gelish-Oplule" | |
, "7*Uagren" | |
, "8*Churkun" | |
, "8401.00 Partial Photic Boundary" | |
, "A Fine Disregard for Awkward Facts" | |
, "A Momentary Lapse Of Sanity" | |
, "A Series Of Unlikely Explanations" | |
, "A Ship With A View" | |
, "Abalule-Sheliz" |
This file contains hidden or 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
.d$b. .d$b. .d$$$$$$b. .d$$$$$$b. .d$$$$$$b. .d$b..d$$$$$$$$b. | |
$$$$$..$$$$$.$$$$$$$$$$$b .$$$$$$$$$$$b $$$$$$$$$$b $$$$$$$$$$$$$$$P' | |
$$$$$$$$$$$$d$$$$$$$$$$$$bd$$$$$$$$$$$$b$$$$$$$$$$$b$$$$$$$$$$$$$$$b. | |
$$$$$$$$$$$$Q$$$$$$$$$$$$PQ$$$$$$$$$$$$P$$$$$$$$$$$P$$$$$$$$$$$$$$$P' | |
$$$$$´`$$$$$'$$$$$$$$$$$$''$$$$$$$$$$$$'$$$$$$$$$$P $$$$$$$$$$$$$$$b. | |
'Q$P' 'Q$P' 'Q$$$$$$P' 'Q$$$$$$P' 'Q$$$$$$$P 'Q$P''Q$$$$$$$$P' | |
Version: 0.6.3 (node v0.10.31, npm 2.1.7, platform: win32) | |
[hoodie] The npm registry is available |
This file contains hidden or 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 gulp = require('gulp') | |
var shell = require('gulp-shell') | |
gulp.task('build-docs', shell.task('make html', {cwd: './docs'})) | |
gulp.task('docs', ['build-docs'], function() { | |
gulp.watch(['./docs/*.rst', './docs/*.py'], ['build-docs']) | |
}) |