Skip to content

Commit

Permalink
Merge pull request #446 from servocoder/master
Browse files Browse the repository at this point in the history
Fix plugin height for case the page include other DOM elements
  • Loading branch information
simogeo committed Jan 29, 2016
2 parents 007f6b1 + 8346bc1 commit 7e170d2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
12 changes: 11 additions & 1 deletion connectors/php/filemanager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,17 @@ public function rename() {
} else {
$this->error(sprintf($this->lang('ERROR_RENAMING_FILE'),$filename,$this->get['new']));
}
}
} else {
// For image only - rename thumbnail if original image was successfully renamed
if(!is_dir($new_file) && $this->is_image($new_file)) {
$new_thumbnail = $this->get_thumbnail_path($new_file);
$old_thumbnail = $this->get_thumbnail_path($old_file);
if(file_exists($old_thumbnail)) {
rename($old_thumbnail, $new_thumbnail);
}
}
}

$array = array(
'Error'=>"",
'Code'=>0,
Expand Down
9 changes: 5 additions & 4 deletions scripts/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,15 @@ $.prompt.setDefaults({
// Forces columns to fill the layout vertically.
// Called on initial page load and on resize.
var setDimensions = function(){
var bheight = 53;

var bheight = 53,
$uploader = $('#uploader');

if($.urlParam('CKEditorCleanUpFuncNum')) bheight +=60;

var newH = $(window).height() - $('#uploader').height() - bheight;
var newH = $(window).height() - $uploader.height() - $uploader.offset().top - bheight;
$('#splitter, #filetree, #fileinfo, .vsplitbar').height(newH);
var newW = $('#splitter').width() - $('div.vsplitbar').width() - $('#filetree').width();
$('#fileinfo').width(newW);
$('#fileinfo').width(newW);
};

// Display Min Path
Expand Down

0 comments on commit 7e170d2

Please sign in to comment.