|
Adam,
I had same problem your code has done the trick. Great control and great bit of community support.
Pat on the backs all round
Ismail Mayat
|
|
|
|
|
Hi Everyone,
I'm encountering the same problem, and would like to update the attachPopup and detachPopup functions as Adam describes above, but I can't find the ScriptResource.axd file on my machine. Or is there a different file that I should be updating?
Thanks.
Jamie
amiller12 wrote: This control is great. I've been having the same problems here, and so I took this idea along with another idea from the next post and came up with this (I added 3 lines:
function Sys$UI$_ModalUpdateProgress$_attachPopup() {
if (this._windowHandlersAttached) // added
return; // added
if (!this._scrollHandler)
{
this._scrollHandler = Function.createDelegate(this, this._onLayout);
}
if (!this._resizeHandler)
{
this._resizeHandler = Function.createDelegate(this, this._onLayout);
}
$addHandler(window, 'resize', this._resizeHandler);
$addHandler(window, 'scroll', this._scrollHandler);
this._windowHandlersAttached = true;
}
function Sys$UI$_ModalUpdateProgress$_detachPopup() {
if (this._windowHandlersAttached) {
if (this._scrollHandler) {
$removeHandler(window, 'scroll', this._scrollHandler);
}
if (this._resizeHandler) {
$removeHandler(window, 'resize', this._resizeHandler);
}
this._windowHandlersAttached = false; // Added
}
}
It seems to be calling these methods twice from some timer in the beginning of the code. I don't really know if this is a good fix, but it works better for me now. I imagine the REAL fix is to not make it call these functions twice... Just wanted to pass this on -
Adam
|
|
|
|
|
I have been able to fix my error. I wasn't able to figure out where to code the javascript changes, but I noticed that if I go into the web.config file, and set the compilation element's debug attribute to false, everything works fine.
|
|
|
|
|
Works!
|
|
|
|
|
If you add a nice fade-in effect the result is excellent. I did this myself but I can't make it work in IE, only FireFox... Anyone else that has tried that?
|
|
|
|
|
Many thanks !!!
Carlo Bertini [WaYdotNET]
|
|
|
|
|
Just a heads-up.
An updated version of the ModalUpdateProgress will come soon. It will be a standalone ajax control (not a control toolkit) with source code available.
|
|
|
|
|
This is the updated version.
|
|
|
|
|
I've tried your control with ASP.NET AJAX RC1 and I couldn't make it working...
I've added the "ModalUpdateProgress.dll" from the file ModalUpdateProgress.zip in my Bin directory, Added a reference to this library in my web.config, but it's not recognized.
<add tagPrefix="atlas" namespace="ModalUpdateProgress" assembly="ModalUpdateProgress"/>
The same thing happens if I register de dll inside my page instead of inside the web.config
<%@ Register Assembly="ModalUpdateProgress" Namespace="ModalUpdateProgress" TagPrefix="atlas" %>
The error is "Unknown Server Tag "atlas:ModalUpdateProgress".
If I Change the tag prefix it's exactly the same...
So Is this a bug or am I doing something wrong?
|
|
|
|
|
Yeah.
I'm waiting for an RC 1 version as well.
Any idea when you'll release this?
Great control by the way!!!
Thanks.
|
|
|
|
|
The download zip was not updated to the latest. I have made the request to publish the new zip. Please check back sometime later.
|
|
|
|
|
Any clue on when the latest version of this might be out?
|
|
|
|
|
The current download is the latest.
|
|
|
|
|
I have recompiled that beta2 code for modalupdaeprogress,but i got an error about canceling.Cancel button produce a page refresh,thus ajax is no more useful here.
Please help me!
MABOCHE ®
|
|
|
|
|
Finally ! I got the right code. Here is ;
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.
Type.registerNamespace('AjaxControlToolkit');
AjaxControlToolkit.ModalUpdateProgressBehavior = function(element) {
AjaxControlToolkit.ModalUpdateProgressBehavior.initializeBase(this, [element]);
//
// Variables
//
// Properties
this._BackgroundCssClass = null;
this._DropShadow = false;
this._CancelControlID = null;
this._DisplayAfter = 500;
this._AssociatedUpdatePanelID = null;
// Variables
this._backgroundElement = null;
this._foregroundElement = null;
this._cancelHandler = null;
this._scrollHandler = null;
this._resizeHandler = null;
this._windowHandlersAttached = false;
this._beginRequestHandlerDelegate = null;
this._startDelegate = null;
this._endRequestHandlerDelegate = null;
this._pageRequestManager = null;
this._timerCookie = null;
this._dropShadowBehavior = null;
this._saveTabIndexes = new Array();
this._saveDisableSelect = new Array();
this._tagWithTabIndex = new Array('A','AREA','BUTTON','INPUT','OBJECT','SELECT','TEXTAREA','IFRAME');
}
AjaxControlToolkit.ModalUpdateProgressBehavior.prototype = {
//
// Overrides
//
initialize : function() {
AjaxControlToolkit.ModalUpdateProgressBehavior.callBaseMethod(this, 'initialize');
this._foregroundElement = this.get_element();
this._backgroundElement = document.createElement('div');
this._backgroundElement.style.display = 'none';
this._backgroundElement.style.position = 'absolute';
// Want zIndex to big enough that the background sits above everything else
// CSS 2.1 defines no bounds for the <integer> type, so pick arbitrarily
this._backgroundElement.style.zIndex = 100000;
if (this._BackgroundCssClass) {
this._backgroundElement.className = this._BackgroundCssClass;
}
this._foregroundElement.parentNode.appendChild(this._backgroundElement);
this._foregroundElement.style.display = 'none';
this._foregroundElement.style.position = 'absolute';
this._foregroundElement.style.zIndex = CommonToolkitScripts.getCurrentStyle(this._backgroundElement, 'zIndex', this._backgroundElement.style.zIndex) + 1;
if (this._CancelControlID) {
this._cancelHandler = Function.createDelegate(this, this._onCancel);
$addHandler($get(this._CancelControlID), 'click', this._cancelHandler);
}
this._scrollHandler = Function.createDelegate(this, this._onLayout);
this._resizeHandler = Function.createDelegate(this, this._onLayout);
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);
}
// Need to know when partial updates complete
this.registerPartialUpdateEvents();
},
dispose : function() {
if (this._dropShadowBehavior) {
this._detachPopup();
}
this._scrollHandler = null;
this._resizeHandler = null;
if (this._cancelHandler && $get(this._CancelControlID)) {
$removeHandler($get(this._CancelControlID), 'click', this._cancelHandler);
this._cancelHandler = null;
}
if (this._pageRequestManager !== null) {
this._pageRequestManager.remove_beginRequest(this._beginRequestHandlerDelegate);
this._pageRequestManager.remove_endRequest(this._endRequestHandlerDelegate);
}
AjaxControlToolkit.ModalUpdateProgressBehavior.callBaseMethod(this, 'dispose');
},
//
// Custom methods
//
_handleBeginRequest : function(sender, arg) {
var curElem = arg.get_postBackElement();
var showProgress = true;
// 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);
}
},
_startRequest : function() {
if (this._pageRequestManager.get_isInAsyncPostBack()) {
this.show();
}
this._timerCookie = null;
},
_handleEndRequest : function(sender, arg) {
this.hide();
if (this._timerCookie) {
window.clearTimeout(this._timerCookie);
this._timerCookie = null;
}
},
_attachPopup : function() {
if (this._DropShadow && !this._dropShadowBehavior) {
this._dropShadowBehavior = $create(AjaxControlToolkit.DropShadowBehavior, {}, null, null, this._foregroundElement);
}
$addHandler(window, 'resize', this._resizeHandler);
$addHandler(window, 'scroll', this._scrollHandler);
this._windowHandlersAttached = true;
},
_detachPopup : function() {
if (this._windowHandlersAttached) {
if (this._scrollHandler) {
$removeHandler(window, 'scroll', this._scrollHandler);
}
if (this._resizeHandler) {
$removeHandler(window, 'resize', this._resizeHandler);
}
this._windowHandlersAttached = false;
}
if (this._dropShadowBehavior) {
this._dropShadowBehavior.dispose();
this._dropShadowBehavior = null;
}
},
_onCancel : function(e) {
var element = $get(this._CancelControlID);
if (element && !element.disabled) {
if (this._pageRequestManager !== null) {
this._pageRequestManager.abortPostBack();
}
this.hide();
e.preventDefault();
return false;
}
},
_onLayout : function() {
this._layout();
},
show : function() {
AjaxControlToolkit.ModalUpdateProgressBehavior.callBaseMethod(this, 'populate');
this._attachPopup();
this._backgroundElement.style.display = '';
this._foregroundElement.style.display = '';
// Disable TAB
this.disableTab();
this._layout();
// On pages that don't need scrollbars, Firefox and Safari act like
// one or both are present the first time the layout code runs which
// obviously leads to display issues - run the layout code a second
// time to work around this problem
this._layout();
},
disableTab : function() {
var i = 0;
var tagElements;
var tagElementsInPopUp = new Array();
Array.clear(this._saveTabIndexes);
//Save all popup's tag in tagElementsInPopUp
for (var j = 0; j < this._tagWithTabIndex.length; j++) {
tagElements = this._foregroundElement.getElementsByTagName(this._tagWithTabIndex[j]);
for (var k = 0 ; k < tagElements.length; k++) {
tagElementsInPopUp[i] = tagElements[k];
i++;
}
}
i = 0;
for (var j = 0; j < this._tagWithTabIndex.length; j++) {
tagElements = document.getElementsByTagName(this._tagWithTabIndex[j]);
for (var k = 0 ; k < tagElements.length; k++) {
if (Array.indexOf(tagElementsInPopUp, tagElements[k]) == -1) {
this._saveTabIndexes[i] = {tag: tagElements[k], index: tagElements[k].tabIndex};
tagElements[k].tabIndex="-1";
i++;
}
}
}
//IE6 Bug with SELECT element always showing up on top
i = 0;
if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && (Sys.Browser.version < 7)) {
//Save SELECT in PopUp
var tagSelectInPopUp = new Array();
tagElements = this._foregroundElement.getElementsByTagName('SELECT');
for (var k = 0 ; k < tagElements.length; k++) {
tagSelectInPopUp[i] = tagElements[k];
i++;
}
i = 0;
Array.clear(this._saveDisableSelect);
tagElements = document.getElementsByTagName('SELECT');
for (var k = 0 ; k < tagElements.length; k++) {
if (Array.indexOf(tagSelectInPopUp, tagElements[k]) == -1) {
this._saveDisableSelect[i] = {tag: tagElements[k], visib: CommonToolkitScripts.getCurrentStyle(tagElements[k], 'visibility')} ;
tagElements[k].style.visibility = 'hidden';
i++;
}
}
}
},
restoreTab : function() {
for (var i = 0; i < this._saveTabIndexes.length; i++) {
this._saveTabIndexes[i].tag.tabIndex = this._saveTabIndexes[i].index;
}
//IE6 Bug with SELECT element always showing up on top
if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && (Sys.Browser.version < 7)) {
for (var k = 0 ; k < this._saveDisableSelect.length; k++) {
this._saveDisableSelect[k].tag.style.visibility = this._saveDisableSelect[k].visib;
}
}
},
hide : function() {
this._backgroundElement.style.display = 'none';
this._foregroundElement.style.display = 'none';
this.restoreTab();
this._detachPopup();
},
_layout : function() {
var scrollLeft = (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
var scrollTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
var clientWidth;
if (window.innerWidth) {
clientWidth = ((Sys.Browser.agent === Sys.Browser.Safari) ? window.innerWidth : Math.min(window.innerWidth, document.documentElement.clientWidth));
} else {
clientWidth = document.documentElement.clientWidth;
}
var clientHeight;
if (window.innerHeight) {
clientHeight = ((Sys.Browser.agent === Sys.Browser.Safari) ? window.innerHeight : Math.min(window.innerHeight, document.documentElement.clientHeight));
} else {
clientHeight = document.documentElement.clientHeight;
}
this._backgroundElement.style.left = scrollLeft+'px';
this._backgroundElement.style.top = scrollTop+'px';
this._backgroundElement.style.width = clientWidth+'px';
this._backgroundElement.style.height = clientHeight+'px';
this._foregroundElement.style.left = scrollLeft+((clientWidth-this._foregroundElement.offsetWidth)/2)+'px';
this._foregroundElement.style.top = scrollTop+((clientHeight-this._foregroundElement.offsetHeight)/2)+'px';
if (this._dropShadowBehavior) {
this._dropShadowBehavior.setShadow();
window.setTimeout(Function.createDelegate(this, this._fixupDropShadowBehavior), 0);
}
},
// Some browsers don't update the location values immediately, so
// the location of the drop shadow would always be a step behind
// without this method
_fixupDropShadowBehavior : function() {
if (this._dropShadowBehavior) {
this._dropShadowBehavior.setShadow();
}
},
//
// Property get/set methods
//
get_BackgroundCssClass : function() {
return this._BackgroundCssClass;
},
set_BackgroundCssClass : function(value) {
if (this._BackgroundCssClass != value) {
this._BackgroundCssClass = value;
this.raisePropertyChanged('BackgroundCssClass');
}
},
get_DropShadow : function() {
return this._DropShadow;
},
set_DropShadow : function(value) {
if (this._DropShadow != value) {
this._DropShadow = value;
this.raisePropertyChanged('DropShadow');
}
},
get_CancelControlID : function() {
return this._CancelControlID;
},
set_CancelControlID : function(value) {
if (this._CancelControlID != value) {
this._CancelControlID = value;
this.raisePropertyChanged('CancelControlID');
}
},
get_DisplayAfter : function() {
return this._DisplayAfter;
},
set_DisplayAfter : function(value) {
/*var e = Function._validateParams(arguments, [{name: "value", type: Number}]);
if (e) throw e;*/
if (this._DisplayAfter != value) {
this._DisplayAfter = value;
this.raisePropertyChanged('DisplayAfter');
}
}
/*,
get_AssociatedUpdatePanelID : function() {
return this._AssociatedUpdatePanelID;
},
set_AssociatedUpdatePanelID : function(value) {
var e = Function._validateParams(arguments, [{name: "value", type: String, mayBeNull: true}]);
if (e) throw e;
if (this._AssociatedUpdatePanelID != value) {
this._AssociatedUpdatePanelID = value;
this.raisePropertyChanged('AssociatedUpdatePanelID');
}
}*/
}
AjaxControlToolkit.ModalUpdateProgressBehavior.registerClass('AjaxControlToolkit.ModalUpdateProgressBehavior', AjaxControlToolkit.DynamicPopulateBehaviorBase);
MABOCHE ®
|
|
|
|
|
Sorry it has a problem that i cannot solve. (
MABOCHE ®
|
|
|
|
|
It is running without problem.Just i had a problem about my system,not the code.
So the code that i written before has no problem. You can run it on Ajax 1.0 RC.
Thanks.
MABOCHE ®
|
|
|
|
|
Hi,
I copied the two ModalUpdateProgress folders to the respective places. I am using VS 2005. Then I opened the AjaxControlToolkit.sln and could see the ModalUpdateProgress folder in the solution explorer. However, how do I compile so that I can use ModalUpdateProgress as part of the Control Toolkit. I tried bulding the solution but could not. I am not an expert so if someone can provide some detailed instructions, I shall appreciate it.
Thanks
|
|
|
|
|
Please try the updated version.
|
|
|
|
|
I've downloaded the file, ModalUpdateProgress.zip, unzipped it, and ran the SLN, even compiled it (had to remoge the tags in the web.config to compile), but I'm unsure what step to take next. How do I include it in my regular Toolkit?
|
|
|
|
|
The following is the js file which works in ajax beta 2, and you also need to comment out the AssociatedUpdatePanelID property in the extender class.
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.
Type.registerNamespace('AjaxControlToolkit');
AjaxControlToolkit.ModalUpdateProgressBehavior = function(element) {
AjaxControlToolkit.ModalUpdateProgressBehavior.initializeBase(this, [element]);
//
// Variables
//
// Properties
this._BackgroundCssClass = null;
this._DropShadow = false;
this._CancelControlID = null;
this._DisplayAfter = 500;
this._AssociatedUpdatePanelID = null;
// Variables
this._backgroundElement = null;
this._foregroundElement = null;
this._cancelHandler = null;
this._scrollHandler = null;
this._resizeHandler = null;
this._windowHandlersAttached = false;
this._beginRequestHandlerDelegate = null;
this._startDelegate = null;
this._endRequestHandlerDelegate = null;
this._pageRequestManager = null;
this._timerCookie = null;
this._dropShadowBehavior = null;
this._saveTabIndexes = new Array();
this._saveDisableSelect = new Array();
this._tagWithTabIndex = new Array('A','BUTTON','TEXTAREA','INPUT','IFRAME');
}
AjaxControlToolkit.ModalUpdateProgressBehavior.prototype = {
//
// Overrides
//
initialize : function() {
AjaxControlToolkit.ModalUpdateProgressBehavior.callBaseMethod(this, 'initialize');
this._foregroundElement = this.get_element();
this._backgroundElement = document.createElement('div');
this._backgroundElement.style.display = 'none';
this._backgroundElement.style.position = 'absolute';
// Want zIndex to big enough that the background sits above everything else
// CSS 2.1 defines no bounds for the <integer> type, so pick arbitrarily
this._backgroundElement.style.zIndex = 100000;
if (this._BackgroundCssClass) {
this._backgroundElement.className = this._BackgroundCssClass;
}
this._foregroundElement.parentNode.appendChild(this._backgroundElement);
this._foregroundElement.style.display = 'none';
this._foregroundElement.style.position = 'absolute';
this._foregroundElement.style.zIndex = CommonToolkitScripts.getCurrentStyle(this._backgroundElement, 'zIndex', this._backgroundElement.style.zIndex) + 1;
if (this._CancelControlID) {
this._cancelHandler = Function.createDelegate(this, this._onCancel);
$addHandler($get(this._CancelControlID), 'click', this._cancelHandler);
}
this._scrollHandler = Function.createDelegate(this, this._onLayout);
this._resizeHandler = Function.createDelegate(this, this._onLayout);
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);
}
},
dispose : function() {
if (this._dropShadowBehavior) {
this._detachPopup();
}
this._scrollHandler = null;
this._resizeHandler = null;
if (this._cancelHandler && $get(this._CancelControlID)) {
$removeHandler($get(this._CancelControlID), 'click', this._cancelHandler);
this._cancelHandler = null;
}
if (this._pageRequestManager !== null) {
this._pageRequestManager.remove_beginRequest(this._beginRequestHandlerDelegate);
this._pageRequestManager.remove_endRequest(this._endRequestHandlerDelegate);
}
AjaxControlToolkit.ModalUpdateProgressBehavior.callBaseMethod(this, 'dispose');
},
//
// Custom methods
//
_handleBeginRequest : function(sender, arg) {
var curElem = arg.get_postBackElement();
var showProgress = true;
// 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);
}
},
_startRequest : function() {
if (this._pageRequestManager.get_isInAsyncPostBack()) {
this.show();
}
this._timerCookie = null;
},
_handleEndRequest : function(sender, arg) {
this.hide();
if (this._timerCookie) {
window.clearTimeout(this._timerCookie);
this._timerCookie = null;
}
},
_attachPopup : function() {
if (this._DropShadow && !this._dropShadowBehavior) {
this._dropShadowBehavior = $create(AjaxControlToolkit.DropShadowBehavior, {}, null, null, this._foregroundElement);
}
$addHandler(window, 'resize', this._resizeHandler);
$addHandler(window, 'scroll', this._scrollHandler);
this._windowHandlersAttached = true;
},
_detachPopup : function() {
if (this._windowHandlersAttached) {
if (this._scrollHandler) {
$removeHandler(window, 'scroll', this._scrollHandler);
}
if (this._resizeHandler) {
$removeHandler(window, 'resize', this._resizeHandler);
}
}
if (this._dropShadowBehavior) {
this._dropShadowBehavior.dispose();
this._dropShadowBehavior = null;
}
},
_onCancel : function(e) {
var element = $get(this._CancelControlID);
if (element && !element.disabled) {
if (this._pageRequestManager !== null) {
this._pageRequestManager.abortPostBack();
}
this.hide();
e.preventDefault();
return false;
}
},
_onLayout : function() {
this._layout();
},
show : function() {
AjaxControlToolkit.ModalUpdateProgressBehavior.callBaseMethod(this, 'populate');
this._attachPopup();
this._backgroundElement.style.display = '';
this._foregroundElement.style.display = '';
// Disable TAB
this.disableTab();
this._layout();
// On pages that don't need scrollbars, Firefox and Safari act like
// one or both are present the first time the layout code runs which
// obviously leads to display issues - run the layout code a second
// time to work around this problem
this._layout();
},
disableTab : function() {
var i = 0;
var tagElements;
var tagElementsInPopUp = new Array();
Array.clear(this._saveTabIndexes);
//Save all popup's tag in tagElementsInPopUp
for (var j = 0; j < this._tagWithTabIndex.length; j++) {
tagElements = this._foregroundElement.getElementsByTagName(this._tagWithTabIndex[j]);
for (var k = 0 ; k < tagElements.length; k++) {
tagElementsInPopUp[i] = tagElements[k];
i++;
}
}
i = 0;
for (var j = 0; j < this._tagWithTabIndex.length; j++) {
tagElements = document.getElementsByTagName(this._tagWithTabIndex[j]);
for (var k = 0 ; k < tagElements.length; k++) {
if (Array.indexOf(tagElementsInPopUp, tagElements[k]) == -1) {
this._saveTabIndexes[i] = {tag: tagElements[k], index: tagElements[k].tabIndex};
tagElements[k].tabIndex="-1";
i++;
}
}
}
//IE6 Bug with SELECT element always showing up on top
i = 0;
if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && (Sys.Browser.version < 7)) {
//Save SELECT in PopUp
var tagSelectInPopUp = new Array();
tagElements = this._foregroundElement.getElementsByTagName('SELECT');
for (var k = 0 ; k < tagElements.length; k++) {
tagSelectInPopUp[i] = tagElements[k];
i++;
}
i = 0;
Array.clear(this._saveDisableSelect);
tagElements = document.getElementsByTagName('SELECT');
for (var k = 0 ; k < tagElements.length; k++) {
if (Array.indexOf(tagSelectInPopUp, tagElements[k]) == -1) {
this._saveDisableSelect[i] = {tag: tagElements[k], visib: CommonToolkitScripts.getCurrentStyle(tagElements[k], 'visibility')} ;
tagElements[k].style.visibility = 'hidden';
i++;
}
}
}
},
restoreTab : function() {
for (var i = 0; i < this._saveTabIndexes.length; i++) {
this._saveTabIndexes[i].tag.tabIndex = this._saveTabIndexes[i].index;
}
//IE6 Bug with SELECT element always showing up on top
if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && (Sys.Browser.version < 7)) {
for (var k = 0 ; k < this._saveDisableSelect.length; k++) {
this._saveDisableSelect[k].tag.style.visibility = this._saveDisableSelect[k].visib;
}
}
},
hide : function() {
this._backgroundElement.style.display = 'none';
this._foregroundElement.style.display = 'none';
this.restoreTab();
this._detachPopup();
},
_layout : function() {
var scrollLeft = (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
var scrollTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
var clientWidth;
if (window.innerWidth) {
clientWidth = ((Sys.Browser.agent === Sys.Browser.Safari) ? window.innerWidth : Math.min(window.innerWidth, document.documentElement.clientWidth));
} else {
clientWidth = document.documentElement.clientWidth;
}
var clientHeight;
if (window.innerHeight) {
clientHeight = ((Sys.Browser.agent === Sys.Browser.Safari) ? window.innerHeight : Math.min(window.innerHeight, document.documentElement.clientHeight));
} else {
clientHeight = document.documentElement.clientHeight;
}
this._backgroundElement.style.left = scrollLeft+'px';
this._backgroundElement.style.top = scrollTop+'px';
this._backgroundElement.style.width = clientWidth+'px';
this._backgroundElement.style.height = clientHeight+'px';
this._foregroundElement.style.left = scrollLeft+((clientWidth-this._foregroundElement.offsetWidth)/2)+'px';
this._foregroundElement.style.top = scrollTop+((clientHeight-this._foregroundElement.offsetHeight)/2)+'px';
if (this._dropShadowBehavior) {
this._dropShadowBehavior.setShadow();
window.setTimeout(Function.createDelegate(this, this._fixupDropShadowBehavior), 0);
}
},
// Some browsers don't update the location values immediately, so
// the location of the drop shadow would always be a step behind
// without this method
_fixupDropShadowBehavior : function() {
if (this._dropShadowBehavior) {
this._dropShadowBehavior.setShadow();
}
},
//
// Property get/set methods
//
get_BackgroundCssClass : function() {
return this._BackgroundCssClass;
},
set_BackgroundCssClass : function(value) {
if (this._BackgroundCssClass != value) {
this._BackgroundCssClass = value;
this.raisePropertyChanged('BackgroundCssClass');
}
},
get_DropShadow : function() {
return this._DropShadow;
},
set_DropShadow : function(value) {
if (this._DropShadow != value) {
this._DropShadow = value;
this.raisePropertyChanged('DropShadow');
}
},
get_CancelControlID : function() {
return this._CancelControlID;
},
set_CancelControlID : function(value) {
if (this._CancelControlID != value) {
this._CancelControlID = value;
this.raisePropertyChanged('CancelControlID');
}
},
get_DisplayAfter : function() {
return this._DisplayAfter;
},
set_DisplayAfter : function(value) {
/*var e = Function._validateParams(arguments, [{name: "value", type: Number}]);
if (e) throw e;*/
if (this._DisplayAfter != value) {
this._DisplayAfter = value;
this.raisePropertyChanged('DisplayAfter');
}
}
/*,
get_AssociatedUpdatePanelID : function() {
return this._AssociatedUpdatePanelID;
},
set_AssociatedUpdatePanelID : function(value) {
var e = Function._validateParams(arguments, [{name: "value", type: String, mayBeNull: true}]);
if (e) throw e;
if (this._AssociatedUpdatePanelID != value) {
this._AssociatedUpdatePanelID = value;
this.raisePropertyChanged('AssociatedUpdatePanelID');
}
}*/
}
AjaxControlToolkit.ModalUpdateProgressBehavior.registerClass('AjaxControlToolkit.ModalUpdateProgressBehavior', AjaxControlToolkit.DynamicPopulateBehaviorBase);
Victor
|
|
|
|
|
Thanks for updating the javascript! Does anything else in the Extener class need to be updated besides the AssociatedUpdatePanelID? As when I use the extender class from the download I get a
Microsoft JScript runtime error: Sys.InvalidOperationException: 'DynamicServicePath' is not a property or an existing field.
Thanks!
|
|
|
|
|
I have the Nov CTP runnig and downloaded the this control.
When I went to run the sample it complained about needing AssociatedUpdatePanelID to be specified. So I added it to the control and specified UpdatePanel1.
Unfortunately all three of the link buttons pop up the modal.
Am I missing something?
|
|
|
|
|
The current version doesn't support AssociatedUpdatePanelID.
Please remove AssociatedUpdatePanelID declaration from ModalUpdateProgressExtender.cs and recompile then you should be fine.
|
|
|
|
|
I've done the following, recompiled, ran, same thing. All of the links on the test page popup modals. Am I missing something?
|
|
|
|
|