Skip to content
Snippets Groups Projects
Commit a7bb4b12 authored by Björn Schießle's avatar Björn Schießle
Browse files

personal settings removed, there is no need to expire versions manually

parent acc902a0
No related branches found
No related tags found
No related merge requests found
// TODO: allow the button to be clicked only once
$( document ).ready(function(){
//
$( '#expireAllBtn' ).click(
function( event ) {
// Prevent page from reloading
event.preventDefault();
// Show loading gif
$('.expireAllLoading').show();
$.getJSON(
OC.filePath('files_versions','ajax','expireAll.php'),
function(result){
if (result.status == 'success') {
$('.expireAllLoading').hide();
$('#expireAllBtn').html('Expiration successful');
} else {
// Cancel loading
$('#expireAllBtn').html('Expiration failed');
// Show Dialog
OC.dialogs.alert(
'Something went wrong, your files may not have been expired',
'An error has occurred',
function(){
$('#expireAllBtn').html(t('files_versions', 'Expire all versions')+'<img style="display: none;" class="loading" src="'+OC.filePath('core','img','loading.gif')+'" />');
}
);
}
}
);
}
);
});
\ No newline at end of file
<?php
$tmpl = new OCP\Template( 'files_versions', 'settings-personal');
OCP\Util::addscript('files_versions', 'settings-personal');
return $tmpl->fetchPage();
<form id="versions">
<fieldset class="personalblock">
<legend>
<strong><?php echo $l->t('Versions'); ?></strong>
</legend>
<p>
<?php echo $l->t('This will delete all existing backup versions of your files'); ?>
</p>
<button id="expireAllBtn">
<?php echo $l->t('Expire all versions'); ?>
<img style="display: none;" class="expireAllLoading" src="<?php echo OCP\Util::imagePath('core', 'loading.gif'); ?>" />
</button>
</fieldset>
</form>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment