I am using the Multiple File upload package which once the upload is complete calls some javascrpt intended to refresh the media tree. The javascript, "parent.top.syncTree" fails however, I believe because it is outdated.
I am trying to find the updated function to perform the same function. I have tried to use "parent.UmbClientMgr.mainTree().reloadActionNode();" but it doesn't seem to be working. Does anyone know how I can refresh the current folder in the media tree from the right frame.
Also is there a way to reload the right frame using javascript but keep the same tab showing. location.reload() loads the contents tab and I'd like to reload the custom multiple file upload tab to "reset" the flash movie.
I've just pushed a change to 4.9.0 that will allow you to do this, there's a third (optional) parameter to the javascript: supressChildReload. Setting the suppresion to false will open up the tree. So the call would be: UmbClientMgr.mainTree().syncTree(myPath, true, false);
I couldn't go and change the ClientTools API directly, so as a like hack you can do as Jeroen said above, but with a twist (notice "true, false" being one string):
Refresh media tree client side
I am using the Multiple File upload package which once the upload is complete calls some javascrpt intended to refresh the media tree. The javascript, "parent.top.syncTree" fails however, I believe because it is outdated.
I am trying to find the updated function to perform the same function. I have tried to use "parent.UmbClientMgr.mainTree().reloadActionNode();" but it doesn't seem to be working. Does anyone know how I can refresh the current folder in the media tree from the right frame.
Also is there a way to reload the right frame using javascript but keep the same tab showing. location.reload() loads the contents tab and I'd like to reload the custom multiple file upload tab to "reset" the flash movie.
In my custom version of MFU this is fixed: http://our.umbraco.org/projects/website-utilities/multiple-file-upload/bugs/20286-Support-for-custom-Media-Types
I'm using this code:
Jeroen
Thanks.
Is there any way to refresh it but keep the folder open though.
Sorry don't know how to do that. Haven't seen anything in the ClientTools for that yet.
Jeroen
I've just pushed a change to 4.9.0 that will allow you to do this, there's a third (optional) parameter to the javascript: supressChildReload. Setting the suppresion to false will open up the tree. So the call would be: UmbClientMgr.mainTree().syncTree(myPath, true, false);
I couldn't go and change the ClientTools API directly, so as a like hack you can do as Jeroen said above, but with a twist (notice "true, false" being one string):
See the thing that you're calling is actually a getter with the string formatting params in there:
So, if {1} is being replaced with "true, false" you can sneak that third parameter in there.
is working on a reply...