Index: lams_tool_assessment/web/pages/monitoring/summary.jsp =================================================================== diff -u -r92b9d466bd236638bc349bdce4dac6eaa01071eb -rff11d8dfca7f7f1a07e1271b8b33cae2df04dee6 --- lams_tool_assessment/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 92b9d466bd236638bc349bdce4dac6eaa01071eb) +++ lams_tool_assessment/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision ff11d8dfca7f7f1a07e1271b8b33cae2df04dee6) @@ -25,8 +25,8 @@ {name:'id',index:'id', width:20, sorttype:"int"}, {name:'userId',index:'userId', width:0}, {name:'sessionId',index:'sessionId', width:0}, - {name:'userName',index:'userName', width:200}, - {name:'total',index:'total', width:50,align:"right",sorttype:"float", formatter:'number', formatoptions:{decimalPlaces: 2}} + {name:'userName',index:'userName', width:350}, + {name:'total',index:'total', width:120,align:"right",sorttype:"float", formatter:'number', formatoptions:{decimalPlaces: 2}} ], multiselect: false, @@ -74,9 +74,8 @@ gridstate:"hidden", //hiddengrid:true, height: 90, - width: 780, + autowidth: true, shrinkToFit: false, - scrollOffset: 0, caption: "", colNames:['#', 'questionResultUid', @@ -117,8 +116,23 @@ } }); - + + //jqgrid autowidth (http://stackoverflow.com/a/1610197) + $(window).bind('resize', function() { + var grid; + if (grid = jQuery(".ui-jqgrid-btable:visible")) { + grid.each(function(index) { + var gridId = $(this).attr('id'); + + //resize only user summary grids + if (gridId.match("^userSummary")) { + var gridParentWidth = jQuery('#gbox_' + gridId).parent().width(); + jQuery('#' + gridId).setGridWidth(gridParentWidth, true); + } + }); + } + }); $("#questionUid").change(function() { var questionUid = $("#questionUid").val(); @@ -213,7 +227,7 @@
-
+
@@ -222,7 +236,7 @@ - +