From 6236d4d4af7044e9962c3dc936360fb48a37102e Mon Sep 17 00:00:00 2001 From: mconway Date: Tue, 11 Jun 2013 14:49:13 +0000 Subject: [#1475] public link cleanups --- (limited to 'idrop-web') 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 @@ -
-
- -
- + +
+ +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+ + +
+ + + + + + + + + +
+ + +
+ + +
+ +
- -
-
- -
- -
+ + +
+ +
+

+ +

+
+ + +
+ +
+ +
+ + + 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 @@
  • + code="text.sharing" />
  • \ 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() { - -} -- cgit