Files
some-java-packages/src/finalexam/Database/DataOutput/CourseGrading_files/judgeutils.js.download
T
2024-05-24 16:43:34 +08:00

58 lines
2.4 KiB
Plaintext

function cgShowProcessLoading(myframeID) {
var showmessageFrame = document.getElementById(myframeID);
showmessageFrame = showmessageFrame.contentWindow || ( showmessageFrame.contentDocument.document || showmessageFrame.contentDocument);
showmessageFrame.document.open();
showmessageFrame.document.write("<img src='/images/loading2.gif'>");
showmessageFrame.document.close();
}
function cgShowProcessCenterLoading(myframeID) {
var showmessageFrame = document.getElementById(myframeID);
showmessageFrame = showmessageFrame.contentWindow || ( showmessageFrame.contentDocument.document || showmessageFrame.contentDocument);
showmessageFrame.document.open();
showmessageFrame.document.write("<p style='text-align:center;'><img src='/images/loading2.gif'></p>");
showmessageFrame.document.close();
}
function cgShowLoading(myframeID, tipMsg) {
var showmessageFrame = document.getElementById(myframeID);
showmessageFrame = showmessageFrame.contentWindow || ( showmessageFrame.contentDocument.document || showmessageFrame.contentDocument);
showmessageFrame.document.open();
showmessageFrame.document.write(tipMsg);
showmessageFrame.document.close();
}
function cgShowLoadingImg(myframeID, tipMsg) {
var showmessageFrame = document.getElementById(myframeID);
showmessageFrame = showmessageFrame.contentWindow || ( showmessageFrame.contentDocument.document || showmessageFrame.contentDocument);
showmessageFrame.document.open();
showmessageFrame.document.write("<p>" + tipMsg + "</p><img src='/images/loading2.gif'>");
showmessageFrame.document.close();
}
function cgShowDIVLoadingImg(myDivID, tipMsg) {
document.getElementById(myDivID).innerHTML=("<p>" + tipMsg + "</p><img src='/images/loading2.gif'>");
}
function cgGetPageY(elem) {
return elem.offsetParent ? (elem.offsetTop + cgGetPageY(elem.offsetParent)) : elem.offsetTop;
}
function cgResizeIframe(ifmID) {
var height = document.documentElement.clientHeight;
height -= cgGetPageY(document.getElementById(ifmID))+ 55 ;
height = (height < 0) ? 0 : height;
document.getElementById(ifmID).style.height = height + 'px';
}
function cgResizeModalIframe(ifmID) {
var height = document.documentElement.clientHeight;
height -= cgGetPageY(document.getElementById(ifmID))+ 8 ;
height = (height < 0) ? 0 : height;
document.getElementById(ifmID).style.height = height + 'px';
}