Do something on close
Hi guys,
I'm sure this is simple but for some reason I can't seem to find the command. I simply want to trigger something when the elfinder dialog window closes.
For instance:
//gallery file manager
$(".open_gallery_file_manager").live("click", function(){
var f = $('<div></div>').elfinder({
url : 'js/elfinder/connectors/php/connector.php',
height: 490,
docked: false,
dialog: { width: 400, modal: true },
closeOnEditorCallback: true,
editorCallback: function(url) {
//DO SOMETHING WHEN THIS FILE MANAGER CLOSES
}
});
});
//end gallery file manager
I know how to get the selected file, but I want something to trigger when the close icon is clicked.
Thanks in advance. Absolutely love this file manager
-Twitch
Replies (4)
RE: Do something on close
-
Added by Troex Nevelin 6 months ago
Probably there is no way in elFinder to trigger something when it is just closed... but maybe you can do it using jQuery dialog callbacks. Try something like:
dialog: {
width: 400,
modal: true,
close: function(event, ui) {
// DO WHAT YOU NEED
}
}
...
http://jqueryui.com/demos/dialog/#events
Please feedback if it will work for you
RE: Do something on close
-
Added by E R 6 months ago
Thanks for the reply, Troex. I'll give it a try when I get a chance. Sorry for the delay in responding. I didn't get an email letting me know someone had replied to my post.
Thanks again,
I'll keep you posted if I get it working.
-Twitch
RE: Do something on close
-
Added by E R 6 months ago
Tried it various ways with no luck. I'll let you know if I come up with something.
Thanks again for the reply.
-Twitch
RE: Do something on close
-
Added by E R 6 months ago
Ok here's how I worked around it. I open a ui-dialog with several choices one being to manage files. User manages files and closes the file manager window. When user closes the ui-dialog it then triggers an event.
Thanks for the idea, Troex. Love this file manager!
(1-4/4)