Hi, I've got a custom data type which ads nodes under a parent (a gallery with multiple uploads of gallery images). This all works fine but I want to refresh the content tree (specifically the gallery content nodes children) to display the newly added nodes under the current parent (the current parent would be the gallery node - it's already selected).
They are methods to be called in the backend, however they're just wrappers for the Javascript functions - so there should be a corresponding Javascript method, something like UmbClientMgr.mainTree().syncTree('path..',true);
In the end, I don't know of another way, I just raised the click event on the parent node LI container same as a user might, like so my method basically has 2 calls within it - for example:
UmbClientMgr.mainTree().syncTree('-1,1102,1103',true); // AJAX refresh of the node
UmbClientMgr.mainWindow().jQuery(".umbTree #1103").click(); // opens the node tree visibly
Aha, now that is interesting, I might be able to use that to solve a problem I'd previously got round using server side reloads to re-open the tree! I shall have a play, thanks for posting your findings!
Also, FYI, I added the speech bubble display also with:
UmbClientMgr.mainWindow().UmbSpeechBubble.ShowMessage('<%= umbraco.BasePages.BasePage.speechBubbleIcon.save %>', 'Saved', 'The files have been uploaded');
Refresh Content Tree
Hi, I've got a custom data type which ads nodes under a parent (a gallery with multiple uploads of gallery images). This all works fine but I want to refresh the content tree (specifically the gallery content nodes children) to display the newly added nodes under the current parent (the current parent would be the gallery node - it's already selected).
I've tried:
UmbClientMgr.mainTree().reloadActionNode(false, true, null);
but it seems to collapse the whole content tree. Any thoughts?
Cheers
Hello,
You can try:
Or
Jeroen
Thanks Jeroen burt they're methods to be called in the backend, yes? I'm after javascript functions.
Hi John,
They are methods to be called in the backend, however they're just wrappers for the Javascript functions - so there should be a corresponding Javascript method, something like UmbClientMgr.mainTree().syncTree('path..',true);
-Tom
Path being the URL to the content? The URL to the content edit page?
It's the .Path property of a Document, which I believe returns something like -1,1111,1112 to indicate it's path in the tree
Ooooooh. Understood, I'll give that a burl.
Thanks so much. I'll report back on the result.
Ok, that does indeed refresh the parent node in the tree BUT it also collapses it. So do you also know the JS function to open the tree of children?
In the end, I don't know of another way, I just raised the click event on the parent node LI container same as a user might, like so my method basically has 2 calls within it - for example:
UmbClientMgr.mainTree().syncTree('-1,1102,1103',true); // AJAX refresh of the node
UmbClientMgr.mainWindow().jQuery(".umbTree #1103").click(); // opens the node tree visibly
Thanks for everyones help
Aha, now that is interesting, I might be able to use that to solve a problem I'd previously got round using server side reloads to re-open the tree! I shall have a play, thanks for posting your findings!
:)
:)
Also, FYI, I added the speech bubble display also with:
UmbClientMgr.mainWindow().UmbSpeechBubble.ShowMessage('<%= umbraco.BasePages.BasePage.speechBubbleIcon.save %>', 'Saved', 'The files have been uploaded');
is working on a reply...