惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
博客园 - Franky
T
Tailwind CSS Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
Hugging Face - Blog
Hugging Face - Blog
有赞技术团队
有赞技术团队
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
阮一峰的网络日志
阮一峰的网络日志
C
Check Point Blog
爱范儿
爱范儿
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LangChain Blog
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
Microsoft Security Blog
Microsoft Security Blog
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)

博客园 - Seraph's Zone(WelCome)

ADO 数据类型转换表[转] VC中identifier was truncated to '255' [转]写给C++程序员的C# FAQ [Invalid postback or callback argument]昨晚调试程序时出现的问题,MARK一下 试图运行项目时出错:无法在web服务器上启动项目得解决办法 右键无法查看网页源代码修复方法 javascript去空格函数 asp.net程序编译调试时偶尔出现访问被拒绝的错误 使用VS2003创建WEB程序的时候出现"AutoMation服务器不能创建对象"错误 如何在ViewState中保存和取出自己定义的类 ASP.NET开发-实用技巧 (“~”的用法、保存滚动条的位置……) Visual Studio.Net 快捷键表 asp.net 获取插入记录的ID url传递中文的解决方案 (转) 解决ASP.NET2.0和1.1在同一台电脑上不能并行的问题(转) 创建插件框架(1) 利用SQLDMO进行数据库备份还原操作 VS2005 常用快捷键 将文件长路径转换为短路径(DOS路径)
对FckEditor编辑器在MAXTHON浏览器下选择服务器文件对话框显...
Seraph's Zone(WelCome) · 2007-04-09 · via 博客园 - Seraph's Zone(WelCome)

    用过FckEditor的朋友都知道,它的选择图片对话框中“浏览服务器”按钮。点击该按钮可以浏览以前已经上传过的文件。不过这个按钮点击后弹出的对话框在MAXTHON浏览器下是以标签形式打开的,这样模态对话框就始终显示在了浏览文件窗口之前,要想选择文件得先关掉模态对话框。先前有朋友提出把弹出模态对话框的功能改为ShowModlessDialog,这个终究不是解决之道,现将我的解决方法写下来与大家分享:
思路就是基于IE内核的浏览器采用模态对话框弹出浏览服务器窗口,其他的仍然window.open不变

1:修改\fckeditor\editor\dialog\common\fck_dialog_common.js

 1 function OpenFileBrowser( url, width, height )
 2 {
 3     // oEditor must be defined.
 4 
 5     var iLeft = ( oEditor.FCKConfig.ScreenWidth  - width ) / 2 ;
 6     var iTop  = ( oEditor.FCKConfig.ScreenHeight - height ) / 2 ;
 7 
 8     var sOptions = "toolbar=no,status=no,resizable=no,dependent=yes,scrollbars=yes" ;
 9     sOptions += ",width=" + width ;
10     sOptions += ",height=" + height ;
11     sOptions += ",left=" + iLeft ;
12     sOptions += ",top=" + iTop ;
13 
14     // The "PreserveSessionOnFileBrowser" because the above code could be
15     // blocked by popup blockers.
16     if ( oEditor.FCKConfig.PreserveSessionOnFileBrowser && oEditor.FCKBrowserInfo.IsIE )
17     {
18         // The following change has been made otherwise IE will open the file
19         // browser on a different server session (on some cases):
20         // http://support.microsoft.com/default.aspx?scid=kb;en-us;831678
21         // by Simone Chiaretta.
22         var oWindow = oEditor.window.open( url, 'FCKBrowseWindow', sOptions ) ;
23 
24         if ( oWindow )
25         {
26             // Detect Yahoo popup blocker.
27             try
28             {
29                 var sTest = oWindow.name ; // Yahoo returns "something", but we can't access it, so detect that and avoid strange errors for the user.
30                 oWindow.opener = window ;
31             }
32             catch(e)
33             {
34                 alert( oEditor.FCKLang.BrowseServerBlocked ) ;
35             }
36         }
37         else
38             alert( oEditor.FCKLang.BrowseServerBlocked ) ;
39     }
40     else
41     {    
            //这里是修改部分
42         if(oEditor.FCKBrowserInfo.IsIE)
43         {
44             window.showModalDialog(url+"&rdm="+new Date(),window,"status:false;dialogWidth:"+width+"px;dialogHeight:"+height+"px\"");
45         }
46         else
47         {
48             window.open( url, 'FCKBrowseWindow', sOptions ) ;
49         }
50     }
51 }

2:修改\fckeditor\editor\filemanager\browser\default\frmresourceslist.html

function OpenFile( fileUrl )
{
    
if( window.dialogArguments)
    {
        window.dialogArguments.SetUrl( fileUrl ) ;
        window.close() ;
        window.dialogArguments.focus() ;
    }
    
else
    {    
        window.top.opener.SetUrl( fileUrl ) ;
        window.top.close() ;
        window.top.opener.focus() ;    
    }
}

这样就没有问题了。