您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->科信客户关系管理系统源码>>fckeditor/editor/fckdialog.html>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:科信客户关系管理系统源码


当前文件路径:KeXinCrm/fckeditor/editor/fckdialog.html 文件类型
普通视图
		            
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2<!-- 3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 4 * Copyright (C) 2003-2007 Frederico Caldeira Knabben 5 * 6 * == BEGIN LICENSE == 7 * 8 * Licensed under the terms of any of the following licenses at your 9 * choice: 10 * 11 * - GNU General Public License Version 2 or later (the "GPL") 12 * http://www.gnu.org/licenses/gpl.html 13 * 14 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 15 * http://www.gnu.org/licenses/lgpl.html 16 * 17 * - Mozilla Public License Version 1.1 or later (the "MPL") 18 * http://www.mozilla.org/MPL/MPL-1.1.html 19 * 20 * == END LICENSE == 21 * 22 * File Name: fckdialog.html 23 * This page is used by all dialog box as the container. 24 * 25 * File Authors: 26 * Frederico Caldeira Knabben (www.fckeditor.net) 27--> 28<html xmlns="http://www.w3.org/1999/xhtml"> 29 <head> 30 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 31 <meta name="robots" content="noindex, nofollow" /> 32 <script type="text/javascript"> 33 34// On some Gecko browsers (probably over slow connections) the 35// "dialogArguments" are not set so we must get it from the opener window. 36if ( !window.dialogArguments ) 37 window.dialogArguments = window.opener.FCKLastDialogInfo ; 38 39// Sets the Skin CSS 40document.write( '<link href="' + window.dialogArguments.Editor.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; 41 42// Sets the language direction. 43window.document.dir = window.dialogArguments.Editor.FCKLang.Dir ; 44 45var sTitle = window.dialogArguments.Title ; 46document.write( '<title>' + sTitle + '<\/title>' ) ; 47 48function LoadInnerDialog() 49{ 50 if ( window.onresize ) 51 window.onresize() ; 52 53 // First of all, translate the dialog box contents. 54 window.dialogArguments.Editor.FCKLanguageManager.TranslatePage( document ) ; 55 56 window.frames["frmMain"].document.location.href = window.dialogArguments.Page ; 57} 58 59function InnerDialogLoaded() 60{ 61 var oInnerDoc = document.getElementById('frmMain').contentWindow.document ; 62 63 // Set the language direction. 64 oInnerDoc.dir = window.dialogArguments.Editor.FCKLang.Dir ; 65 66 // Sets the Skin CSS. 67 oInnerDoc.write( '<link href="' + window.dialogArguments.Editor.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; 68 69 SetOnKeyDown( oInnerDoc ) ; 70 DisableContextMenu( oInnerDoc ) ; 71 72 return window.dialogArguments.Editor ; 73} 74 75function SetOkButton( showIt ) 76{ 77 document.getElementById('btnOk').style.visibility = ( showIt ? '' : 'hidden' ) ; 78} 79 80var bAutoSize = false ; 81 82function SetAutoSize( autoSize ) 83{ 84 bAutoSize = autoSize ; 85 RefreshSize() ; 86} 87 88function RefreshSize() 89{ 90 if ( bAutoSize ) 91 { 92 var oInnerDoc = document.getElementById('frmMain').contentWindow.document ; 93 94 var iFrameHeight ; 95 if ( document.all ) 96 iFrameHeight = oInnerDoc.body.offsetHeight ; 97 else 98 iFrameHeight = document.getElementById('frmMain').contentWindow.innerHeight ; 99 100 var iInnerHeight = oInnerDoc.body.scrollHeight ; 101 102 var iDiff = iInnerHeight - iFrameHeight ; 103 104 if ( iDiff > 0 ) 105 { 106 if ( document.all ) 107 window.dialogHeight = ( parseInt( window.dialogHeight, 10 ) + iDiff ) + 'px' ; 108 else 109 window.resizeBy( 0, iDiff ) ; 110 } 111 } 112} 113 114function Ok() 115{ 116 if ( window.frames["frmMain"].Ok && window.frames["frmMain"].Ok() ) 117 Cancel() ; 118} 119 120function Cancel( dontFireChange ) 121{ 122 if ( !dontFireChange ) 123 { 124 // All dialog windows, by default, will fire the "OnSelectionChange" 125 // event, no matter the Ok or Cancel button has been pressed. 126 window.dialogArguments.Editor.FCK.Events.FireEvent( 'OnSelectionChange' ) ; 127 } 128 window.close() ; 129} 130 131// Object that holds all available tabs. 132var oTabs = new Object() ; 133 134function TabDiv_OnClick() 135{ 136 SetSelectedTab( this.TabCode ) ; 137} 138 139function AddTab( tabCode, tabText, startHidden ) 140{ 141 if ( typeof( oTabs[ tabCode ] ) != 'undefined' ) 142 return ; 143 144 var eTabsRow = document.getElementById( 'Tabs' ) ; 145 146 var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1 ) ; 147 oCell.noWrap = true ; 148 149 var oDiv = document.createElement( 'DIV' ) ; 150 oDiv.className = 'PopupTab' ; 151 oDiv.innerHTML = tabText ; 152 oDiv.TabCode = tabCode ; 153 oDiv.onclick = TabDiv_OnClick ; 154 155 if ( startHidden ) 156 oDiv.style.display = 'none' ; 157 158 eTabsRow = document.getElementById( 'TabsRow' ) ; 159 160 oCell.appendChild( oDiv ) ; 161 162 if ( eTabsRow.style.display == 'none' ) 163 { 164 var eTitleArea = document.getElementById( 'TitleArea' ) ; 165 eTitleArea.className = 'PopupTitle' ; 166 167 oDiv.className = 'PopupTabSelected' ; 168 eTabsRow.style.display = '' ; 169 170 if ( ! window.dialogArguments.Editor.FCKBrowserInfo.IsIE ) 171 window.onresize() ; 172 } 173 174 oTabs[ tabCode ] = oDiv ; 175} 176 177function SetSelectedTab( tabCode ) 178{ 179 for ( var sCode in oTabs ) 180 { 181 if ( sCode == tabCode ) 182 oTabs[sCode].className = 'PopupTabSelected' ; 183 else 184 oTabs[sCode].className = 'PopupTab' ; 185 } 186 187 if ( typeof( window.frames["frmMain"].OnDialogTabChange ) == 'function' ) 188 window.frames["frmMain"].OnDialogTabChange( tabCode ) ; 189} 190 191function SetTabVisibility( tabCode, isVisible ) 192{ 193 var oTab = oTabs[ tabCode ] ; 194 oTab.style.display = isVisible ? '' : 'none' ; 195 196 if ( ! isVisible && oTab.className == 'PopupTabSelected' ) 197 { 198 for ( var sCode in oTabs ) 199 { 200 if ( oTabs[sCode].style.display != 'none' ) 201 { 202 SetSelectedTab( sCode ) ; 203 break ; 204 } 205 } 206 } 207} 208 209function SetOnKeyDown( targetDocument ) 210{ 211 targetDocument.onkeydown = function ( e ) 212 { 213 e = e || event || this.parentWindow.event ; 214 switch ( e.keyCode ) 215 { 216 case 13 : // ENTER 217 var oTarget = e.srcElement || e.target ; 218 if ( oTarget.tagName == 'TEXTAREA' ) 219 return true ; 220 Ok() ; 221 return false ; 222 case 27 : // ESC 223 Cancel() ; 224 return false ; 225 break ; 226 } 227 return true ; 228 } 229} 230SetOnKeyDown( document ) ; 231 232function DisableContextMenu( targetDocument ) 233{ 234 if ( window.dialogArguments.Editor.FCKBrowserInfo.IsIE ) return ; 235 236 // Disable Right-Click 237 var oOnContextMenu = function( e ) 238 { 239 var sTagName = e.target.tagName ; 240 if ( ! ( ( sTagName == "INPUT" && e.target.type == "text" ) || sTagName == "TEXTAREA" ) ) 241 e.preventDefault() ; 242 } 243 targetDocument.addEventListener( 'contextmenu', oOnContextMenu, true ) ; 244} 245DisableContextMenu( document ) ; 246 247if ( ! window.dialogArguments.Editor.FCKBrowserInfo.IsIE ) 248{ 249 window.onresize = function() 250 { 251 var oFrame = document.getElementById("frmMain") ; 252 253 if ( ! oFrame ) 254 return ; 255 256 oFrame.height = 0 ; 257 258 var oCell = document.getElementById("FrameCell") ; 259 var iHeight = oCell.offsetHeight ; 260 261 oFrame.height = iHeight - 2 ; 262 } 263} 264 265if ( window.dialogArguments.Editor.FCKBrowserInfo.IsIE ) 266{ 267 function Window_OnBeforeUnload() 268 { 269 for ( var t in oTabs ) 270 oTabs[t] = null ; 271 272 window.dialogArguments.Editor = null ; 273 } 274 window.attachEvent( "onbeforeunload", Window_OnBeforeUnload ) ; 275} 276 277function Window_OnClose() 278