diff --git a/apps/files_versions/history.php b/apps/files_versions/history.php index 7f03ce0e69..312cc73432 100644 --- a/apps/files_versions/history.php +++ b/apps/files_versions/history.php @@ -35,7 +35,7 @@ if ( isset( $_GET['path'] ) ) { } // show the history only if there is something to show - if( OCA_Versions\Storage::isversioned( $path) ) { + if( OCA_Versions\Storage::isversioned( $path ) ) { $count=5; //show the newest revisions $versions=OCA_Versions\Storage::getversions( $path, $count); diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index 19838cf6ad..74a7c85070 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -2,8 +2,66 @@ $(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_versions/history.php?path='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + + if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback + + var file = $('#dir').val()+'/'+filename; + + createDropdown(filename, file) + + //window.location='../apps/files_versions/history.php?path='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + + }); }); +function createDropdown(filename, files) { + + var html = '