Index: lams_central/web/qb/search.jsp
===================================================================
diff -u -r3686dbb13f68dc0fdea0ae95e0fae772942d2b62 -r792ac7fe0ee1614138810ffa6963eaf6bb3e0047
--- lams_central/web/qb/search.jsp (.../search.jsp) (revision 3686dbb13f68dc0fdea0ae95e0fae772942d2b62)
+++ lams_central/web/qb/search.jsp (.../search.jsp) (revision 792ac7fe0ee1614138810ffa6963eaf6bb3e0047)
@@ -112,48 +112,7 @@
<%@ include file="/jqGrid.i18n.jsp"%>
$(document).ready(function(){
-
- $("#questions-grid").jqGrid({
- multiselect: false,
- datatype: "json",
- url: "",
- postData: {
- questionTypes: "" + $("#types-select").val(),
- },
- height: '100%',
- autowidth: true,
- shrinkToFit: true,
- pager: 'questions-grid-pager',
- rowList:[10,20,30,40,50,100],
- rowNum:10,
- guiStyle: "bootstrap",
- iconSet: 'fontAwesome',
- colNames:[
- 'questionUid',
- '',
- 'questionDescription'
- ],
- colModel:[
- {name:'questionUid', index:'questionUid', width:0, hidden: true},
- {name:'questionName', index:'questionName', width:570, search: true, searchoptions: { clearSearch: false }, formatter:questionNameFormatter},
- {name:'questionDescription', index:'questionDescription', width:0, hidden: true}
- ],
- onSelectRow: function(rowid, e) {
- //load up question details area
- var questionUid = jQuery("#questions-grid").getCell(rowid, 'questionUid');
- loadQuestionDetailsArea(questionUid);
- },
- gridComplete: gridSearchHighlight,
- loadError: function(xhr,textStatus,errorThrown) {
- $("#questions-grid").clearGridData();
- $("#question-detail-area").hide().html("");
-
- //display warning message
- $(this).jqGrid("displayErrorMessage", "");
- }
- })
- .navGrid("#questions-grid-pager", {edit:false,add:false,del:false,search:false});
-
+
//jqgrid autowidth
$(window).bind('resize', function() {
resizeJqgrid($(".ui-jqgrid-btable:visible"));
@@ -239,6 +198,48 @@
//workaround for $('#types-select-select').selectpicker('selectAll'); throwing exception
$("#types-select option").prop("selected", "selected");
$('#types-select').selectpicker('refresh');
+
+ $("#questions-grid").jqGrid({
+ multiselect: false,
+ datatype: "json",
+ url: "",
+ postData: {
+ questionTypes: "" + $("#types-select").val(),
+ },
+ height: '100%',
+ autowidth: true,
+ shrinkToFit: true,
+ pager: 'questions-grid-pager',
+ rowList:[10,20,30,40,50,100],
+ rowNum:10,
+ guiStyle: "bootstrap",
+ iconSet: 'fontAwesome',
+ colNames:[
+ 'questionUid',
+ '',
+ 'questionDescription'
+ ],
+ colModel:[
+ {name:'questionUid', index:'questionUid', width:0, hidden: true},
+ {name:'questionName', index:'questionName', width:570, search: true, searchoptions: { clearSearch: false }, formatter:questionNameFormatter},
+ {name:'questionDescription', index:'questionDescription', width:0, hidden: true}
+ ],
+ onSelectRow: function(rowid, e) {
+ //load up question details area
+ var questionUid = jQuery("#questions-grid").getCell(rowid, 'questionUid');
+ loadQuestionDetailsArea(questionUid);
+ },
+ gridComplete: gridSearchHighlight,
+ loadError: function(xhr,textStatus,errorThrown) {
+ $("#questions-grid").clearGridData();
+ $("#question-detail-area").hide().html("");
+
+ //display warning message
+ $(this).jqGrid("displayErrorMessage", "");
+ }
+ })
+ .navGrid("#questions-grid-pager", {edit:false,add:false,del:false,search:false});
+
});
//load up question details area