Index: lams_central/web/qb/collection.jsp =================================================================== diff -u -r3ac00c8cbf0ef8d92fb504727e16ca8f4e3e13c8 -r374f47ea57a62a77e6faf1bb9713de1f9f53c1be --- lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 3ac00c8cbf0ef8d92fb504727e16ca8f4e3e13c8) +++ lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 374f47ea57a62a77e6faf1bb9713de1f9f53c1be) @@ -34,11 +34,11 @@ display: inline; } - .targetCollectionSelect { + .targetCollectionSelect, .targetOrganisationSelect { width: 300px; } - .targetCollectionDiv { + .targetCollectionDiv, .targetOrganisationDiv { float: right; } @@ -255,6 +255,25 @@ }); } } + + function shareCollection(button) { + var grid = $(button).closest('.collectionButtons').siblings(".ui-jqgrid").find('.collection-grid'), + collectionUid = grid.data('collectionUid'), + organisationId = $(button).closest('.collectionButtons').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(); + }); + } @@ -275,7 +294,9 @@ selected="selected" - > + > + + @@ -286,6 +307,27 @@
+
+ Share collection with + + +
+ +
+ Shared with organisations +
    + +
  • +
    +
+
+