You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(204) |
Dec
(147) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(52) |
Feb
(33) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Argiris K. <be...@us...> - 2006-01-05 01:07:44
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Design In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19417/Core/UI/Design Modified Files: AjaxPanelDesigner.cs BaseClientEventWrapperDesigner.cs Log Message: Fix for the problem of the AjaxPanel not displaying its contents on VS 2005 when in a UserControl Index: BaseClientEventWrapperDesigner.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Design/BaseClientEventWrapperDesigner.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BaseClientEventWrapperDesigner.cs 3 Jan 2006 01:49:10 -0000 1.1 --- BaseClientEventWrapperDesigner.cs 5 Jan 2006 01:07:34 -0000 1.2 *************** *** 8,13 **** --- 8,19 ---- namespace MagicAjax.UI.Design { + #if NET_2_0 + public class BaseClientEventWrapperDesigner : System.Web.UI.Design.ContainerControlDesigner + { + } + #else public class BaseClientEventWrapperDesigner : System.Web.UI.Design.ReadWriteControlDesigner { } + #endif } \ No newline at end of file Index: AjaxPanelDesigner.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Design/AjaxPanelDesigner.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AjaxPanelDesigner.cs 11 Nov 2005 06:17:49 -0000 1.1 --- AjaxPanelDesigner.cs 5 Jan 2006 01:07:34 -0000 1.2 *************** *** 8,13 **** --- 8,19 ---- namespace MagicAjax.UI.Design { + #if NET_2_0 + public class AjaxPanelDesigner : System.Web.UI.Design.ContainerControlDesigner + { + } + #else public class AjaxPanelDesigner : System.Web.UI.Design.ReadWriteControlDesigner { } + #endif } \ No newline at end of file |
From: Argiris K. <be...@us...> - 2006-01-05 01:07:44
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19417/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Fix for the problem of the AjaxPanel not displaying its contents on VS 2005 when in a UserControl Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** AjaxPanel.cs 3 Jan 2006 01:49:09 -0000 1.46 --- AjaxPanel.cs 5 Jan 2006 01:07:33 -0000 1.47 *************** *** 356,359 **** --- 356,366 ---- protected override void RenderChildren(HtmlTextWriter writer) { + if (MagicAjaxContext == null) + { + // It's in VS Designer, do the default render + base.RenderChildren(writer); + return; + } + System.Text.StringBuilder sbFull = new System.Text.StringBuilder(); System.Text.StringBuilder sb = new System.Text.StringBuilder(); |
From: Argiris K. <be...@us...> - 2006-01-03 01:49:32
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls/ClientEventControls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9346/Core/UI/Controls/ClientEventControls Added Files: BaseClientEventWrapper.cs ClientEventControl.cs ClientEventTrigger.cs KeyClientEventWrapper.cs Log Message: -Client event handling controls -Various minor changes --- NEW FILE: ClientEventTrigger.cs --- using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.ComponentModel; namespace MagicAjax.UI.Controls { /// <summary> /// Captures a client event of a control. /// </summary> /// <remarks> /// The EventName property must be set to the client event (i.e. "focus","change", etc.) /// and the ControlID property must be set to the ID of the control whose event we want to /// capture. The AjaxCall that will be invoked is dependent at the ClientEventTrigger's /// placement, not the placement of ControlID's control. For example, if the ClientEventTrigger /// is inside an AjaxPanel and AjaxCall will be invoked even if the ControlID's control is /// not inside an AjaxPanel. /// /// The ClientEventTrigger must be inside the same NamingContainer (i.e. UserControl) /// as the ControlID's control. /// </remarks> [Designer("MagicAjax.UI.Design.ClientEventTriggerDesigner, MagicAjax"), ParseChildrenAttribute(true), PersistChildren(false), ToolboxData("<{0}:ClientEventTrigger runat=server></{0}:ClientEventTrigger>")] public class ClientEventTrigger : ClientEventControl, INonHtmlHolder { private string _controlID = String.Empty; private string _eventName = String.Empty; public event EventHandler Invoke; [Bindable(false), Category("Behaviour"), DefaultValue("")] public string ControlID { get { return _controlID; } set { _controlID = value; } } [Bindable(false), Category("Behaviour"), DefaultValue("")] public string EventName { get { return _eventName; } set { _eventName = value; } } protected override void HandleEvent(string eventName, string argument) { OnInvoke (EventArgs.Empty); } protected override void Render(HtmlTextWriter writer) { if ( Page != null ) { string attachScriptFormat = @"<script type='text/javascript'> <!-- elem=document.getElementById('{0}'); fn=function(e) {{__doPostBack('{1}',e.type+';');}}; if (elem.addEventListener) elem.addEventListener('{2}',fn,false); else elem.attachEvent('on{2}',fn); // --> </script>"; if (ControlID == null || ControlID == String.Empty) throw new MagicAjaxException(String.Format("ControlID property for trigger {0} is not set.", ClientID)); if (EventName == null || EventName == String.Empty) throw new MagicAjaxException(String.Format("EventName property for trigger {0} is not set.", ClientID)); Control con = this.NamingContainer.FindControl(ControlID); if ( con == null ) throw new MagicAjaxException(String.Format("The ControlID '{0}' does not exist or is not in the same NamingContainer as trigger {1}", ControlID, ClientID)); if ( ! Page.IsStartupScriptRegistered("__TRIGGER" + this.ClientID) ) Page.RegisterStartupScript ("__TRIGGER" + this.ClientID, String.Format(attachScriptFormat, con.ClientID, this.UniqueID, EventName)); writer.Write("<span id=\"{0}\"></span>", ClientID); } } protected virtual void OnInvoke (EventArgs e) { if (Invoke != null) Invoke (this, e); } } } --- NEW FILE: ClientEventControl.cs --- using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace MagicAjax.UI.Controls { /// <summary> /// Base class for controls that expose and handle client events. /// </summary> public abstract class ClientEventControl : WebControl, IPostBackEventHandler { protected abstract void HandleEvent (string eventName, string argument); #region IPostBackEventHandler Members public void RaisePostBackEvent(string eventArgument) { int index = eventArgument.IndexOf(';'); if ( index == -1 ) throw new MagicAjaxException(String.Format("Invalid eventArgument '{0}' for client event wrapper '{1}'.", eventArgument, ClientID)); HandleEvent (eventArgument.Substring(0, index), eventArgument.Substring(index + 1)); } #endregion public ClientEventControl() : base(HtmlTextWriterTag.Span) { } protected override void OnPreRender(EventArgs e) { base.OnPreRender (e); if (this.Page != null && Enabled) Util.CallPrivateMethod(this.Page, typeof(Page), "RegisterPostBackScript"); } } } --- NEW FILE: BaseClientEventWrapper.cs --- using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.ComponentModel; namespace MagicAjax.UI.Controls { /// <summary> /// Base class for controls that capture the client events of their inner controls. /// </summary> [Designer("MagicAjax.UI.Design.BaseClientEventWrapperDesigner, MagicAjax"), ParseChildrenAttribute(false), PersistChildren(true)] public abstract class BaseClientEventWrapper : ClientEventControl { protected abstract void AttachClientEvents (HtmlTextWriter writer); protected override void AddAttributesToRender(HtmlTextWriter writer) { base.AddAttributesToRender (writer); AttachClientEvents(writer); } protected virtual void AttachEvent (string eventName, string getArgumentScript, HtmlTextWriter writer) { if (getArgumentScript == null) writer.AddAttribute (eventName, String.Format("__doPostBack('{0}',event.type+';');", UniqueID)); else writer.AddAttribute (eventName, String.Format("arg={0};__doPostBack('{1}',event.type+';'+arg);", getArgumentScript, UniqueID)); } protected void AttachEvent (string eventName, HtmlTextWriter writer) { AttachEvent (eventName, null, writer); } } } --- NEW FILE: KeyClientEventWrapper.cs --- using System; using System.ComponentModel; using System.Web; using System.Web.UI; namespace MagicAjax.UI.Controls { #region Class KeyPressEventArgs public class KeyPressEventArgs : EventArgs { private char _keyChar; public char KeyChar { get { return _keyChar; } } public KeyPressEventArgs (char keyChar) { this._keyChar = keyChar; } } #endregion #region Class KeyEventArgs public class KeyEventArgs : EventArgs { private int _keyCode; private bool _alt, _control, _shift; public int KeyCode { get { return _keyCode; } } public bool Alt { get { return _alt; } } public bool Control { get { return _control; } } public bool Shift { get { return _shift; } } public KeyEventArgs (int keyCode, bool alt, bool control, bool shift) { this._keyCode = keyCode; this._alt = alt; this._control = control; this._shift = shift; } } #endregion public delegate void KeyPressEventHandler (object sender, KeyPressEventArgs e); public delegate void KeyEventHandler (object sender, KeyEventArgs e); /// <summary> /// Captures the KeyPress, KeyDown, and KeyUp client events of its inner controls. /// </summary> /// <remarks> /// The KeyPress event has the IE behaviour across all browsers (invoked when a character /// is typed or Enter is pressed). /// </remarks> [ToolboxData("<{0}:KeyClientEventWrapper runat=server>Insert controls to capture their OnKey events</{0}:KeyClientEventWrapper>")] public class KeyClientEventWrapper : BaseClientEventWrapper { public event KeyPressEventHandler KeyPress; public event KeyEventHandler KeyDown; public event KeyEventHandler KeyUp; protected override void HandleEvent(string eventName, string argument) { switch (eventName) { case "keypress" : OnKeyPress (new KeyPressEventArgs((char)Int32.Parse(argument))); break; case "keydown" : OnKeyDown (CreateKeyEventArgs(argument)); break; case "keyup" : OnKeyUp (CreateKeyEventArgs(argument)); break; default: throw new MagicAjaxException(String.Format("Invalid event name '{0}' captured by {1}.", eventName, ClientID)); } } protected override void AttachClientEvents(HtmlTextWriter writer) { if ( KeyPress != null ) writer.AddAttribute ("onkeypress", String.Format("__onKeyPress(event,'{0}');", UniqueID)); if ( KeyDown != null ) writer.AddAttribute ("onkeydown", String.Format("__onKeyUpDown(event,'keydown','{0}');", UniqueID)); if ( KeyUp != null ) writer.AddAttribute ("onkeyup", String.Format("__onKeyUpDown(event,'keyup','{0}');", UniqueID)); } protected override void OnPreRender(EventArgs e) { string onKeyScript = @"<script type='text/javascript'> <!-- function __onKeyPress(e,src) { if ('which' in e && e.keyCode!=13) { if (e.which>=32) __doPostBack(src,'keypress;'+e.which); } else { __doPostBack(src,'keypress;'+e.keyCode); } } function __onKeyUpDown(e,evtname,src) { __doPostBack(src,evtname+';'+e.keyCode+','+e.altKey+','+e.ctrlKey+','+e.shiftKey); } // --> </script>"; base.OnPreRender (e); if ( ! Page.IsClientScriptBlockRegistered("__ONKEYBLOCK") ) Page.RegisterClientScriptBlock("__ONKEYBLOCK", onKeyScript); } protected virtual KeyEventArgs CreateKeyEventArgs (string argument) { int keyCode; bool alt, control, shift; try { string[] args = argument.Split(','); keyCode = Int32.Parse(args[0]); alt = Boolean.Parse(args[1]); control = Boolean.Parse(args[2]); shift = Boolean.Parse(args[3]); return new KeyEventArgs(keyCode, alt, control, shift); } catch { throw new MagicAjaxException(String.Format("Invalide KeyEvent argument '{0}' for {1}.", argument, ClientID)); } } protected virtual void OnKeyPress (KeyPressEventArgs e) { if (KeyPress != null) KeyPress (this, e); } protected virtual void OnKeyDown (KeyEventArgs e) { if (KeyDown != null) KeyDown (this, e); } protected virtual void OnKeyUp (KeyEventArgs e) { if (KeyUp != null) KeyUp (this, e); } } } |
From: Argiris K. <be...@us...> - 2006-01-03 01:49:32
|
Update of /cvsroot/magicajax/magicajax/Core/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9346/Core/UI Modified Files: AjaxControl.cs RenderedByScriptControl.cs Log Message: -Client event handling controls -Various minor changes Index: AjaxControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxControl.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** AjaxControl.cs 22 Dec 2005 01:15:20 -0000 1.11 --- AjaxControl.cs 3 Jan 2006 01:49:09 -0000 1.12 *************** *** 67,71 **** public void RaisePreWriteScriptEvent() { - SetAjaxAttributes(); OnPreWriteScript (EventArgs.Empty); } --- 67,70 ---- *************** *** 125,129 **** // Register 'AjaxCallObject.js' script MagicAjaxModule.EnableAjaxOnPage(this.Page); - SetAjaxAttributes(); #if NET_2_0 --- 124,127 ---- *************** *** 137,140 **** --- 135,144 ---- } + protected override void AddAttributesToRender(HtmlTextWriter writer) + { + base.AddAttributesToRender (writer); + AddAjaxAttributesToRender (writer); + } + protected override void OnUnload(EventArgs e) { *************** *** 176,183 **** /// <summary> /// It is empty for the AjaxControl class. It is meant to be overriden ! /// by subclasses so that they set their MagicAjax attributes in their Attributes ! /// collection. /// </summary> ! protected virtual void SetAjaxAttributes() { } --- 180,186 ---- /// <summary> /// It is empty for the AjaxControl class. It is meant to be overriden ! /// by subclasses so that they render their MagicAjax attributes. /// </summary> ! protected virtual void AddAjaxAttributesToRender (HtmlTextWriter writer) { } Index: RenderedByScriptControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/RenderedByScriptControl.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** RenderedByScriptControl.cs 22 Dec 2005 01:15:20 -0000 1.16 --- RenderedByScriptControl.cs 3 Jan 2006 01:49:09 -0000 1.17 *************** *** 69,73 **** /// its tag attributes using javascript. /// </remarks> ! public abstract class RenderedByScriptControl : AjaxControl, IScriptWriter { protected abstract void RenderByScript(); --- 69,73 ---- /// its tag attributes using javascript. /// </remarks> ! public abstract class RenderedByScriptControl : AjaxControl, IScriptWriter, INonHtmlHolder { protected abstract void RenderByScript(); |
From: Argiris K. <be...@us...> - 2006-01-03 01:49:32
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9346/Core Modified Files: AssemblyInfo.cs MagicAjax NET 2.0.csproj MagicAjax.csproj MagicAjaxContext.cs Log Message: -Client event handling controls -Various minor changes Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/AssemblyInfo.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AssemblyInfo.cs 22 Dec 2005 12:44:43 -0000 1.7 --- AssemblyInfo.cs 3 Jan 2006 01:49:09 -0000 1.8 *************** *** 36,40 **** // by using the '*' as shown below: ! [assembly: AssemblyVersion("0.2.2.*")] // --- 36,40 ---- // by using the '*' as shown below: ! [assembly: AssemblyVersion("0.3.0.0")] // Index: MagicAjax NET 2.0.csproj =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjax NET 2.0.csproj,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** MagicAjax NET 2.0.csproj 25 Dec 2005 18:00:24 -0000 1.12 --- MagicAjax NET 2.0.csproj 3 Jan 2006 01:49:09 -0000 1.13 *************** *** 106,109 **** --- 106,110 ---- </Compile> <Compile Include="Interfaces\IAjaxCallEventHandler.cs" /> + <Compile Include="Interfaces\INonHtmlHolder.cs" /> <Compile Include="Interfaces\IPreWriteScriptEventHandler.cs"> <SubType>Code</SubType> *************** *** 123,126 **** --- 124,133 ---- <SubType>Code</SubType> </Compile> + <Compile Include="UI\Controls\ClientEventControls\BaseClientEventWrapper.cs" /> + <Compile Include="UI\Controls\ClientEventControls\ClientEventControl.cs" /> + <Compile Include="UI\Controls\ClientEventControls\ClientEventTrigger.cs" /> + <Compile Include="UI\Controls\ClientEventControls\KeyClientEventWrapper.cs" /> + <Compile Include="UI\Design\BaseClientEventWrapperDesigner.cs" /> + <Compile Include="UI\Design\ClientEventTriggerDesigner.cs" /> <Compile Include="Util.cs"> <SubType>Code</SubType> Index: MagicAjax.csproj =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjax.csproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MagicAjax.csproj 25 Dec 2005 18:00:26 -0000 1.9 --- MagicAjax.csproj 3 Jan 2006 01:49:09 -0000 1.10 *************** *** 159,162 **** --- 159,167 ---- /> <File + RelPath = "Interfaces\INonHtmlHolder.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Interfaces\IPreWriteScriptEventHandler.cs" SubType = "Code" *************** *** 213,220 **** --- 218,255 ---- /> <File + RelPath = "UI\Controls\ClientEventControls\BaseClientEventWrapper.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "UI\Controls\ClientEventControls\ClientEventControl.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "UI\Controls\ClientEventControls\ClientEventTrigger.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "UI\Controls\ClientEventControls\KeyClientEventWrapper.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "UI\Design\AjaxPanelDesigner.cs" SubType = "Code" BuildAction = "Compile" /> + <File + RelPath = "UI\Design\BaseClientEventWrapperDesigner.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "UI\Design\ClientEventTriggerDesigner.cs" + SubType = "Code" + BuildAction = "Compile" + /> </Include> </Files> Index: MagicAjaxContext.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxContext.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** MagicAjaxContext.cs 27 Dec 2005 22:03:41 -0000 1.12 --- MagicAjaxContext.cs 3 Jan 2006 01:49:09 -0000 1.13 *************** *** 245,249 **** _isBrowserSupported = caps.MajorVersion >= 8; break; ! //TODO: add support for Opera, Netscape and Safari } } --- 245,249 ---- _isBrowserSupported = caps.MajorVersion >= 8; break; ! //TODO: add support for Safari } } |
From: Argiris K. <be...@us...> - 2006-01-03 01:49:32
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9346/Core/UI/Controls Modified Files: AjaxPanel.cs AjaxZone.cs Log Message: -Client event handling controls -Various minor changes Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** AjaxPanel.cs 22 Dec 2005 23:06:51 -0000 1.45 --- AjaxPanel.cs 3 Jan 2006 01:49:09 -0000 1.46 *************** *** 53,56 **** --- 53,60 ---- } + /// <summary> + /// Defines what form elements should be excluded from the post data. + /// </summary> + [Flags] public enum ExcludeFromPostFlag { *************** *** 74,78 **** /// Do not post any hidden field /// </summary> ! AllHidden = 7, /// <summary> /// Do not post any (non-hidden) form element --- 78,82 ---- /// Do not post any hidden field /// </summary> ! AllHidden = ViewState | Fingerprints | UserHidden, /// <summary> /// Do not post any (non-hidden) form element *************** *** 82,88 **** /// Do not post any element /// </summary> ! AllElements = 15 } /// <summary> /// Works like Panel but the controls it contains are rendered on the page by sending --- 86,111 ---- /// Do not post any element /// </summary> ! AllElements = AllHidden | FormElements } + #region AjaxPanelUpdated event Handler & Args + public class AjaxPanelUpdatedEventArgs + { + private Control _updatedControl; + + public Control UpdatedControl + { + get { return _updatedControl; } + } + + public AjaxPanelUpdatedEventArgs (Control updatedControl) + { + this._updatedControl = updatedControl; + } + } + + public delegate void AjaxPanelUpdatedEventHandler (object sender, AjaxPanelUpdatedEventArgs e); + #endregion + /// <summary> /// Works like Panel but the controls it contains are rendered on the page by sending *************** *** 107,113 **** /// </remarks> [Designer("MagicAjax.UI.Design.AjaxPanelDesigner, MagicAjax"), ! ParseChildrenAttribute(false), ! PersistChildren(true), ! ToolboxData("<{0}:AjaxPanel runat=server>AjaxPanel</{0}:AjaxPanel>")] public class AjaxPanel : RenderedByScriptControl { --- 130,136 ---- /// </remarks> [Designer("MagicAjax.UI.Design.AjaxPanelDesigner, MagicAjax"), ! ParseChildrenAttribute(false), ! PersistChildren(true), ! ToolboxData("<{0}:AjaxPanel runat=server>AjaxPanel</{0}:AjaxPanel>")] public class AjaxPanel : RenderedByScriptControl { *************** *** 120,123 **** --- 143,147 ---- private Hashtable _controlHtmlFingerprints = new Hashtable(); private ControlCollectionState _controlState; + private Hashtable _controlUpdatedHandlerLists = new Hashtable(); #endregion *************** *** 171,174 **** --- 195,204 ---- #endregion + #region Events + + public event AjaxPanelUpdatedEventHandler ContentUpdated; + + #endregion + #region Public Methods *************** *** 206,209 **** --- 236,264 ---- #endregion + public virtual void AddControlUpdatedEventHandler (Control controlToMonitor, EventHandler controlUpdatedHandler) + { + ArrayList handlerList = _controlUpdatedHandlerLists[controlToMonitor] as ArrayList; + if (handlerList == null) + { + handlerList = new ArrayList(); + _controlUpdatedHandlerLists.Add (controlToMonitor, handlerList); + } + + if (!handlerList.Contains(controlUpdatedHandler)) + handlerList.Add (controlUpdatedHandler); + } + + public virtual void RemoveControlUpdatedEventHandler (Control controlToMonitor, EventHandler controlUpdatedHandler) + { + ArrayList handlerList = _controlUpdatedHandlerLists[controlToMonitor] as ArrayList; + if (handlerList == null) + { + handlerList = new ArrayList(); + _controlUpdatedHandlerLists.Add (controlToMonitor, handlerList); + } + + handlerList.Add (controlUpdatedHandler); + } + #endregion *************** *** 358,387 **** #endregion ! protected override void SetAjaxAttributes() { switch (_ajaxCallConnection) { - case AjaxCallConnectionType.None: - this.Attributes.Remove ("AjaxCall"); - break; - case AjaxCallConnectionType.Asynchronous: ! this.Attributes["AjaxCall"] = "async"; break; case AjaxCallConnectionType.Synchronous: ! this.Attributes["AjaxCall"] = "sync"; break; } ! if (_excludeFlags == ExcludeFromPostFlag.None) ! { ! this.Attributes.Remove ("ExcludeFlags"); ! } ! else { ! this.Attributes["ExcludeFlags"] = ((int)_excludeFlags).ToString(); } } protected virtual void SaveControlState() --- 413,438 ---- #endregion ! #region override AddAjaxAttributesToRender ! protected override void AddAjaxAttributesToRender(HtmlTextWriter writer) { + base.AddAjaxAttributesToRender (writer); + switch (_ajaxCallConnection) { case AjaxCallConnectionType.Asynchronous: ! writer.AddAttribute("AjaxCall", "async"); break; case AjaxCallConnectionType.Synchronous: ! writer.AddAttribute("AjaxCall", "sync"); break; } ! if (_excludeFlags != ExcludeFromPostFlag.None) { ! writer.AddAttribute("ExcludeFlags", ((int)_excludeFlags).ToString()); } } + #endregion protected virtual void SaveControlState() *************** *** 623,627 **** protected virtual bool IsHtmlHolder (Control control) { ! return ( control is WebControl && !(control is RenderedByScriptControl) ); } --- 674,678 ---- protected virtual bool IsHtmlHolder (Control control) { ! return ( control is WebControl && !(control is INonHtmlHolder) ); } *************** *** 840,843 **** --- 891,902 ---- #endregion + #region OnContentUpdated + protected virtual void OnContentUpdated (AjaxPanelUpdatedEventArgs e) + { + if (ContentUpdated != null) + ContentUpdated(this, e); + } + #endregion + #endregion Index: AjaxZone.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxZone.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AjaxZone.cs 22 Dec 2005 01:26:25 -0000 1.3 --- AjaxZone.cs 3 Jan 2006 01:49:09 -0000 1.4 *************** *** 6,17 **** { /// <summary> ! /// Summary description for AjaxZone. /// </summary> public class AjaxZone : AjaxPanel { ! protected override void OnLoad(EventArgs e) { ! base.OnLoad (e); ! this.Attributes["AjaxLocalScope"] = "true"; } } --- 6,26 ---- { /// <summary> ! /// An AjaxPanel that is isolated from the rest AjaxPanels of the page. /// </summary> + /// <remarks> + /// It's an AjaxPanel that has the MagicAjax attribute "AjaxLocalScope" set to true. + /// It is provided for convenience and readability. Please read the documentation + /// about "AjaxLocalScope" to find out what is the effect of this attribute. + /// </remarks> + [Designer("MagicAjax.UI.Design.AjaxPanelDesigner, MagicAjax"), + ParseChildrenAttribute(false), + PersistChildren(true), + ToolboxData("<{0}:AjaxZone runat=server>AjaxZone</{0}:AjaxZone>")] public class AjaxZone : AjaxPanel { ! protected override void AddAjaxAttributesToRender(HtmlTextWriter writer) { ! base.AddAjaxAttributesToRender (writer); ! writer.AddAttribute ("AjaxLocalScope", "true"); } } |
From: Argiris K. <be...@us...> - 2006-01-03 01:49:31
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9346/Core/script Modified Files: AjaxCallObject.js Log Message: -Client event handling controls -Various minor changes Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** AjaxCallObject.js 28 Dec 2005 15:30:57 -0000 1.40 --- AjaxCallObject.js 3 Jan 2006 01:49:09 -0000 1.41 *************** *** 364,367 **** --- 364,369 ---- //defaults if (!ajaxCallType) ajaxCallType = "async"; + if (typeof(ajaxScopeID) == "undefined") + ajaxScopeID = this.GetAjaxScopeID(this.GetTargetElement(eventTarget)); var theData = ''; |
From: Argiris K. <be...@us...> - 2006-01-03 01:49:31
|
Update of /cvsroot/magicajax/magicajax/Docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9346/Docs Modified Files: Changelog.html Log Message: -Client event handling controls -Various minor changes Index: Changelog.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Changelog.html,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Changelog.html 22 Dec 2005 19:04:24 -0000 1.19 --- Changelog.html 3 Jan 2006 01:49:09 -0000 1.20 *************** *** 57,70 **** <p>Changes since 0.2.2</p> <ul> <li> ! MagicAjax.dll is now strongly named (public key token bf4053b35db106f3), so MagicAjax.dll can be registered in the GAC. <li> AjaxCall event is renamed to AjaxCallStart <LI> AjaxControl/AjaxPage/AjaxUserControl invoke AjaxCallStart at Load event, ! PreWriteScript at PreRender, and AjaxCallEnd at Unload, during an Ajax ! callback <LI> ! Huge performance improvement <LI> There were conflicts with the cookies handling by ASP.NET 2.0 and other --- 57,81 ---- <p>Changes since 0.2.2</p> <ul> + <LI> + New MagicAjax attributes for ASP.NET controls (AjaxLocalScope, ExcludeFlags) + <LI> + Added ExcludeFlags property for AjaxPanel + <LI> + New base (abstract) controls added (ClientEventControl, BaseClientEventWrapper) <li> ! New toolbox controls added (AjaxZone, KeyClientEventWrapper, ! ClientEventTrigger) ! <LI> ! Support for Opera and Netscape browsers added. ! <LI> ! MagicAjax.dll is now strongly named (public key token bf4053b35db106f3), so ! MagicAjax.dll can be registered in the GAC. <li> AjaxCall event is renamed to AjaxCallStart <LI> AjaxControl/AjaxPage/AjaxUserControl invoke AjaxCallStart at Load event, ! PreWriteScript at PreRender, and AjaxCallEnd at Unload, during an Ajax callback <LI> ! Huge performance improvement <LI> There were conflicts with the cookies handling by ASP.NET 2.0 and other |
From: Argiris K. <be...@us...> - 2006-01-03 01:49:19
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Design In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9346/Core/UI/Design Added Files: BaseClientEventWrapperDesigner.cs ClientEventTriggerDesigner.cs Log Message: -Client event handling controls -Various minor changes --- NEW FILE: ClientEventTriggerDesigner.cs --- using System; using System.Web.UI.Design; namespace MagicAjax.UI.Design { public class ClientEventTriggerDesigner : System.Web.UI.Design.ControlDesigner { public override string GetDesignTimeHtml() { return base.GetEmptyDesignTimeHtml(); } } } --- NEW FILE: BaseClientEventWrapperDesigner.cs --- using System; using System.IO; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.Design; namespace MagicAjax.UI.Design { public class BaseClientEventWrapperDesigner : System.Web.UI.Design.ReadWriteControlDesigner { } } |
From: Argiris K. <be...@us...> - 2006-01-03 01:49:17
|
Update of /cvsroot/magicajax/magicajax/Core/Interfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9346/Core/Interfaces Added Files: INonHtmlHolder.cs Log Message: -Client event handling controls -Various minor changes --- NEW FILE: INonHtmlHolder.cs --- using System; namespace MagicAjax.UI { /// <summary> /// Identifies a control that will not be regarded by an AjaxPanel as a separate /// html holder (a control to check for changes between AjaxCalls) /// </summary> public interface INonHtmlHolder { } } |
From: Argiris K. <be...@us...> - 2006-01-03 01:40:03
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls/ClientEventControls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8136/ClientEventControls Log Message: Directory /cvsroot/magicajax/magicajax/Core/UI/Controls/ClientEventControls added to the repository |
From: Dion O. <dol...@us...> - 2005-12-28 15:31:11
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26287/magicajax/Core/script Modified Files: AjaxCallObject.js Log Message: - fix: input type='image' are now supported for IE only (for other browsers forces a normal postback) Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** AjaxCallObject.js 28 Dec 2005 11:53:46 -0000 1.39 --- AjaxCallObject.js 28 Dec 2005 15:30:57 -0000 1.40 *************** *** 168,172 **** AjaxCallObject.prototype.GetTargetElement = function(eventTarget) { ! var target = null; var elemUniqueID = eventTarget.split("$").join(":"); var ids = elemUniqueID.split(":"); --- 168,175 ---- AjaxCallObject.prototype.GetTargetElement = function(eventTarget) { ! var target = document.getElementById(eventTarget); ! if (target != null) ! return target; ! var elemUniqueID = eventTarget.split("$").join(":"); var ids = elemUniqueID.split(":"); *************** *** 258,263 **** if (cbType != "none") { ! AJAXCbo.DoAjaxCall(target.name, "", cbType, AJAXCbo.GetAjaxScopeID(target)); ! return false; } else --- 261,265 ---- if (cbType != "none") { ! return !AJAXCbo.DoAjaxCall(target.name, "", cbType, AJAXCbo.GetAjaxScopeID(target)); } else *************** *** 360,419 **** AjaxCallObject.prototype.DoAjaxCall = function(eventTarget, eventArgument, ajaxCallType, ajaxScopeID) { ! //defaults ! if (!ajaxCallType) ajaxCallType = "async"; ! var theData = ''; ! var theform = document.forms[0]; ! var thePage = theform.action; ! var eName = ''; ! theData = '__EVENTTARGET=' + this.EncodePostData(eventTarget.split("$").join(":")) + '&'; ! theData += '__EVENTARGUMENT=' + this.EncodePostData(eventArgument) + '&'; ! theData += '__AJAXCALL=true&'; ! if (ajaxScopeID != null) ! theData += '__AJAXSCOPE=' + ajaxScopeID + '&'; ! var excludeFlags = this.GetExcludeFlags( this.GetTargetElement(eventTarget) ); ! var elemCount = theform.elements.length; ! for( var i=0; i<elemCount; i++ ) ! { ! curElem = theform.elements[i]; ! eName = curElem.name; ! if( eName && eName != '') ! { ! if( eName == '__EVENTTARGET' || eName == '__EVENTARGUMENT' ) ! { ! // Do Nothing ! } ! else if ( ! this.ExcludeFromPost(curElem, ajaxScopeID, excludeFlags) ) { ! if ( __bPageIsStored && eName == '__VIEWSTATE' ) ! continue; ! var type = curElem.type; ! var val = curElem.value; ! if ( type == "submit" || type == "button" ) ! continue; ! val = this.EncodePostData(val); ! if ( type == "select-multiple" || type == "select-one" ) ! { ! var selectLength = curElem.options.length; ! var optNameStr = this.EncodePostData(eName); ! for (var j=0; j < selectLength; j++) ! if (curElem.options[j].selected) ! theData = theData + optNameStr + '=' + this.EncodePostData(curElem.options[j].value) + '&'; ! } ! else if ( (type != "checkbox" && type != "radio") || curElem.checked ) ! { ! theData = theData + this.EncodePostData(eName) + '=' + val + '&'; } } ! } ! } if (theData.substr(theData.length-1) == "&") --- 362,432 ---- AjaxCallObject.prototype.DoAjaxCall = function(eventTarget, eventArgument, ajaxCallType, ajaxScopeID) { ! //defaults ! if (!ajaxCallType) ajaxCallType = "async"; ! var theData = ''; ! var theform = document.forms[0]; ! var thePage = theform.action; ! var eName = ''; ! theData = '__EVENTTARGET=' + this.EncodePostData(eventTarget.split("$").join(":")) + '&'; ! theData += '__EVENTARGUMENT=' + this.EncodePostData(eventArgument) + '&'; ! theData += '__AJAXCALL=true&'; ! if (ajaxScopeID != null) ! theData += '__AJAXSCOPE=' + ajaxScopeID + '&'; ! //check if eventTarget is an input element of type 'image' ! var target = this.GetTargetElement(eventTarget) ! if (target != null && target.type == "image" && target.name && target.name != '') ! { ! //image callbacks only supported for IE (for now). For other browsers force a postback. ! if (window.event) ! theData += target.name + ".x=" + window.event.offsetX + "&" + target.name + ".y=" + (window.event.offsetY - target.offsetTop) + "&"; ! else ! return false; ! } ! var excludeFlags = this.GetExcludeFlags( target ); ! ! var elemCount = theform.elements.length; ! for( var i=0; i<elemCount; i++ ) ! { ! curElem = theform.elements[i]; ! eName = curElem.name; ! if( eName && eName != '') { ! if( eName == '__EVENTTARGET' || eName == '__EVENTARGUMENT' ) ! { ! // Do Nothing ! } ! else if ( ! this.ExcludeFromPost(curElem, ajaxScopeID, excludeFlags) ) ! { ! if ( __bPageIsStored && eName == '__VIEWSTATE' ) ! continue; ! var type = curElem.type; ! var val = curElem.value; ! if ( type == "submit" || type == "button" ) ! continue; ! val = this.EncodePostData(val); ! if ( type == "select-multiple" || type == "select-one" ) ! { ! var selectLength = curElem.options.length; ! var optNameStr = this.EncodePostData(eName); ! for (var j=0; j < selectLength; j++) ! if (curElem.options[j].selected) ! theData = theData + optNameStr + '=' + this.EncodePostData(curElem.options[j].value) + '&'; ! } ! else if ( (type != "checkbox" && type != "radio") || curElem.checked ) ! { ! theData = theData + this.EncodePostData(eName) + '=' + val + '&'; ! } } } ! } if (theData.substr(theData.length-1) == "&") *************** *** 467,470 **** --- 480,484 ---- } } + return true; } |
From: Dion O. <dol...@us...> - 2005-12-28 11:53:59
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17070/magicajax/Core/script Modified Files: AjaxCallObject.js Log Message: - Added support for Netscape 8 Note: Netscape 8 has a problem using replaceChild when replaced child contains a table. So in case Netscape8, first an insertBefore and then a removeChild is done. Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** AjaxCallObject.js 27 Dec 2005 22:03:42 -0000 1.38 --- AjaxCallObject.js 28 Dec 2005 11:53:46 -0000 1.39 *************** *** 10,13 **** --- 10,14 ---- __TraceWindows = new Array(); __ClockID = 0; + __Netscape8AndUp = false; // Excluding from post flags *************** *** 195,198 **** --- 196,201 ---- AjaxCallObject.prototype.HookAjaxCall = function(bPageIsStored, bUnloadStoredPage, bTracing) { + __Netscape8AndUp = navigator.appName == "Netscape" && navigator.vendor == "Netscape" && parseInt(navigator.appVersion) >= 5; + __PreviousOnFormSubmit = document.forms[0].onsubmit; document.forms[0].onsubmit = this.OnFormSubmit; *************** *** 779,784 **** } } ! ! place.parentNode.replaceChild(store, place); } } --- 782,796 ---- } } ! ! if (__Netscape8AndUp) ! { ! //Netscape 8 has a problem using replaceChild when replaced child contains a table ! place.parentNode.insertBefore(store, place); ! place.parentNode.removeChild(place); ! } ! else ! place.parentNode.replaceChild(store, place); ! ! place = null; //cleanup } } |
From: Dion O. <dol...@us...> - 2005-12-27 22:03:51
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18662/magicajax/Core Modified Files: MagicAjaxContext.cs MagicAjaxModule.cs Log Message: - Added Opera 8 support! - fix so MagicAjaxContext only gets built on an .aspx request, not for every ASP.NET 2.0 .axd (embedded resource) request Index: MagicAjaxContext.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxContext.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MagicAjaxContext.cs 22 Dec 2005 23:06:51 -0000 1.11 --- MagicAjaxContext.cs 27 Dec 2005 22:03:41 -0000 1.12 *************** *** 240,244 **** break; case "netscape": ! _isBrowserSupported = caps.MajorVersion >= 5; break; //TODO: add support for Opera, Netscape and Safari --- 240,247 ---- break; case "netscape": ! _isBrowserSupported = caps.MajorVersion >= 5; ! break; ! case "opera": ! _isBrowserSupported = caps.MajorVersion >= 8; break; //TODO: add support for Opera, Netscape and Safari Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** MagicAjaxModule.cs 26 Dec 2005 02:27:20 -0000 1.53 --- MagicAjaxModule.cs 27 Dec 2005 22:03:42 -0000 1.54 *************** *** 397,428 **** HttpContext context = ((HttpApplication)sender).Context; ! // Init private fields ! _threadAbortExceptionThrown = false; ! _processedAjaxCall = false; ! _request = context.Request; ! _response = context.Response; ! ! // Create a new context and add it to the items collection for later retrieval ! // by MagicAjaxContext.Current ! _magicAjaxContext = new MagicAjaxContext(); ! HttpContext.Current.Items.Add(MagicAjaxContext.ContextKey, _magicAjaxContext); ! ! // Check if the request is for the embedded AjaxCallObject.js script ! if (context.Request.RawUrl.EndsWith("AjaxCallObject.js.aspx")) { ! context.Response.ContentType = "text/javascript"; ! object cachedAjaxCallObjectJs = context.Cache["__CACHED_AJAXCALLOBJECT_JS"]; ! if (cachedAjaxCallObjectJs == null) { ! //read and output the embedded AjaxCallObject.js file from the manifest ! using (System.IO.StreamReader reader = new System.IO.StreamReader(typeof(MagicAjaxModule).Assembly.GetManifestResourceStream("MagicAjax.script.AjaxCallObject.js"))) { ! cachedAjaxCallObjectJs = reader.ReadToEnd(); } ! context.Cache.Insert("__CACHED_AJAXCALLOBJECT_JS", cachedAjaxCallObjectJs); } - context.Response.Write(cachedAjaxCallObjectJs); - context.Response.Cache.SetExpires(DateTime.Now.AddYears(1)); - context.Response.End(); } } --- 397,433 ---- HttpContext context = ((HttpApplication)sender).Context; ! if (context.Request.Url.AbsolutePath.EndsWith(".aspx")) { ! // Check if the request is for the embedded AjaxCallObject.js script ! if (context.Request.RawUrl.EndsWith("AjaxCallObject.js.aspx")) { ! context.Response.ContentType = "text/javascript"; ! object cachedAjaxCallObjectJs = context.Cache["__CACHED_AJAXCALLOBJECT_JS"]; ! if (cachedAjaxCallObjectJs == null) { ! //read and output the embedded AjaxCallObject.js file from the manifest ! using (System.IO.StreamReader reader = new System.IO.StreamReader(typeof(MagicAjaxModule).Assembly.GetManifestResourceStream("MagicAjax.script.AjaxCallObject.js"))) ! { ! cachedAjaxCallObjectJs = reader.ReadToEnd(); ! } ! context.Cache.Insert("__CACHED_AJAXCALLOBJECT_JS", cachedAjaxCallObjectJs); } ! context.Response.Write(cachedAjaxCallObjectJs); ! context.Response.Cache.SetExpires(DateTime.Now.AddYears(1)); ! context.Response.End(); ! } ! else ! { ! // Init private fields ! _threadAbortExceptionThrown = false; ! _processedAjaxCall = false; ! _request = context.Request; ! _response = context.Response; ! ! // Create a new context and add it to the items collection for later retrieval ! // by MagicAjaxContext.Current ! _magicAjaxContext = new MagicAjaxContext(); ! HttpContext.Current.Items.Add(MagicAjaxContext.ContextKey, _magicAjaxContext); } } } *************** *** 437,441 **** HttpApplication application = (HttpApplication) sender; ! if (!_request.Url.AbsolutePath.EndsWith(".aspx")) { return; //if this wasn't a .aspx request, don't process --- 442,446 ---- HttpApplication application = (HttpApplication) sender; ! if (_request == null || !_request.Url.AbsolutePath.EndsWith(".aspx")) { return; //if this wasn't a .aspx request, don't process *************** *** 612,615 **** --- 617,623 ---- protected void Application_EndRequest(object sender, EventArgs e) { + if (_request == null) + return; + try { |
From: Dion O. <dol...@us...> - 2005-12-27 22:03:51
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18662/magicajax/Core/script Modified Files: AjaxCallObject.js Log Message: - Added Opera 8 support! - fix so MagicAjaxContext only gets built on an .aspx request, not for every ASP.NET 2.0 .axd (embedded resource) request Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** AjaxCallObject.js 26 Dec 2005 03:02:01 -0000 1.37 --- AjaxCallObject.js 27 Dec 2005 22:03:42 -0000 1.38 *************** *** 63,67 **** var attrib = element.getAttribute("AjaxCall"); ! if (attrib != null) return attrib.toLowerCase(); --- 63,67 ---- var attrib = element.getAttribute("AjaxCall"); ! if (attrib != null && attrib != '') return attrib.toLowerCase(); *************** *** 239,243 **** if ("activeElement" in document) { ! // Internet Explorer target = document.activeElement; } --- 239,243 ---- if ("activeElement" in document) { ! // Internet Explorer and Opera target = document.activeElement; } *************** *** 547,551 **** if( this.XmlHttp.status == 0 ) this.OnAbort(); ! else if( this.XmlHttp.status == 200 && this.XmlHttp.statusText == "OK" ) this.OnComplete(this.XmlHttp.responseText, this.XmlHttp.responseXML); else --- 547,551 ---- if( this.XmlHttp.status == 0 ) this.OnAbort(); ! else if( this.XmlHttp.status == 200 ) this.OnComplete(this.XmlHttp.responseText, this.XmlHttp.responseXML); else |
From: Argiris K. <be...@us...> - 2005-12-26 03:02:09
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12903/Core/script Modified Files: AjaxCallObject.js Log Message: Made __MAGICAJAX_CONFIG hidden field to always be posted to the server (if it exists). Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** AjaxCallObject.js 22 Dec 2005 21:06:36 -0000 1.36 --- AjaxCallObject.js 26 Dec 2005 03:02:01 -0000 1.37 *************** *** 87,103 **** } ! AjaxCallObject.prototype.ExcludeFromPost = function(element, zoneID, flags) { - if ( excfAllElements == (flags & excfAllElements) ) - return true; - var excludeAttr = element.getAttribute("ExcludeFromPost"); if (excludeAttr != null && excludeAttr.toLowerCase() == "true") return true; ! var name = element.name; if (element.type == "hidden") { if ( excfAllHidden == (flags & excfAllHidden) ) return true; --- 87,103 ---- } ! AjaxCallObject.prototype.ExcludeFromPost = function(element, scopeID, flags) { var excludeAttr = element.getAttribute("ExcludeFromPost"); if (excludeAttr != null && excludeAttr.toLowerCase() == "true") return true; ! var name = element.name; if (element.type == "hidden") { + if ( name == "__MAGICAJAX_CONFIG" ) + return false; + if ( excfAllHidden == (flags & excfAllHidden) ) return true; *************** *** 114,121 **** return true; ! if (zoneID != null) { fprintElem = document.getElementById(name.substr(fprintConst.length)); ! if ( ! this.IsInAjaxScope(fprintElem, zoneID) ) return true; } --- 114,121 ---- return true; ! if (scopeID != null) { fprintElem = document.getElementById(name.substr(fprintConst.length)); ! if ( ! this.IsInAjaxScope(fprintElem, scopeID) ) return true; } *************** *** 131,135 **** return true; ! return ( zoneID != null && !this.IsInAjaxScope(element, zoneID) ) } --- 131,135 ---- return true; ! return ( scopeID != null && !this.IsInAjaxScope(element, scopeID) ) } *************** *** 153,160 **** } ! AjaxCallObject.prototype.IsInAjaxScope = function(element, zoneID) { var attrib = element.getAttribute("AjaxLocalScope"); ! if ( attrib != null && attrib.toLowerCase() == "true" && element.getAttribute("id") == zoneID ) return true; --- 153,160 ---- } ! AjaxCallObject.prototype.IsInAjaxScope = function(element, scopeID) { var attrib = element.getAttribute("AjaxLocalScope"); ! if ( attrib != null && attrib.toLowerCase() == "true" && element.getAttribute("id") == scopeID ) return true; *************** *** 162,166 **** return false; else ! return this.IsInAjaxScope(element.parentNode, zoneID); } --- 162,166 ---- return false; else ! return this.IsInAjaxScope(element.parentNode, scopeID); } |
From: Argiris K. <be...@us...> - 2005-12-26 02:27:36
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7794/Core Modified Files: MagicAjaxModule.cs Log Message: Removed the MagicAjax.Collections reference Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** MagicAjaxModule.cs 22 Dec 2005 23:06:51 -0000 1.52 --- MagicAjaxModule.cs 26 Dec 2005 02:27:20 -0000 1.53 *************** *** 31,35 **** using System.Text.RegularExpressions; - using MagicAjax.Collections; using MagicAjax.Configuration; using MagicAjax.UI; --- 31,34 ---- |
From: Argiris K. <be...@us...> - 2005-12-25 18:00:36
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24623/Core Modified Files: MagicAjax NET 2.0.csproj MagicAjax.csproj Log Message: Removed ReadOnlyCollection class. Index: MagicAjax NET 2.0.csproj =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjax NET 2.0.csproj,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MagicAjax NET 2.0.csproj 22 Dec 2005 12:19:32 -0000 1.11 --- MagicAjax NET 2.0.csproj 25 Dec 2005 18:00:24 -0000 1.12 *************** *** 99,105 **** <SubType>Code</SubType> </Compile> - <Compile Include="Collections\ReadOnlyArrayList.cs"> - <SubType>Code</SubType> - </Compile> <Compile Include="Configuration\MagicAjaxConfiguration.cs"> <SubType>Code</SubType> --- 99,102 ---- Index: MagicAjax.csproj =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjax.csproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MagicAjax.csproj 22 Dec 2005 12:44:43 -0000 1.8 --- MagicAjax.csproj 25 Dec 2005 18:00:26 -0000 1.9 *************** *** 142,150 **** BuildAction = "Content" /> ! <File ! RelPath = "Collections\ReadOnlyArrayList.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> <File RelPath = "Configuration\MagicAjaxConfiguration.cs" --- 142,146 ---- BuildAction = "Content" /> ! <Folder RelPath = "Collections\" /> <File RelPath = "Configuration\MagicAjaxConfiguration.cs" |
From: Argiris K. <be...@us...> - 2005-12-25 18:00:35
|
Update of /cvsroot/magicajax/magicajax/Core/Collections In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24623/Core/Collections Removed Files: ReadOnlyArrayList.cs Log Message: Removed ReadOnlyCollection class. --- ReadOnlyArrayList.cs DELETED --- |
From: Argiris K. <be...@us...> - 2005-12-22 23:07:01
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16333/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Changed ToLower() to ToLower(System.Globalization.CultureInfo.InvariantCulture) Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** AjaxPanel.cs 22 Dec 2005 01:26:25 -0000 1.44 --- AjaxPanel.cs 22 Dec 2005 23:06:51 -0000 1.45 *************** *** 453,457 **** for (int j=0; j< attrnames.Count; j++) { ! attrNameValues.Add(attrnames[j].Value.ToLower(), attrvalues[j].Value); } --- 453,457 ---- for (int j=0; j< attrnames.Count; j++) { ! attrNameValues.Add(attrnames[j].Value.ToLower(System.Globalization.CultureInfo.InvariantCulture), attrvalues[j].Value); } *************** *** 459,466 **** // set to 'true', ignore it. if ( attrNameValues.ContainsKey("excludefrompost") ! && (attrNameValues["excludefrompost"] as String).ToLower() == "true") continue; ! string tag = match.Groups["tag"].Value.ToLower(); string name = (string)attrNameValues["name"]; string clientID = (string)attrNameValues["id"]; --- 459,466 ---- // set to 'true', ignore it. if ( attrNameValues.ContainsKey("excludefrompost") ! && (attrNameValues["excludefrompost"] as String).ToLower(System.Globalization.CultureInfo.InvariantCulture) == "true") continue; ! string tag = match.Groups["tag"].Value.ToLower(System.Globalization.CultureInfo.InvariantCulture); string name = (string)attrNameValues["name"]; string clientID = (string)attrNameValues["id"]; *************** *** 538,542 **** for (int k = 0; k < attrnamesOption.Count; k++) { ! attrNameValuesOption.Add(attrnamesOption[k].Value.ToLower(), attrvaluesOption[k].Value); } --- 538,542 ---- for (int k = 0; k < attrnamesOption.Count; k++) { ! attrNameValuesOption.Add(attrnamesOption[k].Value.ToLower(System.Globalization.CultureInfo.InvariantCulture), attrvaluesOption[k].Value); } |
From: Argiris K. <be...@us...> - 2005-12-22 23:07:01
|
Update of /cvsroot/magicajax/magicajax/Core/Configuration In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16333/Core/Configuration Modified Files: MagicAjaxConfiguration.cs Log Message: Changed ToLower() to ToLower(System.Globalization.CultureInfo.InvariantCulture) Index: MagicAjaxConfiguration.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Configuration/MagicAjaxConfiguration.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MagicAjaxConfiguration.cs 11 Dec 2005 17:42:03 -0000 1.11 --- MagicAjaxConfiguration.cs 22 Dec 2005 23:06:51 -0000 1.12 *************** *** 364,368 **** if (attrib != null) { ! switch (attrib.Value.ToLower()) { case "hashcode": --- 364,368 ---- if (attrib != null) { ! switch (attrib.Value.ToLower(System.Globalization.CultureInfo.InvariantCulture)) { case "hashcode": *************** *** 397,401 **** if (attrib != null) { ! switch (attrib.Value.ToLower()) { case "nostore": --- 397,401 ---- if (attrib != null) { ! switch (attrib.Value.ToLower(System.Globalization.CultureInfo.InvariantCulture)) { case "nostore": |
From: Argiris K. <be...@us...> - 2005-12-22 23:07:01
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16333/Core Modified Files: AjaxCallHelper.cs MagicAjaxContext.cs MagicAjaxModule.cs Util.cs Log Message: Changed ToLower() to ToLower(System.Globalization.CultureInfo.InvariantCulture) Index: AjaxCallHelper.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/AjaxCallHelper.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** AjaxCallHelper.cs 20 Dec 2005 23:51:40 -0000 1.16 --- AjaxCallHelper.cs 22 Dec 2005 23:06:51 -0000 1.17 *************** *** 323,327 **** public static void WriteSetVisibilityOfElementScript(string elementID, bool visible) { ! Write ( String.Format("AJAXCbo.SetVisibilityOfElement(\"{0}\",{1});\r\n", elementID ,visible.ToString().ToLower()) ); } --- 323,327 ---- public static void WriteSetVisibilityOfElementScript(string elementID, bool visible) { ! Write ( String.Format("AJAXCbo.SetVisibilityOfElement(\"{0}\",{1});\r\n", elementID ,visible.ToString().ToLower(System.Globalization.CultureInfo.InvariantCulture)) ); } Index: MagicAjaxContext.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxContext.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MagicAjaxContext.cs 11 Dec 2005 21:37:41 -0000 1.10 --- MagicAjaxContext.cs 22 Dec 2005 23:06:51 -0000 1.11 *************** *** 228,232 **** if (caps.Browser != null && caps.EcmaScriptVersion.Major >= 1) { ! switch (caps.Browser.ToLower()) { case "ie": --- 228,232 ---- if (caps.Browser != null && caps.EcmaScriptVersion.Major >= 1) { ! switch (caps.Browser.ToLower(System.Globalization.CultureInfo.InvariantCulture)) { case "ie": *************** *** 234,238 **** break; case "gecko": ! _isBrowserSupported = caps.Type.ToLower().StartsWith("firefox") && caps.MajorVersion >= 1; break; case "firefox": --- 234,238 ---- break; case "gecko": ! _isBrowserSupported = caps.Type.ToLower(System.Globalization.CultureInfo.InvariantCulture).StartsWith("firefox") && caps.MajorVersion >= 1; break; case "firefox": Index: Util.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Util.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Util.cs 21 Dec 2005 00:40:23 -0000 1.18 --- Util.cs 22 Dec 2005 23:06:51 -0000 1.19 *************** *** 69,73 **** { Match match = scriptMatches[i]; ! string tag = match.Value.ToLower(); if (tag.IndexOf(" src=") == -1) --- 69,73 ---- { Match match = scriptMatches[i]; ! string tag = match.Value.ToLower(System.Globalization.CultureInfo.InvariantCulture); if (tag.IndexOf(" src=") == -1) *************** *** 138,142 **** for (int j=0; j < attributes.Count; j++) { ! string attrname = attrnames[j].Value.ToLower(); attrNameValues.Add (attrname, attrvalues[j].Value); attrCaptures.Add (attrname, attributes[j]); --- 138,142 ---- for (int j=0; j < attributes.Count; j++) { ! string attrname = attrnames[j].Value.ToLower(System.Globalization.CultureInfo.InvariantCulture); attrNameValues.Add (attrname, attrvalues[j].Value); attrCaptures.Add (attrname, attributes[j]); *************** *** 146,153 **** // set to 'true', ignore it. We will need its value for the fingerprint. if ( attrNameValues.ContainsKey("excludefrompost") ! && (attrNameValues["excludefrompost"] as String).ToLower() == "true") continue; ! string tag = match.Groups["tag"].Value.ToLower(); string name = (string)attrNameValues["name"]; --- 146,153 ---- // set to 'true', ignore it. We will need its value for the fingerprint. if ( attrNameValues.ContainsKey("excludefrompost") ! && (attrNameValues["excludefrompost"] as String).ToLower(System.Globalization.CultureInfo.InvariantCulture) == "true") continue; ! string tag = match.Groups["tag"].Value.ToLower(System.Globalization.CultureInfo.InvariantCulture); string name = (string)attrNameValues["name"]; Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** MagicAjaxModule.cs 22 Dec 2005 19:18:43 -0000 1.51 --- MagicAjaxModule.cs 22 Dec 2005 23:06:51 -0000 1.52 *************** *** 159,163 **** bool unloadStoredPage = magicAjaxContext.Configuration.PageStore.UnloadStoredPage; ! page.RegisterStartupScript("AJAXCALL_HOOK", String.Format(STARTUP_SCRIPT_FORMAT, location, "AjaxCallObject.js", pageIsStored.ToString().ToLower(), unloadStoredPage.ToString().ToLower(), magicAjaxContext.Configuration.Tracing.ToString().ToLower())); } } --- 159,163 ---- bool unloadStoredPage = magicAjaxContext.Configuration.PageStore.UnloadStoredPage; ! page.RegisterStartupScript("AJAXCALL_HOOK", String.Format(STARTUP_SCRIPT_FORMAT, location, "AjaxCallObject.js", pageIsStored.ToString().ToLower(System.Globalization.CultureInfo.InvariantCulture), unloadStoredPage.ToString().ToLower(System.Globalization.CultureInfo.InvariantCulture), magicAjaxContext.Configuration.Tracing.ToString().ToLower(System.Globalization.CultureInfo.InvariantCulture))); } } *************** *** 813,817 **** if (con is WebControl && ((WebControl)con).Attributes["ExcludeFromPost"] != null ! && ((WebControl)con).Attributes["ExcludeFromPost"].ToLower() == "true") continue; --- 813,817 ---- if (con is WebControl && ((WebControl)con).Attributes["ExcludeFromPost"] != null ! && ((WebControl)con).Attributes["ExcludeFromPost"].ToLower(System.Globalization.CultureInfo.InvariantCulture) == "true") continue; |
From: Dion O. <dol...@us...> - 2005-12-22 21:06:47
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21334/magicajax/Core/script Modified Files: AjaxCallObject.js Log Message: Modified GetTargetElement function, so calendar clicks inside a user control are found (caused by .NET 1.1 calendar control bug) Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** AjaxCallObject.js 22 Dec 2005 01:15:20 -0000 1.35 --- AjaxCallObject.js 22 Dec 2005 21:06:36 -0000 1.36 *************** *** 186,189 **** --- 186,192 ---- break; } + // If no element found, try last id (fixes .NET 1.1 calendar control bug) + if (target == null && ids.length > 1) + target = document.getElementById(ids[ids.length-1]); return target; |
From: Dion O. <dol...@us...> - 2005-12-22 19:18:57
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31465/magicajax/Core Modified Files: MagicAjaxModule.cs Log Message: - fix: ASP.NET 2.0 embedded resource only used when Context.Current.Handler is of type Page Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** MagicAjaxModule.cs 22 Dec 2005 12:19:32 -0000 1.50 --- MagicAjaxModule.cs 22 Dec 2005 19:18:43 -0000 1.51 *************** *** 113,117 **** // Provides the location of the script file. string location = magicAjaxContext.Configuration.ScriptPath; ! string includeScript; // If script location is null, use embedded AjaxCallObject.js file --- 113,117 ---- // Provides the location of the script file. string location = magicAjaxContext.Configuration.ScriptPath; ! string includeScript = null; // If script location is null, use embedded AjaxCallObject.js file *************** *** 119,128 **** { #if NET_2_0 ! // Use the webresource url for AjaxCallObject.js ! includeScript = String.Format("<script type=\"text/javascript\" src=\"{0}\"></script>", page.ClientScript.GetWebResourceUrl(typeof(MagicAjaxModule), "MagicAjax.script.AjaxCallObject.js")); ! #else ! // src-request to "AjaxCallObject.js.aspx" will be handled by Application_BeginRequest, which returns the embedded AjaxCallObject.js script ! includeScript = String.Format("<script type=\"text/javascript\" src=\"{0}/{1}\"></script>", MagicAjaxContext.Current.MagicAjaxVersion, "AjaxCallObject.js.aspx"); ! #endif } else --- 119,133 ---- { #if NET_2_0 ! // Use the webresource url for AjaxCallObject.js (only for default Page HttpHandler) ! if (HttpContext.Current.Handler is Page) ! { ! includeScript = String.Format("<script type=\"text/javascript\" src=\"{0}\"></script>", page.ClientScript.GetWebResourceUrl(typeof(MagicAjaxModule), "MagicAjax.script.AjaxCallObject.js")); ! } ! #endif ! if (includeScript == null) ! { ! // src-request to "AjaxCallObject.js.aspx" will be handled by Application_BeginRequest, which returns the embedded AjaxCallObject.js script ! includeScript = String.Format("<script type=\"text/javascript\" src=\"{0}/{1}\"></script>", MagicAjaxContext.Current.MagicAjaxVersion, "AjaxCallObject.js.aspx"); ! } } else |
From: Dion O. <dol...@us...> - 2005-12-22 19:04:34
|
Update of /cvsroot/magicajax/magicajax/Docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26935/magicajax/Docs Modified Files: Changelog.html Log Message: updated Index: Changelog.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Changelog.html,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Changelog.html 22 Dec 2005 01:15:20 -0000 1.18 --- Changelog.html 22 Dec 2005 19:04:24 -0000 1.19 *************** *** 58,61 **** --- 58,63 ---- <ul> <li> + MagicAjax.dll is now strongly named (public key token bf4053b35db106f3), so MagicAjax.dll can be registered in the GAC. + <li> AjaxCall event is renamed to AjaxCallStart <LI> |