[svn r22307] FS#2867 - The online editor: Integration of the ImageManager with the editor's dialog system: Establishing access to the returned result by the dialog.

skala
Ivan Tcholakov 17 years ago
parent e41f588671
commit 1dade8d80c
  1. 3
      main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/images.js
  2. 12
      main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/popup.js
  3. 5
      main/inc/lib/fckeditor/editor/plugins/ImageManager/fckplugin.js

@ -45,7 +45,8 @@
function selectImage(filename, alt, width, height)
{
var topDoc = window.top.document;
//var topDoc = window.top.document;
var topDoc = window.parent.document;
var obj = topDoc.getElementById('f_file'); obj.value = filename;
var obj = topDoc.getElementById('f_url'); obj.value = filename;

@ -133,8 +133,16 @@ function __dlg_translate(i18n) {
// closes the dialog and passes the return info upper.
function __dlg_close(val) {
opener.Dialog._return(val);
window.close();
if ( opener )
{
opener.Dialog._return(val);
window.close();
}
else if ( window.parent )
{
oEditor.Dialog._return(val);
window.parent.CloseDialog() ;
}
};
function __dlg_close_on_esc(ev) {

@ -232,6 +232,11 @@ function Dialog(url, action, init) {
if ( FCKConfig.OpenImageManagerInANewWindow && FCKConfig.OpenImageManagerInANewWindow.toString() == 'true' ) {
Dialog._geckoOpenModal(url, action, init);
} else {
Dialog._return = function (val) {
if (val && action) {
action(val);
}
};
Dialog._arguments = init;
FCKDialog.OpenDialog( 'FCKDialog_ImageManager', 'Image Manager', url, 800, 600 ) ;
}

Loading…
Cancel
Save