summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/js
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-04-30 19:18:00 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-04-30 19:18:00 +0200
commitb20b30b6fe46f3a8ca8111e1a8f787eae5a7de50 (patch)
tree10df4d2cb7648a9381d61a3547e6e2b1af64ba57 /apps/files_versions/js
parent04c6582af1aa8b6593afa5e302fadac52646699f (diff)
downloadnextcloud-server-b20b30b6fe46f3a8ca8111e1a8f787eae5a7de50.tar.gz
nextcloud-server-b20b30b6fe46f3a8ca8111e1a8f787eae5a7de50.zip
Implement a basic versioning configuration. Only a on/off switch for now.
I changed my mind about the more complex configuration options. We go with good default for now and don´t expose all the technical options to the users. They can still override in the config file if it´s really really needed and they know what they are doing
Diffstat (limited to 'apps/files_versions/js')
-rw-r--r--apps/files_versions/js/versions.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js
index c2dfcd9f3b6..071efc9ef01 100644
--- a/apps/files_versions/js/versions.js
+++ b/apps/files_versions/js/versions.js
@@ -1,3 +1,13 @@
+$(document).ready(function() {
+ $('#versions').bind('change', function() {
+ var checked = 1;
+ if (!this.checked) {
+ checked = 0;
+ }
+ $.post(OC.filePath('files_versions','ajax','togglesettings.php'), 'versions='+checked);
+ });
+});
+
$(document).ready(function(){
// Add history button to files/index.php
@@ -103,4 +113,4 @@ function createVersionsDropdown(filename, files) {
$('#dropdown').show('blind');
$('#share_with').chosen();
-} \ No newline at end of file
+}