summaryrefslogtreecommitdiffstats
path: root/idrop-web
diff options
context:
space:
mode:
authorMike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-02-15 16:11:12 (GMT)
committer Mike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-02-15 16:11:12 (GMT)
commit28ac123d9ddab8fdf9008c386a0b3ac924668e88 (patch)
tree5b7922d0d136c467bff59089f0c3b2f7b40912e3 /idrop-web
parent45ce77e0fa65c6b5c99c47e10a6b78c532910089 (diff)
downloadQCG-Data-28ac123d9ddab8fdf9008c386a0b3ac924668e88.zip
QCG-Data-28ac123d9ddab8fdf9008c386a0b3ac924668e88.tar.gz
QCG-Data-28ac123d9ddab8fdf9008c386a0b3ac924668e88.tar.bz2
add back login controller
Diffstat (limited to 'idrop-web')
-rw-r--r--idrop-web/grails-app/conf/spring/resources.xml (renamed from idrop-web/web-app/WEB-INF/resources.xml)0
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy8
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy10
-rw-r--r--idrop-web/test/unit/org/irods/mydrop/controller/BrowseControllerTests.groovy4
-rw-r--r--idrop-web/web-app/WEB-INF/applicationContext.xml3
-rw-r--r--idrop-web/web-app/js/mydrop/home.js28
6 files changed, 41 insertions, 12 deletions
diff --git a/idrop-web/web-app/WEB-INF/resources.xml b/idrop-web/grails-app/conf/spring/resources.xml
index 8806efd..8806efd 100644
--- a/idrop-web/web-app/WEB-INF/resources.xml
+++ b/idrop-web/grails-app/conf/spring/resources.xml
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 452632f..d2addab 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
@@ -91,6 +91,14 @@ class BrowseController {
}
def fileInfo = {
+ def absPath = params['absPath']
+ if (absPath == null) {
+ throw new JargonException("no absolute path passed to the method")
+
+ }
+
+
+
}
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy
new file mode 100644
index 0000000..00d874a
--- /dev/null
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy
@@ -0,0 +1,10 @@
+package org.irods.mydrop.controller
+
+class LoginController {
+
+ def login = { render(view:"login") }
+
+ def index ={ redirect(action: "login") }
+
+ def logout = {}
+}
diff --git a/idrop-web/test/unit/org/irods/mydrop/controller/BrowseControllerTests.groovy b/idrop-web/test/unit/org/irods/mydrop/controller/BrowseControllerTests.groovy
index 4cfe745..a578d54 100644
--- a/idrop-web/test/unit/org/irods/mydrop/controller/BrowseControllerTests.groovy
+++ b/idrop-web/test/unit/org/irods/mydrop/controller/BrowseControllerTests.groovy
@@ -64,7 +64,9 @@ class BrowseControllerTests extends ControllerUnitTestCase {
}
void testFileInfo() {
- assertTrue(true)
+ controller.irodsAccessObjectFactory = irodsAccessObjectFactory
+ controller.irodsAccount = irodsAccount
+ controller.fileInfo
}
diff --git a/idrop-web/web-app/WEB-INF/applicationContext.xml b/idrop-web/web-app/WEB-INF/applicationContext.xml
index d18a2c7..86acc04 100644
--- a/idrop-web/web-app/WEB-INF/applicationContext.xml
+++ b/idrop-web/web-app/WEB-INF/applicationContext.xml
@@ -4,8 +4,7 @@
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
- <import resource="resources.xml" />
-
+
<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
<description>Grails application factory bean</description>
diff --git a/idrop-web/web-app/js/mydrop/home.js b/idrop-web/web-app/js/mydrop/home.js
index d32e5f7..991e9e5 100644
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -21,6 +21,7 @@ function retrieveBrowserFirstView() {
browserFirstViewRetrieved);
}
+// get rid of
function useAjaxToRetrieveATreeNode(node, path) {
var url = "/browse/loadTree";
strPath = "";
@@ -45,6 +46,7 @@ function useAjaxToRetrieveATreeNode(node, path) {
}
+// get rid of
function nodeTreeRetrievedViaAjax(targetNode, jsonData) {
var directoryList = jsonData.directoryList;
@@ -84,6 +86,7 @@ function nodeTreeRetrievedViaAjax(targetNode, jsonData) {
* @param n
* @return
*/
+// get rid of
function buildDataForNodeRequest(n) {
var nodeData = {
@@ -137,6 +140,7 @@ function browserFirstViewRetrieved(data) {
},
+
"themes" : {
"theme" : "default",
"url" : context + "/css/style.css",
@@ -145,10 +149,17 @@ function browserFirstViewRetrieved(data) {
},
"plugins" : [ "json_data", "types", "ui", "crmm", "themes" ]
});
+
+ $("#dataTreeDiv").bind("select_node.jstree", function (e, data) {
+ // alert(data.rslt.obj); // this is the object that was clicked
+ nodeSelected(e, data.rslt.obj);
+ });
- dataTree.bind("click", function(event) {
- nodeSelected(event)
- });
+
+
+ /*dataTree.live("click", function(event, data) {
+ nodeSelected(event, data)
+ });*/
}
@@ -168,13 +179,12 @@ function nodeLoadedCallback() {
* javascript event containing a reference to the selected node
* @return
*/
-function nodeSelected(event) {
+function nodeSelected(event, data) {
// given the path, put in the node data
- /*
- * var path = $.jstree._reference("#root").get_path(event.target, false);
- * obj = $.jstree._reference(event.target)._get_node(event.target);
- *
- * if (isThisNodeLoaded(obj)) { // already loaded, just toggle
+
+ alert("node selected");
+ //obj = $.jstree._reference(event.target)._get_node(event.target);
+ /*
* $.jstree._reference("#root").toggle_node(event.target, false, false);
* synchronizeDetailView(event.target, path); } else {
* //useAjaxToRetrieveATreeNode(obj, path); }