[Vtigercrm-developers] Apply filters on Popup contents?

Alan Lord alanslists at gmail.com
Mon Oct 6 13:17:18 GMT 2014


> On 06/10/14 10:56, Alan Lord wrote:
>
> But I am not sure where I should be doing this... Override Edit.js perhaps?

This seems to be somewhat better.

I create an Edit.js for my vtlib module and in the getPopUpParams() 
function I can add the search_key and value which is good.

What this doesn't fix is the paging model in the Popup...

The total count and page number box do not seem to be aware of the 
search params. Once I execute any kind of search function in the Popup 
the restricted list that was based on search_key and search_value params 
are no longer honoured. Even though they remain in the URL.

Perhaps these two params should also be added to the PopupSearch.tpl 
template as hidden <input> tags by default, seeing as they are being set 
in the Vtiger Popup.php model?

>$viewer->assign('SEARCH_KEY', $searchKey);
>$viewer->assign('SEARCH_VALUE', $searchValue);

Shame they are not read correctly. The Popup.js and the template use 
search_key and search_value for the box and picklist so I think what I'm 
going to have to do is override the Popup.js and set the picklist/search 
text box on load...

This is quite interesting digging around but it would appear that there 
are still areas we can't override without core hacks.

Cheers

Al






More information about the vtigercrm-developers mailing list