]> source.dussan.org Git - nextcloud-server.git/commitdiff
attach click handler after drop-down was created
authorBjoern Schiessle <schiessle@owncloud.com>
Fri, 2 Aug 2013 08:09:27 +0000 (10:09 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 2 Aug 2013 08:09:27 +0000 (10:09 +0200)
apps/files_versions/js/versions.js

index f0c1f356f3b6e61215693b5c5abc4175ba6a59d2..2a8b491b9b24590e74396e7274867d292358b5b4 100644 (file)
@@ -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 ) {