forked from verdnatura/hedera-web
Producion effects
This commit is contained in:
parent
586eaab255
commit
0a14770ab6
|
@ -0,0 +1,8 @@
|
|||
extends: eslint:recommended
|
||||
rules:
|
||||
no-undef: 0
|
||||
no-redeclare: 0
|
||||
no-mixed-spaces-and-tabs: 0
|
||||
no-console: 0
|
||||
no-cond-assign: 0
|
||||
no-unexpected-multiline: 0
|
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.405.32) stable; urgency=low
|
||||
hedera-web (1.405.34) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -48,14 +48,14 @@ module.exports = new Class
|
|||
Htk.Toast.showError (_('AmountError'));
|
||||
}
|
||||
|
||||
,_onTransactionStart: function (json, error)
|
||||
,_onTransactionStart: function (json)
|
||||
{
|
||||
if (json)
|
||||
{
|
||||
var postValues = json.postValues;
|
||||
|
||||
var form = document.createElement ('form');
|
||||
form.method = 'post';
|
||||
form.method = 'POST';
|
||||
form.action = json.url;
|
||||
document.body.appendChild (form);
|
||||
|
||||
|
@ -99,7 +99,7 @@ module.exports = new Class
|
|||
Htk.Toast.showError (_('AmountError'));
|
||||
}
|
||||
|
||||
,_makeUrl: function (status, order)
|
||||
,_makeUrl: function (status)
|
||||
{
|
||||
var path = location.protocol +'//'+ location.host;
|
||||
path += location.port ? ':'+ location.port : '';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.405.32",
|
||||
"version": "1.405.34",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
|
@ -8,6 +8,8 @@ var requestInterval = INTERVAL;
|
|||
var failedRequests = 0;
|
||||
var timeoutId = null;
|
||||
var request = null;
|
||||
var lastText = null;
|
||||
var lastError = null;
|
||||
|
||||
function onBodyLoad ()
|
||||
{
|
||||
|
@ -103,18 +105,39 @@ function onRequestChange (request)
|
|||
|
||||
function display (text, error)
|
||||
{
|
||||
var bgColor;
|
||||
|
||||
if (!error)
|
||||
{
|
||||
$('text').textContent = text;
|
||||
$('error').textContent = '';
|
||||
$('error').style.display = 'none';
|
||||
bgColor = 'green';
|
||||
}
|
||||
else
|
||||
{
|
||||
$('text').textContent = 'Er';
|
||||
$('error').textContent = text;
|
||||
$('error').style.display = 'block';
|
||||
bgColor = 'red';
|
||||
}
|
||||
|
||||
if (text != lastText || lastError != error)
|
||||
{
|
||||
var body = document.body;
|
||||
body.addEventListener ('transitionend', onTransitionEnd);
|
||||
body.style.backgroundColor = bgColor;
|
||||
}
|
||||
|
||||
lastText = text;
|
||||
lastError = error;
|
||||
}
|
||||
|
||||
function onTransitionEnd ()
|
||||
{
|
||||
var body = document.body;
|
||||
body.removeEventListener ('transitionend', onTransitionEnd);
|
||||
body.style.backgroundColor = '';
|
||||
}
|
||||
|
||||
function $ (elementId)
|
||||
|
|
|
@ -6,6 +6,7 @@ body
|
|||
width: 100%;
|
||||
margin: 0;
|
||||
font-family: Sans;
|
||||
transition: background-color 500ms ease-in;
|
||||
}
|
||||
#container
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ class Add extends Vn\Web\JsonRequest
|
|||
$maxSize = $db->getValue ('SELECT max_size FROM dms_config');
|
||||
|
||||
if ($_FILES['doc']['size'] > $maxSize * 1048576)
|
||||
throw new Lib\UserException (sprintf ('File size exceeds size: %d MB', $maxSize)));
|
||||
throw new Lib\UserException (sprintf ('File size exceeds size: %d MB', $maxSize));
|
||||
|
||||
try {
|
||||
// Registers the document in the database
|
||||
|
|
Loading…
Reference in New Issue