johndoh / roundcube-contextmenu Goto Github PK
View Code? Open in Web Editor NEWAdds context menus to various parts of Roundcube
Home Page: https://plugins.roundcube.net/#/packages/johndoh/contextmenu
Adds context menus to various parts of Roundcube
Home Page: https://plugins.roundcube.net/#/packages/johndoh/contextmenu
Hey, i maintain the keyboard_shortcuts plugin. This plugin stops working after using the contextmenu plugin because that plugin unbinds keypress, which seemingly unbinds all of them, including the ones necessary for the shortcuts plugin. Kind of a difficult thing for these 2 to co-exist :)
Hi,
i have RC running in an iframe.
When i refresh the page, the contextmenu doesn't show anymore.
Instead the browser menu is shown.
Any ideas?
The result of $imap->search($mbox, 'ALL UNSEEN', RCMAIL_CHARSET);
has a different type depending on whether unread messages are in a thread:
[29-Mar-2010 19:02:38] Array
(
[0] => 484
)
[29-Mar-2010 19:04:03] Array
(
[tree] => Array
(
[1243] => Array
(
)
[1244] => Array
(
[1245] => Array
(
)
)
)
[depth] => Array
(
[1243] => 0
[1244] => 0
[1245] => 1
)
[children] => Array
(
[1243] =>
[1244] => 1
[1245] =>
)
)
The contextmenu plugin slows down IE whenever switching to the main mail view.
For instance, this also happens on start-up.
Run Roundcube with and without Contextmenu inside IE 10. Start the IE Profiler. If you switch to current view: Call tree, you will notice that with Contextmenu enabled, the total time for rendering the page view goes up by almost 100%.
The code that is likely responsible for the delay:
if (window.rcmail) {
// init message list menu
if ($('#rcmContextMenu').length > 0) {
rcmail.addEventListener('listupdate', function(props) { rcm_contextmenu_update(); } );
rcmail.addEventListener('insertrow', function(props) { rcm_contextmenu_init(props.row.id); } ); // <--------- slow down
}
Note that I have 50 rows displayed in my mail view by default. So that function rcmail.addEventListener('insertrow'....) gets called 50 times. The more rows you display, the more noticeable the relative slowdown compared to running RC without contextmenu.
Actualy the context menu did not disapear if it's not used, and the user have to left clic outside to make it disapear if no use.
It will be convenient to be abble to make disapear the context menu if
diff --git a/contextmenu.js b/contextmenu.js
old mode 100755
new mode 100644
index 048f6d4..a8d0691
--- a/contextmenu.js
+++ b/contextmenu.js
@@ -310,9 +310,9 @@ function rcm_update_options(el) {
}
}
else if ($(el).hasClass('addressbook')) {
- var matches = $(el).attr('id').match(/rcmli([A-Z0-9\-_]+)/i);
+ var addressBookId = $(el).children('a').attr('rel');
- if (!rcmail.env.address_sources[matches[1]].readonly)
+ if (!rcmail.env.address_sources[addressBookId].readonly)
$('#rcmGroupMenu').enableContextMenuItems('#group-create')
}
}
If addressbook is read-only "Create new group" action is correctly disabled. However, "Rename group" and "Delete group" are active, but they should not.
In version 1, there was the rcm_contextmenu_register_command
function to append additional commands to existing menus. I couldn't find the proper way how to do this in version 2.
Furthermore I'd appreciate some documentation about how to add custom context menus from other plugins. Instead of adding my own context menu foo to the calendar plugin,I'd like to use the existing capabilities of your plugin.
I just implemented folder-selector widget. See new copy/move to actions in "More actions..." menu. I think, contextmenu plugin should use it instead implementing this by itself.
BTW, I used a few icons from your plugin, thanks.
Sometimes, a left-clic outside the context-menu did not close it.
How to reproduce :
Event, worst, if rigth-clic in the preview pane beacuse this will open the the brownser context-menu, and so the user have then two different context menus opened in the same time.
Steps:
I propose to close the menu in step 2.
Tested with Chromium browser.
Message subject needs to be encoded like message body. If user puts subject with non-ASCII characters (in my situation some polish chars) the message is recognized as 'BAD-HEADER' by Amavis, additionally SpamAssassin gives about 1.5 point to it.
Hi JohnDoh!
When using Context-Menu there is a problem. When I right-click on message, there is a high processor usage and i must wait couple of seconds to see it. Problem is much worse when I try to copy/move message to another folder. (i must wait to see folder list). On IE8 it works not bad but on FF 3.6.3 its difficult to use it (wait about 10 sec.) Disable copymessage plugin reduce by about 2 seconds of waiting.
In Firefox 31 the popup menu is opened on mouse down but immediately closed on mouse up.
Some submenus do not contain icons, e.g. Reply all, Forward, Export. They look strange with this left padding, it should be removed. I.e. do not use .iconized class if original element does not use it.
Hi,
double clicking on a message doesn't work on Roundcube 0.7.x when contextmenu plugin is enabled. Server throws a HTTP 500 error and logs show the following error:
[12-Mar-2012 11:31:42 UTC] PHP Fatal error: Call to a member function get_hierarchy_delimiter() on a non-object in /var/www/html/roundcube/plugins/contextmenu/contextmenu.php on line 128
After studying the code and comparing current stable Roundcube release (0.7.2) with latest trunk, seems that plugin is prepared to work with Roundcube from SVN, but Roundcube 0.7.x lacks some interfaces (i.e. an abstract storage
container) that makes this plugin unusable on 0.7.x.
After searching the plugin code for storage string I have realized that marking a folder as read doesn't work either.
If zipdownload plugin is enabled the Download action from More actions menu opens submenu. Two issues here:
GET requests should not be used for actions that change data state. With current code attacker can prepare a request to mark all messages as \Seen in any folder.
Please, use POST, i.e. http_post() not http_request().
We're using slightly modified addressbooks list and having javascript errors. In rcm_abookmenu_init() around line 91 you have String($(this).children('a').attr('rel')).match(/([A-Z0-9-_]+)/i).
I have the same issue as described in #31. The context menu hides immediately when you release the right click.
I'm using firefox 27 and plugin version 2.0. I tested with chrome and it works fine.
Version 1.3 does not has such problem with both firefox and chrome.
Context menu doesn’t show at all in Firefox and no errors in JS console. However, it works in Chromium 35.
contextmenu 2.0, Roundcube 1.0.1 (skin Larry), Firefox 30.0, OS X 10.9.3
Hello. I have no problem with version 2.0, but master version 2.1 gives me TypeError: list_object.get_row_uid is not a function at contextmenu.js:27
Just installed 1.9 plugin version on larry skin of Roundcube 0.8.1. But in IE8 there is an issue when this browser minimized while clicking on any message in list. In Firefox and Chrome everything works fine. Please check this issue.
When the task is "show", the contextmenu.css, contextmenu.js, jquery....js will be appended twice to the html header.
FIX:
Remove the hook at the end of addressbooks_list and show_mailbox_menu function.
diff --git a/CHANGELOG b/CHANGELOG
old mode 100755
new mode 100644
diff --git a/README b/README
old mode 100755
new mode 100644
diff --git a/contextmenu.js b/contextmenu.js
old mode 100755
new mode 100644
diff --git a/contextmenu.php b/contextmenu.php
old mode 100755
new mode 100644
diff --git a/jquery.contextMenu.js b/jquery.contextMenu.js
old mode 100755
new mode 100644
diff --git a/jquery.mousewheel.js b/jquery.mousewheel.js
old mode 100755
new mode 100644
diff --git a/localization/ca_ES.inc b/localization/ca_ES.inc
old mode 100755
new mode 100644
diff --git a/localization/cs_CZ.inc b/localization/cs_CZ.inc
old mode 100755
new mode 100644
diff --git a/localization/da_DK.inc b/localization/da_DK.inc
old mode 100755
new mode 100644
diff --git a/localization/de_CH.inc b/localization/de_CH.inc
old mode 100755
new mode 100644
diff --git a/localization/de_DE.inc b/localization/de_DE.inc
old mode 100755
new mode 100644
diff --git a/localization/en_GB.inc b/localization/en_GB.inc
old mode 100755
new mode 100644
diff --git a/localization/en_US.inc b/localization/en_US.inc
old mode 100755
new mode 100644
diff --git a/localization/es_ES.inc b/localization/es_ES.inc
old mode 100755
new mode 100644
diff --git a/localization/fr_FR.inc b/localization/fr_FR.inc
old mode 100755
new mode 100644
diff --git a/localization/gl_ES.inc b/localization/gl_ES.inc
old mode 100755
new mode 100644
diff --git a/localization/hu_HU.inc b/localization/hu_HU.inc
old mode 100755
new mode 100644
diff --git a/localization/it_IT.inc b/localization/it_IT.inc
old mode 100755
new mode 100644
diff --git a/localization/nl_NL.inc b/localization/nl_NL.inc
old mode 100755
new mode 100644
diff --git a/localization/pl_PL.inc b/localization/pl_PL.inc
old mode 100755
new mode 100644
diff --git a/localization/pt_BR.inc b/localization/pt_BR.inc
old mode 100755
new mode 100644
diff --git a/localization/ro_RO.inc b/localization/ro_RO.inc
old mode 100755
new mode 100644
diff --git a/localization/ru_RU.inc b/localization/ru_RU.inc
old mode 100755
new mode 100644
diff --git a/localization/sv_SE.inc b/localization/sv_SE.inc
old mode 100755
new mode 100644
diff --git a/localization/tr_TR.inc b/localization/tr_TR.inc
old mode 100755
new mode 100644
diff --git a/localization/uk_UA.inc b/localization/uk_UA.inc
old mode 100755
new mode 100644
diff --git a/localization/zh_TW.inc b/localization/zh_TW.inc
old mode 100755
new mode 100644
It seems that days parameter isn't checked correctly by JS script. The user can put value '0'.
When clicking on the list of searched contacts javascript error is throwed:
Error: rcmail.env.address_sources[rcmail.env.source] is undefined
File: contextmenu.js
Row: 322
else if (menu == 'abooklist' && $(p.item).children('a').hasClass('add')) {
$(p.item).children('a').children('span').text($('#directorylist-footer a.add').attr('title'));
}
above code in skins/larry/functions.js is not needed because "Add group" label already exist for group-create button. So, there's no need to use it's title.
Hi!
I installed the contextmenu plugin, but it just won't open.
I have no idea where it fails, are there any troubleshooting steps I can take?
Thanks!
Steps:
Expected: activate handler called for all items in the menu.
When I'm in mailbox view, if I use move to for a single message (e.g. move a message from inbox to trash), the view does not get refreshed thus the mail still appears as it is still at the original mailbox.
Roundcube 0.4 with latest code of this plugin.
The 'purge' action is allowed only on Trash and Junk folders. However when you click on "Empty" position in the menu the action is executed and obviously does nothing. The simplest way to prevent this would be to check if the action is enabled on click time, by checking state of the link or rcmail.commands['purge'].
not 100% sure if this is a Problem of the Plugin-Context-Menu or of the RC-Core:
Situation:
Problem:
It seems that the combined size of all subscribed Folders (including subscribed, shared folders from other users) are beeing compared to the max mailbox quota before a file is moved or copied to a shared folder.
Thanks
n0v1s
Hi, in latest git version submenus dont work properly. They end up outside of the menu div, causing a horizontal scrollbar. One example is the 'Move To' menu, which also doesnt seem to contain any folders to move to.
Latest FF, Chrome and Safari on OSX.
Hello.
I have a problem with Archive plugin (the one included with Roundcube).
When I open context menu with only one letter selected in Archive folder it shows Archive as active (of course nothing happens when I press it - the letter is already archived).
When two or more letters are selected in Archive folder - everything works as expected - archive action is inactive in context menu.
No problem with Archive icon in Roundcube toolbar no matter how many files are selected.
Roundcube 1.0.2
Context Menu 2.0 (2014-07-23)
Hello!
I've got JS error in addressbook (and only in addressbook) after upgrading roundcube to 1.0.2:
Uncaught TypeError: Cannot read property 'match' of undefined contextmenu.js?s=1405967758:301
Ajax update never ending because of that.
It seems like contextmenu does not work in chromium and safari. No problem with firefox
Steps:
Both menus should be closed. The same can be reproduced on messages list menu.
I can try to manage it myself but I would need some help
Can you explain me how to do this ?
The item added by managesieve plugin does not work if a message is not really selected but right- clicked.
When I do right click to open contextmenu on messages list any popup menu of Roundcube core should be closed. Steps:
The same on contacts list. When using contextmenu on folders/Groups list the menus are closed correctly. Larry skin (not tested with classic).
Hello,
I'm not sure if I should open an issue since it's not a stable version, but on Firefox the menu immediately closes after a right-click (unless I move the cursor on it while maintaining the right-click).
Also, once the menu is opened, you have to click on a submenu to open it, instead of just hover it (on Firefox and Chromium).
When I use the Larry theme my apache error log reports:
File does not exist: /var/lib/roundcube/plugins/contextmenu/skins/larry, referer: https://.../?_task=mail&_refresh=1&_mbox=INBOX
Items of the "More..." menu on the messages list have duplicated "icon" class. That's what I see in firebug. It's only in context menu, standard menu elements have only one "icon" class. This is for both and elements.
Would it be possible to add symlink for default skin?
default -> ./classic
Thanks in advance,
Alexander
There can be saved-search entries in Addressbook Groups list. It would be nice to have contextmenu with "Delete search" option for consistency.
In version 1.x there was "Copy to" option with addressbook selection. Users like it. So, would be nice to have it in 2.x too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.