summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-09-07 01:12:22 (GMT)
committer Mike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-09-07 01:12:22 (GMT)
commitfcc4a0e84cc6c51cd33d9870f2cfde0c8e154be7 (patch)
treed6d4c06b4b47ddcea76ee05e3752f237815fe341
parentef92da848bf13357dc586f77daa7e32cffaabd7e (diff)
downloadQCG-Data-fcc4a0e84cc6c51cd33d9870f2cfde0c8e154be7.zip
QCG-Data-fcc4a0e84cc6c51cd33d9870f2cfde0c8e154be7.tar.gz
QCG-Data-fcc4a0e84cc6c51cd33d9870f2cfde0c8e154be7.tar.bz2
[#459] AVU Crud in idrop-web adding in place edits
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy25
-rw-r--r--idrop-web/grails-app/views/metadata/metadataDetails.gsp28
-rw-r--r--idrop-web/web-app/js/mydrop/home.js7
3 files changed, 43 insertions, 17 deletions
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
index 3b3246a..10ecfea 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
@@ -97,13 +97,32 @@ class BrowseController {
def ajaxDirectoryListingUnderParent = {
def parent = params['dir']
log.info "ajaxDirectoryListingUnderParent path: ${parent}"
+
+ if (!parent) {
+ log.error "no dir param set"
+ throw new
+ JargonException("no dir param set")
+ }
+
+ if (parent != "/") {
+ log.info "parent not root use as is"
+ } else {
+ log.info "parent set to root, see if strict acl set"
+ def environmentalInfoAO = irodsAccessObjectFactory.getEnvironmentalInfoAO(irodsAccount)
+ def isStrict = environmentalInfoAO.isStrictACLs()
+ log.info "is strict?:{isStrict}"
+ if (isStrict) {
+ parent = "/" + irodsAccount.zone + "/home/" + irodsAccount.userName
+ }
+
+ }
+
def collectionAndDataObjectListAndSearchAO = irodsAccessObjectFactory.getCollectionAndDataObjectListAndSearchAO(irodsAccount)
def collectionAndDataObjectList = collectionAndDataObjectListAndSearchAO.listDataObjectsAndCollectionsUnderPath(parent)
log.debug("retrieved collectionAndDataObjectList: ${collectionAndDataObjectList}")
-
-
def jsonBuff = []
+ //jsonBuff.add(['parent':parent])
collectionAndDataObjectList.each {
@@ -115,7 +134,7 @@ class BrowseController {
state = "open"
type = "file"
} else {
- icon = "folder"
+ icon = "folder"
state = "closed"
type = "folder"
}
diff --git a/idrop-web/grails-app/views/metadata/metadataDetails.gsp b/idrop-web/grails-app/views/metadata/metadataDetails.gsp
index c67a2c8..bd02a04 100644
--- a/idrop-web/grails-app/views/metadata/metadataDetails.gsp
+++ b/idrop-web/grails-app/views/metadata/metadataDetails.gsp
@@ -9,6 +9,14 @@
</div>
<g:render template="/common/panelmessages"/>
+<div id="metadataMessageArea">
+ <!-- -->
+</div>
+
+<div id="metadataDialogArea">
+<!-- area for generating dialogs --></div>
+
+
<table cellspacing="0" cellpadding="0" border="0"
id="metaDataDetailsTable" style="width: 100%;">
<thead>
@@ -24,15 +32,9 @@
<tr id="${entry.domainObjectUniqueName}">
<td><g:checkBox name="selectedMetadata" />
</td>
- <td>
- ${entry.avuAttribute}
- </td>
- <td>
- ${entry.avuValue}
- </td>
- <td>
- ${entry.avuUnit}
- </td>
+ <td class="editable avuAttribute">${entry.avuAttribute}</td>
+ <td class="editable avuValue">${entry.avuValue}</td>
+ <td class="editable avuUnit">${entry.avuUnit}</td>
</tr>
</g:each>
@@ -54,6 +56,14 @@
$(function() {
dataTable = lcBuildTableInPlace("#metaDataDetailsTable", null, null);
+ $('.editable').editable(function(content, settings) {
+ console.log(this);
+ console.log(content);
+ console.log(settings);
+ return(content);
+ } , {type : 'textarea',
+ submit : 'OK'});
});
+
</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 8af3bb4..0937677 100644
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -38,9 +38,6 @@ function retrieveBrowserFirstView() {
}
/**
- * FIXME: intercept timeouts here? Callback to initialize a browser tree for the
- * first time, set to the root node as indicated in the data
- *
* @param data
* ajax response from browse controller containing the JSON
* representation of the collections and files underneath the given
@@ -48,10 +45,10 @@ function retrieveBrowserFirstView() {
* @return
*/
function browserFirstViewRetrieved(data) {
-
+ var parent = data['parent']
dataTree = $("#dataTreeDiv").jstree({
"core" : {
- "initially_open" : [ "/" ]
+ "initially_open" : [ parent ]
},
"json_data" : {
"data" : [ data ],