Author: igorz
Date: 2007-06-21 09:50:01 -0400 (Thu, 21 Jun 2007)
New Revision: 80476
Modified:
trunk/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
Log:
rafactoring
Modified: trunk/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
===================================================================
--- trunk/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
2007-06-21 13:31:09 UTC (rev 80475)
+++ trunk/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
2007-06-21 13:50:01 UTC (rev 80476)
@@ -91,6 +91,8 @@
string _scriptPath;
ScriptEntry _clientScriptBlocks;
ScriptEntry _startupScriptBlocks;
+ ScriptEntry _scriptIncludes;
+ ScriptEntry _onSubmitStatements;
List<ArrayDeclaration> _arrayDeclarations;
Hashtable _hiddenFields;
@@ -478,7 +480,7 @@
{
ScriptManager sm = GetCurrent (page);
if (sm.IsInAsyncPostBack)
- RegisterScript (ref sm._clientScriptBlocks,
type, key, url, ScriptEntryType.ScriptPath);
+ RegisterScript (ref sm._scriptIncludes, type,
key, url, ScriptEntryType.ScriptPath);
else
page.ClientScript.RegisterClientScriptInclude
(type, key, url);
}
@@ -600,7 +602,7 @@
{
ScriptManager sm = GetCurrent (page);
if (sm.IsInAsyncPostBack)
- RegisterScript (ref sm._clientScriptBlocks,
type, key, script, ScriptEntryType.OnSubmit);
+ RegisterScript (ref sm._onSubmitStatements,
type, key, script, ScriptEntryType.OnSubmit);
else
page.ClientScript.RegisterOnSubmitStatement
(type, key, script);
}
@@ -658,7 +660,7 @@
ScriptEntry entry = scriptList;
while (entry != null) {
- if (entry.Type == type && entry.Key == key &&
entry.ScriptEntryType == scriptEntryType)
+ if (entry.Type == type && entry.Key == key)
return;
last = entry;
entry = entry.Next;
@@ -769,7 +771,9 @@
WriteArrayDeclarations (output);
WriteScriptBlocks (output, _clientScriptBlocks);
+ WriteScriptBlocks (output, _scriptIncludes);
WriteScriptBlocks (output, _startupScriptBlocks);
+ WriteScriptBlocks (output, _onSubmitStatements);
WriteHiddenFields (output);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches