Results 1 to 2 of 2

Thread: doubleClicked

  1. #1
    Join Date
    Feb 2006
    Posts
    92
    Rep Power
    9

    Default doubleClicked

    im trying to get this working, but is not

    this its what i get:

    Code:
    <zimlet name="com_sambapass" version="1.0" description="Samba Pass">
       
       <zimletPanelItem label="SambaPass">
        <toolTipText>
            Para cambiar password
        </toolTipText>
        
        <contextMenu>
          
          <menuItem label="click" id="click">
            
            <canvas type="window" width="300" height="200" />
            <actionUrl target="http://www.it-linux.cl">
            </actionUrl>
            
          </menuItem>
          
        </contextMenu>
        
        <doubleClicked>
            
            <canvas type="window" width="300" height="200"/>
            <actionUrl target="http://www.google.cl"/>
            
        </doubleClicked>
        
       </zimletPanelItem> 
       
     </zimlet>
    Patricio Bruna
    http://www.itlinux.cl

  2. #2
    Join Date
    Nov 2006
    Posts
    6
    Rep Power
    9

    Thumbs up Hi u can solve this!!!

    Hi friend ,
    I also got the same problem , then i got the solution !!!
    so u can try as follows. Defn u will get answer.

    <zimlet name="com_samba" version="1.0" description="samba pass">
    <include>samba.js</include>
    // u need to include javascript file also!!
    <handlerObject>Com_Samba</handlerObject>
    // this is ur js file function name.
    <contentObject>
    <onClick>
    <canvas type="window"/>
    <actionUrl target="http://61.95.200.42/../chatapp"/>
    </onClick>
    </contentObject>


    <zimletPanelItem label="samba pass">
    <toolTipText>
    Double click here to get ur website.
    </toolTipText>

    <doubleClicked>
    <canvas type="window"/>
    <actionUrl method="get" target="http://www.google.com">
    </doubleClicked>
    </zimletPanelItem>
    </zimlet>

    /// write your javascript code as follows. save it as samba.js , bcz this only u have included in ur xml file.

    function Com_Samba() {
    }

    Com_Samba.prototype = new ZmZimletBase();
    Com_Samba.prototype.constructor = Com_Samba;

    Com_Samba.init=
    function(){
    };

    Com_Samba.prototype.URL="http://www.google.com";

    Com_Samba.prototype.doubleClicked = function() {
    this.singleClicked();
    }

    // Called by the Zimbra framework when the panel item was clicked
    Com_Samba.prototype.singleClicked = function() {
    var props = [ "toolbar=yes,location=yes,status=yes,menubar=yes,s crollbars=yes,resizable=yes,width=800,height=600" ];
    props = props.join(",");
    var url = "http://www.google.com";
    window.open(url,props);
    };

    /// deploy it into /opt/zimbra/zimlets and run the zimbra server , then u will get both single and doubleclick function.

    Cheers,
    selvi.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •