📄 microsoftajaxwebforms.debug.js
字号:
}
function Sys$WebForms$PageRequestManager$_queueScripts(scriptLoader, scriptBlockNodes, queueIncludes, queueBlocks) {
for (i = 0; i < scriptBlockNodes.length; i++) {
var scriptBlockType = scriptBlockNodes[i].id;
switch (scriptBlockType) {
case "ScriptContentNoTags":
if (!queueBlocks) {
continue;
}
scriptLoader.queueScriptBlock(scriptBlockNodes[i].content);
break;
case "ScriptContentWithTags":
var scriptTagAttributes;
eval("scriptTagAttributes = " + scriptBlockNodes[i].content);
if (scriptTagAttributes.src) {
if (!queueIncludes || Sys._ScriptLoader.isScriptLoaded(scriptTagAttributes.src)) {
continue;
}
}
else if (!queueBlocks) {
continue;
}
scriptLoader.queueCustomScriptTag(scriptTagAttributes);
break;
case "ScriptPath":
if (!queueIncludes || Sys._ScriptLoader.isScriptLoaded(scriptBlockNodes[i].content)) {
continue;
}
scriptLoader.queueScriptReference(scriptBlockNodes[i].content);
break;
}
}
}
function Sys$WebForms$PageRequestManager$_registerDisposeScript(panelID, disposeScript) {
if (!this._scriptDisposes[panelID]) {
this._scriptDisposes[panelID] = [disposeScript];
}
else {
Array.add(this._scriptDisposes[panelID], disposeScript);
}
}
function Sys$WebForms$PageRequestManager$_scriptIncludesLoadComplete() {
var ctx = this._updateContext;
for (i = 0; i < ctx.updatePanelNodes.length; i++) {
var deltaUpdatePanel = ctx.updatePanelNodes[i];
var deltaPanelID = deltaUpdatePanel.id;
var deltaPanelRendering = deltaUpdatePanel.content;
var updatePanelElement = document.getElementById(deltaPanelID);
if (!updatePanelElement) {
this._endPostBack(Error.invalidOperation(String.format(Sys.WebForms.Res.PRM_MissingPanel, deltaPanelID)), ctx.response);
return;
}
this._updatePanel(updatePanelElement, deltaPanelRendering);
}
for (i = 0; i < ctx.scriptDisposeNodes.length; i++) {
var disposePanelId = ctx.scriptDisposeNodes[i].id;
var disposeScript = ctx.scriptDisposeNodes[i].content;
this._registerDisposeScript(disposePanelId, disposeScript);
}
var viewStateEncrypted = false;
for (i = 0; i < ctx.hiddenFieldNodes.length; i++) {
var id = ctx.hiddenFieldNodes[i].id;
var value = ctx.hiddenFieldNodes[i].content;
if (id === "__VIEWSTATEENCRYPTED") {
viewStateEncrypted = true;
}
var hiddenFieldElement = document.getElementById(id);
if (!hiddenFieldElement) {
hiddenFieldElement = document.createElement('input');
hiddenFieldElement.id = id;
hiddenFieldElement.name = id;
hiddenFieldElement.type = 'hidden';
this._form.appendChild(hiddenFieldElement);
}
hiddenFieldElement.value = value;
}
if (!viewStateEncrypted) {
var viewStateEncryptedField = document.getElementById("__VIEWSTATEENCRYPTED");
if (viewStateEncryptedField) {
viewStateEncryptedField.parentNode.removeChild(viewStateEncryptedField);
}
}
if (ctx.scriptsFailed) {
throw Sys._ScriptLoader._errorScriptLoadFailed(ctx.scriptsFailed.src, ctx.scriptsFailed.multipleCallbacks);
}
var scriptLoader = Sys._ScriptLoader.getInstance();
this._queueScripts(scriptLoader, ctx.scriptBlockNodes, false, true);
var arrayScript = '';
for (i = 0; i < ctx.arrayDeclarationNodes.length; i++) {
arrayScript += "Sys.WebForms.PageRequestManager._addArrayElement('" + ctx.arrayDeclarationNodes[i].id + "', " + ctx.arrayDeclarationNodes[i].content + ");\r\n";
}
var expandoScript = '';
for (i = 0; i < ctx.expandoNodes.length; i++) {
var propertyReference = ctx.expandoNodes[i].id;
var propertyValue = ctx.expandoNodes[i].content;
expandoScript += propertyReference + " = " + propertyValue + "\r\n";
}
if (arrayScript.length) {
scriptLoader.queueScriptBlock(arrayScript);
}
if (expandoScript.length) {
scriptLoader.queueScriptBlock(expandoScript);
}
this._queueScripts(scriptLoader, ctx.scriptStartupNodes, true, true);
var onSubmitStatementScript = '';
for (var i = 0; i < ctx.onSubmitNodes.length; i++) {
if (i === 0) {
onSubmitStatementScript = 'Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, function() {\r\n';
}
onSubmitStatementScript += ctx.onSubmitNodes[i].content + "\r\n";
}
if (onSubmitStatementScript.length) {
onSubmitStatementScript += "\r\nreturn true;\r\n});\r\n";
scriptLoader.queueScriptBlock(onSubmitStatementScript);
}
scriptLoader.loadScripts(0, Function.createDelegate(this, this._scriptsLoadComplete), null, null);
}
function Sys$WebForms$PageRequestManager$_scriptIncludesLoadFailed(scriptLoader, scriptElement, multipleCallbacks) {
this._updateContext.scriptsFailed = { src: scriptElement.src, multipleCallbacks: multipleCallbacks };
this._scriptIncludesLoadComplete();
}
function Sys$WebForms$PageRequestManager$_scriptsLoadComplete() {
var response = this._updateContext.response;
this._updateContext = null;
if (window.__theFormPostData) {
window.__theFormPostData = "";
}
if (window.__theFormPostCollection) {
window.__theFormPostCollection = [];
}
if (window.WebForm_InitCallback) {
window.WebForm_InitCallback();
}
if (this._scrollPosition) {
if (window.scrollTo) {
window.scrollTo(this._scrollPosition.x, this._scrollPosition.y);
}
this._scrollPosition = null;
}
Sys.Application.endCreateComponents();
this._pageLoaded(false);
this._endPostBack(null, response);
if (this._controlIDToFocus) {
var focusTarget;
var oldContentEditableSetting;
if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {
var targetControl = $get(this._controlIDToFocus);
focusTarget = targetControl;
if (targetControl && (!WebForm_CanFocus(targetControl))) {
focusTarget = WebForm_FindFirstFocusableChild(targetControl);
}
if (focusTarget && (typeof(focusTarget.contentEditable) !== "undefined")) {
oldContentEditableSetting = focusTarget.contentEditable;
focusTarget.contentEditable = false;
}
else {
focusTarget = null;
}
}
WebForm_AutoFocus(this._controlIDToFocus);
if (focusTarget) {
focusTarget.contentEditable = oldContentEditableSetting;
}
this._controlIDToFocus = null;
}
}
function Sys$WebForms$PageRequestManager$_splitNodeIntoArray(node) {
var str = node.content;
var arr = str.length ? str.split(',') : [];
return arr;
}
function Sys$WebForms$PageRequestManager$_uniqueIDToClientID(uniqueID) {
return uniqueID.replace(/\$/g, '_');
}
function Sys$WebForms$PageRequestManager$_updateControls(updatePanelIDs, asyncPostBackControlIDs, postBackControlIDs, asyncPostBackTimeout) {
if (updatePanelIDs) {
this._updatePanelIDs = new Array(updatePanelIDs.length);
this._updatePanelClientIDs = new Array(updatePanelIDs.length);
this._updatePanelHasChildrenAsTriggers = new Array(updatePanelIDs.length);
for (var i = 0; i < updatePanelIDs.length; i++) {
var realPanelID = updatePanelIDs[i].substr(1);
var childrenAsTriggers = (updatePanelIDs[i].charAt(0) === 't');
this._updatePanelHasChildrenAsTriggers[i] = childrenAsTriggers;
this._updatePanelIDs[i] = realPanelID;
this._updatePanelClientIDs[i] = this._uniqueIDToClientID(realPanelID);
}
this._asyncPostBackTimeout = asyncPostBackTimeout * 1000;
}
else {
this._updatePanelIDs = [];
this._updatePanelClientIDs = [];
this._updatePanelHasChildrenAsTriggers = [];
this._asyncPostBackTimeout = 0;
}
this._asyncPostBackControlIDs = [];
this._asyncPostBackControlClientIDs = [];
this._convertToClientIDs(asyncPostBackControlIDs, this._asyncPostBackControlIDs, this._asyncPostBackControlClientIDs);
this._postBackControlIDs = [];
this._postBackControlClientIDs = [];
this._convertToClientIDs(postBackControlIDs, this._postBackControlIDs, this._postBackControlClientIDs);
}
function Sys$WebForms$PageRequestManager$_updatePanel(updatePanelElement, rendering) {
for (var updatePanelID in this._scriptDisposes) {
if (this._elementContains(updatePanelElement, document.getElementById(updatePanelID))) {
var disposeScripts = this._scriptDisposes[updatePanelID];
for (var i = 0; i < disposeScripts.length; i++) {
eval(disposeScripts[i]);
}
delete this._scriptDisposes[updatePanelID];
}
}
this._destroyTree(updatePanelElement);
updatePanelElement.innerHTML = rendering;
}
function Sys$WebForms$PageRequestManager$_validPosition(position) {
return (typeof(position) !== "undefined") && (position !== null) && (position !== 0);
}
Sys.WebForms.PageRequestManager.prototype = {
_get_eventHandlerList: Sys$WebForms$PageRequestManager$_get_eventHandlerList,
get_isInAsyncPostBack: Sys$WebForms$PageRequestManager$get_isInAsyncPostBack,
add_beginRequest: Sys$WebForms$PageRequestManager$add_beginRequest,
remove_beginRequest: Sys$WebForms$PageRequestManager$remove_beginRequest,
add_endRequest: Sys$WebForms$PageRequestManager$add_endRequest,
remove_endRequest: Sys$WebForms$PageRequestManager$remove_endRequest,
add_initializeRequest: Sys$WebForms$PageRequestManager$add_initializeRequest,
remove_initializeRequest: Sys$WebForms$PageRequestManager$remove_initializeRequest,
add_pageLoaded: Sys$WebForms$PageRequestManager$add_pageLoaded,
remove_pageLoaded: Sys$WebForms$PageRequestManager$remove_pageLoaded,
add_pageLoading: Sys$WebForms$PageRequestManager$add_pageLoading,
remove_pageLoading: Sys$WebForms$PageRequestManager$remove_pageLoading,
abortPostBack: Sys$WebForms$PageRequestManager$abortPostBack,
_cancelPendingCallbacks: Sys$WebForms$PageRequestManager$_cancelPendingCallbacks,
_createPageRequestManagerTimeoutError: Sys$WebForms$PageRequestManager$_createPageRequestManagerTimeoutError,
_createPageRequestManagerServerError: Sys$WebForms$PageRequestManager$_createPageRequestManagerServerError,
_createPageRequestManagerParserError: Sys$WebForms$PageRequestManager$_createPageRequestManagerParserError,
_createPostBackSettings: Sys$WebForms$PageRequestManager$_createPostBackSettings,
_convertToClientIDs: Sys$WebForms$PageRequestManager$_convertToClientIDs,
_destroyTree: Sys$WebForms$PageRequestManager$_destroyTree,
dispose: Sys$WebForms$PageRequestManager$dispose,
_doCallback: Sys$WebForms$PageRequestManager$_doCallback,
_doPostBack: Sys$WebForms$PageRequestManager$_doPostBack,
_doPostBackWithOptions: Sys$WebForms$PageRequestManager$_doPostBackWithOptions,
_elementContains: Sys$WebForms$PageRequestManager$_elementContains,
_endPostBack: Sys$WebForms$PageRequestManager$_endPostBack,
_findNearestElement: Sys$WebForms$PageRequestManager$_findNearestElement,
_findText: Sys$WebForms$PageRequestManager$_findText,
_fireDefaultButton: Sys$WebForms$PageRequestManager$_fireDefaultButton,
_getPageLoadedEventArgs: Sys$WebForms$PageRequestManager$_getPageLoadedEventArgs,
_getPageLoadingEventArgs: Sys$WebForms$PageRequestManager$_getPageLoadingEventArgs,
_getPostBackSettings: Sys$WebForms$PageRequestManager$_getPostBackSettings,
_getScrollPosition: Sys$WebForms$PageRequestManager$_getScrollPosition,
_initializeInternal: Sys$WebForms$PageRequestManager$_initializeInternal,
_matchesParentIDInList: Sys$WebForms$PageRequestManager$_matchesParentIDInList,
_onFormElementActive: Sys$WebForms$PageRequestManager$_onFormElementActive,
_onFormElementClick: Sys$WebForms$PageRequestManager$_onFormElementClick,
_onFormSubmit: Sys$WebForms$PageRequestManager$_onFormSubmit,
_onFormSubmitCompleted: Sys$WebForms$PageRequestManager$_onFormSubmitCompleted,
_onWindowUnload: Sys$WebForms$PageRequestManager$_onWindowUnload,
_pageLoaded: Sys$WebForms$PageRequestManager$_pageLoaded,
_pageLoadedInitialLoad: Sys$WebForms$PageRequestM
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -