diff options
author | maelzx <maelzx@gmail.com> | 2013-02-20 11:14:24 +0800 |
---|---|---|
committer | maelzx <maelzx@gmail.com> | 2013-02-20 11:14:24 +0800 |
commit | 94e5de8fd08c832b713a8162609857b36ed995f7 (patch) | |
tree | cf4ab97db6019e3c4ed52977c207ce1e5f70f6a0 /apps/files_versions/js | |
parent | 38782036798dbe0a34995a3fca0aa92583cb9099 (diff) | |
download | nextcloud-server-94e5de8fd08c832b713a8162609857b36ed995f7.tar.gz nextcloud-server-94e5de8fd08c832b713a8162609857b36ed995f7.zip |
Update apps/files_versions/js/versions.js
Fix "All version..." button not clickable.
Reason is Google Chrome blocking inline javascript execution.
Diffstat (limited to 'apps/files_versions/js')
-rw-r--r-- | apps/files_versions/js/versions.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index b9c54689813..dec222eefce 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 += '<option value=""></option>'; html += '</select>'; html += '</div>'; - html += '<input type="button" value="All versions..." onclick="window.location=\''+historyUrl+'\'" name="makelink" id="makelink" />'; + html += '<input type="button" value="All versions..." name="makelink" id="makelink" />'; html += '<input id="link" style="display:none; width:90%;" />'; if (filename) { @@ -60,6 +64,10 @@ function createVersionsDropdown(filename, files) { } else { $(html).appendTo($('thead .share')); } + + $("#makelink").click(function() { + goToVersionPage(historyUrl); + }); $.ajax({ type: 'GET', |