[Vtigercrm-developers] dashboard widget change position after tab reload

omri yona omri.yona at gmail.com
Wed May 27 09:18:56 GMT 2020


Vtiger 7.2
I notice that after reload dashboard tab the wighets posion change. The
main change is that thay move to the left.
eg - if i order
wighet1 as row:1 col:2 + wighet2 row:1 co:3 after reload
wighet1 as row:1 col:1 + wighet2 row:1 co:2

I found that in file: layouts/v7/modules/Vtiger/resources/DashBoard.js
in function: registerGridster()
at the end its save the posion and change my pos
//used when after gridster is loaded
thisInstance.savePositions(activeGridster.find('.dashboardWidget'))

keep digin and found out that in the same function when the wight add
if(item.attr("data-position")=="false"){
Vtiger_DashBoard_Js.gridster.add_widget(item, columns, rows);
} else {
Vtiger_DashBoard_Js.gridster.add_widget(item, columns, rows);
}
no posision was sent
the function add_widget in file
\libraries\jquery\gridster\jquery.gridster.min.js
can get posision in e/f add_widget=function(b,c,d,e,f){var
g;c||(c=1),d||(d=1),!e&!f?g=this.next_position(c,d):(g={col:e,row:f}

after change the
Vtiger_DashBoard_Js.gridster.add_widget(item, columns, rows);
to be
Vtiger_DashBoard_Js.gridster.add_widget(item, columns,
rows,item.attr("data-col"),item.attr("data-row"));
its look like its work.
I google it and didn't found any post on this issue so I am not sure it's a
bug or I do samting wrong.
there is any one that found that issue?

thank you,
Omri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20200527/c6ed5402/attachment.html>


More information about the vtigercrm-developers mailing list