summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-02-13 18:37:29 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-02-13 18:37:29 (GMT)
commite48cff0e73f2a467d30e6dd47b1e48926c5aa6af (patch)
tree41dde5a3cf80f93ad92f096eae91c54a452f5720
parent48b81918fe38273e7016fc3b80002a9ca8d79d74 (diff)
downloadQCG-Data-e48cff0e73f2a467d30e6dd47b1e48926c5aa6af.zip
QCG-Data-e48cff0e73f2a467d30e6dd47b1e48926c5aa6af.tar.gz
QCG-Data-e48cff0e73f2a467d30e6dd47b1e48926c5aa6af.tar.bz2
[#1191] cleanups for beta tst with sai
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy2
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/ShoppingCartController.groovy89
-rwxr-xr-xidrop-web/grails-app/views/browse/_collectionInfoToolbar.gsp2
-rwxr-xr-xidrop-web/grails-app/views/browse/_dataObjectInfoToolbar.gsp2
-rwxr-xr-xidrop-web/grails-app/views/common/_topbar.gsp4
-rwxr-xr-xidrop-web/web-app/js/mydrop/home.js6
-rwxr-xr-xidrop-web/web-app/js/mydrop/shopping_cart.js7
7 files changed, 62 insertions, 50 deletions
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
index 1c03ac4..379618e 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
@@ -311,7 +311,7 @@ class BrowseController {
def splitMode = params['splitMode']
if (pagingOffset == null) {
- throw new JargonException("missing the partialStart")
+ pagingOffset = 0;
}
if (splitMode == null) {
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/ShoppingCartController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/ShoppingCartController.groovy
index 203e7d1..985a989 100755
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/ShoppingCartController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/ShoppingCartController.groovy
@@ -5,46 +5,46 @@ import org.irods.jargon.core.pub.IRODSAccessObjectFactory;
import org.irods.mydrop.service.ShoppingCartSessionService;
/**
-* Controller for shopping cart functionality
-* @author Mike Conway - DICE (www.irods.org)
-*/
+ * Controller for shopping cart functionality
+ * @author Mike Conway - DICE (www.irods.org)
+ */
class ShoppingCartController {
-
- IRODSAccessObjectFactory irodsAccessObjectFactory
- IRODSAccount irodsAccount
- ShoppingCartSessionService shoppingCartSessionService
- def grailsApplication
-
- /**
- * Interceptor grabs IRODSAccount from the SecurityContextHolder
- */
- def beforeInterceptor = [action:this.&auth]
-
- def auth() {
- if(!session["SPRING_SECURITY_CONTEXT"]) {
- redirect(controller:"login", action:"login")
- return false
- }
- irodsAccount = session["SPRING_SECURITY_CONTEXT"]
- }
-
- def afterInterceptor = {
- log.debug("closing the session")
- irodsAccessObjectFactory.closeSession()
- }
-
-
- /**
- * Show the cart main view
- */
- def index = {
- log.info("index")
- render(view:"index")
- }
-
-
- /**
+
+ IRODSAccessObjectFactory irodsAccessObjectFactory
+ IRODSAccount irodsAccount
+ ShoppingCartSessionService shoppingCartSessionService
+ def grailsApplication
+
+ /**
+ * Interceptor grabs IRODSAccount from the SecurityContextHolder
+ */
+ def beforeInterceptor = [action:this.&auth]
+
+ def auth() {
+ if(!session["SPRING_SECURITY_CONTEXT"]) {
+ redirect(controller:"login", action:"login")
+ return false
+ }
+ irodsAccount = session["SPRING_SECURITY_CONTEXT"]
+ }
+
+ def afterInterceptor = {
+ log.debug("closing the session")
+ irodsAccessObjectFactory.closeSession()
+ }
+
+
+ /**
+ * Show the cart main view
+ */
+ def index = {
+ log.info("index")
+ render(view:"index")
+ }
+
+
+ /**
* Build the JTable entries for the contents of the shopping cart
*/
def listCart = {
@@ -96,6 +96,19 @@ class ShoppingCartController {
render "OK"
}
+ /**
+ * Add one file to the cart
+ */
+ def addFileToCart = {
+ log.info("addFileToCart")
+ def absPath = params['absPath']
+
+ log.info("absPath: ${absPath}")
+ shoppingCartSessionService.addToCart(absPath)
+
+ render absPath
+ }
+
/**
* Process a bulk add to cart action based on data input from the browse details form
diff --git a/idrop-web/grails-app/views/browse/_collectionInfoToolbar.gsp b/idrop-web/grails-app/views/browse/_collectionInfoToolbar.gsp
index 759543d..4c1eb28 100755
--- a/idrop-web/grails-app/views/browse/_collectionInfoToolbar.gsp
+++ b/idrop-web/grails-app/views/browse/_collectionInfoToolbar.gsp
@@ -19,7 +19,7 @@
</div>
<div id="collectionInfoButtonGroup2" class="btn-group">
- <button id="addCollectionToCart" onclick="cibAddToCart()"><img class="icon-shopping-cart"/><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()"><img class="icon-upload"/><g:message
code="text.upload" /></button>
diff --git a/idrop-web/grails-app/views/browse/_dataObjectInfoToolbar.gsp b/idrop-web/grails-app/views/browse/_dataObjectInfoToolbar.gsp
index e0a673e..20b7923 100755
--- a/idrop-web/grails-app/views/browse/_dataObjectInfoToolbar.gsp
+++ b/idrop-web/grails-app/views/browse/_dataObjectInfoToolbar.gsp
@@ -13,7 +13,7 @@
</g:else>
<button id="downloadFile" onclick="dibDownloadFile()"><img class="icon-download"/><g:message
code="text.download" /></button>
- <button id="addToCart" onclick="dibAddToCart()"><img class="icon-shopping-cart"/><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">
diff --git a/idrop-web/grails-app/views/common/_topbar.gsp b/idrop-web/grails-app/views/common/_topbar.gsp
index b1184f2..418a650 100755
--- a/idrop-web/grails-app/views/common/_topbar.gsp
+++ b/idrop-web/grails-app/views/common/_topbar.gsp
@@ -16,9 +16,9 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<g:message code="text.search" /><b class="caret"></b></a>
<ul class="dropdown-menu">
- <li><a href="#" id="searchFileName" onclick="xxx()")>Search By File Name</a></li>
+ <!-- <li><a href="#" id="searchFileName" onclick="xxx()")>Search By File Name</a></li> -->
<li><a href="#" id="searchTag"><g:link controller="tags" action="index"><g:message code="text.tags" /></g:link></li>
- <li><a href="#" id="searchMetadata" onclick="xxx()")>Search By Metadata</a></li>
+ <!-- <li><a href="#" id="searchMetadata" onclick="xxx()")>Search By Metadata</a></li> -->
</ul>
</li>
<li id="topbarTools" class="dropdown">
diff --git a/idrop-web/web-app/js/mydrop/home.js b/idrop-web/web-app/js/mydrop/home.js
index 4e30361..26df227 100755
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -20,7 +20,7 @@ var dataTree;
var dataTreeView = "";
var dataTreePath = "";
-var browseOptionVal = "browse";
+var browseOptionVal = "info";
var selectedPath = null;
var selectedNode = null;
var fileUploadUI = null;
@@ -2515,10 +2515,6 @@ function clickOnPathInBrowseDetails(data) {
});
}
-<<<<<<< HEAD
-
-=======
->>>>>>> 024d06d3a330c0d3a787632347ec8748dc930100
/**
* Close the public link dialog
*/
diff --git a/idrop-web/web-app/js/mydrop/shopping_cart.js b/idrop-web/web-app/js/mydrop/shopping_cart.js
index da96c91..22f4cdf 100755
--- a/idrop-web/web-app/js/mydrop/shopping_cart.js
+++ b/idrop-web/web-app/js/mydrop/shopping_cart.js
@@ -40,7 +40,7 @@ function addToCartGivenPath(absPath) {
absPath : absPath
}
- lcShowBusyIconInDiv("#cartTableDiv");
+ showBlockingPanel();
var jqxhr = $.post(context + addToCartUrl, params, "html").success(
function(returnedData, status, xhr) {
@@ -49,11 +49,14 @@ function addToCartGivenPath(absPath) {
return false;
}
setMessage("file added to cart:" + xhr.responseText);
- refreshCartFiles();
+ unblockPanel();
+
})
.error(function(xhr, status, error) {
setErrorMessage(xhr.responseText);
+ unblockPanel();
+
});
}