NavigatorBox.moveObjects

Syntax

moveObjects(objects, parentKey, callback);

Parameters

objects. Objects to be moved.

parentKey. Key of the folder, where objects are transferred.

callback. Callback function.

Description

The moveObjects  method moves objects between folders.

Example

To execute the example, the HTML page must contain NavigatorBox component named navbox (see Example of Creating the NavigatorBox Component). Add the DIV element with the div2 identifier in the BODY tag. Add the button named but1, clicking which moves the object selected in the list, to the folder with the key 0 (root folder of the repository). The browser console displays the following message: Object is moved:

            var but1 = new PP.Ui.Button(
            {
               ParentNode: document.getElementById("div2"),
               Content: "Move",
               Click: function ()
               {
                  navbox.moveObjects(navbox.getSelectedObjects(), 0)
               }
            });
             navbox.PasteBufferStateChanged.add(function (sender, args)
            {
               console.log("Object is moved")
            });

After executing the example clicking the Move button moves the selected object to the root folder of the repository. The browser console displays the following message: Object is moved.

See also:

NavigatorBox