Index: lams_central/web/qb/collectionList.jsp =================================================================== diff -u -r0952bdcd231fe03cb52b8d821bc6cc1882b7c369 -r70353119b16530e4ef2f9c82bdaba7ca825feeb0 --- lams_central/web/qb/collectionList.jsp (.../collectionList.jsp) (revision 0952bdcd231fe03cb52b8d821bc6cc1882b7c369) +++ lams_central/web/qb/collectionList.jsp (.../collectionList.jsp) (revision 70353119b16530e4ef2f9c82bdaba7ca825feeb0) @@ -6,7 +6,7 @@ - Question collections + Collection management @@ -28,21 +28,24 @@ float: right; } - .row { - margin-top: 10px; + .ui-jqgrid-title { + display: inline-block; + width: 100%; + height: 30px; } - .row > div:first-child, .row > div:last-child { - text-align: left; - padding-left: 0; + .edit-button { + position: absolute; + right: 50px; } - - .row > div { - text-align: right; + + .grid-question-count { + margin-left: 10px; } - .header-column { - font-weight: bold; + .grid-collection-private { + margin-left: 10px; + color: red; } @@ -92,8 +95,8 @@ loadError: function(xhr,st,err) { collectionGrid.clearGridData(); alert("Error!"); - } - }).jqGrid('filterToolbar'); + } + }).jqGrid('filterToolbar'); }); }); @@ -129,123 +132,29 @@ }); } } - - // remove a collection - function removeCollection(button) { - var grid = $(button).closest('.container-fluid').siblings(".ui-jqgrid").find('.collection-grid'), - collectionUid = grid.data('collectionUid'), - name = grid.data('collectionName'); - - if (confirm('Are you sure you want to remove "' + name + '" collection?')) { - $.ajax({ - 'url' : 'qb/collection/removeCollection.do', - 'type' : 'POST', - 'dataType' : 'text', - 'data' : { - 'collectionUid' : collectionUid - }, - 'cache' : false - }).done(function(){ - document.location.reload(); - }); - } - } - - // share a collection with authors of an organisation - function shareCollection(button) { - var grid = $(button).closest('.container-fluid').siblings(".ui-jqgrid").find('.collection-grid'), - collectionUid = grid.data('collectionUid'), - organisationId = $(button).closest('.container-fluid').find('.targetOrganisationSelect').val(); - - $.ajax({ - 'url' : 'qb/collection/shareCollection.do', - 'type' : 'POST', - 'dataType' : 'text', - 'data' : { - 'collectionUid' : collectionUid, - 'organisationId': organisationId - }, - 'cache' : false - }).done(function(){ - document.location.reload(); - }); - } - - // stop sharing a collection with authors of an organisation - function unshareCollection(button, organisationId) { - var grid = $(button).closest('.container-fluid').siblings(".ui-jqgrid").find('.collection-grid'), - collectionUid = grid.data('collectionUid'); - - $.ajax({ - 'url' : 'qb/collection/unshareCollection.do', - 'type' : 'POST', - 'dataType' : 'text', - 'data' : { - 'collectionUid' : collectionUid, - 'organisationId': organisationId - }, - 'cache' : false - }).done(function(){ - document.location.reload(); - }); - } - +
- <%-- jqGrid placeholder with some useful attributes --%> -
- -
- <%-- Do not display links for collection manipulation for public and private collections --%> - -
-
- -
-
- Share collection with -
-
- -
-
- -
-
- - -
-
-
- Shared with organisations -
-
-
- -
-
-
- -
-
- -
-
-
-
+ + + (${questionCount[collection.uid]} questions) + + Private -
+ + + + <%-- jqGrid placeholder with some useful attributes --%> + +
+