2008-01-10 Igor Zelmanovich <igorz@mainsoft.com>
authorIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Thu, 10 Jan 2008 11:18:40 +0000 (11:18 -0000)
committerIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Thu, 10 Jan 2008 11:18:40 +0000 (11:18 -0000)
* webform.js:
make scripts compatible with MicrosoftAjaxLibrary.

svn path=/trunk/mcs/; revision=92579

mcs/class/System.Web/System.Web.UI/Page.cs
mcs/class/System.Web/resources/ChangeLog
mcs/class/System.Web/resources/webform.js

index 9ec35de9042252dea03599e2cc8e22720dcd8170..3e94eafa624978a3134c7160a1c9f61f81b85188 100644 (file)
@@ -1092,7 +1092,6 @@ public partial class Page : TemplateControl, IHttpHandler
        {
                writer.WriteLine ("\tvar {0};\n\tif (document.getElementById) {{ {0} = document.getElementById ('{1}'); }}", theForm, formUniqueID);
                writer.WriteLine ("\telse {{ {0} = document.{1}; }}", theForm, formUniqueID);
-               writer.WriteLine ("\t{0}._instanceVariableName = '{0}';", theForm);
 #if TARGET_J2EE
                // TODO implement callback on portlet
                string serverUrl = Request.RawUrl;
index 0374652c77d6314fb35d4b55228e16db0c389f60..424ac444a019131484297d3b9d492704494f6fa9 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-10 Igor Zelmanovich <igorz@mainsoft.com>
+
+       * webform.js:
+       make scripts compatible with MicrosoftAjaxLibrary.              
+
 2008-01-09 Igor Zelmanovich <igorz@mainsoft.com>
 
        * WebUIValidation_2.0.js:
index b70701d46b4e9607d3aedb266779190f5f90f9e8..7f597414cab75ed39cccfba07327d5bdf4472de8 100644 (file)
@@ -34,10 +34,10 @@ webForm.__pendingCallbacks = new Array();
 
 webForm.WebForm_AutoFocus = function (id)
 {
-       var x = this.WebForm_GetElementById (id);
+       var x = webForm.WebForm_GetElementById (id);
 
-       if (x && (!this.WebForm_CanFocus(x))) {
-               x = this.WebForm_FindFirstFocusableChild(x);
+       if (x && (!webForm.WebForm_CanFocus(x))) {
+               x = webForm.WebForm_FindFirstFocusableChild(x);
        }
        if (x) { x.focus(); }
 }
@@ -69,12 +69,12 @@ webForm.WebForm_FindFirstFocusableChild = function (element) {
        if (children) {
                for (var i = 0; i < children.length; i++) {
                        try {
-                               if (this.WebForm_CanFocus(children[i])) {
+                               if (webForm.WebForm_CanFocus(children[i])) {
                                        return children[i];
                                }
                                else {
-                                       var focused = this.WebForm_FindFirstFocusableChild(children[i]);
-                                       if (this.WebForm_CanFocus(focused)) {
+                                       var focused = webForm.WebForm_FindFirstFocusableChild(children[i]);
+                                       if (webForm.WebForm_CanFocus(focused)) {
                                                return focused;
                                        }
                                }
@@ -87,28 +87,25 @@ webForm.WebForm_FindFirstFocusableChild = function (element) {
 
 webForm.WebForm_ReEnableControls = function  ()
 {
-       if (typeof(this._form.__enabledControlArray) != 'undefined' && this._form.__enabledControlArray != null)
-               __enabledControlArray = this._form.__enabledControlArray;
-       
-       if (typeof(__enabledControlArray) == 'undefined' || __enabledControlArray == null)
+       if (typeof(webForm.__enabledControlArray) == 'undefined' || webForm.__enabledControlArray == null)
                return false;
        
-       this._form.__disabledControlArray = new Array();
-       for (var i = 0; i < __enabledControlArray.length; i++) {
-               var c = this.WebForm_GetElementById (__enabledControlArray[i]);
+       webForm.__disabledControlArray = new Array();
+       for (var i = 0; i < webForm.__enabledControlArray.length; i++) {
+               var c = this.WebForm_GetElementById (webForm.__enabledControlArray[i]);
                if ((typeof(c) != "undefined") && (c != null) && (c.disabled == true)) {
                        c.disabled = false;
-                       this._form.__disabledControlArray[this._form.__disabledControlArray.length] = c;
+                       webForm.__disabledControlArray[webForm.__disabledControlArray.length] = c;
                }
        }
-       setTimeout((this._instanceVariableName ? this._instanceVariableName + "." : "") + "WebForm_ReDisableControls ()", 0);
+       setTimeout(function () { webForm.WebForm_ReDisableControls (); }, 0);
        return true;
 }
 
 webForm.WebForm_ReDisableControls = function  ()
 {
-       for (var i = 0; i < this._form.__disabledControlArray.length; i++) {
-               this._form.__disabledControlArray[i].disabled = true;
+       for (var i = 0; i < webForm.__disabledControlArray.length; i++) {
+               webForm.__disabledControlArray[i].disabled = true;
        }
 }
 
@@ -260,7 +257,7 @@ webForm.WebForm_FireDefaultButton = function (event, target)
        if(event.srcElement && (event.srcElement.tagName.toLowerCase() == "textarea")) {
                return true;
        }
-       var defaultButton = this.WebForm_GetElementById(target);
+       var defaultButton = webForm.WebForm_GetElementById(target);
        if (!defaultButton)
                return true;