Copied to clipboard

Flag this post as spam?

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


  • marthin 87 posts 106 karma points
    Feb 02, 2010 @ 16:32
    marthin
    0

    Reloading the tree in custom section with jquery

    hi,

    so, i have a custom section with a custom menu, i whant to implement a reload nodes by calling my own .js file. Iv got the following:

    -------

    loadTree()

    {

     protected override void CreateAllowedActions(ref List<IAction> actions)
            {
                actions.Clear();
                actions.Add(ExtendendContextMenu.ActionReload.Instance);

    }

    ----------

    the action reload implements IAction interface and has the following prop that is important:

     

    public string JsFunctionName
            {
                get
                {
                    return "extendendReloadProducts('+nodeID+')";
                }

            }

            public string JsSource
            {
                get { return "js/Extended.js"; }
            }   
        }

    ---------------

    So anyone got a clue how the Extendend.js should implement a reload of the nodes with jquere? could the js file call som .net class that makes some extra stuff?

     

    Best Regards

    Marthin

     

  • marthin 87 posts 106 karma points
    Feb 03, 2010 @ 09:08
    marthin
    1

    I look into the source code of umbracoDefault.js and found that umb uses:

     

    function deleteThis() {
    var doDelete = true

    if (currentApp == "content" && nodeID == '-1')
    doDelete = false;

    if (doDelete) {
    var tempID = nodeID;
    var tempNodeType = nodeType;
    var tempNodeName = nodeName;

    if (confirm(parent.uiKeys['defaultdialogs_confirmdelete'] + ' "' + nodeName + '"?\n\n')) {
    deleteNode = node;
    nodeID = tempID;
    nodeType = tempNodeType;
    nodeName = tempNodeName;
    umbraco.presentation.webservices.legacyAjaxCalls.Delete(tempID, "", tempNodeType, refreshDelete);
    }
    }
    }

     

    Does anyone know how to edit the legacyAjaxCall.Delete function? so that i can make changes in my own nodes instead (i load my nodes from external DB)?

  • marthin 87 posts 106 karma points
    Feb 04, 2010 @ 11:52
    marthin
    0

    Isnt there anyone who knows who to refresh the tree? or atleast call a .net class that doest the DB calls and then calls some js file with the animations?

    Please help!

    Best regards

    Marthin

Please Sign in or register to post replies

Write your reply to:

Draft