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
<template name="journal"> | |
<div class="nav-block"></div> | |
<nav class="journal-nav"> | |
<ul> | |
<li> | |
<a href="#" data-type="Design">Design</a> | |
</li> | |
<li> | |
<a href="#" data-type="Development">Development</a> | |
</li> |
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
### Keybase proof | |
I hereby claim: | |
* I am patrickml on github. | |
* I am patrickml (https://keybase.io/patrickml) on keybase. | |
* I have a public key whose fingerprint is 76F4 B94C FBBF 465B 33C7 8319 A379 712C BFB3 E7D1 | |
To claim this, I am signing this object: |
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
/** | |
* Example Document | |
{ | |
_id : 'xDvcFlsQws', | |
activity : 'Project Created', | |
createdAt : '1231213412312' | |
collection : 'projects', | |
documentId : 'xJ4iTyxDw2', | |
userId : 'pQ4iTyxDw7' | |
} |
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
$('#quoteForm').click(function(){ | |
// Variables with data | |
var inputs = $('.modal-body').find('.form-group').children().not('label'); | |
// Open variables | |
var data = {}; | |
var rules = {}; | |
var trueAll = []; | |
// Functions with in scope |
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
Modal = React.createClass({ | |
render () { | |
return ( | |
<div className="md-modal md-effect-1" id="modal-1"> | |
<div className="md-content"> | |
<h3>{this.props.title}</h3> | |
<div className="md-body"> | |
{this.props.content} | |
<i className="md-close close ion ion-close"></i> | |
</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
Tabs = React.createClass({ | |
tabClick (tab) { | |
this.setState({ | |
activeTabIndex : tab.props.tabIndex | |
}); | |
}, | |
getInitialState () { | |
return { | |
activeTabIndex : 0 | |
}; |
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
Table = React.createClass({ | |
mixins : [React.addons.PureRenderMixin], | |
/** | |
* Sets the components key and dir state | |
* @event the synthetic event from ReactJS | |
*/ | |
setSortKey (event) { | |
//Get the key from the target element | |
let key = event.target.getAttribute('data-sortkey'); | |
//Set the state |
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
Tabs = React.createClass({ | |
/** | |
* Sets the activeTabIndex state | |
* @index the index you would like to set to active | |
*/ | |
setActiveTab (index) { | |
this.setState({ | |
activeTabIndex : index | |
}); | |
}, |
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
Dropdown = React.createClass({ | |
componentDidMount() { | |
document.addEventListener('click', this.outSideClick, false); | |
}, | |
componentWillUnmount: function () { | |
document.removeEventListener('click', this.outSideClick, false); | |
}, | |
outSideClick (event) { | |
if (ReactDOM.findDOMNode(this).contains(event.target)) { | |
return; |
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
_.mixin({ | |
get: function (obj, key) { | |
var type = typeof key; | |
if (type == 'string' || type == "number") { | |
key = ("" + key).replace(/\[(.*?)\]/,/\[(.*?)\]/, function (m, key) { //handle case where [1] may occur | |
return '.' + key.replace(/["']/g,/["']/g, ""); //strip quotes | |
}).split('.'); | |
} | |
for (var i = 0, l = key.length; i < l; i++) { |
OlderNewer