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

JohnDoh

I'm not sure I understand. there is alread an "open in new window" option in the menu or do you mean you want all the links to open in new windows?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

rosali

Oops, I missed that. I had an outdated version installed. Sorry.
Regards,
Rosali

rosali

#47
Just installed the new version (30-05-2009). Did you test it on Firefox? It does not work for me on FF 3.x. IE7/8 is fine. Contextmenu is not hidden. It shows up on the left top behind the RoundCube Logo. I double checked to clear the cache. My Code Base is SVN trunk 2617.

EDIT1:
Found the "bug" ... I would add a fallback to plugins/contextmenu/skins/default ... if another skin is enabled -that was the problem in my case - and there is no stylesheet for it in the contextmenu plugin.

EDIT2:
Question: Do you think about a "forward as attachment" and "copy/move to folder" functionality? Also a "add sender to contacts" would be nice ... If these things would be available then it had all what OE does on right click. All in all I have to thank you for this great plugin. Compliments!
Regards,
Rosali

JohnDoh

Quote from: rosali;19509Found the "bug" ... I would add a fallback to plugins/contextmenu/skins/default ... if another skin is enabled -that was the problem in my case - and there is no stylesheet for it in the contextmenu plugin.

Good idea! I have added a fallback.

Quote from: rosali;19509Question: Do you think about a "forward as attachment" and "copy/move to folder" functionality? Also a "add sender to contacts" would be nice ... If these things would be available then it had all what OE does on right click. All in all I have to thank you for this great plugin. Compliments!

I don't think forward as attachment exists in the core yet. The menu doesn't do any work for itself it just calls functions from the core. But if it was added to the core I think if could certainly go on the menu.

Copy/move is a bit more tricky, I guess you would need to generate a list of folders on a submenu to let people select the destination, I'm not sure about that, drag and drop is really easy is it really needed on the menu?

Add sender to contacts could get messy I think. Its not on the menu in regular Outlook. Any way I'm not sure it being on the menu in something else is a legit reason to add it to this one. It makes sense that the most common things are on there but we cant just add everything or the menu will be 3miles long and totally useless!
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

rosali

OK, I just wondered if it may be on your ToDo's to write a patch for "forward as attachment" and to provide a "copy" functionality in addition to the "move" feature.

Regarding the fallback, I'm not sure if it was intended to package the file with "skins/default1" instead of simply "skins/default".
Regards,
Rosali

JohnDoh

DOH! you are correct, it should have been skins/default i have corrected the typo. Thanks for spotting it so quick.

And yes those things will go on the wish list. I think my next little challenge will be getting a move option in there, once that works copy should be pritty simple (once the operation is in the core) Just need a different version of the JS lib so i can use sub menus.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

rosali

rcmail.addEventListener('insertrow', function(evt, props) { rcm_contextmenu_init(props.row.id); } );

Please check if "row" is an object before executing this or use try/catch.

I get js errors when accessing empty Sent mailbox!

Goto RoundCube Webmail :: Welcome to RoundCube Webmail and login as demo to cross check what I mean and select folder (Sent / Gesendet).
Regards,
Rosali

rosali

#52
Don't know if it is good style, but this fixed it for me:


if(typeof props.row == 'object')
  rcmail.addEventListener('insertrow', function(evt, props) { rcm_contextmenu_init(props.row.id); } );


... strange, I never got js error on my local test environment. Issues started since uploaded the stuff to RoundCube Webmail :: Welcome to RoundCube Webmail on my dedicated server.

EDIT: It does not fix it. New rows inserted by a AJAX request are not initialized this way --- :-(
Regards,
Rosali

lacri

#53
by me work this no errors and also ajax calls work

rcmail.addEventListener('listupdate', function(evt, props) { rcm_contextmenu_load(true); rcm_contextmenu_init('messagelist tbody tr'); } );
rcmail.addEventListener('insertrow', function(props) { rcm_contextmenu_init(props.row.id); } );

see attachment the working version

JohnDoh

Rosali: are you trying to use the 0.3b version of the plugin with a more recent version of RC? Those listeners have changed a little in trunk and I tried with the latest version of both the plugin and RC and i get no errors from empty mailboxes. If it works on one machine and not the other could it be a caching issue?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Monty

Hello everybody,

This plugin works perfect now! Very handy it is indeed!
One question I have though: when I login with a secured connection (HTTPS) the browser ( ie8 ) states that not all content can be delivered securerly. Proberly that is due to some pictures in the context menu.

How can it be changed in a way the browser can deliver everything securely?

JohnDoh

There should not be any problem with the images, the CSS is almost identical to that for the toolbars. I had a look with IE7 but I didnt get any errors (I dont know, may be I have turned them off somewhere). If you could track down what is causing the message that would be great, then we can get it fixed. Thanks
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

rosali

Here is an updated function for contextmenu.js which detects if archivefolder and/or forward_as_attachment plugin is installed/enabled to make to archive/forward as attachment command accessible by right click:


function rcm_contextmenu_load(update) {
  if (update) {
    if (rcmail.env.trash_mailbox && rcmail.env.mailbox != rcmail.env.trash_mailbox)
      $("#rcm_delete").html(rcmail.gettext('movemessagetotrash'));
    else
      $("#rcm_delete").html(rcmail.gettext('deletemessage'));
  }
  else {
    var menu = $('
Regards,
Rosali

lacri

thx rosali i have try to port your code to latest version of context menue (John moves the menu generation from JS to PHP see Changelog)

http://www.tehinterweb.co.uk/roundcube/plugins/contextmenu.CHANGELOG.txt

your changes not work ;( i have add to contextmenu.php

$li 
.= html::tag('li', array('class' => 'forward'), html::a(array('href' => "#plugin.forwardatt"'class' => 'active'), Q($this->gettext('forward_as_attachment.buttontitle'))));

$li .= html::tag('li', array('class' => 'forward'), html::a(array('href' => "#plugin.archive"'class' => 'active'), Q($this->gettext('archivefolder.buttontitle'))));
and to contextmenu.js


case 'plugin.forwardatt':
case 
'plugin.archive':
and i have change the regexp for commands and i have add #plugin.forwardatt to rcmail.contextmenu_disable_multi array in contextmenu.js

can you try to port this to latest version of Johns nice Context Menu

i have no idea whats wrong

rosali

@ lacri:

I will update and release new RoundCube v0.3 stable plugins on sunday. Please use new "forward_as_attachment" and "archivefolder" plugins. Thanks to JohnDoh's help they now automatically integrate in the contextmenu.
Regards,
Rosali