fix: show only first line in questions table
This commit is contained in:
@@ -162,8 +162,8 @@ textarea.field-input {
|
||||
|
||||
.lesson-editor {
|
||||
border: 1px solid var(--gray-300);
|
||||
border-radius: var(--border-radius-md);
|
||||
padding-top: 0.5rem;
|
||||
border-radius: var(--border-radius-md);
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
|
||||
.lesson-parent .breadcrumb {
|
||||
@@ -197,6 +197,14 @@ textarea.field-input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.question-row .ql-editor.read-mode p {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.question-row .ql-editor.read-mode p:first-child {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.codex-editor path {
|
||||
stroke: var(--gray-800);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ frappe.ready(() => {
|
||||
save_current_lesson();
|
||||
|
||||
$(".option").click((e) => {
|
||||
enable_check(e);
|
||||
if (!$("#check").hasClass("hide")) enable_check(e);
|
||||
});
|
||||
|
||||
$(".possibility").keyup((e) => {
|
||||
@@ -286,6 +286,7 @@ const show_indicator = (class_name, element) => {
|
||||
|
||||
const add_icon = (element, icon) => {
|
||||
$(element).closest(".custom-checkbox").removeClass("active-option");
|
||||
$(element).closest(".option").addClass("hide");
|
||||
let label = $(element).siblings(".option-text").text();
|
||||
$(element).siblings(".option-text").html(`
|
||||
<div>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
frappe.ready(() => {
|
||||
/* if (!$("#quiz-form").data("name")) {
|
||||
show_quiz_modal();
|
||||
} */
|
||||
|
||||
$("#quiz-title").focusout((e) => {
|
||||
if ($("#quiz-title").val() != $("#quiz-title").data("title")) {
|
||||
save_quiz({ quiz_title: $("#quiz-title").val() });
|
||||
@@ -76,13 +72,12 @@ const get_question_fields = (values = {}) => {
|
||||
dialog_fields.push({
|
||||
fieldtype: "Section Break",
|
||||
fieldname: `section_break_${num}`,
|
||||
label: __(""),
|
||||
});
|
||||
|
||||
let option = {
|
||||
fieldtype: "Small Text",
|
||||
fieldname: `option_${num}`,
|
||||
label: __("Option ") + num,
|
||||
label: __(`Option ${num}`),
|
||||
depends_on: "eval:doc.type=='Choices'",
|
||||
default: values[`option_${num}`] || "",
|
||||
};
|
||||
@@ -115,7 +110,7 @@ const get_question_fields = (values = {}) => {
|
||||
possibility = {
|
||||
fieldtype: "Small Text",
|
||||
fieldname: `possibility_${num}`,
|
||||
label: __("Possible Answer ") + num,
|
||||
label: __(`Possible Answer ${num}`),
|
||||
depends_on: "eval:doc.type=='User Input'",
|
||||
default: values[`possibility_${num}`] || "",
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ const show_chapter_modal = (e) => {
|
||||
$.trim(parent.find(".chapter-description").text())
|
||||
);
|
||||
$("#chapter-modal").data("chapter", parent.data("chapter"));
|
||||
$("#ch apter-modal").data("idx", parent.data("idx"));
|
||||
$("#chapter-modal").data("idx", parent.data("idx"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user