summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorMichael Weimann <mail@michael-weimann.eu>2018-10-28 14:58:21 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-11-07 10:19:19 +0100
commite0ab2902d60b327f8e2baee4a23b73b34563fc45 (patch)
tree1fa5b342483ffe80c4fc34b590f1f5ad74f3069e /apps/files_sharing/js
parent95a19bdfdd154b2e785f0de15910795dac4a839a (diff)
downloadnextcloud-server-e0ab2902d60b327f8e2baee4a23b73b34563fc45.tar.gz
nextcloud-server-e0ab2902d60b327f8e2baee4a23b73b34563fc45.zip
Moves the terms of service into a dialog
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/public.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 2bd550a3b5c..c7169b3ce12 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -89,7 +89,7 @@ OCA.Sharing.PublicApp = {
displayName: t('files', 'Delete'),
iconClass: 'icon-delete',
}
- ]
+ ]
}
);
this.files = OCA.Files.Files;
@@ -297,10 +297,24 @@ OCA.Sharing.PublicApp = {
}
});
+ self._bindShowTermsAction();
+
// legacy
window.FileList = this.fileList;
},
+ /**
+ * Binds the click action for the "terms of service" action.
+ * Shows an OC info dialog on click.
+ *
+ * @private
+ */
+ _bindShowTermsAction: function() {
+ $('#show-terms-dialog').on('click', function() {
+ OC.dialogs.info($('#disclaimerText').val(), t('files_sharing', 'Terms of service'));
+ });
+ },
+
_showTextPreview: function (data, previewHeight) {
var textDiv = $('<div/>').addClass('text-preview');
textDiv.text(data);