summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormconway <michael_conway@unc.edu>2013-06-11 14:49:13 (GMT)
committer mconway <michael_conway@unc.edu>2013-06-11 14:49:13 (GMT)
commit6236d4d4af7044e9962c3dc936360fb48a37102e (patch)
treee3da20ad060320321b8670cd3c0bbae0b104dfc9
parent715fd691a99ba645fc9942fb770f4589a6c8a123 (diff)
downloadQCG-Data-6236d4d4af7044e9962c3dc936360fb48a37102e.zip
QCG-Data-6236d4d4af7044e9962c3dc936360fb48a37102e.tar.gz
QCG-Data-6236d4d4af7044e9962c3dc936360fb48a37102e.tar.bz2
[#1475] public link cleanups
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy2
-rwxr-xr-xidrop-web/grails-app/views/browse/_browseTabContent.gsp141
-rw-r--r--idrop-web/grails-app/views/browse/dataObjectInfo.gsp2
-rwxr-xr-xidrop-web/grails-app/views/home/link.gsp2
-rw-r--r--idrop-web/web-app/js/mydrop/home.js43
5 files changed, 102 insertions, 88 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 9b74887..1fee905 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
@@ -98,7 +98,7 @@ class BrowseController {
}
- render(view: "index", model:[mode:mode,path:absPath,viewState:viewState])
+ render(view: "index", model:[mode:mode,path:absPath,viewState:viewState,irodsAccount:irodsAccount])
}
def showBrowseToolbar = {
diff --git a/idrop-web/grails-app/views/browse/_browseTabContent.gsp b/idrop-web/grails-app/views/browse/_browseTabContent.gsp
index 334a69f..e184204 100755
--- a/idrop-web/grails-app/views/browse/_browseTabContent.gsp
+++ b/idrop-web/grails-app/views/browse/_browseTabContent.gsp
@@ -1,58 +1,87 @@
- <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 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>
-
- </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>
+ <!-- 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>
+ <!-- infoDivOuter -->
+ </div>
+ <!-- data tree view -->
+</div>
+<!-- browser -->
+<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()")>
- <i class="icon-refresh"></i>
- </button>
- <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>
- </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> <!-- infoDivOuter -->
- </div> <!-- data tree view -->
- </div> <!-- browser -->
- <script>
-
-
- </script>
+</script>
diff --git a/idrop-web/grails-app/views/browse/dataObjectInfo.gsp b/idrop-web/grails-app/views/browse/dataObjectInfo.gsp
index d0dbc7c..e37c7c7 100644
--- a/idrop-web/grails-app/views/browse/dataObjectInfo.gsp
+++ b/idrop-web/grails-app/views/browse/dataObjectInfo.gsp
@@ -33,7 +33,7 @@
<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>
+ code="text.sharing" /></a></li>
<g:if
test="${grailsApplication.config.idrop.config.use.tickets==true}">
<li><a href="#tickets" id="ticketTab"><g:message
diff --git a/idrop-web/grails-app/views/home/link.gsp b/idrop-web/grails-app/views/home/link.gsp
index f1e7e87..d8bfef5 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 + "/home/index?mode=path&absPath=" + baseAbsPath;
+ window.location.href = context + "/browse/index?mode=path&absPath=" + baseAbsPath;
});
</script> \ No newline at end of file
diff --git a/idrop-web/web-app/js/mydrop/home.js b/idrop-web/web-app/js/mydrop/home.js
index 4055338..77e581c 100644
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -2564,28 +2564,6 @@ 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
@@ -2817,7 +2795,6 @@ function makePublicLinkAtPath() {
lcSendValueWithParamsAndPlugHtmlInDiv(url, params, "", function(data) {
fillInACLDialog(data);
});
-
}
/**
@@ -2847,12 +2824,23 @@ function grantPublicLink() {
absPath : path
}
- lcSendValueViaPostAndCallbackHtmlAfterErrorCheck("/browse/updatePublicLinkDialog", params, null, "#aclDialogArea", null, null);
- unblockPanel();
+ 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();
+ }).fail(function(xhr, status, error) {
+ setErrorMessage(xhr.responseText);
+ unblockPanel();
+ });
}
-
/*
*Given the contents of the 'create public link' dialog,
*/
@@ -2862,6 +2850,3 @@ function fillInACLDialog(data) {
$("#aclDialogArea").show("slow");
}
-function zzz() {
-
-}