Procházet zdrojové kódy

fix: text editor overflow issue

(cherry picked from commit c5f64d43bb)
version-14
Shariq Ansari před 2 roky
committed by Mergify
rodič
revize
d286ca36c2
3 změnil soubory, kde provedl 13 přidání a 6 odebrání
  1. +4
    -1
      frappe/public/js/frappe/form/formatters.js
  2. +4
    -0
      frappe/public/js/frappe/web_form/web_form_list.js
  3. +5
    -5
      frappe/public/scss/website/web_form.scss

+ 4
- 1
frappe/public/js/frappe/form/formatters.js Zobrazit soubor

@@ -294,7 +294,10 @@ frappe.form.formatters = {
let formatted_value = frappe.form.formatters.Text(value);
// to use ql-editor styles
try {
if (!$(formatted_value).find(".ql-editor").length) {
if (
!$(formatted_value).find(".ql-editor").length &&
!$(formatted_value).hasClass("ql-editor")
) {
formatted_value = `<div class="ql-editor read-mode">${formatted_value}</div>`;
}
} catch (e) {


+ 4
- 0
frappe/public/js/frappe/web_form/web_form_list.js Zobrazit soubor

@@ -382,6 +382,10 @@ frappe.ui.WebFormListRow = class WebFormListRow {
)) ||
"";
let cell = $(`<td><p class="ellipsis">${value}</p></td>`);
if (field.fieldtype === "Text Editor") {
value = $(value).addClass("ellipsis");
cell = $("<td></td>").append(value);
}
cell.appendTo(this.row);
});



+ 5
- 5
frappe/public/scss/website/web_form.scss Zobrazit soubor

@@ -416,16 +416,16 @@
td {
font-size: 13px;
border-top: 1px solid var(--border-color);
max-width: 160px;

.ql-editor, p {
width: max-content;
max-width: 200px;
max-width: 150px;
margin-bottom: 0;

p {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
&.read-mode {
display: inline-flex;
gap: 5px;
}
}
}


Načítá se…
Zrušit
Uložit