et2 compatability

This commit is contained in:
Nathan Gray 2012-07-24 23:49:12 +00:00
parent 7ae7337d83
commit 70bc8469a1
4 changed files with 19 additions and 19 deletions

View File

@ -1796,8 +1796,8 @@ class addressbook_ui extends addressbook_bo
// how to display addresses // how to display addresses
$content['addr_format'] = $this->addr_format_by_country($content['adr_one_countryname']); $content['addr_format'] = $this->addr_format_by_country($content['adr_one_countryname']);
$content['addr_format2'] = $this->addr_format_by_country($content['adr_two_countryname']); $content['addr_format2'] = $this->addr_format_by_country($content['adr_two_countryname']);
$GLOBALS['egw']->js->set_onload('show_custom_country(document.getElementById("exec[adr_one_countrycode]"));'); $GLOBALS['egw']->js->set_onload('show_custom_country($j(\'select[id*="adr_one_countrycode"]\').get(0));');
$GLOBALS['egw']->js->set_onload('show_custom_country(document.getElementById("exec[adr_two_countrycode]"));'); $GLOBALS['egw']->js->set_onload('show_custom_country($j(\'select[id*="adr_two_countrycode"]\').get(0));');
//_debug_array($content); //_debug_array($content);
$readonlys['button[delete]'] = !$content['owner'] || !$this->check_perms(EGW_ACL_DELETE,$content); $readonlys['button[delete]'] = !$content['owner'] || !$this->check_perms(EGW_ACL_DELETE,$content);

View File

@ -154,7 +154,7 @@ function show_custom_country(selectbox)
} }
else if (custom_field) else if (custom_field)
{ {
if(selectbox.value == "" || selectbox.value == null) if((selectbox.value == "" || selectbox.value == null) && custom_field.value != "")
{ {
selectbox.value = "-custom-"; selectbox.value = "-custom-";
custom_field.style.display = "inline"; custom_field.style.display = "inline";

File diff suppressed because one or more lines are too long

View File

@ -14,7 +14,7 @@
<file statustext="Select a portrait format jpeg photo. It will be resized to 60 pixel width." id="upload_photo" class="photo"/> <file statustext="Select a portrait format jpeg photo. It will be resized to 60 pixel width." id="upload_photo" class="photo"/>
</row> </row>
<row> <row>
<button align="center" label="Ok" onclick="set_style_by_class('table','uploadphoto','display','none'); return false;"/> <button align="center" label="Ok" onclick="jQuery('table.uploadphoto').css('display','none'); return false;"/>
</row> </row>
</rows> </rows>
</grid> </grid>
@ -48,13 +48,13 @@
</row> </row>
<row> <row>
<description/> <description/>
<button label="Ok" id="button[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" id="button[ok]" onclick="jQuery('table.editname').css('display','none'); if(document.getElementById(form::name('title'))){document.getElementById(form::name('title')).focus();} return false;"/>
</row> </row>
</rows> </rows>
</grid> </grid>
</template> </template>
<template id="addressbook.edit.general" template="" lang="" group="0" version="1.9.003"> <template id="addressbook.edit.general" template="" lang="" group="0" version="1.9.003">
<grid height="286"> <grid width="100%" height="286">
<columns> <columns>
<column/> <column/>
<column/> <column/>
@ -64,7 +64,7 @@
<row valign="top"> <row valign="top">
<image src="accounts"/> <image src="accounts"/>
<vbox> <vbox>
<image src="photo" onclick="set_style_by_class('table','uploadphoto','display','inline'); return false;" class="photo"/> <image src="photo" onclick="jQuery('table.uploadphoto').css('display','inline'); return false;" class="photo"/>
<template id="addressbook.edit.upload"/> <template id="addressbook.edit.upload"/>
</vbox> </vbox>
<grid> <grid>
@ -77,7 +77,7 @@
<rows> <rows>
<row> <row>
<description value="Name"/> <description value="Name"/>
<textbox cols="3" id="n_fn" no_lang="1" onclick="set_style_by_class('table','editname','display','inline'); var focElem = document.getElementById(form::name('n_prefix')); if (!(typeof(focElem) == 'undefined') &amp;&amp; typeof(focElem.focus)=='function') document.getElementById(form::name('n_prefix')).focus();" readonly="true" rows="1" size="-36" span="2" class="cursorHand"/> <textbox cols="3" id="n_fn" no_lang="1" onclick="jQuery('table.editname').css('display','inline'); var focElem = document.getElementById(form::name('n_prefix')); if (!(typeof(focElem) == 'undefined') &amp;&amp; typeof(focElem.focus)=='function') document.getElementById(form::name('n_prefix')).focus();" readonly="true" rows="1" size="-36" span="2" class="cursorHand"/>
</row> </row>
<row> <row>
<description/> <description/>
@ -382,7 +382,7 @@
<description value="Custom fields"/> <description value="Custom fields"/>
</row> </row>
<row height="100%"> <row height="100%">
<customfields options="$cont[tid],1"/> <customfields id="private" options="$cont[tid],1"/>
</row> </row>
</rows> </rows>
</grid> </grid>
@ -481,12 +481,12 @@
<radio statustext="select phone number as prefered way of contact" id="tel_prefer" options="tel_other,&amp;hearts;"/> <radio statustext="select phone number as prefered way of contact" id="tel_prefer" options="tel_other,&amp;hearts;"/>
</row> </row>
<row> <row>
<button align="center" label="Ok" id="button[ok]" onclick="set_style_by_class('table','editphones','display','none'); if (window.hidephones) hidephones(this.form); return false;" span="all"/> <button align="center" label="Ok" id="button[ok]" onclick="jQuery('table.editphones').css('display','none'); if (window.hidephones) hidephones(this.form); return false;" span="all"/>
</row> </row>
</rows> </rows>
</grid> </grid>
</template> </template>
<template id="addressbook.edit" template="" lang="" group="0" version="1.9.002"> <template id="addressbook.edit" template="" lang="" group="0" version="1.9.003">
<grid> <grid>
<columns> <columns>
<column width="450"/> <column width="450"/>
@ -580,7 +580,7 @@
<row> <row>
<description/> <description/>
<description/> <description/>
<button accesskey="m" label="More ..." id="button[more]" onclick="set_style_by_class('table','editphones','display','inline'); if (window.showphones) showphones(this.form); return false;"/> <button accesskey="m" label="More ..." id="button[more]" onclick="jQuery('table.editphones').css('display','inline'); if (window.showphones) showphones(this.form); return false;"/>
<description/> <description/>
</row> </row>
</rows> </rows>