var OneIsFresh = false;
var TwoIsFresh = false;
var ThreeIsFresh = false;
$(function () {
$("#tab").tabs({
show: function (event, ui) {
g_Cur_Tab = ui.index;
tabActive();
}
});
});
function tabActive() {
switch (g_Cur_Tab) {
case 0:
$('#tabsArea').tabs({ selected: 0 });
if (OneIsFresh == false) {
OneIsFresh = true;//切换回来之后不需要重新刷新
loadPurviewSysManTable();
}
break;
case 1:
$('#tabsArea').tabs({ selected: 1 });
if (TwoIsFresh == false) {
TwoIsFresh = true;
loadPurviewPduMgrManTable();
}
break;
case 2:
$('#tabsArea').tabs({ selected: 2 });
if (ThreeIsFresh == false) {
ThreeIsFresh = true;
loadPurviewMgrManTable();
}
break;
default:
$('#tabsArea').tabs({ selected: 0 });
if (OneIsFresh == false) {
OneIsFresh = true;
loadPurviewSysManTable();
}
break;
}
}
$("#validateForm-c").validate({
errorClass: "error",
ignoreTitle: true,
submitHandler: function (form) {
submit3();
},
rules: {},
messages: {}
});
$("#divPduTree").dialog(
{
show: "slow",
bgiframe: false,
autoOpen: true,
300,
height: 600,
draggable: true,
resizable: false,
modal: true,
buttons: {
"取消": function () {
$(this).dialog("close");
},
"确定": function () {
$(this).dialog("close");
}
}
});
$("#divTip").dialog({
show: false,
bgiframe: false,
autoOpen: false
});
$("#txtdirname").click(function (event) {
initPurviewTree();
var top = $(event.target).offset().top + 22;
var left = $(event.target).offset().left;
$("#divTip").dialog("option", "position", [left, top]);
$("#divTip").dialog("open");
});
tab控件的使用:
var OneIsFresh = false;
var TwoIsFresh = false;
var ThreeIsFresh = false;
$(function () {
$("#tab").tabs({
show: function (event, ui) {
g_Cur_Tab = ui.index;
tabActive();
}
});
});
function tabActive() {
switch (g_Cur_Tab) {
case 0:
$('#tabsArea').tabs({ selected: 0 });
if (OneIsFresh == false) {
OneIsFresh = true;//切换回来之后不需要重新刷新
loadPurviewSysManTable();
}
break;
case 1:
$('#tabsArea').tabs({ selected: 1 });
if (TwoIsFresh == false) {
TwoIsFresh = true;
loadPurviewPduMgrManTable();
}
break;
case 2:
$('#tabsArea').tabs({ selected: 2 });
if (ThreeIsFresh == false) {
ThreeIsFresh = true;
loadPurviewMgrManTable();
}
break;
default:
$('#tabsArea').tabs({ selected: 0 });
if (OneIsFresh == false) {
OneIsFresh = true;
loadPurviewSysManTable();
}
break;
}
}