Index: lams_central/src/java/org/lamsfoundation/lams/web/qb/SearchQBController.java =================================================================== diff -u -rd709559abc2186520af2f18c3fc7417a5a598e9e -r8eefd9a2f57ce5b05eb75908e36bb042c5fe7fce --- lams_central/src/java/org/lamsfoundation/lams/web/qb/SearchQBController.java (.../SearchQBController.java) (revision d709559abc2186520af2f18c3fc7417a5a598e9e) +++ lams_central/src/java/org/lamsfoundation/lams/web/qb/SearchQBController.java (.../SearchQBController.java) (revision 8eefd9a2f57ce5b05eb75908e36bb042c5fe7fce) @@ -143,7 +143,6 @@ private String getPagedQuestions(HttpServletRequest request, HttpServletResponse response) { Integer questionType = WebUtil.readIntParam(request, "questionType"); -// boolean isPrivate = WebUtil.readBooleanParam(request, "isPrivate"); // Getting the params passed in from the jqGrid int page = WebUtil.readIntParam(request, CommonConstants.PARAM_PAGE); @@ -201,12 +200,4 @@ return "qb/qbQuestionDetails"; } - - @RequestMapping("/addQuestion") - private String addQuestion(HttpServletRequest request) { - Long questionUid = WebUtil.readLongParam(request, "questionUid"); - Long toolContentId = WebUtil.readLongParam(request, "toolContentId"); - - return "qb/"; - } } \ No newline at end of file Index: lams_central/web/includes/javascript/qb-search.js =================================================================== diff -u --- lams_central/web/includes/javascript/qb-search.js (revision 0) +++ lams_central/web/includes/javascript/qb-search.js (revision 8eefd9a2f57ce5b05eb75908e36bb042c5fe7fce) @@ -0,0 +1,44 @@ + //auxiliary formatter for jqGrid's question column + function questionNameFormatter (cellvalue, options, rowObject) { + var questionDescription = rowObject[2] ? rowObject[2] : ""; + + var text = "
" + cellvalue + "
"; + text += "
"; + if (questionDescription.length > 0) { + text += questionDescription; + } + text += "
" + + return text; + } + + //search field handler + var timeoutHnd; + function doSearch(ev){ + // var elem = ev.target||ev.srcElement; + if(timeoutHnd) + clearTimeout(timeoutHnd) + timeoutHnd = setTimeout(gridSearch,500) + } + function gridSearch(){ + $("#questions-grid").jqGrid( + 'setGridParam', { + postData: { + questionType: $("#question-type").val(), + searchString: $("#filter-questions").val() + } + }, + { page: 1 } + ).trigger('reloadGrid'); + + $("#question-detail-area").hide("slow").html(""); + //jQuery("#bigset").jqGrid('setGridParam',{url:"bigset.php?nm_mask="+nm_mask+"&cd_mask="+cd_mask,page:1}).trigger("reloadGrid"); + } + + + function gridSearchHighlight () { + //highlight search results + if ($("#filter-questions").val()) { + $('>tbody>tr.jqgrow>td:nth-child(2)', this).highlight($("#filter-questions").val()); + } + } \ No newline at end of file Index: lams_central/web/qb/searchWidget.jsp =================================================================== diff -u -r21b12237b13026b0ff5303fd68e8bcf92d71eb73 -r8eefd9a2f57ce5b05eb75908e36bb042c5fe7fce --- lams_central/web/qb/searchWidget.jsp (.../searchWidget.jsp) (revision 21b12237b13026b0ff5303fd68e8bcf92d71eb73) +++ lams_central/web/qb/searchWidget.jsp (.../searchWidget.jsp) (revision 8eefd9a2f57ce5b05eb75908e36bb042c5fe7fce) @@ -20,7 +20,6 @@ .question-title-grid { overflow-x: hidden; } - #import-button { margin-left: 5px; @@ -42,6 +41,10 @@ padding: 10px; } + #grid-container { + min-height: 300px; + } + /* padding of #grid-container's two columns */ #grid-container > div { padding: 0; @@ -100,6 +103,7 @@ + @@ -20,34 +26,15 @@ - + + + + + @@ -73,39 +139,36 @@
+ +
+ Select pool of random questions. +
- - - + - -
- -
- - - -
- - -
-
+ +
+ +
+
+
+
+
+
+
+ +
+ + Pool consists of ${poolQuestionsCount} question(s). + +
+
@@ -116,7 +179,7 @@ - +