From d0518ea2f56664a0933caac16df7a61bdf764d62 Mon Sep 17 00:00:00 2001 From: adityacp Date: Thu, 30 Jan 2020 11:45:34 +0530 Subject: Change js and templates - Show selected files in the file input in lesson.js - Show lesson content properly in students page - Remove unnecessary div for video embed iframe --- yaksh/static/yaksh/js/lesson.js | 15 ++++-- yaksh/templates/manage.html | 57 +++++++++++----------- yaksh/templates/yaksh/add_lesson.html | 78 +++++++++++++++--------------- yaksh/templates/yaksh/course_students.html | 2 +- yaksh/templates/yaksh/show_video.html | 53 ++++++++++---------- 5 files changed, 107 insertions(+), 98 deletions(-) diff --git a/yaksh/static/yaksh/js/lesson.js b/yaksh/static/yaksh/js/lesson.js index a86cf1b..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' }); }); @@ -84,4 +84,13 @@ $(document).ready(function(){ } $(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(', ')); + }); }); diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index 9557582..8e74494 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -46,38 +46,35 @@ + + + - - - - - - -