Avoid overlap of public & private custom fields by giving privates an ID

This commit is contained in:
Nathan Gray 2013-06-03 23:10:23 +00:00
parent 4d13f3170f
commit 25c95ce870
3 changed files with 17 additions and 4 deletions

View File

@ -649,6 +649,14 @@ class addressbook_ui extends addressbook_bo
if (isset($actions['export']['children']['csv']) && !importexport_helper_functions::has_definitions('addressbook','export')) unset($actions['export']['children']['csv']);
//echo "<p>".__METHOD__."($do_email, $tid_filter, $org_view)</p>\n"; _debug_array($actions);
// Allow contacts to be dragged
/*
$actions['drag'] = array(
'type' => 'drag',
'dragType' => 'addressbook'
);
*/
return $actions;
}
@ -1587,6 +1595,8 @@ class addressbook_ui extends addressbook_bo
$content['private'] = (int) ($content['owner'] && substr($content['owner'],-1) == 'p');
$content['owner'] = (string) (int) $content['owner'];
$content['cat_id'] = $content['cat_id_tree'] ? $content['cat_id_tree'] : $content['cat_id'];
$content += $content['private_cfs'];
unset($content['private_cfs']);
switch($button)
{
@ -1823,6 +1833,9 @@ class addressbook_ui extends addressbook_bo
// Avoid ID conflict with tree & selectboxes
$content['cat_id_tree'] = $content['cat_id'];
// Avoid setting conflicts with private custom fields
$content['private_cfs'] = $content;
// how to display addresses
$content['addr_format'] = $this->addr_format_by_country($content['adr_one_countryname']);
$content['addr_format2'] = $this->addr_format_by_country($content['adr_two_countryname']);

View File

@ -2,7 +2,7 @@
/**
* EGroupware - eTemplates for Application addressbook
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2013-02-07 08:25
* generated by soetemplate::dump4setup() 2013-05-06 18:24
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package addressbook
@ -32,7 +32,7 @@ $templ_data[] = array('name' => 'addressbook.edit.cats','template' => '','lang'
$templ_data[] = array('name' => 'addressbook.edit.custom','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:2:"th";s:2:"h2";s:4:"100%";s:2:"h1";s:2:"20";}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Custom fields";}}i:2;a:1:{s:1:"A";a:2:{s:4:"type";s:12:"customfields";s:4:"size";s:32:"$cont[tid],$cont[no_private_cfs]";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:25:"100%,286,,row_on,0,0,auto";s:7:"options";a:6:{i:3;s:6:"row_on";i:0;s:4:"100%";i:1;s:3:"286";i:6;s:4:"auto";i:4;s:1:"0";i:5;s:1:"0";}}}','size' => '100%,286,,row_on,0,0,auto','style' => '','modified' => '1200540144',);
$templ_data[] = array('name' => 'addressbook.edit.custom_private','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:2:"th";s:2:"h2";s:4:"100%";s:2:"h1";s:2:"20";}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Custom fields";}}i:2;a:1:{s:1:"A";a:2:{s:4:"type";s:12:"customfields";s:4:"size";s:12:"$cont[tid],1";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:25:"100%,286,,row_on,0,0,auto";s:7:"options";a:6:{i:3;s:6:"row_on";i:0;s:4:"100%";i:1;s:3:"286";i:6;s:4:"auto";i:4;s:1:"0";i:5;s:1:"0";}}}','size' => '100%,286,,row_on,0,0,auto','style' => '','modified' => '1200540111',);
$templ_data[] = array('name' => 'addressbook.edit.custom_private','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:2:"th";s:2:"h2";s:4:"100%";s:2:"h1";s:2:"20";}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Custom fields";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:12:"customfields";s:4:"size";s:12:"$cont[tid],1";s:4:"name";s:11:"private_cfs";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:25:"100%,286,,row_on,0,0,auto";s:7:"options";a:6:{i:3;s:6:"row_on";i:0;s:4:"100%";i:1;s:3:"286";i:6;s:4:"auto";i:4;s:1:"0";i:5;s:1:"0";}}}','size' => '100%,286,,row_on,0,0,auto','style' => '','modified' => '1200540111',);
$templ_data[] = array('name' => 'addressbook.edit.details','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:5:{s:2:"c1";s:4:",top";s:2:"c2";s:11:"row_off,top";s:2:"h1";s:9:",@cat_tab";s:2:"c6";s:6:"row_on";s:2:"c5";s:11:"row_off,top";}i:1;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"image";s:4:"name";s:6:"folder";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:10:"Categories";}s:1:"C";a:3:{s:4:"type";s:10:"select-cat";s:4:"name";s:6:"cat_id";s:4:"size";s:12:"3,,width:99%";}}i:2;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"image";s:4:"name";s:4:"edit";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Notes";}s:1:"C";a:3:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"6,50";s:4:"name";s:4:"note";}}i:3;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"image";s:4:"name";s:4:"home";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Last date";}s:1:"C";a:2:{s:4:"type";s:4:"link";s:4:"name";s:9:"last_link";}}i:4;a:3:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Next date";}s:1:"C";a:2:{s:4:"type";s:4:"link";s:4:"name";s:9:"next_link";}}i:5;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"image";s:4:"name";s:4:"gear";}s:1:"B";a:3:{s:4:"type";s:14:"select-account";s:8:"readonly";s:1:"1";s:5:"label";s:7:"Created";}s:1:"C";a:5:{s:4:"type";s:4:"hbox";s:8:"readonly";s:1:"1";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:7:"creator";s:8:"readonly";s:1:"1";i:1;a:4:{s:4:"type";s:4:"hbox";s:4:"name";s:7:"creator";s:8:"readonly";s:1:"1";s:4:"span";s:9:",leftPad5";}}i:2;a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:7:"created";s:4:"span";s:9:",leftPad5";s:8:"readonly";s:1:"1";}}}i:6;a:3:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Last modified";}s:1:"C";a:5:{s:4:"type";s:4:"hbox";s:8:"readonly";s:1:"1";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:8:"modifier";s:8:"readonly";s:1:"1";i:1;a:4:{s:4:"type";s:4:"hbox";s:4:"name";s:7:"creator";s:8:"readonly";s:1:"1";s:4:"span";s:9:",leftPad5";}}i:2;a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:8:"modified";s:4:"span";s:9:",leftPad5";s:8:"readonly";s:1:"1";}}}}s:4:"rows";i:6;s:4:"cols";i:3;s:4:"size";s:17:"100%,286,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"286";i:6;s:4:"auto";}}}','size' => '100%,286,,,,,auto','style' => '','modified' => '1165511695',);

View File

@ -382,7 +382,7 @@
<description value="Custom fields"/>
</row>
<row height="100%">
<customfields options="$cont[tid],1"/>
<customfields id="private_cfs" options="$cont[tid],1"/>
</row>
</rows>
</grid>
@ -499,7 +499,7 @@
</row>
<row>
<menulist class="fileas">
<menupopup blur="Name" cols="3" statustext="own sorting" id="fileas_type" no_lang="1" rows="1"/>
<menupopup blur="Name" statustext="own sorting" id="fileas_type" no_lang="1"/>
</menulist>
<grid>
<columns>