summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-09-07 03:04:31 (GMT)
committer Mike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-09-07 03:04:31 (GMT)
commit38c41ab8e78595ff9eeba78b890e06026f37f035 (patch)
tree2d64e888a0ff52f723da3387ac8377b0d39099cd
parentff25d9ef9e59c5fd28ec5ae7f369ba304f600d02 (diff)
downloadQCG-Data-38c41ab8e78595ff9eeba78b890e06026f37f035.zip
QCG-Data-38c41ab8e78595ff9eeba78b890e06026f37f035.tar.gz
QCG-Data-38c41ab8e78595ff9eeba78b890e06026f37f035.tar.bz2
[#459] add metadata dialog now shows, need to consolidate and test
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/MetadataController.groovy23
-rw-r--r--idrop-web/grails-app/views/home/index.gsp1
-rw-r--r--idrop-web/grails-app/views/metadata/metadataDetails.gsp9
3 files changed, 31 insertions, 2 deletions
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/MetadataController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/MetadataController.groovy
index 167c395..1b178ac 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/MetadataController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/MetadataController.groovy
@@ -72,5 +72,28 @@ class MetadataController {
}
+ /**
+ * Display an metadata dialog for an add or edit
+ */
+ def prepareMetadataDialog = {
+ log.info "prepareMetadataDialog"
+ log.info "params: ${params}"
+
+
+ def absPath = params['absPath']
+ def isCreate = params['create']
+
+
+ if (!absPath) {
+ log.error "no absPath in request for prepareMetadataialog()"
+ throw new JargonException("a path was not supplied")
+ }
+
+
+ render(view:"metadataDialog", model:[absPath:absPath, isCreate:isCreate])
+
+ }
+
+
}
diff --git a/idrop-web/grails-app/views/home/index.gsp b/idrop-web/grails-app/views/home/index.gsp
index ebb4a36..a76ae7a 100644
--- a/idrop-web/grails-app/views/home/index.gsp
+++ b/idrop-web/grails-app/views/home/index.gsp
@@ -2,6 +2,7 @@
<meta name="layout" content="main" />
<g:javascript library="mydrop/home" />
<g:javascript library="mydrop/search" />
+<g:javascript library="mydrop/metadata" />
</head>
diff --git a/idrop-web/grails-app/views/metadata/metadataDetails.gsp b/idrop-web/grails-app/views/metadata/metadataDetails.gsp
index 8fea151..4b02596 100644
--- a/idrop-web/grails-app/views/metadata/metadataDetails.gsp
+++ b/idrop-web/grails-app/views/metadata/metadataDetails.gsp
@@ -2,8 +2,7 @@
<div id="detailsToolbar" class="fg-toolbar ui-widget-header">
<div id="detailsMenu" class="fg-buttonset fg-buttonset-multi"
style="float: left">
-<button type="button" id="addMetadataButton" class="ui-state-default ui-corner-all" value="addMetadata" onclick="addMetadata()")>Add Metadata</button>
-<button type="button" id="updateMetadataButton" class="ui-state-default ui-corner-all" value="updateMetadata" onclick="updateMetadata()")>Update Metadata</button>
+<button type="button" id="addMetadataButton" class="ui-state-default ui-corner-all" value="addMetadata" onclick="prepareMetadataDialog()")>Add Metadata</button>
<button type="button" id="deleteMetadataButton" class="ui-state-default ui-corner-all" value="deleteMetadata" onclick="deleteMetadata()")>Delete Metadata</button>
</div>
</div>
@@ -94,6 +93,12 @@
console.log("currentAVU:" + avu['attribute'] + "/" + avu['value'] + "/" + avu['unit']);
console.log("newAVU:" + newAvu['attribute'] + "/" + newAvu['value'] + "/" + newAvu['unit']);
+ if (selectedPath == null) {
+ throw "no collection or data object selected";
+ }
+
+ metadataUpdate(avu, newAvu, selectedPath);
+
return(content);
} , {type : 'textarea',