Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/filemanager.config.js.default
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ var am = document.location.pathname.substring(1, document.location.pathname
// Set this to the directory you wish to manage.
var fileRoot = '/' + am + 'userfiles/';

// Path to the managed directory on the HTTP server
var relPath = '';

// Show image previews in grid views?
var showThumbs = true;

Expand Down
10 changes: 6 additions & 4 deletions scripts/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,26 +291,28 @@ var formatBytes = function(bytes){
// contextual menu option in list views.
// NOTE: closes the window when finished.
var selectItem = function(data){
var url = relPath+data['Path'];

if(window.opener){
if(window.tinyMCEPopup){
// use TinyMCE > 3.0 integration method
var win = tinyMCEPopup.getWindowArg("window");
win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = data['Path'];
win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = url;
if (typeof(win.ImageDialog) != "undefined") {
// Update image dimensions
if (win.ImageDialog.getImageData)
win.ImageDialog.getImageData();

// Preview if necessary
if (win.ImageDialog.showPreviewImage)
win.ImageDialog.showPreviewImage(data['Path']);
win.ImageDialog.showPreviewImage(url);
}
tinyMCEPopup.close();
return;
}
if($.urlParam('CKEditor')){
// use CKEditor 3.0 integration method
window.opener.CKEDITOR.tools.callFunction($.urlParam('CKEditorFuncNum'), data['Path']);
window.opener.CKEDITOR.tools.callFunction($.urlParam('CKEditorFuncNum'), url);
} else {
// use FCKEditor 2.0 integration method
if(data['Properties']['Width'] != ''){
Expand All @@ -319,7 +321,7 @@ var selectItem = function(data){
var h = data['Properties']['Height'];
window.opener.SetUrl(p,w,h);
} else {
window.opener.SetUrl(data['Path']);
window.opener.SetUrl(url);
}
}

Expand Down