Changeset 911
- Timestamp:
- 10/22/07 19:22:22 (6 years ago)
- Location:
- branches/ray
- Files:
-
- 12 modified
-
XinhaCore.js (modified) (3 diffs)
-
contrib/compress.php (modified) (3 diffs)
-
examples/Extended.html (modified) (1 diff)
-
examples/ext_example-menu.php (modified) (1 diff)
-
modules/ColorPicker/ColorPicker.js (modified) (3 diffs)
-
modules/Gecko/Gecko.js (modified) (6 diffs)
-
modules/GetHtml/TransformInnerHTML.js (modified) (2 diffs)
-
modules/InsertImage/insert_image.js (modified) (2 diffs)
-
modules/InternetExplorer/InternetExplorer.js (modified) (3 diffs)
-
plugins/SaveSubmit/save-submit.js (modified) (1 diff)
-
popups/about.html (modified) (2 diffs)
-
release-notes.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/ray/XinhaCore.js
r892 r911 1 1 2 2 /*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:-- 3 -- Xinha (is not htmlArea) - http://xinha. gogo.co.nz/3 -- Xinha (is not htmlArea) - http://xinha.org 4 4 -- 5 5 -- Use of Xinha is granted by the terms of the htmlArea License (based on 6 6 -- BSD license) please read license.txt in this package for details. 7 7 -- 8 -- Copyright (c) 2005-2007 Xinha Developer Team and contributors 9 -- 8 10 -- Xinha was originally based on work by Mihai Bazon which is: 9 11 -- Copyright (c) 2003-2004 dynarch.com. … … 4848 4850 4849 4851 // remove disabling of inline event handle inside Xinha iframe 4850 html = html.replace(/(<[^>]*onclick=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4851 html = html.replace(/(<[^>]*onmouseover=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4852 html = html.replace(/(<[^>]*onmouseout=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4853 html = html.replace(/(<[^>]*onmousedown=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4854 html = html.replace(/(<[^>]*onmouseup=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4855 4852 html = html.replace(/(<[^>]*on(click|mouse(over|out|up|down))=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,'$1'); 4856 4853 4857 4854 // Figure out what our server name is, and how it's referenced … … 4914 4911 4915 4912 // disable inline event handle inside Xinha iframe 4916 html = html.replace(/(<[^>]*onclick=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4917 html = html.replace(/(<[^>]*onmouseover=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4918 html = html.replace(/(<[^>]*onmouseout=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4919 html = html.replace(/(<[^>]*onmouseodown=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4920 html = html.replace(/(<[^>]*onmouseup=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4913 html = html.replace(/(<[^>]*on(click|mouse(over|out|up|down))=["'])/gi,'$1if(window.top && window.top.Xinha){return false}'); 4921 4914 4922 4915 html = this.inwardSpecialReplacements(html); -
branches/ray/contrib/compress.php
r892 r911 28 28 $url = $durl . '/' . $file; 29 29 30 if(preg_match("/ .svn|lang/",$path)) continue;30 if(preg_match("/\.svn|lang/",$path)) continue; 31 31 32 32 if(is_dir($path)) … … 49 49 $cwd = getcwd(); 50 50 print "Processing ".count($return)." files<br />"; 51 52 $prefix = "/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */"; 53 $core_prefix = ' 54 /*-------------------------------------------------------------------------- 55 -- Xinha (is not htmlArea) - http://xinha.org 56 -- 57 -- Use of Xinha is granted by the terms of the htmlArea License (based on 58 -- BSD license) please read license.txt in this package for details. 59 -- 60 -- Copyright (c) 2005-2007 Xinha Developer Team and contributors 61 -- 62 -- Xinha was originally based on work by Mihai Bazon which is: 63 -- Copyright (c) 2003-2004 dynarch.com. 64 -- Copyright (c) 2002-2003 interactivetools.com, inc. 65 -- This copyright notice MUST stay intact for use. 66 -------------------------------------------------------------------------*/ 67 '; 51 68 foreach ($return as $file) 52 69 { … … 55 72 flush(); 56 73 copy($file,$file."_uncompr.js"); 57 exec("java -jar ${cwd}/dojo_js_compressor.jar -c ${file}_uncompr.js > $file 2>&1"); 74 75 exec("echo \"".(preg_match('/XinhaCore.js$/',$file) ? $prefix.$core_prefix : $prefix)."\" > $file && java -jar ${cwd}/dojo_js_compressor.jar -c ${file}_uncompr.js >> $file 2>&1"); 58 76 if (preg_match('/js: ".*?", line \d+:/',file_get_contents($file))) 59 77 { -
branches/ray/examples/Extended.html
r761 r911 1 <html>1 <html> 2 2 3 3 <head> -
branches/ray/examples/ext_example-menu.php
r761 r911 1 <? PHP1 <?php 2 2 $LocalPluginPath = dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'plugins'; 3 3 $LocalSkinPath = dirname(dirname(__File__)).DIRECTORY_SEPARATOR.'skins'; -
branches/ray/modules/ColorPicker/ColorPicker.js
r862 r911 687 687 but.style.cursor = 'pointer'; 688 688 but.onclick = function() { Xinha.colorPicker.remember(picker.chosenColor.value, picker.savecolors); picker.callback(picker.chosenColor.value); picker.close(); }; 689 but.appendChild(document.createTextNode( 'OK'));689 but.appendChild(document.createTextNode(Xinha._lc('OK'))); 690 690 but.align = 'center'; 691 691 div.appendChild(but); … … 804 804 @*/ 805 805 }; 806 } 806 } // end Xinha.colorPicker 807 807 808 808 // array of the saved colors … … 847 847 }; 848 848 849 Xinha.colorPicker._lc = function(string) {850 return Xinha._lc(string);851 }852 849 853 850 -
branches/ray/modules/Gecko/Gecko.js
r862 r911 167 167 if (RE_date.test(matchData)) 168 168 { 169 if (!RE_ip.test(matchData)) 169 break; //ray: disabling linking of IP numbers because of general bugginess (see Ticket #1085) 170 /*if (!RE_ip.test(matchData)) 170 171 { 171 172 break; 172 } 173 }*/ 173 174 } 174 175 var leftTextUrl = s.anchorNode; … … 255 256 256 257 var m = s.anchorNode.data.match(Xinha.RE_url); 257 if ( m && a.href.match(s.anchorNode.data.trim()) ) 258 259 if ( m && a.href.match(new RegExp( 'http(s)?://' + Xinha.escapeStringForRegExp( s.anchorNode.data.trim() ) ) ) ) 258 260 { 259 261 var txtNode = s.anchorNode; … … 261 263 { 262 264 // Sometimes m is undefined becase the url is not an url anymore (was www.url.com and become for example www.url) 265 // ray: shouldn't the link be un-linked then? 263 266 m = txtNode.data.match(Xinha.RE_url); 264 267 if(m) … … 373 376 Gecko.prototype.onMouseDown = function(ev) 374 377 { 375 // Gecko doesn't select hr's on single click376 if (ev.target.tagName.toLowerCase() == "hr")377 {378 var sel = this.editor.getSelection();379 var range = this.editor.createRange(sel);380 range.selectNode(ev.target);381 }378 // Gecko doesn't select hr's on single click 379 if (ev.target.tagName.toLowerCase() == "hr") 380 { 381 var sel = this.editor.getSelection(); 382 var range = this.editor.createRange(sel); 383 range.selectNode(ev.target); 384 } 382 385 } 383 386 … … 693 696 Xinha.prototype.setCC = function ( target ) 694 697 { 698 var cc = this.cc; 695 699 try 696 700 { … … 702 706 var after = ta.value.substring( index, ta.value.length ); 703 707 704 if ( after.match(/^[^<]*>/) ) 708 if ( after.match(/^[^<]*>/) ) // make sure cursor is in an editable area (outside tags, script blocks, and inside the body) 705 709 { 706 710 var tagEnd = after.indexOf(">") + 1; 707 ta.value = before + after.substring( 0, tagEnd ) + this.cc + after.substring( tagEnd, after.length ); 708 } 709 else ta.value = before + this.cc + after; 711 ta.value = before + after.substring( 0, tagEnd ) + cc + after.substring( tagEnd, after.length ); 712 } 713 else ta.value = before + cc + after; 714 ta.value = ta.value.replace(new RegExp ('(<script[^>]*>[^'+cc+']*?)('+cc+')([^'+cc+']*?<\/script>)'), "$1$3$2"); 715 ta.value = ta.value.replace(new RegExp ('^([^'+cc+']*)('+cc+')([^'+cc+']*<body[^>]*>)(.*?)'), "$1$3$2$4"); 710 716 } 711 717 else 712 718 { 713 719 var sel = this.getSelection(); 714 sel.getRangeAt(0).insertNode( document.createTextNode( this.cc ) );720 sel.getRangeAt(0).insertNode( document.createTextNode( cc ) ); 715 721 } 716 722 } catch (e) {} -
branches/ray/modules/GetHtml/TransformInnerHTML.js
r892 r911 41 41 /*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 attributes 42 42 /*06*/ new RegExp().compile(/(="[^']*)'([^'"]*")/),//check quote nesting 43 /*07*/ new RegExp().compile(/&(?= [^<]*>)/g),//expand query ampersands43 /*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 entities 44 44 /*08*/ new RegExp().compile(/<\s+/g),//strip tagstart whitespace 45 45 /*09*/ new RegExp().compile(/\s+(\/)?>/g),//trim whitespace … … 77 77 replace(c[4], '<$1$2 />').//terminate singlet tags 78 78 replace(c[6], '$1$2').//check quote nesting 79 //replace(c[7], '&').//expand query ampersands79 replace(c[7], '&').//expand query ampersands 80 80 replace(c[8], '<').//strip tagstart whitespace 81 81 replace(c[10], ' ');//trim extra whitespace -
branches/ray/modules/InsertImage/insert_image.js
r892 r911 12 12 -- This is the Xinha standard implementation of an image insertion plugin 13 13 -- 14 -- The file is loadedby the Xinha Core when no alternative method (plugin) is loaded.14 -- he file is loaded as a special plugin by the Xinha Core when no alternative method (plugin) is loaded. 15 15 -- 16 16 -- 17 -- $HeadURL $18 -- $LastChangedDate $19 -- $LastChangedRevision $20 -- $LastChangedBy $17 -- $HeadURL: http://svn.xinha.python-hosting.com/branches/ray/modules/InsertImage/InsertImage.js $ 18 -- $LastChangedDate: 2007-03-19 17:27:42 +0100 (Mo, 19 Mrz 2007) $ 19 -- $LastChangedRevision: 791 $ 20 -- $LastChangedBy: ray $ 21 21 --------------------------------------------------------------------------*/ 22 22 … … 24 24 name : "InsertImage", 25 25 origin : "Xinha Core", 26 version : "$LastChangedRevision $".replace(/^[^:]*: (.*) \$$/, '$1'),26 version : "$LastChangedRevision: 791 $".replace(/^[^:]*: (.*) \$$/, '$1'), 27 27 developer : "The Xinha Core Developer Team", 28 developer_url : "$HeadURL $".replace(/^[^:]*: (.*) \$$/, '$1'),28 developer_url : "$HeadURL: http://svn.xinha.python-hosting.com/branches/ray/modules/InsertImage/InsertImage.js $".replace(/^[^:]*: (.*) \$$/, '$1'), 29 29 sponsor : "", 30 30 sponsor_url : "", -
branches/ray/modules/InternetExplorer/InternetExplorer.js
r892 r911 436 436 Xinha.prototype.setCC = function ( target ) 437 437 { 438 var cc = this.cc; 438 439 if ( target == "textarea" ) 439 440 { … … 441 442 var pos = document.selection.createRange(); 442 443 pos.collapse(); 443 pos.text = this.cc;444 var index = ta.value.indexOf( this.cc );444 pos.text = cc; 445 var index = ta.value.indexOf( cc ); 445 446 var before = ta.value.substring( 0, index ); 446 var after = ta.value.substring( index + this.cc.length , ta.value.length );447 var after = ta.value.substring( index + cc.length , ta.value.length ); 447 448 448 if ( after.match(/^[^<]*>/) ) 449 if ( after.match(/^[^<]*>/) ) // make sure cursor is in an editable area (outside tags, script blocks, and inside the body) 449 450 { 450 451 var tagEnd = after.indexOf(">") + 1; 451 ta.value = before + after.substring( 0, tagEnd ) + this.cc + after.substring( tagEnd, after.length ); 452 } 453 else ta.value = before + this.cc + after; 452 ta.value = before + after.substring( 0, tagEnd ) + cc + after.substring( tagEnd, after.length ); 453 } 454 else ta.value = before + cc + after; 455 ta.value = ta.value.replace(new RegExp ('(<script[^>]*>[^'+cc+']*?)('+cc+')([^'+cc+']*?<\/script>)'), "$1$3$2"); 456 ta.value = ta.value.replace(new RegExp ('^([^'+cc+']*)('+cc+')([^'+cc+']*<body[^>]*>)(.*?)'), "$1$3$2$4"); 454 457 } 455 458 else … … 460 463 { 461 464 var control = r.item(0); 462 control.outerHTML += this.cc;465 control.outerHTML += cc; 463 466 } 464 467 else 465 468 { 466 469 r.collapse(); 467 r.text = this.cc;470 r.text = cc; 468 471 } 469 472 } -
branches/ray/plugins/SaveSubmit/save-submit.js
r890 r911 95 95 form.onsubmit(); 96 96 97 var content ='';98 97 var name, value, content =''; 98 99 99 for (var i=0;i<form.elements.length;i++) 100 100 { 101 if (( form.elements[i].type == 'checkbox' || form.elements[i].type == 'radio' ) && !form.elements[i].checked ) continue; 102 101 103 content += ((i>0) ? '&' : '') + form.elements[i].name + '=' + encodeURIComponent(form.elements[i].value); 102 104 } -
branches/ray/popups/about.html
r862 r911 20 20 <script type="text/javascript" src="popup.js"></script> 21 21 <script type="text/javascript"> 22 window.resizeTo(450, 250);22 window.resizeTo(450, 365); 23 23 var TABS = []; 24 24 var CURRENT_TAB = 0; … … 199 199 Use of Xinha is granted by the terms of the htmlArea License (based on BSD license) 200 200 </p> 201 <pre> 202 Copyright (c) 2005-2007 Xinha Developer Team and contributors 203 </pre> 201 204 <p> 202 205 Xinha was originally based on work by Mihai Bazon which is: 203 206 </p> 204 <blockquote><pre>Copyright (c) 2003-2004 dynarch.com. 205 Copyright (c) 2002-2003 interactivetools.com, inc. 206 This copyright notice MUST stay intact for use.</pre></blockquote> 207 207 <pre> 208 Copyright (c) 2003-2004 dynarch.com. 209 Copyright (c) 2002-2003 interactivetools.com, inc. 210 This copyright notice MUST stay intact for use. 211 </pre> 208 212 </div> 209 213 -
branches/ray/release-notes.txt
r761 r911 5 5 6 6 Release History 7 8 Xinha 0.94 9 * Ticket #1093 [InsertSmiley] remove smiley gifs from trunk 10 * fixed Ticket #1019 Cusor not jumping to editable part of window when clicked in IE 11 * [TableOperations] Add config option to not dispaly toolbar buttons 12 * fixed Ticket #1021 Prevent ExtendedFileManager from masking ImageManager 13 * fixed Ticket #1023 [ImageManager] Add config item to allow the advanced image options to be hidden from the user 14 * fixed Ticket #1026 fix problems with loading skins 15 * fixed Tickets #1030 & #1031: slow loading large pages in IE 16 * fixed Ticket #1034 [ExtendedFileManager] Color pickers shown when use_color_pickers is false 17 * fixed Ticket #1035 [TransformInnerHTML] tags corruptedunder certain circumstances 18 * fixed Ticket #1036 [ExtendedFileManager] window is only resized after all thumbnails have benn loaded, which can take quite some time 19 * fixed Ticket #1039 Firefox full page adds multiple paragraphs after view source 20 * fixed Ticket #1019 Cusor not jumping to editable part of window when clicked in IE7 21 * fixed Ticket #1046 Error in IE 6 when switching from text to wysiwyg 22 * [DOMwalk] linebreaks inserted before <br />s 23 * catch error in IE when trying to restore selection on non-displayed area 24 * fixed Ticket #973 Error switching wysiwyg/html including javascript file on the code 25 * fixed Ticket #1028 - [Linker] automatically (attempt to) work around an issue with mod_security being triggered because of the charset on our POST requests 26 * fixed Ticket #1055 [Stylist] Inappropriate styles (for other tags) are shown 27 * added Dutch language files 28 * added new hook 'onBeforeSubmit' for firePluginEvent() 29 * added new hook 'onBeforeUnload' for firePluginEvent() 30 * fixed Ticket #1048 Full Screen plugin doesn't load if many editors on page 31 * fixed Ticket #1053 ListType plugin doesn't work in panel config with multiple editors 32 * fixed Ticket #1026 Skins referenced with <link>-tags don't work anymore 33 * fixed Ticket #1059 [Equation] loosing formula onsubmit 34 * fixed Ticket #1060 [Equation] various updates 35 * [Equation] preserve formula on reload in Mozilla 36 * [Equation] updated ASCIIMathML.js 37 * [Skin:silva] padding and border on textarea make the textmode too wide 38 * fixed Ticket#1001 Editor loads a bunch of null urls in ie 39 * fixed Ticket #1068 [TranformInnerHTML] newlines added after </script> 40 * fixed Ticket#1069 Editor document URL prefixed to any href that only consists of URL parameters 41 * added Thai translation for core 42 * added complete Portuguese Brazilian translation 43 * updated lc_parse script 44 * fixed Ticket #1071 [ExtendedFileManager] external image URL image inserted with width/height 0, amking it invisible 45 * fixed Ticket #1074 [SuperClean] throws warnings in PHP 5 46 * fixed Ticket #1079 [DynamicCSS] lists Xinha internal CSS 47 * fixed Ticket #1080 Some plugins leave behind stylesheet links in fullpage mode 48 * fixed Ticket #1083 Convert URLs to links - Error 49 * fixed Ticket #1084 URL auto-linking (Gecko): URLs with user:password@domain.tld falsely recognized as email address 50 * fixed Ticket #1085 URL auto-linking (Gecko): IP numbers don't work 51 * fixed Ticket #1081 Control character is not being removed inside SCRIPT tags or HEAD when switching from textmode to htmlmode 52 * fixed Ticket #1078 [InsertImage] spacing attributes: inconsistent behaviour when editing image 53 * fixed Ticket #1089 [Color Picker] Localize OK Label 54 * fixed Ticket #1091 [SaveSubmit] does not correctly submit value of checkboxes and radio buttons 55 56 Xinha 0.93 57 - fixed Ticket #967 Font Color Picker stops working after using one of ImageManager, ExtendedFileManager, FullPage, or HorizontalRule 58 - fixed Ticket #965 When switching between Xinhas in the same page, in textmode toolbar stays disabled 59 - fixwd Ticket #963 DOMwalk IE: head tag attributes without quotes and closing slash 60 - Ticket #962 DOMwalk Mozilla: improved source indentation 61 - fixed Ticket #957 If item in in xinha_editors is not a textarea: skip gracefully 62 - fixed Ticket #900: catch an fatal error that occured sometimes when switching between modes in fullpage mode in Mozilla 63 - fixed Ticket #969 DOMwalk Gecko: line breaks rendered as <br>s inside <pre> blocks 64 - fixed Ticket #976 Loading message misplaced in IE7 65 - fixed Ticket #977 TableOperations toolbar off-place in ext_example.html 66 - fixed Ticket #978 defining a padding for <td>s in global css affects Xinha framework 67 - Ticket #979 improve checking for non-supported browsers 68 - fixed Ticket #934 SuperClean plugin returns just quotation when executed on localhost 69 - Ticket #929 Save changes on page unload fixed for Mozilla 70 - fixed Ticket #980 ImageManager color format bug 71 - fixed Ticket #981 No doctype in iframe content document/ editor always in quirks mode 72 - fixed Ticket #543 Stylist Panel overflow broken 73 - Ticket #983 added id for iframe 74 - fixed Ticket #984 !ExtendedFileManager produces php warning 75 - optimized icon file size 76 - fixed !JavaScript error in !ImageManager/!ExtendedFileManager image editor 77 - Ticket #908* Prompts broken in IE7: fixed for EFM, !ImageManager & !TableOperations 78 - Fixes for TableOperations, tickets #82, #908*, #912 and #947 79 - fixed Ticket #998* whitespace added before and/or after content (in non-fullpage mode) 80 - fixed slow unloading in Mozilla 81 - Fix focus problem when switching from html to wysiwyg in Gecko. See ticket #900. 82 - fixed toolbar floating issue 83 - fixed #1003 HTML length limited to 1024 characters with plugin CharCounter 84 - Ticket #1000 new public methods for getting/setting editor content 85 - fixed #735 - IE eating scripts and comments at the beginning of pages. 86 - Added new config variables to set iframe width if less than editor width (ticket:322) and set alignment of toolbar buttons. 87 - added Basque translation for XinhaCore 88 - prevent an error if server is set to parse .js files as PHP 89 - Ticket #127 plugin HtmlEntities: Entities.js file corrupt 7 90 8 91 Xinha 0.92beta
