/// Type.registerNamespace("Aist.Web.UI"); Aist.Web.UI.AjaxProgress = function(element) { this._updatePanelIds = []; this._triggers = []; this._showOverControlId = ""; this._nowOverControlId = ""; this._timeout = 1000; this._beginRequestHandler = null; this._endRequestHandler = null; this._resizeHandler = null; Aist.Web.UI.AjaxProgress.initializeBase(this, [element]); } Aist.Web.UI.AjaxProgress.prototype = { get_updatePanelIds : function() { return this._updatePanelIds; }, set_updatePanelIds : function(value) { this._updatePanelIds = value; }, get_triggers : function() { return this._triggers; }, set_triggers : function(value) { this._triggers = value; }, get_showOverControlId : function() { return this._showOverControlId; }, set_showOverControlId : function(value) { this._showOverControlId = value; }, initialize: function() { Aist.Web.UI.AjaxProgress.callBaseMethod(this, 'initialize'); this._beginRequestHandler = Function.createDelegate(this, this._onBeginRequest); this._endRequestHandler = Function.createDelegate(this, this.hide); this._resizeHandler = Function.createDelegate(this, this._updatePosition); Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(this._beginRequestHandler); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(this._endRequestHandler) }, dispose: function() { Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(this._beginRequestHandler); Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler) Aist.Web.UI.AjaxProgress.callBaseMethod(this, 'dispose'); }, show: function(overControlId) { this._nowOverControlId = overControlId; this._updatePosition(); $addHandler(window, "resize", this._resizeHandler); }, hide: function() { try { $removeHandler(window, "resize", this._resizeHandler); } catch (err) { } this.get_element().style.display = "none"; }, _updatePosition: function() { var e = this.get_element(); var over = $get(this._nowOverControlId); if (e != undefined && over != null) { var left = over.offsetLeft; var top = over.offsetTop; var parent = over.offsetParent; while (parent != null) { left += parent.offsetLeft; top += parent.offsetTop; parent = parent.offsetParent; } e.style.width = over.offsetWidth + "px"; e.style.height = over.offsetHeight + "px"; e.style.left = left + "px"; e.style.top = top + "px"; e.style.display = ""; } }, _onBeginRequest: function(sender, args) { var panelId = this._getUpdatingPanelId(); var source = args.get_postBackElement(); if (panelId != null || source != null) { var sourceId = source.id; var isShow = this._updatePanelIds == null || this._updatePanelIds.length == 0; if (!isShow) { for (var i=0; i