aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2013-02-20 08:32:36 -0800
committerFrank Karlitschek <frank@owncloud.org>2013-02-20 08:32:36 -0800
commit57fbfaf86a8a9c47ffe7daaef2b889a6bdd3907c (patch)
tree5e6322e0e3a96f81e4932c6d95f7e182824b786a
parentd426a09f900c2edcbe03ee63d1a9f819303de240 (diff)
parent94e5de8fd08c832b713a8162609857b36ed995f7 (diff)
downloadnextcloud-server-57fbfaf86a8a9c47ffe7daaef2b889a6bdd3907c.tar.gz
nextcloud-server-57fbfaf86a8a9c47ffe7daaef2b889a6bdd3907c.zip
Merge pull request #1787 from maelzx/patch-1
Update apps/files_versions/js/versions.js
-rw-r--r--apps/files_versions/js/versions.js10
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',