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

推荐订阅源

D
Docker
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
量子位
T
Tailwind CSS Blog
T
Threatpost
The GitHub Blog
The GitHub Blog
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
K
Kaspersky official blog
P
Proofpoint News Feed
博客园 - 司徒正美
L
LangChain Blog
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
H
Hacker News: Front Page
T
Troy Hunt's Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
T
Tor Project blog
T
The Blog of Author Tim Ferriss
I
Intezer
P
Privacy & Cybersecurity Law Blog
美团技术团队
N
Netflix TechBlog - Medium
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI

博客园 - fisherman

学习写第一个SQL server触发器 操纵自如--页面内的配合与通信 一些DIV+CSS 命名规范 asp.net 2.0中生成RSS 避免重复提交 - fisherman - 博客园 button 删除确认 - fisherman - 博客园 用相对定位和负向移动完成图片象框阴影 负边距居中法(水平居中、垂直居中) - fisherman - 博客园 CSS 代码格式化工具 - fisherman - 博客园 JS代码的格式化和压缩 - fisherman - 博客园 把SQL SERVER里表里的数据导出成为insert into 脚本 下载网页中远程图片的方法 读取marc数据 关于ISO2709数据的格式说明 C#写的读取ISO2709格式数据的DLL 数据库打开 使用 Engine 对象创建 SQL Server Compact Edition 数据库 用SharpZipLib压缩和解压缩文件 Access数据库压缩和修复
对FckEditor编辑器在MAXTHON浏览器下选择服务器文件对话框显示不正常的改进
fisherman · 2007-08-21 · via 博客园 - fisherman

  用过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() ;    
    }
}

这样就没有问题了。
 
文章来源:

http://www.cnblogs.com/Wang-Seraph/archive/2007/04/09/705447.html