I've got a custom tree section appended to my membership tree.. i was wondering how to hook it up so i'd have a delete confirmation appear before the delete action is called?
Hmm, if you're using the "standard" delete action from the tree, then I *think* it's not possible without hacking the core... Standard delete action call deleteThis() (v4.0.3) or actionDelete() (v4.1) javascript method. I don'' think it would work if you'd include your javascript method (should have the same name...) to override the existing one (javascript library umbracoDefault.js is always included)
However, you could create your own delete action and set it's JsFunctionName property to your javascript method, replace the existing action on your tree by your custom delete action
Good point Aaron, was checking the code and found out about the key defaultdialogs_confirmdelete, so did some more digging to find out you need to search the /umbraco/config/lang/en.xml for the <area alias="defaultdialogs"> and find the key with alias="confirmdelete"
Another lesson learned (And yes, i do learn new things every day :D, it's what keeps me motivated)
Delete Confirmation For node in tree
Hi All,
I've got a custom tree section appended to my membership tree.. i was wondering how to hook it up so i'd have a delete confirmation appear before the delete action is called?
Cheers,
Tom
actually sorry what i wanted to do was change the delete confirmation message!
Hi Tom,
Since you are using a custom tree, you can include this javascript message in the RenderJS method.
Cheers,
Richard
Hmm, if you're using the "standard" delete action from the tree, then I *think* it's not possible without hacking the core... Standard delete action call deleteThis() (v4.0.3) or actionDelete() (v4.1) javascript method. I don'' think it would work if you'd include your javascript method (should have the same name...) to override the existing one (javascript library umbracoDefault.js is always included)
However, you could create your own delete action and set it's JsFunctionName property to your javascript method, replace the existing action on your tree by your custom delete action
Hope this helps.
/Dirk
Most messages are defined in the language file, can't you just change it there?
Good point Aaron, was checking the code and found out about the key defaultdialogs_confirmdelete, so did some more digging to find out you need to search the /umbraco/config/lang/en.xml for the <area alias="defaultdialogs"> and find the key with alias="confirmdelete"
Another lesson learned (And yes, i do learn new things every day :D, it's what keeps me motivated)
Cheers,
/Dirk
Stop trying to suck up for more votes Dirk :P
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.