Minor fixes
gitea/hedera-web/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2022-10-03 15:50:39 +02:00
parent 5e87da735f
commit 3f637fff80
6 changed files with 19 additions and 17 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.408.12) stable; urgency=low
hedera-web (1.408.13) stable; urgency=low
* Initial Release.

View File

@ -83,7 +83,7 @@ Hedera.Photos = new Class({
if (fileData.status === Status.NONE) {
this.setImageStatus(
fileData, Status.WAITING, 'cloud-upload', _('Waiting for upload'));
fileData, Status.WAITING, 'cloud_upload', _('Waiting for upload'));
fileData.name.disabled = true;
this.uploadQueue.push(fileData);
count++;
@ -121,7 +121,7 @@ Hedera.Photos = new Class({
if (data) {
this.setImageStatus(
fileData, Status.UPLOADED, 'ok', _('Image uploaded'));
fileData, Status.UPLOADED, 'cloud_done', _('Image uploaded'));
} else {
this.setImageStatus(
fileData, Status.NONE, 'error', error.message);
@ -146,7 +146,7 @@ Hedera.Photos = new Class({
var statusNode = fileData.statusNode;
Vn.Node.removeChilds(statusNode);
var iconNode = new Htk.Icon({icon: icon});
var iconNode = new Htk.Icon({name: icon});
statusNode.appendChild(iconNode.node);
statusNode.title = title ? title : '';
}

View File

@ -48,11 +48,11 @@
}
.photos .file-list .status {
cursor: pointer;
width: 1em;
width: 1.2em;
padding-left: .5em;
padding-right: .5em;
}
.photos .file-list .status > img {
.photos .file-list .status > .htk-icon {
display: block;
}
.photos .file-list .htk-button {

View File

@ -14,7 +14,7 @@ module.exports = new Class({
transaction: this.tpvOrder,
status: this.tpvStatus
};
var query = 'CALL myTpvTransaction_end(#transaction, #status)';
const query = 'CALL myTpvTransaction_end(#transaction, #status)';
this.conn.execQuery(query, null, params);
}
@ -28,7 +28,7 @@ module.exports = new Class({
,_realPay: function(amount, company) {
if (isNumeric(amount) && amount > 0) {
var params = {
const params = {
amount: parseInt(amount)
,urlOk: this._makeUrl('ok')
,urlKo: this._makeUrl('ko')
@ -43,15 +43,15 @@ module.exports = new Class({
,_onTransactionStart: function(json) {
if (json) {
var postValues = json.postValues;
const postValues = json.postValues;
var form = document.createElement('form');
const form = document.createElement('form');
form.method = 'POST';
form.action = json.url;
document.body.appendChild(form);
for (var field in postValues) {
var input = document.createElement('input');
const input = document.createElement('input');
input.type = 'hidden';
input.name = field;
form.appendChild(input);
@ -68,7 +68,7 @@ module.exports = new Class({
,retryPay: function() {
const params = {transaction: parseInt(this.tpvOrder)};
var query = 'SELECT t.amount, m.companyFk '
const query = 'SELECT t.amount, m.companyFk '
+'FROM myTpvTransaction t '
+'JOIN tpvMerchant m ON m.id = t.merchantFk '
+'WHERE t.id = #transaction';
@ -77,7 +77,7 @@ module.exports = new Class({
}
,_onRetryPayDone: function(resultSet) {
var res = resultSet.fetchObject();
const res = resultSet.fetchObject();
if (res)
this._realPay(res.amount, res.companyFk);
@ -86,16 +86,18 @@ module.exports = new Class({
}
,_makeUrl: function(status) {
var path = location.protocol +'//'+ location.host;
let path = location.protocol +'//'+ location.hostname;
path += location.port ? ':'+ location.port : '';
path += location.pathname;
path += location.search ? location.search : '';
path += Vn.Hash.make({
path += this.hash.make({
form: 'ecomerce/orders',
tpvStatus: status,
tpvOrder: '_transactionId_'
}, true);
alert(path);
return path;
}
});

View File

@ -47,7 +47,7 @@ module.exports = new Class({
* @param {boolean} add %true to combine with the current params, %false otherwise
* @return {string} The URL
*/
,make: function(params, add) {
,make: function(params, add) {
if (add) {
params = Object.assign({}, params);

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.408.12",
"version": "1.408.13",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {