Dashboard / Form Results view width in 5.5

Permalink
I just noticed that if I create a form block in 5.5 with a lot of questions, the Form Results view in the Dashboard looks pretty nasty, as the form result table expands out of the surrounding div. Here's a quick solution how to make the dialog expand horizontally:

In yoursite/concrete/single_pages/dashboard/reports/forms.php
after line 20 where jQuery starts, add following (or preferably make an copy of the file to /yoursite/single_pages/dashboard/reports/ to override the core file and make the changes there):

if($(".zebra-striped").width() > 900) {
           $(".span16").width($(".zebra-striped").width()+40);
       }


That makes the surrounding div to strech nicely according to the width of the results table and it looks a bit better than the table exploding out the dialog. The method is far from bullet-proof, as it calls the elements by classname because there are no id's. It still works well, as there's only one element of each class in the single page.

I hope to see a "real" and more universal fix to the problem, as the too wide views make the new UI look pretty bad in situations like this.

 
envisage replied on at Permalink Reply
envisage
This did not work for me...unless I did something wrong. Sure would like to see a fix to this since the form results are exploding out of the page.
Ale replied on at Permalink Reply
I double-checked this one on a 5.5.1 site and it worked as it should.

What version of C5 are you using? Also, did you make sure you inserted the code correctly after the line jQuery(function($) { ...
Vinylburn replied on at Permalink Reply
Vinylburn
I just tried this code as well fixed the problem. This code works!!! Many thanks.
flourish replied on at Permalink Reply
flourish
It worked like a charm!
Thanks for posting this solution.