mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 22:27:34 +02:00
Menu-Manager Drag and Drop fixes.
This commit is contained in:
@@ -499,7 +499,9 @@ class e_layout
|
|||||||
helper: "clone",
|
helper: "clone",
|
||||||
appendTo: ".sortable", // "#area-1", //FIXME Needs to be a specific area.
|
appendTo: ".sortable", // "#area-1", //FIXME Needs to be a specific area.
|
||||||
revert: true,
|
revert: true,
|
||||||
|
containment: "parent",
|
||||||
|
delay: 0,
|
||||||
|
revertDuration: 100,
|
||||||
cursor: "move",
|
cursor: "move",
|
||||||
iframeFix: true,
|
iframeFix: true,
|
||||||
containment: false,
|
containment: false,
|
||||||
@@ -620,7 +622,7 @@ class e_layout
|
|||||||
$save = array();
|
$save = array();
|
||||||
foreach($_POST['data']['layout']['area'] as $v) // reset key values.
|
foreach($_POST['data']['layout']['area'] as $v) // reset key values.
|
||||||
{
|
{
|
||||||
$save[$layout][$area][] = $v;
|
$save[$area][] = $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
// $save[$layout][$area] = $_POST['data']['layout']['area'];
|
// $save[$layout][$area] = $_POST['data']['layout']['area'];
|
||||||
@@ -711,7 +713,9 @@ class e_layout
|
|||||||
private function renderMenu($row, $layout, $area, $count)
|
private function renderMenu($row, $layout, $area, $count)
|
||||||
{
|
{
|
||||||
// return print_a($row,true);
|
// return print_a($row,true);
|
||||||
$TEMPLATE = '<li class="regularMenu" id="'.$row['name'].'_'.$count.'"> '.$this->renderMenuOptions($row, $layout, $area,$count).' </li>
|
$uniqueId = "menu_".$row['path'].'_'.$count;
|
||||||
|
|
||||||
|
$TEMPLATE = '<li class="regularMenu" id="'.$uniqueId.'"> '.$this->renderMenuOptions($row, $layout, $area,$count,$uniqueId).' </li>
|
||||||
'; // TODO perhaps a simple counter for the id
|
'; // TODO perhaps a simple counter for the id
|
||||||
|
|
||||||
return $TEMPLATE;
|
return $TEMPLATE;
|
||||||
@@ -727,7 +731,7 @@ class e_layout
|
|||||||
* @param number $area as in {MENU=x}
|
* @param number $area as in {MENU=x}
|
||||||
* @param incrementor number.
|
* @param incrementor number.
|
||||||
*/
|
*/
|
||||||
public function renderMenuOptions($row, $layout, $area, $c)
|
public function renderMenuOptions($row, $layout, $area, $c, $uniqueId)
|
||||||
{
|
{
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
|
|
||||||
@@ -749,7 +753,7 @@ class e_layout
|
|||||||
|
|
||||||
if(vartrue($_GET['configure'])) // Iframe Mode.
|
if(vartrue($_GET['configure'])) // Iframe Mode.
|
||||||
{
|
{
|
||||||
$text .= "<a href='#' class='menu-btn btn-mini menu-btn-danger deleteMenu pull-right' data-area='area-".$area."' data-delete='".$row['name']."_".$c."'>×</a>"; // $('.hello').remove();
|
$text .= "<a href='#' class='menu-btn btn-mini menu-btn-danger deleteMenu pull-right' data-area='area-".$area."' data-delete='".$uniqueId."'>×</a>"; // $('.hello').remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -121,7 +121,7 @@ class e_menu
|
|||||||
{
|
{
|
||||||
$layout = vartrue($row['menu_layout'],'default');
|
$layout = vartrue($row['menu_layout'],'default');
|
||||||
$location = $row['menu_location'];
|
$location = $row['menu_location'];
|
||||||
$data[$layout][$location][] = array('name'=>$row['menu_name'],'class'=>$row['menu_class'],'path'=>$row['menu_path'],'pages'=>$row['menu_pages'],'parms'=>$row['menu_parms']);
|
$data[$layout][$location][] = array('name'=>$row['menu_name'],'class'=> intval($row['menu_class']),'path'=>$row['menu_path'],'pages'=>$row['menu_pages'],'parms'=>$row['menu_parms']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
Reference in New Issue
Block a user