Hi Iāve tried to follow this link in order to have any empty subpanels be automatically hidden, however this is not working in SuiteCRM.
Iām presuming the UI code has changed since 2011. I can see that the views are saved as cookies, and that a function hideSubPanel(<panel_id>) exists so I tried using that instead of modifying the panelās display property directly, but still no effect.
Itās as if any javascript inside a template has no effect, or the change is being overruled later in the javascript code.
Iāve since discovered the config option āhide_subpanels_on_loginā.
I would be happy with this, as long as I could show the number of records beside each subpanel title, however I think that this is determined at rendering time in the browser (AJAX calls), and so modifying the PHP isnāt going to help. Itās also made harder by the fact the call is AJAX call for each subpanel is only made if a subpanel is open.
Would it be straightforward to look up the number of records for each subpanel? If so where should I look to add this call?
Hi Iāve seen the first post already - what it is doing is removing the panel entirely, I just want it collapsed by default. Unfortunately, Sugar devs chose āhideā as the verb when they meant collapse.
Looking more at this problem, and thinking of improvements to the interface, what I really want to achieve is visual clues (numbers) beside subpanel title headers when there are records contained. To do this with the AJAX GUI would require some knowledge of the architecture which I donāt have right now.
Once the panels are drawn, we would lazy load each panelās metrics (total num of records) and update the title dynamically in JS, without expanding the subpanel and retrieving the actual records. This call could then be run on a timer in the browser so that a visual clue for a ānewā item could be utilised, or a ācontents has changedā visual clue.
Like I say not that complicated, would really improve the interface and shouldnāt require a huge amount of changes. I just need some clues as to where to look.
Is there a a module somewhere to really āhideā (or worst case ācollapseā) subpanels that contain no data in the detail screens ? (and that 's upgrade safe, working on ondemand) ?
Right now Iām using custom code to āunset panelsā. That 's only working for āacitivitiesā and āhistoryā since the rest contains relations. But donāt like this solution; there should be a better way (eg. Hiding subpanel if āno dataā).
I allready read some posts on different fora, but didnāt find a complete working solution. Closest was this one (but did not work for me).