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
<script type="text/javascript"> | |
$(document).ready(function(){ | |
var edit = document.getElementById('edit'); | |
$(edit).blur(function() { | |
localStorage.setItem('todoData', this.innerHTML); | |
}); |
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
App::before(function($request) | |
{ | |
$key = Str::slug($request->url()); | |
if(Cache::has($key)) return Cache::get($key); | |
}); | |
App::after(function($request, $response) | |
{ | |
$key = Str::slug($request->url()); |
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 */ | |
import React from 'react' | |
import {itemHandlerMixin} from '/widgets/mixins' | |
import $ from 'jquery' | |
export var socialEmbed = React.createClass({ | |
getInitialState: function(){ | |
return this.props.config || {active: {twitter: false, facebook: false,google: false, instagram: false }, twitter: { url: '',html: '' }, facebook: { url: '' }, google: { url: '' }, instagram: { url: '' } } |
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 */ | |
import React from 'react'; | |
import {uploadImageBlob} from 'appicus'; | |
export var crop = React.createClass({ | |
contextTypes: { | |
site: React.PropTypes.object | |
}, | |
getInitialState: 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 GaugeWrapper = React.createClass({ | |
componentDidMount(){ | |
var target = React.findDOMNode(this) | |
var gauge = new Gauge(target).setOptions(this.props.options); | |
gauge.maxValue = this.props.max; | |
gauge.set(this.props.value); | |
}, | |
render(){ | |
return <canvas width={this.props.width} height={this.props.height} /> | |
} |
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
module.exports = { | |
entry: { | |
jobs: 'app.jsx' | |
}, | |
output: { | |
filename: "[name].bundle.js", | |
chunkFilename: "[id].bundle.js" | |
}, | |
module: { | |
loaders: [ |
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
import React from 'react'; | |
export default function isMounted(component) { | |
// exceptions for flow control :( | |
try { | |
React.findDOMNode(component); | |
return true; | |
} catch (e) { | |
// Error: Invariant Violation: Component (with keys: props,context,state,refs,_reactInternalInstance) contains `render` method but is not mounted in the DOM | |
return 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
import React from 'react' | |
export default class Woah extends React.Component{ | |
render(){ | |
return <div className="test">hi</div> | |
} | |
} |
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
setInterval(function() { | |
Array.prototype.slice.call(document.querySelectorAll('[data-reactid]')) | |
.forEach(function(element) { | |
element.style.background = 'rgba(255,0,0,0.1)'; | |
}) | |
}, 500) |
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
import React from 'react'; | |
import './Boxdown.less'; | |
class Boxdown extends React.Component{ | |
items(){ | |
return this.props.items.map(item => { | |
return ( | |
<li key={item.value} onClick={this.handleChange} data-value={item.value}> | |
<a href="#">{item.text}</a> |
OlderNewer