summaryrefslogtreecommitdiffstats
path: root/idrop-web
diff options
context:
space:
mode:
authorMike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-05-23 13:35:52 (GMT)
committer Mike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-05-23 13:35:52 (GMT)
commitfb43f316fd05fab513cd48fa57231166ce324439 (patch)
tree766854868db948acf02114947944beefbe18c61b /idrop-web
parent319b0c05159d2854ffea73a84d6a3c43fc6f7611 (diff)
downloadQCG-Data-fb43f316fd05fab513cd48fa57231166ce324439.zip
QCG-Data-fb43f316fd05fab513cd48fa57231166ce324439.tar.gz
QCG-Data-fb43f316fd05fab513cd48fa57231166ce324439.tar.bz2
working on web user panels
Diffstat (limited to 'idrop-web')
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/SharingController.groovy13
-rw-r--r--idrop-web/grails-app/views/common/_secondarymain.gsp1
-rw-r--r--idrop-web/grails-app/views/sharing/userPanel.gsp20
-rw-r--r--idrop-web/web-app/js/mydrop/home.js65
-rw-r--r--idrop-web/web-app/js/mydrop/main.js11
5 files changed, 77 insertions, 33 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 1a21c3e..2f41703 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
@@ -222,6 +222,19 @@ class SharingController {
def deleteAcl = {
log.info("deleteAcl")
log.info(params)
+ def absPath = params['absPath']
+
+ if (!absPath) {
+ throw new JargonException("The absPath is missing, no path specified")
+ }
+
+ def aclsToDelete = params['selectedAcl']
+
+ log.info("aclsToDelete: ${aclsToDelete}")
+
+ aclsToDelete.each(log.info("selectedAcl: ${it}"))
+
+
render "hello"
}
diff --git a/idrop-web/grails-app/views/common/_secondarymain.gsp b/idrop-web/grails-app/views/common/_secondarymain.gsp
index ddde587..ad8eb5e 100644
--- a/idrop-web/grails-app/views/common/_secondarymain.gsp
+++ b/idrop-web/grails-app/views/common/_secondarymain.gsp
@@ -2,6 +2,7 @@
$(function() {
$("#secondaryTabs").tabs();
refreshTagCloud();
+ showUserPanel();
});
</script>
diff --git a/idrop-web/grails-app/views/sharing/userPanel.gsp b/idrop-web/grails-app/views/sharing/userPanel.gsp
new file mode 100644
index 0000000..acc5613
--- /dev/null
+++ b/idrop-web/grails-app/views/sharing/userPanel.gsp
@@ -0,0 +1,20 @@
+<h1>hey i am a user panel</h1>
+<div id="userPanelMessageArea">
+ <!-- -->
+</div>
+
+<div id="userPanelDialogArea">
+ <!-- area for generating dialogs -->
+</div>
+
+
+<script type="text/javascript">
+
+
+ $(function() {
+ lcPrepareForCall();
+ dataTable = lcBuildTableInPlace("#aclDetailsTable", null, null);
+
+ });
+
+ </script> \ No newline at end of file
diff --git a/idrop-web/web-app/js/mydrop/home.js b/idrop-web/web-app/js/mydrop/home.js
index c1cdc1d..6433950 100644
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -382,11 +382,9 @@ function submitAclDialog() {
var jqxhr = $.post(context + aclUpdateUrl, params,
function(data, status, xhr) {
lcClearDivAndDivClass(aclDialogMessageSelector);
- }, "html").error(
- function(xhr, status, error) {
- setMessageInArea(aclDialogMessageSelector,
- xhr.responseText);
- }).success(
+ }, "html").error(function(xhr, status, error) {
+ setMessageInArea(aclDialogMessageSelector, xhr.responseText);
+ }).success(
function() {
if (isCreate) {
addRowToAclDetailsTable(userName, acl);
@@ -396,7 +394,6 @@ function submitAclDialog() {
setMessageInArea("#aclMessageArea",
"Sharing permission saved successfully");
-
});
}
@@ -422,34 +419,36 @@ function addRowToAclDetailsTable(userName, permission) {
alert("new node=" + newNode);
}
-
/**
- * Delete share selected in details dialog toolbar, send the data to delete the selected elements
+ * 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 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);
- });
-
+ // 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", buildFormFromACLDetailsTable(),
+
+ function(data) {
+ alert(data);
+ }).error(function(xhr, status, error) {
+ setMessageInArea(aclDialogMessageSelector, xhr.responseText);
+ });
+
+}
+
+function buildFormFromACLDetailsTable() {
+ var formData = $("#aclDetailsForm").serializeArray();
+ formData.push({name:'absPath',value:selectedPath});
+ return formData;
}
diff --git a/idrop-web/web-app/js/mydrop/main.js b/idrop-web/web-app/js/mydrop/main.js
index 7a8047d..c8af6f4 100644
--- a/idrop-web/web-app/js/mydrop/main.js
+++ b/idrop-web/web-app/js/mydrop/main.js
@@ -57,5 +57,16 @@ function logout() {
window.location = context + "/j_spring_security_logout";
}
+/**
+ * On main panel, show the user panel
+ */
+function showUserPanel() {
+
+
+
+
+
+}
+