summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/public.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/js/public.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);