[CLOSED] DESKTOP : DesktopShortcut Functionality

  1. #1

    [CLOSED] DESKTOP : DesktopShortcut Functionality

    Hi there,

    I am stuck with this problem.

    I am using ext:Desktop. Everything was fine till I need to use shortcuts to call functions. Probably I am missing something, but I coundn't make it work.

    what I can do with ext:button as follows,

    <ext:Button ID="btnAdd" runat="server" Text="Add Friend" MinWidth="50px" Icon="HeartAdd">
    <Listeners><Click Handler="Coolite.AjaxMethods.addFriend();" /></Listeners>
    </ext:Button>
    I am tring to call same function via Desktop Icons,

    However looks like it totally ignores.
    I tried to deal with ext:DesktopModule , Launcher, ext:DesktopShortCut to inject listeners, Ajaxevents etc. But couln't make it work.

    I have 2 goals,
    1. Able to use shortcut for a simple link like `href`
    2. To able to call JS functions or AjaxMethods. If i can do this, I can use response.redirect for my first goal.

    Thanks a lot.
  2. #2

    RE: [CLOSED] DESKTOP : DesktopShortcut Functionality

    Hi,

    We added ShortcutClick Listener/AjaxEvent.
    Please note that now a Shortcut has ModuleID and ShortcutID. If you specify ModuleID then the window will be shown which related with module. If you specify ShortcutID then ShortcutClick listener/ajaxevent will be fired with arguments (id, e): id - shortcut id, e - event object (http://extjs.com/deploy/dev/docs/?class=Ext.EventObject)

    Here is a small sample:
    <%@ Page Language="C#" %>
    
    <%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Desktop - Coolite Toolkit Examples</title>    
        
        <script runat="server">
            
            protected void ShortcutClick(object sender, AjaxEventArgs e)
            {
                ScriptManager1.AddScript("alert('AjaxEvent: {0}');", e.ExtraParams["id"]);
            }
    
        </script>
        
        <style type="text/css">                
            .shortcut-icon {
                width:48px;
                height:48px;            
            }
            
            .icon-window48 {
                background-image: url(window48x48.png) !important;
                filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="window48x48.png", sizingMethod="scale");
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug"/>
            
            <ext:Desktop ID="MyDesktop" runat="server" BackgroundColor="Black" ShortcutTextColor="White">
                
                <Shortcuts>
                   
                    <ext:DesktopShortcut ShortcutID="customF" Text="Call server" IconCls="shortcut-icon icon-window48" />
    
                </Shortcuts>
                
                <Listeners>
                    <ShortClick Handler="alert('Listener: ' + id);" />
                </Listeners>
                
                <AjaxEvents>
                    <ShortClick OnEvent="ShortcutClick">
                        <ExtraParams>
                            <ext:Parameter Name="id" Value="id" Mode="Raw" />
                        </ExtraParams>
                    </ShortClick>
                </AjaxEvents>
                
               
            </ext:Desktop>
            
            
        </form>
    </body>
    </html>

  3. #3

    RE: [CLOSED] DESKTOP : DesktopShortcut Functionality

    Sorry for late answer Vladimir , Thanks a lot.
  4. #4

    RE: [CLOSED] DESKTOP : DesktopShortcut Functionality

    Hi,
    But 'Listeners' and 'AjaxEvents' is not Coolite.Ext.Web.Desktop's property. Why?
  5. #5

    RE: [CLOSED] DESKTOP : DesktopShortcut Functionality

    The icon doesnt appear on IE.
  6. #6

    RE: [CLOSED] DESKTOP : DesktopShortcut Functionality

    Hi joao.msdn,

    Please check example from Examples Explorer
    https://examples1.ext.net/#/Desktop/...tion/Overview/


    Does it work for you? If no then create new topic




Similar Threads

  1. Replies: 1
    Last Post: Jun 04, 2012, 1:14 PM
  2. [CLOSED] Ext.Desktop functionality
    By ecko in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 10, 2012, 3:17 PM
  3. DesktopShortcut and Dynamic Window
    By sfvaleriano in forum 1.x Help
    Replies: 1
    Last Post: Sep 18, 2009, 4:56 AM
  4. DesktopShortcut Icon IE8
    By Maia in forum 1.x Help
    Replies: 1
    Last Post: May 06, 2009, 5:43 PM
  5. How to add an icon to ext:DesktopShortCut?
    By mcdonald in forum 1.x Help
    Replies: 4
    Last Post: Mar 24, 2009, 2:24 AM

Posting Permissions