Errores solucionados: posicion toast, mas...

This commit is contained in:
Juan Ferrer Toribio 2016-12-05 13:39:29 +01:00
parent 809b347436
commit 1a2e0895a4
13 changed files with 64 additions and 52 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.388-deb8) stable; urgency=low
hedera-web (1.389-deb8) stable; urgency=low
* Initial Release.

2
debian/install vendored
View File

@ -1,7 +1,7 @@
conf/* etc/hedera-web
web usr/share/php/vn
doc/* usr/share/doc/hedera-web
hedera-web.php usr/bin
hedera-web.php usr/share/hedera-web
forms usr/share/hedera-web
image usr/share/hedera-web
js usr/share/hedera-web

3
debian/links vendored
View File

@ -1 +1,2 @@
etc/hedera-web/apache.conf etc/apache2/conf-available/hedera-web.conf
etc/hedera-web/apache.conf etc/apache2/conf-available/hedera-web.conf
usr/share/hedera-web/hedera-web.php usr/bin

View File

@ -6,10 +6,9 @@ set_include_path (__DIR__.PATH_SEPARATOR.get_include_path ());
$vnAutoloadMap['vn/web'] = __DIR__.'/web';
const _ENABLE_DEBUG = FALSE;
const _ENABLE_DEBUG = TRUE;
const _DEV_MODE = TRUE;
const _CONFIG_DIR = __DIR__.'/../../.config';
const _LOG_DIR = '/tmp';
const _DATA_DIR = '/tmp';
const _HEDERA_DIR = __DIR__;

View File

@ -4,9 +4,6 @@
@include_once __DIR__.'/env.php';
require_once 'vn-autoload.php';
if (!defined ('_HEDERA_DIR'))
define ('_HEDERA_DIR', '/usr/share/hedera-web');
$cliApp = new Vn\Lib\CliApp ('hedera-web', _HEDERA_DIR.'/rest');
$cliApp = new Vn\Lib\CliApp ('hedera-web', __DIR__.'/rest');
$cliApp->run ();

View File

@ -153,8 +153,8 @@ module.exports = new Class
var dblMargin = margin * 2;
var width = node.offsetWidth;
var height = node.offsetHeight;
var innerWidth = Vn.Browser.getInnerWidth ();
var innerHeight = Vn.Browser.getInnerHeight ();
var innerWidth = window.innerWidth;
var innerHeight = window.innerHeight;
if (width + dblMargin > innerWidth)
{
@ -169,9 +169,6 @@ module.exports = new Class
if (this.isModal ())
{
style.top = '50%';
style.left = '50%';
style.marginLeft = (-node.offsetWidth / 2) +'px';
style.marginTop = (-node.offsetHeight / 2) +'px';
}
@ -183,7 +180,7 @@ module.exports = new Class
var top = rect.top + spacing + this._parent.offsetHeight;
if (left + width > innerWidth)
left -= (left + width) - Vn.Browser.getInnerWidth () + margin;
left -= (left + width) - window.innerWidth + margin;
if (top + height > innerHeight)
top -= height + this._parent.offsetHeight + spacing * 2;

View File

@ -428,21 +428,6 @@ td.cell-image .htk-image
/* Popup */
.htk-popup
{
z-index: 200;
display: block;
position: fixed;
overflow: hidden;
background-color: white;
border-radius: 0.15em;
box-shadow: 0 0 0.4em rgba(1, 1, 1, 0.6);
box-sizing: content-box;
}
.htk-popup > *
{
border-radius: 0.1em;
}
.htk-background
{
position: fixed;
@ -455,9 +440,27 @@ td.cell-image .htk-image
opacity: 0;
transition: opacity 200ms ease-in-out;
}
.htk-background > .htk-popup
.htk-popup
{
z-index: 200;
display: block;
position: fixed;
overflow: hidden;
background-color: white;
border-radius: 0.15em;
box-shadow: 0 0 0.4em rgba(1, 1, 1, 0.6);
box-sizing: content-box;
}
.htk-popup.modal
{
position: absolute;
font-size: 1.2em;
top: 50%;
left: 50%;
}
.htk-popup > *
{
border-radius: 0.1em;
}
/* Dialog */
@ -465,7 +468,7 @@ td.cell-image .htk-image
.htk-dialog
{
padding: 1.5em;
max-width: 25em;
max-width: 20em;
font-weight: normal;
color: #555;
}

View File

@ -12,7 +12,7 @@ module.exports =
/**
* Shows a normal toast message.
*
* @param String message The message text
* @param {String} message The message text
**/
,showMessage: function (message)
{
@ -22,7 +22,7 @@ module.exports =
/**
* Shows a warning toast message.
*
* @param String message The message text
* @param {String} message The message text
**/
,showWarning: function (message)
{
@ -32,7 +32,7 @@ module.exports =
/**
* Shows an error toast message.
*
* @param String message The message text
* @param {String} message The message text
**/
,showError: function (message)
{
@ -42,11 +42,34 @@ module.exports =
,pushTop: function (top)
{
this._topHeap.push (top);
this._refreshPosition ();
}
,popTop: function ()
{
return this._topHeap.pop ();
var top = this._topHeap.pop ();
this._refreshPosition ();
return top;
}
,_refreshPosition: function ()
{
if (!this._container)
return;
var left;
var heapLen = this._topHeap.length;
if (heapLen > 0)
{
var top = this._topHeap[heapLen - 1];
var rect = top.getBoundingClientRect ();
left = (rect.left + parseInt (rect.width / 2) - window.pageXOffset) +'px';
}
else
left = '';
this._container.style.left = left;
}
/**
@ -84,15 +107,7 @@ module.exports =
this._container = container;
}
var heapLen = this._topHeap.length;
if (heapLen > 0)
{
var top = this._topHeap[heapLen - 1];
var rect = top.getBoundingClientRect ();
var left = rect.left + parseInt (rect.width / 2) - window.pageXOffset;
this._container.style.left = left +'px';
}
this._refreshPosition ();
}
,_showText: function (message, className)

View File

@ -16,7 +16,7 @@ class ChangePassword extends Vn\Web\JsonRequest
$db->query ('CALL account.userChangePassword (#, #)',
[$oldPassword, $newPassword]);
Account::sync ($db, $_SESSION['user'], $newPassword, Account::PASS);
Account::sync ($db, $_SESSION['user'], $newPassword, Account::PASS | Account::USER);
return TRUE;
}
}

View File

@ -17,7 +17,7 @@ abstract class Method extends \Vn\Lib\Method
$imapConf = $db->getRow (
'SELECT host, user, pass, success_folder, error_folder FROM imap_config');
$this->mailbox = sprintf ('{%s/imap/ssl/novalidate-cert}INBOX',
$this->mailbox = sprintf ('{%s/imap/ssl/novalidate-cert}',
$imapConf['host']);
$imap = imap_open ($this->mailbox

View File

@ -193,7 +193,7 @@ class Load extends Edi\Method
// Moves the mail to another folder
$folder = sprintf ('INBOX.%s', $folder);
$folder = sprintf ('%s', $folder);
if (!imap_mail_move ($imap, $msg, $folder))
error_log ('Can\'t move message to %s: %s'

View File

@ -15,7 +15,7 @@ class ConfirmMail extends Vn\Lib\Method
FROM tpv_imap_config'
);
$mailbox = sprintf ('{%s/imap/ssl/novalidate-cert}INBOX',
$mailbox = sprintf ('{%s/imap/ssl/novalidate-cert}',
$imapConf['host']);
$imap = imap_open ($mailbox
@ -65,7 +65,7 @@ class ConfirmMail extends Vn\Lib\Method
else
$folder = $imapConf['error_folder'];
if (!imap_mail_move ($imap, $msg, "INBOX.$folder"))
if (!imap_mail_move ($imap, $msg, "$folder"))
trigger_error (imap_last_error (), E_USER_WARNING);
$count++;

View File

@ -4,7 +4,7 @@ var path = require ('path');
var devMode = process.env.NODE_ENV !== 'production';
config = {
var config = {
entry: ['./app.js'],
output: {
path: path.join (__dirname, 'build'),