Index: lams_central/web/qb/search.jsp
===================================================================
diff -u -ra109b7b66649bbed86abf584a192c6af194946ef -r3ec7cbf6d6a62b79ba7e4334d770721f8867e999
--- lams_central/web/qb/search.jsp (.../search.jsp) (revision a109b7b66649bbed86abf584a192c6af194946ef)
+++ lams_central/web/qb/search.jsp (.../search.jsp) (revision 3ec7cbf6d6a62b79ba7e4334d770721f8867e999)
@@ -18,8 +18,8 @@
.question-description-grid {
min-height: 10px;
max-height: 10px;
- max-width: 97%;
overflow-x: hidden;
+ margin-top: 4px;
}
#close-button .fa {
@@ -28,7 +28,11 @@
}
#main-panel {
border: none;
+ box-shadow: none;
}
+ #import-button {
+ display: none;
+ }
#search-widgets {
display: flex;
margin-bottom: 15px;
@@ -43,17 +47,22 @@
/* jqGrid padding */
.ui-jqgrid.ui-jqgrid-bootstrap tr.jqgrow>td {
- padding: 8px;
+ padding: 10px;
}
/* padding of #grid-container's two columns */
#grid-container > div {
padding: 0;
}
@media (min-width: 768px){
- #question-detail-area {
- padding-left: 20px !important;
+ #question-detail-area {
+ padding-left: 20px !important;
+ }
}
+ @media (max-width: 768px){
+ #question-detail-area {
+ margin-top: 20px !important;
+ }
}
#question-detail-area table {
@@ -70,8 +79,26 @@
}
#question-type {
- -moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;-o-user-select:none;
+ -moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;-o-user-select:none;
}
+
+ /*----------STICKY FOOTER----------------*/
+ html {
+ position: relative;
+ min-height: 100%;
+ }
+ body {
+ margin-bottom: 44px;
+ }
+ footer {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ height: 44px;
+ }
+ footer > div {
+ height: 44px;
+ }
@@ -114,35 +141,28 @@
'',
{
questionUid: questionUid
+ },
+ function() {
+ $("#import-button").show();
}
);
},
- gridComplete: function () {
- var filters, i, l, rules, rule, iCol, $this = $(this);
- //if (this.p.search === true) {
- // filters = $.parseJSON(this.p.postData.filters);
- // if (filters !== null && typeof filters.rules !== 'undefined' &&
- // filters.rules.length > 0) {
- // rules = filters.rules;
- // l = rules.length;
- if ($("#filter-questions").val()) {
- $('>tbody>tr.jqgrow>td:nth-child(2)', this).highlight($("#filter-questions").val());
- }
- // }
- // }
- // }
- },
+ gridComplete: function () {
+ //highlight search results
+ if ($("#filter-questions").val()) {
+ $('>tbody>tr.jqgrow>td:nth-child(2)', this).highlight($("#filter-questions").val());
+ }
+ },
loadError: function(xhr,st,err) {
- jQuery("#questions-grid").clearGridData();
- $.jgrid.info_dialog("", "", "");
- },
- loadComplete: function () {
-
+ $("#questions-grid").clearGridData();
+ $.jgrid.info_dialog.call("", "", "");
+ $("#import-button").hide();
+ $("#question-detail-area").hide().html("");
}
})
.navGrid("#questions-grid-pager", {edit:false,add:false,del:false,search:false});
- //jqgrid autowidth (http://stackoverflow.com/a/1610197)
+ //jqgrid autowidth
$(window).bind('resize', function() {
resizeJqgrid($(".ui-jqgrid-btable:visible"));
});
@@ -154,60 +174,57 @@
});
};
- $(document).on("click", '#import-qbquestion-button', function() {
- var qbQuestionUid = $(this).data("question-uid");
+ //handler for "Import" button
+ $("#import-button").on("click", function() {
+ var qbQuestionUid = $("#selected-question-uid").val();
parent.jQuery("#itemArea").load(
- "${param.returnUrl}",
- {
- qbQuestionUid: qbQuestionUid
- },
- function() {
- self.parent.refreshThickbox()
- self.parent.tb_remove();
- }
- );
+ "${param.returnUrl}",
+ {
+ qbQuestionUid: qbQuestionUid
+ },
+ function() {
+ self.parent.refreshThickbox()
+ self.parent.tb_remove();
+ }
+ );
});
});
- function userNameFormatter (cellvalue, options, rowObject) {
- var questionDescription = rowObject[2] ? rowObject[2] : "";
+ //auxiliary formatter for jqGrid's question column
+ function userNameFormatter (cellvalue, options, rowObject) {
+ var questionDescription = rowObject[2] ? rowObject[2] : "";
- var text = cellvalue + "
";
- if (questionDescription.length > 0) {
- text += questionDescription;
- }
- text += "
"
-
- return text;
+ var text = cellvalue + "";
+ 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(gridReload,500)
- }
+ //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: { searchString: $("#filter-questions").val() }
+ },
+ { page: 1 }
+ ).trigger('reloadGrid');
- function gridReload(){
- $("#questions-grid").jqGrid(
- 'setGridParam',
- {
- postData: { searchString: $("#filter-questions").val() }
- },
- { page: 1 }
- ).trigger('reloadGrid');
-
- $("#question-detail-area").hide("slow").html("");
-
-
- //var nm_mask = jQuery("#item_nm").val();
- //var cd_mask = jQuery("#search_cd").val();
- //jQuery("#bigset").jqGrid('setGridParam',{url:"bigset.php?nm_mask="+nm_mask+"&cd_mask="+cd_mask,page:1}).trigger("reloadGrid");
- }
-
+ $("#question-detail-area").hide("slow").html("");
+ $("#import-button").hide("fast");
+ //jQuery("#bigset").jqGrid('setGridParam',{url:"bigset.php?nm_mask="+nm_mask+"&cd_mask="+cd_mask,page:1}).trigger("reloadGrid");
+ }
@@ -229,60 +246,31 @@
Type: Multiple choice
-
-
-
-
-
-
-
-
+
+