Made xwebmail work with new handlers package. Pulls important headers from the database and provides extremely basic folder view on webpage. Reverted layout customizations returning folder view to original wider width. JS App now handles all the rendering, index.html only contains placeholder with background to indicate loading.
37 lines
892 B
JavaScript
37 lines
892 B
JavaScript
/** @jsx React.DOM */
|
|
|
|
var NavView = React.createClass({
|
|
getInitialState: function() {
|
|
return {
|
|
unreadCount: {}
|
|
};
|
|
},
|
|
|
|
componentDidMount: function() {
|
|
$.get(this.props.source, function(result) {
|
|
console.log('NavView $.get', result);
|
|
this.setState({unreadCount: result});
|
|
}.bind(this));
|
|
},
|
|
|
|
render: function() {
|
|
var keys = Object.keys(this.state.unreadCount).sort();
|
|
var lis = [];
|
|
for (var i in keys) {
|
|
var key = keys[i];
|
|
var value = this.state.unreadCount[key];
|
|
lis.push(<li key={key}><a href="#">{key}</a></li>);
|
|
}
|
|
return (
|
|
<div id="nav" className="pure-u">
|
|
<div className="nav-inner">
|
|
<button className="primary-button pure-button">Compose</button>
|
|
<div id="unread-list" className="pure-menu pure-menu-open">
|
|
<ul>{lis}</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
});
|