summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorSam Tuke <sam@donttravelempty.com>2012-04-25 13:56:43 +0100
committerSam Tuke <sam@donttravelempty.com>2012-04-25 13:56:43 +0100
commit8ae1430090ac19915f71f27b9a77cdc44ccfefc0 (patch)
tree13d2c365c5bc6f16495191f75894ac230326a776 /apps/files_versions
parent81f549baee2078b3d5ba037e921864337edc0ea2 (diff)
downloadnextcloud-server-8ae1430090ac19915f71f27b9a77cdc44ccfefc0.tar.gz
nextcloud-server-8ae1430090ac19915f71f27b9a77cdc44ccfefc0.zip
added script and loaded it for adding history button
Diffstat (limited to 'apps/files_versions')
-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);
+ });
+
+});