summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulina Jankowska <paulinkaj1@gmail.com>2013-07-30 09:32:42 (GMT)
committer Paulina Jankowska <paulinkaj1@gmail.com>2013-07-30 09:32:42 (GMT)
commit49f461d8539c2a75d494135ab4c6a86c400dfce2 (patch)
treee6305d22dee8577ce2edace057b59d6315e47132
parent745d3cb2de81501754c5b5406dd4bfb3dedb22a9 (diff)
downloadQCG-Data-49f461d8539c2a75d494135ab4c6a86c400dfce2.zip
QCG-Data-49f461d8539c2a75d494135ab4c6a86c400dfce2.tar.gz
QCG-Data-49f461d8539c2a75d494135ab4c6a86c400dfce2.tar.bz2
Only login&password
-rw-r--r--idrop-web/application.properties8
-rwxr-xr-x[-rw-r--r--]idrop-web/build.sh0
-rwxr-xr-xidrop-web/grails-app/conf/BuildConfig.groovy14
-rwxr-xr-xidrop-web/grails-app/conf/Config.groovy22
-rwxr-xr-xidrop-web/grails-app/conf/Config.groovy~198
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy181
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/FileController.groovy76
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/HomeController.groovy125
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy3
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy~309
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/ProfileController.groovy56
-rwxr-xr-xidrop-web/grails-app/i18n/messages.properties10
-rwxr-xr-xidrop-web/grails-app/views/browse/_browseTabContent.gsp143
-rwxr-xr-xidrop-web/grails-app/views/browse/_collectionInfoToolbar.gsp18
-rwxr-xr-xidrop-web/grails-app/views/browse/_dataObjectInfoToolbar.gsp12
-rwxr-xr-xidrop-web/grails-app/views/browse/browseDetails.gsp289
-rwxr-xr-xidrop-web/grails-app/views/browse/collectionInfo.gsp321
-rw-r--r--idrop-web/grails-app/views/browse/dataObjectInfo.gsp520
-rwxr-xr-xidrop-web/grails-app/views/common/_topToolbar.gsp23
-rwxr-xr-xidrop-web/grails-app/views/home/link.gsp2
-rwxr-xr-xidrop-web/grails-app/views/home/noInfo.gsp3
-rwxr-xr-xidrop-web/grails-app/views/login/login.gsp245
-rwxr-xr-xidrop-web/grails-app/views/metadata/metadataDetails.gsp52
-rw-r--r--idrop-web/grails-app/views/sharing/_sharingPanel.gsp2
-rwxr-xr-xidrop-web/grails-app/views/sharing/aclDetails.gsp6
-rwxr-xr-xidrop-web/idrop-web-config2.groovy14
-rw-r--r--idrop-web/release_notes.txt30
-rw-r--r--idrop-web/web-app/js/mydrop/home.js88
-rwxr-xr-xidrop-web/web-app/js/mydrop/profile.js5
29 files changed, 1470 insertions, 1305 deletions
diff --git a/idrop-web/application.properties b/idrop-web/application.properties
index 06849fd..6f51c02 100644
--- a/idrop-web/application.properties
+++ b/idrop-web/application.properties
@@ -1,6 +1,8 @@
#Grails Metadata file
-#Tue Apr 23 11:13:09 EDT 2013
-app.grails.version=2.2.1
-app.name=idrop-web2
+#Thu Jul 18 14:51:42 CEST 2013
+app.grails.version=2.2.3
+app.name=idrop-web
app.servlet.version=2.5
app.version=2.0.0
+plugins.hibernate=2.2.3
+plugins.tomcat=2.2.3
diff --git a/idrop-web/build.sh b/idrop-web/build.sh
index 8845935..8845935 100644..100755
--- a/idrop-web/build.sh
+++ b/idrop-web/build.sh
diff --git a/idrop-web/grails-app/conf/BuildConfig.groovy b/idrop-web/grails-app/conf/BuildConfig.groovy
index bfa180a..cdee1ac 100755
--- a/idrop-web/grails-app/conf/BuildConfig.groovy
+++ b/idrop-web/grails-app/conf/BuildConfig.groovy
@@ -28,19 +28,15 @@ grails.project.dependency.resolution = {
test 'org.mockito:mockito-all:1.8.1'
compile 'commons-io:commons-io:2.1'
provided 'junit:junit:4.8.1'
- compile ('org.irods.jargon:jargon-core:3.3.1-SNAPSHOT') { excludes ([group:'org.jglobus'])}
- compile ('org.irods.jargon:jargon-data-utils:3.3.1-SNAPSHOT') { excludes ([group:'org.jglobus'])}
- compile ('org.irods.jargon:jargon-ticket:3.3.1-SNAPSHOT') { excludes ([group:'org.jglobus'])}
- compile ('org.irods.jargon:jargon-user-profile:3.3.1-SNAPSHOT') { excludes ([group:'org.jglobus'])}
- compile ('org.irods.jargon:jargon-user-tagging:3.3.1-SNAPSHOT') { excludes ([group:'org.jglobus'])}
+ compile ('org.irods.jargon:jargon-core:3.3.2-SNAPSHOT') { excludes ([group:'org.jglobus'])}
+ compile ('org.irods.jargon:jargon-data-utils:3.3.2-SNAPSHOT') { excludes ([group:'org.jglobus'])}
+ compile ('org.irods.jargon:jargon-ticket:3.3.2-SNAPSHOT') { excludes ([group:'org.jglobus'])}
+ compile ('org.irods.jargon:jargon-user-profile:3.3.2-SNAPSHOT') { excludes ([group:'org.jglobus'])}
+ compile ('org.irods.jargon:jargon-user-tagging:3.3.2-SNAPSHOT') { excludes ([group:'org.jglobus'])}
provided 'javax.servlet:servlet-api:2.5'
compile 'org.jsoup:jsoup:0.2.2'
compile( group: 'log4j', name: 'log4j', version: '1.2.16', export: false )
}
- plugins {
- runtime ":hibernate:$grailsVersion"
- build ":tomcat:$grailsVersion"
- }
}
diff --git a/idrop-web/grails-app/conf/Config.groovy b/idrop-web/grails-app/conf/Config.groovy
index 9b743cc..db1bb49 100755
--- a/idrop-web/grails-app/conf/Config.groovy
+++ b/idrop-web/grails-app/conf/Config.groovy
@@ -17,8 +17,8 @@ environments {
/*production { grails.serverURL = "http://lifetime-library.ils.unc.edu/${appName}" }
production { grails.serverURL = "http://iren-web.renci.org:8080/${appName}" }
production { grails.serverURL = "http://srbbrick15.ucsd.edu:1525//${appName}" }
- production { grails.serverURL = "http://www.irods.org" } */2
- production { grails.serverURL = "http://iren-web.renci.org:8080/${appName}" }
+ production { grails.serverURL = "http://www.irods.org" } */
+ production { grails.serverURL = "http://localhost:8080/${appName}" }
development { grails.serverURL = "http://localhost:8080/${appName}" }
test { grails.serverURL = "http://localhost:8080/${appName}" }
}
@@ -26,13 +26,13 @@ environments {
/*
* 2) If you want to set things up so that the idrop web browser automatically points to a certain grid (i.e. only user ID and password show, then do something like below.
* Take the following outside of the comment block and configure here
- *
- idrop.config.preset.host="diamond.ils.unc.edu"
- idrop.config.preset.port="2247"
- idrop.config.preset.zone="lifelibZone"
- idrop.config.preset.resource="lifelibResc1"
- idrop.config.preset.authScheme="Standard"
*/
+ idrop.config.preset.host="elder10.man.poznan.pl"
+ idrop.config.preset.port="1247"
+ idrop.config.preset.zone="testZone"
+ idrop.config.preset.resource=""
+ idrop.config.preset.authScheme="Standard"
+
/*
@@ -61,9 +61,9 @@ idrop.config.idrop.lite.use.applet.dir=false
* idrop.config.idrop.jnlp="https://lifetime-library.ils.unc.edu/llclient/idrop.jnlp"
*/
-//idrop.config.idrop.jnlp="http://iren-web.renci.org:8080/idrop/idrop.jnlp"
+idrop.config.idrop.jnlp="http://localhost:8080/idrop-web/idrop.jnlp"
//drop.config.idrop.jnlp="http://iren-web.renci.org/idrop-snapshot/idrop.jnlp"
-idrop.config.idrop.jnlp="http://iren-web.renci.org/idrop-snapshot/idrop.jnlp"
+//idrop.config.idrop.jnlp="http://http://iren-web.renci.org/idrop.jnlp"
/*
* 5) Customization properties
*/
@@ -171,7 +171,7 @@ log4j = {
// appender:
//
// appenders {
- // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
+ // console name:'stdout', layout:pattern(conversionPattern: '%c %m%n')
// }
error 'org.codehaus.groovy.grails.web.servlet', // controllers
diff --git a/idrop-web/grails-app/conf/Config.groovy~ b/idrop-web/grails-app/conf/Config.groovy~
new file mode 100755
index 0000000..97def3b
--- /dev/null
+++ b/idrop-web/grails-app/conf/Config.groovy~
@@ -0,0 +1,198 @@
+grails.config.locations = [
+ "file:/etc/idrop-web/idrop-web-config2.groovy"
+]
+
+/*
+ * Configuration for idrop-web - iDROP Cloud browser
+ * Project page: https://code.renci.org/gf/project/irodsidrop/
+ *
+ * Deployment instructions:
+ *
+ * 1) Set configuration for your deployment server. Set the name in production below to the URL you want to use. This value is used by Grails to
+ * compute links, so it should be the front end for your application (e.g. if you run Apache HTTP server in front of Tomcat with SSL, this would be
+ * the end-users 'https://' URL
+ *
+ */
+environments {
+ /*production { grails.serverURL = "http://lifetime-library.ils.unc.edu/${appName}" }
+ production { grails.serverURL = "http://iren-web.renci.org:8080/${appName}" }
+ production { grails.serverURL = "http://srbbrick15.ucsd.edu:1525//${appName}" }
+ production { grails.serverURL = "http://www.irods.org" } */
+ production { grails.serverURL = "http://localhost:8080/${appName}" }
+ development { grails.serverURL = "http://localhost:8080/${appName}" }
+ test { grails.serverURL = "http://localhost:8080/${appName}" }
+}
+
+/*
+ * 2) If you want to set things up so that the idrop web browser automatically points to a certain grid (i.e. only user ID and password show, then do something like below.
+ * Take the following outside of the comment block and configure here
+ *
+ idrop.config.preset.host="elder10.man.poznan.pl"
+ idrop.config.preset.port="1247"
+ idrop.config.preset.zone="testZone"
+ idrop.config.preset.resource=""
+ idrop.config.preset.authScheme="Standard"
+ */
+
+
+/*
+ * 3) iDROP web includes the idrop-lite Java applet, which is launched from the iDROP web interface. The interface needs to know where to find this jar file.
+ * The Jar file should be placed on a web server in an accessible directory, and configured below
+ *
+ *
+ idrop.config.idrop.lite.applet.jar="idrop-lite-1.0.0-SNAPSHOT-jar-with-dependencies.jar"
+ idrop.config.idrop.lite.codebase="http://iren-web.renci.org/idrop-web/applet"
+ idrop.config.idrop.lite.use.applet.dir=false
+ idrop.config.idrop.lite.applet.jar="idrop-lite-1.0.0-SNAPSHOT-jar-with-dependencies.jar"
+ idrop.config.idrop.lite.codebase="https://lifetime-library.ils.unc.edu/llclient"
+ idrop.config.idrop.lite.use.applet.dir=false
+ */
+
+idrop.config.idrop.lite.applet.jar="idrop-lite-2.0.1-SNAPSHOT-jar-with-dependencies.jar"
+idrop.config.idrop.lite.codebase="http://iren-web.renci.org/idrop-snapshot"
+idrop.config.idrop.lite.use.applet.dir=false
+
+/*
+ * 4) iDROP web includes a link to launch the iDROP desktop GUI, using Java WebStart. WebStart looks for a jnlp file and the accompanying
+ * lib directories. This should be deployed on a web server at some accessible location and referred to here
+ *
+ * idrop.config.idrop.jnlp="http://iren-web.renci.org:8080/idrop/idrop.jnlp"
+ *
+ * idrop.config.idrop.jnlp="https://lifetime-library.ils.unc.edu/llclient/idrop.jnlp"
+ */
+
+idrop.config.idrop.jnlp="http://localhost:8080/idrop-web/idrop.jnlp"
+//drop.config.idrop.jnlp="http://iren-web.renci.org/idrop-snapshot/idrop.jnlp"
+//idrop.config.idrop.jnlp="http://http://iren-web.renci.org/idrop.jnlp"
+/*
+ * 5) Customization properties
+ */
+
+// do I support tickets? This determies whether the ticket feature is available via the interface, it also requires ticket support in iRODS itself (version 3.1+)
+idrop.config.use.tickets=true
+idrop.config.max.thumbnail.size.mb=20
+idrop.config.use.userprofile=true
+// do I support sharing? Requires target server to have specific query support and sharing queries loaded from jargon-user-tagging
+idrop.config.use.sharing=true
+
+// do I want to show the gallery view?
+idrop.config.use.gallery.view=false
+// do I want to show the browse view?
+idrop.config.use.browse.view=true
+/*
+ * Some properties may be set in an external configuration file, as configured below
+ */
+
+// locations to search for config files that get merged into the main config
+// config files can either be Java properties files or ConfigSlurper scripts
+/*
+ * "file:/etc/idrop-web/idrop-web-config.groovy"
+ grails.config.locations = [
+ "file:${userHome}/.grails/${appName}-config.groovy"
+ ]
+ if(System.properties["${appName}.config.location"]) {
+ grails.config.locations << "file:" + System.properties["${appName}.config.location"]
+ }
+ */
+
+
+/* ll config*/
+/*idrop.config.idrop.lite.applet.jar="idrop-lite-1.0.0-SNAPSHOT-jar-with-dependencies.jar"
+ idrop.config.idrop.lite.codebase="https://lifetime-library.ils.unc.edu/llclient"
+ idrop.config.preset.host="diamond.ils.unc.edu"
+ idrop.config.preset.port="2247"
+ idrop.config.preset.zone="lifelibZone"
+ idrop.config.preset.resource="lifelibResc1"
+ idrop.config.idrop.lite.use.applet.dir=false
+ idrop.config.idrop.jnlp="https://lifetime-library.ils.unc.edu/llclient/idrop.jnlp"
+ */
+grails.views.enable.jsessionid=true
+grails.project.groupId = org.irods.mydrop // change this to alter the default package name and Maven publishing destination
+grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
+grails.mime.use.accept.header = false
+grails.mime.types = [ html: [
+ 'text/html',
+ 'application/xhtml+xml'
+ ],
+ xml: [
+ 'text/xml',
+ 'application/xml'
+ ],
+ text: 'text/plain',
+ js: 'text/javascript',
+ rss: 'application/rss+xml',
+ atom: 'application/atom+xml',
+ css: 'text/css',
+ csv: 'text/csv',
+ all: '*/*',
+ json: [
+ 'application/json',
+ 'text/json'
+ ],
+ form: 'application/x-www-form-urlencoded',
+ multipartForm: 'multipart/form-data'
+]
+
+// URL Mapping Cache Max Size, defaults to 5000
+//grails.urlmapping.cache.maxsize = 1000
+
+// The default codec used to encode data with ${}
+grails.views.default.codec = "none" // none, html, base64
+grails.views.gsp.encoding = "UTF-8"
+grails.converters.encoding = "UTF-8"
+// enable Sitemesh preprocessing of GSP pages
+grails.views.gsp.sitemesh.preprocess = true
+// scaffolding templates configuration
+grails.scaffolding.templates.domainSuffix = 'Instance'
+
+// Set to false to use the new Grails 1.2 JSONBuilder in the render method
+grails.json.legacy.builder = false
+// enabled native2ascii conversion of i18n properties files
+grails.enable.native2ascii = true
+// whether to install the java.util.logging bridge for sl4j. Disable for AppEngine!
+grails.logging.jul.usebridge = true
+// packages to include in Spring bean scanning
+grails.spring.bean.packages = []
+grails.validateable.packages = ['org.irods']
+
+// set per-environment serverURL stem for creating absolute links
+
+// log4j configuration
+log4j = {
+
+ appenders { 'null' name:'stacktrace' }
+
+ root {
+ warn()
+ additivity = true
+ }
+
+ // Example of changing the log pattern for the default console
+ // appender:
+ //
+ // appenders {
+ // console name:'stdout', layout:pattern(conversionPattern: '%c %m%n')
+ // }
+
+ error 'org.codehaus.groovy.grails.web.servlet', // controllers
+ 'org.codehaus.groovy.grails.web.pages', // GSP
+ 'org.codehaus.groovy.grails.web.sitemesh', // layouts
+ 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
+ 'org.codehaus.groovy.grails.web.mapping', // URL mapping
+ 'org.codehaus.groovy.grails.commons', // core / classloading
+ 'org.codehaus.groovy.grails.plugins', // plugins
+ 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
+ 'org.hibernate',
+ 'net.sf.ehcache.hibernate'
+
+ //info 'org.irods.mydrop'
+ info 'org.irods.jargon'
+
+ warn 'org.irods.jargon.spring.security'
+ warn 'org.springframework'
+ debug 'grails.app'
+
+ warn 'org.mortbay.log',
+ 'grails.app.controller',
+ 'org.springframework.security'
+}
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 1fee905..6e0a2db 100755
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
@@ -35,7 +35,7 @@ class BrowseController {
StarringService starringService
ViewStateService viewStateService
IRODSAccount irodsAccount
-
+
def grailsApplication
/**
@@ -55,16 +55,16 @@ class BrowseController {
log.debug("closing the session")
irodsAccessObjectFactory.closeSession()
}
-
-
+
+
def index = {
log.info ("in index action")
def mode = params['mode']
def absPath = params['absPath']
-
+
ViewState viewState = viewStateService.getViewStateFromSessionAndCreateIfNotThere()
log.info("viewState:${viewState}")
-
+
if (mode == null && absPath == null) {
log.info("coming in with no params for mode or path, check view state and use the mode and path there (if they exist)")
absPath = viewState.rootPath
@@ -73,7 +73,7 @@ class BrowseController {
mode = "path"
}
}
-
+
if (mode == "path") {
log.info("mode is path, should have an abspath to preset to")
if (absPath == null) {
@@ -83,22 +83,23 @@ class BrowseController {
} else {
log.info("path is ${absPath}")
viewState = viewStateService.saveRootPath(absPath)
-
+
/*
* Decide what to do about the selected path, such that a path we set as root might need to wipe out the previous selected path.
*
* Keep the selected path if the new root is shorter than the selected path and it contains the path
*/
-
+
if (viewState.selectedPath.indexOf(viewState.rootPath) == -1) {
log.info("getting rid of selected path, not under new root path")
viewState = viewStateService.saveSelectedPath("")
}
+
}
}
- render(view: "index", model:[mode:mode,path:absPath,viewState:viewState,irodsAccount:irodsAccount])
+ render(view: "index", model:[mode:mode,path:absPath,viewState:viewState])
}
def showBrowseToolbar = {
@@ -197,44 +198,44 @@ class BrowseController {
// look at the type to decide how to set the root path
if (pathType == "detect") {
-
+
/*
* Detect modes means I am being asked to decide what to show, based on things like whether
* strict acl's are enforced.
*
* If I have a preserved view state, initialize to that
*/
-
+
log.info("path type is detect")
-
+
ViewState viewState = viewStateService.getViewStateFromSessionAndCreateIfNotThere()
-
+
if (viewState.rootPath) {
-
+
parent = viewState.rootPath
-
+
icon = "folder"
state = "closed"
type = "folder"
-
+
def attrBuf = ["id":parent, "rel":type, "absPath":parent]
-
+
jsonBuff.add(
["data": parent,"attr":attrBuf, "state":state,"icon":icon, "type":type]
)
-
+
} else {
-
-
+
+
log.info("no parent parm set, detect display as either root or home")
-
+
if (irodsAccount.userName == "anonymous") {
log.info("user is anonymous, default to view the public directory")
-
+
parent = "/" + irodsAccount.zone + "/home/public"
-
+
} else {
-
+
def isStrict;
try {
isStrict = environmentalInfoAO.isStrictACLs()
@@ -242,7 +243,7 @@ class BrowseController {
log.warn("error getting rule info for strict acl's currently overheaded see idrop bug [#1219] error on intiial display centos6")
isStrict = false
}
-
+
log.info "is strict?:{isStrict}"
if (isStrict) {
parent = "/" + irodsAccount.zone + "/home/" + irodsAccount.userName
@@ -250,15 +251,15 @@ class BrowseController {
parent = "/"
}
}
-
+
viewStateService.saveRootPath(parent)
-
+
icon = "folder"
state = "closed"
type = "folder"
-
+
def attrBuf = ["id":parent, "rel":type, "absPath":parent]
-
+
jsonBuff.add(
["data": parent,"attr":attrBuf, "state":state,"icon":icon, "type":type]
)
@@ -273,7 +274,7 @@ class BrowseController {
icon = "folder"
state = "closed"
type = "folder"
-
+
viewStateService.saveRootPath(parent)
def attrBuf = ["id":parent, "rel":type, "absPath":parent]
@@ -304,7 +305,7 @@ class BrowseController {
type = "folder"
viewStateService.saveRootPath(parent)
-
+
def attrBuf = ["id":parent, "rel":type, "absPath":parent]
jsonBuff.add(
@@ -318,13 +319,13 @@ class BrowseController {
if (parent == "") {
parent = "/"
}
-
+
// display a root node
icon = "folder"
state = "closed"
type = "folder"
-
+
viewStateService.saveRootPath(parent)
def attrBuf = ["id":parent, "rel":type, "absPath":parent]
@@ -335,49 +336,39 @@ class BrowseController {
} else if (pathType == "list") {
log.info("parent dir for listing provided as:${parent}")
-
+
def pagingOffset = params['partialStart']
def splitMode = params['splitMode']
-
+
if (pagingOffset == null) {
pagingOffset = 0;
}
-
+
if (splitMode == null) {
throw new JargonException("missing the splitMode")
}
-
+
def collectionAndDataObjectListAndSearchAO = irodsAccessObjectFactory.getCollectionAndDataObjectListAndSearchAO(irodsAccount)
+ def collectionAndDataObjectList = collectionAndDataObjectListAndSearchAO.listDataObjectsAndCollectionsUnderPath(parent)
+ log.debug("retrieved collectionAndDataObjectList: ${collectionAndDataObjectList}")
+ collectionAndDataObjectList.each {
- try {
-
- def collectionAndDataObjectList = collectionAndDataObjectListAndSearchAO.listDataObjectsAndCollectionsUnderPath(parent)
- log.debug("retrieved collectionAndDataObjectList: ${collectionAndDataObjectList}")
- collectionAndDataObjectList.each {
+ if (it.isDataObject()) {
+ icon = "../images/file.png"
+ state = "open"
+ type = "file"
+ } else {
+ icon = "folder"
+ state = "closed"
+ type = "folder"
+ }
- if (it.isDataObject()) {
- icon = "../images/file.png"
- state = "open"
- type = "file"
- } else {
- icon = "folder"
- state = "closed"
- type = "folder"
- }
-
- def attrBuf = ["id":it.formattedAbsolutePath, "rel":type, "absPath":it.formattedAbsolutePath]
+ def attrBuf = ["id":it.formattedAbsolutePath, "rel":type, "absPath":it.formattedAbsolutePath]
- jsonBuff.add(
- ["data": it.nodeLabelDisplayValue,"attr":attrBuf, "state":state,"icon":icon, "type":type]
- )
- }
- } catch (ZoneUnavailableException e) {
- log.error("zone unavailable exception", e)
- response.sendError(500, message(code:"message.zone.unavailable"))
- } catch (JargonException e) {
- log.error("jargon exception", e)
- response.sendError(500, e.message)
+ jsonBuff.add(
+ ["data": it.nodeLabelDisplayValue,"attr":attrBuf, "state":state,"icon":icon, "type":type]
+ )
}
} else {
throw new JargonException("invalid path type:${pathType}")
@@ -391,9 +382,9 @@ class BrowseController {
if (absPath == null) {
throw new JargonException("no absolute path passed to the method")
}
-
+
ViewState viewState = viewStateService.saveViewModeAndSelectedPath("browse", absPath)
-
+
log.info "displayBrowseGridDetails for absPath: ${absPath}"
try {
CollectionAndDataObjectListAndSearchAO collectionAndDataObjectListAndSearchAO = irodsAccessObjectFactory.getCollectionAndDataObjectListAndSearchAO(irodsAccount)
@@ -413,7 +404,7 @@ class BrowseController {
PagingActions pagingActions = PagingAnalyser.buildPagingActionsFromListOfIRODSDomainObjects(entries, pageSize)
log.debug("retrieved collectionAndDataObjectList: ${entries}")
log.debug("pagingActions:${pagingActions}")
-
+
render(view:"browseDetails", model:[collection:entries, parent:retObj, showLite:collectionAndDataObjectListAndSearchAO.getIRODSServerProperties().isTheIrodsServerAtLeastAtTheGivenReleaseVersion("rods3.0"), viewState:viewState, pagingActions:pagingActions])
} catch (FileNotFoundException fnf) {
log.info("file not found looking for data, show stand-in page", fnf)
@@ -443,7 +434,7 @@ class BrowseController {
if (absPath == null) {
throw new JargonException("no absolute path passed to the method")
}
-
+
viewStateService.saveViewModeAndSelectedPath("info", absPath)
ViewNameAndModelValues mav = handleInfoLookup(absPath)
@@ -591,7 +582,7 @@ class BrowseController {
String fileName = targetFile.name
render(view:"newFolderDialog", model:[absPath:absPath])
}
-
+
/**
* Prepare the 'new folder' dialog
*/
@@ -607,11 +598,11 @@ class BrowseController {
log.info("abs path:${absPath}")
-
+
render(view:"starDialog", model:[absPath:absPath])
}
-
+
/**
* Show gallery view for given directory
*/
@@ -621,7 +612,7 @@ class BrowseController {
if (absPath == null) {
throw new JargonException("no absolute path passed to the method")
}
-
+
viewStateService.saveViewModeAndSelectedPath("gallery", absPath)
try {
@@ -644,7 +635,7 @@ class BrowseController {
render(view:"noInfo")
}
}
-
+
/**
* Set a folder to starred
*/
@@ -655,7 +646,7 @@ class BrowseController {
def message = message(code:"error.no.path.provided")
response.sendError(500,message)
}
-
+
def description = params['description']
if (description == null) {
def message = message(code:"error.no.description.provided")
@@ -672,7 +663,7 @@ class BrowseController {
response.sendError(500,message)
}
}
-
+
/**
* Set a folder to not starred
*/
@@ -683,7 +674,7 @@ class BrowseController {
def message = message(code:"error.no.path.provided")
response.sendError(500,message)
}
-
+
try {
log.info "unstarring absPath: ${absPath}"
starringService.unStar(irodsAccount, absPath)
@@ -725,15 +716,11 @@ class BrowseController {
FreeTaggingService freeTaggingService = taggingServiceFactory.instanceFreeTaggingService(irodsAccount)
IRODSTaggingService irodsTaggingService = taggingServiceFactory.instanceIrodsTaggingService(irodsAccount)
- IRODSStarredFileOrCollection irodsStarredFileOrCollection;
+
log.info("seeing if this is starred")
- try {
- irodsStarredFileOrCollection = starringService.findStarred(irodsAccount, absPath)
- } catch (SpecificQueryException sqe) {
- irodsStarredFileOrCollection = null
- }
+ IRODSStarredFileOrCollection irodsStarredFileOrCollection = starringService.findStarred(irodsAccount, absPath)
log.info "starring info:${irodsStarredFileOrCollection}"
-
+
if (isDataObject) {
long maxSize
String maxSizeParm = grailsApplication.config.idrop.config.max.thumbnail.size.mb
@@ -798,7 +785,7 @@ class BrowseController {
ResourceAO resourceAO = irodsAccessObjectFactory.getResourceAO(irodsAccount)
List<String> resources = new ArrayList<String>()
resources.add("")
-
+
try {
resources.addAll(resourceAO.listResourceAndResourceGroupNames())
} catch (Exception e) {
@@ -822,7 +809,7 @@ class BrowseController {
session["SPRING_SECURITY_CONTEXT"] = irodsAccount
render "OK"
}
-
+
/**
* Create the contents of a 'public link' dialog that will either display a url to copy, or create the appropriate ACL alterations
* to support such a public link
@@ -830,43 +817,43 @@ class BrowseController {
def preparePublicLinkDialog = {
def absPath = params['absPath']
if (absPath == null) {
- log.error "no file name in request"
+ log.error "no file name in request"
def message = message(code:"error.no.path.provided")
response.sendError(500,message)
}
-
+
// see if anonymous already has access
AnonymousAccessService anonymousAccessService = new AnonymousAccessServiceImpl(irodsAccessObjectFactory, irodsAccount)
-
+
boolean accessSet = anonymousAccessService.isAnonymousAccessSetUp(absPath)
URI irodsUri = IRODSUriUtils.buildURIForAnAccountWithNoUserInformationIncluded(irodsAccount, absPath)
String irodsUriPath = irodsUri.toString()
String accessUrlString = buildAnonymousAccessUrl(irodsUriPath)
render(view:"publicLinkDialog", model:[absPath:absPath, accessSet:accessSet, accessUrlString:accessUrlString])
- }
-
+ }
+
def updatePublicLinkDialog = {
def absPath = params['absPath']
if (absPath == null) {
- log.error "no file name in request"
+ log.error "no file name in request"
def message = message(code:"error.no.path.provided")
response.sendError(500,message)
}
-
+
// see if anonymous already has access
AnonymousAccessService anonymousAccessService = new AnonymousAccessServiceImpl(irodsAccessObjectFactory, irodsAccount)
try {
log.info("adding anonymous access...")
anonymousAccessService.permitAnonymousToFileOrCollectionSettingCollectionAndDataObjectProperties(absPath, FilePermissionEnum.READ, null)
log.info("add successful, link generated")
- } catch (JargonException je) {
+ } catch (JargonException je) {
log.error("unable to update anonymous access", je)
def message = message(code:"error.unable.to.add.anonymous.access")
response.sendError(500,message)
return
}
-
+
URI irodsUri = IRODSUriUtils.buildURIForAnAccountWithNoUserInformationIncluded(irodsAccount, absPath)
String irodsUriPath = irodsUri.toString()
String accessUrlString = buildAnonymousAccessUrl(irodsUriPath)
@@ -874,7 +861,7 @@ class BrowseController {
boolean accessSet = true
render(view:"publicLinkDialog", model:[absPath:absPath, accessSet:accessSet, accessUrlString:accessUrlString])
}
-
+
/**
* Build a url that will set up anonymous access to the given file
* @return
@@ -884,10 +871,10 @@ class BrowseController {
String grailsServerURL = grailsApplication.config.grails.serverURL
log.info("server URL for context: ${grailsServerURL}")
grailsServerURL = grailsServerURL + "/home/link?irodsURI=" + URLEncoder.encode(irodsUriString, grailsApplication.config.grails.views.gsp.encoding)
- return grailsServerURL
+ return grailsServerURL
}
-
-
+
+
}
class ViewNameAndModelValues {
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/FileController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/FileController.groovy
index 971b89e..137b225 100755
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/FileController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/FileController.groovy
@@ -71,6 +71,7 @@ class FileController {
fullPath = fullPath.substring(idx + parseStringLength)
log.info("iRODS path for file is: ${fullPath}")
+
try {
IRODSFileFactory irodsFileFactory = irodsAccessObjectFactory.getIRODSFileFactory(irodsAccount)
IRODSFileInputStream irodsFileInputStream = irodsFileFactory.instanceIRODSFileInputStream(fullPath)
@@ -78,18 +79,12 @@ class FileController {
def length = irodsFile.length()
log.info("file length = ${length}")
log.info("opened input stream")
-
+
response.setContentType("application/octet-stream")
response.setContentLength((int) length)
response.setHeader("Content-disposition", "attachment;filename=\"${irodsFile.name}\"")
-
- //response.outputStream << irodsFileInputStream // Performing a binary stream copy
-
- Stream2StreamAO stream2Stream = irodsAccessObjectFactory.getStream2StreamAO(irodsAccount)
- def stats = stream2Stream
- .streamToStreamCopyUsingStandardIO(irodsFileInputStream, response.outputStream)
- log.info("transferStats:${stats}")
-
+
+ response.outputStream << irodsFileInputStream // Performing a binary stream copy
} catch (CatNoAccessException e) {
log.error("no access error", e)
response.sendError(500, message(code:"message.no.access"))
@@ -132,14 +127,14 @@ class FileController {
render(view:"uploadDialog", model:[irodsTargetCollection:irodsTargetCollection])
}
-
+
/**
* Prepare a quick upload dialog to upload a file to the default location using the quick upload service
*
*/
def prepareQuickUploadDialog = {
log.info("prepareQuickUploadDialog")
-
+
log.info("checking if uploads default directory needs to be created")
/* here we could do any processing on irods, such as provisioning of metadata fields based on target
@@ -199,8 +194,7 @@ class FileController {
IRODSFile targetFile = irodsFileFactory.instanceIRODSFile(irodsCollectionPath, name)
targetFile.setResource(irodsAccount.defaultStorageResource)
Stream2StreamAO stream2Stream = irodsAccessObjectFactory.getStream2StreamAO(irodsAccount)
- def transferStats = stream2Stream.transferStreamToFileUsingIOStreams(fis, targetFile, f.size, 0)
- log.info("transferStats:${transferStats}")
+ stream2Stream.transferStreamToFileUsingIOStreams(fis, targetFile, f.size, 0)
} catch (NoResourceDefinedException nrd) {
log.error("no resource defined exception", nrd)
response.sendError(500, message(code:"message.no.resource"))
@@ -319,20 +313,20 @@ class FileController {
log.info("name for create folder:${newFolderName}")
IRODSFileFactory irodsFileFactory = irodsAccessObjectFactory.getIRODSFileFactory(irodsAccount)
IRODSFile targetFile = irodsFileFactory.instanceIRODSFile(parent + "/" + newFolderName)
-
+
if (targetFile.exists()) {
log.error "no name in request"
def message = message(code:"error.duplicate.file")
response.sendError(500,message)
}
-
+
targetFile.mkdirs()
log.info("file created:${targetFile.absolutePath}")
render targetFile.getAbsolutePath()
} catch (CatNoAccessException e) {
- log.error("no access error", e)
- response.sendError(500, message(code:"message.no.access"))
- }
+ log.error("no access error", e)
+ response.sendError(500, message(code:"message.no.access"))
+ }
}
@@ -374,12 +368,12 @@ class FileController {
}
try {
prevFile.renameTo(newFile)
-
+
// return the parent, which will be reloaded
render newFile.parent
} catch (CatNoAccessException e) {
- log.error("no access error", e)
- response.sendError(500, message(code:"message.no.access"))
+ log.error("no access error", e)
+ response.sendError(500, message(code:"message.no.access"))
}
}
@@ -420,44 +414,6 @@ class FileController {
render targetAbsPath
}
- /**
- * Do a check for access rights to a file at a given path, if it exists, is a data object, and the user has read access, return "OK", otherwise
- * throw an appropriate exception
- */
- def screenForDownloadRights = {
- log.info("screenForDownloadRights")
-
- String sourceAbsPath = params['absPath']
- if (!sourceAbsPath) {
- log.error "no source path in request"
- def message = message(code:"error.no.path.provided")
- response.sendError(500,message)
- }
-
- log.info("getting file for path:${sourceAbsPath}")
- IRODSFile irodsFile = irodsAccessObjectFactory.getIRODSFileFactory(irodsAccount).instanceIRODSFile(sourceAbsPath)
- if (!irodsFile.exists()) {
- log.error "file does not exist"
- def message = message(code:"error.file.not.found")
- response.sendError(500,message)
- }
-
- if (!irodsFile.isFile()) {
- log.error "not a file"
- def message = message(code:"error.file.not.found")
- response.sendError(500,message)
- }
-
- if (!irodsFile.canRead()) {
- log.error "no access to file"
- def message = message(code:"error.no.access.permission")
- response.sendError(500,message)
- }
-
- render "OK"
-
- }
-
/**
* Copy a file in iRODS
*/
@@ -477,7 +433,7 @@ class FileController {
def message = message(code:"error.no.path.provided")
response.sendError(500,message)
}
-
+
String defaultResource = irodsAccount.defaultStorageResource
log.info("defaultResource:${defaultResource}")
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/HomeController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/HomeController.groovy
index e5f0337..49c7413 100755
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/HomeController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/HomeController.groovy
@@ -1,7 +1,6 @@
package org.irods.mydrop.controller
import org.irods.jargon.core.connection.IRODSAccount
-import org.irods.jargon.core.exception.JargonException
import org.irods.jargon.core.exception.OperationNotSupportedByThisServerException
import org.irods.jargon.core.exception.SpecificQueryException
import org.irods.jargon.core.pub.IRODSAccessObjectFactory
@@ -14,7 +13,7 @@ class HomeController {
StarringService starringService
SharingService sharingService
IRODSAccessObjectFactory irodsAccessObjectFactory
-
+
/**
* Interceptor grabs IRODSAccount from the SecurityContextHolder
*/
@@ -29,9 +28,10 @@ class HomeController {
irodsAccount = session["SPRING_SECURITY_CONTEXT"]
}
- def afterInterceptor = {
+ def afterInterceptor = {
log.debug("closing the session")
irodsAccessObjectFactory.closeSession()
+
}
def index() {
@@ -65,74 +65,61 @@ class HomeController {
log.info("irodsFilePath:${filePath}")
String zone = MiscIRODSUtils.getZoneInPath(filePath)
log.info("zone:${zone}")
-
- irodsAccount = session["SPRING_SECURITY_CONTEXT"]
- if (irodsAccount == null) {
- log.info("no account set up, create an anonymous login")
- irodsAccount = anonymousIrodsAccountForURIString(mungedIRODSURI)
- session["SPRING_SECURITY_CONTEXT"] = irodsAccount
- }
-
+ IRODSAccount irodsAccount = anonymousIrodsAccountForURIString(mungedIRODSURI)
+ session["SPRING_SECURITY_CONTEXT"] = irodsAccount
/*
* Need to figure out how to signal interface to 'reset' to new account and path?
*/
render(view:"link", model:[absPath:filePath])
- }
+ }
+
def starredCollections() {
log.info "starredCollections()"
-
- try {
- def listing = starringService.listStarredCollections(irodsAccount, 0)
-
- if (listing.isEmpty()) {
- render(view:"noInfo")
- } else {
- render(view:"quickViewList",model:[listing:listing])
- }
- } catch (SpecificQueryException sqe) {
- log.error("error in specific query", sqe)
- render(view:"noSupport")
- } catch (JargonException je) {
- log.error("jargon exception", je)
- response.sendError(500,je.message)
+
+ def listing = starringService.listStarredCollections(irodsAccount, 0)
+
+ if (listing.isEmpty()) {
+ render(view:"noInfo")
+ } else {
+ render(view:"quickViewList",model:[listing:listing])
}
}
-
+
def starredDataObjects() {
log.info "starredDataObjects()"
- try {
- def listing = starringService.listStarredDataObjects(irodsAccount, 0)
- if (listing.isEmpty()) {
- render(view:"noInfo")
- } else {
- render(view:"quickViewList",model:[listing:listing])
- }
- } catch (SpecificQueryException sqe) {
- log.error("error in specific query", sqe)
- render(view:"noSupport")
- } catch (JargonException je) {
- log.error("jargon exception", je)
- response.sendError(500,je.message)
+ def listing = starringService.listStarredDataObjects(irodsAccount, 0)
+ if (listing.isEmpty()) {
+ render(view:"noInfo")
+ } else {
+ render(view:"quickViewList",model:[listing:listing])
}
}
-
+
/**
* Listing of collections shared by me with others
* @return
*/
def sharedCollectionsByMe() {
log.info "sharedCollectionsByMe"
-
+
boolean sharing = sharingService.isSharingSupported(irodsAccount)
if (!sharing) {
log.info("no sharing support on this grid")
- render(view:"noSupport")
+ render(view:"noInfo")
return
}
-
-
+
+ /*
+ * is sharing configured?
+ */
+ if (!sharing) {
+ log.info("no sharing support on this grid")
+ render(view:"noInfo")
+ return
+ }
+
try {
def listing = sharingService.listCollectionsSharedByMe(irodsAccount);
if (listing.isEmpty()) {
@@ -140,32 +127,31 @@ class HomeController {
} else {
render(view:"shareQuickViewList",model:[listing:listing])
}
- } catch (SpecificQueryException sqe) {
- log.error("error in specific query", sqe)
- render(view:"noSupport")
- } catch (OperationNotSupportedByThisServerException sqe) {
- log.error("error in specific query", sqe)
- render(view:"noSupport")
- } catch (JargonException je) {
- log.error("jargon exception", je)
- response.sendError(500,je.message)
+ } catch (SpecificQueryException e) {
+ log.error "speific query exception", e
+ def message = message(code:"error.no.specific.query")
+ response.sendError(500,message)
+ } catch (OperationNotSupportedByThisServerException e) {
+ log.error "speific query exception", e
+ def message = message(code:"error.no.specific.query")
+ response.sendError(500,message)
}
}
-
+
/**
* Listing of collections shared by me with others
* @return
*/
def sharedCollectionsWithMe() {
log.info "sharedCollectionsByMe"
-
+
boolean sharing = sharingService.isSharingSupported(irodsAccount)
if (!sharing) {
log.info("no sharing support on this grid")
- render(view:"noSupport")
+ render(view:"noInfo")
return
}
-
+
try {
def listing = sharingService.listCollectionsSharedWithMe(irodsAccount)
if (listing.isEmpty()) {
@@ -173,18 +159,19 @@ class HomeController {
} else {
render(view:"shareWithMeQuickViewList",model:[listing:listing])
}
- } catch (SpecificQueryException sqe) {
- log.error("error in specific query", sqe)
- render(view:"noSupport")
- } catch (OperationNotSupportedByThisServerException sqe) {
- log.error("error in specific query", sqe)
- render(view:"noSupport")
- } catch (JargonException je) {
- log.error("jargon exception", je)
- response.sendError(500,je.message)
+ } catch (SpecificQueryException e) {
+ log.error "speific query exception", e
+ def message = message(code:"error.no.specific.query")
+ response.sendError(500,message)
+ } catch (OperationNotSupportedByThisServerException e) {
+ log.error "speific query exception", e
+ def message = message(code:"error.no.specific.query")
+ response.sendError(500,message)
}
+
+
}
-
+
// FIXME: refactor into jargon-core
private IRODSAccount anonymousIrodsAccountForURIString(String uriString) {
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
index 1b404b1..6cbe5e6 100755
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy
@@ -55,6 +55,7 @@ class LoginController {
loginCommand.host = presetHost
loginCommand.usePresets = true
} else {
+ loginCommand.host = "elder10.man.poznan.pl"
loginCommand.usePresets = false
}
@@ -66,6 +67,8 @@ class LoginController {
if (presetZone) {
loginCommand.zone = presetZone
+ } else {
+ loginCommand.zone = "testZone"
}
if (presetResource) {
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 100755
index 0000000..d9a2a6e
--- /dev/null
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy~
@@ -0,0 +1,309 @@
+package org.irods.mydrop.controller
+
+import org.irods.jargon.core.connection.IRODSAccount
+import org.irods.jargon.core.connection.auth.AuthResponse
+import org.irods.jargon.core.exception.JargonException
+import org.irods.jargon.core.pub.IRODSAccessObjectFactory
+import org.irods.jargon.core.pub.ResourceAO
+import org.irods.jargon.core.pub.UserAO
+import org.irods.mydrop.service.ViewStateService
+
+class LoginController {
+
+ IRODSAccessObjectFactory irodsAccessObjectFactory
+ IRODSAccount irodsAccount
+ ViewStateService viewStateService
+
+ def afterInterceptor = {
+ //log.debug("closing the session")
+ //irodsAccessObjectFactory.closeSession()
+ }
+
+
+ //static allowedMethods = [authenticate:'POST']
+
+ def beforeInterceptor = [action:this.&auth, except:[
+ 'login',
+ 'index',
+ 'authenticate'
+ ]]
+
+ def auth() {
+ if(!session["SPRING_SECURITY_CONTEXT"]) {
+ redirect(controller:"login", action:"login")
+ return false
+ }
+ irodsAccount = session["SPRING_SECURITY_CONTEXT"]
+ }
+
+ def login = {
+ log.info "in login"
+ //log.info "params:${request.parameterMap}"
+ log.info "params:${params}"
+ log.info("config is:${grailsApplication.config}")
+ def presetHost = grailsApplication.config.idrop.config.preset.host
+ def presetPort = grailsApplication.config.idrop.config.preset.port
+ def presetZone = grailsApplication.config.idrop.config.preset.zone
+ def presetResource = grailsApplication.config.idrop.config.preset.resource
+ def presetAuthScheme = grailsApplication.config.idrop.config.preset.authScheme
+
+ response.setHeader("apptimeout","apptimeout")
+
+ LoginCommand loginCommand = new LoginCommand()
+
+ if (presetHost) {
+ loginCommand.host = presetHost
+ loginCommand.usePresets = true
+ } else {
+ loginCommand.host = "elder10.man.poznan.pl"
+ loginCommand.usePresets = false
+ }
+
+ if (presetPort) {
+ loginCommand.port = Integer.parseInt(presetPort)
+ } else {
+ loginCommand.port = 1247
+ }
+
+ if (presetZone) {
+ loginCommand.zone = presetZone
+ } else {
+ login.Command.zone = "testZone"
+ }
+
+ if (presetResource) {
+ loginCommand.defaultStorageResource = presetResource
+ }
+
+ if (presetAuthScheme) {
+ log.info("preset auth scheme is:${presetAuthScheme}")
+ loginCommand.authMethod = presetAuthScheme
+ }
+
+ render(view:"login", model:[loginCommand:loginCommand])
+
+ }
+
+ def index ={ redirect(action: "login") }
+
+ def authenticate(LoginCommand loginCommand) {
+
+ log.info "cmd: ${loginCommand}"
+
+ /**
+ * If there is an error send back the view for redisplay with error messages
+ */
+ if (!loginCommand.validate()) {
+ log.info("errors in page, returning with error info:${loginCommand}")
+ flash.error = message(code:"error.data.error")
+ render(view:"login", model:[loginCommand:loginCommand])
+ return
+ }
+
+ log.info("edits pass")
+
+ def resource = loginCommand.defaultStorageResource ? loginCommand.defaultStorageResource : ""
+ def userName = loginCommand.user ? loginCommand.user : ""
+ def password = loginCommand.password ? loginCommand.password : ""
+
+ log.info("default storage resource: ${resource}")
+
+ boolean success = true
+ IRODSAccount irodsAccount
+
+ if (loginCommand.useGuestLogin) {
+
+ log.info("generate a guest login")
+ irodsAccount = IRODSAccount.instanceForAnonymous(loginCommand.host,
+ loginCommand.port,
+ "",
+ loginCommand.zone,
+ resource)
+
+ } else {
+
+ log.info("normal login mode")
+ if (userName == "") {
+ loginCommand.errors.reject("error.auth.invalid.user","Invalid user or password")
+ render(view:"login", model:[loginCommand:loginCommand])
+ return
+ }
+
+ if (password == "" ) {
+ loginCommand.errors.reject("error.auth.invalid.user","Invalid user or password")
+ render(view:"login", model:[loginCommand:loginCommand])
+ return
+ }
+
+ irodsAccount = IRODSAccount.instance(
+ loginCommand.host,
+ loginCommand.port,
+ userName,
+ password,
+ "",
+ loginCommand.zone,
+ resource)
+ }
+
+ log.info("login mode: ${loginCommand.authMethod}")
+
+ if (loginCommand.authMethod == "Standard") {
+ irodsAccount.authenticationScheme = IRODSAccount.AuthScheme.STANDARD
+ } else if (loginCommand.authMethod == "PAM") {
+ irodsAccount.authenticationScheme = IRODSAccount.AuthScheme.PAM
+ } else {
+ log.error("authentication scheme invalid", e)
+ response.sendError(500,e.message)
+ return
+ }
+
+ log.info("built irodsAccount:${irodsAccount}")
+ AuthResponse authResponse
+ try {
+ authResponse = irodsAccessObjectFactory.authenticateIRODSAccount(irodsAccount)
+ viewStateService.clearViewState()
+ } catch (JargonException e) {
+ log.error("unable to authenticate, JargonException", e)
+
+ if (e.getCause() == null) {
+ if (e.getMessage().indexOf("-826000") > -1) {
+ log.warn("invalid user/password")
+ loginCommand.errors.reject("error.auth.invalid.user","Invalid user or password")
+ success = false
+ } else {
+ log.error("authentication service exception", e)
+
+ loginCommand.errors.reject("error.auth.invalid.user","Unable to authenticate")
+ success = false
+ }
+ } else if (e.getCause() instanceof UnknownHostException) {
+ log.warn("cause is invalid host")
+ loginCommand.errors.reject("error.auth.invalid.host","Unknown host")
+ success = false
+ } else if (e.getCause().getMessage().indexOf("refused") > -1) {
+ log.error("cause is refused or invalid port")
+ loginCommand.errors.reject("error.auth.connection.refused","Connection refused")
+ success = false
+ } else {
+ log.error("authentication service exception", e)
+ response.sendError(500,e.message)
+ return
+ }
+ }
+
+ if (!success) {
+ log.warn("unsuccessful, render the login again")
+ render(view:"login", model:[loginCommand:loginCommand])
+ return
+ }
+ session["SPRING_SECURITY_CONTEXT"] = authResponse.authenticatedIRODSAccount
+ redirect(controller:"home")
+ }
+
+ def logout = {
+ session["SPRING_SECURITY_CONTEXT"] = null
+ session.invalidate()
+ redirect(action:"login")
+ }
+
+
+ /**
+ * FIXME: deprecated
+ * Show information about the current user/host
+ */
+ def showLoginBar = {
+ log.info("showLoginBar()")
+ ResourceAO resourceAO = irodsAccessObjectFactory.getResourceAO(irodsAccount)
+ List<String> resources = new ArrayList<String>()
+ resources.add("")
+ resources.addAll(resourceAO.listResourceAndResourceGroupNames())
+ render(view:"defaultStorageResource", model:[irodsAccount:irodsAccount, resources:resources])
+ }
+
+ /**
+ * Show a dialog to set the default storage resource
+ */
+ def defaultResource = {
+ log.info("showLoginBar()")
+ ResourceAO resourceAO = irodsAccessObjectFactory.getResourceAO(irodsAccount)
+ List<String> resources = new ArrayList<String>()
+ resources.add("")
+ resources.addAll(resourceAO.listResourceAndResourceGroupNames())
+ render(view:"defaultStorageResource", model:[irodsAccount:irodsAccount, resources:resources])
+ }
+
+ /**
+ * Show the password change dialog
+ * @return
+ */
+ def changePasswordForm() {
+ PasswordCommand cmd = new PasswordCommand()
+ render (view:"passwordChange", model:[irodsAccount:irodsAccount, password:cmd])
+ }
+
+ /**
+ * process a password change
+ * @return
+ */
+ def changePassword(PasswordCommand cmd) {
+ log.info "passwordChange()"
+ log.info "cmd: ${cmd}"
+
+ /**
+ * If there is an error send back the view for redisplay with error messages
+ */
+ if (!cmd.validate()) {
+ log.info("errors in page, returning with error info:${cmd}")
+ flash.error = message(code:"error.data.error")
+ render (view:"passwordChange", model:[irodsAccount:irodsAccount, password:cmd])
+ return
+ }
+
+ log.info("edits pass")
+
+ UserAO userAO = irodsAccessObjectFactory.getUserAO(irodsAccount)
+ userAO.changeAUserPasswordByThatUser(irodsAccount.userName, irodsAccount.password, cmd.password)
+ irodsAccount.password = cmd.password
+ log.info("password changed, fixed account in session")
+ flash.message = message(code:"message.password.updated")
+
+ render (view:"passwordChange", model:[irodsAccount:irodsAccount, password:cmd])
+
+ }
+
+
+}
+class LoginCommand {
+ boolean useGuestLogin
+ boolean usePresets
+ String user
+ String password
+ String host
+ String zone
+ int port
+ String defaultStorageResource
+ String authMethod
+
+ static constraints = {
+ host(blank:false)
+ zone(blank:false)
+ port( min:1, max:Integer.MAX_VALUE)
+ authMethod(blank:false)
+ }
+}
+
+class PasswordCommand {
+
+ String password
+ String confirmPassword
+
+ static constraints = {
+ password(blank:false)
+ confirmPassword validator: {
+ val, obj ->
+ if (!val) return ['error.confirm.password.missing']
+ if (val != obj.password) return['error.passwords.dont.match']
+ }
+ }
+ }
+
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/ProfileController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/ProfileController.groovy
index 0a750b5..39db3d9 100755
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/ProfileController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/ProfileController.groovy
@@ -2,6 +2,7 @@ package org.irods.mydrop.controller
import org.irods.jargon.core.connection.IRODSAccount
import org.irods.jargon.core.pub.IRODSAccessObjectFactory
+import org.irods.jargon.core.pub.UserAO
import org.irods.jargon.userprofile.UserProfile
import org.irods.mydrop.service.ProfileService
import org.jsoup.Jsoup
@@ -40,7 +41,7 @@ class ProfileController {
if (irodsAccount.userName == IRODSAccount.PUBLIC_USERNAME) {
render(view:"noProfileData")
} else {
-
+
try {
UserProfile userProfile = profileService.retrieveProfile(irodsAccount)
ProfileCommand profileCommand = new ProfileCommand()
@@ -58,53 +59,53 @@ class ProfileController {
profileCommand.postOfficeBox = Jsoup.clean(userProfile.userProfilePublicFields.postOfficeBox,Whitelist.basic())
profileCommand.telephoneNumber = Jsoup.clean(userProfile.userProfilePublicFields.telephoneNumber,Whitelist.basic())
profileCommand.title = Jsoup.clean(userProfile.userProfilePublicFields.title,Whitelist.basic())
-
+
render(view:"index", model:[userProfile:profileCommand])
} catch (Exception e) {
- log.error("eception retrieving or creating user profile", e)
response.sendError(500,e.message)
}
}
+
}
-
+
/**
* Update the profile
* @return
*/
def updateProfile(ProfileCommand profileCommand) {
-
+
log.info("updateProfile")
log.info "profileCommand: ${profileCommand}"
-
- /**
- * If there is an error send back the view for redisplay with error messages
- */
- if (!profileCommand.validate()) {
- log.info("errors in page, returning with error info")
- flash.error = message(code:"error.data.error")
- render(view:"index", model:[userProfile:profileCommand])
- return
- }
-
- log.info("edits pass")
-
+
+ /**
+ * If there is an error send back the view for redisplay with error messages
+ */
+ if (!profileCommand.validate()) {
+ log.info("errors in page, returning with error info")
+ flash.error = message(code:"error.data.error")
+ render(view:"index", model:[userProfile:profileCommand])
+ return
+ }
+
+ log.info("edits pass")
+
/*
* Massage the params into the user profile
*/
-
+
UserProfile userProfile
try {
- userProfile = profileService.retrieveProfile(irodsAccount)
+ userProfile = profileService.retrieveProfile(irodsAccount)
} catch (Exception e) {
log.error("error retrieving user profile", e)
flash.error = e.message
render(view:"index", model:[userProfile:profileCommand])
return
}
-
+
userProfile.userName = irodsAccount.userName
userProfile.userProfilePublicFields.nickName = Jsoup.clean(profileCommand.nickName,Whitelist.basic())
userProfile.userProfilePublicFields.description = Jsoup.clean(profileCommand.description,Whitelist.basic())
@@ -120,7 +121,7 @@ class ProfileController {
userProfile.userProfilePublicFields.postOfficeBox = Jsoup.clean(profileCommand.postOfficeBox,Whitelist.basic())
userProfile.userProfilePublicFields.telephoneNumber = Jsoup.clean(profileCommand.telephoneNumber,Whitelist.basic())
userProfile.userProfilePublicFields.title = Jsoup.clean(profileCommand.title,Whitelist.basic())
-
+
log.info "updating profile...."
try {
profileService.updateProfile(irodsAccount, userProfile)
@@ -130,12 +131,15 @@ class ProfileController {
render(view:"index", model:[userProfile:profileCommand])
return
}
-
+
log.info "updated"
flash.message = message(code:"message.update.successful")
-
+
redirect(view:"index", model:[userProfile:profileCommand])
+
}
+
+
}
class ProfileCommand {
@@ -153,7 +157,7 @@ class ProfileCommand {
String postOfficeBox
String telephoneNumber
String title
-
+
static constraints = {
nickName(null:false)
givenName( null:false)
@@ -165,7 +169,7 @@ class ProfileCommand {
labeledURL(null:false)
postalAddress(null:false)
postalCode(null:false)
- postOfficeBox(null:false)
+ postOfficeBox(null:false)
telephoneNumber(null:false)
title(null:false)
}
diff --git a/idrop-web/grails-app/i18n/messages.properties b/idrop-web/grails-app/i18n/messages.properties
index 6d60c26..ee447a1 100755
--- a/idrop-web/grails-app/i18n/messages.properties
+++ b/idrop-web/grails-app/i18n/messages.properties
@@ -131,7 +131,6 @@ text.type=Type
text.tools=Tools
text.unit=Unit
text.update=Update
-text.update.tags=Update Tags
text.updated=Updated
text.upload=Upload
text.upload.and.download=Upload and Download
@@ -179,7 +178,6 @@ browse.page.prompt=Select a directory or file to see info and actions
# messages
error.confirm.password.missing=Confirmation password is null or blank
error.nothing.selected=Nothing was selected for the action
-error.no.access.permission=No access permission
error.no.action=No action found
error.no.audit.access=This user does not have permission to view audit data
error.no.data.found=No data found
@@ -217,21 +215,15 @@ error.some.error.occurred=An error occurred processing your request, please info
message.update.successful=Update successful
message.no.resource=A default resource needs to be selected from the combo box in the upper right-hand corner. Select a resource and try your request again
message.error.in.upload=An error occurred in uploading this file. If the problem persists, contact the service administrator
-message.login=Please enter your credentials to log into iRODS
message.password.updated=The password was successfully updated
message.resource.updated=Default storage resource updated successfully
message.update.successful=Update successful
message.no.access=You do not have access rights to perform that operation
message.no.starred=No starred files or folders to display
message.cannot.create.profile=A profile cannot be created for this user, this may be a mis-configuration
-message.no.files.to.display=Nothing to display! Star or Share files or folders to see them on your home page
-message.no.support.specific.query=Nothing to display! Sharing and starring support need to be added to this iRODS grid
-
+message.no.files.to.display=No files to display
message.share.delete.successful=Delete of share successful, note that permissions still remain as defined before
message.update.share.successful=Update of share successful
-message.zone.unavailable=Zone is unavailable, it may be down
-
-
# validation errors
org.irods.mydrop.controller.AddMetadataCommand.attribute.blank.error.attribute=Attribute must be entered
org.irods.mydrop.controller.AddMetadataCommand.value.blank.error.value=Value must be entered
diff --git a/idrop-web/grails-app/views/browse/_browseTabContent.gsp b/idrop-web/grails-app/views/browse/_browseTabContent.gsp
index e184204..2d27b70 100755
--- a/idrop-web/grails-app/views/browse/_browseTabContent.gsp
+++ b/idrop-web/grails-app/views/browse/_browseTabContent.gsp
@@ -1,87 +1,60 @@
-
-<div id="browseDialogArea">
- <!-- general area to spawn jquery dialogs -->
-</div>
-<div id="browseToolbar"
- style="display: block; width: 100%; position: relative;">
-
- <div id="infoDivPathArea"
- style="overflow: hidden; display: block; margin: 3px; font-size: 120%; position: relative;">
- <!-- area for the path crumb-trails -->
- </div>
-
-</div>
-<!-- browseToolbar -->
-<div id="browseMenuDiv"
- style="display: block; width: 100%; position: relative;">
- <g:render template="/common/topToolbar" />
-</div>
-
-<div id="browseDialogArea">
- <!-- general area to spawn jquery dialogs -->
-</div>
-
-<div id="browser" class="wrapper"
- style="height: 85%; width: 100%; clear: both; overflow: hidden;">
- <div id="dataTreeView"
- style="width: 100%; height: 700px; overflow: hidden;">
-
- <div id="dataTreeDivWrapper" class="ui-layout-west"
- style="width: 25%; height: 100%; overflow: hidden;">
- <div id="dataTreeToolbar"
- style="width: 100%; height: 4%; display: block; margin: 5px;"
- class="fg-toolbar">
-
-
- <div id="dataTreeMenu">
- <button type="button" id="refreshTreeButton"
- value="refreshTreeButton" onclick="refreshTree()")>
- <i class="icon-refresh"></i>
- </button>
-
- <g:if test="${!irodsAccount.anonymousAccount}">
-
- <button type="button" id="homeTreeButton"
- onclick="setTreeToUserHome()")>
- <i class="icon-home"></i>
- </button>
- <button type="button" id="rootTreeButton" value="rootTreeButton"
- onclick="setTreeToRoot()")>
- <i class="icon-arrow-up"></i>
- </button>
-
- </g:if>
-
- </div>
- <!-- dataTreeMenu -->
-
- </div>
- <!-- dataTreeToolbar -->
-
- <div id="dataTreeDiv" class="clearfix"
- style="height: 95%; width: 100%; overflow: auto;">
- <!-- no empty div -->
- </div>
- </div>
- <!-- dataTreeDivWrapper -->
-
- <div id="infoDivOuter"
- style="display: block; width: 75%; height: 100%; position: relative; overflow: auto;"
- class="ui-layout-center">
-
- <div id="infoDiv" class="">
- <h2>
- <g:message code="browse.page.prompt" />
- </h2>
- </div>
- <!-- infoDiv -->
-
+ <div id="browseDialogArea"><!-- general area to spawn jquery dialogs --></div>
+ <div id="browseToolbar" style="display:block; width:100%;position:relative;">
+
+ <div id="infoDivPathArea"
+ style="overflow: hidden; display:block; margin: 3px; font-size: 120%;position:relative;">
+ <!-- area for the path crumb-trails -->
</div>
- <!-- infoDivOuter -->
- </div>
- <!-- data tree view -->
-</div>
-<!-- browser -->
-<script>
+
+ </div> <!-- browseToolbar -->
+ <div id="browseMenuDiv" style="display:block; width:100%;position:relative;">
+ <g:render template="/common/topToolbar" />
+ </div>
+
+ <div id="browseDialogArea"><!-- general area to spawn jquery dialogs --></div>
+
-</script>
+
+ <div id="browser" class="wrapper" style="height:85%;width:100%;clear:both;overflow:hidden;">
+ <div id="dataTreeView" style="width: 100%; height: 700px; overflow: hidden;">
+
+ <div id="dataTreeDivWrapper" class="ui-layout-west" style="width: 25%; height: 100%; overflow:hidden;">
+ <div id="dataTreeToolbar" style="width:100%; height:4%;display:block; margin:5px;" class="fg-toolbar">
+
+
+ <div id="dataTreeMenu">
+ <button type="button" id="refreshTreeButton"
+ value="refreshTreeButton"
+ onclick="refreshTree()")>
+ <img class="icon-refresh"/>
+ </button>
+ <button type="button" id="homeTreeButton"
+
+ onclick="setTreeToUserHome()")>
+ <img class="icon-home"/>
+ </button>
+ <button type="button" id="rootTreeButton"
+ value="rootTreeButton"
+ onclick="setTreeToRoot()")>
+ <img class="icon-arrow-up"/>
+ </button>
+ </div> <!-- dataTreeMenu -->
+
+ </div> <!-- dataTreeToolbar -->
+
+ <div id="dataTreeDiv" class="clearfix" style="height:95%; width:100%; overflow:auto;"><!-- no empty div --></div>
+ </div> <!-- dataTreeDivWrapper -->
+
+ <div id="infoDivOuter" style="display: block; width: 75%; height: 100%; position: relative; overflow: auto;"
+ class="ui-layout-center">
+
+ <div id="infoDiv" style=""><h2><g:message code="browse.page.prompt" /></h2>
+ </div> <!-- infoDiv -->
+
+ </div> <!-- infoDivOuter -->
+ </div> <!-- data tree view -->
+ </div> <!-- browser -->
+ <script>
+
+
+ </script>
diff --git a/idrop-web/grails-app/views/browse/_collectionInfoToolbar.gsp b/idrop-web/grails-app/views/browse/_collectionInfoToolbar.gsp
index 7e37fc0..4c1eb28 100755
--- a/idrop-web/grails-app/views/browse/_collectionInfoToolbar.gsp
+++ b/idrop-web/grails-app/views/browse/_collectionInfoToolbar.gsp
@@ -3,36 +3,36 @@
<div id="collectionInfoToolbarMenu" class="btn-toolbar">
<div id="collectionInfoButtonGroup1" class="btn-group">
- <button id="setCollectionAsRoot" onclick="cibSetCollectionAsRoot()"><i class="icon-hand-left"></i><g:message
+ <button id="setCollectionAsRoot" onclick="cibSetCollectionAsRoot()"><img class="icon-hand-left"/><g:message
code="text.set.as.root" /></button>
<g:if test="${irodsStarredFileOrCollection}">
- <button id="unstarCollection" onclick="cibUnstarCollection()"><i class="icon-star"></i><g:message
+ <button id="unstarCollection" onclick="cibUnstarCollection()"><img class="icon-star"/><g:message
code="text.unstar" /></button>
</g:if>
<g:else>
- <button id="starCollection" onclick="cibStarCollection()"><i class="icon-star-empty"></i><g:message
+ <button id="starCollection" onclick="cibStarCollection()"><img class="icon-star-empty"/><g:message
code="text.star" /></button>
</g:else>
</div>
<div id="collectionInfoButtonGroup2" class="btn-group">
- <button id="addCollectionToCart" onclick="addToCartViaToolbar()"><i class="icon-shopping-cart"></i><g:message
+ <button id="addCollectionToCart" onclick="addToCartViaToolbar()"><img class="icon-shopping-cart"/><g:message
code="text.add.to.cart" /></button>
- <button id="uploadViaBrowser" onclick="cibUploadViaBrowser()"><i class="icon-upload"></i><g:message
+ <button id="uploadViaBrowser" onclick="cibUploadViaBrowser()"><img class="icon-upload"/><g:message
code="text.upload" /></button>
- <button id="bulkUploadViaBrowser" onclick="cibBulkUploadViaBrowser()"><i class="icon-upload"></i><g:message
+ <button id="bulkUploadViaBrowser" onclick="cibBulkUploadViaBrowser()"><img class="icon-upload"/><g:message
code="text.bulk.upload" /></button>
</div>
<div id="collectionInfoButtonGroup3" class="btn-group">
- <button id="newCollection" onclick="cibNewFolder()"><i class="icon-plus-sign"></i><g:message
+ <button id="newCollection" onclick="cibNewFolder()"><img class="icon-plus-sign"/><g:message
code="text.new.folder" /></button>
- <button id="renameCollection" onclick="cibRenameCollection()"><i class="icon-pencil"></i><g:message
+ <button id="renameCollection" onclick="cibRenameCollection()"><img class="icon-pencil"/><g:message
code="text.rename" /></button>
- <button id="deleteCollection" onclick="cibDeleteCollection()"><i class="icon-trash"></i><g:message
+ <button id="deleteCollection" onclick="cibDeleteCollection()"><img class="icon-trash"/><g:message
code="text.delete" /></button>
</div>
</div>
diff --git a/idrop-web/grails-app/views/browse/_dataObjectInfoToolbar.gsp b/idrop-web/grails-app/views/browse/_dataObjectInfoToolbar.gsp
index 10b1654..20b7923 100755
--- a/idrop-web/grails-app/views/browse/_dataObjectInfoToolbar.gsp
+++ b/idrop-web/grails-app/views/browse/_dataObjectInfoToolbar.gsp
@@ -4,22 +4,22 @@
<div id="dataObjectInfoButtonGroup1" class="btn-group">
<g:if test="${irodsStarredFileOrCollection}">
- <button id="unstarDataObject" onclick="dibUnstarFile()"><i class="icon-star"></i><g:message
+ <button id="unstarDataObject" onclick="dibUnstarFile()"><img class="icon-star"/><g:message
code="text.unstar" /></button>
</g:if>
<g:else>
- <button id="starDataobject" onclick="dibStarFile()"><i class="icon-star-empty"></i><g:message
+ <button id="starDataobject" onclick="dibStarFile()"><img class="icon-star-empty"/><g:message
code="text.star.file" /></button>
</g:else>
- <button id="downloadFile" onclick="dibDownloadFile()"><i class="icon-download"></i><g:message
+ <button id="downloadFile" onclick="dibDownloadFile()"><img class="icon-download"/><g:message
code="text.download" /></button>
- <button id="addToCart" onclick="addToCartViaToolbar()"><i class="icon-shopping-cart"></i><g:message
+ <button id="addToCart" onclick="addToCartViaToolbar()"><img class="icon-shopping-cart"/><g:message
code="text.add.to.cart" /></button>
</div>
<div id="dataObjectInfoButtonGroup2" class="btn-group">
- <button id="renameDataObject" onclick="dibRenameFile()"><i class="icon-pencil"></i><g:message
+ <button id="renameDataObject" onclick="dibRenameFile()"><img class="icon-pencil"/><g:message
code="text.rename" /></button>
- <button id="deleteDataObject" onclick="dibDeleteFile()"><i class="icon-trash"></i><g:message
+ <button id="deleteDataObject" onclick="dibDeleteFile()"><img class="icon-trash"/><g:message
code="text.delete" /></button>
</div>
</div>
diff --git a/idrop-web/grails-app/views/browse/browseDetails.gsp b/idrop-web/grails-app/views/browse/browseDetails.gsp
index 87d21cc..24a7a1e 100755
--- a/idrop-web/grails-app/views/browse/browseDetails.gsp
+++ b/idrop-web/grails-app/views/browse/browseDetails.gsp
@@ -1,166 +1,149 @@
<div id="browseDetailsMessageArea"></div>
<div id=browseDetailsDialogArea" style-"height:0px;></div>
<g:hiddenField id="browseDetailsAbsPath" name="absolutePath"
- value="${parent.collectionName}" />
-
-<div style="overflow: visible; position: relative;">
- <div id="idropLiteArea">
- <!-- area to show idrop lite applet -->
- </div>
- <div id="toggleHtmlArea">
- <div id="infoDialogArea">
- <!-- no empty divs -->
- </div>
- <!-- render the paging controls if needed -->
- <g:if test="${pagingActions.paging}">
- <g:render template="/browse/browseDetailsToolbar" />
- </g:if>
-
- <div id="detailsTopSection">
- <form id="browseDetailsForm" name="browseDetailsForm">
- <table class="table table-striped table-hover" cellspacing="0"
- cellpadding="0" border="0" id="browseDataDetailsTable">
- <thead>
- <tr>
- <th></th>
- <th>
-
- <div class="btn-group">
- <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Action<span
- class="caret"></span></a>
- <ul class="dropdown-menu">
- <li id="menuAddToCartDetails"><a
- href="#addAllToCartDetails" onclick="addSelectedToCart()"><g:message
- code="text.add.all.to.cart" /></a></li>
- <li id="menuDeleteDetails"><a href="#deleteAllDetails"
- onclick="deleteSelected()"><g:message
- code="text.delete.all" /></a></li>
- <!-- dropdown menu links -->
- </ul>
- </div>
-
- </th>
- <th><g:message code="text.name" /></th>
- <th><g:message code="text.type" /></th>
- <th><g:message code="text.modified" /></th>
- <th><g:message code="text.length" /></th>
- </tr>
- </thead>
- <tbody>
- <g:each in="${collection}" var="entry">
- <tr id="${entry.formattedAbsolutePath}" class="draggableFile">
-
- <td><span
- class="ui-icon-circle-plus browse_detail_icon ui-icon"></span>
- </td>
- <td><g:checkBox name="selectDetail"
- value="${entry.formattedAbsolutePath}" checked="false" /> <g:if
- test="${entry.objectType.toString() == 'COLLECTION'}">
- <i class="icon-info-sign"
- onclick="infoHere('${entry.formattedAbsolutePath}')" ></i>
- </g:if> <g:else>
- <i class="icon-info-sign"
- onclick="infoHere('${entry.formattedAbsolutePath}')" ></i>
- </g:else></td>
- <td><g:if
- test="${entry.objectType.toString() == 'COLLECTION'}">
- <a href="#" id="${entry.formattedAbsolutePath}"
- onclick="clickOnPathInBrowseDetails(this.id)">
- ${entry.nodeLabelDisplayValue}
- </a>
-
- </g:if> <g:else>
- ${entry.nodeLabelDisplayValue}
-
-
- <i class="icon-download"
- onclick="downloadViaToolbarGivenPath('${entry.formattedAbsolutePath}')" ></i>
-
- </g:else></td>
- <td>
- ${entry.objectType}
- </td>
- <td>
- ${entry.modifiedAt}
- </td>
- <td>
- ${entry.displayDataSize}
- </td>
- </tr>
- </g:each>
-
- </tbody>
-
- <tfoot>
- <tr>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- </tfoot>
- </table>
- </form>
- </div>
- </div>
+ value="${parent.collectionName}" />
+
+<div style="overflow:visible; position:relative;">
+ <div id="idropLiteArea">
+ <!-- area to show idrop lite applet -->
+ </div>
+ <div id="toggleHtmlArea">
+ <div id="infoDialogArea">
+ <!-- no empty divs -->
+ </div>
+ <!-- render the paging controls if needed -->
+ <g:if test="${pagingActions.paging}">
+ <g:render template="/browse/browseDetailsToolbar" />
+ </g:if>
+
+ <div id="detailsTopSection" >
+ <form id="browseDetailsForm" name="browseDetailsForm">
+ <table class="table table-striped table-hover" cellspacing="0" cellpadding="0" border="0"
+ id="browseDataDetailsTable">
+ <thead>
+ <tr>
+ <th></th>
+ <th>
+
+ <div class="btn-group">
+ <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Action<span class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li id="menuAddToCartDetails"><a href="#addAllToCartDetails" onclick="addSelectedToCart()"><g:message code="text.add.all.to.cart" /></a></li>
+ <li id="menuDeleteDetails"><a href="#deleteAllDetails" onclick="deleteSelected()"><g:message code="text.delete.all" /></a></li>
+ <!-- dropdown menu links -->
+ </ul>
+ </div>
+
+ </th>
+ <th><g:message code="text.name" /></th>
+ <th><g:message code="text.type" /></th>
+ <th><g:message code="text.modified" /></th>
+ <th><g:message code="text.length" /></th>
+ </tr>
+ </thead>
+ <tbody>
+ <g:each in="${collection}" var="entry">
+ <tr id="${entry.formattedAbsolutePath}" class="draggableFile">
+
+ <td><span
+ class="ui-icon-circle-plus browse_detail_icon ui-icon"></span>
+ </td>
+ <td><g:checkBox name="selectDetail"
+ value="${entry.formattedAbsolutePath}" checked="false" />
+ <g:if test="${entry.objectType.toString() == 'COLLECTION'}"><img class="icon-info-sign" onclick="infoHere('${entry.formattedAbsolutePath}')"/></g:if> <g:else><img class="icon-info-sign" onclick="infoHere('${entry.formattedAbsolutePath}')"/></g:else>
+ </td>
+ <td><g:if
+ test="${entry.objectType.toString() == 'COLLECTION'}">
+ <a href="#" id="${entry.formattedAbsolutePath}" onclick="clickOnPathInBrowseDetails(this.id)">${entry.nodeLabelDisplayValue}</a>
+
+ </g:if> <g:else>
+ ${entry.nodeLabelDisplayValue}
+
+ <!-- <g:link url="${'file/download' + entry.formattedAbsolutePath}">
+${entry.nodeLabelDisplayValue} -->
+ </g:link>
+ </g:else></td>
+ <td>
+${entry.objectType}
+ </td>
+ <td>
+${entry.modifiedAt}
+ </td>
+ <td>
+${entry.displayDataSize}
+ </td>
+ </tr>
+ </g:each>
+
+ </tbody>
+
+ <tfoot>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ </tfoot>
+ </table>
+ </form>
+ </div>
+ </div>
</div>
<script>
- var dataTable;
- tableParams = {
- "bJQueryUI" : true,
- "bLengthChange" : false,
- "bFilter" : false,
- "iDisplayLength" : 500,
- "sDom" : "<'row'<'span10'l><'span8'f>r>t<'row'<'span10'i><'span10'p>>",
- "aoColumns" : [ {
- 'sWidth' : '20px',
- 'bSortable' : false
- }, {
- 'sWidth' : '20px',
- 'bSortable' : false
- }, {
- 'sWidth' : '120px'
- }, {
- 'sWidth' : '30px'
- }, {
- 'sWidth' : '40px'
- }, {
- 'sWidth' : '40px'
- }
+ var dataTable;
+
+ tableParams = {"bJQueryUI" : true,
+ "bLengthChange": false,
+ "bFilter": false,
+ "iDisplayLength" : 500,
+ "sDom": "<'row'<'span10'l><'span8'f>r>t<'row'<'span10'i><'span10'p>>",
+ "aoColumns" : [
+ {'sWidth': '20px', 'bSortable':false},
+ {'sWidth': '20px', 'bSortable':false},
+ { 'sWidth': '120px' },
+ { 'sWidth': '30px' },
+ { 'sWidth': '40px' },
+ { 'sWidth': '40px' }
+
+ ],
+
+ "fnInitComplete": function() {
+ this.fnAdjustColumnSizing(true);
+ }
+
+ }
+
+ $(function() {
+ //alert("building table ");
+ dataTable = lcBuildTableInPlace("#browseDataDetailsTable", browseDetailsClick, ".browse_detail_icon", tableParams);
+ $("#infoDiv").resize();
+ $.extend( $.fn.dataTableExt.oStdClasses, {
+ "sSortAsc": "header headerSortDown",
+ "sSortDesc": "header headerSortUp",
+ "sSortable": "header"
+ } );
+ });
+
+ function showLegend() {
+ $("#legend").show("slow");
+ }
+
+ function hideLegend() {
+ $("#legend").hide("slow");
+ }
- ],
-
- "fnInitComplete" : function() {
- this.fnAdjustColumnSizing(true);
- }
-
- }
-
- $(function() {
- //alert("building table ");
- dataTable = lcBuildTableInPlace("#browseDataDetailsTable",
- browseDetailsClick, ".browse_detail_icon", tableParams);
- $("#infoDiv").resize();
- $.extend($.fn.dataTableExt.oStdClasses, {
- "sSortAsc" : "header headerSortDown",
- "sSortDesc" : "header headerSortUp",
- "sSortable" : "header"
- });
- });
-
- function showLegend() {
- $("#legend").show("slow");
- }
-
- function hideLegend() {
- $("#legend").hide("slow");
- }
function infoHere(path) {
setDefaultView("info");
selectTreePathFromIrodsPath(path);
}
+
+
+
+
+
</script> \ No newline at end of file
diff --git a/idrop-web/grails-app/views/browse/collectionInfo.gsp b/idrop-web/grails-app/views/browse/collectionInfo.gsp
index cf4b20d..6308786 100755
--- a/idrop-web/grails-app/views/browse/collectionInfo.gsp
+++ b/idrop-web/grails-app/views/browse/collectionInfo.gsp
@@ -1,215 +1,156 @@
<g:hiddenField id="infoAbsPath" name="absolutePath"
value="${collection.collectionName}" />
<div id="infoMessageArea">
- <!-- -->
-</div>
+ <!-- -->
+ </div>
<div id="idropLiteArea">
- <!-- area to show idrop lite applet -->
+ <!-- area to show idrop lite applet -->
</div>
-<div id="toggleHtmlArea" style="width: 100%;">
+<div id="toggleHtmlArea">
<g:render template="/browse/collectionInfoToolbar" />
- <div id="infoDialogArea">
- <!-- no empty divs -->
- </div>
- <!-- display area lays out info in a main and side column -->
+ <div id="infoDialogArea"><!-- no empty divs --></div>
+
+ <!-- display area lays out info in a main and side column -->
+ <div id="infoDisplayLayout" style="width:100%;height:100%;">
+
<div class="well">
- <image style="float:left;margin-right:10px;"
- src="<g:resource dir="images" file="folder.png" alt="folder icon" />" />
- <h3>
- ${collection.collectionName}
- </h3>
- </div>
-
-
- <ul class="nav nav-tabs" id="infoTabs">
- <li class="active"><a href="#info" id="infoTab"><g:message
- code="text.info" /></a></li>
- <li><a href="#metadata" id="metadataTab"><g:message
- code="text.metadata" /></a></li>
- <li><a href="#permissions" id="permissionTab"><g:message
- code="text.sharing" /></a></li>
- <g:if
- test="${grailsApplication.config.idrop.config.use.tickets==true}">
- <li><a href="#tickets" id="ticketTab"><g:message
- code="text.tickets" /></a></li>
- </g:if>
- <li><a href="#audit" id="auditTab"><g:message
- code="text.audit" /></a></li>
- </ul>
-
- <div class="tab-content" style="width: 100%;">
- <div class="tab-pane active" id="info">
+ <image style="float:left;margin-right:10px;" src="<g:resource dir="images" file="folder.png" alt="folder icon" />"/>
+ <h3>${collection.collectionName}</h3>
+ </div>
+</div>
- <div class="container">
- <div class="row">
- <div class="span12">
- <h4>
- <g:message code="text.info" />
- </h4>
- </div>
- </div>
- <div class="row alert alert-info">
- <div class="span12">
- <g:message code="heading.info" />
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.created" />:</strong>
- </div>
- <div class="span10">
- ${collection.createdAt}
- </div>
+<ul class="nav nav-tabs" id="infoTabs">
+ <li class="active"><a href="#info" id="infoTab"><g:message code="text.info" /></a></li>
+ <li><a href="#metadata" id="metadataTab"><g:message code="text.metadata" /></a></li>
+ <li><a href="#permissions" id="permissionTab"><g:message code="text.sharing" /></a></li>
+ <g:if test="${grailsApplication.config.idrop.config.use.tickets==true}">
+ <li><a href="#tickets" id="ticketTab"><g:message code="text.tickets" /></a></li>
+ </g:if>
+ <li><a href="#audit" id="auditTab"><g:message code="text.audit" /></a></li>
+</ul>
+
+<div class="tab-content">
+ <div class="tab-pane active" id="info">
+
+ <h4><g:message code="text.info" /></h4>
+ <div class="alert alert-info">
+ <g:message code="heading.info" />
+ </div>
+
+ <div id="container" style="height:100%;width:100%;">
+ <div>
+ <div style="width:15%;"><label><g:message code="text.created" />:</label></div>
+ <div>${collection.createdAt}</div>
</div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.updated" />:</strong>
- </div>
- <div class="span10">
- ${collection.modifiedAt}
- </div>
+ <div>
+ <div><label><g:message code="text.updated" />:</label></div>
+ <div>${collection.modifiedAt}</div>
</div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.owner" />:</strong>
- </div>
- <div class="span10">
- ${collection.collectionOwnerName}
- </div>
+ <div>
+ <div><label><g:message code="text.owner" />:</label></div>
+ <div>${collection.collectionOwnerName}</div>
</div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.owner.zone" />:</strong>
- </div>
- <div class="span10">
- ${collection.collectionOwnerZone}
- </div>
+ <div>
+ <div><label><g:message code="text.owner.zone" />:</label></div>
+ <div>${collection.collectionOwnerZone}</div>
</div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.type" />:</strong>
- </div>
- <div class="span10">
- ${collection.specColType}
- </div>
+ <div>
+ <div><label><g:message code="text.type" />:</label></div>
+ <div>${collection.specColType}</div>
</div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.object.path" />:</strong>
- </div>
- <div class="span10">
- ${collection.objectPath}
- </div>
+ <div>
+ <div><label><g:message code="text.object.path" />:</label></div>
+ <div>${collection.objectPath}</div>
</div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.description" />:</strong>
- </div>
- <div class="span10">
- ${collection.comments}
- </div>
+ <div>
+ <div><label><g:message code="text.description" />:</label></div>
+ <div>${collection.comments}</div>
</div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.info" />1:</strong>
- </div>
- <div class="span10">
- ${collection.info1}
- </div>
+ <div>
+ <div><label><g:message code="text.info" />1:</label></div>
+ <div>${collection.info1}</div>
</div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.info" />2:</strong>
- </div>
- <div class="span10">
- ${collection.info2}
- </div>
+ <div>
+ <div><label><g:message code="text.info" />2:</label></div>
+ <div>${collection.info2}</div>
</div>
-
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.tags" />:</strong>
- </div>
- <div class="span10">
- <g:textField id="infoTags" name="tags"
- value="${tags.spaceDelimitedTagsForDomain}" />
- </div>
+
+ </div>
+ <div id="container" style="height:100%;width:100%;">
+ <div>
+ <div><label><g:message code="text.tags" />:</label></div>
+ <div><g:textField id="infoTags" name="tags"
+ value="${tags.spaceDelimitedTagsForDomain}" /></div>
</div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.comment" />:</strong>
- </div>
- <div class="span10">
- <g:textArea id="infoComment" name="comment" rows="5" cols="80"
- value="${comment}" />
- </div>
+ <div>
+ <div><label><g:message code="text.comment" />:</label></div>
+ <div><g:textArea id="infoComment" name="comment" rows="5" cols="80"
+ value="${comment}" /></div>
</div>
- <div class="row">
- <div class="span2"></div>
- <div class="span10">
- <button type="button" id="updateTags" value="updateTags"
- onclick="updateTags()"><g:message code="text.update.tags" /></button>
- </div>
+ <div>
+ <div></div>
+ <div><button type="button" id="updateTags" value="updateTags" onclick="updateTags()">Update Tags</button></div>
</div>
</div>
-
- </div>
- <div class="tab-pane" id="metadata">
- <div id="infoAccordionMetadataInner"></div>
- </div>
- <div class="tab-pane" id="permissions">
- <div id="infoAccordionACLInner"></div>
- </div>
- <g:if
- test="${grailsApplication.config.idrop.config.use.tickets==true}">
- <div class="tab-pane" id="tickets">
- <div id="infoAccordionTicketsInner"></div>
- </div>
- </g:if>
- <div class="tab-pane" id="audit">
- <div id="infoAccordionAuditInner"></div>
+
+ </div>
+ <div class="tab-pane" id="metadata">
+ <div id="infoAccordionMetadataInner"></div>
+ </div>
+ <div class="tab-pane" id="permissions">
+ <div id="infoAccordionACLInner"></div>
+ </div>
+ <g:if test="${grailsApplication.config.idrop.config.use.tickets==true}">
+ <div class="tab-pane" id="tickets">
+ <div id="infoAccordionTicketsInner">
+ </div>
</div>
- </div>
-
+ </g:if>
+ <div class="tab-pane" id="audit">
+ <div id="infoAccordionAuditInner"></div>
+ </div>
</div>
-<!-- toggle html area -->
-
-
-<script>
- $(function() {
-
- $(".idropLiteBulkUpload").show();
- $("#menuDownload").hide();
- $("#menuUpload").show();
- $("#menuBulkUpload").show();
-
- $('#infoTabs a').click(function(e) {
- e.preventDefault();
- $(this).tab('show');
- });
-
- $('#infoTab').on('shown', function(e) {
- //e.target // activated tab
- //e.relatedTarget // previous tab
- showMetadataView(selectedPath, "#infoAccordionMetadataInner");
- });
-
- $('#metadataTab').on('shown', function(e) {
- showMetadataView(selectedPath, "#infoAccordionMetadataInner");
- });
-
- $('#permissionTab').on('shown', function(e) {
- showSharingView(selectedPath, "#infoAccordionACLInner");
- });
-
- $('#ticketTab').on('shown', function(e) {
- showTicketView(selectedPath, "#infoAccordionTicketsInner");
- });
-
- $('#auditTab').on('shown', function(e) {
- showAuditView(selectedPath, "#infoAccordionAuditInner");
- });
- });
-</script>
+</div><!-- toggle html area -->
+
+
+ <script>
+ $(function() {
+
+ $(".idropLiteBulkUpload").show();
+ $("#menuDownload").hide();
+ $("#menuUpload").show();
+ $("#menuBulkUpload").show();
+
+
+ $('#infoTabs a').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+ });
+
+ $('#infoTab').on('shown', function (e) {
+ //e.target // activated tab
+ //e.relatedTarget // previous tab
+ showMetadataView(selectedPath, "#infoAccordionMetadataInner");
+ });
+
+ $('#metadataTab').on('shown', function (e) {
+ showMetadataView(selectedPath, "#infoAccordionMetadataInner");
+ });
+
+ $('#permissionTab').on('shown', function (e) {
+ showSharingView(selectedPath, "#infoAccordionACLInner");
+ });
+
+ $('#ticketTab').on('shown', function (e) {
+ showTicketView(selectedPath, "#infoAccordionTicketsInner");
+ });
+
+ $('#auditTab').on('shown', function (e) {
+ showAuditView(selectedPath, "#infoAccordionAuditInner");
+ });
+
+ });
+
+ </script>
diff --git a/idrop-web/grails-app/views/browse/dataObjectInfo.gsp b/idrop-web/grails-app/views/browse/dataObjectInfo.gsp
index e37c7c7..d562d2a 100644
--- a/idrop-web/grails-app/views/browse/dataObjectInfo.gsp
+++ b/idrop-web/grails-app/views/browse/dataObjectInfo.gsp
@@ -10,335 +10,229 @@
<div id="toggleHtmlArea">
<div id="displayArea">
<g:render template="/browse/dataObjectInfoToolbar" />
- <div id="infoDialogArea">
- <!-- no empty divs -->
+ <div id="infoDialogArea"><!-- no empty divs --></div>
+
+ <div class="well">
+ <image style="float:left;margin-right:10px;" src="<g:resource dir='images' file='file.png' alt='file icon' />"/>
+
+ <div id="container" style="height:100%;width:100%;">
+
+ <div >
+ <div><label><g:message code="text.file.name" />:</label></div>
+ <div style="overflow:auto;"><a href="#" onclick="dibDownloadFile( )">${dataObject.dataName}</a></div>
+ </div>
+ <div>
+ <div style="width:20%;"><label><g:message code="text.parent" />:</label></div>
+ <div style="overflow:auto;">${dataObject.collectionName}</div>
+ </div>
+ </div>
+ <div id="infoThumbnailLoadArea"></div>
+ <g:if test="${renderMedia}">
+ <a class="media" href="${resource(absolute:true,dir:'file/download',file:dataObject.absolutePath)}"></a>
+ </g:if>
+ <g:else>
+ <a href="${resource(absolute:true,dir:'file/download',file:dataObject.absolutePath)}"></a>
+ </g:else>
+ </div>
+ </div>
</div>
-
-
- <div class="well">
- <image style="float:left;margin-right:10px;"
- src='<g:resource dir="images" file="file.png" alt="file icon" />' />
-
-
- <h3>
- ${dataObject.dataName}
- </h3>
+
+ <ul class="nav nav-tabs" id="infoTabs">
+ <li class="active"><a href="#info" id="infoTab"><g:message code="text.info" /></a></li>
+ <li><a href="#metadata" id="metadataTab"><g:message code="text.metadata" /></a></li>
+ <li><a href="#permissions" id="permissionTab"><g:message code="text.permissions" /></a></li>
+ <g:if test="${grailsApplication.config.idrop.config.use.tickets==true}">
+ <li><a href="#tickets" id="ticketTab"><g:message code="text.tickets" /></a></li>
+ </g:if>
+ <li><a href="#audit" id="auditTab"><g:message code="text.audit" /></a></li>
+ </ul>
+
+ <div class="tab-content">
+ <div class="tab-pane active" id="info">
+ <div id="container" style="height:100%;width:100%;">
+
+ <div >
+ <div style="width:20%;"><label><g:message code="text.length" />:</label></div>
+ <div>${dataObject.displayDataSize}</div>
+ </div>
+
+ <div>
+ <div><label><g:message code="text.created" />:</label></div>
+ <div>${dataObject.createdAt}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.modified" />:</label></div>
+ <div>${dataObject.updatedAt}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.owner" />:</label></div>
+ <div>${dataObject.dataOwnerName}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.owner.zone" />:</label></div>
+ <div>${dataObject.dataOwnerZone}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.data.path" />:</label></div>
+ <div style="overflow:auto;"><span class="longText">${dataObject.dataPath}</span></div>
+ </div>
+ <div>
+ <div><label><g:message code="text.resource.group" />:</label></div>
+ <div>${dataObject.resourceGroupName}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.checksum" />:</label></div>
+ <div>${dataObject.checksum}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.resource" />:</label></div>
+ <div>${dataObject.resourceName}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.replica.number" />:</label></div>
+ <div>${dataObject.dataReplicationNumber}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.replication.status" />:</label></div>
+ <div>${dataObject.replicationStatus}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.status" />:</label></div>
+ <div>${dataObject.dataStatus}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.type" />:</label></div>
+ <div>${dataObject.dataTypeName}</div>
+ </div>
+ <div>
+ <div><label><g:message code="text.version" />:</label></div>
+ <div>${dataObject.dataVersion}</div>
+ </div>
+
</div>
-
-
-
- <ul class="nav nav-tabs" id="infoTabs">
- <li class="active"><a href="#info" id="infoTab"><g:message
- code="text.info" /></a></li>
- <li><a href="#metadata" id="metadataTab"><g:message
- code="text.metadata" /></a></li>
- <li><a href="#permissions" id="permissionTab"><g:message
- code="text.sharing" /></a></li>
- <g:if
- test="${grailsApplication.config.idrop.config.use.tickets==true}">
- <li><a href="#tickets" id="ticketTab"><g:message
- code="text.tickets" /></a></li>
- </g:if>
- <li><a href="#audit" id="auditTab"><g:message
- code="text.audit" /></a></li>
- </ul>
-
- <div class="tab-content">
- <div class="tab-pane active" id="info">
- <div class="container">
- <div class="row">
- <div class="span12">
- <h4>
- <g:message code="text.info" />
- </h4>
- </div>
- </div>
- <div class="row alert alert-info">
- <div class="span12">
- <g:message code="heading.info" />
- </div>
- </div>
-
- <div class="row" id="infoThumbnailLoadArea">
- <div class="span12">
- <g:if test="${renderMedia}">
- <a class="media"
- href="${resource(absolute:true,dir:'file/download',file:dataObject.absolutePath)}"></a>
- </g:if>
- <g:else>
- <a
- href="${resource(absolute:true,dir:'file/download',file:dataObject.absolutePath)}"></a>
- </g:else>
- </div>
- </div>
-
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.length" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.displayDataSize}
- </div>
- </div>
-
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.created" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.createdAt}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.modified" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.updatedAt}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.owner" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.dataOwnerName}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.owner.zone" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.dataOwnerZone}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.data.path" />
- :</strong>
- </div>
- <div class="span10 longText" style="overflow: auto;">
- ${dataObject.dataPath}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.resource.group" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.resourceGroupName}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.checksum" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.checksum}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.resource" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.resourceName}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.replica.number" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.dataReplicationNumber}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.replication.status" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.replicationStatus}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.status" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.dataStatus}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.type" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.dataTypeName}
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.version" />
- :</strong>
- </div>
- <div class="span10">
- ${dataObject.dataVersion}
- </div>
- </div>
-
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.tags" />
- :</strong>
- </div>
- <div class="span10">
- <g:textField id="infoTags" name="tags"
- value="${tags.spaceDelimitedTagsForDomain}" />
- </div>
- </div>
- <div class="row">
- <div class="span2">
- <strong><g:message code="text.comment" />
- :</strong>
- </div>
- <div class="span10">
- <g:textArea id="infoComment" name="comment" rows="5" cols="80"
- value="${comment}" />
- </div>
- </div>
- <div class="row">
- <div class="span2"></div>
- <div class="span10">
- <button type="button" id="updateTags" value="updateTags"
- onclick="updateTags()"><g:message code="text.update.tags" /></button>
- </div>
- </div>
-
-
+ <div id="container" style="height:100%;width:100%;">
+ <div>
+ <div><label><g:message code="text.tags" />:</label></div>
+ <div><g:textField id="infoTags" name="tags"
+ value="${tags.spaceDelimitedTagsForDomain}" /></div>
</div>
- </div>
- <div class="tab-pane" id="metadata">
- <div id="infoAccordionMetadataInner"></div>
- </div>
- <div class="tab-pane" id="permissions">
- <div id="infoAccordionACLInner"></div>
- </div>
- <g:if
- test="${grailsApplication.config.idrop.config.use.tickets==true}">
- <div class="tab-pane" id="tickets">
- <div id="infoAccordionTicketsInner"></div>
+ <div>
+ <div><label><g:message code="text.comment" />:</label></div>
+ <div><g:textArea id="infoComment" name="comment" rows="5" cols="80"
+ value="${comment}" /></div>
+ </div>
+ <div>
+ <div></div>
+ <div><button type="button" id="updateTags" value="updateTags" onclick="updateTags()">Update Tags</button></div>
</div>
- </g:if>
- <div class="tab-pane" id="audit">
- <div id="infoAccordionAuditInner"></div>
- </div>
</div>
-
</div>
- <!-- toggle html area -->
-
- <script type="text/javascript">
- $(function() {
- $(".idropLiteBulkUpload").hide();
- $("#menuDownload").show();
- $("#menuUpload").hide();
- $("#menuBulkUpload").hide();
-
- $('#infoTabs a').click(function(e) {
- e.preventDefault();
- $(this).tab('show');
- });
-
- $('#infoTab').on('shown', function(e) {
- //e.target // activated tab
- //e.relatedTarget // previous tab
- showMetadataView(selectedPath, "#infoAccordionMetadataInner");
- });
-
- $('#metadataTab').on('shown', function(e) {
- showMetadataView(selectedPath, "#infoAccordionMetadataInner");
- });
+ <div class="tab-pane" id="metadata">
+ <div id="infoAccordionMetadataInner"></div>
+ </div>
+ <div class="tab-pane" id="permissions">
+ <div id="infoAccordionACLInner"></div>
+ </div>
+ <g:if test="${grailsApplication.config.idrop.config.use.tickets==true}">
+ <div class="tab-pane" id="tickets">
+ <div id="infoAccordionTicketsInner">
+ </div>
+ </div>
+ </g:if>
+ <div class="tab-pane" id="audit">
+ <div id="infoAccordionAuditInner"></div>
+ </div>
+</div>
- $('#permissionTab').on('shown', function(e) {
- showSharingView(selectedPath, "#infoAccordionACLInner");
- });
+</div><!-- toggle html area -->
+
+<script>
+ $(function() {
+ $(".idropLiteBulkUpload").hide();
+ $("#menuDownload").show();
+ $("#menuUpload").hide();
+ $("#menuBulkUpload").hide();
- $('#ticketTab').on('shown', function(e) {
- showTicketView(selectedPath, "#infoAccordionTicketsInner");
- });
- $('#auditTab').on('shown', function(e) {
- showAuditView(selectedPath, "#infoAccordionAuditInner");
- });
+ $('#infoTabs a').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+ });
+
+ $('#infoTab').on('shown', function (e) {
+ //e.target // activated tab
+ //e.relatedTarget // previous tab
+ showMetadataView(selectedPath, "#infoAccordionMetadataInner");
+ });
+
+ $('#metadataTab').on('shown', function (e) {
+ showMetadataView(selectedPath, "#infoAccordionMetadataInner");
+ });
+ $('#permissionTab').on('shown', function (e) {
+ showSharingView(selectedPath, "#infoAccordionACLInner");
});
- function callUpdateTags() {
- updateTags();
- }
+ $('#ticketTab').on('shown', function (e) {
+ showTicketView(selectedPath, "#infoAccordionTicketsInner");
+ });
- /*
+ $('#auditTab').on('shown', function (e) {
+ showAuditView(selectedPath, "#infoAccordionAuditInner");
+ });
+ });
- $("#infoAccordion").accordion({
- clearStyle : true,
- autoHeight : false
- }).bind("accordionchange", function(event, ui) {
- var infoSection = ui.newHeader[0].id;
- updateDataObjectInfoSection(infoSection);
- });
- */
+ function callUpdateTags() {
+ updateTags();
+ }
- /**
- Update the info for a section in the info accordion based on the provided section id
- */
- function updateDataObjectInfoSection(sectionToUpdate) {
- //alert("sectionToUpdate:" + sectionToUpdate);
- if (sectionToUpdate == "infoAccordionMetadata") {
- showMetadataView(selectedPath, "#infoAccordionMetadataInner");
- } else if (sectionToUpdate == "infoAccordionACL") {
- showSharingView(selectedPath, "#infoAccordionACLInner");
- } else if (sectionToUpdate == "infoAccordionTickets") {
- showTicketView(selectedPath, "#infoAccordionTicketsInner");
- } else if (sectionToUpdate == "infoAccordionAudit") {
- showAuditView(selectedPath, "#infoAccordionAuditInner");
- } else {
- }
+ /*
+
+
+ $("#infoAccordion").accordion({
+ clearStyle : true,
+ autoHeight : false
+ }).bind("accordionchange", function(event, ui) {
+ var infoSection = ui.newHeader[0].id;
+ updateDataObjectInfoSection(infoSection);
+ });
+ */
+
+ /**
+ Update the info for a section in the info accordion based on the provided section id
+ */
+ function updateDataObjectInfoSection(sectionToUpdate) {
+ //alert("sectionToUpdate:" + sectionToUpdate);
+ if (sectionToUpdate == "infoAccordionMetadata") {
+ showMetadataView(selectedPath, "#infoAccordionMetadataInner");
+ } else if (sectionToUpdate == "infoAccordionACL") {
+ showSharingView(selectedPath, "#infoAccordionACLInner");
+ } else if (sectionToUpdate == "infoAccordionTickets") {
+ showTicketView(selectedPath, "#infoAccordionTicketsInner");
+ } else if (sectionToUpdate == "infoAccordionAudit") {
+ showAuditView(selectedPath, "#infoAccordionAuditInner");
+ } else {
}
+ }
+</script>
+<g:if test="${getThumbnail}">
+ <script>
+ $(function() {
+ requestThumbnailImageForInfoPane();
+ });
</script>
- <g:if test="${getThumbnail}">
- <script type="text/javascript">
- $(function() {
- requestThumbnailImageForInfoPane();
- });
- </script>
- </g:if>
- <g:else>
- <script type="text/javascript">
- $(function() {
- //$.fn.media.mapFormat('pdf', 'quicktime');
- $('.media').media({
- width : 300,
- height : 200,
- autoplay : true
- });
+</g:if>
+<g:else>
+<script>
+ $(function() {
+ //$.fn.media.mapFormat('pdf', 'quicktime');
+ $('.media').media({
+ width : 300,
+ height : 200,
+ autoplay : true
+ });
- });
- </script>
- </g:else>
-</div>
-</div> \ No newline at end of file
+ });
+</script>
+</g:else>
diff --git a/idrop-web/grails-app/views/common/_topToolbar.gsp b/idrop-web/grails-app/views/common/_topToolbar.gsp
index 71ff685..5c23047 100755
--- a/idrop-web/grails-app/views/common/_topToolbar.gsp
+++ b/idrop-web/grails-app/views/common/_topToolbar.gsp
@@ -3,26 +3,23 @@
<div id="topToolbarMenu" class="btn-toolbar">
<div id="menuFileDetails" class="btn-group">
- <button id="menuRefresh" onclick="refreshTree()"><i class="icon-refresh"></i><g:message
+ <button id="menuRefresh" onclick="refreshTree()"><img class="icon-refresh"/><g:message
code="text.refresh" /></button>
<button id="menuNewFolderDetails"
- onclick="newFolderViaBrowseDetailsToolbar()"><i class="icon-plus-sign"></i><g:message
+ onclick="newFolderViaBrowseDetailsToolbar()"><img class="icon-plus-sign"/><g:message
code="text.new.folder" /></button>
</div>
<div id="menuView" class="btn-group">
- <g:if test="${grailsApplication.config.idrop.config.use.browse.view==true}">
- <button id="menuBrowseView"
- onclick="browseView()"><i class="icon-list"></i><g:message
- code="text.browse" /></button>
- </g:if>
- <button id="menuInfoView" onclick="infoView()"><i class="icon-info-sign"></i> <g:message code="text.info" /></button>
- <g:if test="${grailsApplication.config.idrop.config.use.gallery.view==true}">
- <button id="menuGalleryView"
- onclick="galleryView()"><i class="icon-picture"></i><g:message
- code="text.gallery" /></button>
- </g:if>
+
+ <button id="menuBrowseView"
+ onclick="browseView()"><img class="icon-list"/><g:message
+ code="text.browse" /></button>
+ <button id="menuInfoView" onclick="infoView()"><img class="icon-info-sign"/> <g:message code="text.info" /></button>
+ <button id="menuGalleryView"
+ onclick="galleryView()"><img class="icon-picture"/><g:message
+ code="text.gallery" /></button>
</div>
</div>
diff --git a/idrop-web/grails-app/views/home/link.gsp b/idrop-web/grails-app/views/home/link.gsp
index d8bfef5..f1e7e87 100755
--- a/idrop-web/grails-app/views/home/link.gsp
+++ b/idrop-web/grails-app/views/home/link.gsp
@@ -17,6 +17,6 @@
return false;
}
baseAbsPath = escape(baseAbsPath);
- window.location.href = context + "/browse/index?mode=path&absPath=" + baseAbsPath;
+ window.location.href = context + "/home/index?mode=path&absPath=" + baseAbsPath;
});
</script> \ No newline at end of file
diff --git a/idrop-web/grails-app/views/home/noInfo.gsp b/idrop-web/grails-app/views/home/noInfo.gsp
index a9ba3c3..2651776 100755
--- a/idrop-web/grails-app/views/home/noInfo.gsp
+++ b/idrop-web/grails-app/views/home/noInfo.gsp
@@ -1,6 +1,3 @@
<div>
-<g:img dir="images" file="qmark.png" width="128" height="128"/>
-</div>
-<div>
<h2><g:message code="message.no.files.to.display" /></h2>
</div> \ No newline at end of file
diff --git a/idrop-web/grails-app/views/login/login.gsp b/idrop-web/grails-app/views/login/login.gsp
index ecc9059..76af435 100755
--- a/idrop-web/grails-app/views/login/login.gsp
+++ b/idrop-web/grails-app/views/login/login.gsp
@@ -3,49 +3,18 @@
<head>
<title>iDrop-web - iRODS Personal Cloud"</title>
<meta name="layout" content="basic" />
-<style type="text/css">
-/* Override some defaults */
-html,body {
- background-color: #eee;
-}
-
-body {
- padding-top: 40px;
-}
-
-.container {
- width: 600px;
-}
-
-/* The white background content wrapper */
-.container>.content {
- background-color: #fff;
- padding: 20px;
- margin: 0 -20px;
- -webkit-border-radius: 10px 10px 10px 10px;
- -moz-border-radius: 10px 10px 10px 10px;
- border-radius: 10px 10px 10px 10px;
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
-}
-
-.login-form {
- margin-left: 65px;
-}
-
-legend {
- margin-right: -50px;
- font-weight: bold;
- color: #404040;
-}
-</style>
</head>
-<body>
- <div class="container">
- <div class="row-fluid content">
- <div class="span12">
+<div class="row-fluid">
+ <div class="span5 offset4">
+ <div id="normalLoginForm" class="well">
+
+ <g:form id="normalLogin" method="post" controller="login"
+ action="authenticate">
+
+
+ <g:hiddenField name="usePresets" id="usePresets"
+ value="${loginCommand.usePresets}" />
<g:hasErrors bean="${loginCommand}">
<div class="alert alert-error">
<ul>
@@ -55,96 +24,127 @@ legend {
</ul>
</div>
</g:hasErrors>
- </div>
- <div class="span12">
-
- <g:form id="normalLogin" method="post" controller="login"
- action="authenticate" class="loginForm">
- <g:hiddenField name="usePresets" id="usePresets"
- value="${loginCommand.usePresets}" />
- <fieldset>
- <legend>
- <g:message code="message.login" />
- </legend>
-
-
-
- <g:if test="${loginCommand.usePresets}">
-
- <g:hiddenField name="host" id="host" value="${loginCommand.host}" />
- <g:hiddenField name="port" id="port" value="${loginCommand.port}" />
- <g:hiddenField name="zone" id="zone" value="${loginCommand.zone}" />
- <g:hiddenField name="defaultStorageResource" id="resource"
- value="${loginCommand.defaultStorageResource}" />
- <g:hiddenField name="authMethod" id="authMethod"
- value="${loginCommand.authMethod}" />
- </g:if>
- <g:else>
-
- <label><g:message code="text.host" />:</label>
-
- <input type="text" class="input-text" name="host" id="host"
- value="${loginCommand.host}" />
-
- <label><g:message code="text.port" />:</label>
-
- <input type="text" class="input-text" name="port" id="port"
- value="${loginCommand.port}" />
- <label><g:message code="text.zone" />:</label>
-
- <input type="text" class="input-text" name="zone" id="zone"
- value="${loginCommand.zone}" />
-
- <label><g:message code="text.auth.method" />:</label>
-
- <g:select name="authMethod" from="${['Standard', 'PAM']}"
- value="${loginCommand.authMethod}" />
- </g:else>
-
-
- <label><g:message code="text.guest.login" />:</label>
-
- <g:checkBox name="useGuestLogin" id="useGuestLogin"
- value="${loginCommand.useGuestLogin}"
- onclick="toggleGuestLogin()" />
-
-
- <label><g:message code="text.user" />:</label> <input type="text"
- class="input-text" name="user" id="user"
- value="${loginCommand.user}" /> <label><g:message
- code="text.password" />:</label> <input type="password"
- class="input-text" name="password" id="password"
- value="${loginCommand.password}" />
+ <div id="container" style="height: auto; width: auto;">
+
+ <g:if test="${loginCommand.usePresets}">
+
+ <g:hiddenField name="host" id="host" value="${loginCommand.host}" />
+ <g:hiddenField name="port" id="port" value="${loginCommand.port}" />
+ <g:hiddenField name="zone" id="zone" value="${loginCommand.zone}" />
+ <g:hiddenField name="defaultStorageResource" id="resource"
+ value="${loginCommand.defaultStorageResource}" />
+ <g:hiddenField name="authMethod" id="authMethod"
+ value="${loginCommand.authMethod}" />
+ </g:if>
+ <g:else>
+ <div>
+ <div style="width: 30%;">
+ <label><g:message code="text.host" />:</label>
+ </div>
+ <div>
+ <input type="text" class="input-text" name="host" id="host"
+ value="${loginCommand.host}" />
+ </div>
+ </div>
+ <div>
+ <div>
+ <label><g:message code="text.port" />:</label>
+ </div>
+ <div>
+ <input type="text" class="input-text" name="port" id="port"
+ value="${loginCommand.port}" />
+ </div>
+ </div>
+ <div>
+ <div>
+ <label><g:message code="text.zone" />:</label>
+ </div>
+ <div>
+ <input type="text" class="input-text" name="zone" id="zone"
+ value="${loginCommand.zone}" />
+ </div>
+ </div>
+ <div>
+ <div>
+ <label><g:message code="text.auth.method" />:</label>
+ </div>
+ <div>
+ <g:select name="authMethod" from="${['Standard', 'PAM']}"
+ value="${loginCommand.authMethod}" />
+ </div>
+ </div>
+ </g:else>
+
+ <div>
+ <div>
+ <label><g:message code="text.guest.login" />:</label>
+ </div>
+ <div>
+ <g:checkBox name="useGuestLogin" id="useGuestLogin"
+ value="${loginCommand.useGuestLogin}"
+ onclick="toggleGuestLogin()" />
+ </div>
+ </div>
- <button id="login" name="login"
- style="margin-left: 150px; margin-top: 20px; margin-bottom: 20px;" type="submit">
- <g:message code="text.login" />
- </button>
+ <div class="userLoginData">
+ <div>
+ <label><g:message code="text.user" />:</label>
+ </div>
+ <div>
+ <input type="text" class="input-text" name="user" id="user"
+ value="${loginCommand.user}" />
+ </div>
+ </div>
+ <div class="userLoginData">
+ <div>
+ <label><g:message code="text.password" />:</label>
+ </div>
+ <div>
+ <input type="password" class="input-text" name="password"
+ id="password" value="${loginCommand.password}" />
+ </div>
+ </div>
- <g:if test="${!loginCommand.usePresets}">
+ </span>
+ <div>
+ <div></div>
+ <div>
+ <button id="login" name="login"
+ style="margin-left: 150px; margin-top: 20px; margin-bottom: 20px;">
+ <g:message code="text.login" />
+ </button>
+ </div>
+ </div>
+ <g:if test="${!loginCommand.usePresets}">
+ <div>
<div>
- <div>
- <label><g:message code="text.resource" />:</label>
- </div>
- <div>
- <input type="text" class="input-text" name="resource"
- id="resource" value="${loginCommand.defaultStorageResource}" />
- <stong> <g:message code="text.optional" /> <strong></strong>
- </stong>
- </div>
+ <label><g:message code="text.resource" />:</label>
</div>
- </g:if>
- </fieldset>
- </g:form>
+ <div>
+ <input type="text" class="input-text" name="resource"
+ id="resource" value="${loginCommand.defaultStorageResource}" />
+ <stong>
+ <g:message code="text.optional" />
+ </strong>
+ </div>
+ </div>
+ </g:if>
+ </div>
+ <!-- container div -->
- <!--end-normalLogin-->
- </div>
+ </g:form>
+ <!--end-normalLogin-->
</div>
</div>
- <script type="text/javascript">
+
+</div>
+</div>
+</div>
+</html>
+<script>
$(function() {
toggleGuestLogin();
@@ -160,9 +160,6 @@ legend {
}
}
</script>
-</body>
-</html>
-
diff --git a/idrop-web/grails-app/views/metadata/metadataDetails.gsp b/idrop-web/grails-app/views/metadata/metadataDetails.gsp
index 1828bfb..e7e1aa2 100755
--- a/idrop-web/grails-app/views/metadata/metadataDetails.gsp
+++ b/idrop-web/grails-app/views/metadata/metadataDetails.gsp
@@ -1,9 +1,9 @@
+<h4><g:message code="text.metadata" /></h4>
-<g:hiddenField name='metadataDetailsAbsPath' id='metadataDetailsAbsPath'
- value='${absPath}' />
+<g:hiddenField name='metadataDetailsAbsPath' id='metadataDetailsAbsPath' value='${absPath}'/>
-<!-- div for metadata table -->
-<div></div>
+ <!-- div for metadata table -->
+</div>
<div id="metadataMessageArea">
@@ -14,54 +14,50 @@
<!-- area for generating dialogs -->
</div>
-<div id="metadataDetailsArea" class="container-fluid">
+<div id="metadataDetailsArea">
- <div class="row">
- <div class="span12">
- <h4>
- <g:message code="text.metadata" />
- </h4>
- </div>
- </div>
- <div class="row alert alert-info">
- <div class="span12">
+ <div class="alert alert-info">
<g:message code="heading.metadata" />
- </div>
</div>
- <div id="detailsToolbar" class="row well">
- <div id="detailsMenu" class="span12 btn-group">
- <button type="button" id="addMetadataButton" value="addMetadata"
+
+ <div id="detailsToolbar" class="well">
+ <div id="detailsMenu"
+ style="float: left, clear : both;">
+ <button type="button" id="addMetadataButton"
+ value="addMetadata"
onclick="prepareMetadataDialog()")>
<g:message code="default.button.create.label" />
</button>
<button type="button" id="deleteMetadataButton"
- value="deleteMetadata" onclick="deleteMetadata()")>
+ value="deleteMetadata"
+ onclick="deleteMetadata()")>
<g:message code="default.button.delete.label" />
</button>
- <button type="button" id="reloadAclButton" value="reloadMetadata"
+ <button type="button" id="reloadAclButton"
+ value="reloadMetadata"
onclick="reloadMetadataDetailsTable()")>
<g:message code="default.button.reload.label" />
</button>
</div>
</div>
- <div class="row">
- <div id="metadataTableDiv" class="span12">
- <!-- table goes here -->
- </div>
- </div>
+ <div id="metadataTableDiv"><!-- table goes here --></div>
</div>
<script type="text/javascript">
+
var origData = "";
var path = $("#metadataDetailsAbsPath").val();
if (path == null) {
path = baseAbsPath;
}
-
+
+
$(function() {
-
+
reloadMetadataDetailsTable(path);
});
-</script> \ No newline at end of file
+
+
+ </script> \ No newline at end of file
diff --git a/idrop-web/grails-app/views/sharing/_sharingPanel.gsp b/idrop-web/grails-app/views/sharing/_sharingPanel.gsp
index 8407cea..6a3a4e5 100644
--- a/idrop-web/grails-app/views/sharing/_sharingPanel.gsp
+++ b/idrop-web/grails-app/views/sharing/_sharingPanel.gsp
@@ -15,7 +15,7 @@
<div class="btn-group">
<g:if
test="${grailsApplication.config.idrop.config.use.sharing==true && irodsSharedFileOrCollection != null}">
- <button type="button" onclick="editShareAtPath()">
+ <button onclick="editShareAtPath()">
<g:message code="text.edit.share" />
</button>
<button onclick="removeShareAtPath()">
diff --git a/idrop-web/grails-app/views/sharing/aclDetails.gsp b/idrop-web/grails-app/views/sharing/aclDetails.gsp
index 185424e..1c082eb 100755
--- a/idrop-web/grails-app/views/sharing/aclDetails.gsp
+++ b/idrop-web/grails-app/views/sharing/aclDetails.gsp
@@ -15,13 +15,13 @@
<div class="btn-group">
<button type="button" id="addAclButton"
value="addAcl"
- onclick="prepareAclDialog()"><g:message code="default.button.create.label" /></button>
+ onclick="prepareAclDialog()")><g:message code="default.button.create.label" /></button>
<button type="button" id="deleteAclButton"
value="deleteAcl"
- onclick="deleteAcl()"> <g:message code="default.button.delete.label" /> </button>
+ onclick="deleteAcl()")><g:message code="default.button.delete.label" /></button>
<button type="button" id="reloadAclButton"
value="reloadAcl"
- onclick="reloadAclTable(selectedPath)"><g:message code="default.button.reload.label" /></button>
+ onclick="reloadAclTable(selectedPath)")><g:message code="default.button.reload.label" /></button>
</div>
<div class="btn-group">
<button onclick="makePublicLinkAtPath()"><g:message code="text.create.public.link" /></button>
diff --git a/idrop-web/idrop-web-config2.groovy b/idrop-web/idrop-web-config2.groovy
index 8c8c3be..c3272f0 100755
--- a/idrop-web/idrop-web-config2.groovy
+++ b/idrop-web/idrop-web-config2.groovy
@@ -41,8 +41,8 @@ environments {
idrop.config.idrop.lite.use.applet.dir=false
*/
-idrop.config.idrop.lite.applet.jar="idrop-lite-2.0.1-SNAPSHOT-jar-with-dependencies.jar"
-idrop.config.idrop.lite.codebase="http://iren-web.renci.org/idrop-snapshot"
+idrop.config.idrop.lite.applet.jar="idrop-lite-2.0.0-jar-with-dependencies.jar"
+idrop.config.idrop.lite.codebase="http://iren-web.renci.org/idrop-release"
idrop.config.idrop.lite.use.applet.dir=false
/*
@@ -54,9 +54,9 @@ idrop.config.idrop.lite.use.applet.dir=false
* idrop.config.idrop.jnlp="https://lifetime-library.ils.unc.edu/llclient/idrop.jnlp"
*/
-//idrop.config.idrop.jnlp="http://iren-web.renci.org:8080/idrop/idrop.jnlp"
+idrop.config.idrop.jnlp="http://localhost:8080/idrop-web/idrop.jnlp"
//drop.config.idrop.jnlp="http://iren-web.renci.org/idrop-snapshot/idrop.jnlp"
-idrop.config.idrop.jnlp="http://iren-web.renci.org/idrop-release/idrop.jnlp"
+//idrop.config.idrop.jnlp="http://iren-web.renci.org/idrop-release/idrop.jnlp"
/*
* 5) Customization properties
*/
@@ -69,9 +69,3 @@ idrop.config.use.userprofile=true
// do I support sharing? Requires target server to have specific query support and sharing queries loaded from jargon-user-tagging
idrop.config.use.sharing=true
-
-// do I want to show the gallery view?
-idrop.config.use.gallery.view=false
-
-// do I want to show the browse view?
-idrop.config.use.browse.view=false
diff --git a/idrop-web/release_notes.txt b/idrop-web/release_notes.txt
index ca0a6e8..113c3b7 100644
--- a/idrop-web/release_notes.txt
+++ b/idrop-web/release_notes.txt
@@ -1,12 +1,12 @@
*'''Project''': idrop-web
*'''Date''': 03/04/2013
-*'''Release Version''': 2.0.XXX
-*'''git tag''': 2.0.XXX
+*'''Release Version''': 2.0.0
+*'''git tag''': 2.0.0
==News==
-This is a maintenance release of iDrop web2 and the iDrop suite
+This is a release of iDrop web with the version 2.0 redesign work Phase I (GUI redesign)
==Requirements==
@@ -46,33 +46,9 @@ Note that the following bug and feature requests are logged in GForge with relat
*[#1221] twistie broken on search results
-*[#1439] iDrop 2.0.1 release small cleanups and fixes
-**Nicer display when no files/folders to display in home page
-**Gallery and browse view now configurable option in config.groovy
-
-*[#1462] Fix profile to tolerate no 'protected profile read/write' group, it will still write the profile but will not set permissions to that missing group
-
-*[#1475] ie fixes for 2.0.1
-**Lots of cleanups of html and styles as a result of ie testing on win8
-**Fix of login screen rendering on ie
-
-*[#1312] fix public link access to not override account if alread logged in
-
-*[#715] check access before download
-**Check file access and verify is a data object before doing a download, displaying a nicer error message
==Features==
*[#984] iDrop web '2.0' redesign effort
*[#78] very large collection paging
-
-*[#1345] upgrade grails to 2.2.1
-**Upgrade to grails 2.2.1 and related cleanups to make it easier to work with
-**Move plug-in defs to BuildConfig.groovy
-
-*[#1475] login form discombobulated on ie later versions
-**Fix layout markup for login form for better cross-browser compatability
-
-*[#1556] up/download performance of idrop web
-**Use enhanced Stream2StreamAO stream copy methods for upload/download
diff --git a/idrop-web/web-app/js/mydrop/home.js b/idrop-web/web-app/js/mydrop/home.js
index cafadea..cc62280 100644
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -149,7 +149,7 @@ function browserFirstViewRetrieved(data) {
|| n.statusText == "OK") {
// ok
} else {
- setMessage(n.responseText);
+ setMessage("Unable to browse to location, try refreshing the tree. You may not have permission to view this directory");
return false;
// refreshTree();
}
@@ -797,6 +797,11 @@ function showSharingView(absPath, targetDiv) {
setInfoDivNoData();
}
+ /*
+ * lcSendValueAndCallbackHtmlAfterErrorCheckPreserveMessage(
+ * "/sharing/showAclDetails?absPath=" + encodeURIComponent(absPath),
+ * targetDiv, targetDiv, null);
+ */
}
/**
@@ -1652,41 +1657,7 @@ function downloadViaToolbarGivenPath(path) {
showErrorMessage(jQuery.i18n.prop('msg.path.missing'));
return false;
}
-
- showBlockingPanel();
-
- var params = {
- absPath : path
- }
-
- var jqxhr = $
- .post(context + "/file/screenForDownloadRights", params, null, "html")
- .success(
- function(returnedData, status, xhr) {
- var continueReq = checkForSessionTimeout(
- returnedData, xhr);
-
- if (!continueReq) {
- return false;
- }
-
- unblockPanel();
- doActualDownload(path);
-
-
- }).error(function(xhr, status, error) {
- setErrorMessage(xhr.responseText);
- unblockPanel();
- });
-}
-function doActualDownload(path) {
-
- if (path == null) {
- setErrorMessage(jQuery.i18n.prop('msg.path.missing'));
- return false;
- }
-
window.open(context + '/file/download' + escape(path), '_self');
}
@@ -2598,6 +2569,28 @@ function closePublicLinkDialog() {
$("#browseDialogArea").html();
}
+/**
+ * Grant public (anonymous access) via the public link dialog. Submit dialog and
+ * present the response
+ */
+function grantPublicLink() {
+ var path = $("#publicLinkDialogAbsPath").val();
+ showBlockingPanel();
+ if (path == null) {
+ setMessage(jQuery.i18n.prop('msg.path.missing'));
+ unblockPanel();
+ }
+
+ var params = {
+ absPath : path
+ }
+
+ lcSendValueViaPostAndCallbackHtmlAfterErrorCheck(
+ "/browse/updatePublicLinkDialog", params, null,
+ "#browseDialogArea", null, null);
+ unblockPanel();
+
+}
/**
* Set a no data message in the div
@@ -2668,9 +2661,7 @@ function addShareAtPath() {
function editShareAtPath() {
$("#sharingPanelContainingDiv").html();
var path = $("#infoAbsPath").val();
- if (path == null) {
- setMessage(jQuery.i18n.prop('msg_path_missing'));
- unblockPanel();
+ if (selectedPath == null) {
return false;
}
@@ -2829,6 +2820,7 @@ function makePublicLinkAtPath() {
lcSendValueWithParamsAndPlugHtmlInDiv(url, params, "", function(data) {
fillInACLDialog(data);
});
+
}
/**
@@ -2858,23 +2850,12 @@ function grantPublicLink() {
absPath : path
}
- var jqxhr = $.get(context + "/browse/updatePublicLinkDialog", params,
- function(data, status, xhr) {
-
- var continueReq = checkForSessionTimeout(data, xhr);
- if (!continueReq) {
- return false;
- }
-
- $("#publicLinkDialog").empty().append( data );
- unblockPanel();
+ lcSendValueViaPostAndCallbackHtmlAfterErrorCheck("/browse/updatePublicLinkDialog", params, null, "#aclDialogArea", null, null);
+ unblockPanel();
- }).fail(function(xhr, status, error) {
- setErrorMessage(xhr.responseText);
- unblockPanel();
- });
}
+
/*
*Given the contents of the 'create public link' dialog,
*/
@@ -2884,3 +2865,6 @@ function fillInACLDialog(data) {
$("#aclDialogArea").show("slow");
}
+function zzz() {
+
+}
diff --git a/idrop-web/web-app/js/mydrop/profile.js b/idrop-web/web-app/js/mydrop/profile.js
index 2f3dcf9..becbdfc 100755
--- a/idrop-web/web-app/js/mydrop/profile.js
+++ b/idrop-web/web-app/js/mydrop/profile.js
@@ -41,11 +41,10 @@ function updateUserProfile() {
* load the profile details information
*/
function loadProfileData() {
- /*var targetDiv = "#profileDataArea";
+ var targetDiv = "#profileDataArea";
lcSendValueAndCallbackHtmlAfterErrorCheckPreserveMessage(
"/profile/loadProfileData",
- targetDiv, targetDiv, null);*/
- window.location=context + '/profile/index';
+ targetDiv, targetDiv, null);
}