Changeset 796
- Timestamp:
- 03/23/07 20:31:32 (6 years ago)
- Location:
- branches/ray
- Files:
-
- 8 modified
-
XinhaCore.js (modified) (4 diffs)
-
examples/testbed.html (modified) (4 diffs)
-
modules/ColorPicker/ColorPicker.js (modified) (1 diff)
-
modules/Gecko/Gecko.js (modified) (2 diffs)
-
modules/InternetExplorer/InternetExplorer.js (modified) (2 diffs)
-
plugins/ExtendedFileManager/assets/EditorContent.js (modified) (1 diff)
-
plugins/ImageManager/assets/EditorContent.js (modified) (1 diff)
-
plugins/Stylist/stylist.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ray/XinhaCore.js
r791 r796 4179 4179 html = html.replace(/<(\/?)strike(\s|>|\/)/ig, "<$1del$2"); 4180 4180 4181 // replace window.open to that any clicks won't open a popup in designMode 4182 html = html.replace("onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open(", "onclick=\"window.open("); 4181 // remove disabling of inline event handle inside Xinha iframe 4182 html = html.replace(/(<[^>]*onclick=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4183 html = html.replace(/(<[^>]*onmouseover=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4184 html = html.replace(/(<[^>]*onmouseout=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4185 html = html.replace(/(<[^>]*onmousedown=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4186 html = html.replace(/(<[^>]*onmouseup=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4183 4187 4184 4188 // Figure out what our server name is, and how it's referenced … … 4231 4235 html = html.replace(/<(\/?)del(\s|>|\/)/ig, "<$1strike$2"); 4232 4236 4233 // replace window.open to that any clicks won't open a popup in designMode 4234 html = html.replace("onclick=\"window.open(", "onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open("); 4235 4237 // disable inline event handle inside Xinha iframe 4238 html = html.replace(/(<[^>]*onclick=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4239 html = html.replace(/(<[^>]*onmouseover=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4240 html = html.replace(/(<[^>]*onmouseout=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4241 html = html.replace(/(<[^>]*onmouseodown=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4242 html = html.replace(/(<[^>]*onmouseup=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4243 4236 4244 html = this.inwardSpecialReplacements(html); 4237 4245 … … 5377 5385 */ 5378 5386 5379 Xinha._loadback = function( Url, Callback, Scope, Bonus)5387 Xinha._loadback = function(url, callback, scope, bonus) 5380 5388 { 5381 var T = !Xinha.is_ie ? "onload" : 'onreadystatechange'; 5382 var S = document.createElement("script"); 5383 S.type = "text/javascript"; 5384 S.src = Url; 5385 S.id = Url; 5386 if ( Callback ) 5387 { 5388 S[T] = function() 5389 if ( document.getElementById(url) ) 5390 { 5391 return true; 5392 } 5393 var t = !Xinha.is_ie ? "onload" : 'onreadystatechange'; 5394 var s = document.createElement("script"); 5395 s.type = "text/javascript"; 5396 s.src = url; 5397 s.id = url; 5398 if ( callback ) 5399 { 5400 s[t] = function() 5389 5401 { 5390 5402 if ( Xinha.is_ie && ( ! ( /loaded|complete/.test(window.event.srcElement.readyState) ) ) ) … … 5393 5405 } 5394 5406 5395 Callback.call(Scope ? Scope : this, Bonus);5396 S[T] = null;5407 callback.call(scope ? scope : this, bonus); 5408 s[t] = null; 5397 5409 }; 5398 5410 } 5399 document.getElementsByTagName("head")[0].appendChild(S); 5411 document.getElementsByTagName("head")[0].appendChild(s); 5412 return false; 5400 5413 }; 5401 5414 -
branches/ray/examples/testbed.html
r791 r796 30 30 // in this example we do a little regular expression to find the absolute path. 31 31 _editor_url = document.location.href.replace(/examples\/.*/, '') 32 _editor_lang = " de"; // And the language we need to use in the editor.32 _editor_lang = "en"; // And the language we need to use in the editor. 33 33 </script> 34 34 … … 63 63 [ 64 64 'CharacterMap', 65 //'Linker',66 //'Stylist',67 //'SmartReplace'65 'Linker', 66 'Stylist', 67 'SmartReplace' 68 68 ]; 69 69 // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :) … … 85 85 xinha_config = xinha_config ? xinha_config : new Xinha.Config(); 86 86 87 //xinha_config.stylistLoadStylesheet(document.location.href.replace(/[^\/]*\.html/, 'stylist.css'));87 xinha_config.stylistLoadStylesheet(document.location.href.replace(/[^\/]*\.html/, 'stylist.css')); 88 88 89 89 //xinha_config.CharacterMap.mode = 'panel'; … … 148 148 <body> 149 149 150 <form action="test_dest.php" id="editors_here" onsubmit="alert(this.myTextArea.value);"> 151 <input type="checkbox" name="hallo" /> 152 <select> 153 <option>Test</option> 154 </select> 150 <form action="" id="editors_here" onsubmit="alert(this.myTextArea.value);"> 155 151 <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> 156 152 <textarea id="myTextArea" name="myTextArea" style="width:100%;height:300px;"> 157 153 <table cellspacing="1" cellpadding="1" border="1" style="width: 100%;"><tbody><tr><td style="width: 25%;"> </td><td style="width: 25%;"> </td><td style="width: 25%;"> </td><td style="width: 25%;"> </td></tr><tr><td style="width: 25%;"> </td><td style="width: 25%;"> </td><td style="width: 25%;"> </td><td style="width: 25%;"> </td></tr></tbody></table><br /></textarea> 158 154 159 <input type="submit" /> <input type="reset" /><input type="checkbox" name="hallo" /> 160 <select> 161 <option>Test</option> 162 </select> 163 <textarea name="myTextArea" style="width:100%;height:320px;"> 164 <table cellspacing="1" cellpadding="1" border="1" style="width: 100%;"><tbody><tr><td style="width: 25%;"> </td><td style="width: 25%;"> </td><td style="width: 25%;"> </td><td style="width: 25%;"> </td></tr><tr><td style="width: 25%;"> </td><td style="width: 25%;"> </td><td style="width: 25%;"> </td><td style="width: 25%;"> </td></tr></tbody></table><br /></textarea> 165 166 <input type="submit" /> <input type="reset" /> 155 <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> 167 156 </form> 168 157 <script language="javascript"> -
branches/ray/modules/ColorPicker/ColorPicker.js
r791 r796 366 366 if (e.style.position == 'fixed') 367 367 { 368 this.table.style.position = ' absolute';368 this.table.style.position = 'fixed'; 369 369 } 370 370 top += e.offsetTop; -
branches/ray/modules/Gecko/Gecko.js
r782 r796 528 528 }; 529 529 530 530 /** 531 * Returns a range object to be stored 532 * and later restored with Xinha.prototype.restoreSelection() 533 * 534 * @returns Range 535 */ 536 Xinha.prototype.saveSelection = function() 537 { 538 return this.createRange(this.getSelection()).cloneRange(); 539 } 540 /** 541 * Restores a selection previously stored 542 * @param savedSelection Range object as returned by Xinha.prototype.restoreSelection() 543 */ 544 Xinha.prototype.restoreSelection = function(savedSelection) 545 { 546 var sel = this.getSelection(); 547 sel.removeAllRanges(); 548 sel.addRange(savedSelection); 549 } 531 550 /** 532 551 * Selects the contents of the given node. If the node is a "control" type element, (image, form input, table) … … 758 777 return d; 759 778 }; 760 761 Xinha.prototype.saveSelection = function()762 {763 return this.createRange(this.getSelection()).cloneRange();764 }765 Xinha.prototype.restoreSelection = function(savedSelection)766 {767 var sel = this.getSelection();768 sel.removeAllRanges();769 sel.addRange(savedSelection);770 } -
branches/ray/modules/InternetExplorer/InternetExplorer.js
r782 r796 279 279 }; 280 280 281 /** 282 * Returns a range object to be stored 283 * and later restored with Xinha.prototype.restoreSelection() 284 * 285 * @returns Range 286 */ 287 Xinha.prototype.saveSelection = function() 288 { 289 return this.createRange(this._getSelection()) 290 } 291 /** 292 * Restores a selection previously stored 293 * @param savedSelection Range object as returned by Xinha.prototype.restoreSelection() 294 */ 295 Xinha.prototype.restoreSelection = function(savedSelection) 296 { 297 savedSelection.select(); 298 } 281 299 /** 282 300 * Selects the contents of the given node. If the node is a "control" type element, (image, form input, table) … … 469 487 return (doc.compatMode == "CSS1Compat") ? '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">' : ''; 470 488 }; 471 472 Xinha.prototype.saveSelection = function()473 {474 return this.createRange(this._getSelection())475 }476 Xinha.prototype.restoreSelection = function(savedSelection)477 {478 savedSelection.select();479 } -
branches/ray/plugins/ExtendedFileManager/assets/EditorContent.js
r761 r796 482 482 function setMarker(nx,ny,nw,nh) 483 483 { 484 if (isNaN(nx)) nx = 0; 485 if (isNaN(ny)) ny = 0; 486 if (isNaN(nw)) nw = 0; 487 if (isNaN(nh)) nh = 0; 488 484 489 if (ant == null) 485 490 ant = MM_findObj("ant"); -
branches/ray/plugins/ImageManager/assets/EditorContent.js
r761 r796 488 488 function setMarker(nx,ny,nw,nh) 489 489 { 490 if (isNaN(nx)) nx = 0; 491 if (isNaN(ny)) ny = 0; 492 if (isNaN(nw)) nw = 0; 493 if (isNaN(nh)) nh = 0; 494 490 495 if (ant == null) 491 ant = MM_findObj("ant");496 ant = MM_findObj("ant"); 492 497 493 498 if (canvas == null) -
branches/ray/plugins/Stylist/stylist.js
r791 r796 713 713 Xinha.ripStylesFromCSSFile = function(URL) 714 714 { 715 Xinha.setLoadingMessage('Loading Styles'); 715 716 var css = Xinha._geturlcontent(URL); 716 717 return Xinha.ripStylesFromCSSString(css); … … 782 783 this.dialog = new Xinha.Dialog(editor, html, 'Stylist',{width:200},{modal:false,closable:false}); 783 784 Xinha._addClass( this.dialog.rootElem, 'Stylist' ); 784 //this.dialog.attachToPanel('right');785 this.dialog.attachToPanel('right'); 785 786 this.dialog.show(); 786 787
