Commit 54dece61 authored by Juorder Gonzalez's avatar Juorder Gonzalez Committed by GitHub

Merge pull request #246 from ZBoxApp/manager_beta_v2

add style to slider on max size of attach, and button close session, …
parents 264b13ed 9338b6c7
module.exports = {"main":{"js":"/207456bundle.js"}} module.exports = {"main":{"js":"/907311bundle.js"}}
\ No newline at end of file \ No newline at end of file
...@@ -43,7 +43,7 @@ export default class DomainDetails extends React.Component { ...@@ -43,7 +43,7 @@ export default class DomainDetails extends React.Component {
this.isGlobalAdmin = UserStore.isGlobalAdmin(); this.isGlobalAdmin = UserStore.isGlobalAdmin();
this.DomainAttachmentLimit = window.manager_config.maxAttachmentLimit; this.DomainAttachmentLimit = window.manager_config.maxAttachmentLimit;
this.sizeOfAttatch = this.DomainAttachmentLimit.min; this.sizeOfAttatch = this.DomainAttachmentLimit.max;
this.state = {}; this.state = {};
} }
...@@ -116,7 +116,7 @@ export default class DomainDetails extends React.Component { ...@@ -116,7 +116,7 @@ export default class DomainDetails extends React.Component {
if (domain && domain.id === this.props.params.id) { if (domain && domain.id === this.props.params.id) {
states.domain = domain; states.domain = domain;
this.sizeOfAttatch = domain.attrs.amavisMessageSizeLimit || this.DomainAttachmentLimit.min; this.sizeOfAttatch = domain.attrs.amavisMessageSizeLimit || this.DomainAttachmentLimit.max;
GlobalActions.emitEndLoading(); GlobalActions.emitEndLoading();
...@@ -146,7 +146,7 @@ export default class DomainDetails extends React.Component { ...@@ -146,7 +146,7 @@ export default class DomainDetails extends React.Component {
} }
states.domain = data; states.domain = data;
this.sizeOfAttatch = data.attrs.amavisMessageSizeLimit || this.DomainAttachmentLimit.min; this.sizeOfAttatch = data.attrs.amavisMessageSizeLimit || this.DomainAttachmentLimit.max;
Client.getZone(data.name, (zone) => { Client.getZone(data.name, (zone) => {
states.zone = this.isStoreEnabled ? DomainStore.setZoneDNS(zone) : zone; states.zone = this.isStoreEnabled ? DomainStore.setZoneDNS(zone) : zone;
...@@ -283,6 +283,8 @@ export default class DomainDetails extends React.Component { ...@@ -283,6 +283,8 @@ export default class DomainDetails extends React.Component {
placeholder='Amount' placeholder='Amount'
max={this.DomainAttachmentLimit.max} max={this.DomainAttachmentLimit.max}
min={this.DomainAttachmentLimit.min} min={this.DomainAttachmentLimit.min}
data-max={bytesConvertor(this.DomainAttachmentLimit.max)}
data-min={bytesConvertor(this.DomainAttachmentLimit.min)}
onChange={this.slideLimitDomainAttach} onChange={this.slideLimitDomainAttach}
step={this.DomainAttachmentLimit.step} step={this.DomainAttachmentLimit.step}
defaultValue={this.sizeOfAttatch} defaultValue={this.sizeOfAttatch}
......
...@@ -91,6 +91,7 @@ export default class Header extends React.Component { ...@@ -91,6 +91,7 @@ export default class Header extends React.Component {
<li className='dropdown'> <li className='dropdown'>
<Link <Link
to='/logout' to='/logout'
title='Cerrar Sesión'
> >
<i className='fa fa-sign-out'></i> <i className='fa fa-sign-out'></i>
</Link> </Link>
......
...@@ -317,7 +317,7 @@ export default class EditMailBox extends React.Component { ...@@ -317,7 +317,7 @@ export default class EditMailBox extends React.Component {
} }
handleRenameAccount(email) { handleRenameAccount(email) {
const account = this.isStoreEnabled ? MailboxStore.getCurrent() : null; const account = this.isStoreEnabled ? MailboxStore.getCurrent() : this.state.data || null;
if (account) { if (account) {
const oldName = this.refs.rename.innerHTML; const oldName = this.refs.rename.innerHTML;
......
...@@ -29,9 +29,11 @@ export default class Root extends React.Component { ...@@ -29,9 +29,11 @@ export default class Root extends React.Component {
componentWillReceiveProps(newProps) { componentWillReceiveProps(newProps) {
this.redirectIfNecessary(newProps); this.redirectIfNecessary(newProps);
} }
componentWillMount() { componentWillMount() {
this.redirectIfNecessary(this.props); this.redirectIfNecessary(this.props);
} }
render() { render() {
if (this.props.children == null) { if (this.props.children == null) {
return <div/>; return <div/>;
......
...@@ -5,12 +5,13 @@ import * as GlobalActions from '../action_creators/global_actions.jsx'; ...@@ -5,12 +5,13 @@ import * as GlobalActions from '../action_creators/global_actions.jsx';
import UserStore from '../stores/user_store.jsx'; import UserStore from '../stores/user_store.jsx';
import React from 'react'; import React from 'react';
import {browserHistory} from 'react-router'; import {browserHistory, Link} from 'react-router';
export default class SidebarMenu extends React.Component { export default class SidebarMenu extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.handleLink = this.handleLink.bind(this); this.handleLink = this.handleLink.bind(this);
this.openSupportModal = this.openSupportModal.bind(this);
} }
handleLink(e, path) { handleLink(e, path) {
e.preventDefault(); e.preventDefault();
...@@ -20,6 +21,19 @@ export default class SidebarMenu extends React.Component { ...@@ -20,6 +21,19 @@ export default class SidebarMenu extends React.Component {
} }
} }
openSupportModal(e) {
e.preventDefault();
const user = UserStore.getCurrentUser();
const name = user.attrs._attrs.displayName ? user.attrs._attrs.displayName : `${user.attrs._attrs.givenName || user.attrs._attrs.cn} ${user.attrs._attrs.sn}`;
window.HS.beacon.identify({
name,
email: user.name
});
window.HS.beacon.open();
}
makeCompanyLink() { makeCompanyLink() {
const link = { text: 'Empresas', path: '/companies' }; const link = { text: 'Empresas', path: '/companies' };
if (!UserStore.isGlobalAdmin()) { if (!UserStore.isGlobalAdmin()) {
...@@ -70,6 +84,23 @@ export default class SidebarMenu extends React.Component { ...@@ -70,6 +84,23 @@ export default class SidebarMenu extends React.Component {
{'Documentación'} {'Documentación'}
</a> </a>
</li> </li>
<li>
<a
className='nav-label'
href='#'
onClick={this.openSupportModal}
>
{'Soporte'}
</a>
</li>
<li>
<Link
to='/logout'
title='Cerrar Sesión'
>
Cerrar Sesión
</Link>
</li>
</ul> </ul>
); );
} }
......
...@@ -45,6 +45,23 @@ ...@@ -45,6 +45,23 @@
</head> </head>
<body class='show-sidebar'> <body class='show-sidebar'>
<div id='root'/> <div id='root'/>
<script>!function(e,o,n){window.HSCW=o,window.HS=n,n.beacon=n.beacon||{};var t=n.beacon;t.userConfig={},t.readyQueue=[],t.config=function(e){this.userConfig=e},t.ready=function(e){this.readyQueue.push(e)},o.config={docs:{enabled:!1,baseUrl:""},contact:{enabled:!0,formId:"cd83c61c-8dfd-11e5-9e75-0a7d6919297d"}};var r=e.getElementsByTagName("script")[0],c=e.createElement("script");c.type="text/javascript",c.async=!0,c.src="https://djtflbt20bdde.cloudfront.net/",r.parentNode.insertBefore(c,r)}(document,window.HSCW||{},window.HS||{});</script>
<script>
window.HS.beacon.config({
modal: true,
color: '#4EA5E0',
translation: {
nameLabel: 'Nombre',
emailLabel: 'Correo Electrónico',
subjectLabel: 'Titulo',
messageLabel: 'Mensaje de soporte'
},
attachment: true,
instructions: 'Por favor, llene los campos para hacer llegar su solicitud.'
});
</script>
<script> <script>
window.setup_root(); window.setup_root();
</script> </script>
......
...@@ -1666,3 +1666,23 @@ label { ...@@ -1666,3 +1666,23 @@ label {
} }
} }
} }
.range-size {
position: relative;
&::before,
&::after {
position: absolute;
top: 18px;
}
&::before {
content: attr(data-min);
left: 0;
}
&::after {
content: attr(data-max);
right: 0;
}
}
...@@ -154,6 +154,7 @@ export function logout(callback) { ...@@ -154,6 +154,7 @@ export function logout(callback) {
if (callback && typeof callback === 'function') { if (callback && typeof callback === 'function') {
callback(); callback();
return window.location.replace('/login');
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment