forked from extern/egroupware
- fixed not displayed links on new entries
- removed all tab-indexes, as the default order is inutitive (with the one-column layout we us now) - added missing copied by note (as link now and no longer a note)
This commit is contained in:
parent
b111419c1b
commit
4adc7504f1
@ -60,6 +60,14 @@ class uicontacts extends bocontacts
|
||||
*/
|
||||
function edit($content=null)
|
||||
{
|
||||
if (!is_object($this->link))
|
||||
{
|
||||
if (!is_object($GLOBALS['egw']->link))
|
||||
{
|
||||
$GLOBALS['egw']->link =& CreateObject('phpgwapi.bolink');
|
||||
}
|
||||
$this->link =& $GLOBALS['egw']->link;
|
||||
}
|
||||
if (is_array($content))
|
||||
{
|
||||
list($button) = each($content['button']);
|
||||
@ -76,14 +84,6 @@ class uicontacts extends bocontacts
|
||||
// writing links for new entry, existing ones are handled by the widget itself
|
||||
if ($links && $content['id'])
|
||||
{
|
||||
if (!is_object($this->link))
|
||||
{
|
||||
if (!is_object($GLOBALS['egw']->link))
|
||||
{
|
||||
$GLOBALS['egw']->link =& CreateObject('phpgwapi.bolink');
|
||||
}
|
||||
$this->link =& $GLOBALS['egw']->link;
|
||||
}
|
||||
$this->link->link('addressbook',$content['id'],$links);
|
||||
}
|
||||
if ($button == 'save')
|
||||
@ -91,6 +91,7 @@ class uicontacts extends bocontacts
|
||||
echo "<html><body><script>var referer = opener.location;opener.location.href = referer;window.close();</script></body></html>\n";
|
||||
$GLOBALS['egw']->common->egw_exit();
|
||||
}
|
||||
$content['link_to']['to_id'] = $content['id'];
|
||||
$GLOBALS['egw_info']['flags']['java_script'] .= "<script LANGUAGE=\"JavaScript\">
|
||||
var referer = opener.location;
|
||||
opener.location.href = referer;</script>";
|
||||
@ -115,7 +116,19 @@ class uicontacts extends bocontacts
|
||||
{
|
||||
$content = $this->read($contact_id);
|
||||
}
|
||||
if($_GET['makecp']) unset($content['id']);
|
||||
if($content && $_GET['makecp']) // copy the contact
|
||||
{
|
||||
$content['link_to']['to_id'] = 0;
|
||||
$this->link->link('addressbook',$content['link_to']['to_id'],'addressbook',$content['id'],
|
||||
lang('Copied by %1, from record #%2.',$GLOBALS['egw']->common->display_fullname('',
|
||||
$GLOBALS['egw_info']['user']['account_firstname'],$GLOBALS['egw_info']['user']['account_lastname']),
|
||||
$content['id']));
|
||||
unset($content['id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['link_to']['to_id'] = (int) $contact_id;
|
||||
}
|
||||
}
|
||||
|
||||
//_debug_array($content);
|
||||
@ -136,9 +149,9 @@ class uicontacts extends bocontacts
|
||||
$sel_options['tz'] = $tz;
|
||||
$content['tz'] = $content['tz'] ? $content['tz'] : 0;
|
||||
|
||||
$content['link'] = $content['link_to'] = array(
|
||||
$content['link_to'] = array(
|
||||
'to_app' => 'addressbook',
|
||||
'to_id' => (int) $content['id'],
|
||||
'to_id' => $content['link_to']['to_id'],
|
||||
);
|
||||
|
||||
$this->tmpl->read('addressbook.edit');
|
||||
@ -186,11 +199,11 @@ class uicontacts extends bocontacts
|
||||
}
|
||||
}
|
||||
$content['view'] = true;
|
||||
$content['link'] = $content['link_to'] = array(
|
||||
$content['link_to'] = array(
|
||||
'to_app' => 'addressbook',
|
||||
'to_id' => $content['id'],
|
||||
);
|
||||
$readonlys['link'] = $readonlys['link_to'] = $readonlys['customfields'] = true;
|
||||
$readonlys['link_to'] = $readonlys['customfields'] = true;
|
||||
$readonlys['button[save]'] = $readonlys['button[apply]'] = true;
|
||||
$readonlys['button[delete]'] = !$this->check_perms(EGW_ACL_DELETE,$content);
|
||||
$readonlys['button[edit]'] = !$this->check_perms(EGW_ACL_EDIT,$content);
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="addressbook.edit.personal" template="" lang="" group="0" version="1.0.1.001">
|
||||
<template id="addressbook.edit.personal" template="" lang="" group="0" version="1.0.1.002">
|
||||
<grid height="250">
|
||||
<columns>
|
||||
<column/>
|
||||
@ -12,42 +12,42 @@
|
||||
<row>
|
||||
<image src="personal"/>
|
||||
<description value="prefix"/>
|
||||
<textbox id="n_prefix" size="45" maxlength="64" tabindex="1"/>
|
||||
<textbox id="n_prefix" size="45" maxlength="64"/>
|
||||
</row>
|
||||
<row>
|
||||
<description/>
|
||||
<description value="first name"/>
|
||||
<textbox id="n_given" size="45" maxlength="64" tabindex="2"/>
|
||||
<textbox id="n_given" size="45" maxlength="64"/>
|
||||
</row>
|
||||
<row>
|
||||
<description/>
|
||||
<description value="middle name"/>
|
||||
<textbox id="n_middle" size="45" maxlength="64" tabindex="3"/>
|
||||
<textbox id="n_middle" size="45" maxlength="64"/>
|
||||
</row>
|
||||
<row>
|
||||
<description/>
|
||||
<description value="last name"/>
|
||||
<textbox id="n_family" size="45" maxlength="64" tabindex="4"/>
|
||||
<textbox id="n_family" size="45" maxlength="64"/>
|
||||
</row>
|
||||
<row>
|
||||
<description/>
|
||||
<description value="suffix"/>
|
||||
<textbox id="n_suffix" size="45" maxlength="64" tabindex="5"/>
|
||||
<textbox id="n_suffix" size="45" maxlength="64"/>
|
||||
</row>
|
||||
<row height="40">
|
||||
<image src="gohome"/>
|
||||
<description value="company name" options=",,,org_name"/>
|
||||
<textbox size="45" maxlength="64" id="org_name" tabindex="5"/>
|
||||
<textbox size="45" maxlength="64" id="org_name"/>
|
||||
</row>
|
||||
<row valign="top">
|
||||
<image src="folder"/>
|
||||
<description value="category"/>
|
||||
<listbox type="select-cat" id="cat_id" rows="3" span="4" tabindex="6"/>
|
||||
<listbox type="select-cat" id="cat_id" rows="3" span="4"/>
|
||||
</row>
|
||||
<row>
|
||||
<image src="password"/>
|
||||
<description value="Private" options=",,,private"/>
|
||||
<checkbox id="private" tabindex="7"/>
|
||||
<checkbox id="private"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
@ -204,7 +204,7 @@
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="addressbook.edit.links" template="" lang="" group="0" version="1.0.1.001">
|
||||
<template id="addressbook.edit.links" template="" lang="" group="0" version="1.0.1.002">
|
||||
<grid width="100%" height="250" overflow="auto">
|
||||
<columns>
|
||||
<column/>
|
||||
@ -220,7 +220,7 @@
|
||||
<description value="Existing links"/>
|
||||
</row>
|
||||
<row>
|
||||
<link-list id="link"/>
|
||||
<link-list id="link_to"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
@ -314,7 +314,7 @@
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="addressbook.edit" template="" lang="" group="0" version="1.0.1.001">
|
||||
<template id="addressbook.edit" template="" lang="" group="0" version="1.0.1.002">
|
||||
<grid>
|
||||
<columns>
|
||||
<column width="450"/>
|
||||
@ -371,22 +371,22 @@
|
||||
<row>
|
||||
<image src="kaddressbook"/>
|
||||
<description value="business" options=",,,tel_work"/>
|
||||
<textbox id="tel_work" size="28" maxlength="40" tabindex="10"/>
|
||||
<textbox id="tel_work" size="28" maxlength="40"/>
|
||||
</row>
|
||||
<row>
|
||||
<description/>
|
||||
<description value="mobile phone" options=",,,tel_cell"/>
|
||||
<textbox id="tel_cell" size="28" maxlength="40" tabindex="11"/>
|
||||
<textbox id="tel_cell" size="28" maxlength="40"/>
|
||||
</row>
|
||||
<row>
|
||||
<description/>
|
||||
<description value="Private" options=",,,tel_home"/>
|
||||
<textbox id="tel_home" size="28" maxlength="40" tabindex="12"/>
|
||||
<textbox id="tel_home" size="28" maxlength="40"/>
|
||||
</row>
|
||||
<row>
|
||||
<description/>
|
||||
<description/>
|
||||
<button label="More ..." onclick="showphones(this.form); return false;" tabindex="13" accesskey="m"/>
|
||||
<button label="More ..." onclick="showphones(this.form); return false;" accesskey="m"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
@ -403,17 +403,17 @@
|
||||
<row>
|
||||
<image src="package_network"/>
|
||||
<description value="url" options=",,,url"/>
|
||||
<textbox id="url" size="28" maxlength="128" tabindex="15"/>
|
||||
<textbox id="url" size="28" maxlength="128"/>
|
||||
</row>
|
||||
<row>
|
||||
<image src="email_icon"/>
|
||||
<description value="business email" options=",,,email"/>
|
||||
<textbox id="email" size="28" maxlength="64" tabindex="16"/>
|
||||
<textbox id="email" size="28" maxlength="64"/>
|
||||
</row>
|
||||
<row>
|
||||
<description/>
|
||||
<description value="home email" options=",,,email_home"/>
|
||||
<textbox id="email_home" size="28" maxlength="64" tabindex="17"/>
|
||||
<textbox id="email_home" size="28" maxlength="64"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
@ -434,9 +434,9 @@
|
||||
<button label="Edit" id="button[edit]" onclick="window.open(egw::link('/index.php','menuaction=addressbook.uicontacts.edit&contact_id=$cont[id]'),'_blank','dependent=yes,width=850,height=440,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button label="Copy" id="button[copy]" onclick="window.open(egw::link('/index.php','menuaction=addressbook.uicontacts.edit&contact_id=$cont[id]&makecp=1'),'_blank','dependent=yes,width=850,height=440,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button label="vCard" id="button[vcard]" statustext="download this contact as vCard file"/>
|
||||
<button label="Save" id="button[save]" tabindex="20" accesskey="s"/>
|
||||
<button label="Apply" id="button[apply]" tabindex="21"/>
|
||||
<button label="Cancel" id="button[cancel]" onclick="if($cont[view]0) return true; self.close(); return false;" tabindex="22"/>
|
||||
<button label="Save" id="button[save]" accesskey="s"/>
|
||||
<button label="Apply" id="button[apply]"/>
|
||||
<button label="Cancel" id="button[cancel]" onclick="if($cont[view]0) return true; self.close(); return false;"/>
|
||||
<template id="addressbook.editphones"/>
|
||||
</hbox>
|
||||
<button label="Delete" id="button[delete]" onclick="return confirm('Are you shure you want to delete this contact?');" align="right" tabindex="25"/>
|
||||
|
Loading…
Reference in New Issue
Block a user