summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_versions/appinfo/app.php1
-rw-r--r--apps/files_versions/js/versions.js9
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php
index 6e7a803252e..32e4c0ce81b 100644
--- a/apps/files_versions/appinfo/app.php
+++ b/apps/files_versions/appinfo/app.php
@@ -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");
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js
index 139597f9cb0..ac8b87513f2 100644
--- a/apps/files_versions/js/versions.js
+++ b/apps/files_versions/js/versions.js
@@ -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);
+ });
+
+});