summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-06-12 19:49:52 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-14 10:22:38 +0200
commit84a651e46deff5fe577ed564e5826ff24c18f9a5 (patch)
tree1b137ebc8b504180b7bfeed99590c8c751af07e9 /apps/files_sharing/js
parente7b58ed2bdfe4bb56866e76b8fdd618946fa3c51 (diff)
downloadnextcloud-server-84a651e46deff5fe577ed564e5826ff24c18f9a5.tar.gz
nextcloud-server-84a651e46deff5fe577ed564e5826ff24c18f9a5.zip
add settings to disable server to server sharing
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/external.js6
-rw-r--r--apps/files_sharing/js/settings-admin.js11
2 files changed, 14 insertions, 3 deletions
diff --git a/apps/files_sharing/js/external.js b/apps/files_sharing/js/external.js
index 5e133db2f57..bc02ecfaf97 100644
--- a/apps/files_sharing/js/external.js
+++ b/apps/files_sharing/js/external.js
@@ -22,10 +22,10 @@ $(document).ready(function () {
password = password || '';
if (add) {
addExternalShare(remote, token, owner, name, password).then(function (result) {
- if (result && result !== 'false') {
- FileList.reload();
+ if (result.status === 'error') {
+ OC.Notification.show(result.data.message);
} else {
- OC.dialogs.alert('Error adding ' + name, 'Error adding share');
+ FileList.reload();
}
});
}
diff --git a/apps/files_sharing/js/settings-admin.js b/apps/files_sharing/js/settings-admin.js
new file mode 100644
index 00000000000..257c864b04f
--- /dev/null
+++ b/apps/files_sharing/js/settings-admin.js
@@ -0,0 +1,11 @@
+$(document).ready(function() {
+
+ $('#fileSharingSettings input').change(function() {
+ var value = 'no';
+ if (this.checked) {
+ value = 'yes';
+ }
+ OC.AppConfig.setValue('files_sharing', $(this).attr('name'), value);
+ });
+
+});