Roundcube Community Forum

 

Right Click Functionality

Started by mfallon, February 28, 2009, 02:18:13 PM

Previous topic - Next topic

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

uberlemurguy

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

JohnDoh

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

uberlemurguy

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.

uberlemurguy

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.

rosali

Great plugin! Only thing I miss, is the message row is selected (displayed in red colour) on right click.
Regards,
Rosali

JohnDoh

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

rosali

#21
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.
Regards,
Rosali

JohnDoh

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

rosali

OK - shouldn't we move this thread please to plugins? If you disagree, feel free to delete this post.
Regards,
Rosali

JohnDoh

sounds like a plan, i have move it.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

lacri

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.

$('<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

JohnDoh

#26
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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

lacri

thanks John yes in the current svn after 2541 dosnt work anymore r2541 breaks completly the context menu in IE FF ...

marklittle

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

rosali

#29
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.
Regards,
Rosali