I'm busy with the 301 URL Tracker, it's not compatible with umbraco 4.5 yet. I'm facing one particular problem in my custom Create dialog page, with this markup:
<inputtype="hidden"name="nodeType"value="-1"/>
<asp:Labelrunat="server"ID="lblMessage"Text="Please select a valid node"Visible="false"style="color: Red; font-size: 90%; font-weight: bold; display: block;"/> <b>Select a node:</b> <br/><br/><asp:PlaceHolderrunat="server"ID="phContentPicker"/>
<!-- added to support missing postback on enter in IE --> <asp:TextBoxrunat="server"style="visibility: hidden; display: none;"ID="Textbox1"/>
So I'm using a ContentPicker, which is located in 'umbraco.controls'. The problem is the javascript I register with 'Page.ClientScript.RegisterClientScriptBlock()', I'm getting the following errors and don't know the replacements for there javascript methods, can anyone help? :-)
Sys.ArgumentException: Value must be a DOM element or a text node. Parameter name: element This error is thrown inside a ScriptResource.axd (Sys.UI.DomEvent._ensureDomNode)
top.reloadCurrentNode is not a function This error is thrown by the javascript itself. Also top.closeModal() and top.refreshNode() do not work...
Umbraco.Controls.TreePicker is not a constructor This error is thrown in the create.aspx mark-up: var
mc_ctl00_body_ctl00_ctl00 = new
Umbraco.Controls.TreePicker('ctl00_body_ctl00_ctl00','Choose
Content','ctl00_body_ctl00_ctl00_ContentIdValue','ctl00_body_ctl00_ctl00_title','/umbraco/dialogs/treepicker.aspx?rnd=15fa7676b6b34c87aa4cf68abb466650&id=-1&treeType=content&contextMenu=true&isDialog=false&app=content',380,200,true,'/umbraco');Sys.Application.initialize();
Maybe another wrong post but I keep trying :). Have you looked at the following:
BasePage.Current.ClientTools
With that you can call all the javascript related to the tree. Some usefull methods I've been using:
//Reload the tree after sorting.
BasePage.Current.ClientTools.ReloadActionNode(false, true);
//Close the pop-up and open the details page.
BasePage.Current.ClientTools
.ChangeContentFrameUrl(string.Concat("/umbraco/sections/articles/Category/CategoryDetails.aspx?id=", categoryEntity.CategoryId))
.ChildNodeCreated()
.CloseModalWindow();
//Reload the node in the tree on the left and show a speech bubble the data was succesfully saved.
BasePage.Current.ClientTools
.SyncTree(Path, true)
.ShowSpeechBubble(BasePage.speechBubbleIcon.save, "Saved", "The data has been saved succesfully");
BasePage.Current.ClientTools.CloseModalWindow()
Hope this helps. I've got all this by looking at the \umbraco\businesslogic\BasePages\ClientTools.cs in the source code.
umbraco 4.5 - custom tree and create dialog
Hi people! :-)
I'm busy with the 301 URL Tracker, it's not compatible with umbraco 4.5 yet.
I'm facing one particular problem in my custom Create dialog page, with this markup:
I copied this from a blogpost or some other package (don't know anymore) and it works perfectly in 4.0.x.
The code-behind looks like this:
So I'm using a ContentPicker, which is located in 'umbraco.controls'.
The problem is the javascript I register with 'Page.ClientScript.RegisterClientScriptBlock()', I'm getting the following errors and don't know the replacements for there javascript methods, can anyone help? :-)
Hi Stefan,
You could try to add the actuall content picker datatype instead of the umbraco.control version. You can read more about it here: http://our.umbraco.org/forum/developers/extending-umbraco/6863-Datatype-on-normal-page-or-UserControl
This is how you can add a datatype:
Jeroen
The content picker is working fine...
The only problem is; how can I hide the Create modal dialog in 4.5?
Oops sorry read it a bit too fast :). Unfortunately I can't help you with hiding the create modal in 4.5.
Jeroen
At least found this:
To close the modal popup :-)
Maybe another wrong post but I keep trying :). Have you looked at the following:
With that you can call all the javascript related to the tree. Some usefull methods I've been using:
Hope this helps. I've got all this by looking at the \umbraco\businesslogic\BasePages\ClientTools.cs in the source code.
Jeroen
Thanks! You should blog about this! :-)
is working on a reply...