Index: lams_central/web/qb/collection.jsp =================================================================== diff -u -rd5719555b4c16102968655a9e2d2edce72296fa9 -r730a7378ea82a88512217331afdbd1f0f0346d61 --- lams_central/web/qb/collection.jsp (.../collection.jsp) (revision d5719555b4c16102968655a9e2d2edce72296fa9) +++ lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 730a7378ea82a88512217331afdbd1f0f0346d61) @@ -22,14 +22,25 @@ } #addCollectionDiv input { - display: inline; width: 80%; margin-right: 10px; } #addCollectionDiv button { float: right; } + + .form-control { + display: inline; + } + + .targetCollectionSelect { + width: 300px; + } + + .targetCollectionDiv { + float: right; + } @@ -202,6 +213,29 @@ }); } } + + function addCollectionQuestions(button, copy) { + var grid = $(button).closest('.buttons').siblings(".ui-jqgrid").find('.collection-grid'), + sourceCollectionUid = grid.data('collectionUid'), + targetCollectionUid = $(button).closest('.panel-body').find('.targetCollectionSelect').val(), + included = grid.data('included'), + excluded = grid.data('excluded'); + $.ajax({ + 'url' : 'qb/collection/addCollectionQuestions.do', + 'type' : 'POST', + 'dataType' : 'text', + 'data' : { + 'sourceCollectionUid' : sourceCollectionUid, + 'targetCollectionUid' : targetCollectionUid, + 'copy' : copy, + 'included' : included ? JSON.stringify(included) : null, + 'excluded' : excluded ? JSON.stringify(excluded) : null + }, + 'cache' : false + }).done(function(){ + $('.collection-grid[data-collection-uid="' + targetCollectionUid + '"]').trigger('reloadGrid'); + }); + } @@ -210,7 +244,23 @@
- + +
+ Transfer questions to + + + +