Author: krasnov
Date: 2006-02-20 10:45:42 -0500 (Mon, 20 Feb 2006)
New Revision: 57071

Modified:
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs
Log:
* CheckBox.cs: fixed InternalAddAttributesToRender, Render to
correct the "disabled" attribute in CheckBoxList
* CheckBoxList.cs: fixed RenderItem, to correct the "disabled" attribute in 
CheckBoxList

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-02-20 15:01:46 UTC (rev 57070)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-02-20 15:45:42 UTC (rev 57071)
@@ -1,5 +1,12 @@
 2006-02-20  Vladimir Krasnov  <[EMAIL PROTECTED]>
 
+       * CheckBox.cs: fixed InternalAddAttributesToRender, Render to
+       correct the "disabled" attribute in CheckBoxList
+       * CheckBoxList.cs: fixed RenderItem, to correct the "disabled" 
+       attribute in CheckBoxList
+
+2006-02-20  Vladimir Krasnov  <[EMAIL PROTECTED]>
+
        * CheckBox.cs: fixed Render function, removed rendering of empty 
        <span> element if ControlStyleCreated but it's empty.
        fixed "disabled" attribute, it should be placed into span element

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs    
2006-02-20 15:01:46 UTC (rev 57070)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs    
2006-02-20 15:45:42 UTC (rev 57071)
@@ -391,9 +391,6 @@
                                        w.RenderEndTag ();
                                }
 
-                               if (!Enabled)
-                                       w.AddAttribute 
(HtmlTextWriterAttribute.Disabled, "disabled");
-
                                w.AddAttribute (HtmlTextWriterAttribute.Id, 
ClientID);
                                w.AddAttribute (HtmlTextWriterAttribute.Type, 
render_type);
                                w.AddAttribute (HtmlTextWriterAttribute.Name, 
NameAttribute);
@@ -470,6 +467,8 @@
 
                internal virtual void InternalAddAttributesToRender 
(HtmlTextWriter w)
                {
+                       if (!Enabled)
+                               w.AddAttribute 
(HtmlTextWriterAttribute.Disabled, "disabled");
                }
        }
 }

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs        
2006-02-20 15:01:46 UTC (rev 57070)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs        
2006-02-20 15:45:42 UTC (rev 57071)
@@ -338,18 +338,9 @@
                        check_box.Text = item.Text;
                        check_box.AutoPostBack = AutoPostBack;
                        check_box.Checked = item.Selected;
-
-                       if (!Enabled) {
-                               check_box.Enabled = false;
-                               writer.AddAttribute 
(HtmlTextWriterAttribute.Disabled, "disabled");
-                               writer.RenderBeginTag (HtmlTextWriterTag.Span);
-                       }
-
+                       check_box.TextAlign = TextAlign;
+                       check_box.Enabled = Enabled;
                        check_box.RenderControl (writer);
-
-                       if (!Enabled) {
-                               writer.RenderEndTag ();
-                       }
                }
 
                void IRepeatInfoUser.RenderItem (ListItemType itemType,

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to