summaryrefslogtreecommitdiffstats
path: root/idrop-web
diff options
context:
space:
mode:
authorMike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-05-17 12:59:17 (GMT)
committer Mike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-05-17 12:59:17 (GMT)
commit319b0c05159d2854ffea73a84d6a3c43fc6f7611 (patch)
tree06ccb7d6f2a5c61421f4878797ddbbe01b338050 /idrop-web
parent653ecadf8246b7404b1c4a570a1f6bf0b23316c0 (diff)
downloadQCG-Data-319b0c05159d2854ffea73a84d6a3c43fc6f7611.zip
QCG-Data-319b0c05159d2854ffea73a84d6a3c43fc6f7611.tar.gz
QCG-Data-319b0c05159d2854ffea73a84d6a3c43fc6f7611.tar.bz2
working on mass delete acl for web
Diffstat (limited to 'idrop-web')
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/SharingController.groovy7
-rw-r--r--idrop-web/grails-app/views/sharing/aclDetails.gsp4
-rw-r--r--idrop-web/web-app/js/mydrop/home.js32
3 files changed, 37 insertions, 6 deletions
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/SharingController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/SharingController.groovy
index 87e93b2..1a21c3e 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/SharingController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/SharingController.groovy
@@ -218,4 +218,11 @@ class SharingController {
render jsonBuff as JSON
}
+
+ def deleteAcl = {
+ log.info("deleteAcl")
+ log.info(params)
+ render "hello"
+
+ }
}
diff --git a/idrop-web/grails-app/views/sharing/aclDetails.gsp b/idrop-web/grails-app/views/sharing/aclDetails.gsp
index 653b69b..5f44020 100644
--- a/idrop-web/grails-app/views/sharing/aclDetails.gsp
+++ b/idrop-web/grails-app/views/sharing/aclDetails.gsp
@@ -21,6 +21,7 @@
<!-- area for generating dialogs --></div>
<div>
+ <g:form name="aclDetailsForm" action="" id="aclDetailsForm">
<table cellspacing="0" cellpadding="0" border="0" id="aclDetailsTable"
style="width: 100%;">
<thead>
@@ -33,7 +34,7 @@
<tbody>
<g:each in="${acls}" var="acl">
<tr id="${acl.userName}">
- <td><g:checkBox name="selectedAcl" />
+ <td><g:checkBox name="selectedAcl" value="${acl.userName}" checked="false"/>
</td>
<td>
${acl.userName}
@@ -56,6 +57,7 @@
</tr>
</tfoot>
</table>
+ </g:form>
</div>
<script type="text/javascript">
diff --git a/idrop-web/web-app/js/mydrop/home.js b/idrop-web/web-app/js/mydrop/home.js
index 92381ea..c1cdc1d 100644
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -423,11 +423,33 @@ function addRowToAclDetailsTable(userName, permission) {
}
-
+/**
+ * Delete share selected in details dialog toolbar, send the data to delete the selected elements
+ */
function deleteAcl() {
- var aclSelectors = $('[name=selectedAcl]').filter(':checked').each(function() {
- var val = this;
- alert(val);
- });
+ //var aclSelectors = $('[name=selectedAcl]').filter(':checked').each(function() {
+ /*var tr = $(this).parent().parent();
+ var trChildren = $(tr).children();
+ var td1 = trChildren[0];
+ var td2 = trChildren[1];
+ var td3 = trChildren[2];
+ var permission = td3.html();
+
+
+ var bob = true;*/
+ //alert(tr.html());
+ //});
+
+ $.post(
+ context + "/sharing/deleteAcl",
+ $("#aclDetailsForm").serialize(),
+ function(data){
+ alert(data);
+ }
+ ).error( function(xhr, status, error) {
+ setMessageInArea(aclDialogMessageSelector,
+ xhr.responseText);
+ });
+
}