From 3992f7eef8bf7afcedc4deb8a5b7a95663a9a79a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 16 Jun 2006 04:44:58 +0000 Subject: [PATCH] new email-address-selection popup for felamimail --- addressbook/inc/class.uicontacts.inc.php | 94 +++++++++++++++++--- addressbook/setup/etemplates.inc.php | 8 +- addressbook/templates/default/app.css | 1 + addressbook/templates/default/email.xet | 107 +++++++++++++++++++++++ 4 files changed, 195 insertions(+), 15 deletions(-) create mode 100644 addressbook/templates/default/email.xet diff --git a/addressbook/inc/class.uicontacts.inc.php b/addressbook/inc/class.uicontacts.inc.php index 9380848d2a..5055ac6f4b 100644 --- a/addressbook/inc/class.uicontacts.inc.php +++ b/addressbook/inc/class.uicontacts.inc.php @@ -30,6 +30,7 @@ class uicontacts extends bocontacts 'view' => True, 'index' => True, 'photo' => True, + 'emailpopup'=> True, ); var $prefs; /** @@ -75,13 +76,15 @@ class uicontacts extends bocontacts * * @param array $content=null submitted content * @param string $msg=null message to show + * @param boolean $do_email=false do an email-selection popup or the regular index-page */ - function index($content=null,$msg=null) + function index($content=null,$msg=null,$do_email=false) { //echo "

uicontacts::index(".print_r($content,true).",'$msg')

\n"; - if (is_array($content)) + if (($re_submit = is_array($content))) { - $msg = $content['msg']; +// $msg = $content['msg']; + $do_email = $content['do_email']; if (isset($content['nm']['rows']['delete'])) // handle a single delete like delete with the checkboxes { @@ -116,15 +119,18 @@ class uicontacts extends bocontacts $org_view = $content['nm']['org_view']; } } + $preserv = array( + 'do_email' => $do_email, + ); $content = array( 'msg' => $msg ? $msg : $_GET['msg'], ); - $content['nm'] = $GLOBALS['egw']->session->appsession('index','addressbook'); + $content['nm'] = $GLOBALS['egw']->session->appsession($do_email ? 'email' : 'index','addressbook'); 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' - 'header_left' => 'addressbook.index.left', // I template to show right of the range-value, right-aligned (optional) + 'header_left' => $do_email ? 'addressbook.email.left' : 'addressbook.index.left', // I template to show right of the range-value, right-aligned (optional) // 'header_right' => 'addressbook.index.right', // I template to show right of the range-value, right-aligned (optional) 'bottom_too' => false, // I show the nextmatch-line (arrows, filters, search, ...) again after the rows 'never_hide' => True, // I never hide the nextmatch-line if less then maxmatch entrie @@ -134,7 +140,7 @@ class uicontacts extends bocontacts 'order' => 'n_family', // IO name of the column to sort after (optional for the sortheaders) 'sort' => 'ASC', // IO direction of the sort: 'ASC' or 'DESC' 'col_filter' => array(), // IO array of column-name value pairs (optional for the filterheaders) - 'filter_label' => 'Addressbook', // I label for filter (optional) + 'filter_label' => lang('Addressbook'), // I label for filter (optional) // filter needs to be type string as as int it matches the private addressbook too! 'filter' => (string) $GLOBALS['egw_info']['user']['account_id'], // IO filter, if not 'no_filter' => True 'filter_no_lang' => True, // I set no_lang for filter (=dont translate the options) @@ -142,15 +148,26 @@ class uicontacts extends bocontacts 'filter2' => '', // IO filter2, if not 'no_filter2' => True 'filter2_no_lang'=> True, // I set no_lang for filter2 (=dont translate the options) 'lettersearch' => true, + 'do_email' => $do_email, ); // use the state of the last session stored in the user prefs - if (($state = @unserialize($this->prefs['index_state']))) + if (($state = @unserialize($this->prefs[$do_email ? 'email_state' : 'index_state']))) { $content['nm'] = array_merge($content['nm'],$state); } } + if ($do_email && !$re_submit) + { + $content['nm']['to'] = 'to'; + $content['nm']['search'] = '@'; + } $sel_options = array( 'filter' => $this->get_addressbooks(EGW_ACL_READ,lang('All')), + 'to' => array( + 'to' => 'To', + 'cc' => 'Cc', + 'bcc' => 'Bcc', + ), ); $sel_options['action'] = array( 'delete' => lang('Delete'), @@ -188,8 +205,56 @@ class uicontacts extends bocontacts } $content['nm']['org_view_label'] = $sel_options['org_view'][(string) $content['nm']['org_view']]; - $this->tmpl->read('addressbook.index'); - return $this->tmpl->exec('addressbook.uicontacts.index',$content,$sel_options,$readonlys,$preserv); + $this->tmpl->read(/*$do_email ? 'addressbook.email' :*/ 'addressbook.index'); + return $this->tmpl->exec($do_email ? 'addressbook.uicontacts.emailpopup' : 'addressbook.uicontacts.index', + $content,$sel_options,$readonlys,$preserv,$do_email ? 2 : 0); + } + + /** + * Email address-selection popup + * + * @param array $content=null submitted content + * @param string $msg=null message to show + */ + function emailpopup($content=null,$msg=null) + { + if ($_GET['compat']) // 1.2 felamimail or old email + { + $handler = "if (opener.document.doit[to].value != '') + { + opener.document.doit[to].value += ','; + } + opener.document.doit[to].value += email"; + } + else // 1.3+ felamimail + { + $handler = 'opener.addEmail(to,email)'; + } + + $GLOBALS['egw_info']['flags']['java_script'] .= " + +"; + return $this->index($content,$msg,true); } /** @@ -337,6 +402,8 @@ class uicontacts extends bocontacts */ function get_rows(&$query,&$rows,&$readonlys,$id_only=false) { + $do_email = $query['do_email']; + //echo "

uicontacts::get_rows(".print_r($query,true).")

\n"; if (!$id_only) { @@ -354,7 +421,7 @@ class uicontacts extends bocontacts } unset($old_state); } - $GLOBALS['egw']->session->appsession('index','addressbook',$query); + $GLOBALS['egw']->session->appsession($do_email ? 'email' : 'index','addressbook',$query); // save the state of the index in the user prefs $state = serialize(array( 'filter' => $query['filter'], @@ -366,7 +433,7 @@ class uicontacts extends bocontacts )); if ($state != $this->prefs['index_state']) { - $GLOBALS['egw']->preferences->add('addressbook','index_state',$state); + $GLOBALS['egw']->preferences->add('addressbook',$do_mail ? 'email_state' : 'index_state',$state); // save prefs, but do NOT invalid the cache (unnecessary) $GLOBALS['egw']->preferences->save_repository(false,'user',false); } @@ -403,7 +470,7 @@ class uicontacts extends bocontacts } else // contacts view { - $query['template'] = 'addressbook.index.rows'; + $query['template'] = $do_email ? 'addressbook.email.rows' : 'addressbook.index.rows'; if ($query['org_view']) // view the contacts of one organisation only { @@ -750,7 +817,7 @@ class uicontacts extends bocontacts $GLOBALS['egw']->common->egw_exit(); } $content['link_to']['to_id'] = $content['id']; - $GLOBALS['egw_info']['flags']['java_script'] .= ""; break; @@ -1272,7 +1339,6 @@ $readonlys['button[vcard]'] = true; selbox.options[i].text = options[i]; } } - '; } } diff --git a/addressbook/setup/etemplates.inc.php b/addressbook/setup/etemplates.inc.php index e444e33f01..97811bac45 100755 --- a/addressbook/setup/etemplates.inc.php +++ b/addressbook/setup/etemplates.inc.php @@ -2,7 +2,7 @@ /** * eGroupWare - eTemplates for Application addressbook * http://www.egroupware.org - * generated by soetemplate::dump4setup() 2006-04-30 19:39 + * generated by soetemplate::dump4setup() 2006-06-16 08:06 * * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @package addressbook @@ -96,6 +96,12 @@ $templ_data[] = array('name' => 'addressbook.editphones','template' => '','lang' $templ_data[] = array('name' => 'addressbook.editphones','template' => '','lang' => '','group' => '0','version' => '1.3.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:18:{i:0;a:1:{s:2:"c2";s:2:"th";}i:1;a:3:{s:1:"A";a:6:{s:4:"type";s:5:"label";s:4:"span";s:16:"all,windowheader";s:5:"label";s:20:"Edit Phonenumbers - ";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";s:4:"name";s:2:"fn";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:2;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Description";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Number";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"pref";}}i:3;a:3:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:5:"label";s:8:"business";s:4:"size";s:12:",,,tel_work2";s:4:"span";s:5:",bold";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:2:"30";s:4:"name";s:9:"tel_work2";}s:1:"C";a:4:{s:4:"type";s:5:"radio";s:4:"size";s:17:"tel_work,♥";s:4:"name";s:10:"tel_prefer";s:4:"help";s:46:"select phone number as prefered way of contact";}}i:4;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:12:"mobile phone";s:4:"size";s:12:",,,tel_cell2";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:2:"30";s:4:"name";s:9:"tel_cell2";}s:1:"C";a:4:{s:4:"type";s:5:"radio";s:4:"size";s:17:"tel_cell,♥";s:4:"name";s:10:"tel_prefer";s:4:"help";s:46:"select phone number as prefered way of contact";}}i:5;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:3:"fax";s:4:"size";s:10:",,,tel_fax";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:2:"30";s:4:"name";s:7:"tel_fax";}s:1:"C";a:4:{s:4:"type";s:5:"radio";s:4:"size";s:16:"tel_fax,♥";s:4:"name";s:10:"tel_prefer";s:4:"help";s:46:"select phone number as prefered way of contact";}}i:6;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"car phone";s:4:"size";s:10:",,,tel_car";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:2:"30";s:4:"name";s:7:"tel_car";}s:1:"C";a:4:{s:4:"type";s:5:"radio";s:4:"size";s:16:"tel_car,♥";s:4:"name";s:10:"tel_prefer";s:4:"help";s:46:"select phone number as prefered way of contact";}}i:7;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:5:"pager";s:4:"size";s:12:",,,tel_pager";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:2:"30";s:4:"name";s:9:"tel_pager";}s:1:"C";a:4:{s:4:"type";s:5:"radio";s:4:"size";s:18:"tel_pager,♥";s:4:"name";s:10:"tel_prefer";s:4:"help";s:46:"select phone number as prefered way of contact";}}i:8;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:9;a:3:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:5:"label";s:9:"Assistent";s:4:"size";s:12:",,,assistent";s:4:"span";s:5:",bold";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"35";s:4:"name";s:9:"assistent";s:4:"span";s:1:"2";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:10;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"number";s:4:"size";s:16:",,,tel_assistent";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:2:"30";s:4:"name";s:13:"tel_assistent";}s:1:"C";a:4:{s:4:"type";s:5:"radio";s:4:"size";s:22:"tel_assistent,♥";s:4:"name";s:10:"tel_prefer";s:4:"help";s:46:"select phone number as prefered way of contact";}}i:11;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:12;a:3:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:5:"label";s:7:"Private";s:4:"size";s:12:",,,tel_home2";s:4:"span";s:5:",bold";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:2:"30";s:4:"name";s:9:"tel_home2";}s:1:"C";a:4:{s:4:"type";s:5:"radio";s:4:"size";s:17:"tel_home,♥";s:4:"name";s:10:"tel_prefer";s:4:"help";s:46:"select phone number as prefered way of contact";}}i:13;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:12:"mobile phone";s:4:"size";s:19:",,,tel_cell_private";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:2:"30";s:4:"name";s:16:"tel_cell_private";}s:1:"C";a:4:{s:4:"type";s:5:"radio";s:4:"size";s:25:"tel_cell_private,♥";s:4:"name";s:10:"tel_prefer";s:4:"help";s:46:"select phone number as prefered way of contact";}}i:14;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:3:"fax";s:4:"size";s:15:",,,tel_fax_home";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:2:"30";s:4:"name";s:12:"tel_fax_home";}s:1:"C";a:4:{s:4:"type";s:5:"radio";s:4:"size";s:21:"tel_fax_home,♥";s:4:"name";s:10:"tel_prefer";s:4:"help";s:46:"select phone number as prefered way of contact";}}i:15;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:16;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:12:" Other Phone";s:4:"size";s:12:",,,tel_other";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:2:"30";s:4:"name";s:9:"tel_other";}s:1:"C";a:4:{s:4:"type";s:5:"radio";s:4:"size";s:18:"tel_other,♥";s:4:"name";s:10:"tel_prefer";s:4:"help";s:46:"select phone number as prefered way of contact";}}i:17;a:3:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:5:"label";s:2:"Ok";s:7:"onclick";s:118:"set_style_by_class(\'table\',\'editphones\',\'display\',\'none\'); if (window.hidephones) hidephones(this.form); return false;";s:4:"span";s:3:"all";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:17;s:4:"cols";i:3;s:4:"size";s:13:",,,editphones";s:7:"options";a:1:{i:3;s:10:"editphones";}}}','size' => ',,,editphones','style' => '','modified' => '1131901207',); +$templ_data[] = array('name' => 'addressbook.email','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:3:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:2:",1";s:2:"c4";s:7:"noPrint";}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:5:"align";s:6:"center";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:22:"addressbook.email.left";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"align";s:5:"right";}}i:3;a:2:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"size";s:22:"addressbook.email.rows";s:4:"name";s:2:"nm";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"name";s:3:"add";s:5:"label";s:3:"Add";s:4:"help";s:17:"Add a new contact";s:7:"onclick";s:164:"window.open(egw::link(\'/index.php\',\'menuaction=addressbook.uicontacts.edit\'),\'_blank\',\'dependent=yes,width=850,height=440,scrollbars=yes,status=yes\'); return false;";}s:1:"B";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:5:"align";s:5:"right";i:1;a:5:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"use_all";s:5:"label";s:11:"whole query";s:8:"onchange";s:126:"if (this.checked==true && !confirm(\'Apply the action on the whole query, NOT only the shown contacts!!!\')) this.checked=false;";s:4:"help";s:67:"Apply the action on the whole query, NOT only the shown contacts!!!";}i:2;a:6:{s:4:"type";s:6:"select";s:8:"onchange";s:60:"if (this.value != \'\') { this.form.submit(); this.value=\'\'; }";s:4:"size";s:45:"Select an action or addressbook to move to...";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"action";s:4:"help";s:42:"Select an action or addressbook to move to";}i:3;a:8:{s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:70:"toggle_all(this.form,form::name(\'nm[rows][checked][]\')); return false;";s:6:"needed";s:1:"1";s:4:"span";s:14:",checkAllArrow";}}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1150437881',); + +$templ_data[] = array('name' => 'addressbook.email.left','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:11:{s:4:"type";s:4:"hbox";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:7:"no_lang";s:1:"1";s:4:"span";s:5:",bold";s:8:"onchange";i:1;s:4:"size";s:1:"3";i:1;a:10:{s:4:"type";s:5:"radio";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"name";s:2:"to";s:7:"no_lang";s:1:"1";s:4:"help";s:30:"where to add the email address";s:4:"span";s:5:",bold";s:4:"size";s:2:"to";s:5:"label";s:2:"To";}i:2;a:10:{s:4:"type";s:5:"radio";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"name";s:2:"to";s:7:"no_lang";s:1:"1";s:4:"help";s:30:"where to add the email address";s:4:"span";s:5:",bold";s:4:"size";s:2:"cc";s:5:"label";s:2:"Cc";}i:3;a:10:{s:4:"type";s:5:"radio";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"name";s:2:"to";s:7:"no_lang";s:1:"1";s:4:"help";s:30:"where to add the email address";s:4:"span";s:5:",bold";s:4:"size";s:3:"bcc";s:5:"label";s:3:"Bcc";}}}','size' => '','style' => '','modified' => '1150425286',); + +$templ_data[] = array('name' => 'addressbook.email.rows','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:5:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";s:1:"C";s:17:",!@order=n_family";s:1:"B";s:16:",!@order=n_given";s:1:"E";s:32:",!@order=/^(org_name|n_fileas)$/";}i:1;a:8:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:7:"n_given";s:5:"label";s:9:"Firstname";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:8:"n_family";}}s:1:"C";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:8:"n_family";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:7:"n_given";s:5:"label";s:9:"Firstname";}}s:1:"D";a:3:{s:4:"name";s:8:"org_name";s:5:"label";s:7:"Company";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"E";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:8:"n_family";}i:2;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:7:"n_given";s:5:"label";s:9:"Firstname";s:4:"span";s:9:",leftPad5";}}s:1:"F";a:3:{s:4:"type";s:5:"label";s:5:"label";s:14:"Business email";s:4:"name";s:5:"email";}s:1:"G";a:3:{s:4:"type";s:5:"label";s:4:"name";s:10:"email_home";s:5:"label";s:10:"Home email";}s:1:"H";a:6:{s:4:"type";s:4:"hbox";s:5:"align";s:6:"center";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";s:5:"align";s:6:"center";}i:2;a:8:{s:4:"type";s:6:"button";s:4:"size";s:5:"check";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:60:"toggle_all(this.form,form::name(\'checked[]\')); return false;";s:6:"needed";s:1:"1";s:5:"align";s:5:"right";}s:4:"span";s:8:",noPrint";}}i:2;a:8:{s:1:"A";a:5:{s:4:"type";s:5:"image";s:5:"label";s:21:"$row_cont[type_label]";s:4:"name";s:12:"${row}[type]";s:5:"align";s:6:"center";s:7:"no_lang";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:5:"label";s:4:"name";s:15:"${row}[n_given]";s:5:"label";s:1:" ";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[n_family]";s:4:"span";s:9:",leftPad5";}}s:1:"C";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:7:"2,0,0,0";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[n_family]";}i:2;a:5:{s:4:"type";s:5:"label";s:4:"name";s:15:"${row}[n_given]";s:4:"span";s:9:",leftPad5";s:5:"label";s:1:" ";s:7:"no_lang";s:1:"1";}}s:1:"D";a:3:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[org_name]";s:7:"no_lang";s:1:"1";}s:1:"E";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[n_family]";}i:2;a:5:{s:4:"type";s:5:"label";s:4:"name";s:15:"${row}[n_given]";s:4:"span";s:9:",leftPad5";s:5:"label";s:1:" ";s:7:"no_lang";s:1:"1";}}s:1:"F";a:5:{s:4:"type";s:3:"box";s:4:"size";s:6:"1,,0,0";s:7:"no_lang";s:1:"1";s:4:"span";s:9:",emailCol";i:1;a:4:{s:4:"type";s:5:"label";s:4:"size";s:80:",javascript:addEmail(\'$row_cont[n_fn] <$row_cont[email]>\');,,,,,$row_cont[email]";s:4:"name";s:13:"${row}[email]";s:7:"no_lang";s:1:"1";}}s:1:"G";a:5:{s:4:"type";s:3:"box";s:4:"size";s:6:"1,,0,0";s:7:"no_lang";s:1:"1";s:4:"span";s:9:",emailCol";i:1;a:4:{s:4:"type";s:5:"label";s:4:"size";s:90:",javascript:addEmail(\'$row_cont[n_fn] <$row_cont[email_home]>\');,,,,,$row_cont[email_home]";s:4:"name";s:18:"${row}[email_home]";s:7:"no_lang";s:1:"1";}}s:1:"H";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:5:"3,0,0";i:1;a:5:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:7:"onclick";s:189:"window.open(egw::link(\'/index.php\',\'menuaction=addressbook.uicontacts.edit&contact_id=$row_cont[id]\'),\'_blank\',\'dependent=yes,width=850,height=440,scrollbars=yes,status=yes\'); return false;";s:4:"name";s:19:"edit[$row_cont[id]]";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"help";s:19:"Delete this contact";s:7:"onclick";s:38:"return confirm(\'Delete this contact\');";}i:3;a:5:{s:4:"type";s:8:"checkbox";s:4:"name";s:9:"checked[]";s:4:"size";s:13:"$row_cont[id]";s:4:"help";s:45:"Select multiple contacts for a further action";s:5:"align";s:5:"right";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:8;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1150326789',); + $templ_data[] = array('name' => 'addressbook.index','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:3:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:2:",1";s:2:"c4";s:7:"noPrint";}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:5:"align";s:6:"center";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:22:"addressbook.index.left";}s:1:"B";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:23:"addressbook.index.right";}}i:3;a:2:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"size";s:22:"addressbook.index.rows";s:4:"name";s:2:"nm";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"name";s:3:"add";s:5:"label";s:3:"Add";s:4:"help";s:17:"Add a new contact";s:7:"onclick";s:164:"window.open(egw::link(\'/index.php\',\'menuaction=addressbook.uicontacts.edit\'),\'_blank\',\'dependent=yes,width=850,height=440,scrollbars=yes,status=yes\'); return false;";}s:1:"B";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:5:"align";s:5:"right";i:1;a:5:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"use_all";s:5:"label";s:11:"whole query";s:8:"onchange";s:126:"if (this.checked==true && !confirm(\'Apply the action on the whole query, NOT only the shown contacts!!!\')) this.checked=false;";s:4:"help";s:67:"Apply the action on the whole query, NOT only the shown contacts!!!";}i:2;a:6:{s:4:"type";s:6:"select";s:8:"onchange";s:60:"if (this.value != \'\') { this.form.submit(); this.value=\'\'; }";s:4:"size";s:45:"Select an action or addressbook to move to...";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"action";s:4:"help";s:42:"Select an action or addressbook to move to";}i:3;a:8:{s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:70:"toggle_all(this.form,form::name(\'nm[rows][checked][]\')); return false;";s:6:"needed";s:1:"1";s:4:"span";s:14:",checkAllArrow";}}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1145194921',); $templ_data[] = array('name' => 'addressbook.index.left','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:10:{s:4:"type";s:6:"select";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"name";s:8:"org_view";s:7:"no_lang";s:1:"1";s:4:"help";s:13:"Select a view";s:4:"span";s:5:",bold";s:8:"onchange";i:1;s:4:"size";s:12:"All contacts";}}','size' => '','style' => '','modified' => '1146123855',); diff --git a/addressbook/templates/default/app.css b/addressbook/templates/default/app.css index 3428504f56..60afe39f06 100644 --- a/addressbook/templates/default/app.css +++ b/addressbook/templates/default/app.css @@ -1,3 +1,4 @@ +.emailCol div { width: 100%; overflow: hidden; } .redItalic { color: red; font-style: italic; } .fixedHeight,.telNumbers { height: 12px; } .telNumbers { white-space: nowrap; } diff --git a/addressbook/templates/default/email.xet b/addressbook/templates/default/email.xet new file mode 100644 index 0000000000..f591ad24cc --- /dev/null +++ b/addressbook/templates/default/email.xet @@ -0,0 +1,107 @@ + + + + + +