diff options
author | Sam Tuke <samtuke@owncloud.com> | 2012-06-20 18:25:12 +0100 |
---|---|---|
committer | Sam Tuke <samtuke@owncloud.com> | 2012-06-20 18:25:12 +0100 |
commit | 72215a818d0e222af80000909f9fa78243112533 (patch) | |
tree | 54716cbc93bdfef0513043ef4528e49ac395b3cf /apps/files_versions/js | |
parent | d6bf62ea4eb39cba5fbf8100cd8b56351cee6d0b (diff) | |
download | nextcloud-server-72215a818d0e222af80000909f9fa78243112533.tar.gz nextcloud-server-72215a818d0e222af80000909f9fa78243112533.zip |
added new user settings interface for deleting old file versions
fixed OCA_VersionsexpireAll() to use native PHP readdir()
removed local storage implementation of readdir()
Diffstat (limited to 'apps/files_versions/js')
-rw-r--r-- | apps/files_versions/js/settings-personal.js | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/apps/files_versions/js/settings-personal.js b/apps/files_versions/js/settings-personal.js new file mode 100644 index 00000000000..d9456f3f2af --- /dev/null +++ b/apps/files_versions/js/settings-personal.js @@ -0,0 +1,51 @@ +// $(document).ready(function(){ +// $('#versions').change( function(){ +// OC.msg.startSaving('#calendar .msg') +// // Serialize the data +// var post = $( '#timezone' ).serialize(); +// $.post( OC.filePath('calendar', 'ajax/settings', 'settimezone.php'), post, function(data){ +// //OC.msg.finishedSaving('#calendar .msg', data); +// }); +// return false; +// }); +// }); + +$(document).ready(function(){ + // + $('#expireAllBtn').click(function(){ + + // 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 |