Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • jivan thapa 194 posts 681 karma points
    Mar 22, 2011 @ 10:42
    jivan thapa
    0

    custom section problem

    Problem in custom section,  i am just started to create custom section based  on "http://www.geckonewmedia.com/blog/2009/8/3/how-to-create-a-custom-section-in-umbraco-4" article. but now i get little problem.
    If you click on other section "click on content" and come back to custom section. it will append all text (see screen bellow)  if we refresh page that it works again ( see image second bellow).
    how to solve that problem?

      public override void Render(ref XmlTree Tree)
            {
               var DocType = XmlTreeNode.Create(this);
               
                DocType.Icon = "docPic.gif";
                DocType.Action = "javascript:openDocType()"; DocType.Text = "Docuement Type";
              // Add the node to the tree
              Tree.Add(DocType);

                 var Template = XmlTreeNode.Create(this);
                Template.Text = "Template";
                Template.Icon = "docPic.gif";
                Template.Action = "javascript:openTemplate()";
              // Add the node to the tree
              Tree.Add(Template);

              var Content = XmlTreeNode.Create(this);
              Content.Text = "Content";
              Content.Icon = "docPic.gif";
              Content.Action = "javascript:openContent()";
              // Add the node to the tree
              Tree.Add(Content);


            }

     

    public override void RenderJS(ref StringBuilder Javascript)
                {


                    Javascript.Append(@"
                  function openDocType() {
                          parent.right.document.location.href = 'deployment/DDocType.aspx';     }
                 ");

                    Javascript.Append(@"
                function openTemplate() {
                      parent.right.document.location.href = 'deployment/DTemplate.aspx';
                    }
               ");

                    Javascript.Append(@"
                function openContent() {
                      parent.right.document.location.href = 'deployment/DContent.aspx';
                    }
               ");
           }

    image first

    Image second . after refresh page.

     

     

    Thanks.

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Mar 22, 2011 @ 11:37
    Matt Brailsford
    0

    Hi Jeevan

    I have noticed this too on a few of my packages, and with commercial ones out in the field (it happens with contour). I think there is a bug in the JS somewhere in the Umbraco core, but I havent' had the time to look into it myself. It may be worth raising it as an issue on codeplex to get one of the core guys to take a look.

    Cheers

    Matt

  • jivan thapa 194 posts 681 karma points
    Mar 22, 2011 @ 12:00
    jivan thapa
    0

    thanks Matt, for your reply.

Please Sign in or register to post replies

Write your reply to:

Draft