【问题标题】:Zimbra Right Click zimlet ... possible?Zimbra 右键单击​​ zimlet ...可能吗?
【发布时间】:2014-07-31 23:22:22
【问题描述】:

是否可以更改右键单击电子邮件项目行时弹出的上下文菜单(显示在 zimbra 中间面板中的类型)。 Here's an example ...

ContentObject 类型很接近,但我似乎找不到任何结论。

顺便说一句,总的 zimbra/zimlet newb。

【问题讨论】:

    标签: zimbra


    【解决方案1】:

    是的,您绝对可以添加项目。 (我只添加了项目,没有删除项目)。基本上,您将把功能放入

    onActionMenuInitialized = function(controller, actionMenu) {
      // do some stuff here that adds a menu item
      // and make sure you add a selection listener to that item.
    }
    

    您可以在the Zimbra forum. 上关注一个示例

    【讨论】:

      【解决方案2】:

      我刚刚使用 Zimbra 8.6.0 进行了检查。

      // You should run this code after "Mail" app initialization
      // (after its tab activation if you want to check this manually via browser console or
      // after "app launched" event notification in your zimlet, see ZmZimletBase.prototype.appLaunch documentation)
      
      var ml = DwtControl.ALL_BY_ID["zl__CLV-main"];
      
      var menu = new ZmPopupMenu(ml);
      var mi = menu.createMenuItem("some_id", {text: "Click me"});
      mi.addSelectionListener(new AjxListener(null, function(){ console.log("you've just clicked 'Click me' menu item") }));
      menu.createSeparator();
      mi = menu.createMenuItem("another_id", {text: "Another action"});
      mi.addSelectionListener(new AjxListener(null, function(){ console.log("you've just clicked 'Another action' menu item") }));
      
      var listeners = ml._evtMgr._listeners[ZmEvent.S_ACTION];
      listeners.removeAll();
      var listener = new AjxListener(null, function(ev) {
          menu.setLocation(ev.docX, ev.docY);
          menu.popup();
      });
      listeners.add(listener);
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-11-11
        • 1970-01-01
        • 2018-11-18
        • 2011-01-25
        • 2012-11-06
        • 1970-01-01
        • 2011-01-11
        相关资源
        最近更新 更多