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