summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/css/custom.css105
-rw-r--r--yaksh/static/yaksh/css/design_course.css17
-rw-r--r--yaksh/static/yaksh/css/question_paper_creation.css15
-rw-r--r--yaksh/static/yaksh/js/add_quiz.js4
-rw-r--r--yaksh/static/yaksh/js/course.js141
-rw-r--r--yaksh/static/yaksh/js/lesson.js24
6 files changed, 197 insertions, 109 deletions
diff --git a/yaksh/static/yaksh/css/custom.css b/yaksh/static/yaksh/css/custom.css
index 55d5d6d..63ee455 100644
--- a/yaksh/static/yaksh/css/custom.css
+++ b/yaksh/static/yaksh/css/custom.css
@@ -1,25 +1,3 @@
-.yakshfooter {
- background-color: #142624;
- padding-top: 1%;
- padding-left: 10%;
- padding-right: 10%;
- padding-bottom: 1%;
- color: white;
- bottom: 0;
- width: 100%;
- position: absolute;
- text-align: center;
-}
-
-.yakshfooter .nav-pills>li>a, .yakshfooter .nav-pills .nav-link,.yakshnav .nav-pills>li>a {
- color: white;
-}
-
-.yakshfooter .nav-pills>li>a:hover, .yakshnav .nav-pills>li>a:hover {
- color: black;
- background-color: white;
-}
-
body, .dropdown-menu {
font-size: 1.25rem;
}
@@ -36,3 +14,86 @@ body, .dropdown-menu {
.dropdown {
display: flex;
}
+
+.course-detail, #result-table {
+ table-layout: fixed;
+ width: 100%;
+}
+
+.course-detail, #result-table > th, td {
+ word-wrap: break-word;
+}
+
+#rendered_text{
+ width: 550px;
+}
+
+.navbar {
+ padding: 15px 10px;
+ background: #fff;
+ border: none;
+ border-radius: 0;
+ margin-bottom: 40px;
+ box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
+}
+
+.navbar-btn {
+ box-shadow: none;
+ outline: none !important;
+ border: none;
+}
+
+.line {
+ width: 100%;
+ height: 1px;
+ border-bottom: 1px dashed #ddd;
+ margin: 40px 0;
+}
+
+/* ---------------------------------------------------
+ SIDEBAR STYLE
+----------------------------------------------------- */
+
+.wrapper {
+ display: flex;
+ width: 100%;
+ align-items: stretch;
+}
+
+#sidebar {
+ min-width: 350px;
+ max-width: 350px;
+ background: #fff;
+ transition: all 0.3s;
+}
+
+#sidebar.active {
+ margin-left: -350px;
+}
+
+#sidebar .sidebar-header {
+ padding: 20px;
+ background: #158CBA;
+}
+
+#sidebar ul.components {
+ padding: 20px 0;
+ border-bottom: 1px solid #fff;
+}
+
+#sidebar ul li a {
+ padding: 10px;
+ font-size: 1.1em;
+ display: block;
+}
+
+/* ---------------------------------------------------
+ CONTENT STYLE
+----------------------------------------------------- */
+
+#content {
+ width: 100%;
+ padding: 20px;
+ min-height: 100vh;
+ transition: all 0.3s;
+}
diff --git a/yaksh/static/yaksh/css/design_course.css b/yaksh/static/yaksh/css/design_course.css
index d1bf4bd..a0dcd10 100644
--- a/yaksh/static/yaksh/css/design_course.css
+++ b/yaksh/static/yaksh/css/design_course.css
@@ -1,17 +1,6 @@
-body {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 13px;
- font-weight: normal;
- line-height: 18px;
- color: #404040;
-}
-
-#available-lesson-quiz .col-md-8 > div{
+#available-lesson-quiz .col-md-12 > div{
background: #f5f5f5;
border: 1px solid #333333;
overflow-y: scroll;
- height: 300px;
-}
-#available-lesson-quiz .available-list > div{
- height: 300px;
-}
+ height: 400px;
+} \ No newline at end of file
diff --git a/yaksh/static/yaksh/css/question_paper_creation.css b/yaksh/static/yaksh/css/question_paper_creation.css
index ff4bf32..bc8feeb 100644
--- a/yaksh/static/yaksh/css/question_paper_creation.css
+++ b/yaksh/static/yaksh/css/question_paper_creation.css
@@ -1,10 +1,3 @@
-body {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 13px;
- font-weight: normal;
- line-height: 18px;
- color: #404040;
-}
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
background-color: #FFFFFF;
border-color: #DDDDDD #DDDDDD rgba(0, 0, 0, 0);
@@ -63,20 +56,20 @@ body {
#fixed-questions .col-md-6 > div,
#random-questions .col-md-6 > div{
background: #f5f5f5;
- height: 200px;
+ height: 300px;
border: 1px solid #333333;
padding: 5px;
}
#fixed-available,
#random-available {
- height: 125px;
- min-height: 125px;
+ height: 220px;
+ min-height: 200px;
overflow-y: scroll;
margin-bottom: 15px;
}
#fixed-added,
#random-added {
- height: 160px;
+ height: 220px;
overflow-y: scroll;
}
#fixed-added hr,
diff --git a/yaksh/static/yaksh/js/add_quiz.js b/yaksh/static/yaksh/js/add_quiz.js
index 57993ef..dab5a3d 100644
--- a/yaksh/static/yaksh/js/add_quiz.js
+++ b/yaksh/static/yaksh/js/add_quiz.js
@@ -1,8 +1,8 @@
function test()
{
- document.getElementById('id_duration').setAttribute('class','mini-text');
- document.getElementById('id_pass_criteria').setAttribute('class','mini-text');
+ document.getElementById('id_duration').setAttribute('class','mini-text form-control');
+ document.getElementById('id_pass_criteria').setAttribute('class','mini-text form-control');
if (document.getElementById("id_description").value != "")
{
document.getElementById("submit").innerHTML = "Save";
diff --git a/yaksh/static/yaksh/js/course.js b/yaksh/static/yaksh/js/course.js
index bd197a8..a4b5579 100644
--- a/yaksh/static/yaksh/js/course.js
+++ b/yaksh/static/yaksh/js/course.js
@@ -1,5 +1,5 @@
$(document).ready(function(){
-$(".checkall").change( function(){
+ $(".checkall").change( function(){
if($(this).prop("checked")) {
$("#enroll-all input:checkbox").each(function(index, element) {
$(this).prop('checked', true);
@@ -11,7 +11,7 @@ $(".checkall").change( function(){
});
}
});
-$(".enroll").change( function(){
+ $(".enroll").change( function(){
if($(this).prop("checked")) {
$("#enroll input:checkbox").each(function(index, element) {
$(this).prop('checked', true);
@@ -23,7 +23,7 @@ $(".enroll").change( function(){
});
}
});
-$(".reject").change( function(){
+ $(".reject").change( function(){
if($(this).prop("checked")) {
$("#reject input:checkbox").each(function(index, element) {
$(this).prop('checked', true);
@@ -36,68 +36,95 @@ $(".reject").change( function(){
}
});
-$(function() {
- tinymce.init({
- selector: 'textarea#email_body',
- max_height: 200,
- height: 200
+ $(".send_check").change( function(){
+ if($(this).prop("checked")) {
+ $("#sender_list input:checkbox").each(function(index, element) {
+ $(this).prop('checked', true);
+ });
+ }
+ else {
+ $("#sender_list input:checkbox").each(function(index, element) {
+ $(this).prop('checked', false);
+ });
+ }
});
-});
-$("#send_mail").click(function(){
- var subject = $("#subject").val();
- var body = tinymce.get("email_body").getContent();
- var status = false;
- var selected = [];
- $('#reject input:checked').each(function() {
- selected.push($(this).attr('value'));
+ $(function() {
+ tinymce.init({
+ selector: 'textarea#email_body',
+ max_height: 200,
+ height: 200
+ });
});
- if (subject == '' || body == ''){
- $("#error_msg").html("Please enter mail details");
- $("#dialog").dialog();
- }
- else if (selected.length == 0){
- $("#error_msg").html("Please select atleast one user");
- $("#dialog").dialog();
- }
- else {
- status = true;
- }
- return status;
-});
+ $("#send_mail").click(function(){
+ var subject = $("#subject").val();
+ var body = tinymce.get("email_body").getContent();
+ var status = false;
+ var selected = [];
+ $('#sender_list input:checked').each(function() {
+ selected.push($(this).attr('value'));
+ });
+ if (subject == '' || body == ''){
+ $("#error_msg").html("Please enter mail details");
+ $("#dialog").dialog();
+ }
+ else if (selected.length == 0){
+ $("#error_msg").html("Please select atleast one user");
+ $("#dialog").dialog();
+ }
+ else {
+ status = true;
+ }
+ return status;
+ });
-// Table sorter for course details
-$("table").tablesorter({});
-// Get user course completion status
-$('.user_data').click(function() {
- var data = $(this).data('item-id');
- course_id = data.split("+")[0];
- student_id = data.split("+")[1];
- var status_div = $("#show_status_"+course_id+"_"+student_id);
- if(!status_div.is(":visible")){
- var get_url = window.location.protocol + "//" + window.location.host +
- "/exam/manage/get_user_status/" + course_id + "/" + student_id;
- $.ajax({
- url: get_url,
- timeout: 8000,
- type: "GET",
- dataType: "json",
- contentType: 'application/json; charset=utf-8',
- success: function(data) {
+ // Table sorter for course details
+ $("table").tablesorter({});
+
+ // Get user course completion status
+ $('.user_data').click(function() {
+ var data = $(this).data('item-id');
+ course_id = data.split("+")[0];
+ student_id = data.split("+")[1];
+ var status_div = $("#show_status_"+course_id+"_"+student_id);
+ if(!status_div.is(":visible")){
+ var get_url = $("#url-"+student_id).attr("data-url");
+ $.ajax({
+ url: get_url,
+ timeout: 8000,
+ type: "GET",
+ dataType: "json",
+ contentType: 'application/json; charset=utf-8',
+ success: function(data) {
status_div.toggle();
status_div.html(data.user_data);
- },
- error: function(jqXHR, textStatus) {
- alert("Unable to get user data. Please Try again later.");
- }
- });
- } else {
- status_div.toggle();
- }
-});
+ },
+ error: function(jqXHR, textStatus) {
+ alert("Unable to get user data. Please Try again later.");
+ }
+ });
+ } else {
+ status_div.toggle();
+ }
+ });
-$('[data-toggle="tooltip"]').tooltip();
+ $('[data-toggle="tooltip"]').tooltip();
+ $('#upload').on('change',function(){
+ //get the file name
+ var files = [];
+ for (var i = 0; i < $(this)[0].files.length; i++) {
+ files.push($(this)[0].files[i].name);
+ }
+ $(this).next('.custom-file-label').html(files.join(', '));
+ });
+
+ $('[data-toggle="tab"]').tooltip({
+ trigger: 'hover',
+ placement: 'top',
+ animate: false,
+ container: 'body'
+ });
}); // end document ready
diff --git a/yaksh/static/yaksh/js/lesson.js b/yaksh/static/yaksh/js/lesson.js
index 6f873b9..55d4846 100644
--- a/yaksh/static/yaksh/js/lesson.js
+++ b/yaksh/static/yaksh/js/lesson.js
@@ -44,9 +44,9 @@ $(document).ready(function(){
$("#embed").click(function() {
$("#dialog_iframe").toggle();
$("#dialog_iframe").dialog({
- resizable: false,
- height: '300',
- width: '450'
+ resizable: true,
+ height: '450',
+ width: '640'
});
});
@@ -75,4 +75,22 @@ $(document).ready(function(){
alert("Unable to copy. Press Ctrl+C or Cmd+C to copy")
}
});
+
+ $('#id_video_file').on('change',function(){
+ //get the file name
+ var files = [];
+ for (var i = 0; i < $(this)[0].files.length; i++) {
+ files.push($(this)[0].files[i].name);
+ }
+ $(this).next('.custom-file-label').html(files.join(', '));
+ });
+
+ $('#id_Lesson_files').on('change',function(){
+ //get the file name
+ var files = [];
+ for (var i = 0; i < $(this)[0].files.length; i++) {
+ files.push($(this)[0].files[i].name);
+ }
+ $(this).next('.custom-file-label').html(files.join(', '));
+ });
});