Skip to content

Commit

Permalink
Issue #3861: reworked styles for agentticketphone
Browse files Browse the repository at this point in the history
unsolved issue: resizing of dropdown input fields via js
  • Loading branch information
chzauleck committed Nov 4, 2024
1 parent 13f3001 commit 77657c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 5 additions & 3 deletions var/httpd/htdocs/js/Core.UI.RichTextEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ Core.UI.RichTextEditor = (function (TargetNS) {
adjustEditorSize();
});

let count = 0;

// Adjust Editor Size to match (resizable) container size
var adjustEditorSize = function() {
let toolbarHeight = $domEditableElement.find('.ck-editor__top').outerHeight();
Expand All @@ -296,7 +298,7 @@ Core.UI.RichTextEditor = (function (TargetNS) {
}
let verticalPadding = parseFloat($editingArea.css("padding-top")) + parseFloat($editingArea.css("padding-bottom"));
let borderWidth = parseFloat($editingArea.css("border-top")) + parseFloat($editingArea.css("border-bottom"));
let newSize = newEditorSize - (toolbarHeight + verticalPadding)
let newSize = newEditorSize - toolbarHeight;
if (sourceEditingActive) {
$editingArea.height(newSize);
editor.editing.view.forceRender();
Expand Down Expand Up @@ -355,10 +357,10 @@ Core.UI.RichTextEditor = (function (TargetNS) {
if (!CustomerInterface) {
// set initial Editor size as defined by System Configuration
// add 10 px of padding to the editor width
let EditorWidth = Number( Core.Config.Get("RichText.Width", 620) ) + 10;
let EditorWidth = Number( Core.Config.Get("RichText.Width", 620) );

$domEditableElement.css("height", Core.Config.Get("RichText.Height", 320));
$domEditableElement.css("width", EditorWidth);
$domEditableElement.css("--preferred-width", EditorWidth);
}

Core.App.Publish('Event.UI.RichTextEditor.InstanceCreated', [editor]);
Expand Down
9 changes: 5 additions & 4 deletions var/httpd/htdocs/skins/Agent/default/css/Core.Form.css
Original file line number Diff line number Diff line change
Expand Up @@ -1139,14 +1139,15 @@ fieldset.ModularForm {
border-radius: 4px;
}

fieldset.ModularForm .RichTextField {
fieldset.ModularForm .FieldCell .RichTextField {
flex-direction: column;
resize: vertical;
z-index: 10;
position: relative;
overflow: hidden;
min-height: 150px !important;
height: 320px;
--initial-height: 520px;
height: var(--initial-height);
--preferred-width: 400px;
width: min( 100%, var(--preferred-width) );
max-width: 100%
}

Expand Down

0 comments on commit 77657c0

Please sign in to comment.