first commit
This commit is contained in:
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>样式类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>@queryCond</LabelSqlString>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>50</default>
|
||||
<intro>项目标题长度,一个汉字占两个字节</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>focusWidth</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>428</default>
|
||||
<intro>焦点图宽度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>focusHeight</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>280</default>
|
||||
<intro>焦点图高度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalExtend</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default />
|
||||
<intro>可选扩展参数</intro>
|
||||
</attributes>
|
||||
<LabelTemplate>
|
||||
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:lewi="http://www.powereasy.net" xmlns:pe="labelproc" exclude-result-prefixes="pe ms lewi">
|
||||
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="titleLength" />
|
||||
<xsl:param name="focusWidth" />
|
||||
<xsl:param name="focusHeight" />
|
||||
<xsl:param name="optionalExtend" />
|
||||
<xsl:param name="queryCond" />
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(NewDataSet/Table) = 0">
|
||||
<font style="color:red">还没有任何信息!</font>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<style type="text/css">
|
||||
.texttitle { color: #C10001; }
|
||||
.texttitle a:link { color: #C10001; text-decoration: none; }
|
||||
.texttitle a:visited { color: #C10001; text-decoration: none; }
|
||||
.texttitle a:hover { color: #C10001; text-decoration: underline; }
|
||||
.texttitle a:active { color: #C10001; text-decoration: none; }
|
||||
#imgTitle { filter: Alpha(opacity=70); left: 0px; overflow: hidden; position: relative; text-align: left; }
|
||||
#imgTitle_up { left: 0px; height: 1px; text-align: left; }
|
||||
#imgTitle_down { left: 0px; text-align: right; }
|
||||
.imgClass { border-right: #fff 1px solid; border-top: #fff 1px solid; border-left: #fff 1px solid; border-bottom: #fff 1px solid; }
|
||||
#txtFrom { vertical-align: middle; padding-top: 2px; text-align: center; }
|
||||
.button { padding-right: 7px; padding-left: 7px; background: #7b7b63; padding-bottom: 2px; margin: 0px; font: bold 9px sans-serif; border-left: #fff 1px solid; padding-top: 2px; text-decoration: none; }
|
||||
a.button { color: #ffffff; font-family: sans-serif; background-color: #000000; text-decoration: none; }
|
||||
a.button:link { color: #ffffff; font-family: sans-serif; background-color: #000000; text-decoration: none; }
|
||||
a.button:visited { color: #ffffff; font-family: sans-serif; background-color: #000000; text-decoration: none; }
|
||||
a.button:hover { background: #fff; color: #fff; font-family: sans-serif; text-decoration: none; }
|
||||
.buttonDiv { background: #000000; float: left; vertical-align: middle; width: 21px; height: 1px; text-align: center; }
|
||||
.trans { filter: progid:DXImageTransform.Microsoft.Alpha(startX=0, startY=0, finishX=100, finishY=100,style=1,opacity=0,finishOpacity=40); width: 90px; background-color: #000; }
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var imgWidth = <xsl:value-of select="$focusWidth" />;
|
||||
var imgHeight = <xsl:value-of select="$focusHeight" />;
|
||||
var textFromHeight = 21;
|
||||
var textStyle = "texttitle";
|
||||
var textLinkStyle = "texttitle";
|
||||
var buttonLineOn = "#f60";
|
||||
var buttonLineOff = "#000";
|
||||
var TimeOut = 5000;
|
||||
var imgUrl = new Array();
|
||||
var imgLink = new Array();
|
||||
var imgtext = new Array();
|
||||
var imgAlt = new Array();
|
||||
var adNum = 0;
|
||||
document.write('<style type="text/css">');
|
||||
document.write('#focuseFrom{width:' + (imgWidth + 2) + ';margin: 0px; padding:0px;height:' + (imgHeight + textFromHeight) + 'px; overflow:hidden;}');
|
||||
document.write('#txtFrom{height:' + textFromHeight + 'px;line-height:' + textFromHeight + 'px;width:' + imgWidth + 'px;overflow:hidden;}');
|
||||
document.write('#imgTitle{width:' + imgWidth + ';top:-' + (textFromHeight + 14) + 'px;height:18px}');
|
||||
document.write('</style>');
|
||||
document.write('<div id="focuseFrom">');
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
imgUrl[<xsl:value-of select="position()"/>] = '<xsl:choose>
|
||||
<xsl:when test="TableName = 'PE_CommonProduct'">
|
||||
<xsl:value-of select="pe:ConvertToAbsolutePath(ProductThumb)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="pe:ConvertToAbsolutePath(DefaultPicUrl)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>';
|
||||
imgtext[<xsl:value-of select="position()"/>] = '<a href="<xsl:value-of select="pe:GetInfoPath(NodeID,GeneralID,InputTime,PinyinTitle,HtmlPageName)"/>" target="_blank" class="linkblack"><xsl:value-of select="pe:CutText(pe:ReplaceText(Title,'"',''),$titleLength,'…')"/></a>';
|
||||
imgLink[<xsl:value-of select="position()"/>] = '<xsl:value-of select="pe:GetInfoPath(NodeID,GeneralID,InputTime,PinyinTitle,HtmlPageName)"/>';
|
||||
imgAlt[<xsl:value-of select="position()"/>] = '<xsl:value-of select="Title"/>';
|
||||
</xsl:for-each>
|
||||
|
||||
function changeimg(n){
|
||||
adNum = n;
|
||||
window.clearInterval(theTimer);
|
||||
adNum = adNum - 1;
|
||||
nextAd();
|
||||
}
|
||||
|
||||
function goUrl(){
|
||||
window.open(imgLink[adNum], '_blank');
|
||||
}
|
||||
|
||||
if (navigator.appName == "Netscape") {
|
||||
document.write('<style type="text/css">');
|
||||
document.write('.buttonDiv{height:4px;width:21px;}');
|
||||
document.write('</style>');
|
||||
function nextAd(){
|
||||
if (adNum < (imgUrl.length - 1))
|
||||
adNum++;
|
||||
else
|
||||
adNum = 1;
|
||||
theTimer = setTimeout("nextAd()", TimeOut);
|
||||
document.images.imgInit.src = imgUrl[adNum];
|
||||
document.images.imgInit.alt = imgAlt[adNum];
|
||||
document.getElementById('focustext').innerHTML = imgtext[adNum];
|
||||
document.getElementById('imgLink').href = imgLink[adNum];
|
||||
}
|
||||
document.write('<a id="imgLink" href="' + imgLink[1] + '" target=_blank class="p1"><img src="' + imgUrl[1] + '" name="imgInit" width=' + imgWidth + ' height=' + imgHeight + ' border=1 alt="' + imgAlt[1] + '" class="imgClass"></a><div id="txtFrom"><span id="focustext" class="' + textStyle + '">' + imgtext[1] + '</span></div>')
|
||||
document.write('<div id="imgTitle">');
|
||||
document.write('<div id="imgTitle_down">');
|
||||
for (var i = 1; i < imgUrl.length; i++) {
|
||||
document.write('<a href="javascript:changeimg(' + i + ')" class="button" style="cursor:hand" title="' + imgAlt[i] + '">' + i + '</a>');
|
||||
}
|
||||
|
||||
document.write('</div>');
|
||||
document.write('</div>');
|
||||
document.write('</div>');
|
||||
nextAd();
|
||||
}
|
||||
|
||||
else {
|
||||
var count = 0;
|
||||
for (i = 1; i < imgUrl.length; i++) {
|
||||
if ((imgUrl[i] != "") && (imgLink[i] != "") && (imgtext[i] != "") && (imgAlt[i] != "")) {
|
||||
count++;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
function playTran(){
|
||||
if (document.all)
|
||||
imgInit.filters.revealTrans.play();
|
||||
}
|
||||
var key = 0;
|
||||
function nextAd(){
|
||||
if (adNum < count)
|
||||
adNum++;
|
||||
else
|
||||
adNum = 1;
|
||||
if (key == 0) {
|
||||
key = 1;
|
||||
}
|
||||
else
|
||||
if (document.all) {
|
||||
imgInit.filters.revealTrans.Transition = 23;
|
||||
imgInit.filters.revealTrans.apply();
|
||||
playTran();
|
||||
}
|
||||
document.images.imgInit.src = imgUrl[adNum];
|
||||
document.images.imgInit.alt = imgAlt[adNum];
|
||||
document.getElementById('link' + adNum).style.background = buttonLineOn;
|
||||
for (var i = 1; i <= count; i++) {
|
||||
if (i != adNum) {
|
||||
document.getElementById('link' + i).style.background = buttonLineOff;
|
||||
}
|
||||
}
|
||||
focustext.innerHTML = imgtext[adNum];
|
||||
theTimer = setTimeout("nextAd()", TimeOut);
|
||||
}
|
||||
document.write('<a target=_self href="javascript:goUrl()"><img style="FILTER: revealTrans(duration=1,transition=5);" src="javascript:nextAd()" width=' + imgWidth + ' height=' + imgHeight + ' border=0 vspace="0" name=imgInit class="imgClass"></a><br>');
|
||||
document.write('<div id="txtFrom"><span id="focustext" class="' + textStyle + '"></span></div>');
|
||||
document.write('<div id="imgTitle">');
|
||||
document.write('<div id="imgTitle_down"> <a class="trans"></a>');
|
||||
for (var i = 1; i < imgUrl.length; i++) {
|
||||
document.write('<a id="link' + i + '" href="javascript:changeimg(' + i + ')" class="button" style="cursor:hand" title="' + imgAlt[i] + '" onFocus="this.blur()">' + i + '</a>');
|
||||
}
|
||||
document.write('</div>');
|
||||
document.write('</div>');
|
||||
document.write('</div>');
|
||||
nextAd();
|
||||
}
|
||||
</script>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>queryCond</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>SELECT TOP 5 * FROM PE_CommonModel WHERE DefaultPicUrl != ''</default>
|
||||
<intro>查询条件</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
Reference in New Issue
Block a user