Code Monkey home page Code Monkey logo

roundcube-contextmenu's People

Contributors

alecpl avatar androlgenhald avatar bojo78 avatar elemir avatar filhocf avatar johndoh avatar marcindm avatar sergioloyola avatar thegamerking561 avatar tpayen avatar vookimedlo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

roundcube-contextmenu's Issues

unbind keypress

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 :)

readfolder doesn't work if unread messages are in a thread

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] => 
        )

)

Slows down IE 10 considerably

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%.

Without Contextmenu:
without_contextmenu

With Contextmenu:
with_contextmenu

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.

feature to close context-menu on delay or right-click

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

  • right clic outside of it
  • after a short delay (like 2 sec) if the mouse is ousite of the context menu

patch addressbook match id for roundcube 9.0

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')
                }
        }

Methods to extend contextmenus from other plugins

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.

Use folder-selector widget from Roundcube 1.0

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.

Left-clic to close context-menu not always work.

Sometimes, a left-clic outside the context-menu did not close it.

How to reproduce :

  • Activate the message preview pane in the roudcube preferences
  • right-clic on a message or folder
  • left-clic in the preview pane

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.

Menu should be closed on folder click

Steps:

  1. Right-click on folders list, see contextmenu open
  2. Click any folder on the list, see contextmenu still open in the previous position. Actions status is not updated (e.g. mark all as read).

I propose to close the menu in step 2.

Tested with Chromium browser.

Subject needs encoding

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.

performance problem

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.

Submenus with no icons should align text to right

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.

Errors caused by plugin on Roundcube 0.7.x

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.

CSRF vulnerability in readfolder action

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().

Wrong .match() use on jQuery result

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).

  1. In our case $(this).children('a') does not work, but $('a', this) does. Please modify the code accordingly.
  2. Sometimes String(...) part will return "undefined" string. That's when 'rel' attribute does not exist or link is not found. If that happens match() does not return null.
  3. The same selector is used two lines before. Please, use local variable.

[Reopen] The menu doesn't stay open on Firefox #31

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.

Doesn’t work in Firefox 30.0

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

Problem with new version

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

Double render js and css files

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.

please remove execute bit from files

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

Create new group -> Add group

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.

contextmenu won't open

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!

Activate event called only once for search item

Steps:

  1. Register activate event handler on 'abooklist' menu.
  2. Click on saved search record and see activate event is called only once (for 'search-delete' command/button), but there are more options in the menu.

Expected: activate handler called for all items in the menu.

Move to problem

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.

Purge action issue

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'].

moving mails to shared folders fails due to wrong calculation of folder size

not 100% sure if this is a Problem of the Plugin-Context-Menu or of the RC-Core:

Situation:

  • I use ACL to share folder between users in RC.
  • user1 shares the folder 'shared_folder' to user2 with all rights (read, write ...).
  • 'shared_folder' is a child of 'INBOX'
  • the max. mailbox quota of user1 is 1GB, the current mailbox size 15MB
  • the max. mailbox quota of user2 is 10MB, the current mailbox size of user2, correctly displayed in RC, is 10kB.

Problem:

  • user2 tries to move a mail (20kB) to the shared folder. This produces a RC-error message 'errorroverquota'.
  • It seems that moving the mail fails, because the current 'INBOX' Mailbox size of user1, which is 15MB is higher then the max. mailbox quota of user2, which is 10MB.
  • moving the same mail to a local folder of user2 works without problems. After I raised the max. mailbox quota of user2 from 10MB to 16MB it was possible to move the mail to the shared folder of user2.

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

submenus dont show correctly

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.

Problem with Archive plugin

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)

JS error after update roundcube to 1.0.2

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.

Click on submenu does not close all menus

Steps:

  1. Go to addressbook, right-click on contact
  2. Click on "Copy to...", see two menus open
  3. Click on one of addressbooks in the menu, see only the clicked one is closed, the main menu stays open.

Both menus should be closed. The same can be reproduced on messages list menu.

Contextmenu does not close other popups

When I do right click to open contextmenu on messages list any popup menu of Roundcube core should be closed. Steps:

  1. Click more actions button, see menu opened
  2. Right click on message, see two menus open.

The same on contacts list. When using contextmenu on folders/Groups list the menus are closed correctly. Larry skin (not tested with classic).

The menu doesn't stay open on Firefox

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).

no skin for larry theme

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

Duplicated "icon" class for "More..." menu items

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.

symlink for default skin

Would it be possible to add symlink for default skin?
default -> ./classic

Thanks in advance,
Alexander

Add contextmenu for saved searches

There can be saved-search entries in Addressbook Groups list. It would be nice to have contextmenu with "Delete search" option for consistency.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.