summaryrefslogtreecommitdiffstats
path: root/idrop-web
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-02-18 21:14:38 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-02-18 21:14:38 (GMT)
commite84e25d4e59d97033b4aa505ebb5d271fa9b8ea8 (patch)
tree524ebf99a407d641e8a0add5ca84cc1fe93151f3 /idrop-web
parenta0b1644912dcc14325344b3e988b0c27d146d32a (diff)
downloadQCG-Data-e84e25d4e59d97033b4aa505ebb5d271fa9b8ea8.zip
QCG-Data-e84e25d4e59d97033b4aa505ebb5d271fa9b8ea8.tar.gz
QCG-Data-e84e25d4e59d97033b4aa505ebb5d271fa9b8ea8.tar.bz2
[#1157] fix ticket landing pages and error pages
Diffstat (limited to 'idrop-web')
-rwxr-xr-xidrop-web/grails-app/taglib/org/irods/mydrop/taglib/AuthTagLib.groovy26
-rwxr-xr-xidrop-web/grails-app/views/common/_topbar.gsp18
-rwxr-xr-xidrop-web/grails-app/views/layouts/basic.gsp112
-rwxr-xr-xidrop-web/grails-app/views/metadata/metadataTable.gsp2
-rwxr-xr-xidrop-web/grails-app/views/sharing/aclTable.gsp2
-rwxr-xr-xidrop-web/grails-app/views/ticket/ticketPulldown.gsp2
-rwxr-xr-xidrop-web/grails-app/views/ticket/ticketTable.gsp4
-rwxr-xr-xidrop-web/release_notes.txt3
-rwxr-xr-xidrop-web/web-app/js/mydrop/home.js12
-rwxr-xr-xidrop-web/web-app/js/mydrop/ticket.js18
10 files changed, 92 insertions, 107 deletions
diff --git a/idrop-web/grails-app/taglib/org/irods/mydrop/taglib/AuthTagLib.groovy b/idrop-web/grails-app/taglib/org/irods/mydrop/taglib/AuthTagLib.groovy
index 10cc81f..24f1754 100755
--- a/idrop-web/grails-app/taglib/org/irods/mydrop/taglib/AuthTagLib.groovy
+++ b/idrop-web/grails-app/taglib/org/irods/mydrop/taglib/AuthTagLib.groovy
@@ -1,5 +1,7 @@
package org.irods.mydrop.taglib
+import org.irods.jargon.core.connection.IRODSAccount
+
class AuthTagLib {
private boolean isAuthenticated() {
@@ -9,6 +11,30 @@ class AuthTagLib {
return auth != null
}
+ private boolean isGuestAccount() {
+ //auth = session.SPRING_SECURITY_CONTEXT?.authentication?.authenticated
+ IRODSAccount auth = (IRODSAccount) session["SPRING_SECURITY_CONTEXT"]
+ if (auth == null) {
+ return false
+ }
+ //log.info("auth is: ${auth}")
+ return auth.anonymousAccount
+ }
+
+
+ /**
+ * Tag will return true if this is not a guest account, handy for preventing the display
+ * of things that only a real user should be able to get to, such as profile stuff
+ */
+ def ifNotGuestAccount = { attrs, body ->
+
+ if (!isGuestAccount()) {
+ out << body()
+ }
+
+ }
+
+
def ifAuthenticated = { attrs, body ->
if (isAuthenticated()) {
diff --git a/idrop-web/grails-app/views/common/_topbar.gsp b/idrop-web/grails-app/views/common/_topbar.gsp
index 418a650..5ef2027 100755
--- a/idrop-web/grails-app/views/common/_topbar.gsp
+++ b/idrop-web/grails-app/views/common/_topbar.gsp
@@ -9,9 +9,12 @@
<li id="topbarHome" class="topbarItem"><g:link controller="home" action="index"><g:message code="text.home" /></g:link></li>
<li id="topbarBrowser" class="topbarItem"><g:link controller="browse" action="index"><g:message code="text.browse" /></g:link></li>
- <g:if test="${grailsApplication.config.idrop.config.use.userprofile==true}">
- <li id="topbarPreferences" class="topbarItem"><g:link controller="profile" action="index">Profile</g:link></li>
- </g:if>
+
+ <g:ifNotGuestAccount>
+ <g:if test="${grailsApplication.config.idrop.config.use.userprofile==true}">
+ <li id="topbarPreferences" class="topbarItem"><g:link controller="profile" action="index">Profile</g:link></li>
+ </g:if>
+ </g:ifNotGuestAccount>
<li id="topbarSearch" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<g:message code="text.search" /><b class="caret"></b></a>
@@ -33,13 +36,18 @@
<li id="topbarAccount" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
- <g:message code="text.account" /> ( <span id="accountZoneAndUserDisplay"><g:accountInfo /></span> )<b class="caret"></b></a>
+ <g:message code="text.account" /> <g:ifAuthenticated> <g:ifNotGuestAccount>( <span id="accountZoneAndUserDisplay"><g:accountInfo /></span> )<b class="caret"></b> </g:ifNotGuestAccount></g:ifAuthenticated></a>
<ul class="dropdown-menu">
<g:ifAuthenticated>
<li><a href="#" id="logoutButton" onclick="logout()")><g:message code="text.logout" /></a></li>
- <li><a href="#" id="changePasswordButton"><g:link controller="login" action="changePasswordForm"><g:message code="text.change.password" /></g:link></a></li>
+ <g:ifNotGuestAccount>
+ <li><a href="#" id="changePasswordButton"><g:link controller="login" action="changePasswordForm"><g:message code="text.change.password" /></g:link></a></li>
+ </g:ifNotGuestAccount>
<li><a href="#" id="setDefaultResourceButton"><g:link controller="login" action="defaultResource"><g:message code="text.set.default.resource" /></g:link></a></li>
</g:ifAuthenticated>
+ <g:ifNotAuthenticated>
+ <li><g:link href="#" id="loginButton" controller="login" action="login"><g:message code="text.login" /></g:link></li>
+ </g:ifNotAuthenticated>
</ul>
</li>
diff --git a/idrop-web/grails-app/views/layouts/basic.gsp b/idrop-web/grails-app/views/layouts/basic.gsp
index c5e105b..607ca3f 100755
--- a/idrop-web/grails-app/views/layouts/basic.gsp
+++ b/idrop-web/grails-app/views/layouts/basic.gsp
@@ -1,96 +1,38 @@
<!DOCTYPE html>
<html lang="en">
-<head>
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title><g:layoutTitle default="iDrop-web - iRODS Cloud Browser" /></title>
- <link rel="stylesheet" href="${resource(dir:'css',file:'bootstrap.css')}" />
- <link rel="stylesheet" href="${resource(dir:'css',file:'jqcloud.css')}" />
- <link rel="stylesheet" href="${resource(dir:'css',file:'layout-default-latest.css')}" />
- <link rel="stylesheet" href="${resource(dir:'css',file:'jquery.fileupload-ui.css')}" />
- <link rel="stylesheet" href="${resource(dir:'css',file:'superfish.css')}" />
- <link rel="stylesheet" href="${resource(dir:'css',file:'jquery.gritter.css')}" />
- <link rel="stylesheet" href="${resource(dir:'css',file:'overcast/jquery-ui-1.9.0.custom.css')}" />
-
- <link rel="shortcut icon"
- href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
- <g:layoutHead />
- <g:javascript library="jquery-1.7.2.min" />
- <g:javascript library="jquery-ui-1.8.7.custom.min" />
- <g:javascript library="bootstrap.min" />
-
- <g:javascript library="jquery.i18n.properties-min-1.0.9" />
- <g:javascript library="mydrop/lingo_common" />
- <g:javascript library="mydrop/main" />
- <g:javascript library="jquery-ui-13" />
- <g:javascript library="jquery.blockUI" />
- <g:javascript library="jquery.ba-bbq.min" />
- <g:javascript library="jquery-ui-13" />
- <g:javascript library="jquery.tools.min" />
- <g:javascript library="jquery.gritter.min" />
- <g:javascript library="jquery.opacityrollover" />
-<!-- preserve the application context as a js variable for use in AJAX callbacks -->
-<script type="text/javascript">
- context = "${request.contextPath}";
-
- // hack for now
-
- context = context.replace("/null", "");
+ <head>
+ <g:render template="/common/cssAndJs"/>
+ <!-- preserve the application context as a js variable for use in AJAX callbacks -->
+ <script type="text/javascript">
+ context = "${request.contextPath}";
+ context = context.replace("/null", "");
+ scheme = "${request.scheme}";
+ host = "${request.localName}";
+ port = "${request.localPort}";
+
+ $(function(){
+
+ jQuery.i18n.properties({
+ name:'messages',
+ path:context + '/js/bundles/',
+ mode:'both'
+ });
- scheme = "${request.scheme}";
- host = "${request.localName}";
- port = "${request.localPort}";
-
- $(function(){
- // Keep a mapping of url-to-container for caching purposes.
- var cache = {
- // If url is '' (no fragment), display this div's content.
- '': $('.bbq-default')
- };
-
-
- // Bind an event to window.onhashchange that, when the history state changes,
- // gets the url from the hash and displays either our cached content or fetches
- // new content to be displayed.
- $(window).bind( 'hashchange', function(e) {
-
- processStateChange( $.bbq.getState());
-
- });
-
- jQuery.i18n.properties({
- name:'messages',
- path:'js/bundles/',
- mode:'both'
- });
-
- // Since the event is only triggered when the hash changes, we need to trigger
- // the event now, to handle the hash the page may have loaded with.
- // $(window).trigger( 'hashchange' );
-
- });
+ });
-</script>
+ </script>
</head>
-<body>
-<div id="bannercontainer">
- <!-- image banner -->
-</div>
-<div id="bd" style="height:100%;">
-<div id="defaultDialogDiv"><!-- default for general jquery dialogs --></div>
-<div id="yui-main" style="height:100%;">
-<div class="yui-b" style="height:100%;">
-<div id="mainDiv" class="yui-ge" style="height:100%;">
-<div id="mainDivCol1" class="yui-u first" style="height:100%;"><!-- PUT MAIN COLUMN 1 CODE HERE -->
- <g:layoutBody />
-</div>
+<body style="height:100%;padding-top: 60px;">
+ <div id="wrap">
+ <g:render template="/common/topbar"/>
+
+ <div class="container-fluid">
+ <g:layoutBody />
+ </div>
+ <div id="push"><!-- for sticky footers --></div>
</div>
-</div>
-</div>
-</div>
-</div>
-<div id="ft"><!-- PUT FOOTER CODE HERE -->
<g:render template="/common/footer" />
</div>
</body>
diff --git a/idrop-web/grails-app/views/metadata/metadataTable.gsp b/idrop-web/grails-app/views/metadata/metadataTable.gsp
index 47df3c5..9d11109 100755
--- a/idrop-web/grails-app/views/metadata/metadataTable.gsp
+++ b/idrop-web/grails-app/views/metadata/metadataTable.gsp
@@ -1,6 +1,6 @@
<g:form name="metadataDetailsForm" action="" id="metadataDetailsForm">
<table cellspacing="0" cellpadding="0" border="0"
- id="metaDataDetailsTable" style="width: 100%;">
+ id="metaDataDetailsTable" class="table table-striped table-hover" style="width: 100%;">
<thead>
<tr>
<th></th>
diff --git a/idrop-web/grails-app/views/sharing/aclTable.gsp b/idrop-web/grails-app/views/sharing/aclTable.gsp
index dd2d99b..22cf12b 100755
--- a/idrop-web/grails-app/views/sharing/aclTable.gsp
+++ b/idrop-web/grails-app/views/sharing/aclTable.gsp
@@ -1,6 +1,6 @@
<g:form name="aclDetailsForm" action="" id="aclDetailsForm">
<table cellspacing="0" cellpadding="0" border="0" id="aclDetailsTable"
- style="width: 100%;">
+ style="width: 100%;" class="table table-striped table-hover" >
<thead>
<tr>
<th></th>
diff --git a/idrop-web/grails-app/views/ticket/ticketPulldown.gsp b/idrop-web/grails-app/views/ticket/ticketPulldown.gsp
index f931b2a..2d593e1 100755
--- a/idrop-web/grails-app/views/ticket/ticketPulldown.gsp
+++ b/idrop-web/grails-app/views/ticket/ticketPulldown.gsp
@@ -1,4 +1,4 @@
-<div id="ticketPulldownDiv" class="alert alert-info">
+<div id="ticketPulldownDiv" class="">
<g:if test="${flash.error}">
<script>
$(function() { setErrorMessage("${flash.error}"); });
diff --git a/idrop-web/grails-app/views/ticket/ticketTable.gsp b/idrop-web/grails-app/views/ticket/ticketTable.gsp
index 0d0f34c..693b412 100755
--- a/idrop-web/grails-app/views/ticket/ticketTable.gsp
+++ b/idrop-web/grails-app/views/ticket/ticketTable.gsp
@@ -1,7 +1,7 @@
<g:form name="ticketTableForm" action="" id="ticketTableForm">
<table cellspacing="0" cellpadding="0" border="0"
- id="ticketDetailsTable" style="width: 100%;">
- <thead>
+ id="ticketDetailsTable" style="width: 100%;" class="table table-striped table-hover" >
+ <thead>
<tr>
<th></th>
<th></th>
diff --git a/idrop-web/release_notes.txt b/idrop-web/release_notes.txt
index 13d7892..b72570a 100755
--- a/idrop-web/release_notes.txt
+++ b/idrop-web/release_notes.txt
@@ -29,6 +29,9 @@ Note that the following bug and feature requests are logged in GForge with relat
*[#1119] Error when updating profile.
**Better error trapping when an exception occurs updating the profile
+*[#1157] fix ticket landing pages and error pages
+**Put ticket landing pages under profile, fixed ticket table formatting
+
==Features==
*[#984] iDrop web '2.0' redesign effort
diff --git a/idrop-web/web-app/js/mydrop/home.js b/idrop-web/web-app/js/mydrop/home.js
index 18e6d17..2cb5d32 100755
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -2168,12 +2168,16 @@ function selectTreePath(path, currentNode, currentIndex) {
// see if this node should be selected by comparing paths
- var currentId = currentNode[0].id;
- var idPath = currentId.split("/");
- if (path.length == idPath.length) {
- $.jstree._reference(dataTree).select_node(currentNode, true);
+ if (currentNode != null && currentNode[0] != null && currentNode[0].id != null) {
+ var currentId = currentNode[0].id;
+ var idPath = currentId.split("/");
+ if (path.length == idPath.length) {
+ $.jstree._reference(dataTree).select_node(currentNode, true);
+ }
}
+
+
});
}
diff --git a/idrop-web/web-app/js/mydrop/ticket.js b/idrop-web/web-app/js/mydrop/ticket.js
index 1ca26f1..9302460 100755
--- a/idrop-web/web-app/js/mydrop/ticket.js
+++ b/idrop-web/web-app/js/mydrop/ticket.js
@@ -27,22 +27,23 @@ function reloadTicketTable(absPath) {
absPath : absPath
}
+ showBlockingPanel();
+
var jqxhr = $.get(context + ticketTableUrl, params,
function(data, status, xhr) {
$('#ticketTableDiv').html(data);
+ var continueReq = checkForSessionTimeout(data, xhr);
+ if (!continueReq) {
+ return false;
+ }
+ buildTicketTableInPlace();
}, "html")
.error(function(xhr, status, error) {
var message = jQuery.i18n.prop('msg_ticket_error');
displayMessageAsBootstrapAlert(message, "#infoAccordionTicketsInner");
setErrorMessage(xhr.responseText);
- }).success(function(data, status, xhr) {
- var continueReq = checkForSessionTimeout(data, xhr);
- if (!continueReq) {
- return false;
- buildTicketTableInPlace();
- }
-
- });
+ unblockPanel();
+ });
}
@@ -67,6 +68,7 @@ function buildTicketTableInPlace() {
]
}
ticketTable = lcBuildTableInPlace("#ticketDetailsTable", ticketDetailsClick, ".browse_detail_icon", tableParams);
+ unblockPanel();
return ticketTable;
}