This commit is contained in:
Shannon Deminick
2012-10-18 07:17:20 +05:00
2 changed files with 5 additions and 4 deletions

View File

@@ -2188,9 +2188,9 @@
<Content Include="config\log4net.config" />
<Content Include="config\FileSystemProviders.config" />
<Content Include="config\EmbeddedMedia.config" />
<Content Include="web.config">
<None Include="web.config">
<SubType>Designer</SubType>
</Content>
</None>
<None Include="web.Template.BODENKO-04.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
<SubType>Designer</SubType>

View File

@@ -141,13 +141,14 @@ namespace umbraco.uicontrols.TreePicker
/// </summary>
protected virtual void RenderJSComponents()
{
const string scriptKey = "BaseTreePickerScripts";
if (ScriptManager.GetCurrent(Page).IsInAsyncPostBack)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), this.GetType().ToString(), BaseTreePickerScripts.BaseTreePicker, true);
ScriptManager.RegisterStartupScript(this, this.GetType(), scriptKey, BaseTreePickerScripts.BaseTreePicker, true);
}
else
{
Page.ClientScript.RegisterClientScriptBlock(typeof(BaseTreePicker), this.GetType().ToString(), BaseTreePickerScripts.BaseTreePicker, true);
Page.ClientScript.RegisterClientScriptBlock(typeof(BaseTreePicker), scriptKey, BaseTreePickerScripts.BaseTreePicker, true);
}
}