本文发表在 rolia.net 枫下论坛<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
method="xml"
version="1.0"
encoding="utf8"
omit-xml-declaration="yes"
/>
<xsl:include href="portlet_title_row.xsl"/>
<xsl:include href="edit_menu_text.xsl"/>
<xsl:param name="session_id" select="0"/>
<xsl:param name="language_code" select="'8859_1'"/>
<xsl:param name="logon_id" select="''"/>
<xsl:param name="sys_role" select="''"/>
<xsl:param name="portlet_title_fore_color" select="'black'"/>
<xsl:param name="portlet_title_bg_color" select="'black'"/>
<xsl:param name="portlet_title_font_size" select="'12px'"/>
<xsl:param name="main_menu_border_color" select="'white'"/>
<xsl:param name="pg_bg_color" select="'white'"/>
<xsl:param name="fore_color" select="'white'"/>
<xsl:param name="comp_inter_color" select="'white'"/>
<xsl:param name="mouseover_bg_color" select="'black'"/>
<xsl:param name="comp_bg_color" select="'black'"/>
<xsl:param name="debug_mode" select="'no'"/>
<!--
**********************************************************
** Create the XHTML web page
*******************************************************-->
<xsl:template match="/edit_menu">
<xsl:if test="$debug_mode = 'yes'">
<div class="debug_info"><xsl:text>edit_menu.xsl</xsl:text></div>
</xsl:if>
<xsl:variable name="titlename">
<xsl:call-template name="edit_menu.Portlet_Title" >
<xsl:with-param name="language_code" select="$language_code"/>
</xsl:call-template>
</xsl:variable>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<xsl:call-template name="portlet_title_row" >
<xsl:with-param name="text" select="$titlename"/>
<xsl:with-param name="titlefontsize" select="$portlet_title_font_size"/>
<xsl:with-param name="borderColor" select="$main_menu_border_color"/>
<xsl:with-param name="textColor" select="$portlet_title_fore_color"/>
<xsl:with-param name="CaptionBgColor" select="$portlet_title_bg_color"/>
<xsl:with-param name="showedit" select="'no'"/>
<xsl:with-param name="showmaximize" select="'no'"/>
<xsl:with-param name="showclose" select="'no'"/>
<xsl:with-param name="showinfo" select="'no'"/>
<xsl:with-param name="showbrowseicon" select="'no'"/>
</xsl:call-template>
</td>
</tr>
</table>
<table>
<tr>
<td>
<xsl:text>      </xsl:text>
</td>
<td style="color:blue;font-size:12px">
<xsl:call-template name="edit_menu.Portlet_Desc" >
<xsl:with-param name="language_code" select="$language_code"/>
</xsl:call-template>
</td>
<td>
<xsl:text>      </xsl:text>
</td>
</tr>
</table>
<hr/>
<table width="100%" border="0" border-spacing="0px" cellpadding="0" cellspacing="0" >
<xsl:for-each select="/edit_menu/val_item">
<xsl:variable name="line_num">
<xsl:number />
</xsl:variable>
<xsl:if test="current()/child::menu_title != preceding-sibling::val_item[1]/child::menu_title">
<tr>
<td align="left" nowrap="yes" style="color:green">
<font>
<xsl:attribute name="color">
<xsl:value-of select="$pg_bg_color" />
</xsl:attribute>
<xsl:text> </xsl:text>
</font>
</td>
<td>
<font>
<xsl:attribute name="color">
<xsl:value-of select="$pg_bg_color" />
</xsl:attribute>
<xsl:text> </xsl:text>
</font>
</td>
<td>
<font>
<xsl:attribute name="color">
<xsl:value-of select="$pg_bg_color" />
</xsl:attribute>
<xsl:text> </xsl:text>
</font>
</td>
</tr>
</xsl:if>
<xsl:if test="current()/child::menu_title = preceding-sibling::val_item[1]/child::menu_title">
<xsl:if test="current()/child::category != preceding-sibling::val_item[1]/child::category">
<tr>
<td align="left" nowrap="yes" style="color:green">
<font>
<xsl:attribute name="color">
<xsl:value-of select="$pg_bg_color" />
</xsl:attribute>
<xsl:text> </xsl:text>
</font>
</td>
<td align="center">
<font>
<xsl:attribute name="color">
<xsl:value-of select="black" />
</xsl:attribute>
<xsl:text> </xsl:text>
</font>
</td>
<td>
<font>
<xsl:attribute name="color">
<xsl:value-of select="$pg_bg_color" />
</xsl:attribute>
<xsl:text> </xsl:text>
</font>
</td>
</tr>
</xsl:if>
</xsl:if>
<tr class="footer_footertext" >
<xsl:choose>
<xsl:when test="current()/child::menu_title = preceding-sibling::val_item[1]/child::menu_title">
<xsl:choose>
<xsl:when test="current()/child::category = preceding-sibling::val_item[1]/child::category">
<xsl:attribute name="id">
<xsl:value-of select="concat(./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat(./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="id">
<xsl:value-of select="concat('category_line_',./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('category_line_',./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="id">
<xsl:value-of select="concat('title_line_',./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('title_line_',./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="style">
<xsl:value-of select="concat('font-size:12px')" />
</xsl:attribute>
<xsl:choose>
<xsl:when test="current()/child::menu_title != 'N/A'">
<xsl:choose>
<xsl:when test="$line_num = 1">
<td nowrap="yes" style="color:green">
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_title', '<xsl:value-of select="./main_menu_id" />', '', '', 'up' );
}
</xsl:attribute>
<img src="../sys_graphic/up11.gif" width="14" height="14" border="0"></img>
</a>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_title', '<xsl:value-of select="./main_menu_id" />', '', '', 'down' );
}
</xsl:attribute>
<img src="../sys_graphic/down11.gif" width="14" height="14" border="0"></img>
</a>
<xsl:text> </xsl:text>
<a href="#" style="text-decoration:none;color:blue;font-size:18px;font-weight:bold;">
<xsl:attribute name="id">
<xsl:value-of select="concat('menu_title_',$line_num)" />
</xsl:attribute>
<xsl:attribute name="onmouseover">
javascript: {
document.getElementById("menu_title_<xsl:value-of select="$line_num" />").style.color = "green";
document.getElementById("menu_title_<xsl:value-of select="$line_num" />").style.fontSize = "18px";
mouseOverTarget('title', '<xsl:value-of select="current()/child::main_menu_id" />', '<xsl:value-of select="current()/child::menu_title" />', '', '');
}
</xsl:attribute>
<xsl:attribute name="onmouseout">
javascript: {
document.getElementById("menu_title_<xsl:value-of select="$line_num" />").style.color = "blue";
document.getElementById("menu_title_<xsl:value-of select="$line_num" />").style.fontSize = "18px";
}
</xsl:attribute>
<xsl:value-of select="current()/child::menu_title" />
</a>
<xsl:text> </xsl:text>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadMainMenuTitleContent('<xsl:value-of select="./main_menu_id" />');
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
</td>
</xsl:when>
<xsl:when test="current()/child::menu_title != preceding-sibling::val_item[1]/child::menu_title">
<td nowrap="yes" style="color:green">
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_title', '<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./category_id" />', '', 'up' );
}
</xsl:attribute>
<img src="../sys_graphic/up11.gif" width="14" height="14" border="0"></img>
</a>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_title', '<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./category_id" />', '', 'down' );
}
</xsl:attribute>
<img src="../sys_graphic/down11.gif" width="14" height="14" border="0"></img>
</a>
<xsl:text> </xsl:text>
<a href="#" style="text-decoration:none;color:blue;font-size:18px;font-weight:bold;">
<xsl:attribute name="id">
<xsl:value-of select="concat('menu_title_',$line_num)" />
</xsl:attribute>
<xsl:attribute name="onmouseover">
javascript: {
document.getElementById("menu_title_<xsl:value-of select="$line_num" />").style.color = "green";
document.getElementById("menu_title_<xsl:value-of select="$line_num" />").style.fontSize = "18px";
mouseOverTarget('title', '<xsl:value-of select="current()/child::main_menu_id" />', '<xsl:value-of select="current()/child::menu_title" />', '', '');
}
</xsl:attribute>
<xsl:attribute name="onmouseout">
javascript: {
document.getElementById("menu_title_<xsl:value-of select="$line_num" />").style.color = "blue";
document.getElementById("menu_title_<xsl:value-of select="$line_num" />").style.fontSize = "18px";
}
</xsl:attribute>
<xsl:value-of select="current()/child::menu_title" />
</a>
<xsl:text> </xsl:text>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadMainMenuTitleContent('<xsl:value-of select="./main_menu_id" />' );
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
</td>
</xsl:when>
<xsl:otherwise>
<td align="center" nowrap="yes" style="color:green">
<font>
<xsl:attribute name="color">
<xsl:value-of select="black" />
</xsl:attribute>
<xsl:text>|</xsl:text>
</font>
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="edit_menu.CreateNewTitle" >
<xsl:with-param name="language_code" select="$language_code"/>
</xsl:call-template>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadMainMenuTitleContent('<xsl:value-of select="./main_menu_id" />' );
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:text>      </xsl:text>
</td>
<td>
<xsl:choose>
<xsl:when test="current()/child::menu_title != preceding-sibling::val_item[1]/child::menu_title">
<td nowrap="yes" width="100%">
<a href="#">
<xsl:attribute name="onClick">
javascript:{
showhideMenuItems('<xsl:value-of select="concat( ./main_menu_id, '_', ./category_id)" />', '<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id)" />');
}
</xsl:attribute>
<img src="../sys_graphic/up52.gif" border="0" style="display:block">
<xsl:attribute name="id">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_down')" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_down')" />
</xsl:attribute>
</img>
<img src="../sys_graphic/down52.gif" border="0" style="display:none">
<xsl:attribute name="id">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_up')" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_up')" />
</xsl:attribute>
</img>
</a>
</td>
</xsl:when>
<xsl:when test="preceding-sibling::val_item[1]/child::menu_title = not(node())">
<td nowrap="yes" width="100%">
<a href="#">
<xsl:attribute name="onClick">
javascript:{
showhideMenuItems('<xsl:value-of select="concat( ./main_menu_id, '_', ./category_id)" />', '<xsl:value-of select="concat('icon_menu_title_', ./main_menu_id)" />');
}
</xsl:attribute>
<img src="../sys_graphic/up52.gif" border="0" style="display:block">
<xsl:attribute name="id">
<xsl:value-of select="concat('icon_menu_title_', ./main_menu_id, '_down')" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('icon_menu_title_', ./main_menu_id, '_down')" />
</xsl:attribute>
</img>
<img src="../sys_graphic/down52.gif" border="0" style="display:none">
<xsl:attribute name="id">
<xsl:value-of select="concat('icon_menu_title_', ./main_menu_id, '_up')" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('icon_menu_title_', ./main_menu_id, '_up')" />
</xsl:attribute>
</img>
</a>
</td>
</xsl:when>
<xsl:otherwise>
<td>
<xsl:text> </xsl:text>
</td>
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:text>      </xsl:text>
</td>
<xsl:if test="current()/child::menu_title != 'N/A'">
<xsl:choose>
<xsl:when test="$line_num = 1">
<td nowrap="yes" >
<div style="text-decoration:none;cursor:pointer;color:red;font-size:16px" >
<xsl:attribute name="id">
<xsl:value-of select="concat('category_1')" />
</xsl:attribute>
<xsl:attribute name="onMousedown">
javascript: {
makeCategoryDraggable(
this,
'<xsl:value-of select="current()/child::category" />',
'<xsl:value-of select="current()/child::menu_title" />',
'<xsl:value-of select="current()/child::category_id" />',
'<xsl:value-of select="current()/child::main_menu_id" />' );
}
</xsl:attribute>
<xsl:attribute name="onmouseover">
javascript: {
document.getElementById("category_1").style.color = "green";
document.getElementById("category_1").style.fontSize = "16px";
mouseOverTarget('category', '<xsl:value-of select="current()/child::main_menu_id" />', '<xsl:value-of select="current()/child::menu_title" />', '<xsl:value-of select="current()/child::category_id" />', '<xsl:value-of select="current()/child::category" />');
}
</xsl:attribute>
<xsl:attribute name="onmouseout">
javascript: {
document.getElementById("category_<xsl:value-of select="$line_num" />").style.color = "red";
document.getElementById("category_<xsl:value-of select="$line_num" />").style.fontSize = "16px";
mouseOutTarget();
}
</xsl:attribute>
<xsl:choose>
<xsl:when test="current()/child::category != ''">
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_category', '<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./category_id" />', '', 'up' );
}
</xsl:attribute>
<img src="../sys_graphic/up11.gif" width="14" height="14" border="0"></img>
<img src="../sys_graphic/down11.gif" width="14" height="14" border="0"></img>
</a>
<xsl:text> </xsl:text>
<xsl:value-of select="current()/child::category" />
<xsl:text> </xsl:text>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadCategoryContent('<xsl:value-of select="./main_menu_id" />','<xsl:value-of select="./category_id" />' );
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="edit_menu.CreateNewCategory" >
<xsl:with-param name="language_code" select="$language_code"/>
</xsl:call-template>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadCategoryContent('<xsl:value-of select="./main_menu_id" />','<xsl:value-of select="./category_id" />' );
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</td>
</xsl:when>
<xsl:when test="current()/child::category != preceding-sibling::val_item[1]/child::category ">
<td nowrap="yes" >
<div style="text-decoration:none;cursor:pointer;color:red;font-size:16px" >
<xsl:attribute name="id">
<xsl:value-of select="concat('category_',$line_num)" />
</xsl:attribute>
<xsl:attribute name="onMousedown">
javascript: {
makeCategoryDraggable(
this,
'<xsl:value-of select="current()/child::category" />',
'<xsl:value-of select="current()/child::menu_title" />',
'<xsl:value-of select="current()/child::category_id" />',
'<xsl:value-of select="current()/child::main_menu_id" />' );
}
</xsl:attribute>
<xsl:attribute name="onmouseover">
javascript: {
document.getElementById("category_<xsl:value-of select="$line_num" />").style.color = "green";
document.getElementById("category_<xsl:value-of select="$line_num" />").style.fontSize = "16px";
mouseOverTarget('category', '<xsl:value-of select="current()/child::main_menu_id" />', '<xsl:value-of select="current()/child::menu_title" />', '<xsl:value-of select="current()/child::category_id" />', '<xsl:value-of select="current()/child::category" />');
}
</xsl:attribute>
<xsl:attribute name="onmouseout">
javascript: {
document.getElementById("category_<xsl:value-of select="$line_num" />").style.color = "red";
document.getElementById("category_<xsl:value-of select="$line_num" />").style.fontSize = "16px";
mouseOutTarget();
}
</xsl:attribute>
<xsl:choose>
<xsl:when test="current()/child::category != ''">
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_category', '<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./category_id" />', '', 'up' );
}
</xsl:attribute>
<img src="../sys_graphic/up11.gif" width="14" height="14" border="0"></img>
</a>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_category', '<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./category_id" />', '', 'down' );
}
</xsl:attribute>
<img src="../sys_graphic/down11.gif" width="14" height="14" border="0"></img>
</a>
<xsl:text> </xsl:text>
<xsl:value-of select="current()/child::category" />
<xsl:text> </xsl:text>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadCategoryContent('<xsl:value-of select="./main_menu_id" />','<xsl:value-of select="./category_id" />' );
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="edit_menu.CreateNewCategory" >
<xsl:with-param name="language_code" select="$language_code"/>
</xsl:call-template>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadCategoryContent('<xsl:value-of select="./main_menu_id" />','<xsl:value-of select="./category_id" />' );
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</td>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="current()/child::menu_title != preceding-sibling::val_item[1]/child::menu_title ">
<td nowrap="yes">
<div style="text-decoration:none;cursor:pointer;color:red;font-size:16px" >
<xsl:attribute name="id">
<xsl:value-of select="concat('category_',$line_num)" />
</xsl:attribute>
<xsl:attribute name="onMousedown">
javascript: {
makeCategoryDraggable(
this,
'<xsl:value-of select="current()/child::category" />',
'<xsl:value-of select="current()/child::menu_title" />',
'<xsl:value-of select="current()/child::category_id" />',
'<xsl:value-of select="current()/child::main_menu_id" />' );
}
</xsl:attribute>
<xsl:attribute name="onmouseover">
javascript: {
document.getElementById("category_<xsl:value-of select="$line_num" />").style.color = "green";
document.getElementById("category_<xsl:value-of select="$line_num" />").style.fontSize = "16px";
mouseOverTarget('category', '<xsl:value-of select="current()/child::main_menu_id" />', '<xsl:value-of select="current()/child::menu_title" />', '<xsl:value-of select="current()/child::category_id" />', '<xsl:value-of select="current()/child::category" />');
}
</xsl:attribute>
<xsl:attribute name="onmouseout">
javascript: {
document.getElementById("category_<xsl:value-of select="$line_num" />").style.color = "red";
document.getElementById("category_<xsl:value-of select="$line_num" />").style.fontSize = "16px";
mouseOutTarget();
}
</xsl:attribute>
<xsl:choose>
<xsl:when test="current()/child::category != ''">
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_category', '<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./category_id" />', '', 'up' );
}
</xsl:attribute>
<img src="../sys_graphic/up11.gif" width="14" height="14" border="0"></img>
</a>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_category', '<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./category_id" />', '', 'down' );
}
</xsl:attribute>
<img src="../sys_graphic/down11.gif" width="14" height="14" border="0"></img>
</a>
<xsl:text> </xsl:text>
<xsl:value-of select="current()/child::category" />
<xsl:text> </xsl:text>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadCategoryContent('<xsl:value-of select="./main_menu_id" />','<xsl:value-of select="./category_id" />' );
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="edit_menu.CreateNewCategory" >
<xsl:with-param name="language_code" select="$language_code"/>
</xsl:call-template>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadCategoryContent('<xsl:value-of select="./main_menu_id" />','<xsl:value-of select="./category_id" />' );
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</td>
</xsl:when>
<xsl:otherwise>
<td align="left" nowrap="yes" style="color:green">
<font>
<xsl:attribute name="color">
<xsl:value-of select="$pg_bg_color" />
</xsl:attribute>
<xsl:text> </xsl:text>
</font>
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<td>
<xsl:text>      </xsl:text>
<!-- <xsl:value-of select="current()/child::category" /> | <xsl:value-of select="preceding-sibling::val_item[1]/child::category" /> -->
</td>
<xsl:choose>
<xsl:when test="current()/child::category != preceding-sibling::val_item[1]/child::category">
<td nowrap="yes" width="100%">
<a href="#">
<xsl:attribute name="onClick">
javascript:{
showhideMenuItems('<xsl:value-of select="concat( ./main_menu_id, '_', ./category_id)" />', '<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id)" />');
}
</xsl:attribute>
<img src="../sys_graphic/up52.gif" border="0" style="display:">
<xsl:attribute name="id">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_down')" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_down')" />
</xsl:attribute>
</img>
<img src="../sys_graphic/down52.gif" border="0" style="display:none">
<xsl:attribute name="id">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_up')" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_up')" />
</xsl:attribute>
</img>
</a>
</td>
</xsl:when>
<xsl:when test="preceding-sibling::val_item[1]/child::category = not(node())">
<td nowrap="yes" width="100%">
<a href="#">
<xsl:attribute name="onClick">
javascript:{
showhideMenuItems('<xsl:value-of select="concat( ./main_menu_id, '_', ./category_id)" />', '<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id)" />');
}
</xsl:attribute>
<img src="../sys_graphic/up52.gif" border="0" style="display:block">
<xsl:attribute name="id">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_down')" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_down')" />
</xsl:attribute>
</img>
<img src="../sys_graphic/down52.gif" border="0" style="display:none">
<xsl:attribute name="id">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_up')" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('icon_menu_category_', ./main_menu_id, '_', ./category_id, '_up')" />
</xsl:attribute>
</img>
</a>
</td>
</xsl:when>
<xsl:otherwise>
<td>
<xsl:text> </xsl:text>
</td>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:text>      </xsl:text>
</td>
<td nowrap="yes" style="color:green;font-size:12px">
<div style="text-decoration:none;cursor:pointer;display:" >
<xsl:choose>
<xsl:when test="preceding-sibling::val_item[1]/child::category = not(node())">
<xsl:attribute name="id">
<xsl:value-of select="concat('firstline_',./main_menu_id, '_', ./category_id)" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('firstline_',./main_menu_id, '_', ./category_id)" />
</xsl:attribute>
</xsl:when>
<xsl:when test="current()/child::category != preceding-sibling::val_item[1]/child::category">
<xsl:attribute name="id">
<xsl:value-of select="concat('firstline_',./main_menu_id, '_', ./category_id)" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('firstline_',./main_menu_id, '_', ./category_id)" />
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="id">
<xsl:value-of select="concat('followingline_',./main_menu_id, '_', ./category_id)" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="concat('followingline_',./main_menu_id, '_', ./category_id)" />
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="current()/child::menu_title != 'N/A'">
<xsl:if test="current()/child::category != 'N/A'">
<xsl:if test="./title != ''">
<xsl:attribute name="onmousemove">
javascript: {
makeItemDraggable(
this,
"<xsl:value-of select="./title" />",
"<xsl:value-of select="./menu_title" />",
"<xsl:value-of select="./main_menu_id" />",
"<xsl:value-of select="./category_id" />",
"<xsl:value-of select="./sub_menu_id" />" );
}
</xsl:attribute>
<!--
<xsl:attribute name="onmouseover">
javascript: {
document.getElementById("<xsl:value-of select="concat(./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />").style.color = "red";
document.getElementById("<xsl:value-of select="concat(./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />").style.fontSize = "12px";
}
</xsl:attribute>
<xsl:attribute name="onmouseout">
javascript: {
document.getElementById("<xsl:value-of select="concat(./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />").style.color = "green";
document.getElementById("<xsl:value-of select="concat(./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />").style.fontSize = "12px";
}
</xsl:attribute>
-->
<xsl:attribute name="onMouseup">
javascript: {
document.getElementById("<xsl:value-of select="concat(./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />").style.color = "green";
document.getElementById("<xsl:value-of select="concat(./main_menu_id, '_', ./category_id, '_', ./sub_menu_id)" />").style.fontSize = "12px";
}
</xsl:attribute>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_menu', '<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./category_id" />', '<xsl:value-of select="./sub_menu_id" />', 'up' );
}
</xsl:attribute>
<img src="../sys_graphic/up11.gif" width="14" height="14" border="0"></img>
</a>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
SwitchMenu('main_menu', '<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./category_id" />', '<xsl:value-of select="./sub_menu_id" />', 'down' );
}
</xsl:attribute>
<img src="../sys_graphic/down11.gif" width="14" height="14" border="0"></img>
</a>
<xsl:text> </xsl:text>
<xsl:value-of select="./title" />
<xsl:text> </xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="./title != ''">
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadItemContent('<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./sub_menu_id" />' );
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
<a target="new">
<xsl:attribute name="href">
<xsl:value-of select="./weblink" />
</xsl:attribute>
<img src="../sys_graphic/open.gif" border="0" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="edit_menu.CreateNewItem" >
<xsl:with-param name="language_code" select="$language_code"/>
</xsl:call-template>
<a href="#">
<xsl:attribute name="onClick">
javascript: {
// alert('loadItemContent...');
loadItemContent('<xsl:value-of select="./main_menu_id" />', '<xsl:value-of select="./sub_menu_id" />' );
}
</xsl:attribute>
<img src="../sys_graphic/edit-page-grey.gif" border="0" />
</a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:if>
</div>
</td>
</tr>
</xsl:for-each>
<tr>
<td colspan="4" >
<xsl:attribute name="style">
<xsl:value-of select="concat('color:',$pg_bg_color,';background-color:',$pg_bg_color,'')" />
</xsl:attribute>
<xsl:text> </xsl:text>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>更多精彩文章及讨论,请光临枫下论坛 rolia.net