From d4a2c0cf5c16525753f2ac2f91fdac0d3bcb3d2c Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Tue, 26 Jan 2010 13:09:25 -0500 Subject: [PATCH] Import contacts into the selected address book + set button states accordingly --- skins/default/templates/addressbook.html | 66 +++++++++++++++++++++++++++----- 1 files changed, 55 insertions(+), 11 deletions(-) diff --git a/skins/default/templates/addressbook.html b/skins/default/templates/addressbook.html index 96b5fbc..fe90192 100644 --- a/skins/default/templates/addressbook.html +++ b/skins/default/templates/addressbook.html @@ -3,7 +3,26 @@ <head> <title><roundcube:object name="pagetitle" /></title> <roundcube:include file="/includes/links.html" /> -<link rel="stylesheet" type="text/css" href="/addresses.css" /> +<script type="text/javascript" src="/splitter.js"></script> + +<style type="text/css"> +<roundcube:if condition="count(env:address_sources) <= 1" /> +#abookcountbar { left: 20px; } +#addressscreen { left: 20px; +<roundcube:exp expression="browser:ie ? 'width:expression((parseInt(document.documentElement.clientWidth)-40)+\\'px\\');' : ''" /> +} +#addresslist { width: <roundcube:exp expression="!empty(cookie:addressviewsplitter) ? cookie:addressviewsplitter-5 : 245" />px; } +#contacts-box { left: <roundcube:exp expression="!empty(cookie:addressviewsplitter) ? cookie:addressviewsplitter+5 : 255" />px; +<roundcube:exp expression="browser:ie ? ('width:expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:addressviewsplitter) ? cookie:addressviewsplitter+5 : 255).')+\\'px\\');') : ''" /> +} +<roundcube:else /> +#addresslist { width: <roundcube:exp expression="!empty(cookie:addressviewsplitter) ? cookie:addressviewsplitter-5 : 245" />px; } +#contacts-box { left: <roundcube:exp expression="!empty(cookie:addressviewsplitter) ? cookie:addressviewsplitter+5 : 255" />px; +<roundcube:exp expression="browser:ie ? ('width:expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:addressviewsplitter) ? cookie:addressviewsplitter+5 : 255).')+\\'px\\');') : ''" /> +} +<roundcube:endif /> +</style> + </head> <body> @@ -11,27 +30,52 @@ <roundcube:include file="/includes/header.html" /> <div id="abooktoolbar"> -<roundcube:button command="add" imageAct="/images/buttons/add_contact_act.png" imagePas="/images/buttons/add_contact_pas.png" width="32" height="32" title="newcontact" /> -<roundcube:button command="delete" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletecontact" /> -<roundcube:button command="compose" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="composeto" /> -<roundcube:button command="print" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="print" /> -<roundcube:button command="export" imageAct="/images/buttons/download_act.png" imagePas="/images/buttons/download_pas.png" width="32" height="32" title="export" /> -<roundcube:button command="ldappublicsearch" imageAct="/images/buttons/contacts_act.png" imagePas="/images/buttons/contacts_pas.png" width="32" height="32" title="ldapsearch" /> +<roundcube:button command="add" type="link" class="buttonPas addcontact" classAct="button addcontact" classSel="button addcontactSel" title="newcontact" content=" " /> +<roundcube:button command="compose" type="link" class="buttonPas compose" classAct="button compose" classSel="button composeSel" title="composeto" content=" " /> +<roundcube:button command="delete" type="link" class="buttonPas delete" classAct="button delete" classSel="button deleteSel" title="deletecontact" content=" " /> +<span class="separator"> </span> +<roundcube:button command="import" type="link" class="buttonPas import" classAct="button import" classSel="button importSel" title="importcontacts" content=" " /> +<roundcube:button command="export" type="link" class="buttonPas export" classAct="button export" classSel="button exportSel" title="exportvcards" content=" " /> +<roundcube:container name="toolbar" id="abooktoolbar" /> </div> -<div id="abookcountbar"> -<roundcube:button command="previouspage" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previouspage" /> - <roundcube:object name="recordsCountDisplay" /> -<roundcube:button command="nextpage" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextpage" /> +<div id="quicksearchbar"> +<roundcube:button name="searchmod" id="searchmod" image="/images/icons/glass.png" /> +<roundcube:object name="searchform" id="quicksearchbox" /> +<roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" /> </div> + +<roundcube:if condition="count(env:address_sources) > 1" /> +<div id="directorylist"> +<div id="groups-title" class="boxtitle"><roundcube:label name="groups" /></div> +<roundcube:object name="directorylist" id="directories-list" /> +</div> +<roundcube:endif /> + +<div id="addressscreen"> <div id="addresslist"> <roundcube:object name="addresslist" id="contacts-table" class="records-table" cellspacing="0" summary="Contacts list" /> </div> +<script type="text/javascript"> + var addrviewsplit = new rcube_splitter({id:'addressviewsplitter', p1: 'addresslist', p2: 'contacts-box', orientation: 'v', relative: true, start: 250}); + rcmail.add_onload('addrviewsplit.init()'); +</script> + <div id="contacts-box"> <roundcube:object name="addressframe" id="contact-frame" width="100%" height="100%" frameborder="0" src="/watermark.html" /> </div> +</div> + +<div id="abookcountbar" class="pagenav"> + <roundcube:button command="firstpage" type="link" class="buttonPas firstpage" classAct="button firstpage" classSel="button firstpageSel" title="firstpage" content=" " /> + <roundcube:button command="previouspage" type="link" class="buttonPas prevpage" classAct="button prevpage" classSel="button prevpageSel" title="previouspage" content=" " /> + <roundcube:object name="recordsCountDisplay" style="padding:0 .5em; float:left" /> + <roundcube:button command="nextpage" type="link" class="buttonPas nextpage" classAct="button nextpage" classSel="button nextpageSel" title="nextpage" content=" " /> + <roundcube:button command="lastpage" type="link" class="buttonPas lastpage" classAct="button lastpage" classSel="button lastpageSel" title="lastpage" content=" " /> +</div> + </body> </html> -- Gitblit v1.9.1