0

電子メール アイテムの行を右クリックすると表示されるコンテキスト メニュー (zimbra の中央のパネルに表示されるタイプ) を変更することはできますか? ここに例があります...

ContentObject タイプは近いですが、決定的なものを見つけることができないようです。

総 zimbra/zimlet newb あまりにもところで。

4

2 に答える 2

0

これを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);
于 2016-07-14T12:44:00.717 に答える