Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dio-el-claire committed Feb 27, 2013
1 parent 8f2fd98 commit f8fa349
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/commands/open.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ elFinder.prototype.commands.open = function() {
+ '&target=' + file.hash;
}

w = '';
// set window size for image
// set window size for image if set
if (file.dim) {
s = file.dim.split('x');
w = 'width='+(parseInt(s[0])+20) + ',height='+(parseInt(s[1])+20);
} else {
w = 'width='+parseInt(2*$(window).width()/3)+',height='+parseInt(2*$(window).height()/3);
}

if (!window.open(url, '_blank', w + ',top=50,left=50,scrollbars=yes,resizable=yes')) {
Expand Down

0 comments on commit f8fa349

Please sign in to comment.