repo: janusweb
action: commit
revision: 
path_from: 
revision_from: c21625983c3249008a0cc83d1c0b9f7dad99e6ff:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit c21625983c3249008a0cc83d1c0b9f7dad99e6ff
Author: James Baicoianu 
Date:   Thu Oct 17 17:31:29 2024 -0700

    Allow hiding of popup without removing from DOM

diff --git a/scripts/client.js b/scripts/client.js
index cfc3ce2ab700978e681b322386adaafb67168a4a..
index ..0e6a884096d9d2a91a9e8e96ad2504a36d2fef5a 100644
--- a/scripts/client.js
+++ b/scripts/client.js
@@ -504,15 +504,17 @@ elation.require(['elements.elements', 'elements', 'engine.engine', 'engine.asset
         }
         elation.events.fire({type: 'overlay_show', element: this});
       }
-      hide() {
+      hide(remove=true) {
         super.hide();
         elation.events.fire({type: 'overlay_hide', element: this});
-        setTimeout(() => {
-          if (this.parentNode) {
-            this.oldparent = this.parentNode;
-            this.parentNode.removeChild(this);
-          }
-        }, 1000);
+        if (remove) {
+          setTimeout(() => {
+            if (this.parentNode) {
+              this.oldparent = this.parentNode;
+              this.parentNode.removeChild(this);
+            }
+          }, 1000);
+        }
       }
     });
   }

-----END OF PAGE-----