fix: replaced some dialogs with alerts

This commit is contained in:
Jannat Patel
2022-06-06 11:15:06 +05:30
parent 55a770f129
commit 1f3806a7bd
12 changed files with 89 additions and 74 deletions

View File

@@ -411,20 +411,17 @@ input[type=checkbox] {
display: flex;
align-items: center;
padding: 0.5rem;
color: inherit;
color: var(--gray-900);
font-size: var(--text-base);
}
.lesson-links:hover {
cursor: pointer;
text-decoration: none;
color: inherit;
color: var(--gray-900);
border-radius: var(--border-radius-md);
}
.course-content-parent .lesson-links {
font-size: var(--text-base);
}
.lessons {
margin-left: 2rem;
}
@@ -540,11 +537,6 @@ input[type=checkbox] {
flex-direction: column;
}
.question-card {
flex-direction: column;
padding: 1.25rem;
}
.question p {
margin-bottom: 0;
}
@@ -574,12 +566,13 @@ input[type=checkbox] {
margin-top: 1rem;
}
.lesson-content-card {
margin: 3rem 0;
.lesson-content {
padding: 1.5rem;
flex-direction: column;
}
.lesson-page {
background-color: #FFFFFF;
.lesson-content-card {
margin: 2rem 0 3rem;
}
.lesson-content-card .alert-dismissible .close {
@@ -607,7 +600,6 @@ input[type=checkbox] {
display: flex;
justify-content: space-between;
align-items: center;
margin: 2rem 0 4rem;
}
.lesson-pagination-parent {
@@ -1450,3 +1442,7 @@ li {
.no-preview {
color: var(--gray-600);
}
.discussions-parent .empty-state {
background-color: var(--gray-200);
}

View File

@@ -28,13 +28,13 @@ const join_course = (e) => {
"callback": (data) => {
if (data.message == "OK") {
$(".no-preview-modal").modal("hide");
frappe.msgprint({
"title": __("Successfully Enrolled"),
"message": __("You are now a student of this course.")
});
frappe.show_alert({
message: __("You are now a student of this course."),
indicator:'green'
}, 3);
setTimeout(function () {
window.location.href = `/courses/${course}/learn/1.1`;
}, 2000);
}, 3000);
}
}
})
@@ -55,10 +55,13 @@ const notify_user = (e) => {
},
callback: (data) => {
$(".no-preview-modal").modal("hide");
frappe.msgprint(__("You have opted to be notified for this course. You will receive an email when the course becomes available."));
frappe.show_alert({
message: __("You have opted to be notified for this course. You will receive an email when the course becomes available."),
indicator:'green'
}, 3);
setTimeout(() => {
window.location.reload();
}, 2000);
}, 3000);
}
})
};