?? webresource.axd
字號:
}
// Load each script in order and wait for each one to load before proceeding
function Anthem_LoadPageScript(result, index) {
if (index < result.pagescript.length) {
try {
var script = document.createElement('script');
script.type = 'text/javascript';
if (result.pagescript[index].indexOf('src=') == 0) {
script.src = result.pagescript[index].substring(4);
} else {
if (script.canHaveChildren ) {
script.appendChild(document.createTextNode(result.pagescript[index]));
} else {
script.text = result.pagescript[index];
}
}
document.getElementsByTagName('head')[0].appendChild(script);
if (typeof script.readyState != "undefined") {
script.onreadystatechange = function() {
if (script.readyState != "complete" && script.readyState != "loaded") {
return;
} else {
Anthem_LoadPageScript(result, index + 1);
}
}
} else {
Anthem_LoadPageScript(result, index + 1);
}
} catch (e) {
Anthem_DebugError("Error adding page script to head. " + e.name + ": " + e.message);
}
}
}
function Anthem_EvalClientSideScript(result) {
if (result.script) {
for (var i = 0; i < result.script.length; ++i) {
try {
eval(result.script[i]);
} catch (e) {
alert("Error evaluating client-side script!\n\nScript: " + result.script[i] + "\n\nException: " + e);
}
}
}
}
function Anthem_DebugRequestText(text) {
}
function Anthem_DebugResponseText(text) {
}
function Anthem_DebugError(text) {
}
//Fix for bug #1429412, "Reponse callback returns previous response after file push".
//see http://sourceforge.net/tracker/index.php?func=detail&aid=1429412&group_id=151897&atid=782464
function Anthem_Clear__EVENTTARGET() {
var form = document.getElementById(Anthem_FormID);
Anthem_SetHiddenInputValue(form, "__EVENTTARGET", "");
}
function Anthem_InvokePageMethod(methodName, args, clientCallBack, clientCallBackArg) {
Anthem_Clear__EVENTTARGET(); // fix for bug #1429412
return Anthem_CallBack(null, "Page", null, methodName, args, clientCallBack, clientCallBackArg, true, true);
}
function Anthem_InvokeMasterPageMethod(methodName, args, clientCallBack, clientCallBackArg) {
Anthem_Clear__EVENTTARGET(); // fix for bug #1429412
return Anthem_CallBack(null, "MasterPage", null, methodName, args, clientCallBack, clientCallBackArg, true, true);
}
function Anthem_InvokeControlMethod(id, methodName, args, clientCallBack, clientCallBackArg) {
Anthem_Clear__EVENTTARGET(); // fix for bug #1429412
return Anthem_CallBack(null, "Control", id, methodName, args, clientCallBack, clientCallBackArg, true, true);
}
function Anthem_PreProcessCallBack(
control,
e,
eventTarget,
causesValidation,
validationGroup,
imageUrlDuringCallBack,
textDuringCallBack,
enabledDuringCallBack,
preCallBackFunction,
callBackCancelledFunction,
preProcessOut
) {
preProcessOut.Enabled = !control.disabled;
var preCallBackResult = true;
if (preCallBackFunction) {
preCallBackResult = preCallBackFunction(control);
}
if (typeof preCallBackResult == "undefined" || preCallBackResult) {
var valid = true;
if (causesValidation && typeof Page_ClientValidate == "function") {
valid = Page_ClientValidate(validationGroup);
}
if (valid) {
var inputType = control.getAttribute("type");
inputType = (inputType == null) ? '' : inputType.toUpperCase();
if (inputType == "IMAGE" && e != null) {
var form = document.getElementById(Anthem_FormID);
if (e.offsetX) {
Anthem_SetHiddenInputValue(form, eventTarget + ".x", e.offsetX);
Anthem_SetHiddenInputValue(form, eventTarget + ".y", e.offsetY);
} else {
Anthem_SetHiddenInputValue(form, eventTarget + ".x", e.clientX - control.offsetLeft + 1);
Anthem_SetHiddenInputValue(form, eventTarget + ".y", e.clientY - control.offsetTop + 1);
}
}
preProcessOut.OriginalText = control.innerHTML;
if (imageUrlDuringCallBack || textDuringCallBack) {
if (control.nodeName.toUpperCase() == "INPUT") {
if (inputType == "CHECKBOX" || inputType == "RADIO" || inputType == "TEXT") {
preProcessOut.OriginalText = GetLabelText(control.id);
SetLabelText(control.id, textDuringCallBack);
} else if (inputType == "IMAGE") {
if (imageUrlDuringCallBack) {
preProcessOut.OriginalText = control.src;
control.src = imageUrlDuringCallBack;
} else {
preProcessOut.ParentElement = control.parentElement ? control.parentElement : control.parentNode;
if (preProcessOut.ParentElement) {
preProcessOut.OriginalText = preProcessOut.ParentElement.innerHTML;
preProcessOut.ParentElement.innerHTML = textDuringCallBack;
}
}
} else if (inputType == "SUBMIT") {
preProcessOut.OriginalText = control.value;
control.value = textDuringCallBack;
}
} else if (control.nodeName.toUpperCase() == "SELECT") {
preProcessOut.OriginalText = GetLabelText(control.id);
SetLabelText(control.id, textDuringCallBack);
} else {
control.innerHTML = textDuringCallBack;
}
}
control.disabled = (typeof enabledDuringCallBack == "undefined") ? false : !enabledDuringCallBack;
return true;
} else {
return false;
}
} else {
if (callBackCancelledFunction) {
callBackCancelledFunction(control);
}
return false;
}
}
function Anthem_PreProcessCallBackOut() {
// Fields
this.ParentElement = null;
this.OriginalText = '';
this.Enabled = true;
}
function Anthem_PostProcessCallBack(
result,
control,
eventTarget,
clientCallBack,
clientCallBackArg,
imageUrlDuringCallBack,
textDuringCallBack,
postCallBackFunction,
preProcessOut
) {
if (postCallBackFunction) {
postCallBackFunction(control);
}
control.disabled = !preProcessOut.Enabled;
var inputType = control.getAttribute("type");
inputType = (inputType == null) ? '' : inputType.toUpperCase();
if (inputType == "IMAGE") {
var form = document.getElementById(Anthem_FormID);
Anthem_RemoveHiddenInput(form, eventTarget + ".x");
Anthem_RemoveHiddenInput(form, eventTarget + ".y");
}
if (imageUrlDuringCallBack || textDuringCallBack) {
if (control.nodeName.toUpperCase() == "INPUT") {
if (inputType == "CHECKBOX" || inputType == "RADIO" || inputType == "TEXT") {
SetLabelText(control.id, preProcessOut.OriginalText);
} else if (inputType == "IMAGE") {
if (imageUrlDuringCallBack) {
control.src = preProcessOut.OriginalText;
} else {
preProcessOut.ParentElement.innerHTML = preProcessOut.OriginalText;
}
} else if (inputType == "SUBMIT") {
control.value = preProcessOut.OriginalText;
}
} else if (control.nodeName.toUpperCase() == "SELECT") {
SetLabelText(control.id, preProcessOut.OriginalText);
} else {
control.innerHTML = preProcessOut.OriginalText;
}
}
if (clientCallBack) {
clientCallBack(result, clientCallBackArg);
}
}
function Anthem_FireCallBackEvent(
control,
e,
eventTarget,
eventArgument,
causesValidation,
validationGroup,
imageUrlDuringCallBack,
textDuringCallBack,
enabledDuringCallBack,
preCallBackFunction,
postCallBackFunction,
callBackCancelledFunction,
includeControlValuesWithCallBack,
updatePageAfterCallBack
) {
var preProcessOut = new Anthem_PreProcessCallBackOut();
var preProcessResult = Anthem_PreProcessCallBack(
control,
e,
eventTarget,
causesValidation,
validationGroup,
imageUrlDuringCallBack,
textDuringCallBack,
enabledDuringCallBack,
preCallBackFunction,
callBackCancelledFunction,
preProcessOut
);
if (preProcessResult) {
Anthem_FireEvent(
eventTarget,
eventArgument,
function(result) {
Anthem_PostProcessCallBack(
result,
control,
eventTarget,
null,
null,
imageUrlDuringCallBack,
textDuringCallBack,
postCallBackFunction,
preProcessOut
);
},
null,
includeControlValuesWithCallBack,
updatePageAfterCallBack
);
}
}
function AnthemListControl_OnClick(
e,
causesValidation,
validationGroup,
textDuringCallBack,
enabledDuringCallBack,
preCallBackFunction,
postCallBackFunction,
callBackCancelledFunction,
includeControlValuesWithCallBack,
updatePageAfterCallBack
) {
var target = e.target || e.srcElement;
if (target.nodeName.toUpperCase() == "LABEL" && target.htmlFor != '')
return;
var eventTarget = target.id.split("_").join("$");
Anthem_FireCallBackEvent(
target,
e,
eventTarget,
'',
causesValidation,
validationGroup,
'',
textDuringCallBack,
enabledDuringCallBack,
preCallBackFunction,
postCallBackFunction,
callBackCancelledFunction,
true,
true
);
}
function GetLabelText(id) {
var labels = document.getElementsByTagName('label');
for (var i = 0; i < labels.length; i++) {
if (labels[i].htmlFor == id) {
return labels[i].innerHTML;
}
}
return null;
}
function SetLabelText(id, text) {
var labels = document.getElementsByTagName('label');
for (var i = 0; i < labels.length; i++) {
if (labels[i].htmlFor == id) {
labels[i].innerHTML = text;
return;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -