Changeset 911


Ignore:
Timestamp:
10/22/07 19:22:22 (12 years ago)
Author:
ray
Message:

uupdate branch with changes from trunk

Location:
branches/ray
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/ray/XinhaCore.js

    r892 r911  
    11  
    22  /*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:-- 
    3     --  Xinha (is not htmlArea) - http://xinha.gogo.co.nz/ 
     3    --  Xinha (is not htmlArea) - http://xinha.org 
    44    -- 
    55    --  Use of Xinha is granted by the terms of the htmlArea License (based on 
    66    --  BSD license)  please read license.txt in this package for details. 
    77    -- 
     8    --  Copyright (c) 2005-2007 Xinha Developer Team and contributors 
     9    --   
    810    --  Xinha was originally based on work by Mihai Bazon which is: 
    911    --      Copyright (c) 2003-2004 dynarch.com. 
     
    48484850   
    48494851  // remove disabling of inline event handle inside Xinha iframe 
    4850   html = html.replace(/(<[^>]*onclick=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    4851   html = html.replace(/(<[^>]*onmouseover=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    4852   html = html.replace(/(<[^>]*onmouseout=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    4853   html = html.replace(/(<[^>]*onmousedown=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    4854   html = html.replace(/(<[^>]*onmouseup=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    4855  
     4852  html = html.replace(/(<[^>]*on(click|mouse(over|out|up|down))=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    48564853 
    48574854  // Figure out what our server name is, and how it's referenced 
     
    49144911 
    49154912  // disable inline event handle inside Xinha iframe 
    4916   html = html.replace(/(<[^>]*onclick=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
    4917   html = html.replace(/(<[^>]*onmouseover=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
    4918   html = html.replace(/(<[^>]*onmouseout=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
    4919   html = html.replace(/(<[^>]*onmouseodown=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
    4920   html = html.replace(/(<[^>]*onmouseup=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
     4913  html = html.replace(/(<[^>]*on(click|mouse(over|out|up|down))=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
    49214914   
    49224915  html = this.inwardSpecialReplacements(html); 
  • branches/ray/contrib/compress.php

    r892 r911  
    2828                        $url  = $durl . '/' . $file; 
    2929 
    30                         if(preg_match("/.svn|lang/",$path)) continue; 
     30                        if(preg_match("/\.svn|lang/",$path)) continue; 
    3131                         
    3232                        if(is_dir($path)) 
     
    4949$cwd = getcwd(); 
    5050print "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'; 
    5168foreach ($return as $file) 
    5269{ 
     
    5572        flush(); 
    5673        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"); 
    5876        if (preg_match('/js: ".*?", line \d+:/',file_get_contents($file))) 
    5977        { 
  • branches/ray/examples/Extended.html

    r761 r911  
    1 <html> 
     1<html> 
    22 
    33<head> 
  • branches/ray/examples/ext_example-menu.php

    r761 r911  
    1 <?PHP 
     1<?php 
    22  $LocalPluginPath = dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'plugins'; 
    33  $LocalSkinPath = dirname(dirname(__File__)).DIRECTORY_SEPARATOR.'skins'; 
  • branches/ray/modules/ColorPicker/ColorPicker.js

    r862 r911  
    687687        but.style.cursor = 'pointer'; 
    688688        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'))); 
    690690        but.align = 'center'; 
    691691        div.appendChild(but); 
     
    804804      @*/ 
    805805    }; 
    806   } 
     806} // end Xinha.colorPicker 
    807807 
    808808// array of the saved colors 
     
    847847}; 
    848848 
    849 Xinha.colorPicker._lc = function(string) { 
    850   return Xinha._lc(string); 
    851 } 
    852849 
    853850 
  • branches/ray/modules/Gecko/Gecko.js

    r862 r911  
    167167          if (RE_date.test(matchData)) 
    168168          { 
    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))  
    170171            { 
    171172              break; 
    172             } 
     173            }*/ 
    173174          }  
    174175          var leftTextUrl  = s.anchorNode; 
     
    255256 
    256257            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() ) ) ) ) 
    258260            { 
    259261              var txtNode = s.anchorNode; 
     
    261263              { 
    262264                // 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? 
    263266                m = txtNode.data.match(Xinha.RE_url); 
    264267                if(m) 
     
    373376Gecko.prototype.onMouseDown = function(ev) 
    374377{    
    375         // Gecko doesn't select hr's on single click 
    376         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  } 
    382385} 
    383386 
     
    693696Xinha.prototype.setCC = function ( target ) 
    694697{ 
     698  var cc = this.cc; 
    695699  try 
    696700  { 
     
    702706      var after = ta.value.substring( index, ta.value.length ); 
    703707 
    704       if ( after.match(/^[^<]*>/) ) 
     708      if ( after.match(/^[^<]*>/) ) // make sure cursor is in an editable area (outside tags, script blocks, and inside the body) 
    705709      { 
    706710        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"); 
    710716    } 
    711717    else 
    712718    { 
    713719      var sel = this.getSelection(); 
    714       sel.getRangeAt(0).insertNode( document.createTextNode( this.cc ) ); 
     720      sel.getRangeAt(0).insertNode( document.createTextNode( cc ) ); 
    715721    } 
    716722  } catch (e) {} 
  • branches/ray/modules/GetHtml/TransformInnerHTML.js

    r892 r911  
    4141/*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 
    4242/*06*/  new RegExp().compile(/(="[^']*)'([^'"]*")/),//check quote nesting 
    43 /*07*/  new RegExp().compile(/&(?=[^<]*>)/g),//expand query ampersands 
     43/*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 
    4444/*08*/  new RegExp().compile(/<\s+/g),//strip tagstart whitespace 
    4545/*09*/  new RegExp().compile(/\s+(\/)?>/g),//trim whitespace 
     
    7777                replace(c[4], '<$1$2 />').//terminate singlet tags 
    7878                replace(c[6], '$1$2').//check quote nesting 
    79         //      replace(c[7], '&amp;').//expand query ampersands 
     79                replace(c[7], '&amp;').//expand query ampersands 
    8080                replace(c[8], '<').//strip tagstart whitespace 
    8181                replace(c[10], ' ');//trim extra whitespace 
  • branches/ray/modules/InsertImage/insert_image.js

    r892 r911  
    1212    --  This is the Xinha standard implementation of an image insertion plugin 
    1313    -- 
    14     --  The file is loaded by 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. 
    1515    -- 
    1616    -- 
    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 $ 
    2121    --------------------------------------------------------------------------*/ 
    2222   
     
    2424  name          : "InsertImage", 
    2525  origin        : "Xinha Core", 
    26   version       : "$LastChangedRevision$".replace(/^[^:]*: (.*) \$$/, '$1'), 
     26  version       : "$LastChangedRevision: 791 $".replace(/^[^:]*: (.*) \$$/, '$1'), 
    2727  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'), 
    2929  sponsor       : "", 
    3030  sponsor_url   : "", 
  • branches/ray/modules/InternetExplorer/InternetExplorer.js

    r892 r911  
    436436Xinha.prototype.setCC = function ( target ) 
    437437{ 
     438  var cc = this.cc; 
    438439  if ( target == "textarea" ) 
    439440  { 
     
    441442    var pos = document.selection.createRange(); 
    442443    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 ); 
    445446    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 ); 
    447448     
    448     if ( after.match(/^[^<]*>/) ) 
     449    if ( after.match(/^[^<]*>/) ) // make sure cursor is in an editable area (outside tags, script blocks, and inside the body) 
    449450    { 
    450451      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"); 
    454457  } 
    455458  else 
     
    460463    { 
    461464      var control = r.item(0); 
    462       control.outerHTML += this.cc; 
     465      control.outerHTML += cc; 
    463466    } 
    464467    else 
    465468    { 
    466469      r.collapse(); 
    467       r.text = this.cc; 
     470      r.text = cc; 
    468471    } 
    469472  } 
  • branches/ray/plugins/SaveSubmit/save-submit.js

    r890 r911  
    9595        form.onsubmit(); 
    9696 
    97         var content =''; 
    98  
     97        var name, value, content =''; 
     98         
    9999        for (var i=0;i<form.elements.length;i++) 
    100100        { 
     101                if (( form.elements[i].type == 'checkbox' || form.elements[i].type == 'radio' ) && !form.elements[i].checked ) continue; 
     102 
    101103                content += ((i>0) ? '&' : '') + form.elements[i].name + '=' + encodeURIComponent(form.elements[i].value); 
    102104        } 
  • branches/ray/popups/about.html

    r862 r911  
    2020<script type="text/javascript" src="popup.js"></script> 
    2121<script type="text/javascript"> 
    22 window.resizeTo(450, 250); 
     22window.resizeTo(450, 365); 
    2323var TABS = []; 
    2424var CURRENT_TAB = 0; 
     
    199199   Use of Xinha is granted by the terms of the htmlArea License (based on BSD license) 
    200200  </p> 
     201 <pre> 
     202Copyright (c) 2005-2007 Xinha Developer Team and contributors 
     203        </pre> 
    201204  <p> 
    202205    Xinha was originally based on work by Mihai Bazon which is: 
    203206  </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> 
     208Copyright (c) 2003-2004 dynarch.com. 
     209Copyright (c) 2002-2003 interactivetools.com, inc. 
     210This copyright notice MUST stay intact for use. 
     211  </pre> 
    208212</div> 
    209213 
  • branches/ray/release-notes.txt

    r761 r911  
    55 
    66Release History 
     7 
     8Xinha 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 
     56Xinha 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 
    790 
    891Xinha 0.92beta 
Note: See TracChangeset for help on using the changeset viewer.