diff --git a/src/main/webapp/page/admin/content.jsp b/src/main/webapp/page/admin/content.jsp index 7f9c30cf28e45fd5dc13c285525acb7a23c8571a..897cbbd8fcb56045ca28ce9d670cd6394f948615 100755 --- a/src/main/webapp/page/admin/content.jsp +++ b/src/main/webapp/page/admin/content.jsp @@ -2,7 +2,12 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="pg" tagdir="/WEB-INF/tags/page" %> -<pg:restricted> +<c:set var="redirect"> + <p>Not authorized. Redirecting...</p> + <script> window.location.href = XNAT.url.rootUrl('/') </script> +</c:set> + +<pg:restricted msg="${redirect}"> <link rel="stylesheet" type="text/css" href="${sessionScope.siteRoot}/page/admin/style.css"> @@ -43,28 +48,14 @@ // get rid of the 'targetSource' property delete XNAT.data.siteConfig.targetSource; - -// var jsonUrl = XNAT.url.rootUrl('/page/admin/data/config/site-admin-sample-new.yaml'); var jsonUrl = XNAT.url.rootUrl('/xapi/spawner/resolve/siteAdmin/adminPage'); -// var jsonUrl = XNAT.url.rootUrl('/page/admin/data/site-admin-page.json'); $.get({ url: jsonUrl, - // dataType: 'text', success: function(data){ - - if (typeof data === 'string') { - data = YAML.parse(data); - } - - // console.log(JSON.stringify(data, ' ', 1)); - var adminTabs = XNAT.spawner.spawn(data); adminTabs.render('#admin-config-tabs > .xnat-tab-content'); XNAT.app.adminTabs = adminTabs; - - // xmodal.loading.closeAll(); - } }); diff --git a/src/main/webapp/page/admin/info/content.jsp b/src/main/webapp/page/admin/info/content.jsp index 282eb405913a031ccdd4cda01a1215e9c1385408..a6c1201782296b94a570dfeedabea18cc422da7c 100644 --- a/src/main/webapp/page/admin/info/content.jsp +++ b/src/main/webapp/page/admin/info/content.jsp @@ -10,8 +10,6 @@ </pg:init> </c:if> -<c:set var="pageName" value="info" scope="request"/> - <c:set var="_msg"> Nope. </c:set> diff --git a/src/main/webapp/page/admin/info/index.jsp b/src/main/webapp/page/admin/info/index.jsp index 9acf00fb6d9b9723cc42474f69693de4dca8964d..2b09ca29044e2812eefbfe6da91bbeafd2fbc09f 100755 --- a/src/main/webapp/page/admin/info/index.jsp +++ b/src/main/webapp/page/admin/info/index.jsp @@ -3,7 +3,7 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <pg:wrapper> - <pg:xnat> + <pg:xnat title="Info."> <jsp:include page="content.jsp"/> diff --git a/src/main/webapp/page/index.jsp b/src/main/webapp/page/index.jsp index d52a01fcbf975711a8fab553125c133188534b97..aa8cdd5324502073c6aefe5a193ca0ce1fd799ff 100755 --- a/src/main/webapp/page/index.jsp +++ b/src/main/webapp/page/index.jsp @@ -5,13 +5,13 @@ <pg:wrapper> <pg:xnat> - <c:set var="view" value="${param.view}"/> + <c:set var="incl" value="content.jsp"/> - <c:if test="${empty view}"> - <c:set var="view" value="content"/> + <c:if test="${not empty param.view}"> + <c:set var="incl" value="/page/${param.view}/content.jsp"/> </c:if> - <jsp:include page="${view}.jsp"/> + <jsp:include page="${incl}"/> </pg:xnat> </pg:wrapper> diff --git a/src/main/webapp/scripts/FileViewer.js b/src/main/webapp/scripts/FileViewer.js index 5d91a6f63c88961bae1ddb962651be18bd98379c..3b10e47eaad5b47defd79cb6c526577e5df0a49e 100644 --- a/src/main/webapp/scripts/FileViewer.js +++ b/src/main/webapp/scripts/FileViewer.js @@ -637,7 +637,7 @@ function FileViewer(_obj){ }; YAHOO.util.Connect.asyncRequest('POST', this.obj.refresh + '×tamp=' + (new Date()).getTime(), catalogRefreshCallback, null); //xmodal.close(); - xmodal.loading.open('Please wait...'); + xmodal.loading.open('#wait'); }; this.catalogRefreshCancel = function () { diff --git a/src/main/webapp/scripts/footer.js b/src/main/webapp/scripts/footer.js index 66804209a2575f79a948ed7f2f8978ee95117686..f87b763ef705c26709353ceea22ba94dc66ebffd 100644 --- a/src/main/webapp/scripts/footer.js +++ b/src/main/webapp/scripts/footer.js @@ -530,9 +530,9 @@ $(function(){ e.stopImmediatePropagation(); return false; }); - + // add version to title attribute of XNAT logos - if (typeof logged_in != 'undefined' && logged_in == true){ + if (typeof window.top.logged_in != 'undefined' && window.top.logged_in == true){ Cookies.set('SESSION_ACTIVE', 'true'); $.get(serverRoot+'/xapi/siteConfig/buildInfo',function(data){ XNAT_version = data.version + " build: " + data.buildNumber; diff --git a/src/main/webapp/scripts/xnat/app/timeout.js b/src/main/webapp/scripts/xnat/app/timeout.js index 0b499ab80320be9297ffb165d11684320148961c..84f2a4997821d046a67b616edfe64833bfacae8f 100644 --- a/src/main/webapp/scripts/xnat/app/timeout.js +++ b/src/main/webapp/scripts/xnat/app/timeout.js @@ -103,7 +103,7 @@ var XNAT = getObject(XNAT); // has it been cancelled? cookie.SESSION_DIALOG_CANCELLED = timeoutCookie('SESSION_DIALOG_CANCELLED').set('false'); - // has the session timed out? + // is the session still active? (could have been logged out in another window) cookie.SESSION_ACTIVE = timeoutCookie('SESSION_ACTIVE').get(); // has the session timed out? @@ -119,7 +119,7 @@ var XNAT = getObject(XNAT); cookie.SESSION_LAST_LOGIN = timeoutCookie('SESSION_LAST_LOGIN'); // what was the last page visited? - cookie.SESSION_LAST_PAGE = timeoutCookie('SESSION_LAST_PAGE').set(window.location.href); + cookie.SESSION_LAST_PAGE = timeoutCookie('SESSION_LAST_PAGE').get(); timeout.expCookie = ''; @@ -247,6 +247,7 @@ var XNAT = getObject(XNAT); cookie.SESSION_DIALOG_CANCELLED.set('false'); cookie.SESSION_TIMED_OUT.set('true'); cookie.SESSION_LOGOUT_REDIRECT.set('true'); + cookie.SESSION_LAST_PAGE.set(window.location.href); timeoutCookie('WARNING_BAR').set('OPEN'); timeoutCookie('guest').set('true'); // need to wait a little longer before reloading @@ -331,7 +332,7 @@ var XNAT = getObject(XNAT); return false; } - // redirect if the logged out from another window + // redirect if logged out from another window if (cookie.SESSION_ACTIVE.is('false')) { redirectToLogin(); return false; diff --git a/src/main/webapp/xdat-templates/screens/XDATScreen_report_xdat_user.vm b/src/main/webapp/xdat-templates/screens/XDATScreen_report_xdat_user.vm index 990b141eaff0ea1bff4ba2d58da7007fc534169b..09a1fb86af8192d6367dbec6dc16ea6b78b6aaa6 100644 --- a/src/main/webapp/xdat-templates/screens/XDATScreen_report_xdat_user.vm +++ b/src/main/webapp/xdat-templates/screens/XDATScreen_report_xdat_user.vm @@ -48,7 +48,7 @@ $page.setVlinkColor($ui.vlink) <script type="text/javascript"> function goToUsersPage(){ - xmodal.loading.open('Please wait...'); + xmodal.loading.open('#wait'); window.top.location.href = serverRoot + '/app/template/XDATScreen_admin.vm'; } diff --git a/src/main/webapp/xdat-templates/screens/XDATScreen_report_xdat_userGroup.vm b/src/main/webapp/xdat-templates/screens/XDATScreen_report_xdat_userGroup.vm index e1a61f84c7a774d4d88a024a58710d615a6e21b8..48676336e3d54683a7dc5ce34cacbbab2496da81 100644 --- a/src/main/webapp/xdat-templates/screens/XDATScreen_report_xdat_userGroup.vm +++ b/src/main/webapp/xdat-templates/screens/XDATScreen_report_xdat_userGroup.vm @@ -135,7 +135,7 @@ $page.setVlinkColor($ui.vlink) </TABLE> <script type="text/javascript"> function goToGroupsPage(){ - xmodal.loading.open('Please wait...'); + xmodal.loading.open('#wait'); window.top.location.href = serverRoot + '/app/template/XDATScreen_groups.vm'; } </script> diff --git a/src/main/webapp/xdat-templates/screens/admin_bar.vm b/src/main/webapp/xdat-templates/screens/admin_bar.vm index 5af5f3f1860884cfe641f7e9e787c2904faac945..117aa02183e86bc32a406189ccc697b6d8c298e4 100644 --- a/src/main/webapp/xdat-templates/screens/admin_bar.vm +++ b/src/main/webapp/xdat-templates/screens/admin_bar.vm @@ -128,16 +128,17 @@ url = url.replace(/\/\/popup/,'/popup/'); // watch out for '//popup' xmodal.iframe({ src: url, - width: '60%', + width: '80%', height: '80%', minHeight: 540, - minWidth: 720, - maxWidth: 960, + minWidth: 840, +// maxWidth: 960, + padding: '20px', title: url, titleStyle: 'visibility:hidden;opacity:0;', footer: false, onClose: function(){ - xmodal.loading.open('Please wait...'); + xmodal.loading.open('#wait'); window.top.location.reload(true); } }); diff --git a/src/main/webapp/xnat-templates/screens/XDATScreen_admin_options.vm b/src/main/webapp/xnat-templates/screens/XDATScreen_admin_options.vm index 45aee6d7c6849c6dc5686aeb185bd64e42115dbb..8556a4d1a8e5569aa3ac056b6652f015195f7383 100644 --- a/src/main/webapp/xnat-templates/screens/XDATScreen_admin_options.vm +++ b/src/main/webapp/xnat-templates/screens/XDATScreen_admin_options.vm @@ -74,7 +74,7 @@ $!template.setLayoutTemplate("DefaultExptList.vm") title: ' ', // titleStyle: 'visibility:hidden;opacity:0;', // onClose: function(){ -// xmodal.loading.open('Please wait...'); +// xmodal.loading.open('#wait'); // window.top.location.reload(true); // }, footer: false diff --git a/src/main/webapp/xnat-templates/screens/workflow_alert.vm b/src/main/webapp/xnat-templates/screens/workflow_alert.vm index dd76edf70ffd2c452b40664a661542fa1b4eb199..b39887d23ee9106e2679e938f9050bdb7f40a0d8 100644 --- a/src/main/webapp/xnat-templates/screens/workflow_alert.vm +++ b/src/main/webapp/xnat-templates/screens/workflow_alert.vm @@ -78,7 +78,7 @@ function workflowUpdate(){ - xmodal.loading.open('Please wait...'); + xmodal.loading.open('#wait'); function workflowUpdateOK(data, status, o){ xmodal.loading.close();