'.replace('%s', $('meta[name=csrfExpiration]').attr('content')));
}
//*********************************************************
// 目的:
//*********************************************************
$(document).ready(function(){
// Content box tabs:
$('.content-box .content-box-content div.tab-content').hide(); // Hide the content divs
$('ul.content-box-tabs li a.default-tab').addClass('current'); // Add the class "current" to the default tab
$('.content-box-content div.default-tab').show(); // Show the div with class "default-tab"
$('.content-box ul.content-box-tabs li a').click( // When a tab is clicked...
function() {
$(this).parent().siblings().find("a").removeClass('current'); // Remove "current" class from all tabs
$(this).addClass('current'); // Add class "current" to clicked tab
var currentTab = $(this).attr('href'); // Set variable "currentTab" to the value of href of clicked tab
$(currentTab).siblings().hide(); // Hide all content divs
$(currentTab).show(); // Show the content div with the id equal to the id of clicked tab
return false;
}
);
if($('.SubMenu').find('span').length>0){
$('.SubMenu').show();
}
//checkbox
$('input.checkbox[value="1"]').after('');
$('input.checkbox[value!="1"]').after('');
$("input.checkbox").each(function(i){
$(this).next("span").css("display",$(this).css("display"));
$(this).next("span").attr("alt",$(this).attr("alt"));
$(this).next("span").attr("title",$(this).attr("title"));
if($(this).attr("disabled")=="disabled"){
$(this).next("span").addClass("imgcheck-disabled");
}
});
$('input.checkbox').css("display","none");
$("body").on("click","span.imgcheck", function(){ChangeCheckValue(this)});
//batch
$("#batch a").bind("click", function(){ BatchContinue();$("#batch p").html("");});
$(".SubMenu span.m-right").parent().css({"float":"right"});
$("img[width='16']").each(function(){if($(this).parent().is("a")){$(this).parent().addClass("button")}});
if ($("div.divHeader,div.divHeader2").first().css("background-image") == "none") {
AddHeaderFontIcon("icon-window-fill");
}
AutoHideTips();
SetCookie("timezone",(new Date().getTimezoneOffset()/60)*(-1));
var s = $("div.divHeader,div.divHeader2").first().css("background-image");
if ( $("div.divHeader i,div.divHeader2 i").length <= 0 && (s != undefined && s.indexOf("none.gif") != -1) ) {
AddHeaderFontIcon("icon-window-fill");
}
var startTime = new Date().getTime();
var csrfInterval = setInterval(function () {
var timeout = $('meta[name=csrfExpiration]').attr('content') || 1; // Re-get expiration value every time
var timeDiff = new Date().getTime() - startTime;
if (timeDiff > Math.floor(timeout) * 60 * 60 * 1000) {
ShowCSRFHint();
clearInterval(csrfInterval);
}
}, 30 * 60 * 1000);
});
var SetCookie = function () { return zbp.cookie.set.apply(null, arguments); };
var GetCookie = function () { return zbp.cookie.get.apply(null, arguments); };
var LoadRememberInfo = function () { zbp.userinfo.output.apply(null); return false;};
var SaveRememberInfo = function () { zbp.userinfo.saveFromHtml.apply(null); return false;};
var RevertComment = function () { zbp.comment.reply.apply(null, arguments); return false;} ;
var GetComments = function () { zbp.comment.get.apply(null, arguments); return false;} ;
var VerifyMessage = function () { zbp.comment.post.apply(null); return false;};