requireUIFile("jquery-ui-nestedsortable.js");
$AF->requireUIFile("EditNav.js");
# get plugin
$SecondaryNavPlugin = $GLOBALS["G_PluginManager"]->getPluginForCurrentPage();
# get tree
$ToPrint = $SecondaryNavPlugin->getTree($NavMenu);
# print all NavItems using the tree
print "
";
printItems($ToPrint);
print "
";
# output the javascript to wire-in the jquery-ui-nestedsortable
print "";
}
/**
* Print items in an unordered list for nestedsortable sorting
* @param array $Items to print, in tree structure
*/
function printItems(array $Items)
{
print "";
foreach ($Items as $Info) {
print "";
}
print "
";
}
/**
* Get the rename and delete buttons for nav items
* put here so printItems() isn't too cluttered (and copying format of MFO)
* @param int $NavItemId ID of NavItem to print buttons for
* @return string html buttons to print
*/
function getItemButtons(int $NavItemId)
{
$AF = ApplicationFramework::getInstance();
return " ".
"";
}
/**
* Print the list of offered items
* @param array $OfferedItems label/link pairs to display (keyed on link)
*/
function printOfferedItems(array $OfferedItems)
{
$AF = ApplicationFramework::getInstance();
$TooltipId = 0;
print "";
foreach ($OfferedItems as $Link => $Item) {
ob_start();
ApplicationFramework::getInstance()->getInterfaceSetting("TooltipsUseDialogs") ?
FormUI::displayDialogHelp($Item["Label"], $Item["Description"], $TooltipId++) :
FormUI::displayHoverHelp($Item["Description"]);
$Description = ob_get_clean();
$UrlLink = urlencode($Link);
print "".
"
";
}
print "
";
}
# ----- MAIN -----------------------------------------------------------------
PageTitle("Edit Your Menu");
$AF = ApplicationFramework::getInstance();
$AF->requireUIFile("jquery-ui.js");
$AF->requireUIFile("jquery-ui.css");
?>
Tip: drag objects to reorder them.
Changes to menu order saved