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 StateCacheMixin = function(key) { | |
if (!Modernizr.sessionstorage) { | |
return {}; | |
} | |
return { | |
componentWillMount: function() { | |
var prevState = sessionStorage.getItem(key); | |
if (prevState === null) return; | |
try { | |
prevState = JSON.parse(prevState); |
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
const PENDING = 0; | |
const FULFILLED = 1; | |
const REJECTED = 2; | |
function PromiseState(component, stateKey, initial) { | |
this.component = component; | |
this.stateKey = stateKey; | |
var self = this; |
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 Fluxxor = require('fluxxor'); | |
var request = require('superagent'); | |
var AuthStore = Fluxxor.createStore({ | |
actions: { | |
"LOGIN_AUTH": "onLoginAuth", | |
}, | |
initialize: function() { | |
this.currentUser = {}; |
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
/** | |
* @jsx React.DOM | |
*/ | |
// Parent | |
var React = require('react'), | |
BlockItemView = require('./BlockItemView.jsx'); | |
module.exports = BlockView = React.createClass({displayName: 'BlockView', |
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
<html> | |
<head> | |
<script src="https://maps.googleapis.com/maps/api/js?sensor=false" ></script> | |
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script src="http://fb.me/react-0.8.0.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.8.0.js"></script> | |
<script type='text/jsx'> | |
/** @jsx React.DOM */ | |
ExampleGoogleMap = React.createClass({ | |
getDefaultProps: function () { |
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 _missing= function(data){ return React.DOM.pre(null, "Route not found: "+ data.route) }, | |
_router= null, | |
_started= false, | |
_nextId= 1; | |
function handleRouteChange(container, component) { | |
var routeParams= Array.prototype.slice.call( arguments, 1 ) | |
React.renderComponent( | |
component({ routeParams:routeParams }, null), | |
container |
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
/** | |
* Linkurious 2012, all rights reserved. | |
* Sébastien Heymann <[email protected]>, | |
* Romain Yon <[email protected]> | |
* | |
* Please use http://jsbeautifier.org/ and indent with 2 spaces. | |
* | |
* Lib docs: | |
* http://twitter.github.com/bootstrap/ | |
* http://docs.jquery.com/ |
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
DO WTF YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Alexey Silin <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WTF YOU WANT TO PUBLIC LICENSE |
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
/** | |
* Note: the following function should already exist in your application delegate file. | |
* Replace it with the following implementation. | |
* | |
* Thanks to @purplecabbage for implementation. | |
* Thanks to Ruddiger for the iFrame patch. | |
*/ | |
// ... |