]> git.parisson.com Git - teleforma.git/commitdiff
Fix review popup with pdfannotator
authorYoan Le Clanche <yoanl@pilotsystems.net>
Fri, 11 Jan 2019 13:54:41 +0000 (14:54 +0100)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Fri, 11 Jan 2019 13:54:41 +0000 (14:54 +0100)
teleforma/exam/static/exam/js/exam.js

index fd21ad270384955c3c7ff5dc7c4f4c55c9cff73e..4d5337a10abeed6a653dbf80d05eace780df21ff 100644 (file)
@@ -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;