From 0ed1f322e45932f9df202c3f7a95f21ea322b9ee Mon Sep 17 00:00:00 2001
From: Tim Schroeder <t.schroeder@itc.rwth-aachen.de>
Date: Tue, 6 Sep 2022 13:03:38 +0200
Subject: [PATCH] no longer automatically remove error notifications

---
 locallib.php    |  2 +-
 shared/index.js | 12 ------------
 2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/locallib.php b/locallib.php
index 9a86942..1b2ff26 100644
--- a/locallib.php
+++ b/locallib.php
@@ -63,7 +63,7 @@ function pdfannotator_display_embed($pdfannotator, $cm, $course, $file, $page =
     // Load and execute the javascript files.
     $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/pdf.js?ver=00002"));
     $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/textclipper.js"));
-    $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/index.js?ver=00027"));
+    $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/index.js?ver=00028"));
     $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/locallib.js?ver=00005"));
 
     // Pass parameters from PHP to JavaScript.
diff --git a/shared/index.js b/shared/index.js
index 0a3d98b..a4b485c 100644
--- a/shared/index.js
+++ b/shared/index.js
@@ -121,14 +121,6 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
 	};
 
         /* *********************** eigener Store Adapter!! **********************************/
-    var setTimeoutNotification = () => {
-        setTimeout(function(){
-            let notificationpanel = document.getElementById("user-notifications");
-            while (notificationpanel.hasChildNodes()) {  
-                notificationpanel.removeChild(notificationpanel.firstChild);
-            } 
-        }, 10000);
-    }
         let MyStoreAdapter = new _2.default.StoreAdapter({
             /**
              * This function get all annotations of a specific document on a specific page.
@@ -195,7 +187,6 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
                             if (data.log){
                                 console.error(data.log);
                             }
-                            setTimeoutNotification();
                     }
                     return {'status':'error'};
                 });
@@ -264,7 +255,6 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
                                         type: "error"
                             });
                     }
-                    setTimeoutNotification();
 
                     return data;
                 });
@@ -303,7 +293,6 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
                             type: "error"
                         });
                     }
-                    setTimeoutNotification();
                 });
             },
             
@@ -397,7 +386,6 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
                                 type: "error"
                             });
                         }
-                        setTimeoutNotification();
                         return data;
                     });
                 }
-- 
GitLab