From ecc6c8d491911f7a40beaa6230b56561bb541b6e Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 2 Aug 2013 10:09:27 +0200 Subject: [PATCH] attach click handler after drop-down was created --- apps/files_versions/js/versions.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index f0c1f356f3b..2a8b491b9b2 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -39,10 +39,6 @@ function createVersionsDropdown(filename, files) { var historyUrl = OC.linkTo('files_versions', 'history.php') + '?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename ); - $("#makelink").click(function() { - goToVersionPage(historyUrl); - }); - $.ajax({ type: 'GET', url: OC.filePath('files_versions', 'ajax', 'getVersions.php'), @@ -75,6 +71,10 @@ function createVersionsDropdown(filename, files) { $(html).appendTo($('thead .share')); } + $("#makelink").click(function() { + goToVersionPage(historyUrl); + }); + // if versions are available populate the dialog if (versions) { $.each( versions, function(index, row ) { -- 2.39.5