diff --git a/e107_handlers/menu_class.php b/e107_handlers/menu_class.php index 05019797a..b67952773 100644 --- a/e107_handlers/menu_class.php +++ b/e107_handlers/menu_class.php @@ -10,9 +10,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $ -| $Revision: 1.5 $ -| $Date: 2009-07-21 07:41:54 $ -| $Author: e107coders $ +| $Revision: 1.6 $ +| $Date: 2009-07-24 15:58:38 $ +| $Author: marj_nl_fr $ +----------------------------------------------------------------------------+ */ if (!defined('e107_INIT')) { exit; } @@ -991,89 +991,100 @@ class menuManager{ { global $ns,$rs,$menu,$menu_info,$menu_act; // $menu_count is empty in here + //FIXME extract extract($row); if(!$menu_id){ return; } - $menu_name = preg_replace("#_menu#i", "", $menu_name); - $vis = ($menu_class || strlen($menu_pages) > 1) ? " * " : ""; - $caption = "
{$menu_name}{$vis}
"; - $menu_info = "{$menu_location}.{$menu_order}"; + $menu_name = preg_replace("#_menu#i", "", $menu_name); + //TODO we need a CSS class for this + $vis = ($menu_class || strlen($menu_pages) > 1) ? " * " : ""; + //DEBUG div not allowed in final tags $caption = "
{$menu_name}{$vis}
"; + // use theme render style instead + $caption = $menu_name.$vis; + $menu_info = "{$menu_location}.{$menu_order}"; - $text = ""; - $conf = ''; - if (file_exists(e_PLUGIN."{$menu_path}{$menu_name}_menu_config.php")) - { - $conf = "{$menu_path}.{$menu_name}_menu_config"; - } + $text = ""; + $conf = ''; + if (file_exists(e_PLUGIN."{$menu_path}{$menu_name}_menu_config.php")) + { + $conf = "{$menu_path}.{$menu_name}_menu_config"; + } - if($conf == '' && file_exists(e_PLUGIN."{$menu_path}config.php")) - { - $conf = "{$menu_path}config"; - } + if($conf == '' && file_exists(e_PLUGIN."{$menu_path}config.php")) + { + $conf = "{$menu_path}config"; + } - $text .= ""; + $text .= $rs->form_option(MENLAN_25, TRUE, " "); + $text .= $rs->form_option(MENLAN_15, "", "deac.{$menu_info}"); - if ($conf) { - $text .= $rs->form_option(LAN_CONFIGURE, "", $conf); - } + if ($conf) { + $text .= $rs->form_option(LAN_CONFIGURE, "", $conf); + } - if ($menu_order != 1) { - $text .= $rs->form_option(MENLAN_17, "", "inc.{$menu_info}"); - $text .= $rs->form_option(MENLAN_24, "", "top.{$menu_info}"); - } - if ($menu_count != $menu_order) { - $text .= $rs->form_option(MENLAN_18, "", "dec.{$menu_info}"); - $text .= $rs->form_option(MENLAN_23, "", "bot.{$menu_info}"); - } - foreach ($this->menu_areas as $menu_act) { - if ($menu != $menu_act) { - $text .= $rs->form_option(MENLAN_19." ".$menu_act, "", "move.{$menu_info}.".$menu_act); - } - } + if ($menu_order != 1) + { + $text .= $rs->form_option(MENLAN_17, "", "inc.{$menu_info}"); + $text .= $rs->form_option(MENLAN_24, "", "top.{$menu_info}"); + } + if ($menu_count != $menu_order) + { + $text .= $rs->form_option(MENLAN_18, "", "dec.{$menu_info}"); + $text .= $rs->form_option(MENLAN_23, "", "bot.{$menu_info}"); + } + foreach ($this->menu_areas as $menu_act) + { + if ($menu != $menu_act) + { + $text .= $rs->form_option(MENLAN_19." ".$menu_act, "", "move.{$menu_info}.".$menu_act); + } + } - $text .= $rs->form_option(MENLAN_20, "", "adv.{$menu_info}"); - $text .= $rs->form_select_close(); + $text .= $rs->form_option(MENLAN_20, "", "adv.{$menu_info}"); + $text .= $rs->form_select_close(); + //DEBUG remove inline style, switch to simple quoted string for title text value + //TODO hardcoded text + $text .= '
+ curLayout.'&vis='.$menu_id.'"; \' title="visibility"> + '.ADMIN_VIEW_ICON.' + '; - $text .= "
- curLayout."&vis=".$menu_id."'; \" title='visibility'> - ".ADMIN_VIEW_ICON." - "; + if($conf) + { + $text .= 'curLayout.'&mode=conf&path='.urlencode($conf).'"; \'> + '.ADMIN_CONFIGURE_ICON.' + '; + } - if($conf) - { - $text .= "curLayout."&mode=conf&path=".urlencode($conf)."'; \"> - ".ADMIN_CONFIGURE_ICON." - "; - } + $text .= 'curLayout.'&mode=deac&id='.$menu_id.'"; \'> + '.ADMIN_DELETE_ICON.' + +
'; - $text .= "curLayout."&mode=deac&id=".$menu_id."'; \"> - ".ADMIN_DELETE_ICON." - -
"; + if($this->dragDrop) + { - if($this->dragDrop) - { + $text .= ' +
+ x e +
+ '; + } - $text .= "
"; - $text .= "x e
"; - $text .= "
-
config-params
-
- cancel - save -
-
"; - } + ob_start(); - ob_start(); + $ns->tablerender($caption, $text); + $THEX = ob_get_contents(); - $ns->tablerender($caption, $text); - $THEX = ob_get_contents(); - - ob_end_clean(); - return $THEX; + ob_end_clean(); + return $THEX; }