From b0b245151014b3caec99e3b383232bc53dd34f7f Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 24 Nov 2022 14:49:48 +0100 Subject: [PATCH 1/2] refs #3971 TinyMCE working, login & various style fixes --- debian/changelog | 2 +- forms/account/address-list/style.scss | 6 +- forms/account/address-list/ui.xml | 2 +- forms/account/address/ui.xml | 2 +- forms/ecomerce/catalog/style.scss | 2 +- forms/news/new/index.js | 32 +++---- forms/news/new/style.scss | 56 ++++++----- forms/news/new/ui.xml | 2 +- forms/news/news/style.scss | 10 +- forms/news/news/ui.xml | 2 +- js/hedera/login.scss | 32 ++++--- js/hedera/login.xml | 6 +- js/htk/spinner/style.scss | 4 +- package-lock.json | 129 ++++++++++++++++++++++++-- package.json | 5 +- webpack.config.js | 14 ++- 16 files changed, 223 insertions(+), 83 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1445da47..343aa2d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (22.46.18) stable; urgency=low +hedera-web (22.46.19) stable; urgency=low * Initial Release. diff --git a/forms/account/address-list/style.scss b/forms/account/address-list/style.scss index 92b791ba..71f0f721 100644 --- a/forms/account/address-list/style.scss +++ b/forms/account/address-list/style.scss @@ -1,4 +1,6 @@ -.address-list .htk-list .side { - padding-right: 16px; +hedera-address-list { + .htk-list .side { + padding-right: 16px; + } } diff --git a/forms/account/address-list/ui.xml b/forms/account/address-list/ui.xml index ed1b9519..3afbf143 100644 --- a/forms/account/address-list/ui.xml +++ b/forms/account/address-list/ui.xml @@ -23,7 +23,7 @@ tip="_AddAddress" on-click="this.onAddAddressClick()"/> -
+
-
+
AddEditAddress diff --git a/forms/ecomerce/catalog/style.scss b/forms/ecomerce/catalog/style.scss index 993b40ad..a1cef51c 100644 --- a/forms/ecomerce/catalog/style.scss +++ b/forms/ecomerce/catalog/style.scss @@ -17,7 +17,7 @@ } } .title ._subtitle { - font-size: .7rem; + font-size: .85rem; color: #bbb; text-overflow: ellipsis; white-space: nowrap; diff --git a/forms/news/new/index.js b/forms/news/new/index.js index 989662de..9a249db8 100644 --- a/forms/news/new/index.js +++ b/forms/news/new/index.js @@ -5,6 +5,7 @@ const tinymce = require('tinymce/tinymce'); require('tinymce/icons/default'); require('tinymce/themes/silver'); require('tinymce/skins/ui/oxide/skin.css'); +require('tinymce/models/dom'); require('tinymce/plugins/advlist'); require('tinymce/plugins/code'); require('tinymce/plugins/emoticons'); @@ -15,9 +16,7 @@ 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'); @@ -34,7 +33,6 @@ 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'); @@ -51,19 +49,21 @@ export default new Class({ tinymce.init({ target: this.$.htmlEditor - ,plugins: [ - "advlist autolink lists link image charmap print preview hr" - ,"anchor pagebreak searchreplace wordcount visualblocks" - ,"visualchars code fullscreen insertdatetime media nonbreaking" - ,"save table directionality emoticons template paste" - ] + ,plugins: + ' advlist autolink lists link image charmap preview' + +' anchor pagebreak searchreplace wordcount visualblocks' + +' visualchars code fullscreen insertdatetime media nonbreaking' + +' save table directionality emoticons template' ,toolbar1: - " print preview | link image media emoticons blockquote" - +" | insertfile undo redo | bold italic" - +" | alignleft aligncenter alignright alignjustify" - +" | bullist numlist outdent indent" - +" | styleselect | fontselect fontsizeselect" - +" | forecolor backcolor" + ' print preview paste' + +'|link image media emoticons blockquote hr' + +'|insertfile undo redo' + +'|bold italic' + +'|alignleft aligncenter alignright alignjustify' + +'|bullist numlist outdent indent' + +'|styleselect' + +'|fontselect fontsizeselect' + +'|forecolor backcolor ' ,image_advtab: true ,init_instance_callback: this._onEditorInit.bind(this) ,skin: false @@ -78,7 +78,7 @@ export default new Class({ _onEditorInit(editor) { this.editor = editor; - editor.getDoc().body.style.fontSize = '1em'; + editor.getDoc().body.style.fontSize = '1rem'; this.setEditorText(); }, diff --git a/forms/news/new/style.scss b/forms/news/new/style.scss index e08051ce..6a5aaac2 100644 --- a/forms/news/new/style.scss +++ b/forms/news/new/style.scss @@ -1,26 +1,32 @@ -.new .box { - position: relative; -} -.new .htk-image { - height: 100px; - overflow: hidden; - border-bottom: 1px solid #ddd; -} -.new .htk-image > button { - display: block; -} -.new .htk-image > img { - margin-top: -40%; - width: 100%; - height: initial; -} -.new .tag-priority { - display: flex; - gap: 16px; -} -.new .tag-priority > *{ - flex: 1; -} -.new textarea { - min-height: 500px; +.hedera-new { + .box { + position: relative; + } + .htk-image { + height: 100px; + overflow: hidden; + border-bottom: 1px solid #ddd; + } + .htk-image > button { + display: block; + } + .htk-image > img { + margin-top: -40%; + width: 100%; + height: initial; + } + .tag-priority { + display: flex; + gap: 16px; + } + .tag-priority > *{ + flex: 1; + } + textarea { + min-height: 500px; + } + .tox-tinymce { + border: 1px solid #ddd; + border-radius: 0; + } } diff --git a/forms/news/new/ui.xml b/forms/news/new/ui.xml index cb5d0ad6..dcfee891 100644 --- a/forms/news/new/ui.xml +++ b/forms/news/new/ui.xml @@ -27,7 +27,7 @@ tip="_Accept" on-click="this.onAcceptClick()"/>
-
+
-
+
diff --git a/js/hedera/login.scss b/js/hedera/login.scss index 5238e4ec..469d3b3c 100644 --- a/js/hedera/login.scss +++ b/js/hedera/login.scss @@ -12,14 +12,14 @@ text-decoration: underline; } input { - margin: .3em; + margin: 4px; } input[type=text], input[type=password] { margin: 0; padding: 0 5px; width: 100%; - height: 2.6em; + height: 36px; border-radius: 0; border-top: none; border-left: none; @@ -31,7 +31,7 @@ margin: 0; width: initial; height: initial; - margin-right: .5em; + margin-right: 7px; } input[type=submit], input[type=button], @@ -60,7 +60,8 @@ $login-margin-top: 50px; $login-margin-between: 55px; .vn-login > .column { - max-width: 300px; + max-width: 240px; + overflow: visible; & > .header { margin-top: $login-margin-top; @@ -74,9 +75,9 @@ $login-margin-between: 55px; .version-code { color: red; text-align: right; - margin: .2em auto; + margin: 3px auto; font-weight: bold; - height: 1.4em; + height: 20px; display: none; } } @@ -127,15 +128,22 @@ $login-margin-between: 55px; position: relative; } .wrapper { - width: 0; - overflow: visible; - position: absolute; - top: 0; - right: 0; + } + ._submit { + position: relative; } .htk-spinner { - margin: .3em 1em; + width: 24px; + height: 24px; position: absolute; + top: 50%; + margin-top: -12px; + right: 24px; + + & > .spinner { + border-top-color: white; + border-left-color: white; + } } } } diff --git a/js/hedera/login.xml b/js/hedera/login.xml index 40b47bcd..9b97e7bb 100644 --- a/js/hedera/login.xml +++ b/js/hedera/login.xml @@ -27,10 +27,10 @@
- -
+
+
diff --git a/js/htk/spinner/style.scss b/js/htk/spinner/style.scss index df630787..3003ecf5 100644 --- a/js/htk/spinner/style.scss +++ b/js/htk/spinner/style.scss @@ -1,7 +1,7 @@ .htk-spinner { - width: 1.8em; - height: 1.8em; + width: 25px; + height: 25px; position: relative; display: inline-block; diff --git a/package-lock.json b/package-lock.json index bb323a17..b77bc635 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "hedera-web", - "version": "22.46.9", + "version": "22.46.19", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "hedera-web", - "version": "22.46.9", + "version": "22.46.19", "license": "GPL-3.0", "dependencies": { "js-yaml": "^3.12.1", "mootools": "^1.5.2", "promise-polyfill": "^8.2.3", "require-yaml": "0.0.1", - "tinymce": "^5.10.6" + "tinymce": "^6.3.0" }, "devDependencies": { "@babel/preset-env": "^7.20.2", @@ -28,6 +28,7 @@ "glob": "^8.0.3", "html-webpack-plugin": "^5.5.0", "json-loader": "^0.5.7", + "mini-css-extract-plugin": "^2.7.0", "node-sass": "^7.0.1", "raw-loader": "^4.0.2", "sass-loader": "^12.6.0", @@ -6329,6 +6330,72 @@ "node": ">=4" } }, + "node_modules/mini-css-extract-plugin": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.0.tgz", + "integrity": "sha512-auqtVo8KhTScMsba7MbijqZTfibbXiBNlPAQbsVt7enQfcDYLdgG57eGxMqwVU3mfeWANY4F1wUg+rMF+ycZgw==", + "dev": true, + "dependencies": { + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/schema-utils": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -8881,9 +8948,9 @@ "dev": true }, "node_modules/tinymce": { - "version": "5.10.6", - "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-5.10.6.tgz", - "integrity": "sha512-bnF2LUoycDsoZZLQBNHbOijrmoJuEeR1rQdqgo4s77BedufpOVnDh00OZKbseHeTMCxhVH05wvOqxLsi6vpeZw==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.3.0.tgz", + "integrity": "sha512-UeOKdbDbBoAT2A8WQr/D4AqzqPloTY/B/zJXCGlPz5L4YOmwUCqXAFTxN1tkysRq994UIZZUJZezC7WmCDx5ag==" }, "node_modules/to-fast-properties": { "version": "2.0.0", @@ -14574,6 +14641,50 @@ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true }, + "mini-css-extract-plugin": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.0.tgz", + "integrity": "sha512-auqtVo8KhTScMsba7MbijqZTfibbXiBNlPAQbsVt7enQfcDYLdgG57eGxMqwVU3mfeWANY4F1wUg+rMF+ycZgw==", + "dev": true, + "requires": { + "schema-utils": "^4.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.3" + } + }, + "schema-utils": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + } + } + } + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -16509,9 +16620,9 @@ "dev": true }, "tinymce": { - "version": "5.10.6", - "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-5.10.6.tgz", - "integrity": "sha512-bnF2LUoycDsoZZLQBNHbOijrmoJuEeR1rQdqgo4s77BedufpOVnDh00OZKbseHeTMCxhVH05wvOqxLsi6vpeZw==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.3.0.tgz", + "integrity": "sha512-UeOKdbDbBoAT2A8WQr/D4AqzqPloTY/B/zJXCGlPz5L4YOmwUCqXAFTxN1tkysRq994UIZZUJZezC7WmCDx5ag==" }, "to-fast-properties": { "version": "2.0.0", diff --git a/package.json b/package.json index d5ac76b1..beaa6959 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "22.46.18", + "version": "22.46.19", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { @@ -20,6 +20,7 @@ "glob": "^8.0.3", "html-webpack-plugin": "^5.5.0", "json-loader": "^0.5.7", + "mini-css-extract-plugin": "^2.7.0", "node-sass": "^7.0.1", "raw-loader": "^4.0.2", "sass-loader": "^12.6.0", @@ -36,7 +37,7 @@ "mootools": "^1.5.2", "promise-polyfill": "^8.2.3", "require-yaml": "0.0.1", - "tinymce": "^5.10.6" + "tinymce": "^6.3.0" }, "scripts": { "front": "webpack serve --open", diff --git a/webpack.config.js b/webpack.config.js index 71430524..23b69d79 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,7 @@ const path = require('path'); const webpack = require('webpack'); const AssetsWebpackPlugin = require('assets-webpack-plugin'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const merge = require('webpack-merge').merge; const wpConfig = require('./webpack.config.json'); @@ -27,9 +28,17 @@ const baseConfig = { presets: ['@babel/preset-env'] } } + }, { + test: /tinymce\/.*\/skin\.css$/i, + use: [MiniCssExtractPlugin.loader, 'css-loader'] + }, { + test: /tinymce\/.*\/content\.css$/i, + loader: 'css-loader', + options: {esModule: false} }, { test: /\.css$/, - use: [/*'style-loader', */'css-loader'], + use: ['style-loader', 'css-loader'], + exclude: [/node_modules/] }, { test: /\.yml$/, use: ['json-loader', 'yaml-loader'] @@ -74,7 +83,8 @@ const baseConfig = { _DEV_MODE: devMode, _DEV_SERVER_PORT: wpConfig.devServerPort, _PUBLIC_PATH: JSON.stringify(publicPath) - }) + }), + new MiniCssExtractPlugin() ], optimization: { runtimeChunk: true, From ebb6055be5fa711133cde7a705d9aafb3b44f8c6 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 28 Nov 2022 10:41:45 +0100 Subject: [PATCH 2/2] refs #3971 Version increased --- debian/changelog | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 251328bf..7d7784b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (22.48.0) stable; urgency=low +hedera-web (22.48.1) stable; urgency=low * Initial Release. diff --git a/package.json b/package.json index 68d54379..64b4482d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "22.48.0", + "version": "22.48.1", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": {