[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 /* 2 * FCKeditor - The text editor for internet 3 * Copyright (C) 2003-2005 Frederico Caldeira Knabben 4 * 5 * Licensed under the terms of the GNU Lesser General Public License: 6 * http://www.opensource.org/licenses/lgpl-license.php 7 * 8 * For further information visit: 9 * http://www.fckeditor.net/ 10 * 11 * "Support Open Source software. What about a donation today?" 12 * 13 * File Name: fcktools_ie.js 14 * Utility functions. (IE version). 15 * 16 * File Authors: 17 * Frederico Caldeira Knabben (fredck@fckeditor.net) 18 */ 19 20 // Appends a CSS file to a document. 21 FCKTools.AppendStyleSheet = function( documentElement, cssFileUrl ) 22 { 23 return documentElement.createStyleSheet( cssFileUrl ) ; 24 } 25 26 // Removes all attributes and values from the element. 27 FCKTools.ClearElementAttributes = function( element ) 28 { 29 element.clearAttributes() ; 30 } 31 32 FCKTools.GetAllChildrenIds = function( parentElement ) 33 { 34 var aIds = new Array() ; 35 for ( var i = 0 ; i < parentElement.all.length ; i++ ) 36 { 37 var sId = parentElement.all[i].id ; 38 if ( sId && sId.length > 0 ) 39 aIds[ aIds.length ] = sId ; 40 } 41 return aIds ; 42 } 43 44 FCKTools.RemoveOuterTags = function( e ) 45 { 46 e.insertAdjacentHTML( 'beforeBegin', e.innerHTML ) ; 47 e.parentNode.removeChild( e ) ; 48 } 49 50 FCKTools.CreateXmlObject = function( object ) 51 { 52 var aObjs ; 53 54 switch ( object ) 55 { 56 case 'XmlHttp' : 57 aObjs = [ 'MSXML2.XmlHttp', 'Microsoft.XmlHttp' ] ; 58 break ; 59 60 case 'DOMDocument' : 61 aObjs = [ 'MSXML2.DOMDocument', 'Microsoft.XmlDom' ] ; 62 break ; 63 } 64 65 for ( var i = 0 ; i < 2 ; i++ ) 66 { 67 try { return new ActiveXObject( aObjs[i] ) ; } 68 catch (e) 69 {} 70 } 71 72 if ( FCKLang.NoActiveX ) 73 { 74 alert( FCKLang.NoActiveX ) ; 75 FCKLang.NoActiveX = null ; 76 } 77 } 78 79 FCKTools.DisableSelection = function( element ) 80 { 81 element.unselectable = 'on' ; 82 83 var e, i = 0 ; 84 while ( e = element.all[ i++ ] ) 85 { 86 switch ( e.tagName ) 87 { 88 case 'IFRAME' : 89 case 'TEXTAREA' : 90 case 'INPUT' : 91 case 'SELECT' : 92 /* Ignore the above tags */ 93 break ; 94 default : 95 e.unselectable = 'on' ; 96 } 97 } 98 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |