是否可以更改右键单击电子邮件项目行时弹出的上下文菜单(在zimbra的中间面板中显示的类型)。Here's an example ...
ContentObject类型很接近,但我似乎找不到任何确凿的东西。
完全齐姆布拉/zimlet newb太btw。
发布于 2014-08-19 06:55:37
(我只添加了项目,没有删除项目)。基本上,你要把这个功能放在
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.上有一个你可以效仿的例子
发布于 2016-07-14 20:44:01
我刚刚用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);https://stackoverflow.com/questions/25070541
复制相似问题