From 08395e2221ea277a8ead1228c5372352d5204d5a Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 1 Jul 2016 13:22:55 +0200 Subject: [PATCH] add printing help with annotations --- teleforma/exam/static/exam/js/exam.js | 72 ++++++++++++++++++ .../exam/templates/exam/script_detail.html | 76 +++---------------- 2 files changed, 82 insertions(+), 66 deletions(-) create mode 100644 teleforma/exam/static/exam/js/exam.js diff --git a/teleforma/exam/static/exam/js/exam.js b/teleforma/exam/static/exam/js/exam.js new file mode 100644 index 00000000..ecf0e0fb --- /dev/null +++ b/teleforma/exam/static/exam/js/exam.js @@ -0,0 +1,72 @@ + +$(document).ready(function(){ + + $( "#dialog_mark" ).dialog({ + autoOpen: false, + draggable: false, + resizable: false, + modal: true, + }); + + $( "#dialog_reject" ).dialog({ + autoOpen: false, + draggable: false, + resizable: false, + modal: true, + }); + + $( "#dialog_comments" ).dialog({ + autoOpen: false, + draggable: false, + resizable: false, + modal: true, + }); + + $( "#dialog_help" ).dialog({ + autoOpen: false, + draggable: false, + resizable: false, + modal: true, + }); + + $( "#opener_mark" ).click(function() { + $( "#dialog_mark" ).dialog({ width: 500 }); + $( "#dialog_mark" ).dialog( "open"); + return false; + }); + + $( "#opener_reject" ).click(function() { + $( "#dialog_reject" ).dialog( "open"); + return false; + }); + + $( "#opener_comments" ).click(function() { + $( "#dialog_comments" ).dialog( "open"); + return false; + }); + + $( "#opener_help" ).click(function() { + $( "#dialog_help" ).dialog( "open"); + return false; + }); + + var b1 = $('#validate_button'); + b1.unbind('click').click(function() { + $(window).unbind('beforeunload'); + b1.unbind('click'); + $('#_MarkForm #id_status').val("4"); + $('#_MarkForm').submit(); + }); + + var b2 = $('#reject_button'); + b2.unbind('click').click(function() { + $(window).unbind('beforeunload'); + b2.unbind('click'); + $('#_RejectForm #id_status').val("0"); + $('#_RejectForm').submit(); + }); + + // $("#box-iframe").contents().find("span.btn.text-btn.strikeout-btn").hide(); + + +}); diff --git a/teleforma/exam/templates/exam/script_detail.html b/teleforma/exam/templates/exam/script_detail.html index 813f605a..6835a406 100644 --- a/teleforma/exam/templates/exam/script_detail.html +++ b/teleforma/exam/templates/exam/script_detail.html @@ -8,80 +8,15 @@ - + - {% endblock extra_javascript %} {% block content %} @@ -169,6 +104,15 @@

+
+

Impression de la copie corrigée

+ Pour imprimer votre copie corrigée avec les annotations, veuillez : + +
{% if access_error %}

{{ access_error }}

-- 2.39.5