Index: lams_central/src/java/org/lamsfoundation/lams/web/qb/QbCollectionController.java =================================================================== diff -u -r374f47ea57a62a77e6faf1bb9713de1f9f53c1be -r90e48f2339cd57afb38a1d654f71efe682dce974 --- lams_central/src/java/org/lamsfoundation/lams/web/qb/QbCollectionController.java (.../QbCollectionController.java) (revision 374f47ea57a62a77e6faf1bb9713de1f9f53c1be) +++ lams_central/src/java/org/lamsfoundation/lams/web/qb/QbCollectionController.java (.../QbCollectionController.java) (revision 90e48f2339cd57afb38a1d654f71efe682dce974) @@ -212,6 +212,12 @@ qbService.shareCollection(collectionUid, organisationId); } + @RequestMapping("/unshareCollection") + @ResponseBody + public void unshareCollection(@RequestParam long collectionUid, @RequestParam int organisationId) { + qbService.unshareCollection(collectionUid, organisationId); + } + private Integer getUserId() { HttpSession ss = SessionManager.getSession(); UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); Index: lams_central/web/qb/collection.jsp =================================================================== diff -u -r374f47ea57a62a77e6faf1bb9713de1f9f53c1be -r90e48f2339cd57afb38a1d654f71efe682dce974 --- lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 374f47ea57a62a77e6faf1bb9713de1f9f53c1be) +++ lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 90e48f2339cd57afb38a1d654f71efe682dce974) @@ -274,6 +274,24 @@ document.location.reload(); }); } + + function unshareCollection(button, organisationId) { + var grid = $(button).closest('.collectionButtons').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(); + }); + } @@ -323,7 +341,12 @@ Shared with organisations