@@ -110,7 +98,6 @@
-
@@ -212,27 +187,25 @@
-
-
-
-
diff --git a/AxonIvyPortal/portal/webContent/resources/css/module.css b/AxonIvyPortal/portal/webContent/resources/css/module.css
index 4cf37690dd..dccf8910a3 100644
--- a/AxonIvyPortal/portal/webContent/resources/css/module.css
+++ b/AxonIvyPortal/portal/webContent/resources/css/module.css
@@ -5633,18 +5633,7 @@ a.dashboard-action-container label {
display: flex;
}
-.ui-welcome-upload-file-panel {
- width: 100%;
- border: 1px solid var(--process-list-item-border-color);
- background-color: var(--ui-fileupload-buttonbar-background-color);
- border-radius: 10px;
- height: 8em;
- align-items: center;
- display: flex;
-
-}
-
-.ui-external-link-preview-image-panel > .ui-external-link-preview-image-label, .ui-dashboard-upload-file-panel > .ui-dashboard-upload-file-label, .ui-document-upload-file-panel > .ui-document-upload-file-label, .ui-welcome-upload-file-panel > .ui-document-upload-file-label {
+.ui-external-link-preview-image-panel > .ui-external-link-preview-image-label, .ui-dashboard-upload-file-panel > .ui-dashboard-upload-file-label, .ui-document-upload-file-panel > .ui-document-upload-file-label {
width: 42%;
display: block;
text-align: center;
diff --git a/AxonIvyPortal/portal/webContent/resources/js/welcome-widget.js b/AxonIvyPortal/portal/webContent/resources/js/welcome-widget.js
index 98e3843974..ac041cab39 100644
--- a/AxonIvyPortal/portal/webContent/resources/js/welcome-widget.js
+++ b/AxonIvyPortal/portal/webContent/resources/js/welcome-widget.js
@@ -23,16 +23,16 @@ WelcomeWidgetConfiguration = {
updatePreviewText : function(isGreeting) {
var previewDialog = $('#new-widget-configuration-dialog');
var welcomeText = '';
- var findWelcomeText = previewDialog.find('.js-welcome-text-input.language-to-preview');
- if (findWelcomeText != undefined && findWelcomeText.get(0) != undefined){
- welcomeText = findWelcomeText.get(0).value;
- }
+ var findWelcomeText = previewDialog.find('.js-welcome-text-input.language-to-preview');
+ if (findWelcomeText != undefined && findWelcomeText.get(0) != undefined){
+ welcomeText = findWelcomeText.get(0).value;
+ }
if (isGreeting == 'true' || (isGreeting == undefined && $('.js-greeting-text').length != 0)) {
- var findGreeting = previewDialog.find('.js-greeting-text.language-to-preview')
- if (findGreeting != undefined && findGreeting.get(0) != undefined){
- welcomeText = findGreeting.get(0).innerHTML + welcomeText;
- }
+ var findGreeting = previewDialog.find('.js-greeting-text.language-to-preview')
+ if (findGreeting != undefined && findGreeting.get(0) != undefined){
+ welcomeText = findGreeting.get(0).innerHTML + welcomeText;
+ }
}
var findPreviewText = $('#new-widget-configuration-dialog').find('.js-preview-text');
@@ -67,7 +67,7 @@ WelcomeWidgetConfiguration = {
previewText.removeClass('bottom top left right').addClass('center');
}
- var previewTextDarkMode = previewDialog.find('.js-preview-text-dark-mode');
+ var previewTextDarkMode = previewDialog.find('.js-preview-text-dark-mode');
if (selectedPosition == 'BOTTOM_LEFT') {
previewTextDarkMode.removeClass('top right center').addClass('bottom left');
}
@@ -89,32 +89,32 @@ updatePreviewImageFit : function() {
var previewDialog = $('#new-widget-configuration-dialog');
var selectedFit = previewDialog.find('input[id $="selected-welcome-image-fit"]').get(0).value;
var images = previewDialog.find('.js-preview-image');
- for (var i = 0; i < images.length;i ++){
- var currentImage = images[i];
- $(currentImage).removeClass (function (index, className) {
- return (className.match (/(^|\s)welcome-image-fit-\S+/g) || []).join(' ');
- });
- if (selectedFit == 'COVER') {
- $(currentImage).addClass('welcome-image-fit-cover');
- } else if (selectedFit == 'FILL') {
- $(currentImage).addClass('welcome-image-fit-fill');
- } else if (selectedFit == 'NONE') {
- $(currentImage).addClass('welcome-image-fit-none');
- } else if (selectedFit == 'CONTAIN') {
- $(currentImage).addClass('welcome-image-fit-contain');
- }
- }
+ for (var i = 0; i < images.length;i ++){
+ var currentImage = images[i];
+ $(currentImage).removeClass (function (index, className) {
+ return (className.match (/(^|\s)welcome-image-fit-\S+/g) || []).join(' ');
+ });
+ if (selectedFit == 'COVER') {
+ $(currentImage).addClass('welcome-image-fit-cover');
+ } else if (selectedFit == 'FILL') {
+ $(currentImage).addClass('welcome-image-fit-fill');
+ } else if (selectedFit == 'NONE') {
+ $(currentImage).addClass('welcome-image-fit-none');
+ } else if (selectedFit == 'CONTAIN') {
+ $(currentImage).addClass('welcome-image-fit-contain');
+ }
+ }
},
updatePreviewTextColor : function() {
var previewDialog = $('#new-widget-configuration-dialog');
var findSelectedColor = previewDialog.find('.js-welcome-text-color');
if (findSelectedColor != undefined){
- var selectedColor = findSelectedColor.get(0).value;
- var findPreviewText = previewDialog.find('.js-preview-text');
- if (findPreviewText != undefined){
- findPreviewText.css({'color': selectedColor});
- }
+ var selectedColor = findSelectedColor.get(0).value;
+ var findPreviewText = previewDialog.find('.js-preview-text');
+ if (findPreviewText != undefined){
+ findPreviewText.css({'color': selectedColor});
+ }
}
},
@@ -122,11 +122,11 @@ updatePreviewImageFit : function() {
var previewDialog = $('#new-widget-configuration-dialog');
var findSelectedColorDarkMode = previewDialog.find('.js-welcome-text-color-dark-mode');
if (findSelectedColorDarkMode != undefined){
- var selectedColorDarkMode = findSelectedColorDarkMode.get(0).value;
- var findPreviewTextDarkMode = previewDialog.find('.js-preview-text-dark-mode');
- if (findPreviewTextDarkMode != undefined){
- findPreviewTextDarkMode.css({'color': selectedColorDarkMode});
- }
+ var selectedColorDarkMode = findSelectedColorDarkMode.get(0).value;
+ var findPreviewTextDarkMode = previewDialog.find('.js-preview-text-dark-mode');
+ if (findPreviewTextDarkMode != undefined){
+ findPreviewTextDarkMode.css({'color': selectedColorDarkMode});
+ }
}
},
@@ -135,20 +135,20 @@ updatePreviewImageFit : function() {
var previewDialog = $('#new-widget-configuration-dialog');
var selectedTextSize = previewDialog.find('input[id $="selected-welcome-text-size"]').get(0).value;
var previewText = previewDialog.find('.js-preview-text');
- var previewTextDarkMode = previewDialog.find('.js-preview-text-dark-mode');
+ var previewTextDarkMode = previewDialog.find('.js-preview-text-dark-mode');
if (selectedTextSize == 'NORMAL_TEXT') {
previewText.removeClass('HEADING_1 HEADING_2 HEADING_3').addClass('NORMAL_TEXT');
- previewTextDarkMode.removeClass('HEADING_1 HEADING_2 HEADING_3').addClass('NORMAL_TEXT');
+ previewTextDarkMode.removeClass('HEADING_1 HEADING_2 HEADING_3').addClass('NORMAL_TEXT');
return;
}
if (selectedTextSize == 'HEADING_1') {
previewText.removeClass('HEADING_2 HEADING_3 NORMAL_TEXT').addClass('HEADING_1');
- previewTextDarkMode.removeClass('HEADING_2 HEADING_3 NORMAL_TEXT').addClass('HEADING_1');
+ previewTextDarkMode.removeClass('HEADING_2 HEADING_3 NORMAL_TEXT').addClass('HEADING_1');
return;
}
if (selectedTextSize == 'HEADING_2') {
previewText.removeClass('HEADING_1 HEADING_3 NORMAL_TEXT').addClass('HEADING_2');
- previewTextDarkMode.removeClass('HEADING_1 HEADING_3 NORMAL_TEXT').addClass('HEADING_2');
+ previewTextDarkMode.removeClass('HEADING_1 HEADING_3 NORMAL_TEXT').addClass('HEADING_2');
return;
}
if (selectedTextSize == 'HEADING_3') {
@@ -156,7 +156,7 @@ updatePreviewImageFit : function() {
previewTextDarkMode.removeClass('HEADING_1 HEADING_2 NORMAL_TEXT').addClass('HEADING_3');
return;
}
-
+
},
updateStyleClasses : function() {
@@ -178,7 +178,7 @@ updatePreviewImageFit : function() {
this.oldTextStyleClass = welcomeText.attr('class');
}
welcomeText.attr('class', this.oldTextStyleClass + ' ' + textStyleClass);
- welcomeTextDarkMode.attr('class', this.oldTextStyleClass + ' ' + textStyleClass);
+ welcomeTextDarkMode.attr('class', this.oldTextStyleClass + ' ' + textStyleClass);
}
}
@@ -195,7 +195,7 @@ WelcomeWidget = {
welcomeText.css({
'color' : welcomeTextColor,
});
-
+
switch(welcomeTextPosition) {
case 'BOTTOM_LEFT':
welcomeText.addClass('bottom').addClass('left');
@@ -217,8 +217,8 @@ WelcomeWidget = {
}
welcomeText.addClass(welcomeTextSize);
-
- var welcomeTextDarkMode = widget.find('[id $= "welcome-text-dark-mode"]');
+
+ var welcomeTextDarkMode = widget.find('[id $= "welcome-text-dark-mode"]');
welcomeTextDarkMode.css({
'color' : welcomeTextColorDarkMode,
});
@@ -249,24 +249,24 @@ WelcomeWidget = {
updateImageFit: function(widgetId, welcomeImageFit) {
var widget = $('div.grid-stack-item[gs-id = ' + widgetId + ']');
var images = widget.find('.js-welcome-image');
-
- for (var i = 0; i < images.length; i++){
- var currentImage = images[i];
- $(currentImage).removeClass (function (index, className) {
- return (className.match (/(^|\s)welcome-image-fit-\S+/g) || []).join(' ');
- });
- if (welcomeImageFit == 'COVER') {
- $(currentImage).addClass('welcome-image-fit-cover');
- } else if (welcomeImageFit == 'FILL') {
- $(currentImage).addClass('welcome-image-fit-fill');
- } else if (welcomeImageFit == 'NONE') {
- $(currentImage).addClass('welcome-image-fit-none');
- } else if (welcomeImageFit == 'CONTAIN') {
- $(currentImage).addClass('welcome-image-fit-contain');
- }
- }
-
+ for (var i = 0; i < images.length; i++){
+ var currentImage = images[i];
+ $(currentImage).removeClass (function (index, className) {
+ return (className.match (/(^|\s)welcome-image-fit-\S+/g) || []).join(' ');
+ });
+ if (welcomeImageFit == 'COVER') {
+ $(currentImage).addClass('welcome-image-fit-cover');
+ } else if (welcomeImageFit == 'FILL') {
+ $(currentImage).addClass('welcome-image-fit-fill');
+ } else if (welcomeImageFit == 'NONE') {
+ $(currentImage).addClass('welcome-image-fit-none');
+ } else if (welcomeImageFit == 'CONTAIN') {
+ $(currentImage).addClass('welcome-image-fit-contain');
+ }
+ }
+
+
},
updateImageInlineStyle: function(widgetId, imageInlineStyle) {
@@ -277,10 +277,3 @@ WelcomeWidget = {
}
}
}
-
-function handleUploadFileFail() {
- let errorMessageElement = document.getElementById('widget-configuration-form:new-widget-configuration-component:config-welcome-widget-message');
- let uploadErrorElement = document.getElementsByClassName('ui-messages ui-widget ui-helper-hidden ui-fileupload-messages')[0];
- errorMessageElement.style.display = 'block';
- errorMessageElement.appendChild(uploadErrorElement);
-}
\ No newline at end of file