- own sorting of the list/index

- preferred phone can be selected in the main-screen (not only the popup) too
- polishing of the layout and labels/translations
This commit is contained in:
Ralf Becker 2006-04-24 11:15:10 +00:00
parent 6d3478cea5
commit 7429b4fe2b
6 changed files with 147 additions and 128 deletions

View File

@ -104,7 +104,7 @@ class uicontacts extends bocontacts
'msg' => $msg ? $msg : $_GET['msg'],
);
$content['nm'] = $GLOBALS['egw']->session->appsession('index','addressbook');
// if (!is_array($content['nm']))
if (!is_array($content['nm']))
{
$content['nm'] = array(
'get_rows' => 'addressbook.uicontacts.get_rows', // I method/callback to request the data for the rows eg. 'notes.bo.get_rows'
@ -262,6 +262,7 @@ class uicontacts extends bocontacts
'cat_id' => $query['cat_id'],
'order' => $query['order'],
'sort' => $query['sort'],
'col_filter' => array('tid' => $query['col_filter']['tid']),
));
if ($state != $this->prefs['index_state'])
{
@ -329,6 +330,7 @@ class uicontacts extends bocontacts
$query['col_filter'][] = $query['order']."!=''";
}
$rows = (array) $this->regular_search($criteria,$id_only,$order,'','%',false,'OR',array((int)$query['start'],(int) $query['num_rows']),$query['col_filter']);
//echo "<p style='margin-top: 100px;'>".$this->somain->db->Query_ID->sql."</p>\n";
if ($id_only) return $this->total; // no need to set other fields or $readonlys
@ -355,15 +357,19 @@ class uicontacts extends bocontacts
switch($order)
{
case 'org_name':
$row['first_org'] = $row['n_family'].($given ? ', '.$given : '');
$row['line1'] = $row['org_name'];
$row['line2'] = $row['n_family'].($given ? ', '.$given : '');
break;
default:
$order = 'n_family';
case 'n_family':
$row['first_family'] = $row['n_family'].($given ? ', '.$given : '');
$row['line1'] = $row['n_family'].($given ? ', '.$given : '');
$row['line2'] = $row['org_name'];
break;
case 'n_given':
$row['first_given'] = $given.' '.$row['n_family'];
$row['line1'] = $given.' '.$row['n_family'];
$row['line2'] = $row['org_name'];
break;
case 'n_fileas':
list($row['line1'],$row['line2']) = explode(': ',$row['n_fileas']);
break;
}
$this->type_icon($row['owner'],$row['private'],$row['tid'],$row['type'],$row['type_label']);
@ -983,7 +989,6 @@ class uicontacts extends bocontacts
function showphones(form)
{
set_style_by_class("table","editphones","display","inline");
if (form) {
copyvalues(form,"tel_home","tel_home2");
copyvalues(form,"tel_work","tel_work2");
@ -993,7 +998,6 @@ class uicontacts extends bocontacts
function hidephones(form)
{
set_style_by_class("table","editphones","display","none");
if (form) {
copyvalues(form,"tel_home2","tel_home");
copyvalues(form,"tel_work2","tel_work");

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,7 @@ addvcard addressbook de VCard hinzuf
advanced search addressbook de Erweiterte Suche
alt. csv import addressbook de Alt. CSV Import
always addressbook de immer
apply the action on the whole selection, not only the shown contacts!!! addressbook de Wendet den Befehl auf die gesamte Selektion an, NICHT nur auf die angezeigten Kontakte!!!
apply the action on the whole query, not only the shown contacts!!! addressbook de Wendet den Befehl auf die gesamte Abfrage an, NICHT nur auf die angezeigten Kontakte!!!
are you shure you want to delete this contact? addressbook de Diesen Kontakt löschen?
are you sure you want to delete this field? addressbook de Sind Sie sicher, dass Sie dieses Feld löschen wollen?
assistent addressbook de Assistent
@ -154,6 +154,7 @@ options for type admin de Optionen f
organisation addressbook de Organisation
other number addressbook de andere Nr.
other phone addressbook de anderes Telefon
own sorting addressbook de eigene Sortierung
pager common de Pager
parcel addressbook de Lieferadresse
phone number common de Telefonnummer
@ -178,6 +179,8 @@ select a portrait format jpeg photo. it will be resized to 60 pixel width. addre
select addressbook type addressbook de Typ des Adressbuchs auswählen
select all addressbook de Alles auswählen
select an action or addressbook to move to addressbook de Befehl oder Adressbuch zum Verschieben auswählen
select multiple contacts for a further action addressbook de Mehrere Adressen für weiteren Befehl auswählen
select phone number as prefered way of contact addressbook de Telefonnummer als präferierten Kontaktweg auswählen
select the type of conversion addressbook de Typ der Umwandlung auswählen
select the type of conversion: addressbook de Typ der Umwandlung auswählen:
select where you want to store / retrieve contacts admin de Auswählen wo Sie Adressen speichern wollen
@ -206,13 +209,14 @@ translation addressbook de
update a single entry by passing the fields. addressbook de Aktualisiert einen einzelnen Eintrag durch Übergabe seiner Felder.
upload or delete the photo addressbook de Foto hochladen oder löschen
use country list addressbook de Länderliste benutzen
used for links and for the own sorting of the list addressbook de wird für Verküpfungen und die eigene Sortierung der Liste benützt
vcard common de VCard
vcards require a first name entry. addressbook de VCards benötigen einen Vornamen.
vcards require a last name entry. addressbook de VCards benötigen einen Nachnamen.
warning!! ldap is valid only if you are not using contacts for accounts storage! admin de WARNUNG!! LDAP darf nur verwendet werden, wenn sie die Benutzerkonten nicht im Adressbuch speichern!
warning: all contacts found will be deleted! addressbook de WARNUNG: Alle gefundenen Kontakte werden gelöscht!
when should the contacts list display that colum. "only if there is content" hides the column, unless there is some content in the view. addressbook de Wann soll die Adressliste diese Spalte anzeigen. "Nur wenn etwas angezeigt wird" blendet die Spalte aus, wenn Sie in dieser Anzeige leer wäre.
whole selection addressbook de gesamte Selektion
whole query addressbook de gesamte Abfrage
work phone addressbook de Tel dienstl.
write (update or add) a single entry by passing the fields. addressbook de Schreibt (aktualiseren oder zufügen) eines einzelnen Eintrags durch Übergabe der Felder
you are not permitted to delete contact %1 addressbook de Sie haben nicht die Berechtigungen um den Kontakt %1 zu löschen

View File

@ -6,7 +6,6 @@
(e.g. 1969) addressbook en (e.g. 1969)
<b>no conversion type &lt;none&gt; could be located.</b> please choose a conversion type from the list addressbook en <b>No conversion type &lt;none&gt; could be located.</b> Please choose a conversion type from the list
@-eval() is only availible to admins!!! addressbook en @-eval() is only availible to admins!!!
accounts addressbook en Accounts
actions addressbook en Actions
add a new contact addressbook en Add a new contact
add a single entry by passing the fields. addressbook en Add a single entry by passing the fields.
@ -15,10 +14,8 @@ address book common en Address Book
address book - vcard in addressbook en Address book - VCard in
address book - view addressbook en Address book - view
address line 2 addressbook en Address Line 2
address line 3 addressbook en Address Line 3
address type addressbook en Address Type
addressbook common en Addressbook
addressbook menu addressbook en Addressbook menu
addressbook preferences addressbook en Addressbook preferences
addressbook the contact should be saved to addressbook en Addressbook the contact should be saved to
addressbook-fieldname addressbook en Addressbook-Fieldname
@ -26,7 +23,7 @@ addvcard addressbook en Add VCard
advanced search addressbook en Advanced search
alt. csv import addressbook en Alt. CSV Import
always addressbook en always
apply the action on the whole selection, not only the shown contacts!!! addressbook en Apply the action on the whole selection, NOT only the shown contacts!!!
apply the action on the whole query, not only the shown contacts!!! addressbook en Apply the action on the whole query, NOT only the shown contacts!!!
are you shure you want to delete this contact? addressbook en Are you shure you want to delete this contact?
are you sure you want to delete this field? addressbook en Are you sure you want to delete this field?
assistent addressbook en Assistent
@ -38,7 +35,6 @@ business address addressbook en Business address
business city addressbook en Business City
business country addressbook en Business Country
business email addressbook en Business EMail
business email type addressbook en Business EMail Type
business fax addressbook en Business Fax
business phone addressbook en Business Phone
business state addressbook en Business State
@ -52,11 +48,9 @@ choose an icon for this contact type admin en Choose an icon for this contact ty
chosse an etemplate for this contact type admin en Chosse an eTemplate for this contact type
city common en City
company common en Company
company name addressbook en company name
configuration common en Configuration
contact common en Contact
contact application admin en Contact application
contact deleted !!! addressbook en Contact deleted !!!
contact saved addressbook en Contact saved
contact settings admin en Contact Settings
copied by %1, from record #%2. addressbook en Copied by %1, from record #%2.
@ -85,7 +79,6 @@ download export file (uncheck to debug output in browser) addressbook en Downloa
download this contact as vcard file addressbook en download this contact as vCard file
edit custom field addressbook en Edit Custom Field
edit custom fields admin en Edit Custom Fields
edit extra account-data in the addressbook addressbook en Edit extra account-data in the addressbook
edit phonenumbers - addressbook en Edit Phonenumbers -
email & internet addressbook en Email & Internet
empty for all addressbook en empty for all
@ -115,7 +108,6 @@ home address addressbook en Home address
home city addressbook en Home City
home country addressbook en Home Country
home email addressbook en Home EMail
home email type addressbook en Home EMail Type
home phone addressbook en Home Phone
home state addressbook en Home State
home street addressbook en Home Street
@ -133,7 +125,6 @@ import next set addressbook en Import next set
import_instructions addressbook en In Netscape, open the Addressbook and select <b>Export</b> from the <b>File</b> menu. The file exported will be in LDIF format.<p>Or, in Outlook, select your Contacts folder, select <b>Import and Export...</b> from the <b>File</b> menu and export your contacts into a comma separated text (CSV) file. <p>Or, in Palm Desktop 4.0 or greater, visit your addressbook and select <b>Export</b> from the <b>File</b> menu. The file exported will be in VCard format.
income addressbook en Income
international addressbook en International
isdn phone addressbook en ISDN Phone
label addressbook en Label
last modified addressbook en last modified
ldap context for contacts admin en LDAP context for contacts
@ -163,6 +154,7 @@ options for type admin en Options for type
organisation addressbook en organisation
other number addressbook en Other Number
other phone addressbook en Other Phone
own sorting addressbook en own sorting
pager common en Pager
parcel addressbook en Parcel
phone number common en Phone Number
@ -187,6 +179,8 @@ select a portrait format jpeg photo. it will be resized to 60 pixel width. addre
select addressbook type addressbook en Select addressbook type
select all addressbook en Select all
select an action or addressbook to move to addressbook en Select an action or addressbook to move to
select multiple contacts for a further action addressbook en Select multiple contacts for a further action
select phone number as prefered way of contact addressbook en select phone number as prefered way of contact
select the type of conversion addressbook en Select the type of conversion
select the type of conversion: addressbook en Select the type of conversion:
select where you want to store / retrieve contacts admin en Select where you want to store / retrieve contacts
@ -215,14 +209,14 @@ translation addressbook en Translation
update a single entry by passing the fields. addressbook en Update a single entry by passing the fields.
upload or delete the photo addressbook en Upload or delete the photo
use country list addressbook en Use Country List
used for links and for the own sorting of the list addressbook en used for links and for the own sorting of the list
vcard common en VCard
vcards require a first name entry. addressbook en VCards require a first name entry.
vcards require a last name entry. addressbook en Vcards require a last name entry.
video phone addressbook en Video Phone
warning!! ldap is valid only if you are not using contacts for accounts storage! admin en WARNING!! LDAP is valid only if you are NOT using contacts for accounts storage!
warning: all contacts found will be deleted! addressbook en WARNING: All contacts found will be deleted!
when should the contacts list display that colum. "only if there is content" hides the column, unless there is some content in the view. addressbook en When should the contacts list display that colum. "Only if there is content" hides the column, unless there is some content in the view.
whole selection addressbook en whole selection
whole query addressbook en whole query
work phone addressbook en Work Phone
write (update or add) a single entry by passing the fields. addressbook en Write (update or add) a single entry by passing the fields.
you are not permitted to delete contact %1 addressbook en You are not permitted to delete contact %1

View File

@ -1,6 +1,93 @@
<?xml version="1.0"?>
<!-- $Id$ -->
<overlay>
<template id="addressbook.editphones" template="" lang="" group="0" version="1.3.001">
<grid class="editphones">
<columns>
<column/>
<column/>
<column/>
</columns>
<rows>
<row>
<description span="all" class="windowheader" value="Edit Phonenumbers - " no_lang="1" align="center" id="fn"/>
<description/>
<description/>
</row>
<row class="th">
<description value="Description"/>
<description value="Number"/>
<description value="pref"/>
</row>
<row>
<description value="business" options=",,,tel_work2" class="bold"/>
<textbox size="30" id="tel_work2"/>
<radio options="tel_work" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<description value="mobile phone" options=",,,tel_cell2"/>
<textbox size="30" id="tel_cell2"/>
<radio options="tel_cell" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<description value="fax" options=",,,tel_fax"/>
<textbox size="30" id="tel_fax"/>
<radio options="tel_fax" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<description value="car phone" options=",,,tel_car"/>
<textbox size="30" id="tel_car"/>
<radio options="tel_car" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<description value="pager" options=",,,tel_pager"/>
<textbox size="30" id="tel_pager"/>
<radio options="tel_pager" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<hrule span="all"/>
</row>
<row>
<description value="Assistent" options=",,,assistent" class="bold"/>
<textbox size="35" id="assistent" span="2"/>
</row>
<row>
<description value="number" options=",,,tel_assistent"/>
<textbox size="30" id="tel_assistent"/>
<radio options="tel_assistent" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<hrule span="all"/>
</row>
<row>
<description value="Private" options=",,,tel_home2" class="bold"/>
<textbox size="30" id="tel_home2"/>
<radio options="tel_home" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<description value="mobile phone" options=",,,tel_cell_private"/>
<textbox size="30" id="tel_cell_private"/>
<radio options="tel_cell_private" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<description value="fax" options=",,,tel_fax_home"/>
<textbox size="30" id="tel_fax_home"/>
<radio options="tel_fax_home" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<hrule span="all"/>
</row>
<row>
<description value=" Other Phone" options=",,,tel_other"/>
<textbox size="30" id="tel_other"/>
<radio options="tel_other" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<button label="Ok" onclick="set_style_by_class('table','editphones','display','none'); if (window.hidephones) hidephones(this.form); return false;" span="all" align="center"/>
</row>
</rows>
</grid>
</template>
<template id="addressbook.edit.personal" template="" lang="" group="0" version="1.3.002">
<grid height="258">
<columns>
@ -244,93 +331,6 @@
</rows>
</grid>
</template>
<template id="addressbook.editphones" template="" lang="" group="0" version="1.3.001">
<grid class="editphones">
<columns>
<column/>
<column/>
<column/>
</columns>
<rows>
<row>
<description span="all" class="windowheader" value="Edit Phonenumbers - " no_lang="1" align="center" id="fn"/>
<description/>
<description/>
</row>
<row class="th">
<description value="Description"/>
<description value="Number"/>
<description value="pref"/>
</row>
<row>
<description value="business" options=",,,tel_work2" class="bold"/>
<textbox size="30" id="tel_work2"/>
<radio options="tel_work" id="tel_prefer"/>
</row>
<row>
<description value="mobile phone" options=",,,tel_cell2"/>
<textbox size="30" id="tel_cell2"/>
<radio options="tel_cell" id="tel_prefer"/>
</row>
<row>
<description value="fax" options=",,,tel_fax"/>
<textbox size="30" id="tel_fax"/>
<radio options="tel_fax" id="tel_prefer"/>
</row>
<row>
<description value="car phone" options=",,,tel_car"/>
<textbox size="30" id="tel_car"/>
<radio options="tel_car" id="tel_prefer"/>
</row>
<row>
<description value="pager" options=",,,tel_pager"/>
<textbox size="30" id="tel_pager"/>
<radio options="tel_pager" id="tel_prefer"/>
</row>
<row>
<hrule span="all"/>
</row>
<row>
<description value="Assistent" options=",,,assistent" class="bold"/>
<textbox size="35" id="assistent" span="2"/>
</row>
<row>
<description value="number" options=",,,tel_assistent"/>
<textbox size="30" id="tel_assistent"/>
<radio options="tel_msg" id="tel_prefer"/>
</row>
<row>
<hrule span="all"/>
</row>
<row>
<description value="Private" options=",,,tel_home2" class="bold"/>
<textbox size="30" id="tel_home2"/>
<radio options="tel_home" id="tel_prefer"/>
</row>
<row>
<description value="mobile phone" options=",,,tel_cell_private"/>
<textbox size="30" id="tel_cell_private"/>
<radio options="tel_cell_private" id="tel_prefer"/>
</row>
<row>
<description value="fax" options=",,,tel_fax_home"/>
<textbox size="30" id="tel_fax_home"/>
<radio options="tel_fax_home" id="tel_prefer"/>
</row>
<row>
<hrule span="all"/>
</row>
<row>
<description value=" Other Phone" options=",,,tel_other"/>
<textbox size="30" id="tel_other"/>
<radio options="tel_other" id="tel_prefer"/>
</row>
<row>
<button label="Ok" onclick="hidephones(this.form); return false;" span="all" align="center"/>
</row>
</rows>
</grid>
</template>
<template id="addressbook.edit" template="" lang="" group="0" version="1.3.002">
<grid width="800">
<columns>
@ -344,9 +344,10 @@
</row>
<row>
<menulist span=",fileas">
<menupopup data="" rows="1" cols="3" id="fileas_type" no_lang="1"/>
<menupopup data="" rows="1" cols="3" id="fileas_type" no_lang="1" statustext="used for links and for the own sorting of the list"/>
</menulist>
<hbox align="right">
<template id="addressbook.editphones"/>
<menulist span=",leftPad5">
<menupopup no_lang="1" id="tid" onchange="1" label="Type"/>
</menulist>
@ -378,27 +379,32 @@
<column width="20"/>
<column width="120"/>
<column/>
<column/>
</columns>
<rows>
<row>
<image src="phone"/>
<description value="business" options=",,,tel_work"/>
<textbox id="tel_work" size="28" maxlength="40"/>
<textbox id="tel_work" size="24" maxlength="40"/>
<radio options="tel_work" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<description/>
<description value="mobile phone" options=",,,tel_cell"/>
<textbox id="tel_cell" size="28" maxlength="40"/>
<textbox id="tel_cell" size="24" maxlength="40"/>
<radio options="tel_cell" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<description/>
<description value="Private" options=",,,tel_home"/>
<textbox id="tel_home" size="28" maxlength="40"/>
<textbox id="tel_home" size="24" maxlength="40"/>
<radio options="tel_home" id="tel_prefer" statustext="select phone number as prefered way of contact"/>
</row>
<row>
<description/>
<description/>
<button label="More ..." onclick="showphones(this.form); return false;" accesskey="m"/>
<button label="More ..." onclick="set_style_by_class('table','editphones','display','inline'); if (window.showphones) showphones(this.form); return false;" accesskey="m"/>
<description/>
</row>
</rows>
</grid>
@ -460,7 +466,6 @@
<button label="Save" id="button[save]" accesskey="s"/>
<button label="Apply" id="button[apply]"/>
<button label="Cancel" id="button[cancel]" onclick="if($cont[view]0) return true; self.close(); return false;"/>
<template id="addressbook.editphones"/>
</hbox>
<button label="Delete" id="button[delete]" onclick="return confirm('Are you shure you want to delete this contact?');" align="right" tabindex="25"/>
</row>

View File

@ -28,6 +28,9 @@
<column/>
</columns>
<rows>
<row disabled="!@order=n_fileas">
<nextmatch-sortheader span="all" label="own sorting" id="n_fileas"/>
</row>
<row disabled="!@order=n_given">
<nextmatch-sortheader id="n_given" label="Firstname"/>
<nextmatch-sortheader label="Name" id="n_family"/>
@ -39,9 +42,12 @@
<row>
<nextmatch-sortheader id="org_name" label="Company" span="all"/>
</row>
<row disabled="!@order=org_name">
<row disabled="!@order=/^(org_name|n_fileas)$/">
<nextmatch-sortheader id="n_family" label="Name"/>
<nextmatch-sortheader id="n_given" label="Firstname"/>
<nextmatch-sortheader id="n_given" label="Firstname" class="leftPad5"/>
</row>
<row disabled="@order=n_fileas">
<nextmatch-sortheader span="all" label="own sorting" id="n_fileas"/>
</row>
</rows>
</grid>
@ -76,9 +82,8 @@
<row class="row" valign="top">
<image label="$row_cont[type_label]" src="${row}[type]" align="center" no_lang="1"/>
<vbox id="${row}[id]" orient=",0,0">
<description id="${row}[first_given]" no_lang="1"/>
<description id="${row}[first_family]" no_lang="1"/>
<description id="${row}[org_name]" no_lang="1"/>
<description id="${row}[line1]" no_lang="1"/>
<description id="${row}[line2]" no_lang="1"/>
<description id="${row}[org_unit]" no_lang="1"/>
<description id="${row}[title]" no_lang="1"/>
<description id="${row}[first_org]" no_lang="1"/>
@ -154,7 +159,7 @@
<row class="noPrint">
<button id="add" label="Add" statustext="Add a new contact" onclick="window.open(egw::link('/index.php','menuaction=addressbook.uicontacts.edit'),'_blank','dependent=yes,width=850,height=440,scrollbars=yes,status=yes'); return false;"/>
<hbox align="right">
<checkbox id="use_all" label="whole selection" onchange="if (!confirm('Apply the action on the whole selection, NOT only the shown contacts!!!')) this.checked=false;" statustext="Apply the action on the whole selection, NOT only the shown contacts!!!"/>
<checkbox id="use_all" label="whole query" onchange="if (this.checked==true &amp;&amp; !confirm('Apply the action on the whole query, NOT only the shown contacts!!!')) this.checked=false;" statustext="Apply the action on the whole query, NOT only the shown contacts!!!"/>
<menulist>
<menupopup onchange="1" options="Select an action or addressbook to move to..." no_lang="1" id="action" statustext="Select an action or addressbook to move to"/>
</menulist>