[svn r22285] FS#2867 - The online editor: Integration of the advanced file manager with the editor's dialog system. The final step?

skala
Ivan Tcholakov 17 years ago
parent f91ed6bb2e
commit 329d6cf06b
  1. 59
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/jscripts/for_fckeditor.js

@ -1,58 +1,23 @@
//function below added by logan (cailongqun [at] yahoo [dot] com [dot] cn) from www.phpletter.com // The function below has added by logan (cailongqun [at] yahoo [dot] com [dot] cn) from www.phpletter.com
// Modifications by Juan Carlos Raña and Ivan Tcholakov, 2009
function selectFile(url) function selectFile(url) {
{
var selectedFileRowNum = $('#selectedFileRowNum').val(); var selectedFileRowNum = $('#selectedFileRowNum').val();
if(selectedFileRowNum != '' && $('#row' + selectedFileRowNum)) if(selectedFileRowNum != '' && $('#row' + selectedFileRowNum)) {
{ if ( window.opener ) {
// insert information now // The advanced file manager has been opened in a new window.
// var url = $('#fileUrl'+selectedFileRowNum).val(); //comment and replaced for put url into selecFile(url) by Juan Carlos Raña
window.opener.SetUrl( url ) ; window.opener.SetUrl( url ) ;
window.close() ; window.close() ;
} else if ( window.parent && typeof (window.parent.ParentDialog) == 'function' ) {
}else // The file manager is inside a dialog.
{ window.parent.ParentDialog().contentWindow.frames['frmMain'].SetUrl( url ) ;
alert(noFileSelected); window.parent.CloseDialog() ;
}
}
function cancelSelectFile()
{
// close popup window
window.close() ;
} }
} else {
/*
// Alternative configuration. Juan Carlos Raña
function selectFile()
{
//juan carlos raña quizá si metemos aquí un while metería todos los marcados y no solo el ultimo?, así se recogerían selecciones múltiples
var selectedFileRowNum = getNum($('input[@type=checkbox][@checked]').attr('id'));
if(selectedFileRowNum != '' && $('#row' + selectedFileRowNum))
{
// insert information now
var url = files[selectedFileRowNum]['url'];
window.opener.SetUrl(url) ;
window.close() ;
}else
{
alert(noFileSelected); alert(noFileSelected);
} }
} }
function cancelSelectFile() function cancelSelectFile() {
{
// close popup window
window.close() ; window.close() ;
} }
*/
Loading…
Cancel
Save