Poll

Do you think right click funtionality is a good idea?

es
181 (91.9%)
o
6 (3%)
aybe
10 (5.1%)
on\'t Care / Know
0 (0%)

Total Members Voted: 193

Author Topic: Right Click Functionality  (Read 71902 times)

Offline uberlemurguy

  • Newbie
  • *
  • Posts: 4
Right Click Functionality
« Reply #15 on: May 04, 2009, 07:01:57 PM »
i honestly believe that using jQuery would simplify much of this complex javascript code in roundcube. There would be significantly less code, that is also easier to read. We could need things like: "return rcmail.folder_mouse_up('[Gmail]/All Mail')" on every folder link because we could bind classes with jQuery. jQuery has excellent AJAX methods and it works cross browser. There are hundreds of plugins easily enabling right-click functionality. Also skins could take advantage of jQuery, creating more dynamic and rich themes. I know all of my themes that I am going to make will include jQuery because of its advantages. If this has been discussed before, I am sorry because I am new to the forums (but not to RoundCube).

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Right Click Functionality
« Reply #16 on: May 05, 2009, 08:25:14 AM »
jQuery is being used in the trunk and will be in the next release i think, but there are some things that (at the moment) jQuery is slow at so it cant be used for everything. there is a little bit of discussion here RoundCube Mailing Lists

as for the right click stuff you are correct, that is why i waited until RC was jQueryfied before i did any thing.

i have been tinkering with RC for a long time now and IMO the JS is great and its really easy to understand once you get your head round the basic structure.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline uberlemurguy

  • Newbie
  • *
  • Posts: 4
Right Click Functionality
« Reply #17 on: May 05, 2009, 11:00:13 PM »
I have used jQuery for over a year, and I have never run into a case where jQuery's ajax methods are slower. There must have been some other varible involved as in not using proper jQuery techniques etc.

Also with jQuery even if  it is a little slower, I don't think that should put us off of it. The ability to easily bind keys and run animations with ease is rather helpful. It also allows us to do more mundane things that are useful. (adding odd and even classes to the message list can be just 2 or 3 lines) It does look like the devs have done a good job with the rcmail object, but so much code could be elimitated by effectively using jQuery.

Just my two cents.

Offline uberlemurguy

  • Newbie
  • *
  • Posts: 4
Right Click Functionality
« Reply #18 on: May 06, 2009, 04:22:14 PM »
as an update: i did some tests myself, jQuery is just as fast at ajax after I ran my own tests, which makes sense since the jQuery $.ajax method is just a way to easily do the DOM ajax.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Right Click Functionality
« Reply #19 on: May 10, 2009, 04:40:38 AM »
Great plugin! Only thing I miss, is the message row is selected (displayed in red colour) on right click.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Right Click Functionality
« Reply #20 on: May 10, 2009, 05:28:40 AM »
Thanks :D. I wondered about the message highlighting thing. I think it would actually make the code simplier if that was done but I decided not to mainly because I thought it was possible that some one might have message open in the preview pane and want to do something to another message, say one that just arrived while still keeping the current message open. does that make sense?

What do people think? should right clicking select that message or just let you do stuff to it.

I just tried in Outlook and it seems to use the same approach as this, although there is a little dotted box around the right clicked message. May be doing something like that, just altering the border around the right clicked message so it is clear which one was clicked would be a good compromise.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Right Click Functionality
« Reply #21 on: May 11, 2009, 12:53:15 PM »
Is it necessary to patch lists.js (rc_context_menu.patch ::: lists.js ::: rcm_contextmenu_init)? It seems to work without the patch (at least for IE7). In additon the patch gives me a js error when entering folder administration.
« Last Edit: May 11, 2009, 03:30:17 PM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Right Click Functionality
« Reply #22 on: May 11, 2009, 02:36:36 PM »
That confused me. you are correct the patch is not needed at all any more, it was only a temporary thing until plugin hooks were available. It should have been removed from the tar.gz and zip files, it has been now.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Right Click Functionality
« Reply #23 on: May 11, 2009, 03:33:27 PM »
OK - shouldn't we move this thread please to plugins? If you disagree, feel free to delete this post.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Right Click Functionality
« Reply #24 on: May 12, 2009, 08:03:36 AM »
sounds like a plan, i have move it.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Right Click Functionality
« Reply #25 on: May 26, 2009, 07:43:34 AM »
Hi John,

i found little things the icons unflagged, print and forwardreplyall are not display.

here is my little workaround.

can you fix this with the rcmail.env i have hardcoded the path.

Code: [Select]
$('<a>').attr('href', '#unflagged').addClass('active').html('&nbsp;&nbsp;' + rcmail.gettext('markunflagged')).css('background-image', 'url(' + 'skins/default/images/icons/unflagged.png' + ')').appendTo(menuUnflagged);
$('<a>').attr('href', '#reply-all').addClass('active').html(rcmail.gettext('replytoallmessage')).css('background-image', 'url(' + rcmail.env.forwardedrepliedicon + ')').appendTo(menuReplyall);
$('<a>').attr('href', '#print').addClass('active').html(rcmail.gettext('printmessage')).css('background-image', 'url(' + 'skins/default/images/icons/print.png' + ')').appendTo(menuPrint);


and can you add the new commands from the SVN messagemenu to your plugin for Message download as eml, show source and open in new window :)

Thanks in advance

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Right Click Functionality
« Reply #26 on: May 26, 2009, 09:14:05 AM »
I added the icons and the new actions yesterday but following r2541 it doesnt work right any more so i will have to update it again :/

UPDATE: the updated plugin is going to be a bit delayed until r2541 is fixed, its still very buggy in IE and there is no point in rewriting stuff until the new code is sorted.
« Last Edit: May 27, 2009, 02:29:18 PM by JohnDoh »
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Right Click Functionality
« Reply #27 on: May 28, 2009, 05:46:55 AM »
thanks John yes in the current svn after 2541 dosnt work anymore r2541 breaks completly the context menu in IE FF ...

Offline marklittle

  • Newbie
  • *
  • Posts: 4
Right Click Functionality
« Reply #28 on: May 29, 2009, 10:43:20 PM »
FYI - Context menu is working 95% fine for me with latest SVN (r2573).  Only thing that is broken are the icons for print, save and source, because they were moved to images/buttons with the 3 versions.


Cheers,
Mark

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Right Click Functionality
« Reply #29 on: May 30, 2009, 02:09:36 AM »
Please do not include contextmenu.js in "preview pane" or "show message". Both are in task "mail" but don't need the plugin.

If $_GET['_uid'] is not empty, do not trigger things.
« Last Edit: May 30, 2009, 01:01:26 PM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)