Changeset 964
- Timestamp:
- 02/04/08 17:45:53 (12 years ago)
- Location:
- branches/0.95_stable
- Files:
-
- 1 deleted
- 15 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/0.95_stable/XinhaCore.js
r955 r964 139 139 */ 140 140 Xinha.is_khtml = (Xinha.agt.indexOf("khtml") != -1); 141 /** Browser is WebKit 142 @type string 143 */ 144 Xinha.is_webkit = (Xinha.agt.indexOf("applewebkit") != -1); 141 145 /** Browser is Safari 142 146 @type string … … 155 159 */ 156 160 Xinha.is_win_ie = (Xinha.is_ie && !Xinha.is_mac); 157 /** Browserengine is Gecko (Mozilla) 161 /** Browserengine is Gecko (Mozilla), applies also to Safari 158 162 @type string 159 163 */ 160 Xinha.is_gecko = (navigator.product == "Gecko" && !Xinha.is_safari); // Safari lies! 164 Xinha.is_gecko = (navigator.product == "Gecko"); 165 Xinha.is_real_gecko = (navigator.product == "Gecko" && !Xinha.is_webkit); 161 166 /** File is opened locally opened ("file://" protocol) 162 167 * @type string … … 2037 2042 editor._browserSpecificPlugin = editor.registerPlugin('InternetExplorer'); 2038 2043 } 2039 else 2044 else if (Xinha.is_webkit) 2045 { 2046 url = _editor_url + 'modules/WebKit/WebKit.js'; 2047 if ( !Xinha.loadPlugins(["WebKit"], function() { editor.generate(); }, url ) ) 2048 { 2049 2050 return false; 2051 } 2052 editor._browserSpecificPlugin = editor.registerPlugin('WebKit'); 2053 } 2054 else if (Xinha.is_gecko) 2040 2055 { 2041 2056 url = _editor_url + 'modules/Gecko/Gecko.js'; … … 2856 2871 } catch (ex) {} 2857 2872 } 2858 else if ( !Xinha.is_ gecko&& this._doc.body.contentEditable !== false )2873 else if ( !Xinha.is_designMode && this._doc.body.contentEditable !== false ) 2859 2874 { 2860 2875 this._doc.body.contentEditable = false; … … 4427 4442 editor._doc.execCommand('useCSS', false, false); // useCSS deprecated & replaced by styleWithCSS 4428 4443 editor._doc.execCommand('styleWithCSS', false, true); 4429 4444 4430 4445 } catch (ex) {} 4431 4446 } … … 5089 5104 Xinha._object = null; 5090 5105 5106 /** Arrays are identified as "object" in typeof calls. Adding this tag to the Array prototype allows to distinguish between the two 5107 */ 5108 Array.prototype.isArray = true; 5109 /** RegExps are identified as "object" in typeof calls. Adding this tag to the RegExp prototype allows to distinguish between the two 5110 */ 5111 RegExp.prototype.isRegExp = true; 5091 5112 /** function that returns a clone of the given object 5092 5113 * … … 5101 5122 return null; 5102 5123 } 5103 5104 var newObj = {}; 5105 5106 // check for array objects 5107 if ( obj.constructor.toString().match( /\s*function Array\(/ ) ) 5108 { 5109 newObj = obj.constructor(); 5110 } 5124 var newObj = (obj.isArray ) ? [] : {}; 5111 5125 5112 5126 // check for function and RegExp objects (as usual, IE is fucked up) 5113 if ( obj.constructor.toString().match( /\s*function Function\(/ ) )5127 if ( obj.constructor.toString().match( /\s*function Function\(/ ) || typeof obj == 'function' ) 5114 5128 { 5115 5129 newObj = obj; // just copy reference to it 5116 5130 } 5117 else if ( obj. constructor.toString().match( /\s*function RegExp\(/ ))5131 else if ( obj.isRegExp ) 5118 5132 { 5119 5133 newObj = eval( obj.toString() ); //see no way without eval … … 5791 5805 + ".htmtableborders, .htmtableborders td, .htmtableborders th {border : 1px dashed lightgrey ! important;}\n" 5792 5806 + "html, body { border: 0px; } \n" 5793 + "body { background-color: #ffffff; } \n" 5807 + "body { background-color: #ffffff; } \n" 5808 + "img, hr { cursor: default } \n" 5794 5809 +"</style>\n"; 5795 5810 … … 6090 6105 // Unless somebody already has, make a little function to debug things 6091 6106 6092 if ( typeof dump == 'undefined' )6093 { 6094 function dump (o)6107 if (typeof dumpValues == 'undefined') 6108 { 6109 function dumpValues(o) 6095 6110 { 6096 6111 var s = ''; 6097 for ( var prop in o ) 6098 { 6099 s += prop + ' = ' + o[prop] + '\n'; 6100 } 6101 var x = window.open("", "debugger"); 6102 x.document.write('<pre>' + s + '</pre>'); 6103 } 6104 } 6112 for (var prop in o) 6113 { 6114 if (window.console && typeof window.console.log == 'function') 6115 { 6116 if (typeof console.firebug != 'undefined') 6117 console.log(o); 6118 else 6119 console.log(prop + ' = ' + o[prop] + '\n'); 6120 } 6121 else 6122 s += prop + ' = ' + o[prop] + '\n'; 6123 } 6124 if (s) 6125 { 6126 var x = window.open("", "debugger"); 6127 x.document.write('<pre>' + s + '</pre>'); 6128 } 6129 } 6130 } 6105 6131 if ( !Array.prototype.contains ) 6106 6132 { … … 7057 7083 try 7058 7084 { 7059 if (typeof XMLHttpRequest == "function")7085 if (typeof XMLHttpRequest != "undefined" && typeof XMLHttpRequest.constructor == 'function' ) // Safari's XMLHttpRequest is typeof object 7060 7086 { 7061 7087 return new XMLHttpRequest(); -
branches/0.95_stable/XinhaLoader.js
r955 r964 8 8 Xinha.is_opera = (Xinha.agt.indexOf("opera") != -1); 9 9 Xinha.is_khtml = (Xinha.agt.indexOf("khtml") != -1); 10 Xinha.is_webkit = (Xinha.agt.indexOf("applewebkit") != -1); 10 11 Xinha.is_safari = (Xinha.agt.indexOf("safari") != -1); 11 12 Xinha.opera_version = navigator.appVersion.substring(0, navigator.appVersion.indexOf(" "))*1; … … 16 17 Xinha.isRunLocally = document.URL.toLowerCase().search(/^file:/) != -1; 17 18 Xinha.is_designMode = (typeof document.designMode != 'undefined' && !Xinha.is_ie); // IE has designMode, but we're not using it 18 Xinha.isSupportedBrowser = Xinha.is_gecko || (Xinha.is_opera && Xinha.opera_version >= 9.1) || Xinha.ie_version >= 5.5 ;19 Xinha.isSupportedBrowser = Xinha.is_gecko || (Xinha.is_opera && Xinha.opera_version >= 9.1) || Xinha.ie_version >= 5.5 || Xinha.is_safari; 19 20 20 21 Xinha.loadPlugins = function(plugins, callbackIfNotReady) -
branches/0.95_stable/examples/Newbie.html
r917 r964 18 18 <form action=""> 19 19 <div> 20 <textarea id="myTextArea" name="myTextArea" rows=" 10" cols="50" style="width: 100%"></textarea>20 <textarea id="myTextArea" name="myTextArea" rows="25" cols="50" style="width: 100%"></textarea> 21 21 </div> 22 22 </form> -
branches/0.95_stable/examples/testbed.html
r897 r964 153 153 </style> 154 154 </head> 155 <body> 156 <img src=" http://xinha.python-hosting.com/trac/logo.jpg" usemap="#m1">155 <body><span style="color:purple"> 156 <img src="../images/xinha_logo.gif" usemap="#m1"> 157 157 <map name="m1"> 158 158 <area shape="rect" coords="137,101,255,124" href="http://www.mydomain.com"> … … 163 163 Aliquam et tellus vitae justo varius placerat. Suspendisse iaculis 164 164 velit semper dolor. Donec gravida tincidunt mi. Curabitur tristique 165 ante elementum turpis. Aliquamnisl. Nulla posuere neque non166 tellus. Morbi vel nibh. Cum sociis natoquepenatibus et magnis dis165 ante elementum turpis. <span style="color:green">Aliquam </span> nisl. Nulla posuere neque non 166 tellus. Morbi vel nibh. <font face="Arial"><font color="#009933">Cum sociis natoque</font></font> penatibus et magnis dis 167 167 parturient montes, nascetur ridiculus mus. Nam nec wisi. In wisi. 168 168 Curabitur pharetra bibendum lectus. … … 170 170 171 171 <ul> 172 <li > Phasellus et massa sed diam viverra semper. </li>172 <li style="color:green"> Phasellus et massa sed diam viverra semper. </li> 173 173 <li> Mauris tincidunt felis in odio. </li> 174 174 <li> Nulla placerat nunc ut pede. </li> … … 177 177 <li> Nunc sit amet metus in tortor semper mattis. </li> 178 178 </ul> 179 </ body>179 </span></body> 180 180 </html> 181 181 </textarea> -
branches/0.95_stable/modules/FullScreen/full-screen.js
r738 r964 186 186 this._htmlArea.style.left = e.config.fullScreenMargins[3] + 'px'; 187 187 this._htmlArea.style.top = e.config.fullScreenMargins[0] + 'px'; 188 if ( !Xinha.is_ie ) this._htmlArea.style.border = 'none';188 if ( !Xinha.is_ie && !Xinha.is_webkit ) this._htmlArea.style.border = 'none'; 189 189 this._isFullScreen = true; 190 190 resetScroll(); -
branches/0.95_stable/modules/Gecko/Gecko.js
r955 r964 189 189 /* This is now handled by a plugin 190 190 case 13: // ENTER 191 if( !ev.shiftKey && editor.config.mozParaHandler == 'dirty' ) 192 { 193 this.dom_checkInsertP(); 194 Xinha._stopEvent(ev); 195 } 191 196 192 break;*/ 197 193 … … 370 366 return true; // Indicate paste is done, stop command being issued to browser by Xinha.prototype.execCommand 371 367 } 368 break; 369 case 'removeformat': 370 var editor = this.editor; 371 var sel = editor.getSelection(); 372 var selSave = editor.saveSelection(sel); 373 var range = editor.createRange(sel); 374 375 var els = editor._doc.body.getElementsByTagName('*'); 376 377 var start = ( range.startContainer.nodeType == 1 ) ? range.startContainer : range.startContainer.parentNode; 378 var i, el; 379 if (sel.isCollapsed) range.selectNodeContents(editor._doc.body); 380 381 for (i=0; i<els.length;i++) 382 { 383 el = els[i]; 384 if ( range.isPointInRange(el, 0) || (els[i] == start && range.startOffset == 0)) 385 { 386 el.removeAttribute('style'); 387 } 388 } 389 this.editor._doc.execCommand(cmdID, UI, param); 390 editor.restoreSelection(selSave); 391 return true; 392 break; 372 393 } 373 394 … … 620 641 { 621 642 var sel = this.getSelection(); 643 if (sel.isCollapsed) return ''; 622 644 var range = this.createRange(sel); 623 645 return Xinha.getHTML(range.cloneContents(), false, this); … … 710 732 var after = ta.value.substring( index, ta.value.length ); 711 733 712 if ( after.match(/^[^<]*>/) ) // make sure cursor is in an editable area (outside tags, script blocks, and inside the body)734 if ( after.match(/^[^<]*>/) ) // make sure cursor is in an editable area (outside tags, script blocks, entities, and inside the body) 713 735 { 714 736 var tagEnd = after.indexOf(">") + 1; … … 716 738 } 717 739 else ta.value = before + cc + after; 740 ta.value = ta.value.replace(new RegExp ('(&[^'+cc+']*?)('+cc+')([^'+cc+']*?;)'), "$1$3$2"); 718 741 ta.value = ta.value.replace(new RegExp ('(<script[^>]*>[^'+cc+']*?)('+cc+')([^'+cc+']*?<\/script>)'), "$1$3$2"); 719 742 ta.value = ta.value.replace(new RegExp ('^([^'+cc+']*)('+cc+')([^'+cc+']*<body[^>]*>)(.*?)'), "$1$3$2$4"); -
branches/0.95_stable/modules/GetHtml/DOMwalk.js
r943 r964 147 147 } 148 148 var name = a.nodeName.toLowerCase(); 149 if ( /_moz_editor_bogus_node/.test(name) )149 if ( /_moz_editor_bogus_node/.test(name) || ( name == 'class' && a.nodeValue == 'webkit-block-placeholder') ) 150 150 { 151 151 html = ""; … … 181 181 { 182 182 value = a.nodeValue; 183 if (name == 'class') 184 { 185 value = value.replace(/Apple-style-span/,''); 186 if (!value) continue; 187 } 183 188 // IE seems not willing to return the original values - it converts to absolute 184 189 // links using a.nodeValue, a.value, a.stringValue, root.getAttribute("href") -
branches/0.95_stable/modules/GetHtml/TransformInnerHTML.js
r919 r964 34 34 35 35 Xinha.RegExpCache = [ 36 /*00*/ new RegExp().compile(/<\s*\/?([^\s\/>]+)[\s*\/>]/gi),//lowercase tags37 /*01*/ new RegExp().compile(/(\s+)_moz[^=>]*=[^\s>]*/gi),//strip _moz attributes38 /*02*/ new RegExp().compile(/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g),// find attributes39 /*03*/ new RegExp().compile(/\/>/g),//strip singlet terminators40 /*04*/ new RegExp().compile(/<(br|hr|img|input|link|meta|param|embed|area)((\s*\S*="[^"]*")*)>/g),//terminate singlet tags41 /*05*/ new RegExp().compile(/(<\w+\s+(\w*="[^"]*"\s+)*)(checked|compact|declare|defer|disabled|ismap|multiple|no(href|resize|shade|wrap)|readonly|selected)([\s>])/gi),//expand singlet attributes42 /*06*/ new RegExp().compile(/(="[^']*)'([^'"]*")/),//check quote nesting43 /*07*/ new RegExp().compile(/&(?=(?!(#[0-9]{2,5};|[a-zA-Z0-9]{2,6};|#x[0-9a-fA-F]{2,4};))[^<]*>)/g),//expand query ampersands not in html entities44 /*08*/ new RegExp().compile(/<\s+/g),//strip tagstart whitespace45 /*09*/ new RegExp().compile(/\s+(\/)?>/g),//trim whitespace46 /*10*/ new RegExp().compile(/\s{2,}/g),//trim extra whitespace47 /*11*/ new RegExp().compile(/\s+([^=\s]+)((="[^"]+")|([\s>]))/g),// lowercase attribute names48 /*12*/ new RegExp().compile(/\s+contenteditable(=[^>\s\/]*)?/gi),//strip contenteditable49 /*13*/ new RegExp().compile(/((href|src)=")([^\s]*)"/g), //find href and src for stripBaseHref()50 /*14*/ new RegExp().compile(/<\/?(div|p|h[1-6]|table|tr|td|th|ul|ol|li|blockquote|object|br|hr|img|embed|param|pre|script|html|head|body|meta|link|title|area|input|form|textarea|select|option)[^>]*>/g),51 /*15*/ new RegExp().compile(/<\/(div|p|h[1-6]|table|tr|ul|ol|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g),//blocklevel closing tag52 /*16*/ new RegExp().compile(/<(div|p|h[1-6]|table|tr|ul|ol|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g),//blocklevel opening tag53 /*17*/ new RegExp().compile(/<(td|th|li|option|br|hr|embed|param|pre|meta|link|title|area|input|textarea)[^>]*>/g),//singlet tag or output on 1 line54 /*18*/ new RegExp().compile(/(^|<\/(pre|script)>)(\s|[^\s])*?(<(pre|script)[^>]*>|$)/g),//find content NOT inside pre and script tags55 /*19*/ new RegExp().compile(/(<pre[^>]*>)([\s\S])*?(<\/pre>)/g),//find content inside pre tags56 /*20*/ new RegExp().compile(/(^|<!--[\s\S]*?-->)([\s\S]*?)(?=<!--[\s\S]*?-->|$)/g),//find content NOT inside comments57 /*21*/ new RegExp().compile(/\S*=""/g), //find empty attributes58 /*22*/ new RegExp().compile(/<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<\/?\w[^>]*>/g), //find all tags, including comments and php59 /*23*/ new RegExp().compile(/(^|<\/script>)[\s\S]*?(<script[^>]*>|$)/g)//find content NOT inside script tags36 /*00*/ /<\s*\/?([^\s\/>]+)[\s*\/>]/gi,//lowercase tags 37 /*01*/ /(\s+)_moz[^=>]*=[^\s>]*/gi,//strip _moz attributes 38 /*02*/ /\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,// find attributes 39 /*03*/ /\/>/g,//strip singlet terminators 40 /*04*/ /<(br|hr|img|input|link|meta|param|embed|area)((\s*\S*="[^"]*")*)>/g,//terminate singlet tags 41 /*05*/ /(<\w+\s+(\w*="[^"]*"\s+)*)(checked|compact|declare|defer|disabled|ismap|multiple|no(href|resize|shade|wrap)|readonly|selected)([\s>])/gi,//expand singlet attributes 42 /*06*/ /(="[^']*)'([^'"]*")/,//check quote nesting 43 /*07*/ /&(?=(?!(#[0-9]{2,5};|[a-zA-Z0-9]{2,6};|#x[0-9a-fA-F]{2,4};))[^<]*>)/g,//expand query ampersands not in html entities 44 /*08*/ /<\s+/g,//strip tagstart whitespace 45 /*09*/ /\s+(\/)?>/g,//trim whitespace 46 /*10*/ /\s{2,}/g,//trim extra whitespace 47 /*11*/ /\s+([^=\s]+)((="[^"]+")|([\s>]))/g,// lowercase attribute names 48 /*12*/ /\s+contenteditable(=[^>\s\/]*)?/gi,//strip contenteditable 49 /*13*/ /((href|src)=")([^\s]*)"/g, //find href and src for stripBaseHref() 50 /*14*/ /<\/?(div|p|h[1-6]|table|tr|td|th|ul|ol|li|blockquote|object|br|hr|img|embed|param|pre|script|html|head|body|meta|link|title|area|input|form|textarea|select|option)[^>]*>/g, 51 /*15*/ /<\/(div|p|h[1-6]|table|tr|ul|ol|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g,//blocklevel closing tag 52 /*16*/ /<(div|p|h[1-6]|table|tr|ul|ol|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g,//blocklevel opening tag 53 /*17*/ /<(td|th|li|option|br|hr|embed|param|pre|meta|link|title|area|input|textarea)[^>]*>/g,//singlet tag or output on 1 line 54 /*18*/ /(^|<\/(pre|script)>)(\s|[^\s])*?(<(pre|script)[^>]*>|$)/g,//find content NOT inside pre and script tags 55 /*19*/ /(<pre[^>]*>)([\s\S])*?(<\/pre>)/g,//find content inside pre tags 56 /*20*/ /(^|<!--[\s\S]*?-->)([\s\S]*?)(?=<!--[\s\S]*?-->|$)/g,//find content NOT inside comments 57 /*21*/ /\S*=""/g, //find empty attributes 58 /*22*/ /<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<\/?\w[^>]*>/g, //find all tags, including comments and php 59 /*23*/ /(^|<\/script>)[\s\S]*?(<script[^>]*>|$)/g //find content NOT inside script tags 60 60 ]; 61 61 // compile for performance; WebKit doesn't support this 62 if (typeof RegExp.prototype.compile == 'function') { 63 for (var i=0; i<Xinha.RegExpCache.length;i++ ) { 64 Xinha.RegExpCache[i] = new RegExp().compile(Xinha.RegExpCache[i]); 65 } 66 } 62 67 /** 63 68 * Cleans HTML into wellformed xhtml -
branches/0.95_stable/modules/InternetExplorer/InternetExplorer.js
r943 r964 164 164 // #645 IE only saves the initial content of the iframe, so we create a temporary iframe with the current editor contents 165 165 case 'saveas': 166 {167 166 var doc = null; 168 167 var editor = this.editor; … … 248 247 document.body.removeChild(iframe); 249 248 return true; 250 } 249 break; 250 case 'removeformat': 251 var editor = this.editor; 252 var sel = editor.getSelection(); 253 var selSave = editor.saveSelection(sel); 254 255 var i, el, els; 256 257 function clean (el) 258 { 259 if (el.nodeType != 1) return; 260 el.removeAttribute('style'); 261 for (var j=0; j<el.childNodes.length;j++) 262 { 263 clean(el.childNodes[j]); 264 } 265 if ( (el.tagName.toLowerCase() == 'span' && !el.attributes.length ) || el.tagName.toLowerCase() == 'font') 266 { 267 el.outerHTML = el.innerHTML; 268 } 269 } 270 if ( editor.selectionEmpty(sel) ) 271 { 272 els = editor._doc.body.childNodes; 273 for (i = 0; i < els.length; i++) 274 { 275 el = els[i]; 276 if (el.nodeType != 1) continue; 277 if (el.tagName.toLowerCase() == 'span') 278 { 279 newNode = editor.convertNode(el, 'div'); 280 el.parentNode.replaceChild(newNode, el); 281 el = newNode; 282 } 283 clean(el); 284 } 285 } 286 editor._doc.execCommand(cmdID, UI, param); 287 288 editor.restoreSelection(selSave); 289 return true; 290 break; 251 291 } 252 292 … … 393 433 Xinha.prototype.saveSelection = function() 394 434 { 395 return this.createRange(this. _getSelection())435 return this.createRange(this.getSelection()) 396 436 } 397 437 /** … … 455 495 { 456 496 var sel = this.getSelection(); 497 if (this.selectionEmpty) return ''; 457 498 var range = this.createRange(sel); 458 499 … … 488 529 Xinha.prototype.createRange = function(sel) 489 530 { 531 if (!sel) sel = this.getSelection(); 490 532 return sel.createRange(); 491 533 }; … … 542 584 var after = ta.value.substring( index + cc.length , ta.value.length ); 543 585 544 if ( after.match(/^[^<]*>/) ) // make sure cursor is in an editable area (outside tags, script blocks, and inside the body)586 if ( after.match(/^[^<]*>/) ) // make sure cursor is in an editable area (outside tags, script blocks, entities, and inside the body) 545 587 { 546 588 var tagEnd = after.indexOf(">") + 1; … … 548 590 } 549 591 else ta.value = before + cc + after; 592 ta.value = ta.value.replace(new RegExp ('(&[^'+cc+']*?)('+cc+')([^'+cc+']*?;)'), "$1$3$2"); 550 593 ta.value = ta.value.replace(new RegExp ('(<script[^>]*>[^'+cc+']*?)('+cc+')([^'+cc+']*?<\/script>)'), "$1$3$2"); 551 594 ta.value = ta.value.replace(new RegExp ('^([^'+cc+']*)('+cc+')([^'+cc+']*<body[^>]*>)(.*?)'), "$1$3$2$4"); -
branches/0.95_stable/plugins/ExtendedFileManager/assets/manager.css
r937 r964 10 10 .dirs { padding: 1em; } 11 11 12 .imageFrame { overflow-x:hidden; width: 100%; height: 1 45px; margin:0px; background-color: #fff;}12 .imageFrame { overflow-x:hidden; width: 100%; height: 155px; margin:0px; background-color: #fff;} 13 13 .smallWidth{ width: 4em; } 14 14 .largelWidth{ width: 30em; } -
branches/0.95_stable/plugins/ExtendedFileManager/assets/manager.js
r955 r964 56 56 57 57 var w = 650; 58 var h = 200;58 var h = 600; 59 59 60 60 window.resizeTo(w,h); … … 235 235 } 236 236 }; 237 imgManager.location.replace( iframeUrl);237 imgManager.location.replace(iframeUrl); 238 238 239 239 if (manager_mode == 'image' && typeof Xinha.colorPicker != "undefined" && document.getElementById('f_backgroundColor') && document.getElementById('f_backgroundColor').type == 'text') { … … 250 250 new Xinha.colorPicker.InputBinding(document.getElementById('f_borderColor'),pickerConfig); 251 251 } 252 setTimeout(function() { addEvent(window, 'resize', resize); }, 500);252 setTimeout(function() { resize();addEvent(window, 'resize', resize); }, 500); 253 253 } 254 254 -
branches/0.95_stable/plugins/ExtendedFileManager/manager.php
r937 r964 104 104 echo 'var manager_mode="image";'; 105 105 } 106 //IE doesn't like a relative URL when changing a window's location 107 $iframe_url = str_replace( array("backend.php","manager.php"), "", $_SERVER["PHP_SELF"] ) . $IMConfig['backend_url']; 106 108 ?> 107 109 108 var iframeUrl = '<?php print $ IMConfig['backend_url'];?>__function=images&mode=<?php echo $insertMode;?>&viewtype=<?php echo $IMConfig['view_type'] ?>';110 var iframeUrl = '<?php print $iframe_url ?>__function=images&mode=<?php echo $insertMode;?>&viewtype=<?php echo $IMConfig['view_type'] ?>'; 109 111 110 112 /* ]]> */ -
branches/0.95_stable/plugins/SmartReplace/smart-replace.js
r752 r964 107 107 var editor = this.editor; 108 108 var charCode = Xinha.is_ie ? ev.keyCode : ev.charCode; 109 109 110 110 var key = String.fromCharCode(charCode); 111 111 … … 138 138 139 139 var sel = editor.getSelection(); 140 140 141 141 if (Xinha.is_ie) 142 142 { … … 161 161 else 162 162 { 163 if (!sel.isCollapsed) 163 var r = editor.createRange(sel); 164 165 if (!r.collapsed) 164 166 { 165 167 editor.insertNodeAtSelection(document.createTextNode('')); 166 168 } 167 if (sel.anchorOffset > 0) sel.extend(sel.anchorNode,sel.anchorOffset-1); 169 if (r.startOffset > 0) r.setStart(r.startContainer, r.startOffset -1); 170 168 171 169 if( sel.toString().match(/\S/))170 { 171 sel.collapse(sel.anchorNode,sel.anchorOffset);172 if(r.toString().match(/[^\s\xA0]/)) 173 { 174 r.collapse(false); 172 175 editor.insertNodeAtSelection(document.createTextNode(closing)); 173 176 } 174 177 else 175 178 { 176 sel.collapse(sel.anchorNode,sel.anchorOffset); 177 editor.insertNodeAtSelection(document.createTextNode(opening)); 178 } 179 r.deleteContents(); 180 editor.insertNodeAtSelection(document.createTextNode(' '+opening)); 181 } 182 editor.getSelection().collapseToEnd(); 179 183 } 180 184 } … … 184 188 var editor = this.editor; 185 189 var sel = this.editor.getSelection(); 190 var r = this.editor.createRange(sel); 191 186 192 if (Xinha.is_ie) 187 193 { 188 var r = this.editor.createRange(sel);189 194 r.moveStart('character', -2); 190 195 … … 196 201 else 197 202 { 198 sel.extend(sel.anchorNode,sel.anchorOffset-2); 199 if(sel.toString().match(/^-/)) 200 { 203 if (r.startOffset > 1) r.setStart(r.startContainer, r.startOffset -2); 204 205 if(r.toString().match(/^ -/)) 206 { 207 r.deleteContents(); 201 208 this.editor.insertNodeAtSelection(document.createTextNode(' '+String.fromCharCode(8211))); 202 209 } 203 sel.collapse(sel.anchorNode,sel.anchorOffset);210 editor.getSelection().collapseToEnd(); 204 211 } 205 212 } -
branches/0.95_stable/release-notes.txt
r950 r964 7 7 Xinha 0.95 (due soon) 8 8 Bugs Fixed 9 * fixed #1040 htmlRemoveTags doesn't work in IE 10 * fixed #645 IE Save as function only saves the original html 11 * fixed #1136 FF3 Linux select boxes in toolbar are too small 9 12 * fixed #1100 Extended File Manager - Error after opening window 10 13 * fixed #1103 [TransformInnerHTML] IE breaks singlet attributes starting with "no" … … 23 26 * fixed #1015 Mozilla shows scrollbars on click in Stylist 24 27 * #918 removed mozParaHandler dirty as it had been broken for a long time 28 * fixed #1015 Mozilla shows scrollbars on click in Stylist 29 * fixed #1148 HTML entities break when cursor is inside when switching from HTML to WYSIWYG 25 30 26 31 Enhancements 32 * #1143 add Safari support 33 * #1138 added API functions Xinha.getEditor(), Xinha.prototype.getPluginInstance(), Xinha.addOnloadHandler() 34 * #1137 [Equation] FF3 fixes & improved way of avoiding formula changes in editor 35 * #1150 synchronize "Remove Format" between browsers 27 36 * added plugin PreserveScripts for enhanced editing of pages containing PHP and/or JavaScript () 28 37 * Loading message facelift … … 36 45 * #442 removed alert "Your Document is not well formed..." 37 46 * #1119 disabled Firefox 2 spell check when ContextMenu is enabled 47 * added a plugin "GenericPlugin" as a democase for plugin event handlers 38 48 39 49 I18n -
branches/0.95_stable/skins/silva/skin.css
r880 r964 76 76 border-right: none; 77 77 width: 1px; 78 height: 1 8px;78 height: 11px; 79 79 padding: 0px; 80 80 }
Note: See TracChangeset
for help on using the changeset viewer.