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
This commit is contained in:
parent
04c6582af1
commit
b20b30b6fe
|
@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<form id="external">
|
||||
<fieldset class="personalblock">
|
||||
<strong>Versions</strong><br />
|
||||
|
||||
Configuration goes here...
|
||||
</fieldset>
|
||||
</form>
|
||||
<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>
|
||||
|
|
Loading…
Reference in New Issue