1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 05:37:32 +02:00

Removed a couple of tags and inline styles

This commit is contained in:
marj
2009-07-24 15:58:38 +00:00
parent 6a504ac0d4
commit 430c81c802

View File

@@ -10,9 +10,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
| $Revision: 1.5 $ | $Revision: 1.6 $
| $Date: 2009-07-21 07:41:54 $ | $Date: 2009-07-24 15:58:38 $
| $Author: e107coders $ | $Author: marj_nl_fr $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
@@ -991,89 +991,100 @@ class menuManager{
{ {
global $ns,$rs,$menu,$menu_info,$menu_act; global $ns,$rs,$menu,$menu_info,$menu_act;
// $menu_count is empty in here // $menu_count is empty in here
//FIXME extract
extract($row); extract($row);
if(!$menu_id){ return; } if(!$menu_id){ return; }
$menu_name = preg_replace("#_menu#i", "", $menu_name); $menu_name = preg_replace("#_menu#i", "", $menu_name);
$vis = ($menu_class || strlen($menu_pages) > 1) ? " <span style='color:red'>*</span> " : ""; //TODO we need a CSS class for this
$caption = "<div style='text-align:center'>{$menu_name}{$vis}</div>"; $vis = ($menu_class || strlen($menu_pages) > 1) ? " <span style='color:red'>*</span> " : "";
$menu_info = "{$menu_location}.{$menu_order}"; //DEBUG div not allowed in final tags $caption = "<div style='text-align:center'>{$menu_name}{$vis}</div>";
// use theme render style instead
$caption = $menu_name.$vis;
$menu_info = "{$menu_location}.{$menu_order}";
$text = ""; $text = "";
$conf = ''; $conf = '';
if (file_exists(e_PLUGIN."{$menu_path}{$menu_name}_menu_config.php")) if (file_exists(e_PLUGIN."{$menu_path}{$menu_name}_menu_config.php"))
{ {
$conf = "{$menu_path}.{$menu_name}_menu_config"; $conf = "{$menu_path}.{$menu_name}_menu_config";
} }
if($conf == '' && file_exists(e_PLUGIN."{$menu_path}config.php")) if($conf == '' && file_exists(e_PLUGIN."{$menu_path}config.php"))
{ {
$conf = "{$menu_path}config"; $conf = "{$menu_path}config";
} }
$text .= "<select id='menuAct_".$menu_id."' name='menuAct[$menu_id]' class='tbox' onchange='this.form.submit()' >"; $text .= "<select id='menuAct_".$menu_id."' name='menuAct[$menu_id]' class='tbox' onchange='this.form.submit()' >";
$text .= $rs->form_option(MENLAN_25, TRUE, " "); $text .= $rs->form_option(MENLAN_25, TRUE, " ");
$text .= $rs->form_option(MENLAN_15, "", "deac.{$menu_info}"); $text .= $rs->form_option(MENLAN_15, "", "deac.{$menu_info}");
if ($conf) { if ($conf) {
$text .= $rs->form_option(LAN_CONFIGURE, "", $conf); $text .= $rs->form_option(LAN_CONFIGURE, "", $conf);
} }
if ($menu_order != 1) { if ($menu_order != 1)
$text .= $rs->form_option(MENLAN_17, "", "inc.{$menu_info}"); {
$text .= $rs->form_option(MENLAN_24, "", "top.{$menu_info}"); $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}"); if ($menu_count != $menu_order)
$text .= $rs->form_option(MENLAN_23, "", "bot.{$menu_info}"); {
} $text .= $rs->form_option(MENLAN_18, "", "dec.{$menu_info}");
foreach ($this->menu_areas as $menu_act) { $text .= $rs->form_option(MENLAN_23, "", "bot.{$menu_info}");
if ($menu != $menu_act) { }
$text .= $rs->form_option(MENLAN_19." ".$menu_act, "", "move.{$menu_info}.".$menu_act); 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_option(MENLAN_20, "", "adv.{$menu_info}");
$text .= $rs->form_select_close(); $text .= $rs->form_select_close();
//DEBUG remove inline style, switch to simple quoted string for title text value
//TODO hardcoded text
$text .= '<div class="right">
<a href="#" onclick=\'parent.location.href="'.e_SELF.'?lay='.$this->curLayout.'&amp;vis='.$menu_id.'"; \' title="visibility">
'.ADMIN_VIEW_ICON.'
</a>';
$text .= "<div style='width:80px;float:right;display:block;text-align:right'> if($conf)
<a href='#' onclick=\"parent.location.href='".e_SELF."?lay=".$this->curLayout."&amp;vis=".$menu_id."'; \" title='visibility'> {
".ADMIN_VIEW_ICON." $text .= '<a title="configure" href="#" onclick=\'parent.location.href="'.e_SELF.'?lay='.$this->curLayout.'&amp;mode=conf&amp;path='.urlencode($conf).'"; \'>
</a>"; '.ADMIN_CONFIGURE_ICON.'
</a>';
}
if($conf) $text .= '<a href="#" title="deactivate" onclick=\'parent.location.href="'.e_SELF.'?lay='.$this->curLayout.'&amp;mode=deac&amp;id='.$menu_id.'"; \'>
{ '.ADMIN_DELETE_ICON.'
$text .= "<a title='configure' href='#' onclick=\"parent.location.href='".e_SELF."?lay=".$this->curLayout."&amp;mode=conf&amp;path=".urlencode($conf)."'; \"> </a>
".ADMIN_CONFIGURE_ICON." </div>';
</a>";
}
$text .= "<a href='#' title='deactivate' onclick=\"parent.location.href='".e_SELF."?lay=".$this->curLayout."&amp;mode=deac&amp;id=".$menu_id."'; \"> if($this->dragDrop)
".ADMIN_DELETE_ICON." {
</a>
</div>";
if($this->dragDrop) $text .= '
{ <div class="block-controls">
<a class="block-remove"><span>x</span></a> <a class="block-config"><span>e</span></a>
</div>
<div class="config" style="display: none; width: 200px;">
<div>config-params</div>
<div style="float:right">
<a href="#" class="cancel-button">cancel</a>
<a href="#" class="save-button">save</a>
</div>
</div>';
}
$text .= "<div class=\"block-controls\">"; ob_start();
$text .= "<a class=\"block-remove\"><span>x</span></a> <a class=\"block-config\"><span>e</span></a></div>";
$text .= " <div class=\"config\" style=\"display: none; width: 200px;\">
<div>config-params</div>
<div style='float:right'>
<a href=\"#\" class=\"cancel-button\">cancel</a>
<a href=\"#\" class=\"save-button\">save</a>
</div>
</div>";
}
ob_start(); $ns->tablerender($caption, $text);
$THEX = ob_get_contents();
$ns->tablerender($caption, $text); ob_end_clean();
$THEX = ob_get_contents(); return $THEX;
ob_end_clean();
return $THEX;
} }