diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index b9c5468981..dec222eefc 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -41,6 +41,10 @@ $(document).ready(function(){ } }); +function goToVersionPage(url){ + window.location(url); +} + function createVersionsDropdown(filename, files) { var historyUrl = OC.linkTo('files_versions', 'history.php') + '?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename ); @@ -51,7 +55,7 @@ function createVersionsDropdown(filename, files) { html += ''; html += ''; html += ''; - html += ''; + html += ''; html += ''; if (filename) { @@ -60,6 +64,10 @@ function createVersionsDropdown(filename, files) { } else { $(html).appendTo($('thead .share')); } + + $("#makelink").click(function() { + goToVersionPage(historyUrl); + }); $.ajax({ type: 'GET',