How to remove RadWindowManager dialog templates?

3 posts, 0 answers
  1. Cory Benjamin
    Cory Benjamin avatar
    18 posts
    Member since:
    Jul 2006

    Posted 21 May 2010 Link to this post

    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. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 25 May 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cory Benjamin
    Cory Benjamin avatar
    18 posts
    Member since:
    Jul 2006

    Posted 25 May 2010 Link to this post

    Thanks!!!
Back to Top