trippo / ResponsiveFilemanager

Completely Responsive Filemanager with integration for tinyMCE,CKEditor and CLEditor editor
http://responsivefilemanager.com
Other
808 stars 368 forks source link

Standalone Issues #695

Open jshster opened 1 year ago

jshster commented 1 year ago

I don't know where this issue has come from but it's going my head in - and hoping someone can help. Basic issue - selecting image in the popup doesn't do anything. Doesn't select the image, doesn't call the callback, no errors in the javascript console or anything. Just no action at all.

I'm using jQuery 3.6.0 with the latest code version of File Manager just using a standard link in a HTML file (I've stripped this back to bare bones to try and determine the issue).

In my CMS which uses an Admin template I'm getting the following error when I click on the image. Uncaught Error: Method hide does not exist on jQuery.modal

The documentation on the website mentions that if you are using Standalone and not using Fancybox that you need to do the following:

If you not use FancyBox, you must use the callback function to close the window or change the close function in filemanager/js/include.js:

function close_window() {
    parent.$.fancybox.close();
} 

Also interesting is this comment in green just under the comment above. I'm actually wondering if this is what has caused the problem.

Also.... there is no close_window() method in /js/include.js because the file has been minified. Can someone please rectify this? The .js file should not be minified.... but a .min.js should accompany it which IS minified.

Any help would be appreciated. Right now I just can't get it working.

jshster commented 1 year ago

Anyone around at all?

hanak commented 1 year ago

I think I run into close_window() recently. The code in close_windows() was executed while I was trying to use responsive_filemanager_callback. Since there was no fancybox behind it, I got an exception due to close_window(). I wish a return value from responsive_filemanager_callback indicated the window has been closed in order to avoid close_window() so one does not need to modify the code. Nevertheless, I used messages (windows.postMessage()) in order to get the selection out of the responsivefilemanager at the end.