From 4cf42fde05ff891f6961ba60dbb1c2e4c91c39c6 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Tue, 20 Mar 2012 18:47:24 -0400 Subject: [PATCH] Add support for read-only address book records --- program/steps/addressbook/func.inc | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index 5a7213c..eb8a0e5 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/func.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2007, The Roundcube Dev Team | + | Copyright (C) 2005-2012, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -339,6 +339,7 @@ while ($row = $result->next()) { $a_row_cols = array(); + $classes = array('person'); // org records will follow some day // build contact ID with source ID if (isset($row['sourceid'])) { @@ -351,7 +352,10 @@ $a_row_cols[$col] = Q($val); } - $OUTPUT->command($prefix.'add_contact_row', $row['ID'], $a_row_cols); + if ($row['readonly']) + $classes[] = 'readonly'; + + $OUTPUT->command($prefix.'add_contact_row', $row['ID'], $a_row_cols, join(' ', $classes)); } } -- Gitblit v1.9.1