diff options
author | adityacp | 2020-01-30 11:45:34 +0530 |
---|---|---|
committer | adityacp | 2020-01-30 11:45:34 +0530 |
commit | d0518ea2f56664a0933caac16df7a61bdf764d62 (patch) | |
tree | a638a95855ff085ad946beaf91b6ee4e0918ca74 /yaksh/static | |
parent | 9112d95f1fa9af0137bffc6936929e4ec7e94882 (diff) | |
download | online_test-d0518ea2f56664a0933caac16df7a61bdf764d62.tar.gz online_test-d0518ea2f56664a0933caac16df7a61bdf764d62.tar.bz2 online_test-d0518ea2f56664a0933caac16df7a61bdf764d62.zip |
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
Diffstat (limited to 'yaksh/static')
-rw-r--r-- | yaksh/static/yaksh/js/lesson.js | 15 |
1 files changed, 12 insertions, 3 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(', ')); + }); }); |