Changeset View
Changeset View
Standalone View
Standalone View
web/calendar/calendar.react.js
Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | ) { | ||||
if (columns.length === 7) { | if (columns.length === 7) { | ||||
rows.push(<tr key={week++}>{columns}</tr>); | rows.push(<tr key={week++}>{columns}</tr>); | ||||
columns = []; | columns = []; | ||||
} | } | ||||
} | } | ||||
let filterPanel = null; | let filterPanel = null; | ||||
let calendarContentStyle = null; | let calendarContentStyle = null; | ||||
let filterButtonStyle = null; | let filterButton = null; | ||||
if (this.state.filterPanelOpen) { | if (this.state.filterPanelOpen) { | ||||
filterPanel = <FilterPanel />; | filterPanel = <FilterPanel toggleFilters={this.toggleFilters} />; | ||||
calendarContentStyle = { marginLeft: '300px' }; | calendarContentStyle = { marginLeft: '300px' }; | ||||
filterButtonStyle = { backgroundColor: 'rgba(0,0,0,0.67)' }; | } else { | ||||
filterButton = ( | |||||
<a className={css.filtersButton} onClick={this.toggleFilters}> | |||||
<SWMansionIcon icon="filters-2" size={16} /> | |||||
</a> | |||||
); | |||||
} | } | ||||
return ( | return ( | ||||
<div> | <div> | ||||
{filterPanel} | {filterPanel} | ||||
<div className={css.content} style={calendarContentStyle}> | <div className={css.content} style={calendarContentStyle}> | ||||
<div> | <div> | ||||
<a | {filterButton} | ||||
className={css.filtersButton} | |||||
onClick={this.toggleFilters} | |||||
style={filterButtonStyle} | |||||
> | |||||
<SWMansionIcon icon="filters-2" size={16} /> | |||||
</a> | |||||
<nav className={css.nav}> | <nav className={css.nav}> | ||||
<a | <a | ||||
className={css.monthLink} | className={css.monthLink} | ||||
href={prevURL} | href={prevURL} | ||||
onClick={this.onClickPrevURL} | onClick={this.onClickPrevURL} | ||||
> | > | ||||
<SWMansionIcon icon="chevron-left" size={24} /> | <SWMansionIcon icon="chevron-left" size={24} /> | ||||
</a> | </a> | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |