Commit 9338b6c7 authored by Juorder Antonio's avatar Juorder Antonio

add style to slider on max size of attach, and button close session, and modal...

add style to slider on max size of attach, and button close session, and modal for support, solve some issues, etc
parent 264b13ed
module.exports = {"main":{"js":"/207456bundle.js"}}
\ No newline at end of file
module.exports = {"main":{"js":"/907311bundle.js"}}
\ No newline at end of file
......@@ -43,7 +43,7 @@ export default class DomainDetails extends React.Component {
this.isGlobalAdmin = UserStore.isGlobalAdmin();
this.DomainAttachmentLimit = window.manager_config.maxAttachmentLimit;
this.sizeOfAttatch = this.DomainAttachmentLimit.min;
this.sizeOfAttatch = this.DomainAttachmentLimit.max;
this.state = {};
}
......@@ -116,7 +116,7 @@ export default class DomainDetails extends React.Component {
if (domain && domain.id === this.props.params.id) {
states.domain = domain;
this.sizeOfAttatch = domain.attrs.amavisMessageSizeLimit || this.DomainAttachmentLimit.min;
this.sizeOfAttatch = domain.attrs.amavisMessageSizeLimit || this.DomainAttachmentLimit.max;
GlobalActions.emitEndLoading();
......@@ -146,7 +146,7 @@ export default class DomainDetails extends React.Component {
}
states.domain = data;
this.sizeOfAttatch = data.attrs.amavisMessageSizeLimit || this.DomainAttachmentLimit.min;
this.sizeOfAttatch = data.attrs.amavisMessageSizeLimit || this.DomainAttachmentLimit.max;
Client.getZone(data.name, (zone) => {
states.zone = this.isStoreEnabled ? DomainStore.setZoneDNS(zone) : zone;
......@@ -283,6 +283,8 @@ export default class DomainDetails extends React.Component {
placeholder='Amount'
max={this.DomainAttachmentLimit.max}
min={this.DomainAttachmentLimit.min}
data-max={bytesConvertor(this.DomainAttachmentLimit.max)}
data-min={bytesConvertor(this.DomainAttachmentLimit.min)}
onChange={this.slideLimitDomainAttach}
step={this.DomainAttachmentLimit.step}
defaultValue={this.sizeOfAttatch}
......
......@@ -91,6 +91,7 @@ export default class Header extends React.Component {
<li className='dropdown'>
<Link
to='/logout'
title='Cerrar Sesión'
>
<i className='fa fa-sign-out'></i>
</Link>
......
......@@ -317,7 +317,7 @@ export default class EditMailBox extends React.Component {
}
handleRenameAccount(email) {
const account = this.isStoreEnabled ? MailboxStore.getCurrent() : null;
const account = this.isStoreEnabled ? MailboxStore.getCurrent() : this.state.data || null;
if (account) {
const oldName = this.refs.rename.innerHTML;
......
......@@ -29,9 +29,11 @@ export default class Root extends React.Component {
componentWillReceiveProps(newProps) {
this.redirectIfNecessary(newProps);
}
componentWillMount() {
this.redirectIfNecessary(this.props);
}
render() {
if (this.props.children == null) {
return <div/>;
......
......@@ -5,12 +5,13 @@ import * as GlobalActions from '../action_creators/global_actions.jsx';
import UserStore from '../stores/user_store.jsx';
import React from 'react';
import {browserHistory} from 'react-router';
import {browserHistory, Link} from 'react-router';
export default class SidebarMenu extends React.Component {
constructor(props) {
super(props);
this.handleLink = this.handleLink.bind(this);
this.openSupportModal = this.openSupportModal.bind(this);
}
handleLink(e, path) {
e.preventDefault();
......@@ -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() {
const link = { text: 'Empresas', path: '/companies' };
if (!UserStore.isGlobalAdmin()) {
......@@ -70,6 +84,23 @@ export default class SidebarMenu extends React.Component {
{'Documentación'}
</a>
</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>
);
}
......
......@@ -45,6 +45,23 @@
</head>
<body class='show-sidebar'>
<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>
window.setup_root();
</script>
......
......@@ -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) {
if (callback && typeof callback === 'function') {
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