Skip to content

Commit

Permalink
Fixed issue #07150: Survey list table overflows window
Browse files Browse the repository at this point in the history
Dev Set table width relative to window width
  • Loading branch information
tpartner committed Jan 7, 2013
1 parent 8e442f0 commit 9797d6f
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions scripts/admin/listsurvey.js
Expand Up @@ -103,7 +103,7 @@ $(document).ready(function(){
colModel: returnColModel(),
toppager: true,
height: "100%",
width: screen.width-20,
width: $(window).width()-4,
shrinkToFit: true,
ignoreCase: true,
rowNum: 25,
Expand All @@ -118,7 +118,13 @@ $(document).ready(function(){
multiselect: true,
loadonce : true,
pager: "#pager",
caption: sCaption
caption: sCaption,
loadComplete: function(data){
// Need this for vertical scrollbar
$('#displaysurveys').setGridWidth($(window).width()-4);
$('.wrapper').width($('#displaysurveys').width()+4);
$('.footer').outerWidth($('#displaysurveys').outerWidth()+4).css({ 'margin':'0 auto' });
}
});
jQuery("#displaysurveys").jqGrid('navGrid','#pager',{ deltitle: sDelTitle,
searchtitle: sSearchTitle,
Expand Down Expand Up @@ -166,8 +172,14 @@ $(document).ready(function(){
}
});

$('.wrapper').width($('#displaysurveys').width()*1.006);
$('.footer').width(($('#displaysurveys').width()*1.006)-10);
$('.wrapper').width($('#displaysurveys').width()+4);
$('.footer').outerWidth($('#displaysurveys').outerWidth()+4).css({ 'margin':'0 auto' });

$(window).bind('resize', function() {
$('#displaysurveys').setGridWidth($(window).width()-4);
$('.wrapper').width($('#displaysurveys').width()+4);
$('.footer').outerWidth($('#displaysurveys').outerWidth()+4).css({ 'margin':'0 auto' });
}).trigger('resize');

/* Trigger the inline search when the status list changes */
$('#gs_status_select').change(function() {
Expand Down

0 comments on commit 9797d6f

Please sign in to comment.