From d28d1fbc31186f970e31443481447dc79b6dbd17 Mon Sep 17 00:00:00 2001
From: Nestor <npegane@hotmail.com>
Date: Thu, 29 Mar 2018 15:13:11 +0200
Subject: [PATCH] FEAT #3790 created function to trigger chosen

---
 modules/folder/create_folder_form_iframe.php | 5 +++--
 modules/folder/js/functions.js               | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/folder/create_folder_form_iframe.php b/modules/folder/create_folder_form_iframe.php
index 70c6ac635ff..014e5c47eca 100755
--- a/modules/folder/create_folder_form_iframe.php
+++ b/modules/folder/create_folder_form_iframe.php
@@ -79,8 +79,9 @@ if ($_SESSION['info'] == _FOLDER_ADDED) {
             select.options.add (newOption);
         }
         "
-    ."select.value = '".$_SESSION['m_admin']['folder']['folders_system_id']."';";
-    echo "$j(\"#folder\").trigger(\"chosen:updated\");";
+    ."select.value = '".$_SESSION['m_admin']['folder']['folders_system_id']."';
+    ";
+    echo "parent.triggerChosen();";
     unset($_SESSION['m_admin']);
     echo "new Effect.BlindUp(parent.document.getElementById('create_folder_div'));";
     echo '</script>';
diff --git a/modules/folder/js/functions.js b/modules/folder/js/functions.js
index f46e5ba3fe9..e2b90fc8eae 100755
--- a/modules/folder/js/functions.js
+++ b/modules/folder/js/functions.js
@@ -189,4 +189,8 @@ function tabClick (TabId){
     $j(".frame-targ").css('display','none');
     $j('#frame-'+TabId).css('display','block');
 
+}
+
+function triggerChosen(){
+	$j('#folder').trigger('chosen:updated');
 }
\ No newline at end of file
-- 
GitLab