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

This commit is contained in:
Juan Ferrer 2022-06-06 18:19:43 +02:00
parent 2307c16748
commit 68eedecb90
13 changed files with 54 additions and 69 deletions

View File

@ -17,10 +17,6 @@ Hedera.Catalog = new Class({
}
}
,refreshColors() {
this.$.colors.lazyRefresh();
}
,onBasketCheck: function(isOk) {
if (isOk)
this.loadUi();
@ -258,7 +254,7 @@ Hedera.Catalog = new Class({
this.onEraseClick();
this.$.card.row = form.row;
this.$.cardLot.value = form.$.id;
this.$.cardLot.assign({item: form.$.id});
this.$.cardPopup.show(event.currentTarget);
}
@ -296,7 +292,7 @@ Hedera.Catalog = new Class({
const params = {
warehouse: warehouse,
item: this.$.cardLot.value,
item: this.$.cardLot.$.item,
amount: amount
}
sql += query.render(params);
@ -307,7 +303,7 @@ Hedera.Catalog = new Class({
var itemName = this.$.card.get('item');
Htk.Toast.showMessage(
sprintf(_('Added%dOf%s'), amountSum, itemName));
Vn.Value.sprintf(_('Added%dOf%s'), amountSum, itemName));
}
this.$.cardPopup.hide();

View File

@ -266,7 +266,7 @@
placeholder="_Color"
form="params"
column="color"
on-mousedown="this.refreshColors()">
on-mousedown="$.colors.lazyRefresh()">
<db-model
id="colors"
property="model"

View File

@ -1,7 +1,5 @@
require('htk/htk');
require('./responsive.scss');
require('./style.scss');
Hedera = module.exports = {
Login : require('./login')

View File

@ -1,6 +1,5 @@
module.exports = new Class
({
module.exports = new Class({
basePath: null
,path: null
,moduleName: null
@ -11,84 +10,74 @@ module.exports = new Class
,error: false
,ready: false
,initialize: function (basePath, path)
{
,initialize: function(basePath, path) {
var absPath = basePath +'/'+ path;
var aux = path.split ('/');
var aux = path.split('/');
var moduleName = aux[aux.length - 1];
Vn.Locale.load (absPath,
this.onLocaleReady.bind (this));
Vn.includeJs (absPath +'/'+ moduleName +'.js',
this.onJsReady.bind (this));
Vn.loadXml (absPath +'/ui.xml',
this.onUiReady.bind (this));
Vn.Locale.load(absPath,
this.onLocaleReady.bind(this));
Vn.includeJs(absPath +'/'+ moduleName +'.js',
this.onJsReady.bind(this));
Vn.loadXml(absPath +'/ui.xml',
this.onUiReady.bind(this));
this.basePath = basePath;
this.path = path;
this.moduleName = moduleName;
}
,addCallback: function (callback)
{
,addCallback: function(callback) {
if (!this.ready)
this.callbacks.push (callback);
this.callbacks.push(callback);
else
callback (this);
callback(this);
}
,onLocaleReady: function (success)
{
,onLocaleReady: function() {
this.localeReady = true;
this.onReady ();
this.onReady();
}
,onJsReady: function (success)
{
,onJsReady: function(success) {
this.jsReady = true;
this.error = !success;
this.onReady ();
this.onReady();
}
,onUiReady: function (success)
{
,onUiReady: function(success) {
this.uiReady = true;
this.error = !success;
this.onReady ();
this.onReady();
}
,onReady: function ()
{
,onReady: function() {
if (!(this.localeReady && this.jsReady && this.uiReady))
return;
this.ready = true;
var klassName = this.toCamelCase (this.moduleName);
var klassName = this.toCamelCase(this.moduleName);
try {
this.klass = Hedera[klassName];
}
catch (e)
{
} catch (e) {
this.error = true;
console.error (e);
console.error(e);
}
var callbacks = this.callbacks;
this.callbacks = null;
for (var i = 0; i < callbacks.length; i++)
callbacks[i] (this);
callbacks[i](this);
}
,toCamelCase: function (dashedName)
{
var camelCase = dashedName.charAt (0).toUpperCase ();
camelCase += dashedName.substr (1).replace (/\w\-\w/g, function (token)
{
return token.charAt (0) + token.charAt (2).toUpperCase ();
,toCamelCase: function(dashedName) {
var camelCase = dashedName.charAt(0).toUpperCase();
camelCase += dashedName.substr(1).replace(/\w-\w/g, function(token) {
return token.charAt(0) + token.charAt(2).toUpperCase();
});
return camelCase;
}

View File

@ -1,3 +1,4 @@
require('./social-bar.scss');
module.exports = new Class({
Extends: Vn.Component

13
js/hedera/social-bar.scss Normal file
View File

@ -0,0 +1,13 @@
.htk-social-bar {
text-align: center;
a {
display: inline-block;
margin: 0 .1em;
}
img {
height: 1.8em;
width: 1.8em;
}
}

View File

@ -1,3 +1,4 @@
@import "../../style/classes";
td.cell-button {
max-width: 20px;

View File

@ -4,4 +4,6 @@
@import "./spacing";
@import "./text";
@import "./width";
@import "./responsive";
@import "./material-symbols";
@import "./style";

View File

@ -14,19 +14,19 @@
/* Desktop - FHD 1920x1080 */
@media (max-resolution: 119dpi) and (min-device-width: 1900px) {
body { font-size: 13pt; }
body { font-size: 10pt; }
}
/* Mobile - Low DPI */
@media
(min-resolution: 120dpi),
(-webkit-min-device-pixel-ratio: 1.5) {
body { font-size: 9pt; }
body { font-size: 10pt; }
}
@media
(min-resolution: 144dpi),
(-webkit-min-device-pixel-ratio: 1.5) {
body { font-size: 11pt; }
body { font-size: 10pt; }
}
/* Mobile - Normal DPI */
@ -38,7 +38,7 @@
@media
(min-device-width: 384px) and (min-resolution: 192dpi),
(min-device-width: 384px) and (-webkit-min-device-pixel-ratio: 2) {
body { font-size: 11pt; }
body { font-size: 10pt; }
}
/* Mobile - High DPI */
@ -50,5 +50,5 @@
@media
(min-device-width: 412px) and (min-resolution: 249dpi),
(min-device-width: 412px) and (-webkit-min-device-pixel-ratio: 3) {
body { font-size: 11pt; }
body { font-size: 10pt; }
}

View File

@ -1,5 +1,5 @@
@import "../htk/style/classes";
@import "./classes";
@font-face {
font-family: 'Poppins';
@ -313,18 +313,3 @@ img.icon {
@media screen and (min-width: 2000px) {
.masonry-box { width: 25%; }
}
/* Social bar */
.htk-social-bar {
text-align: center;
a {
display: inline-block;
margin: 0 .1em;
}
img {
height: 1.8em;
width: 1.8em;
}
}