From 5824633e1b7ddb957ec35ece4b6536258a9b1ee3 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Sat, 19 Nov 2022 01:28:24 +0100 Subject: [PATCH] refs 3971 Style fixes, scope & news error fixes --- debian/changelog | 2 +- forms/ecomerce/catalog/style.scss | 41 ++++++------------- forms/ecomerce/catalog/ui.xml | 2 +- forms/news/new/index.js | 44 +++++++++++++++++++- forms/news/new/ui.xml | 5 ++- js/hedera/form.js | 3 +- js/hedera/gui.js | 3 +- js/hedera/gui.scss | 68 ++++++++++++++++++++----------- js/hedera/gui.xml | 2 +- js/hedera/report.js | 5 +++ js/htk/repeater/index.js | 8 ++-- js/htk/style/variables.scss | 5 +++ js/vn/component.js | 4 +- js/vn/scope.js | 10 +++-- package-lock.json | 46 ++++++++++----------- package.json | 12 +++--- 16 files changed, 157 insertions(+), 103 deletions(-) diff --git a/debian/changelog b/debian/changelog index 54cab960..5dbdcfdf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (22.46.8) stable; urgency=low +hedera-web (22.46.9) stable; urgency=low * Initial Release. diff --git a/forms/ecomerce/catalog/style.scss b/forms/ecomerce/catalog/style.scss index ae618905..156c5fab 100644 --- a/forms/ecomerce/catalog/style.scss +++ b/forms/ecomerce/catalog/style.scss @@ -2,12 +2,19 @@ @import "../../../js/htk/style/classes"; .catalog { - margin-right: 18em; + margin-right: $side-panel-width; } .catalog-actions { .htk-search-entry { margin-right: 4px; } + & > button.menu { + display: none; + + & > .htk-icon { + display: block; + } + } } .title ._subtitle { font-size: .7rem; @@ -19,20 +26,14 @@ /* Right panel */ -.right-panel { - position: fixed; - top: 4.4em; - bottom: 0; - right: 0; - width: 18em; - overflow: auto; +.catalog-panel { background-color: #fafafa; .basket-info { background-color: #8cc63f; color: white; padding: 17px 28px; - border-radius: .5em; + border-radius: 7px; margin: 14px; text-align: center; @@ -88,7 +89,7 @@ .realms a { display: inline-block; width: 25%; - padding: .6em; + padding: 8px; box-sizing: border-box; border-radius: 50%; } @@ -101,7 +102,7 @@ width: 100%; } .filters > button { - margin-top: 1em; + margin-top: 14px; } } @@ -409,28 +410,10 @@ /* Mobile */ -.catalog-actions > button.menu { - display: none; -} -.catalog-actions > button.menu > .htk-icon { - display: block; -} - @include mobile { .catalog-actions > button.menu { display: block; } - .right-panel { - top: 0; - right: -18em; - z-index: 20; - transition: transform 200ms ease-out; - -webkit-transition: transform 200ms ease-out; - } - .right-panel.show { - transform: translateZ(0) translateX(-18em); - -webkit-transform: translateZ(0) translateX(-18em); - } .catalog { margin-right: 0; } diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml index 3b519ecd..9cc9b158 100644 --- a/forms/ecomerce/catalog/ui.xml +++ b/forms/ecomerce/catalog/ui.xml @@ -199,7 +199,7 @@ -
+

{{Vn.Value.format(basket.sent, '%D')}}

diff --git a/forms/news/new/index.js b/forms/news/new/index.js index 730687c1..c66fd70e 100644 --- a/forms/news/new/index.js +++ b/forms/news/new/index.js @@ -1,6 +1,43 @@ -const tinymce = require('tinymce/tinymce.min'); import './style.scss'; + //TinyMCE */ + const tinymce = require('tinymce/tinymce'); + require('tinymce/icons/default'); + require('tinymce/themes/silver'); + require('tinymce/skins/ui/oxide/skin.css'); + require('tinymce/plugins/advlist'); + require('tinymce/plugins/code'); + require('tinymce/plugins/emoticons'); + require('tinymce/plugins/emoticons/js/emojis'); + require('tinymce/plugins/link'); + require('tinymce/plugins/lists'); + require('tinymce/plugins/table'); + require('tinymce/plugins/autolink'); + require('tinymce/plugins/image'); + require('tinymce/plugins/charmap'); + require('tinymce/plugins/print'); + require('tinymce/plugins/preview'); + require('tinymce/plugins/hr'); + require('tinymce/plugins/anchor'); + require('tinymce/plugins/pagebreak'); + require('tinymce/plugins/searchreplace'); + require('tinymce/plugins/wordcount'); + require('tinymce/plugins/visualblocks'); + require('tinymce/plugins/visualchars'); + require('tinymce/plugins/code'); + require('tinymce/plugins/fullscreen'); + require('tinymce/plugins/insertdatetime'); + require('tinymce/plugins/media'); + require('tinymce/plugins/nonbreaking'); + require('tinymce/plugins/save'); + require('tinymce/plugins/table'); + require('tinymce/plugins/directionality'); + require('tinymce/plugins/emoticons'); + require('tinymce/plugins/template'); + require('tinymce/plugins/paste'); + const contentUiCss = require('tinymce/skins/ui/oxide/content.css'); + const contentCss = require('tinymce/skins/content/default/content.css'); + export default new Class({ Extends: Hedera.Form, Template: require('./ui.xml') @@ -29,6 +66,9 @@ export default new Class({ +" | forecolor backcolor" ,image_advtab: true ,init_instance_callback: this._onEditorInit.bind(this) + ,skin: false + ,content_css: false + ,content_style: contentUiCss.toString() + '\n' + contentCss.toString() }); }, @@ -60,7 +100,7 @@ export default new Class({ this.onReturnClick(); }, - onBodyChange() { + onReady() { this.setEditorText(); }, diff --git a/forms/news/new/ui.xml b/forms/news/new/ui.xml index 54014e7f..cb5d0ad6 100644 --- a/forms/news/new/ui.xml +++ b/forms/news/new/ui.xml @@ -1,6 +1,8 @@ - + -

AddEditNew

diff --git a/js/hedera/form.js b/js/hedera/form.js index 57cd961d..c8760bb9 100644 --- a/js/hedera/form.js +++ b/js/hedera/form.js @@ -21,7 +21,7 @@ module.exports = new Class({ const builder = new Vn.Builder(); builder.compileString(this.$constructor.Template.default); - const scope = this.builder = builder.load(null, this); + const scope = this.scope = this.builder = builder.load(null, this); this.$ = scope.$; scope.link({conn, hash}); this.node = scope.$.form; @@ -103,6 +103,7 @@ module.exports = new Class({ ,_destroy() { this.close(); + if (this.scope) this.scope._destroy(); Vn.Object.prototype._destroy.call(this); } }); diff --git a/js/hedera/gui.js b/js/hedera/gui.js index b7a1c9db..780db85e 100644 --- a/js/hedera/gui.js +++ b/js/hedera/gui.js @@ -359,7 +359,6 @@ module.exports = new Class({ this.hideMenu(); this.loaderPush(); - this.closeForm(); this.requestedForm = formPath; @@ -440,7 +439,7 @@ module.exports = new Class({ if (this.activeForm) { Vn.Node.removeClass(this.$.formHolder, 'show'); this.activeForm.close(); - this.activeForm.unref(); + this.activeForm._destroy(); this.activeForm = null; } diff --git a/js/hedera/gui.scss b/js/hedera/gui.scss index 779cb84c..181cbd4e 100644 --- a/js/hedera/gui.scss +++ b/js/hedera/gui.scss @@ -1,8 +1,6 @@ @import "../htk/style/classes"; -$side-panel-width: 250px; -$navbar-height: 64px; .vn-gui { height: inherit; @@ -112,16 +110,6 @@ $navbar-height: 64px; /* Left panel */ - .left-panel { - z-index: 20; - position: fixed; - left: 0; - bottom: 0; - top: 0; - background-color: white; - z-index: 20; - width: $side-panel-width; - } .menu-overflow { position: absolute; top: 0; @@ -322,18 +310,6 @@ $navbar-height: 64px; & > .body { margin-left: 0; } - .left-panel { - top: 0; - left: -250px; - box-shadow: 0 0 .2em rgba(1, 1, 1, .3); - - transition: transform 200ms ease-out; - -webkit-transition: transform 200ms ease-out; - } - .left-panel.show { - transform: translateZ(0) translateX(250px); - -webkit-transform: translateZ(0) translateX(250px); - } .form-holder { left: 0; } @@ -353,3 +329,47 @@ $navbar-height: 64px; } } } + +/* Rigth panel */ + +.side-panel { + z-index: 20; + position: fixed; + bottom: 0; + background-color: white; + width: $side-panel-width; + + &.left-panel { + left: 0; + top: 0; + + @include mobile { + left: -$side-panel-width; + + &.show { + transform: translateZ(0) translateX($side-panel-width); + -webkit-transform: translateZ(0) translateX($side-panel-width); + } + } + } + &.right-panel { + right: 0; + top: $navbar-height; + overflow: auto; + + @include mobile { + right: -$side-panel-width; + + &.show { + top: 0; + transform: translateZ(0) translateX(-$side-panel-width); + -webkit-transform: translateZ(0) translateX(-$side-panel-width); + } + } + } + @include mobile { + transition: transform 200ms ease-out; + -webkit-transition: transform 200ms ease-out; + box-shadow: 0 0 .2em rgba(1, 1, 1, .3); + } +} diff --git a/js/hedera/gui.xml b/js/hedera/gui.xml index d083ad2c..1381d7a2 100644 --- a/js/hedera/gui.xml +++ b/js/hedera/gui.xml @@ -13,7 +13,7 @@
-
+