feature to show contact_id in list and editview; ability to sort by contact_id, ability to search for contact_id (or parts of it), so beware if you search for a contact by id, you may find more than one, since the number you search for may be part of the content of more than one field and contacts, as numbers can occur also in eg.: phonenumber, roomnumber, ZIP-Code, ...

This commit is contained in:
Klaus Leithoff 2010-09-29 12:00:19 +00:00
parent e0de91c4ef
commit b5a015bf3a
4 changed files with 10 additions and 5 deletions

View File

@ -128,7 +128,7 @@ class addressbook_so
* In SQL we can search all columns, though a view make on real sense * In SQL we can search all columns, though a view make on real sense
*/ */
var $sql_cols_not_to_search = array( var $sql_cols_not_to_search = array(
'jpegphoto','owner','tid','private','id','cat_id','etag', 'jpegphoto','owner','tid','private','cat_id','etag',
'modified','modifier','creator','created','tz','account_id', 'modified','modifier','creator','created','tz','account_id',
'uid', 'uid',
); );
@ -615,6 +615,7 @@ class addressbook_so
unset($cols[$key]); unset($cols[$key]);
} }
} }
if ($col=='contact_id') $col='egw_addressbook.contact_id';
} }
$backend->columns_to_search = $cols; $backend->columns_to_search = $cols;

View File

@ -972,6 +972,9 @@ class addressbook_ui extends addressbook_bo
case 'contact_created': case 'contact_created':
$order = "$query[order] IS NULL,$query[order] $sort,org_name $sort,n_family $sort,n_given $sort"; $order = "$query[order] IS NULL,$query[order] $sort,org_name $sort,n_family $sort,n_given $sort";
break; break;
case 'contact_id':
$order = "$query[order] $sort";
break;
} }
if ($query['searchletter']) // only show contacts if the order-criteria starts with the given letter if ($query['searchletter']) // only show contacts if the order-criteria starts with the given letter
{ {

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
.cursorHand { cursor: hand; } .cursorHand { cursor: hand; }
.countrySelect select { width: 150px; } .countrySelect select { width: 150px; }
.contactid:before { content:"#" }
.emailCol div { width: 100%; overflow: hidden; } .emailCol div { width: 100%; overflow: hidden; }
.redItalic { color: red; font-style: italic; } .redItalic { color: red; font-style: italic; }
.fixedHeight,.telNumbers { height: 12px; } .fixedHeight,.telNumbers { height: 12px; }
@ -82,4 +83,4 @@ fieldset.emailGroup {
} }
.image16 img { .image16 img {
height: 16px; height: 16px;
} }