Index: lams_central/web/qb/collection.jsp =================================================================== diff -u -r03d284a4bdb2a2f2d6f57d0810e465f437c25155 -r55ed20d39180d1733d5ac186c0f7ea29b77dd66e --- lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 03d284a4bdb2a2f2d6f57d0810e465f437c25155) +++ lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 55ed20d39180d1733d5ac186c0f7ea29b77dd66e) @@ -3,598 +3,620 @@ - - <fmt:message key="label.qb.collection" /> - - - - - - - - - - - - - - - - + + + + + + + - - - - -
- -
- -
- -
+ 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(); + }; + + + + + +
+ +
+ +
+ +
- -   - - - + +   + + + - -
- -
- "> -   - - - <%-- 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 --%> - + - -
@@ -608,8 +630,8 @@
@@ -620,17 +642,17 @@
- + + + +
-
- - - - -
- + + + + + + \ No newline at end of file