mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
issue 70 admin menu move developement
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8864 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
49cbb86e7d
commit
ef450b09e5
4 changed files with 46 additions and 13 deletions
|
|
@ -224,6 +224,43 @@
|
|||
$this->moveMenuItem($menu_srl,$parent_srl,$source_srl,$target_srl,$mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Arrange menu items
|
||||
**/
|
||||
function procMenuAdminArrangeItem()
|
||||
{
|
||||
$menuSrl = Context::get('menu_srl');
|
||||
$childKeyList = Context::get('child_key');
|
||||
|
||||
if(is_array($childKeyList))
|
||||
{
|
||||
$menuList = array();
|
||||
foreach($childKeyList AS $key=>$value)
|
||||
{
|
||||
preg_match('/BEGIN_([0-9]*.)/is', $value, $m);
|
||||
if($m)
|
||||
{
|
||||
$menuList[$m[1]] = array();
|
||||
$parentSrl = $m[1];
|
||||
}
|
||||
else $menuList[$parentSrl][$value] = true;
|
||||
}
|
||||
|
||||
foreach($menuList AS $key=>$value)
|
||||
{
|
||||
if(count($value) > 0)
|
||||
{
|
||||
$sourceSrl = 0;
|
||||
foreach($value AS $key2=>$value2)
|
||||
{
|
||||
$this->moveMenuItem($menuSrl, $key, $sourceSrl, $key2, 'move');
|
||||
$sourceSrl = $key2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function moveMenuItem($menu_srl,$parent_srl,$source_srl,$target_srl,$mode){
|
||||
// Get the original menus
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue