From: Bjoern Schiessle Date: Fri, 2 Aug 2013 08:09:27 +0000 (+0200) Subject: attach click handler after drop-down was created X-Git-Tag: v5.0.10~16^2~2^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ecc6c8d491911f7a40beaa6230b56561bb541b6e;p=nextcloud-server.git attach click handler after drop-down was created --- 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 ) {