improved url generation - made use of OC.linkTo() for linking to versions history page

This commit is contained in:
Sam Tuke 2012-05-11 17:13:58 +01:00
parent c99d7dd94f
commit d98d72aa99
2 changed files with 4 additions and 4 deletions

View File

@ -54,8 +54,8 @@ if ( isset( $_GET['path'] ) ) {
// show the history only if there is something to show
if( OCA_Versions\Storage::isversioned( $path ) ) {
$count=999; //show the newest revisions
$versions=OCA_Versions\Storage::getversions( $path, $count);
$count = 999; //show the newest revisions
$versions = OCA_Versions\Storage::getversions( $path, $count );
$tmpl->assign( 'versions', array_reverse( $versions ) );

View File

@ -25,8 +25,8 @@ $(document).ready(function(){
function createVersionsDropdown(filename, files) {
var historyUrl = '../apps/files_versions/history.php?path='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename);
var historyUrl = OC.linkTo('files_versions', 'history.php?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename ) )
var html = '<div id="dropdown" class="drop" data-file="'+files+'">';
html += '<div id="private">';
html += '<select data-placeholder="File Version" id="found_versions" class="chzen-select">';