[Vtigercrm-developers] Maximum number of columns in any view

Jitu jitu at secondcrm.com
Sat May 16 14:51:06 GMT 2020


If i change  here

if (selectedFieldsEles.length > 15) { 
app.helper.showErrorNotification({message:app.vtranslate('JS_ADD_MAX_15_ITEMS')});
return false;
}

this does not effect in selection of columns at create or edit filter.

We can define globally this value in config.inc.php like page per record

$list_max_entries_per_page= '20';


  5/16/20 10:29 PM, Alan Lord wrote:
> This bit of code in Vtiger_List_Js (from line 2352) could be better IMHO.
>
> if (selectedFieldsEles.length > 15) { 
> app.helper.showErrorNotification({message:app.vtranslate('JS_ADD_MAX_15_ITEMS')});
> return false;
> }
>
> I see 2 issues:
>
> 1. The limit is hardcoded here AND it is hardcooded in the 
> CustomView_JS class as below (there should be only ONE place this is set.
>
> 2. The translation label above basically means you can't change the 
> value if you wanted to anyway as the value is also hardcoded into the 
> translatable message label.
>
>
> Al
>
>
>
> On 16/05/2020 15:12, Alan Lord wrote:
>> And here then:
>>
>> https://code.vtiger.com/vtiger/vtigercrm/blob/master/layouts/v7/modules/Vtiger/resources/List.js#L2352 
>>
>>
>> This parameter should only be in one place at least (if not 
>> configurable) and not in multiple locations...
>>
>> Al
>>
>>
>> On 16/05/2020 14:13, Jitu wrote:
>>> check this file layouts/v7/modules/CustomView/resources/CustomView.js
>>>
>>> /**
>>> * Function which will register the select2 elements for columns 
>>> selection
>>> */
>>> registerSelect2ElementForColumnsSelection:function() {
>>> varselectElement= this.getColumnSelectElement();
>>> vtUtils.showSelect2ElementView(selectElement,{maximumSelectionSize:15}); 
>>>
>>> },
>>> On 5/16/20 5:01 PM, Alan Lord wrote:
>
>
> _______________________________________________
> http://www.vtiger.com/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20200516/25de1d2d/attachment.html>


More information about the vtigercrm-developers mailing list