2018-06-15 15:27:31 +08:00

55 lines
2.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%>/Frame/page/resources/css/strip.css">
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%>/Frame/page/resources/css/tabs.css">
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%><%=sSkinPath%>/css/tabs.css">
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/resources/js/tabstrip-1.0.js"></script>
</head>
<body leftmargin="0" topmargin="0" style="overflow:hidden;height:100%;width:100%;">
<%try{if(!StringX.isSpace(CurPage.getAttribute("BeforeTabStripHtml"))){%><div id="BeforeTabStrip"><%=CurPage.getAttribute("BeforeTabStripHtml")%></div><%}}catch(Exception e){}%>
<div id="window1" style="vertical-align:middle;padding:0;border:0px solid #F00;height:100%;width: 100%; overflow:hidden">
</div>
</body>
<script type="text/javascript">
<%int _first = 0;try{_first = Integer.valueOf(CurPage.getAttribute("First"));}catch(Exception e){}%>
var tabCompent = new TabStrip("T01", "单个TabStrip组", "<%="strip".equals(CurPage.getAttribute("TabStripType"))?"strip":"tab"%>", "#window1");
(function(datas, first){
//debugger;
if(datas){
var nums = new Array();
for(var i = 0; i < datas.length; i++){
// 参数0.是否显示, 1.标题, 2.JS事件字符串表示, 3. 是否缓存(默认是), 4. 是否有关闭按钮(默认无), 5. Strip高度(默认600px)
if(datas[i][0] != "true") continue;
nums.push(i);
tabCompent.addDataItem(self.name+i,datas[i][1], datas[i][2], datas[i][3]=="false"?false:true, datas[i][4]=="true"?true:false, datas[i][5]);
}
if(nums.indexOf(first) < 0) first = nums[0];
tabCompent.setSelectedItem(self.name+first);
}
tabCompent.init();
var bts = document.getElementById("BeforeTabStrip");
$(window).resize(function(){
if(bts) $("#window1").height($("body").height() - $(bts).height());
if(tabCompent._view=="tab") $(".tabs_content").height($("#window1").height()-$(".tabs_button").height()-7);
//$(".handle").hide();
}).resize();
})(<%=CurPage.getAttribute("TabStrip")%>, <%=_first%>);
function selectItem(i){
var id = self.name+i;
if(tabCompent._view == "tab") $("#handle_"+id).click();
else $("#strip_hand_"+id).click();
}
function addTabStripItem(sTitle, sUrl, sParas, bOpen){
if(bOpen != false) bOpen = true;
var script = !sUrl ? "" : "AsControl.OpenView('"+sUrl+"', '"+sParas+"', 'TabContentFrame')";
var _cache=(sParas.indexOf("isCache=false")>=0?false:true);
tabCompent.addItem(self.name+escape(sTitle).replace(/[^A-z0-9]/g, ""), sTitle, script, _cache, true, bOpen);
}
</script>
</html>