Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert tabs to spaces, Remove trailing whitespaces, Windows CR #41

Merged
merged 6 commits into from
Nov 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ This allows you to override any variables defined in [custom-variables.less](htt
## Contribute

[Material-UI](http://www.material-ui.com/) came about from our love of [React](http://facebook.github.io/react/) and [Google's Material Design](https://www.google.com/design/spec/material-design/introduction.html). We're currently using it on a project at [Call-Em-All](https://www.call-em-all.com/) and plan on adding to it and making it better. If you'd like to help, check out the [docs folder](https://github.com/callemall/material-ui/tree/master/docs). We'd greatly appreciate any contribution you make. :)

2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Material-UI](http://callemall.github.io/material-ui/)

This is the documentation site for [Material-UI](http://callemall.github.io/material-ui/).
This is the documentation site for [Material-UI](http://callemall.github.io/material-ui/).

## Development Installation Notes
After cloning the repository, install dependencies:
Expand Down
44 changes: 22 additions & 22 deletions docs/dist/index.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
module.exports = {
AppBar: require('./js/app-bar.jsx'),
AppCanvas: require('./js/app-canvas.jsx'),
Checkbox: require('./js/checkbox.jsx'),
Dialog: require('./js/dialog.jsx'),
DropDownIcon: require('./js/drop-down-icon.jsx'),
DropDownMenu: require('./js/drop-down-menu.jsx'),
Icon: require('./js/icon.jsx'),
Input: require('./js/input.jsx'),
LeftNav: require('./js/left-nav.jsx'),
MenuItem: require('./js/menu-item.jsx'),
Menu: require('./js/menu.jsx'),
Mixins: {
Classable: require('./js/mixins/classable.js'),
ClickAwayable: require('./js/mixins/click-awayable.js')
},
PaperButton: require('./js/paper-button.jsx'),
Paper: require('./js/paper.jsx'),
RadioButton: require('./js/radio-button.jsx'),
AppBar: require('./js/app-bar.jsx'),
AppCanvas: require('./js/app-canvas.jsx'),
Checkbox: require('./js/checkbox.jsx'),
Dialog: require('./js/dialog.jsx'),
DropDownIcon: require('./js/drop-down-icon.jsx'),
DropDownMenu: require('./js/drop-down-menu.jsx'),
Icon: require('./js/icon.jsx'),
Input: require('./js/input.jsx'),
LeftNav: require('./js/left-nav.jsx'),
MenuItem: require('./js/menu-item.jsx'),
Menu: require('./js/menu.jsx'),
Mixins: {
Classable: require('./js/mixins/classable.js'),
ClickAwayable: require('./js/mixins/click-awayable.js')
},
PaperButton: require('./js/paper-button.jsx'),
Paper: require('./js/paper.jsx'),
RadioButton: require('./js/radio-button.jsx'),
Ripple: require('./js/ripple.jsx'),
Toggle: require('./js/toggle.jsx'),
Toast: require('./js/toast.jsx'),
Toolbar: require('./js/toolbar.jsx'),
ToolbarGroup: require('./js/toolbar-group.jsx')
Toggle: require('./js/toggle.jsx'),
Toast: require('./js/toast.jsx'),
Toolbar: require('./js/toolbar.jsx'),
ToolbarGroup: require('./js/toolbar-group.jsx')
};
10 changes: 5 additions & 5 deletions docs/dist/js/app-bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ var AppBar = React.createClass({
},

getDefaultProps: function() {
return {
return {
title: '',
zDepth: 1
}
}
},

render: function() {
Expand All @@ -32,11 +32,11 @@ var AppBar = React.createClass({
if (this.props.onMenuIconClick) menuIcon = <Icon className="mui-app-bar-navigation-icon" icon="navigation-menu" onClick={this.props.onMenuIconClick} />;

return (
<Paper rounded={false} className={classes} zDepth={this.props.zDepth}>
<Paper rounded={false} className={classes} zDepth={this.props.zDepth}>
{menuIcon}
{title}
{this.props.children}
</Paper>
{this.props.children}
</Paper>
);
}

Expand Down
4 changes: 2 additions & 2 deletions docs/dist/js/app-canvas.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* @jsx React.DOM
*/

var React = require('react'),
Classable = require('./mixins/classable.js');

var AppCanvas = React.createClass({

mixins: [Classable],
mixins: [Classable],

propTypes: {
predefinedLayout: React.PropTypes.number
Expand Down
6 changes: 3 additions & 3 deletions docs/dist/js/checkbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var Checkbox = React.createClass({
checked: this.props.checked || false
}
},

componentWillReceiveProps: function(nextProps) {
if (nextProps.hasOwnProperty('checked')) this.setState({checked: nextProps.checked});
},
Expand All @@ -40,7 +40,7 @@ var Checkbox = React.createClass({

return (
<div className={classes} onClick={this._onCheck}>
<input ref="checkbox" type="checkbox" name={this.props.name} value={this.props.value} />
<input ref="checkbox" type="checkbox" name={this.props.name} value={this.props.value} />
<span className="mui-checkbox-box" />
<span className="mui-checkbox-check" />
</div>
Expand All @@ -57,4 +57,4 @@ var Checkbox = React.createClass({

});

module.exports = Checkbox;
module.exports = Checkbox;
104 changes: 52 additions & 52 deletions docs/dist/js/dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,74 +7,74 @@ var React = require('react');

var Dialog = React.createClass({

mixins: [Classable],
mixins: [Classable],

propTypes: {
propTypes: {
openImmediately: React.PropTypes.bool,
title: React.PropTypes.string,
actions: React.PropTypes.array,
onShow: React.PropTypes.func
},
},

getDefaultProps: function() {
return {
actions: []
};
},
getDefaultProps: function() {
return {
actions: []
};
},

getInitialState: function() {
return {
open: this.props.openImmediately || false
};
},
getInitialState: function() {
return {
open: this.props.openImmediately || false
};
},

componentDidUpdate: function (prevProps, prevState) {
componentDidUpdate: function (prevProps, prevState) {
//calculate height and use that to center the dialog vertically
var $el = $(this.getDOMNode()),
height = $el.innerHeight();
height = $el.innerHeight();

$el.css('margin-top', -height / 2);
},
$el.css('margin-top', -height / 2);
},

_handleClickAway: function() {
this.dismiss();
},
_handleClickAway: function() {
this.dismiss();
},

render: function() {
var mainClasses = this.getClasses('dialog', { 'show': this.state.open }),
actions = this.props.actions.map(function(a) {
if (a.onClick) return <div className="action" onClick={a.onClick}>{a.text}</div>;
return <div className="action" onClick={this.dismiss}>{a.text}</div>;
}.bind(this));
render: function() {
var mainClasses = this.getClasses('dialog', { 'show': this.state.open }),
actions = this.props.actions.map(function(a) {
if (a.onClick) return <div className="action" onClick={a.onClick}>{a.text}</div>;
return <div className="action" onClick={this.dismiss}>{a.text}</div>;
}.bind(this));

return (
<div className={mainClasses}>
<Paper zDepth={4}>
<h3 className="dialog-title">
{this.props.title}
</h3>
<div className="dialog-content">
{this.state.open ? this.props.children : ''}
</div>
<div className="dialog-actions">
<div className="actions-right">
{actions}
</div>
</div>
</Paper>
<div className="dialog-overlay" onClick={this._handleClickAway}></div>
</div>
);
},
return (
<div className={mainClasses}>
<Paper zDepth={4}>
<h3 className="dialog-title">
{this.props.title}
</h3>
<div className="dialog-content">
{this.state.open ? this.props.children : ''}
</div>
<div className="dialog-actions">
<div className="actions-right">
{actions}
</div>
</div>
</Paper>
<div className="dialog-overlay" onClick={this._handleClickAway}></div>
</div>
);
},

dismiss: function() {
this.setState({ open: false });
},
dismiss: function() {
this.setState({ open: false });
},

show: function() {
this.setState({ open: true });
if (this.props.onShow) this.props.onShow();
}
show: function() {
this.setState({ open: true });
if (this.props.onShow) this.props.onShow();
}

});

Expand Down
12 changes: 6 additions & 6 deletions docs/dist/js/drop-down-menu.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @jsx React.DOM
*/

var $ = require('jquery'),
React = require('react'),
Classable = require('./mixins/classable.js'),
Expand All @@ -13,18 +13,18 @@ var $ = require('jquery'),

var DropDownMenu = React.createClass({

mixins: [Classable, ClickAwayable],
mixins: [Classable, ClickAwayable],

propTypes: {
onChange: React.PropTypes.func,
menuItems: React.PropTypes.array.isRequired
},

getInitialState: function() {
return {
return {
open: false,
selectedIndex: this.props.selectedIndex || 0
}
}
},

componentClickAway: function() {
Expand All @@ -48,7 +48,7 @@ var DropDownMenu = React.createClass({
});

return (
<div className={classes}>
<div className={classes}>
<div className="mui-menu-control" onClick={this._onControlClick}>
<Paper className="mui-menu-control-bg"zDepth={0} />
<div className="mui-menu-label">
Expand All @@ -67,7 +67,7 @@ var DropDownMenu = React.createClass({

_onMenuItemClick: function(e, key, payload) {
if (this.props.onChange && this.state.selectedIndex !== key) this.props.onChange(e, key, payload);
this.setState({
this.setState({
selectedIndex: key,
open: false
});
Expand Down
34 changes: 17 additions & 17 deletions docs/dist/js/icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@
*/

var React = require('react'),
Classable = require('./mixins/classable.js');
Classable = require('./mixins/classable.js');

var Icon = React.createClass({

mixins: [Classable],
mixins: [Classable],

propTypes: {
icon: React.PropTypes.string,
onClick: React.PropTypes.func
},
propTypes: {
icon: React.PropTypes.string,
onClick: React.PropTypes.func
},

render: function() {
var isMuiCustomIcon = this.props.icon.indexOf('mui-icon') > -1,
render: function() {
var isMuiCustomIcon = this.props.icon.indexOf('mui-icon') > -1,
iconClassName = isMuiCustomIcon ? this.props.icon : 'mdfi_' + this.props.icon.replace(/-/g, '_'),
classes = this.getClasses('mui-icon ' + iconClassName);

return (
<span className={classes} onClick={this._onClick}>
<span className="mui-icon-highlight">&nbsp;</span>
</span>
);
},
return (
<span className={classes} onClick={this._onClick}>
<span className="mui-icon-highlight">&nbsp;</span>
</span>
);
},

_onClick: function(e) {
if (this.props.onClick) this.props.onClick(e);
}
_onClick: function(e) {
if (this.props.onClick) this.props.onClick(e);
}

});

Expand Down
4 changes: 2 additions & 2 deletions docs/dist/js/input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var Input = React.createClass({
'mui-text': this.props.type === 'text',
'mui-error': this.state.error === true
}),
inputElement = this.props.multiline ?
inputElement = this.props.multiline ?
<textarea value={this.state.value} className="mui-input-textarea" rows={this.state.rows} onChange={this._onTextAreaChange} required /> :
<input ref="input" value={this.state.value} type={this.props.type} name={this.props.name} onChange={this._onInputChange} required />;

Expand Down Expand Up @@ -107,4 +107,4 @@ var Input = React.createClass({

});

module.exports = Input;
module.exports = Input;
4 changes: 2 additions & 2 deletions docs/dist/js/menu-item.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @jsx React.DOM
*/

var React = require('react'),
Classable = require('./mixins/classable.js'),
Icon = require('./icon.jsx'),
Expand Down Expand Up @@ -36,7 +36,7 @@ var MenuItem = React.createClass({
},

getDefaultProps: function() {
return {
return {
toggle: false
};
},
Expand Down
Loading