mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:18:57 +01:00
keep automatic update of pricelist, if project get updated
This commit is contained in:
parent
e59fecc0e7
commit
043f2480f4
@ -1694,7 +1694,12 @@ class infolog_ui
|
|||||||
$app = $content['info_contact']['app'];
|
$app = $content['info_contact']['app'];
|
||||||
$id = $content['info_contact']['id'];
|
$id = $content['info_contact']['id'];
|
||||||
}
|
}
|
||||||
if($app && $id)
|
// if project has been removed, but is still info_contact --> also remove it
|
||||||
|
if ($app == 'projectmanager' && $id && $id == $content['old_pm_id'] && !$content['pm_id'])
|
||||||
|
{
|
||||||
|
unset($content['info_link_id'], $id, $content['info_contact']['id']);
|
||||||
|
}
|
||||||
|
elseif ($app && $id)
|
||||||
{
|
{
|
||||||
if(!is_array($content['link_to']))
|
if(!is_array($content['link_to']))
|
||||||
{
|
{
|
||||||
@ -1767,8 +1772,8 @@ class infolog_ui
|
|||||||
{
|
{
|
||||||
//echo "<p>this->link->unlink2(0,infolog,{$content['link_to']['to_id']},0,'projectmanager',{$content['old_pm_id']});</p>\n";
|
//echo "<p>this->link->unlink2(0,infolog,{$content['link_to']['to_id']},0,'projectmanager',{$content['old_pm_id']});</p>\n";
|
||||||
egw_link::unlink2(0,infolog,$content['link_to']['to_id'],0,'projectmanager',$content['old_pm_id']);
|
egw_link::unlink2(0,infolog,$content['link_to']['to_id'],0,'projectmanager',$content['old_pm_id']);
|
||||||
$content['old_pm_id'] = $content['pm_id'];
|
|
||||||
}
|
}
|
||||||
|
$content['old_pm_id'] = $content['pm_id'];
|
||||||
}
|
}
|
||||||
// writing links for a new entry
|
// writing links for a new entry
|
||||||
if ($info_id && is_array($content['link_to']['to_id']) && count($content['link_to']['to_id']))
|
if ($info_id && is_array($content['link_to']['to_id']) && count($content['link_to']['to_id']))
|
||||||
|
@ -558,5 +558,18 @@ app.classes.infolog = AppJS.extend(
|
|||||||
var data = egw.dataGetUIDdata(_selected[0].id);
|
var data = egw.dataGetUIDdata(_selected[0].id);
|
||||||
|
|
||||||
return data && data.data && data.data.info_id_parent > 0;
|
return data && data.data && data.data.info_id_parent > 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Submit template if widget has a value
|
||||||
|
*
|
||||||
|
* Used for project-selection to update pricelist items from server
|
||||||
|
*
|
||||||
|
* @param {DOMNode} _node
|
||||||
|
* @param {et2_widget} _widget
|
||||||
|
*/
|
||||||
|
submit_if_not_empty: function(_node, _widget)
|
||||||
|
{
|
||||||
|
if (_widget.get_value()) this.et2._inst.submit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
</row>
|
</row>
|
||||||
<row class="row">
|
<row class="row">
|
||||||
<description value="Project"/>
|
<description value="Project"/>
|
||||||
<link-entry id="pm_id" only_app='projectmanager' blur='None' class="infolog_projectName"/>
|
<link-entry id="pm_id" only_app='projectmanager' onchange="app.infolog.submit_if_not_empty" blur="None" class="infolog_projectName"/>
|
||||||
</row>
|
</row>
|
||||||
<row class="row">
|
<row class="row">
|
||||||
<description value="Price"/>
|
<description value="Price"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user