Changeset 765
- Timestamp:
- 03/04/07 04:45:14 (5 years ago)
- Files:
-
- 1 modified
-
trunk/XinhaCore.js (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/XinhaCore.js
r764 r765 111 111 Xinha.ie_version= parseFloat(Xinha.agt.substring(Xinha.agt.indexOf("msie")+5)); 112 112 Xinha.is_opera = (Xinha.agt.indexOf("opera") != -1); 113 Xinha.opera_version = navigator.appVersion.substring(0, navigator.appVersion.indexOf(" "))*1; 113 114 Xinha.is_mac = (Xinha.agt.indexOf("mac") != -1); 114 115 Xinha.is_mac_ie = (Xinha.is_ie && Xinha.is_mac); … … 116 117 Xinha.is_gecko = (navigator.product == "Gecko"); 117 118 Xinha.isRunLocally = document.URL.toLowerCase().search(/^file:/) != -1; 119 Xinha.is_designMode = (typeof document.designMode != 'undefined' && !Xinha.is_ie); // IE has designMode, but we're not using it 118 120 if ( Xinha.isRunLocally ) 119 121 { … … 385 387 386 388 // CharSet of the iframe, default is the charset of the document 387 this.charSet = Xinha.is_gecko? document.characterSet : document.charset;389 this.charSet = (typeof document.characterSet != 'undefined') ? document.characterSet : document.charset; 388 390 389 391 // URL-s … … 1824 1826 // Add an event to initialize the iframe once loaded. 1825 1827 editor._iframeLoadDone = false; 1826 Xinha._addEvent( 1827 this._iframe, 1828 'load', 1829 function(e) 1830 { 1831 if ( !editor._iframeLoadDone ) 1832 { 1833 editor._iframeLoadDone = true; 1834 editor.initIframe(); 1835 } 1836 return true; 1837 } 1838 ); 1828 if (Xinha.is_opera) 1829 { 1830 Xinha._addEvent( 1831 this._iframe.contentWindow, 1832 'load', 1833 function(e) 1834 { 1835 if ( !editor._iframeLoadDone ) 1836 { 1837 editor._iframeLoadDone = true; 1838 editor.initIframe(); 1839 } 1840 return true; 1841 } 1842 ) 1843 } 1844 else 1845 Xinha._addEvent( 1846 this._iframe, 1847 'load', 1848 function(e) 1849 { 1850 if ( !editor._iframeLoadDone ) 1851 { 1852 editor._iframeLoadDone = true; 1853 editor.initIframe(); 1854 } 1855 return true; 1856 } 1857 ); 1839 1858 1840 1859 }; … … 2228 2247 try 2229 2248 { 2230 return Xinha.is_ gecko? this._doc.designMode == 'on' : this._doc.body.contentEditable;2249 return Xinha.is_designMode ? this._doc.designMode == 'on' : this._doc.body.contentEditable; 2231 2250 } 2232 2251 catch (ex) … … 2250 2269 } 2251 2270 2252 if ( Xinha.is_ gecko&& this._doc.designMode != 'on' )2271 if ( Xinha.is_designMode && this._doc.designMode != 'on' ) 2253 2272 { 2254 2273 try … … 2286 2305 this.disableToolbar(); 2287 2306 2288 if ( Xinha.is_ gecko&& this._doc.designMode != 'off' )2307 if ( Xinha.is_designMode && this._doc.designMode != 'off' ) 2289 2308 { 2290 2309 try … … 4371 4390 } 4372 4391 } 4373 return Xinha.is_gecko || Xinha.ie_version >= 5.5; 4392 if ( Xinha.is_opera ) 4393 { 4394 alert("Sorry, Opera is not yet supported by Xinha."); 4395 } 4396 return Xinha.is_gecko || (Xinha.is_opera && Xinha.opera_version >= 9.1) || Xinha.ie_version >= 5.5; 4374 4397 }; 4375 4398
