$(document).ready(function(){
//====================================================================
//生成tab-panel,by f1jee 2010-11-24
//====================================================================
var $panels =$(".panel");
var length=$(".panel").length;
for(var i=0;i
");
title=i+","+$(panel).attr("title");
var $childs=$(panel).prev().children();
var child=$childs[0];
$(child).html(title);
}
$(".btn-slide").click(function(){
var div=$(this).parent().next()
$(div).slideToggle();
$(this).toggleClass("active"); return false;
});
var $xboxcontents =$(".xboxcontent");
length=$(".xboxcontent").length;
for(var i=0;i"
+""
+""
+""
+""
+""
+""
+""
+"");
$(xboxcontent).after(""
+""
+""
+""
+""
+""
+"");
}
//====================================================================
//生成tab-panel,by f1jee 2010-11-24
//====================================================================
var $tabPanels =$(".f1js-ui-tab-panel");
var lengthi=$(".f1js-ui-tab-panel").length;
for(var i=0;i");
for(var j=0;j"+title+"");
$li.addClass("f1js-ui-tab-title");
$(tab1).prev().append($li);
//$li.bind("click",handle($li));
}
else{
$li=$(""+title+"");
$li.addClass("f1js-ui-tab-title");
$li.addClass("f1js-ui-tab-title-active");
$(tab1).prev().append($li);
//$li.bind("click",handle($li));
}
}
}
$(".f1js-ui-tab-title").bind("click",
function() {
var action=($(this).attr("action"));
if (action!="-") {
window.document.location.href=action;
}
//alert($(this).html());
var $titles =$(this).parent().children();
var index = $titles.index($(this));
$(this).siblings().removeClass("f1js-ui-tab-title-active");
$(this).addClass("f1js-ui-tab-title-active");
var $tabs =$(this).parent().siblings();
//alert("===55");
//alert("hi,============================================================="+index+"==="+$tabs.length);
for(var i=0;i<$tabs.length;i++){
var tab1=$tabs[0];
var tab=$tabs[i];
if (i==index){$(tab).show();} else{$(tab).hide();}
}
});
});
function dUser(id) {
popup("PickUserDlgAction.do?id="+id);
}
function dList(id,index,result) {
popup("waitLiDlg.do?v="+id+"&index="+index+"&result="+result+"&selectId="+selectId+"&stype=2",result);
}
function dListForId(id,index,result) {
var selectId = $("input[name='"+result+"']").val();
var k = "";
try{
k = getExtends();
}catch(Exception){}
popup("waitLiDlg.do?v="+id+"&index="+index+"&result="+result+"&selectId="+selectId+"&stype=1&k="+k,result);
}
function dListForIds(id,index,result) {
var selectId = $("input[name='"+result+"']").val();
popup("waitLiDlg.do?v="+id+"&index="+index+"&result="+result+"&selectId="+selectId+"&stype=2",result);
}
function popup(url,result)
{
$.ligerDialog.open({
url : url,
height : 300,
width : 600,
buttons :[{
text : '确定',
onclick : function(item, dialog) {
var ids = document.getElementsByName("listDialog")[0].contentWindow.findSelectIds();
var txts = document.getElementsByName("listDialog")[0].contentWindow.findSelectTxts();
$("#"+result).val(ids);
$("#"+result+"-info").val(txts);
dialog.close();
$(".l-dialog-win").remove();
}
}, {
text : '取消',
onclick : function(item, dialog) {
dialog.close();
$(".l-dialog-win").remove();
}
} ],
name:"listDialog"
});
}