From f9ab993d99567a9d8db8ec29db179cddfa1cca07 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Fri, 8 Feb 2019 15:05:46 +0530 Subject: Show alert on clicking Undo Changes button --- yaksh/static/yaksh/js/requesthandler.js | 5 +++++ yaksh/templates/yaksh/question.html | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/yaksh/static/yaksh/js/requesthandler.js b/yaksh/static/yaksh/js/requesthandler.js index 952de3a..7ccdef0 100644 --- a/yaksh/static/yaksh/js/requesthandler.js +++ b/yaksh/static/yaksh/js/requesthandler.js @@ -197,6 +197,11 @@ if (question_type == 'upload' || question_type == 'code') { reset_editor = function() { global_editor.editor.setValue(init_val); global_editor.editor.clearHistory(); + $('#undo_changes').modal('hide'); + } + + confirm = function(){ + $("#undo_changes").modal("show"); } }); function user_arranged_options(){ diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index da77702..c0eb3b1 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -271,7 +271,7 @@ question_type = "{{ question.type }}"
Write your program below:
- Undo Changes  + Undo Changes 
@@ -335,5 +335,24 @@ question_type = "{{ question.type }}"
+ + + + {% endblock main %} -- cgit From a4f7af5aada784384b3a65696596b54e5fd3f612 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Mon, 18 Feb 2019 12:46:13 +0530 Subject: Change alert message --- yaksh/templates/yaksh/question.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index c0eb3b1..59dfaef 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -344,7 +344,7 @@ question_type = "{{ question.type }}"