Hi,
I'm running Roundcubemail GIT 20180131.1044 (1.4-git), and as far as IMAP is concerned, all is working perfectly.
However, I'm trying to get the plugin https://plugins.roundcube.net/packages/offerel/caldavzap (https://plugins.roundcube.net/packages/offerel/caldavzap) (offerel/caldavzap) to work, but this does not go entirely ok.
I installed the plugin, made the necessary config changes for the plugin itself, added the plugin directory name in the global config file to activate
the plugin, and when I login to RC, the button called "Calendar" has been added to the top bar, but the button is disabled.
I have been discussing this issue with the developer of the plugin the last couple of days, and he checked and double-checked his code, and there is no
functionality in his code that could render the button disabled.
When I tell RC to use ?_task=caldavzap, The calendar is being loaded and displayed....
All the button does, is calling RC with ?_task=caldavzap.
If I display the page source, somewhere the disabled="disabled" part has been added:
<button id="A1B2C3D4E5F6" class="button-calendar" type="button" onclick="return rcmail.command('switch-task','caldavzap',this,event)" value="Calendar" disabled="disabled">Calendar</button>
,
and the developer suspects this is done somewhere in RC.
Can anyone here help us out, please ?
What could be the reason the newly added button is greyed out and disabled ?
Thanks,
Hans
Hi there. I'm the developer of the plug-in. The button in the RC taskbar has no css class for disabling the button. Nor is such a functionality somewhere else in the plug-in. I really have no idea, why this button is disabled in the taskbar.
The only hint about disabling buttons, i could found, are the hints about the template definitions at https://github.com/roundcube/roundcubemail/wiki/Skin-Markup (https://github.com/roundcube/roundcubemail/wiki/Skin-Markup).
Can anybody please help us, to solve this problem please?
BTW, the button is defined by:
$this->add_button(array(
'label' => 'caldavzap.caldavzap',
'id' => 'calendar-button-unique-id',
'command' => 'caldavzap',
'class' => 'button-calendar',
'classsel' => 'button-calendar button-selected',
'innerclass' => 'button-inner'
), 'taskbar');
Buttons are enabled/disabled with Javascript rcmail.enable_command https://github.com/roundcube/roundcubemail/blob/master/program/js/app.js#L1442
Yes, i know. This is true, if i would try to insert such a button in a template and disable it initially. But in my case, the button is added in the init of the php script, instead of the template. Its nowhere disabled. If i use this in RC 1.3.4, this works. The only difference is see here, is that the user uses RC 1.4 from Github, which isn't released as of yet. I don't know if there changed something in 1.4.
I'm not aware of any changes 1.4 although something defiantly may have changed. When you add that type of button it is disabled by default https://github.com/roundcube/roundcubemail/blob/master/program/include/rcmail_output_html.php#L1531 If its added from PHP and you're noting dealing with JS you would call $rcmail->output->command('enable_command', '{command}', true); to enable it.
Thx for the help. We have found a fix. The attribute "type" was missing in my definition.