From d1d2c4fb1d0e9b7a46693e617835850b0edc0fd5 Mon Sep 17 00:00:00 2001 From: svncommit Date: Sun, 8 Jan 2006 07:15:44 +0000 Subject: adding files and modifications for public ldap search --- program/js/app.js | 163 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 148 insertions(+), 15 deletions(-) (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index dc0275c4b..6d76d04e2 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -160,10 +160,15 @@ function rcube_webmail() case 'addressbook': - var contacts_list = this.gui_objects.contactslist; + var contacts_list = this.gui_objects.contactslist; + var ldap_contacts_list = this.gui_objects.ldapcontactslist; + if (contacts_list) this.init_contactslist(contacts_list); + if (ldap_contacts_list) + this.init_ldapsearchlist(ldap_contacts_list); + this.set_page_buttons(); if (this.env.cid) @@ -172,7 +177,7 @@ function rcube_webmail() if ((this.env.action=='add' || this.env.action=='edit') && this.gui_objects.editform) this.enable_command('save', true); - this.enable_command('list', 'add', true); + this.enable_command('list', 'add', 'ldappublicsearch', true); break; @@ -372,6 +377,26 @@ function rcube_webmail() }; + // get all contact rows from HTML table and init each row + this.init_ldapsearchlist = function(ldap_contacts_list) + { + if (ldap_contacts_list && ldap_contacts_list.tBodies[0]) + { + this.ldap_contact_rows = new Array(); + + var row; + for(var r=0; r