From: Frank Karlitschek Date: Mon, 30 Apr 2012 17:18:00 +0000 (+0200) Subject: Implement a basic versioning configuration. Only a on/off switch for now. X-Git-Tag: v4.0.0beta~138 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b20b30b6fe46f3a8ca8111e1a8f787eae5a7de50;p=nextcloud-server.git 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 --- 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 +} diff --git a/apps/files_versions/templates/settings.php b/apps/files_versions/templates/settings.php index 2f918257360..74882473168 100644 --- a/apps/files_versions/templates/settings.php +++ b/apps/files_versions/templates/settings.php @@ -1,7 +1,5 @@ -
-
- Versions
- - Configuration goes here... -
-
\ No newline at end of file +
+
+ />
+
+