//----------------------------------------------------------------------- // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------- // MicrosoftAjaxWebForms.js // Microsoft AJAX ASP.NET WebForms Framework. Type.registerNamespace('Sys.WebForms'); Sys.WebForms.BeginRequestEventArgs = function Sys$WebForms$BeginRequestEventArgs(request, postBackElement) { /// /// var e = Function._validateParams(arguments, [ {name: "request", type: Sys.Net.WebRequest}, {name: "postBackElement", domElement: true} ]); if (e) throw e; Sys.WebForms.BeginRequestEventArgs.initializeBase(this); this._request = request; this._postBackElement = postBackElement; } function Sys$WebForms$BeginRequestEventArgs$get_postBackElement() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._postBackElement; } function Sys$WebForms$BeginRequestEventArgs$get_request() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._request; } Sys.WebForms.BeginRequestEventArgs.prototype = { get_postBackElement: Sys$WebForms$BeginRequestEventArgs$get_postBackElement, get_request: Sys$WebForms$BeginRequestEventArgs$get_request } Sys.WebForms.BeginRequestEventArgs.registerClass('Sys.WebForms.BeginRequestEventArgs', Sys.EventArgs); Sys.WebForms.EndRequestEventArgs = function Sys$WebForms$EndRequestEventArgs(error, dataItems, response) { /// /// /// var e = Function._validateParams(arguments, [ {name: "error", type: Error, mayBeNull: true}, {name: "dataItems", type: Object, mayBeNull: true}, {name: "response", type: Sys.Net.WebRequestExecutor} ]); if (e) throw e; Sys.WebForms.EndRequestEventArgs.initializeBase(this); this._errorHandled = false; this._error = error; this._dataItems = dataItems || new Object(); this._response = response; } function Sys$WebForms$EndRequestEventArgs$get_dataItems() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._dataItems; } function Sys$WebForms$EndRequestEventArgs$get_error() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._error; } function Sys$WebForms$EndRequestEventArgs$get_errorHandled() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._errorHandled; } function Sys$WebForms$EndRequestEventArgs$set_errorHandled(value) { var e = Function._validateParams(arguments, [{name: "value", type: Boolean}]); if (e) throw e; this._errorHandled = value; } function Sys$WebForms$EndRequestEventArgs$get_response() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._response; } Sys.WebForms.EndRequestEventArgs.prototype = { get_dataItems: Sys$WebForms$EndRequestEventArgs$get_dataItems, get_error: Sys$WebForms$EndRequestEventArgs$get_error, get_errorHandled: Sys$WebForms$EndRequestEventArgs$get_errorHandled, set_errorHandled: Sys$WebForms$EndRequestEventArgs$set_errorHandled, get_response: Sys$WebForms$EndRequestEventArgs$get_response } Sys.WebForms.EndRequestEventArgs.registerClass('Sys.WebForms.EndRequestEventArgs', Sys.EventArgs); Sys.WebForms.InitializeRequestEventArgs = function Sys$WebForms$InitializeRequestEventArgs(request, postBackElement) { /// /// var e = Function._validateParams(arguments, [ {name: "request", type: Sys.Net.WebRequest}, {name: "postBackElement", domElement: true} ]); if (e) throw e; Sys.WebForms.InitializeRequestEventArgs.initializeBase(this); this._request = request; this._postBackElement = postBackElement; } function Sys$WebForms$InitializeRequestEventArgs$get_postBackElement() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._postBackElement; } function Sys$WebForms$InitializeRequestEventArgs$get_request() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._request; } Sys.WebForms.InitializeRequestEventArgs.prototype = { get_postBackElement: Sys$WebForms$InitializeRequestEventArgs$get_postBackElement, get_request: Sys$WebForms$InitializeRequestEventArgs$get_request } Sys.WebForms.InitializeRequestEventArgs.registerClass('Sys.WebForms.InitializeRequestEventArgs', Sys.CancelEventArgs); Sys.WebForms.PageLoadedEventArgs = function Sys$WebForms$PageLoadedEventArgs(panelsUpdated, panelsCreated, dataItems) { /// /// /// var e = Function._validateParams(arguments, [ {name: "panelsUpdated", type: Array}, {name: "panelsCreated", type: Array}, {name: "dataItems", type: Object, mayBeNull: true} ]); if (e) throw e; Sys.WebForms.PageLoadedEventArgs.initializeBase(this); this._panelsUpdated = panelsUpdated; this._panelsCreated = panelsCreated; this._dataItems = dataItems || new Object(); } function Sys$WebForms$PageLoadedEventArgs$get_dataItems() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._dataItems; } function Sys$WebForms$PageLoadedEventArgs$get_panelsCreated() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._panelsCreated; } function Sys$WebForms$PageLoadedEventArgs$get_panelsUpdated() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._panelsUpdated; } Sys.WebForms.PageLoadedEventArgs.prototype = { get_dataItems: Sys$WebForms$PageLoadedEventArgs$get_dataItems, get_panelsCreated: Sys$WebForms$PageLoadedEventArgs$get_panelsCreated, get_panelsUpdated: Sys$WebForms$PageLoadedEventArgs$get_panelsUpdated } Sys.WebForms.PageLoadedEventArgs.registerClass('Sys.WebForms.PageLoadedEventArgs', Sys.EventArgs); Sys.WebForms.PageLoadingEventArgs = function Sys$WebForms$PageLoadingEventArgs(panelsUpdating, panelsDeleting, dataItems) { /// /// /// var e = Function._validateParams(arguments, [ {name: "panelsUpdating", type: Array}, {name: "panelsDeleting", type: Array}, {name: "dataItems", type: Object, mayBeNull: true} ]); if (e) throw e; Sys.WebForms.PageLoadingEventArgs.initializeBase(this); this._panelsUpdating = panelsUpdating; this._panelsDeleting = panelsDeleting; this._dataItems = dataItems || new Object(); } function Sys$WebForms$PageLoadingEventArgs$get_dataItems() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._dataItems; } function Sys$WebForms$PageLoadingEventArgs$get_panelsDeleting() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._panelsDeleting; } function Sys$WebForms$PageLoadingEventArgs$get_panelsUpdating() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._panelsUpdating; } Sys.WebForms.PageLoadingEventArgs.prototype = { get_dataItems: Sys$WebForms$PageLoadingEventArgs$get_dataItems, get_panelsDeleting: Sys$WebForms$PageLoadingEventArgs$get_panelsDeleting, get_panelsUpdating: Sys$WebForms$PageLoadingEventArgs$get_panelsUpdating } Sys.WebForms.PageLoadingEventArgs.registerClass('Sys.WebForms.PageLoadingEventArgs', Sys.EventArgs); Sys.WebForms.PageRequestManager = function Sys$WebForms$PageRequestManager() { this._form = null; this._updatePanelIDs = null; this._updatePanelClientIDs = null; this._oldUpdatePanelIDs = null; this._childUpdatePanelIDs = null; this._panelsToRefreshIDs = null; this._updatePanelHasChildrenAsTriggers = null; this._asyncPostBackControlIDs = null; this._asyncPostBackControlClientIDs = null; this._postBackControlIDs = null; this._postBackControlClientIDs = null; this._scriptManagerID = null; this._pageLoadedHandler = null; this._additionalInput = null; this._onsubmit = null; this._onSubmitStatements = []; this._originalDoPostBack = null; this._postBackSettings = null; this._request = null; this._onFormSubmitHandler = null; this._onFormElementClickHandler = null; this._onWindowUnloadHandler = null; this._asyncPostBackTimeout = null; this._controlIDToFocus = null; this._scrollPosition = null; this._dataItems = null; this._response = null; this._processingRequest = false; this._scriptDisposes = {}; } function Sys$WebForms$PageRequestManager$_get_eventHandlerList() { if (!this._events) { this._events = new Sys.EventHandlerList(); } return this._events; } function Sys$WebForms$PageRequestManager$get_isInAsyncPostBack() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._request !== null; } function Sys$WebForms$PageRequestManager$add_beginRequest(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("beginRequest", handler); } function Sys$WebForms$PageRequestManager$remove_beginRequest(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("beginRequest", handler); } function Sys$WebForms$PageRequestManager$add_endRequest(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("endRequest", handler); } function Sys$WebForms$PageRequestManager$remove_endRequest(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("endRequest", handler); } function Sys$WebForms$PageRequestManager$add_initializeRequest(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("initializeRequest", handler); } function Sys$WebForms$PageRequestManager$remove_initializeRequest(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("initializeRequest", handler); } function Sys$WebForms$PageRequestManager$add_pageLoaded(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("pageLoaded", handler); } function Sys$WebForms$PageRequestManager$remove_pageLoaded(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("pageLoaded", handler); } function Sys$WebForms$PageRequestManager$add_pageLoading(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("pageLoading", handler); } function Sys$WebForms$PageRequestManager$remove_pageLoading(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("pageLoading", handler); } function Sys$WebForms$PageRequestManager$abortPostBack() { if (!this._processingRequest && this._request) { this._request.get_executor().abort(); this._request = null; } } function Sys$WebForms$PageRequestManager$_createPageRequestManagerTimeoutError() { var displayMessage = "Sys.WebForms.PageRequestManagerTimeoutException: " + Sys.WebForms.Res.PRM_TimeoutError; var e = Error.create(displayMessage, {name: 'Sys.WebForms.PageRequestManagerTimeoutException'}); e.popStackFrame(); return e; } function Sys$WebForms$PageRequestManager$_createPageRequestManagerServerError(httpStatusCode, message) { var displayMessage = message || ("Sys.WebForms.PageRequestManagerServerErrorException: " + String.format(Sys.WebForms.Res.PRM_ServerError, httpStatusCode)); var e = Error.create(displayMessage, { name: 'Sys.WebForms.PageRequestManagerServerErrorException', httpStatusCode: httpStatusCode }); e.popStackFrame(); return e; } function Sys$WebForms$PageRequestManager$_createPageRequestManagerParserError(parserErrorMessage) { var displayMessage = "Sys.WebForms.PageRequestManagerParserErrorException: " + String.format(Sys.WebForms.Res.PRM_ParserError, parserErrorMessage); var e = Error.create(displayMessage, {name: 'Sys.WebForms.PageRequestManagerParserErrorException'}); e.popStackFrame(); return e; } function Sys$WebForms$PageRequestManager$_createPostBackSettings(async, panelID, sourceElement) { return { async:async, panelID:panelID, sourceElement:sourceElement }; } function Sys$WebForms$PageRequestManager$_convertToClientIDs(source, destinationIDs, destinationClientIDs) { if (source) { for (var i = 0; i = 0; i--) { var node = childNodes[i]; if (node.nodeType === 1) { if (node.dispose && typeof(node.dispose) === "function") { node.dispose(); } else if (node.control && typeof(node.control.dispose) === "function") { node.control.dispose(); } var behaviors = Sys.UI.Behavior.getBehaviors(node); for (var j = behaviors.length - 1; j >= 0; j--) { behaviors[j].dispose(); } this._destroyTree(node); } } } } function Sys$WebForms$PageRequestManager$dispose() { if (this._form) { Sys.UI.DomEvent.removeHandler(this._form, 'submit', this._onFormSubmitHandler); Sys.UI.DomEvent.removeHandler(this._form, 'click', this._onFormElementClickHandler); Sys.UI.DomEvent.removeHandler(window, 'unload', this._onWindowUnloadHandler); Sys.UI.DomEvent.removeHandler(window, 'load', this._pageLoadedHandler); } if (this._originalDoPostBack) { window.__doPostBack = this._originalDoPostBack; this._originalDoPostBack = null; } this._form = null; this._updatePanelIDs = null; this._oldUpdatePanelIDs = null; this._childUpdatePanelIDs = null; this._updatePanelClientIDs = null; this._asyncPostBackControlIDs = null; this._asyncPostBackControlClientIDs = null; this._postBackControlIDs = null; this._postBackControlClientIDs = null; this._asyncPostBackTimeout = null; this._scrollPosition = null; this._dataItems = null; } function Sys$WebForms$PageRequestManager$_doPostBack(eventTarget, eventArgument) { this._additionalInput = null; var form = this._form; if (form.action !== form._initialAction) { this._postBackSettings = this._createPostBackSettings(false, null, null); } else { var clientID = this._uniqueIDToClientID(eventTarget); var postBackElement = document.getElementById(clientID); if (!postBackElement) { if (Array.contains(this._asyncPostBackControlIDs, eventTarget)) { this._postBackSettings = this._createPostBackSettings(true, this._scriptManagerID + '|' + eventTarget, null); } else { if (Array.contains(this._postBackControlIDs, eventTarget)) { this._postBackSettings = this._createPostBackSettings(false, null, null); } else { var nearestUniqueIDMatch = this._findNearestElement(eventTarget); if (nearestUniqueIDMatch) { this._postBackSettings = this._getPostBackSettings(nearestUniqueIDMatch, eventTarget); } else { this._postBackSettings = this._createPostBackSettings(false, null, null); } } } } else { this._postBackSettings = this._getPostBackSettings(postBackElement, eventTarget); } } if (!this._postBackSettings.async) { form.onsubmit = this._onsubmit; this._originalDoPostBack(eventTarget, eventArgument); form.onsubmit = null; return; } form.__EVENTTARGET.value = eventTarget; form.__EVENTARGUMENT.value = eventArgument; this._onFormSubmit(); } function Sys$WebForms$PageRequestManager$_elementContains(container, element) { while (element) { if (element === container) { return true; } element = element.parentNode; } return false; } function Sys$WebForms$PageRequestManager$_endPostBack(error, response) { this._processingRequest = false; this._request = null; this._additionalInput = null; var handler = this._get_eventHandlerList().getHandler("endRequest"); var errorHandled = false; if (handler) { var eventArgs = new Sys.WebForms.EndRequestEventArgs(error, this._dataItems, response); handler(this, eventArgs); errorHandled = eventArgs.get_errorHandled(); } this._dataItems = null; if (error && !errorHandled) { alert(error.message); } } function Sys$WebForms$PageRequestManager$_findNearestElement(uniqueID) { while (uniqueID.length > 0) { var clientID = this._uniqueIDToClientID(uniqueID); var element = document.getElementById(clientID); if (element) { return element; } var indexOfLastDollar = uniqueID.lastIndexOf('$'); if (indexOfLastDollar === -1) { return null; } uniqueID = uniqueID.substring(0, indexOfLastDollar); } return null; } function Sys$WebForms$PageRequestManager$_findText(text, location) { var startIndex = Math.max(0, location - 20); var endIndex = Math.min(text.length, location + 20); return text.substring(startIndex, endIndex); } function Sys$WebForms$PageRequestManager$_getPageLoadedEventArgs(initialLoad) { var updated = []; var created = []; var oldIDs = this._oldUpdatePanelIDs || []; var newIDs = this._updatePanelIDs; var childIDs = this._childUpdatePanelIDs || []; var refreshedIDs = this._panelsToRefreshIDs || []; for (var i = 0; i -1)) { Array.add(deleted, document.getElementById(this._uniqueIDToClientID(oldIDs[i]))); } } return new Sys.WebForms.PageLoadingEventArgs(updated, deleted, this._dataItems); } function Sys$WebForms$PageRequestManager$_getPostBackSettings(element, elementUniqueID) { var originalElement = element; var proposedSettings = null; while (element) { if (element.id) { if (!proposedSettings && Array.contains(this._asyncPostBackControlClientIDs, element.id)) { proposedSettings = this._createPostBackSettings(true, this._scriptManagerID + '|' + elementUniqueID, originalElement); } else { if (!proposedSettings && Array.contains(this._postBackControlClientIDs, element.id)) { return this._createPostBackSettings(false, null, null); } else { var indexOfPanel = Array.indexOf(this._updatePanelClientIDs, element.id); if (indexOfPanel !== -1) { if (this._updatePanelHasChildrenAsTriggers[indexOfPanel]) { return this._createPostBackSettings(true, this._updatePanelIDs[indexOfPanel] + '|' + elementUniqueID, originalElement); } else { return this._createPostBackSettings(true, this._scriptManagerID + '|' + elementUniqueID, originalElement); } } } } if (!proposedSettings && this._matchesParentIDInList(element.id, this._asyncPostBackControlClientIDs)) { proposedSettings = this._createPostBackSettings(true, this._scriptManagerID + '|' + elementUniqueID, originalElement); } else { if (!proposedSettings && this._matchesParentIDInList(element.id, this._postBackControlClientIDs)) { return this._createPostBackSettings(false, null, null); } } } element = element.parentNode; } if (!proposedSettings) { return this._createPostBackSettings(false, null, null); } else { return proposedSettings; } } function Sys$WebForms$PageRequestManager$_getScrollPosition() { var d = document.documentElement; if (d && (this._validPosition(d.scrollLeft) || this._validPosition(d.scrollTop))) { return { x: d.scrollLeft, y: d.scrollTop }; } else { d = document.body; if (d && (this._validPosition(d.scrollLeft) || this._validPosition(d.scrollTop))) { return { x: d.scrollLeft, y: d.scrollTop }; } else { if (this._validPosition(window.pageXOffset) || this._validPosition(window.pageYOffset)) { return { x: window.pageXOffset, y: window.pageYOffset }; } else { return { x: 0, y: 0 }; } } } } function Sys$WebForms$PageRequestManager$_initializeInternal(scriptManagerID, formElement) { this._scriptManagerID = scriptManagerID; this._form = formElement; this._form._initialAction = this._form.action; this._onsubmit = this._form.onsubmit; this._form.onsubmit = null; this._onFormSubmitHandler = Function.createDelegate(this, this._onFormSubmit); this._onFormElementClickHandler = Function.createDelegate(this, this._onFormElementClick); this._onWindowUnloadHandler = Function.createDelegate(this, this._onWindowUnload); Sys.UI.DomEvent.addHandler(this._form, 'submit', this._onFormSubmitHandler); Sys.UI.DomEvent.addHandler(this._form, 'click', this._onFormElementClickHandler); Sys.UI.DomEvent.addHandler(window, 'unload', this._onWindowUnloadHandler); this._originalDoPostBack = window.__doPostBack; if (this._originalDoPostBack) { window.__doPostBack = Function.createDelegate(this, this._doPostBack); } this._pageLoadedHandler = Function.createDelegate(this, this._pageLoadedInitialLoad); Sys.UI.DomEvent.addHandler(window, 'load', this._pageLoadedHandler); } function Sys$WebForms$PageRequestManager$_matchesParentIDInList(clientID, parentIDList) { for (var i = 0; i = reply.length) { parserErrorDetails = this._findText(reply, reply.length); break; } content = this._decodeString(reply.substr(replyIndex, len)); replyIndex += len; if (reply.charAt(replyIndex) !== delimitByLengthDelimiter) { parserErrorDetails = this._findText(reply, replyIndex); break; } replyIndex++; Array.add(delta, {type: type, id: id, content: content}); } if (parserErrorDetails) { this._endPostBack(this._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_ParserErrorDetails, parserErrorDetails)), sender); return; } var updatePanelNodes = []; var hiddenFieldNodes = []; var arrayDeclarationNodes = []; var scriptBlockNodes = []; var expandoNodes = []; var onSubmitNodes = []; var dataItemNodes = []; var dataItemJsonNodes = []; var scriptDisposeNodes = []; var asyncPostBackControlIDsNode, postBackControlIDsNode, updatePanelIDsNode, asyncPostBackTimeoutNode, childUpdatePanelIDsNode, panelsToRefreshNode, formActionNode; for (var i = 0; i if (arguments.length !== 0) throw Error.parameterCount(); return Sys.WebForms.PageRequestManager._instance || null; } Sys.WebForms.PageRequestManager._addArrayElement = function Sys$WebForms$PageRequestManager$_addArrayElement(arrayName, arrayValue) { if (typeof(window[arrayName]) === "undefined") { window[arrayName] = [ arrayValue ]; } else { Array.add(window[arrayName], arrayValue); } } Sys.WebForms.PageRequestManager._initialize = function Sys$WebForms$PageRequestManager$_initialize(scriptManagerID, formElement) { if (Sys.WebForms.PageRequestManager.getInstance()) { throw Error.invalidOperation(Sys.WebForms.Res.PRM_CannotRegisterTwice); } Sys.WebForms.PageRequestManager._instance = new Sys.WebForms.PageRequestManager(); Sys.WebForms.PageRequestManager.getInstance()._initializeInternal(scriptManagerID, formElement); } Sys.WebForms.PageRequestManager.registerClass('Sys.WebForms.PageRequestManager'); Sys.UI._UpdateProgress = function Sys$UI$_UpdateProgress(element) { Sys.UI._UpdateProgress.initializeBase(this,[element]); this._displayAfter = 500; this._dynamicLayout = true; this._associatedUpdatePanelId = null; this._beginRequestHandlerDelegate = null; this._startDelegate = null; this._endRequestHandlerDelegate = null; this._pageRequestManager = null; this._timerCookie = null; } function Sys$UI$_UpdateProgress$get_displayAfter() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._displayAfter; } function Sys$UI$_UpdateProgress$set_displayAfter(value) { var e = Function._validateParams(arguments, [{name: "value", type: Number}]); if (e) throw e; this._displayAfter = value; } function Sys$UI$_UpdateProgress$get_dynamicLayout() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._dynamicLayout; } function Sys$UI$_UpdateProgress$set_dynamicLayout(value) { var e = Function._validateParams(arguments, [{name: "value", type: Boolean}]); if (e) throw e; this._dynamicLayout = value; } function Sys$UI$_UpdateProgress$get_associatedUpdatePanelId() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._associatedUpdatePanelId; } function Sys$UI$_UpdateProgress$set_associatedUpdatePanelId(value) { var e = Function._validateParams(arguments, [{name: "value", type: String, mayBeNull: true}]); if (e) throw e; this._associatedUpdatePanelId = value; } function Sys$UI$_UpdateProgress$_handleBeginRequest(sender, arg) { var curElem = arg.get_postBackElement(); var showProgress = !this._associatedUpdatePanelId; while (!showProgress && curElem) { if (curElem.id && this._associatedUpdatePanelId === curElem.id) { showProgress = true; } curElem = curElem.parentNode; } if (showProgress) { this._timerCookie = window.setTimeout(this._startDelegate, this._displayAfter); } } function Sys$UI$_UpdateProgress$_startRequest() { if (this._pageRequestManager.get_isInAsyncPostBack()) { if (this._dynamicLayout) this.get_element().style.display = 'block'; else this.get_element().style.visibility = 'visible'; } this._timerCookie = null; } function Sys$UI$_UpdateProgress$_handleEndRequest(sender, arg) { if (this._dynamicLayout) this.get_element().style.display = 'none'; else this.get_element().style.visibility = 'hidden'; if (this._timerCookie) { window.clearTimeout(this._timerCookie); this._timerCookie = null; } } function Sys$UI$_UpdateProgress$dispose() { if (this._pageRequestManager !== null) { this._pageRequestManager.remove_beginRequest(this._beginRequestHandlerDelegate); this._pageRequestManager.remove_endRequest(this._endRequestHandlerDelegate); } Sys.UI._UpdateProgress.callBaseMethod(this,"dispose"); } function Sys$UI$_UpdateProgress$initialize() { Sys.UI._UpdateProgress.callBaseMethod(this, 'initialize'); this._beginRequestHandlerDelegate = Function.createDelegate(this, this._handleBeginRequest); this._endRequestHandlerDelegate = Function.createDelegate(this, this._handleEndRequest); this._startDelegate = Function.createDelegate(this, this._startRequest); if (Sys.WebForms && Sys.WebForms.PageRequestManager) { this._pageRequestManager = Sys.WebForms.PageRequestManager.getInstance(); } if (this._pageRequestManager !== null ) { this._pageRequestManager.add_beginRequest(this._beginRequestHandlerDelegate); this._pageRequestManager.add_endRequest(this._endRequestHandlerDelegate); } } Sys.UI._UpdateProgress.prototype = { get_displayAfter: Sys$UI$_UpdateProgress$get_displayAfter, set_displayAfter: Sys$UI$_UpdateProgress$set_displayAfter, get_dynamicLayout: Sys$UI$_UpdateProgress$get_dynamicLayout, set_dynamicLayout: Sys$UI$_UpdateProgress$set_dynamicLayout, get_associatedUpdatePanelId: Sys$UI$_UpdateProgress$get_associatedUpdatePanelId, set_associatedUpdatePanelId: Sys$UI$_UpdateProgress$set_associatedUpdatePanelId, _handleBeginRequest: Sys$UI$_UpdateProgress$_handleBeginRequest, _startRequest: Sys$UI$_UpdateProgress$_startRequest, _handleEndRequest: Sys$UI$_UpdateProgress$_handleEndRequest, dispose: Sys$UI$_UpdateProgress$dispose, initialize: Sys$UI$_UpdateProgress$initialize } Sys.UI._UpdateProgress.registerClass('Sys.UI._UpdateProgress', Sys.UI.Control); Type.registerNamespace('Sys.WebForms'); Sys.WebForms.Res={ "PRM_MissingPanel":"Could not find UpdatePanel with ID \u0027{0}\u0027. If it is being updated dynamically then it must be inside another UpdatePanel.", "PRM_ServerError":"An unknown error occurred while processing the request on the server. The status code returned from the server was: {0}", "PRM_ParserError":"The message received from the server could not be parsed.", "PRM_TimeoutError":"The server request timed out.", "PRM_CannotRegisterTwice":"The PageRequestManager cannot be initialized more than once.", "PRM_UnknownToken":"Unknown token: \u0027{0}\u0027.", "PRM_MissingPanel":"Could not find UpdatePanel with ID \u0027{0}\u0027. If it is being updated dynamically then it must be inside another UpdatePanel.", "PRM_ServerError":"An unknown error occurred while processing the request on the server. The status code returned from the server was: {0}", "PRM_ParserError":"The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.\r\nDetails: {0}", "PRM_TimeoutError":"The server request timed out.", "PRM_ParserErrorDetails":"Error parsing near \u0027{0}\u0027.", "PRM_CannotRegisterTwice":"The PageRequestManager cannot be initialized more than once." }; if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();