This is a migrated thread and some comments may be shown as answers.

How to remove RadWindowManager dialog templates?

2 Answers 75 Views
Window
This is a migrated thread and some comments may be shown as answers.
Cory Benjamin
Top achievements
Rank 2
Cory Benjamin asked on 21 May 2010, 08:17 PM
I am using RadWindowManager because I need to use radopen's "open from URL" capability. However, I am not using RadWindowManager's dialogs.  Is there a way for me to have the RadWindowManager not output the following code?  The RadWindowManager is on my master because because it is used in the header of my application, so this is a lot of unneeded HTML that gets put on every page. Thanks.

        
<div id="ctl00_StandardWindowManager" style="z-index:7001;display:none;">
<!-- 2010.1.415.40 --><div id="ctl00_StandardWindowManager_alerttemplate" style="display:none;">
<div class="rwDialogPopup radalert">
<div class="rwDialogText">
{1}
</div>

<div>
<a onclick="$find('{0}').close();"
class="rwPopupButton" href="javascript:void(0);">
<span class="rwOuterSpan">
<span class="rwInnerSpan">##LOC[OK]##</span>

					</span>
				</a>				
			</div>
		</div>
		</div><div id="ctl00_StandardWindowManager_prompttemplate" style="display:none;">
		 <div class="rwDialogPopup radprompt">			
			    <div class="rwDialogText">
			    {1}				
			    </div>		
			    <div>
				    <script type="text/javascript">
				    function RadWindowprompt_detectenter(id, ev, input)
				    {							
					    if (!ev) ev = window.event;                
					    if (ev.keyCode == 13)
					    {															        
					        var but = input.parentNode.parentNode.getElementsByTagName("A")[0];					        
					        if (but)
						    {							
							    if (but.click) but.click();
							    else if (but.onclick)
							    {
							        but.focus(); var click = but.onclick; but.onclick = null; if (click) click.call(but);							 
							    }
						    }
					       return false;
					    } 
					    else return true;
				    }	 
				    </script>
				    <input  onkeydown="return RadWindowprompt_detectenter('{0}', event, this);" type="text"  class="rwDialogInput" value="{2}" />
			    </div>
			    <div>
				    <a onclick="$find('{0}').close(this.parentNode.parentNode.getElementsByTagName('input')[0].value);"				
					    class="rwPopupButton" href="javascript:void(0);" ><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[OK]##</span></span></a>
				    <a onclick="$find('{0}').close(null);" class="rwPopupButton"  href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[Cancel]##</span></span></a>
			    </div>
		    </div>				       
		</div><div id="ctl00_StandardWindowManager_confirmtemplate" style="display:none;">
		<div class="rwDialogPopup radconfirm">			
			<div class="rwDialogText">
			{1}				
			</div>						
			<div>
				<a onclick="$find('{0}').close(true);"  class="rwPopupButton" href="javascript:void(0);" ><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[OK]##</span></span></a>
				<a onclick="$find('{0}').close(false);" class="rwPopupButton"  href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[Cancel]##</span></span></a>
			</div>
		</div>		
		</div><input id="ctl00_StandardWindowManager_ClientState" name="ctl00_StandardWindowManager_ClientState" type="hidden" />
</div>

2 Answers, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 25 May 2010, 01:37 PM
Hello Cory,

You can reduce the rendered HTML, by  adding &nbsp; to the ConfirmTemplate, AlertTemplate and PromptTemplate, as shown in the following sample:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            <ConfirmTemplate>&nbsp;</ConfirmTemplate>
            <AlertTemplate>&nbsp;</AlertTemplate>
            <PromptTemplate>&nbsp;</PromptTemplate>
        </telerik:RadWindowManager>
    </div>
    </form>
</body>
</html>

Hope this helps.

Greetings,
Petio Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Cory Benjamin
Top achievements
Rank 2
answered on 25 May 2010, 09:21 PM
Thanks!!!
Tags
Window
Asked by
Cory Benjamin
Top achievements
Rank 2
Answers by
Petio Petkov
Telerik team
Cory Benjamin
Top achievements
Rank 2
Share this question
or