From: Yoan Le Clanche Date: Fri, 11 Jan 2019 13:54:41 +0000 (+0100) Subject: Fix review popup with pdfannotator X-Git-Tag: 1.4.0~10 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=345b02aa7b010b856ad6c692c6eef219553e4992;p=teleforma.git Fix review popup with pdfannotator --- diff --git a/teleforma/exam/static/exam/js/exam.js b/teleforma/exam/static/exam/js/exam.js index fd21ad27..4d5337a1 100644 --- a/teleforma/exam/static/exam/js/exam.js +++ b/teleforma/exam/static/exam/js/exam.js @@ -1,4 +1,12 @@ +function disableComment(){ + if(PDFAnnotate) { + PDFAnnotate.UI.disablePoint(); + var tooltype = 'cursor'; + PDFAnnotate.setActiveToolbarItem(tooltype, document.querySelector('.toolbar button[data-tooltype="' + tooltype + '"]')); + } +} + $(document).ready(function(){ $( "#dialog_mark" ).dialog({ @@ -30,22 +38,26 @@ $(document).ready(function(){ }); $( "#opener_mark" ).click(function() { + disableComment(); $( "#dialog_mark" ).dialog({ width: 500 }); $( "#dialog_mark" ).dialog( "open"); return false; }); $( "#opener_reject" ).click(function() { + disableComment(); $( "#dialog_reject" ).dialog( "open"); return false; }); $( "#opener_comments" ).click(function() { + disableComment(); $( "#dialog_comments" ).dialog( "open"); return false; }); $( "#opener_print" ).click(function() { + disableComment(); $( "#dialog_print" ).dialog({ width: 800 }); $( "#dialog_print" ).dialog( "open"); return false;