added script and loaded it for adding history button

This commit is contained in:
Sam Tuke 2012-04-25 13:56:43 +01:00
parent 81f549baee
commit 8ae1430090
2 changed files with 9 additions and 1 deletions

View File

@ -9,6 +9,7 @@ OC_App::register( array(
'name' => 'Versioning' ));
OC_APP::registerAdmin('files_versions', 'settings');
OC_UTIL::addScript('files_versions', 'versions');
// Listen to write signals
OC_Hook::connect(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_post_write, "OCA_Versions\Storage", "write_hook");

View File

@ -1,2 +1,9 @@
$(document).ready(function(){
// Add history button to files/index.php
FileActions.register('file','History',function(){return OC.imagePath('core','actions/history')},function(filename){
window.location='../apps/files_versioning/history.php?file='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename);
});
});