first commit
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<LabelType>博客类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<Version officialVersion="" modifiedVersions="2901" compatibleVersion="" />
|
||||
<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="Keyword" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<div class="radioGroup">
|
||||
<label><input type="radio" name="SearchGroup" value="1" id="SearchGroup_1" checked="checked" />标题</label>
|
||||
<label><input type="radio" name="SearchGroup" value="2" id="SearchGroup_2" />作者</label>
|
||||
<label><input type="radio" name="SearchGroup" value="3" id="SearchGroup_3" />标签</label>
|
||||
<label><input type="radio" name="SearchGroup" value="4" id="SearchGroup_4" />内容</label>
|
||||
</div>
|
||||
<span><input id="keyword" type="text" value="" class="inputText" /> </span>
|
||||
<input type="button" class="bt" value="搜索" onclick="OnSearchCheckAndSubmit();" />
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function OnSearchCheckAndSubmit(){
|
||||
var keyword = document.getElementById("keyword").value;
|
||||
if (keyword == '' || keyword == null) {
|
||||
ShowBlogMessage("warn","请填写您想搜索的关键词","");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
var searchType="";
|
||||
var radioes = document.getElementsByName("SearchGroup");
|
||||
for(var i=0;i<radioes.length;i++)
|
||||
{
|
||||
if(radioes[i].checked){
|
||||
searchType = radioes[i].value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
window.location = "{PE.SiteConfig.applicationpath/}Blog/search.aspx?searchtype="+searchType+"&Keyword=" + escape(keyword);
|
||||
}
|
||||
}
|
||||
function OnSearchCheck(){
|
||||
var radioes = document.getElementsByName("SearchGroup");
|
||||
var b=false;
|
||||
for(var i=0;i<radioes.length;i++)
|
||||
{
|
||||
if(radioes[i].value=="@RequestInt_searchtype"){
|
||||
radioes[i].checked=true;
|
||||
b=true;
|
||||
}
|
||||
else{
|
||||
radioes[i].checked=false;
|
||||
}
|
||||
}
|
||||
if(!b){
|
||||
radioes[0].checked=true;
|
||||
}
|
||||
document.getElementById("keyword").value="<xsl:value-of select="$Keyword"/>";
|
||||
}
|
||||
OnSearchCheck();
|
||||
</script>
|
||||
</xsl:template>
|
||||
</xsl:transform>
|
||||
]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>Keyword</name>
|
||||
<datatype>string</datatype>
|
||||
<default></default>
|
||||
<intro>搜索的关键字</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
Reference in New Issue
Block a user