fixed not readonly custom fields, give all tabs equal height and adjusted height of phone numbers

This commit is contained in:
Ralf Becker 2011-04-19 14:58:51 +00:00
parent a0d6461483
commit 9689ca4236
4 changed files with 54 additions and 38 deletions

View File

@ -1663,14 +1663,15 @@ class addressbook_ui extends addressbook_bo
));
}
}
foreach(array_keys($this->contact_fields) as $key)
// make everything not explicit mentioned readonly
$readonlys['__ALL__'] = true;
$readonlys['photo'] = $readonlys['button[cancel]'] = $readonlys['button[copy]'] =
$readonlys['button[ok]'] = $readonlys['button[more]'] = false;
foreach(array('tel_home','tel_work','tel_cell','tel_fax') as $key)
{
$readonlys[$key] = true;
if (in_array($key,array('tel_home','tel_work','tel_cell','tel_fax')))
{
$readonlys[$key.'2'] = true;
$content[$key.'2'] = $content[$key];
}
$content[$key.'2'] = $content[$key];
}
// respect category permissions
@ -1684,13 +1685,9 @@ class addressbook_ui extends addressbook_bo
'to_app' => 'addressbook',
'to_id' => $content['id'],
);
$readonlys['link_to'] = $readonlys['customfields'] = $readonlys['fileas_type'] = true;
$readonlys['button[save]'] = $readonlys['button[apply]'] = $readonlys['change_photo'] = true;
$readonlys['button[delete]'] = !$content['owner'] || !$this->check_perms(EGW_ACL_DELETE,$content);
$readonlys['button[edit]'] = !$this->check_perms(EGW_ACL_EDIT,$content);
$content['disable_change_org'] = true;
// ToDo: fix vCard export
$readonlys['button[vcard]'] = true;
// how to display addresses
$content['addr_format'] = $this->addr_format_by_country($content['adr_one_countryname']);

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
.cursorHand { cursor: hand; }
.countrySelect select { width: 150px; }
.custom_country input {display: none; }
.contactid:before { content:"#" }
.emailCol div { width: 100%; overflow: hidden; }
.redItalic { color: red; font-style: italic; }
@ -50,7 +51,7 @@
border-bottom: #9c9c9c 1px solid;
}
fieldset.phoneGroup {
margin-top: 14px;
margin-top: 12px;
font-size: 110%;
height: 140px;
border: solid black 2px;
@ -60,7 +61,7 @@ fieldset.phoneGroup {
height: 122px;
}
fieldset.emailGroup {
margin-top: 4px;
margin-top: 10px;
font-size: 110%;
height: 112px;
border: solid black 2px;

View File

@ -48,13 +48,13 @@
</row>
<row>
<description/>
<button label="Ok" onclick="set_style_by_class('table','editname','display','none'); if(document.getElementById(form::name('title'))){document.getElementById(form::name('title')).focus();} return false;"/>
<button label="Ok" onclick="set_style_by_class('table','editname','display','none'); if(document.getElementById(form::name('title'))){document.getElementById(form::name('title')).focus();} return false;" id="button[ok]"/>
</row>
</rows>
</grid>
</template>
<template id="addressbook.edit.general" template="" lang="" group="0" version="1.5.002">
<grid height="286">
<template id="addressbook.edit.general" template="" lang="" group="0" version="1.5.004">
<grid width="100%" height="286">
<columns>
<column/>
<column/>
@ -72,6 +72,7 @@
<column/>
<column/>
<column/>
<column/>
</columns>
<rows>
<row>
@ -82,15 +83,18 @@
<description/>
<template id="addressbook.edit.name"/>
<description/>
<description/>
</row>
<row>
<description options=",,,title" value="Title"/>
<textbox size="36" maxlength="64" id="title" span="2"/>
<description/>
</row>
<row>
<description options=",,,role" value="Role"/>
<textbox size="20" maxlength="64" id="role"/>
<textbox size="5" label="Room" id="room"/>
<description/>
</row>
</rows>
</grid>
@ -160,7 +164,7 @@
</grid>
</template>
<template id="addressbook.edit.cats" template="" lang="" group="0" version="1.4.001">
<grid width="100%" height="258" overflow="auto">
<grid width="100%" height="286" overflow="auto">
<columns>
<column/>
<column/>
@ -178,7 +182,7 @@
</grid>
</template>
<template id="addressbook.edit.home" template="" lang="" group="0" version="1.3.003">
<grid height="258">
<grid width="100%" height="286">
<columns>
<column/>
<column/>
@ -248,7 +252,7 @@
</grid>
</template>
<template id="addressbook.edit.details" template="" lang="" group="0" version="1.5.001">
<grid width="100%" height="258" overflow="auto">
<grid width="100%" height="286" overflow="auto">
<columns>
<column/>
<column/>
@ -306,7 +310,7 @@
</grid>
</template>
<template id="addressbook.edit.links" template="" lang="" group="0" version="1.3.001">
<grid width="100%" height="258" overflow="auto">
<grid width="100%" height="286" overflow="auto">
<columns>
<column/>
</columns>
@ -327,7 +331,7 @@
</grid>
</template>
<template id="addressbook.edit.distribution_list" template="" lang="" group="0" version="1.5.001">
<grid width="100%" height="258" overflow="auto">
<grid width="100%" height="286" overflow="auto">
<columns>
<column/>
</columns>
@ -351,7 +355,7 @@
</grid>
</template>
<template id="addressbook.edit.custom" template="" lang="" group="0" version="1.5.002">
<grid width="100%" height="258" class="row_on" spacing="0" padding="0" overflow="auto">
<grid width="100%" height="286" class="row_on" spacing="0" padding="0" overflow="auto">
<columns>
<column/>
</columns>
@ -366,7 +370,7 @@
</grid>
</template>
<template id="addressbook.edit.custom_private" template="" lang="" group="0" version="1.5.002">
<grid width="100%" height="258" class="row_on" spacing="0" padding="0" overflow="auto">
<grid width="100%" height="286" class="row_on" spacing="0" padding="0" overflow="auto">
<columns>
<column/>
</columns>
@ -380,6 +384,18 @@
</rows>
</grid>
</template>
<template id="addressbook.edit.history" template="" lang="" group="0" version="1.9.001">
<grid width="100%" height="286" overflow="auto">
<columns>
<column/>
</columns>
<rows>
<row>
<historylog id="history"/>
</row>
</rows>
</grid>
</template>
<template id="addressbook.editphones" template="" lang="" group="0" version="1.5.001">
<grid class="editphones">
<columns>
@ -462,7 +478,7 @@
<radio options="tel_other,&amp;hearts;" 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"/>
<button label="Ok" onclick="set_style_by_class('table','editphones','display','none'); if (window.hidephones) hidephones(this.form); return false;" span="all" align="center" id="button[ok]"/>
</row>
</rows>
</grid>
@ -508,6 +524,7 @@
<tab label="Distribution lists" statustext="Distribution lists, ..."/>
<tab label="Extra" statustext="Custom fields"/>
<tab label="Extra private" statustext="Private custom fields"/>
<tab label="History" statustext=""/>
</tabs>
<tabpanels>
<template id="addressbook.edit.general"/>
@ -518,6 +535,7 @@
<template id="addressbook.edit.distribution_list"/>
<template id="addressbook.edit.custom"/>
<template id="addressbook.edit.custom_private"/>
<template id="addressbook.edit.history"/>
</tabpanels>
</tabbox>
<vbox>
@ -559,7 +577,7 @@
<row>
<description/>
<description/>
<button label="More ..." onclick="set_style_by_class('table','editphones','display','inline'); if (window.showphones) 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" id="button[more]"/>
<description/>
</row>
</rows>