Index: lams_central/web/qb/collection.jsp =================================================================== diff -u -r308be95be92e1e96e2be7e4d041ef7b92fcc7b37 -rcb84acde58155494dc2cdf1bae82eac746dadfe2 --- lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 308be95be92e1e96e2be7e4d041ef7b92fcc7b37) +++ lams_central/web/qb/collection.jsp (.../collection.jsp) (revision cb84acde58155494dc2cdf1bae82eac746dadfe2) @@ -3,560 +3,571 @@ - - <fmt:message key="label.qb.collection" /> - - - - - - - - - - - - - - - + .row { + margin-top: 10px; + } + + .middle-cell { + padding-top: 6px; + display: inline-block; + } + + .header-column { + font-weight: bold; + } + + .grid-question-count { + margin-left: 10px; + } + + .grid-collection-private { + color: red !important; + font-size: smaller; + } + + #grid-question-create { + display: inline-block; + float: right; + margin-right: 50px; + } + + #collection-name-row { + min-height: 20px; + margin-top: 20px; + } + + #collection-name:hover+span+i { + visibility:visible + } + #collection-name+span+i { + visibility:hidden + } + + a.thickbox { + color: black; + padding-left: 8px; + } + + select { + height: auto !important; + width: auto !important; + } + + .all-learning-outcomes { + display: none; + } + + .all-learning-outcomes-show { + cursor: pointer; + } + + + + + + + + - - - - - -
- -
- -
- -
+ let questionIdsToRemove = []; + questionsToRemove.forEach(function(questionUid) { + let questionId = $('tr#' + questionUid + ' > td[aria-describedby="collection-grid_id"]', collectionGrid).text(); + if (questionId) { + questionIdsToRemove.push(questionId); + } + }); + + $.ajax({ + 'url' : 'qb/collection/removeCollectionQuestions.do', + 'type' : 'POST', + 'dataType' : 'text', + 'data' : { + 'collectionUid' : ${collection.uid}, + 'qbQuestionIds' : questionIdsToRemove, + "" : "" + }, + 'cache' : false + }).done(function(response){ + if (response == 'fail') { + // not all questions were removed + alert(''); + } + document.location.reload(); + }); + } + + //create proper href for "Create question" button + function initLinkHref() { + var questionType = document.getElementById("question-type").selectedIndex + 1; + $("#create-question-href").attr("href", + "?questionType=" + questionType + + "&oldCollectionUid=${collection.uid}" + + "&KeepThis=true&TB_iframe=true&modal=true"); + }; + + //this method gets invoked after question has been edited and saved + function refreshThickbox(){ + location.reload(); + }; + + function showQuestionsPrintPage() { + let url = ''; + window.open(url, "_blank"); + } + + + + + +
+ +
+ +
+ +
- -   - - - + +   + + + - -
- -
- "> -   - - - <%-- Do not display button for public and private collections --%> - -
- - - -
-
- - - -
- - - - + +
+ + + "> +   - - - - - + + <%-- Do not display button for public and private collections --%> + +
+ + + +
-
- -
- - - - - - - -
- + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + +
+ -
-   - - - - +
+   + + + + +
+
-
-
- - - - <%-- jqGrid placeholder with some useful attributes --%> -
-
-
-
- -
- -
-
-
- <%-- Do not display links for collection manipulation for public and private collections --%> - + <%-- jqGrid placeholder with some useful attributes --%> +
+
+
+ + +
+ +
+
+ + + <%-- Do not display links for collection manipulation for public and private collections --%> + -
-
- -
-
- - - - <%-- Already shared organisations--%> +
+
+ +
+
+
+ + + <%-- Already shared organisations--%> - - <%-- Not yet shared ones --%> + + <%-- Not yet shared ones --%> - + - -
@@ -629,8 +640,8 @@
@@ -641,17 +652,17 @@
- + + + +
-
- - - - -
- + + + + + + \ No newline at end of file