Thanks Thomas - 0.8-SVN installed now and I'll re-start with that.
The changes to apps.js are similar to the changes I came up with so that's encouraging.
I see the new address book widget on the 'Compose' screen of the 'Larry' theme...
Good stuff... Ian
On 29/02/2012 15:17, Thomas Bruederli wrote:
Hi Ian
You pretty much figured out that the current architecture of Roundcube makes it hard to achieve what you have in mind. However, it's not entirely impossible. check out the address book widget we now have on the compose screen in the latest SVN version. It uses a command named 'list-contacts' which resides in the mail section.
While it's currently bound to the compose step, the code could easily be moved or adjusted to also work on the main screen. See function rcmail_contacts_list() in program/steps/mail/compose.inc and line 277 in program/js/app.js
But to make a long story short, we'll not refactor our code in the near future and you'll have to live with a huge patch.
Good luck! Thomas
Ian Lewis wrote:
To provide a brief answer to my own question, providing 'contacts list' functionality on the same page as emails in Roundcube requires an overhaul of the core logic (unless a replacement addressbook is written). The challenge is simply illustrated if you try and place <roundcube:object name='addresslist'> on the 'mail' template. Basic issues seem to be:
- existing 'shared' logic is hard-coded with tests for task='mail'
(populating a template with a list of messages) and task='addressbook' (providing a list of contacts) so that would need to be engineered out to allow use of existing 'addressbook' and 'mail' code on the same page.
- a small number of the php files in program/steps/mail and
program/steps/addressbook have the same name (e.g. list.php) with other code doing an include of program/steps/$task/list.php so the name clash would need files (and their references) renaming.
- the 'mail' page assumes an action 'list' means 'list emails' while the
'addressbook' page assumes the same command 'list' means 'list contacts'. As far as I can tell this would need re-structuring to use different command names for the two functions for the lists to coexist on the same page (I am re-writing the code to use 'listcontacts' instead of 'list' for the contacts list command.)
Ian
List info: http://lists.roundcube.net/dev/ BT/0ddf6350