Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

New loop in dawObje...
 
Notifications
Clear all

New loop in dawObject

2 Posts
2 Users
0 Reactions
2,300 Views
(@antonio-grr)
Posts: 84
Active Member
Topic starter
 
[#4351]

Hi.
Could you please explain me the meaning of the following loop added to drawOrigin function in objectDetail.php ?

foreach ( $list as $origin ) {
//$origObj=null;
$origObjClass=null;
$origObjId=null;
if ($list->originType == get_class($obj) and $list->originId == $obj->id) {
//$origObj=new $list->refType($list->refId);
$origObjClass=$list->refType;
$origObjId=$list->refId;
} else {
//$origObj=new $list->originType($list->originId);
$origObjClass=$list->originType;
$origObjId=$list->originId;
}
$gotoE=' onClick="gotoElement(' . "'" . $origObjClass . "','" . htmlEncode($origObjId) . "'" . ');" style="cursor: pointer;" ';
echo ' ';
}
It seems that you loop through attributes of object $list ( $obj->Origin), then ,regardless attribute, you test $list->originType and $list->originId (that seem to be a copy of arguments refType, $refId) and echo an onClick action gotoElement to the same object once for each attribute.
I'm missing something.
Thank you for your attention


 
Posted : 15 May 2017 17H55
(@babynus)
Posts: 14952
Member Admin
 

Target is to set Origin (that you can view on Ticket or Activity) as Clickable, so that just just can click on, item to go to it.
Alos, new feature is to be able to define several Origins for single item.
Not finished yet and not used yet.


 
Posted : 15 May 2017 20H32
Share:

Scroll to Top