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

#30
thats a good idea, i've also added some checks to stop it being loaded on the login screen.

I submitted a patch to trac which fixed the menu issues in IE, assuming that gets applied I will release the new version.

UPDATE: The new version is now available on the website.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

rosali

Perhaps I'm missing something, but the print icon is still not shown.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

JohnDoh

hmmm could it be a caching issue? I have tried in FF3 and IE7 and i can see the print icon in both. are you using the latest svn?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

rosali

Sorry, I missed to check the timestamp of your files. But it looks like you did not update http://www.tehinterweb.co.uk/roundcube/plugins/contextmenu.0_3b.zip ... timestamp of files is 30.05.2009 !
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

rosali

IE8: printicon is undefined ...

[Sun May 31 06:12:49 2009] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/webmail/api/trunk/roundcubemail/undefined, referer: http://localhost/webmail/api/trunk/roundcubemail/?_task=mail
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

rosali

It works for me with the following modifications now:


class contextmenu extends rcube_plugin
{
	
public 
$task 'mail';

  function 
init(){
  
    if(empty(
$_GET['_uid'])){
      
$this->add_hook('startup', array($this'load_contextmenu'));
    }
  }

	
function 
load_contextmenu()
	
{
    
$rcmail rcmail::get_instance();
    
// rcube_json_output::add_script() does not exist !!!
    
$methods array_flip(get_class_methods($this->api->output));
    if(isset(
$methods['add_script']))
      
$this->api->output->add_script('rcmail.env.printicon="skins/' $rcmail->config->get('skin') . '/images/icons/print.png";');
    
$this->api->output->add_label('markmessages','markread','markunread','markflagged','markunflagged','replytomessage','replytoallmessage','forwardmessage','printmessage');
    
$this->include_script('jquery.contextMenu.js');
    
$this->include_stylesheet('contextmenu.css');
    
    
$this->include_script('contextmenu.js');
    
	
}
}
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

JohnDoh

Quote from: rosali;19340IE8: printicon is undefined ...
You mean in 0.3b? yea thats right, there isnt one. It was added later and is in the latest development release.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

marklittle

#37
Hey dude,

Just a heads up - I am seeing a weird bug with latest SVN and contextmenu.  Something that has been updated in trunk between 2588 -> 2591.

U    program/include/rcube_template.php
U    program/include/rcube_shared.inc
U    program/include/rcube_json_output.php
U    program/lib/mime.inc
U    program/js/common.js
U    program/js/app.js

I backed back to 2588 and its fine now.  

The issue is it only displays one message in each folder (the newest).  If I hit refresh, it reloads the same folder with all the messages, but if I click on another folder it only shows one again.

I am going to update by revision slowly now and try to isolate the update that breaks it and will let you know.


Edit: Its the changes in 2589

-----
r2589 | thomasb | 2009-06-01 11:35:53 -0400 (Mon, 01 Jun 2009) | 1 line
Changed paths:
   M /trunk/roundcubemail/program/include/rcube_json_output.php
   M /trunk/roundcubemail/program/include/rcube_template.php
   M /trunk/roundcubemail/program/js/app.js
   M /trunk/roundcubemail/program/js/common.js

Use event system on the client to handle ajax callbacks
-----

JohnDoh

Thanks for tracking down the chageset that broke everything. looking at what changed I am not 100% sure why but changing:
rcmail.addEventListener('listupdate', function(evt, props) { rcm_contextmenu_load(true); rcm_contextmenu_init('messagelist tbody tr'); } );
rcmail.addEventListener('insertrow', function(evt, props) { rcm_contextmenu_init(props.row.id); } );
to
rcmail.addEventListener('listupdate', function(props) { rcm_contextmenu_load(true); rcm_contextmenu_init('messagelist tbody tr'); } );
rcmail.addEventListener('insertrow', function(props) { rcm_contextmenu_init(props.row.id); } );
in contextmenu.js seems to fix the problem.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

marklittle

Yep - fixed it for me in 2591.

lacri

#40
hi John,

works fine only the version with the new commands dosnt work in IE7 and IE8.

Cache is clear and the context menu shows on the top left side.

see the screen i have testet with the current svn and your current version from github.

in the source is the path to the css file corrupt
IE Source
<link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;plugins/contextmenu/skins/platform/contextmenu.css&quot; />FF Source
i have hardcoded the path to css and now works.

change from
$this->include_stylesheet('skins/'$this->api->output->config['skin'] .'/contextmenu.css');

to
$this->include_stylesheet('skins/default/contextmenu.css');

have you an other idea or a solution

JohnDoh

It works fine for me in both IE7 and 8. Are you using the default skin? check view source and make sure the CSS file in is there properly, it should be:
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

lacri

in the SVN 2589 is a bug i have commitet this to trac see
#1485890 (Drag'n'Drop dosnt work in FireFox SVN 2591) ? RoundCube Webmail

after rechance the modification in common.js the context menu works fine with all details and features and no js error in the addEventListener listupdate and insertrow with the evt param.

i have changed for me the code from
rcmail.addEventListener('listupdate', function(props) { rcm_contextmenu_load(true); rcm_contextmenu_init('messagelist tbody tr'); } );
rcmail.addEventListener('insertrow', function(props) { rcm_contextmenu_init(props.row.id); } );
to
rcmail.addEventListener('listupdate', function(evt, props) { rcm_contextmenu_load(true); rcm_contextmenu_init('messagelist tbody tr'); } );
rcmail.addEventListener('insertrow', function(evt, props) { rcm_contextmenu_init(props.row.id); } );

and now works perfekt i found this by searching the bug for Drag and Drop in FF dosnt work anymore

JohnDoh

yep, that just reverses the change i made to work i with r2589. I notice that the bug you just submitted to trac has been fixed now as well. The current version of the code in git will work with the current SVN of RC.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

rosali

Could you please "open in new window". May be we can get rid of opening multiple tabs issue (Ticket #1484913) this way.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)