diff options
author | Jack <jackdeng@gmail.com> | 2015-09-22 08:16:51 -0700 |
---|---|---|
committer | Jack <jackdeng@gmail.com> | 2015-09-22 08:16:51 -0700 |
commit | 602bed85f2b32733f73e2edddb542fa36baac462 (patch) | |
tree | 06a6ee9b609a9122bc2f0e6f6e6300f9ba79a3aa /web/react/components/admin_console/admin_sidebar.jsx | |
parent | a31868336f97a91bfd5a7e91e99a9b294d131f90 (diff) | |
parent | f439c82d7c885b4c530ba9da0a41b17910743b55 (diff) | |
download | chat-602bed85f2b32733f73e2edddb542fa36baac462.tar.gz chat-602bed85f2b32733f73e2edddb542fa36baac462.tar.bz2 chat-602bed85f2b32733f73e2edddb542fa36baac462.zip |
fix conflict
Diffstat (limited to 'web/react/components/admin_console/admin_sidebar.jsx')
-rw-r--r-- | web/react/components/admin_console/admin_sidebar.jsx | 147 |
1 files changed, 11 insertions, 136 deletions
diff --git a/web/react/components/admin_console/admin_sidebar.jsx b/web/react/components/admin_console/admin_sidebar.jsx index a04bceef5..a6e689490 100644 --- a/web/react/components/admin_console/admin_sidebar.jsx +++ b/web/react/components/admin_console/admin_sidebar.jsx @@ -1,7 +1,7 @@ // Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. -var SidebarHeader = require('../sidebar_header.jsx'); +var AdminSidebarHeader = require('./admin_sidebar_header.jsx'); export default class AdminSidebar extends React.Component { constructor(props) { @@ -14,7 +14,8 @@ export default class AdminSidebar extends React.Component { }; } - handleClick(name) { + handleClick(name, e) { + e.preventDefault(); this.props.selectTab(name); } @@ -27,58 +28,21 @@ export default class AdminSidebar extends React.Component { } componentDidMount() { - $('.nav__menu-item').on('click', function clickme(e) { - e.preventDefault(); - $(this).closest('.sidebar--collapsable').find('.nav__menu-item').removeClass('active'); - $(this).addClass('active'); - $(this).closest('.sidebar--collapsable').find('.nav__sub-menu').addClass('hide'); - $(this).next('.nav__sub-menu').removeClass('hide'); - }); - - $('.nav__sub-menu a').on('click', function clickme(e) { - e.preventDefault(); - $(this).closest('.nav__sub-menu').find('a').removeClass('active'); - $(this).addClass('active'); - }); - - $('.nav__sub-menu-item').on('click', function clickme(e) { - e.preventDefault(); - $(this).closest('.sidebar--collapsable').find('.nav__inner-menu').addClass('hide'); - $(this).closest('li').next('li').find('.nav__inner-menu').removeClass('hide'); - $(this).closest('li').next('li').find('.nav__inner-menu li:first a').addClass('active'); - }); - - $('.nav__inner-menu a').on('click', function clickme() { - $(this).closest('.nav__inner-menu').closest('li').prev('li').find('a').addClass('active'); - }); - - $('.nav__sub-menu .menu__close').on('click', function close() { - var menuItem = $(this).closest('li'); - menuItem.next('li').remove(); - menuItem.remove(); - }); } render() { return ( <div className='sidebar--left sidebar--collapsable'> <div> - <SidebarHeader - teamDisplayName='Admin Console' - teamType='I' - /> + <AdminSidebarHeader /> <ul className='nav nav-pills nav-stacked'> <li> - <a href='#' - className='nav__menu-item active' - > - <span className='icon fa fa-gear'></span> <span>{'Basic Settings'}</span></a> <ul className='nav nav__sub-menu'> <li> <a href='#' className={this.isSelected('email_settings')} - onClick={this.handleClick.bind(null, 'email_settings')} + onClick={this.handleClick.bind(this, 'email_settings')} > {'Email Settings'} </a> @@ -86,110 +50,21 @@ export default class AdminSidebar extends React.Component { <li> <a href='#' - className={this.isSelected('logs')} - onClick={this.handleClick.bind(null, 'logs')} - > - {'Logs'} - </a> - </li> - </ul> - </li> - <li> - <a - href='#' - className='nav__menu-item' - > - <span className='icon fa fa-gear'></span> <span>{'Jobs'}</span> - </a> - <ul className='nav nav__sub-menu hide'> - <li> - <a - href='#' - className={this.isSelected('job_settings')} - onClick={this.handleClick.bind(null, 'job_settings')} + className={this.isSelected('log_settings')} + onClick={this.handleClick.bind(this, 'log_settings')} > - {'Job Settings'} + {'Log Settings'} </a> </li> - </ul> - </li> - <li> - <a - href='#' - className='nav__menu-item' - > - <span className='icon fa fa-gear'></span> - <span>{'Team Settings (306)'}</span> - <span className='menu-icon--right'> - <i className='fa fa-plus'></i> - </span> - </a> - <ul className='nav nav__sub-menu hide'> - <li> - <a - href='#' - className='nav__sub-menu-item active' - > - {'Adal '} - <span className='menu-icon--right menu__close'>{'x'}</span> - </a> - </li> - <li> - <ul className='nav nav__inner-menu'> - <li> - <a - href='#' - className='active' - > - {'- Users'} - </a> - </li> - <li><a href='#'>{'- View Statistics'}</a></li> - <li> - <a href='#'> - {'- View Audit Log'} - <span className='badge pull-right small'>{'1'}</span> - </a> - </li> - </ul> - </li> <li> <a href='#' - className='nav__sub-menu-item' + className={this.isSelected('logs')} + onClick={this.handleClick.bind(this, 'logs')} > - {'Boole '} - <span className='menu-icon--right menu__close'>{'x'}</span> + {'Logs'} </a> </li> - <li> - <ul className='nav nav__inner-menu hide'> - <li> - <a - href='#' - className='active' - > - {'- Users'} - </a> - </li> - <li><a href='#'>{'- View Statistics'}</a></li> - <li> - <a href='#'> - {'- View Audit Log'} - <span className='badge pull-right small'>{'1'}</span> - </a> - </li> - </ul> - </li> - <li> - <span - data-toggle='modal' - data-target='#select-team' - className='nav-more' - > - {'Select a team'} - </span> - </li> </ul> </li> </ul> |