first commit
This commit is contained in:
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>政府标签</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>currentId</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>当前ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_Nodes WHERE ParentID = 0 AND ShowOnMenu = 1 ORDER BY RootID, OrderID ASC</LabelSqlString>
|
||||
<LabelTemplate>
|
||||
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
||||
<xsl:param name="currentId" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<div id="menubox">
|
||||
<ul>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<li id="menu_{NodeID}">
|
||||
<xsl:if test="$currentId = NodeID">
|
||||
<xsl:attribute name="class">Class_on</xsl:attribute>
|
||||
</xsl:if>
|
||||
<a onmouseover="displaySubMenu({NodeID})"> <xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:GetNodePath(false,NodeID)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="NodeName"/>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="menu_list_-2" class="menu_list">
|
||||
<ul>
|
||||
<div id="logindiv" class="uplink" style="display: block;">
|
||||
<a><xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:InstallDir()"/>User/Register.aspx</xsl:attribute>
|
||||
<xsl:attribute name="title"></xsl:attribute>
|
||||
注册
|
||||
</a>
|
||||
<a href="javascript:CheckIsLogin();"> 登录</a>
|
||||
</div>
|
||||
<div id="logoutdiv" class="uplink" style="display: none;">
|
||||
<span id="spanUserName">{PE.Label id="显示用户名"/}</span>
|
||||
<a><xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:InstallDir()"/>QA/MyQuestion.aspx</xsl:attribute>
|
||||
<xsl:attribute name="title"></xsl:attribute>
|
||||
我的问答
|
||||
</a>
|
||||
<a><xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:InstallDir()"/>User/</xsl:attribute>
|
||||
<xsl:attribute name="title"></xsl:attribute>
|
||||
用户中心
|
||||
</a>
|
||||
|
||||
<a href="javascript:Logout();"> 退出</a>
|
||||
</div>
|
||||
|
||||
<div class="searchbox">
|
||||
<b>动易问答:</b>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<input class="inputtext" id="txtKeyword" name="txtKeyword" onfocus="setFocus()" style="width:220px" onblur="lostFocus()" value="请输入您所需要的关键字" type="text" />
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a><xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:InstallDir()"/>QA/Help.aspx</xsl:attribute>
|
||||
<xsl:attribute name="title"></xsl:attribute>
|
||||
帮助
|
||||
</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<input class="inputbutton" type="button" onclick="searchAnswer()" value="搜索答案" />
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<input class="inputbutton" type="button" onclick="askQuestion()" value="我要提问" />
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<input class="inputbutton" type="button" onclick="answerQuestion()" value="我要回答" />
|
||||
</div>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<xsl:if test="NodeID != -2">
|
||||
<div id="menu_list_{NodeID}" class="menu_list">
|
||||
<ul>
|
||||
{PE.Label id="取得子节点" nodeId="<xsl:value-of select="NodeID"/>" /}
|
||||
</ul>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<script type="text/javascript">
|
||||
var currentIndex = <xsl:value-of select="$currentId" />
|
||||
function addLoadEvent(func) {
|
||||
var oldonload = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = func;
|
||||
} else {
|
||||
window.onload = function() {
|
||||
oldonload();
|
||||
func();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function menuhover() {
|
||||
var menu = document.getElementById("menubox");
|
||||
var links = menu.getElementsByTagName("li");
|
||||
for (c = 0; c < links.length; c++) {
|
||||
links[c].onmouseover = function() {
|
||||
for (m = 0; m < links.length; m++) {
|
||||
links[m].className = '';
|
||||
}
|
||||
this.className = 'Class_on';
|
||||
}
|
||||
}
|
||||
}
|
||||
function displaySubMenu(id){
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
if(document.getElementById("menu_list_"+<xsl:value-of select="NodeID"/>) != null){
|
||||
document.getElementById("menu_list_"+<xsl:value-of select="NodeID"/>).style.display="none";
|
||||
}
|
||||
</xsl:for-each>
|
||||
if(document.getElementById("menu_list_"+id) != null){
|
||||
document.getElementById("menu_list_"+id).style.display="block";
|
||||
}
|
||||
}
|
||||
displaySubMenu(<xsl:value-of select="$currentId" />);
|
||||
addLoadEvent(menuhover);
|
||||
</script>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
Reference in New Issue
Block a user