From 7669dc0db089eb5c0cb3c057e23ecf626334d386 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 6 Jun 2022 19:13:57 +0200 Subject: [PATCH] Fixes --- debian/changelog | 2 +- js/htk/assistant-bar/index.js | 11 +++++------ js/htk/assistant/index.js | 3 +-- js/htk/button/index.js | 1 - js/htk/calendar/index.js | 1 - js/htk/date-chooser/index.js | 2 +- js/htk/grid/index.js | 1 - js/htk/icon/index.js | 2 +- js/htk/image/index.js | 1 - js/htk/loader/index.js | 6 +++--- js/htk/popup/index.js | 3 +-- js/htk/select/index.js | 2 +- js/htk/select/style.scss | 2 +- js/htk/spin/index.js | 1 - js/htk/spinner/index.js | 1 - js/htk/step/index.js | 3 +-- js/htk/text-area/index.js | 21 ++++++++------------- js/vn/builder.js | 2 +- js/vn/component.js | 2 +- package.json | 2 +- 20 files changed, 27 insertions(+), 42 deletions(-) diff --git a/debian/changelog b/debian/changelog index fcca71be..3a2a50cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.407.77) stable; urgency=low +hedera-web (1.407.78) stable; urgency=low * Initial Release. diff --git a/js/htk/assistant-bar/index.js b/js/htk/assistant-bar/index.js index eb9859fe..dbcc2ddf 100644 --- a/js/htk/assistant-bar/index.js +++ b/js/htk/assistant-bar/index.js @@ -38,8 +38,7 @@ module.exports = new Class({ _disabled: false, render: function() { - var bar = this.createRoot('div'); - bar.className = 'htk-assistant-bar'; + var node = this.createRoot('div'); var previousButton = new Htk.Button({ icon: 'arrow_back_ios', @@ -47,11 +46,11 @@ module.exports = new Class({ }).node; previousButton.classList.add('previous'); previousButton.addEventListener('click', this.movePrevious.bind(this)); - bar.appendChild(previousButton); + node.appendChild(previousButton); var steps = this.createElement('div'); steps.className = 'steps'; - bar.appendChild(steps); + node.appendChild(steps); var nextButton = new Htk.Button({ icon: 'arrow_forward_ios', @@ -59,7 +58,7 @@ module.exports = new Class({ }).node; nextButton.classList.add('next'); nextButton.addEventListener('click', this.moveNext.bind(this)); - bar.appendChild(nextButton); + node.appendChild(nextButton); var endButton = new Htk.Button({ icon: 'done', @@ -67,7 +66,7 @@ module.exports = new Class({ }).node; endButton.classList.add('end'); endButton.addEventListener('click', this.end.bind(this)); - bar.appendChild(endButton); + node.appendChild(endButton); this._steps = steps; this._previousButton = previousButton; diff --git a/js/htk/assistant/index.js b/js/htk/assistant/index.js index dd9c411c..486f781a 100644 --- a/js/htk/assistant/index.js +++ b/js/htk/assistant/index.js @@ -81,9 +81,8 @@ module.exports = new Class({ steps: {}, initialize: function(props) { - var node = this.createRoot('div'); - node.className = 'htk-assistant'; Component.prototype.initialize.call(this, props); + this.createRoot('div'); }, appendChild: function(step) { diff --git a/js/htk/button/index.js b/js/htk/button/index.js index f3d1ddb0..bba8e449 100644 --- a/js/htk/button/index.js +++ b/js/htk/button/index.js @@ -42,7 +42,6 @@ module.exports = new Class({ ,render: function() { var node = this.createRoot('button'); - node.className = 'htk-button'; this.iconNode = new Htk.Icon(); node.appendChild(this.iconNode.node); diff --git a/js/htk/calendar/index.js b/js/htk/calendar/index.js index 15c28a17..4d6b542d 100644 --- a/js/htk/calendar/index.js +++ b/js/htk/calendar/index.js @@ -24,7 +24,6 @@ module.exports = new Class({ var len = Vn.Date.WDays.length; var node = this.createRoot('div'); - node.className = 'htk-calendar'; var table = this.createElement('table'); this.node.appendChild(table); diff --git a/js/htk/date-chooser/index.js b/js/htk/date-chooser/index.js index a32b14cc..6c323504 100644 --- a/js/htk/date-chooser/index.js +++ b/js/htk/date-chooser/index.js @@ -11,7 +11,7 @@ module.exports = new Class({ ,render: function() { const node = this.createRoot('button'); - node.className = 'htk-date-chooser input'; + node.classList.add('input'); node.addEventListener('click', this._onClick.bind(this)); this.label = this.createElement('span'); diff --git a/js/htk/grid/index.js b/js/htk/grid/index.js index 5cdc88f9..1d7e9c7b 100644 --- a/js/htk/grid/index.js +++ b/js/htk/grid/index.js @@ -65,7 +65,6 @@ module.exports = new Class({ ,render: function() { var table = this.createRoot('table'); - table.className = 'htk-grid'; var thead = this.createElement('thead'); table.appendChild(thead); diff --git a/js/htk/icon/index.js b/js/htk/icon/index.js index ad12013a..66735155 100644 --- a/js/htk/icon/index.js +++ b/js/htk/icon/index.js @@ -42,7 +42,7 @@ module.exports = new Class({ ,render: function() { const node = this.createRoot('span'); - node.className = 'htk-icon material-symbols-rounded'; + node.classList.add('material-symbols-rounded'); } ,_setIcon: function() { diff --git a/js/htk/image/index.js b/js/htk/image/index.js index 76b084ca..92d3f30c 100644 --- a/js/htk/image/index.js +++ b/js/htk/image/index.js @@ -76,7 +76,6 @@ module.exports = new Class({ ,render: function() { var node = this.createRoot('div'); - node.className = 'htk-image'; var img = this.img = this.createElement('img'); img.addEventListener('error', this._onImageError.bind(this)); diff --git a/js/htk/loader/index.js b/js/htk/loader/index.js index d0034c9e..89edfbc0 100644 --- a/js/htk/loader/index.js +++ b/js/htk/loader/index.js @@ -17,9 +17,9 @@ module.exports = new Class({ } } - ,initialize: function() { - var node = this.createRoot('div'); - node.className = 'htk-loader'; + ,initialize: function(props) { + Component.prototype.initialize.call(this, props); + this.createRoot('div'); var div = this.createElement('div'); div.className = 'spinner'; diff --git a/js/htk/popup/index.js b/js/htk/popup/index.js index 5afca3bd..4ab0e3b9 100644 --- a/js/htk/popup/index.js +++ b/js/htk/popup/index.js @@ -59,8 +59,7 @@ module.exports = new Class({ } ,render: function() { - var div = this.createRoot('div'); - div.className = 'htk-popup'; + this.createRoot('div'); } ,_setChildNode: function(childNode) { diff --git a/js/htk/select/index.js b/js/htk/select/index.js index 1899cb82..f5bfaa4e 100644 --- a/js/htk/select/index.js +++ b/js/htk/select/index.js @@ -112,7 +112,7 @@ module.exports = new Class({ ,render: function() { const button = this.createRoot('button'); button.type = 'button'; - button.className = 'htk-select input'; + button.classList.add('input'); button.addEventListener('mousedown', e => this._onButtonMouseDown(e)); diff --git a/js/htk/select/style.scss b/js/htk/select/style.scss index 58b1e7f7..050534b0 100644 --- a/js/htk/select/style.scss +++ b/js/htk/select/style.scss @@ -1,6 +1,6 @@ @import "../style/variables"; -.htk-select { +.htk-combo { display: flex; align-items: center; font-weight: normal; diff --git a/js/htk/spin/index.js b/js/htk/spin/index.js index 6de72ed9..6032bacf 100644 --- a/js/htk/spin/index.js +++ b/js/htk/spin/index.js @@ -5,7 +5,6 @@ module.exports = new Class({ ,render: function() { var input = this.createRoot('input'); - //setInputTypeNumber (input); this.node.type = 'number'; input.addEventListener('change', this._onChange.bind(this)); diff --git a/js/htk/spinner/index.js b/js/htk/spinner/index.js index 326a68d9..b95fadc3 100644 --- a/js/htk/spinner/index.js +++ b/js/htk/spinner/index.js @@ -9,7 +9,6 @@ module.exports = new Class({ ,render: function() { var loader = this.createRoot('div'); - loader.className = 'htk-spinner'; var spin = this.spin = this.createElement('div'); loader.appendChild(spin); diff --git a/js/htk/step/index.js b/js/htk/step/index.js index 86ce2a2f..3da1bfd4 100644 --- a/js/htk/step/index.js +++ b/js/htk/step/index.js @@ -20,9 +20,8 @@ module.exports = new Class({ }, initialize: function(props) { - var node = this.createRoot('div'); - node.className = 'htk-step'; Component.prototype.initialize.call(this, props); + this.createRoot('div'); }, show: function() { diff --git a/js/htk/text-area/index.js b/js/htk/text-area/index.js index f375d7c6..10625025 100644 --- a/js/htk/text-area/index.js +++ b/js/htk/text-area/index.js @@ -1,17 +1,14 @@ -module.exports = new Class -({ +module.exports = new Class({ Extends: Htk.Field ,Tag: 'htk-textarea' - ,render: function () - { - var node = this.createRoot ('textarea'); - node.addEventListener ('change', this.changed.bind (this)); + ,render: function() { + var node = this.createRoot('textarea'); + node.addEventListener('change', this.changed.bind(this)); } - ,changed: function (event) - { + ,changed: function() { var value; if (this.node.value == '') @@ -19,16 +16,14 @@ module.exports = new Class else value = this.node.value; - this.valueChanged (value); + this.valueChanged(value); } - ,setEditable: function (editable) - { + ,setEditable: function(editable) { this.node.readOnly = !editable; } - ,putValue: function (value) - { + ,putValue: function(value) { if (!value) this.node.value = ''; else diff --git a/js/vn/builder.js b/js/vn/builder.js index 437340e4..e918f0df 100644 --- a/js/vn/builder.js +++ b/js/vn/builder.js @@ -518,7 +518,7 @@ module.exports = new Class({ if (context.nodeId && object instanceof Component) { var id = context.nodeId; object.htmlId = scope.getHtmlId(id); - object.className = '_'+ id +' '+ object.className; + object.className = '_'+ id +' '+ (object.className || ''); } return object; diff --git a/js/vn/component.js b/js/vn/component.js index 2d72fa39..a73ae6d3 100644 --- a/js/vn/component.js +++ b/js/vn/component.js @@ -131,7 +131,7 @@ const ComponentClass = { ,_refreshClass: function() { if (this._node && this._className) - this._node.className = this._className +' '+ this._node.className; + this._node.className = this._className +' '+ (this._node.className || ''); } ,remove: function() { diff --git a/package.json b/package.json index fd3a3f8b..652f0c42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "1.407.77", + "version": "1.407.78", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": {