Index: lams_tool_assessment/web/pages/monitoring/vsaAllocate.jsp =================================================================== diff -u -r10b3331681c818b9153ceaa27c1469942e5a5605 -r7e47f6b33ae66ad74a98b535a9f4f75330fad4ce --- lams_tool_assessment/web/pages/monitoring/vsaAllocate.jsp (.../vsaAllocate.jsp) (revision 10b3331681c818b9153ceaa27c1469942e5a5605) +++ lams_tool_assessment/web/pages/monitoring/vsaAllocate.jsp (.../vsaAllocate.jsp) (revision 7e47f6b33ae66ad74a98b535a9f4f75330fad4ce) @@ -16,28 +16,24 @@ .sortable-on { background: lightgoldenrodyellow; - min-height: 110px; - max-height: 250px; + height: 200px; padding: 10px; overflow-y: auto; } .tbl-correct-list { - height: 200px; border: 3px solid #3c763d; border-radius: 10px; background-color: #3c763d10; } .tbl-incorrect-list { - height: 200px; border: 3px solid #a94442; border-radius: 10px; background-color: #a9444210; } - .tbl-answer-queue-list { - height: 200px; + .answer-queue { border: 2px solid #ddd; border-radius: 10px; background: initial; @@ -64,6 +60,7 @@ //init options sorting feature $('.sortable-on').each(function() { let questionUid = $(this).data('question-uid'); + updateAnswerQueueSize(questionUid); new Sortable(this, { group: 'question' + questionUid, @@ -89,6 +86,8 @@ method: 'post', dataType: "json", success: function (data) { + updateAnswerQueueSize(questionUid); + if (data.isAnswerDuplicated) { alert(""); $(evt.item).appendTo("#answer-group" + data.optionUid); @@ -101,6 +100,11 @@ }); }); }); + + function updateAnswerQueueSize(questionUid) { + var answerQueueLength = $('.answer-queue[data-question-uid="' + questionUid + '"] .list-group-item').length; + $('#answer-queue-size' + questionUid).text(answerQueueLength ? ' (' + answerQueueLength + ')' : ''); + } function refreshPage() { location.reload(); @@ -171,9 +175,12 @@
-

+

+ + +

-