diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-04-30 19:18:00 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-04-30 19:18:00 +0200 |
commit | b20b30b6fe46f3a8ca8111e1a8f787eae5a7de50 (patch) | |
tree | 10df4d2cb7648a9381d61a3547e6e2b1af64ba57 /apps | |
parent | 04c6582af1aa8b6593afa5e302fadac52646699f (diff) | |
download | nextcloud-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')
-rw-r--r-- | apps/files_versions/js/versions.js | 12 | ||||
-rw-r--r-- | apps/files_versions/templates/settings.php | 12 |
2 files changed, 16 insertions, 8 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 +} 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 @@ -<form id="external"> - <fieldset class="personalblock"> - <strong>Versions</strong><br /> - - Configuration goes here... - </fieldset> -</form>
\ No newline at end of file +<form id="versions"> + <fieldset class="personalblock"> + <input type="checkbox" name="versions" id="versions" value="1" <?php if (OC_Config::getValue('versions', 'true')=='true') echo ' checked="checked"'; ?> /> <label for="versions"><?php echo $l->t('Enable Files Versioning'); ?></label> <br/> + </fieldset> +</form> |