517. File Comparison Report

Produced on Mon May 12 13:06:17 2008 UTC. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

517.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\plugins\tiny_mce\plugins\preview editor_plugin_src.js Thu Sep 20 08:59:00 2007 UTC
2 Dolphin-v.6.1.0\plugins\tiny_mce\plugins\preview editor_plugin_src.js Thu Mar 27 13:53:24 2008 UTC

517.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 25 256
Changed 22 120
Inserted 0 0
Removed 3 16

517.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

517.4 Active regular expressions

No regular expressions were active.

517.5 Comparison detail

1   /**   1   /**
2     *   $Id:   editor_plu gin_src.js   201   200 7 -0 2 -1 2   1 5:5 6: 56 Z   spocke   $   2     *   $Id:   editor_plu gin_src.js   537   200 8 -0 1 -1 4   1
6: 38:33 Z   spocke   $
3    *   3    *
4    * @author  Moxiecode   4    * @author  Moxiecode
5     *   @copyright   Copyright   ©   2004-200 7 ,   Moxiecode   Systems   AB,   All   rights   reserved.   5     *   @copyright   Copyright   ©   2004-200 8 ,   Moxiecode   Systems   AB,   All   rights   reserved.
6    */   6    */
7     7  
8   /* Import  plugin spe cific lang uage pack  */   8   (function( ) {
9   tinyMCE.im portPlugin LanguagePa ck('previe w');   9       tinymc e.create(' tinymce.pl ugins.Prev iew', {
    10           in it : funct ion(ed, ur l) {
    11                var t =  this;
    12  
    13                t.editor  = ed;
    14  
    15                ed.addCo mmand('mce Preview',  t._preview , t);
    16                ed.addBu tton('prev iew', {tit le : 'prev iew.previe w_desc', c md : 'mceP review'});
    17           },
10     18  
11   var TinyMC E_PreviewP lugin = {    
12       getInf o : functi on() {   19           ge tInfo : fu nction() {
13           re turn {   20                return {
14                longname  : 'Previe w',   21                    long name : 'Pr eview',
15                author :  'Moxiecod e Systems  AB',   22                    auth or : 'Moxi ecode Syst ems AB',
16                authorur l : 'http: //tinymce. moxiecode. com',   23                    auth orurl : 'h ttp://tiny mce.moxiec ode.com',
17                infourl  : 'http:// wiki.moxie code.com/i ndex.php/T inyMCE:Plu gins/previ ew',   24                    info url : 'htt p://wiki.m oxiecode.c om/index.p hp/TinyMCE :Plugins/p review',
18                 version   :   tiny MCE .majorVers ion   +   "."   +   tiny MCE .minorVers ion   25                     version   :   tiny mce .majorVers ion   +   "."   +   tiny mce .minorVers ion
19           };   26                };
20       },   27           },
21     28  
22       /**   29           //  Private m ethods
23        * Ret urns the H TML conten ts of the  preview co ntrol.    
24        */    
25       getCon trolHTML :  function( cn) {    
26           sw itch (cn)  {    
27                case "pr eview":    
28                    retu rn tinyMCE .getButton HTML(cn, ' lang_previ ew_desc',  '{$pluginu rl}/images /preview.g if', 'mceP review');    
29           }    
30      
31           re turn "";    
32       },    
33     30  
34       /**   31           _p review : f unction()  {
35        * Exe cutes the  mcePreview  command.   32                var ed =  this.edit or, win, h tml, c, po s, pos2, c ss, i, pag e = ed.get Param("plu gin_previe w_pageurl" , null), w  = ed.getP aram("plug in_preview _width", " 550"), h =  ed.getPar am("plugin _preview_h eight", "6 00");
36        */    
37       execCo mmand : fu nction(edi tor_id, el ement, com mand, user _interface , value) {    
38           //  Handle co mmands    
39           sw itch (comm and) {    
40                case "mc ePreview":    
41                    var  previewPag e = tinyMC E.getParam ("plugin_p review_pag eurl", nul l);    
42                    var  previewWid th = tinyM CE.getPara m("plugin_ preview_wi dth", "550 ");    
43                    var  previewHei ght = tiny MCE.getPar am("plugin _preview_h eight", "6 00");    
44     33  
45                    // U se a custo m preview  page   34                // Use a  custom pr eview page
46                     if   (p reviewP age)   {   35                 if   (p
age)   {
47                         var templa te = new A rray();   36                    ed.w indowManag er.open({
48  
  37                         file : ed. getParam(" plugin_pre view_pageu rl", null) ,
49                         template[' file'] = p reviewPage ;   38                         width : w,
50                         template[' width'] =  previewWid th;   39                         height : h
51                         template[' height'] =  previewHe ight;   40                     }, {
52  
  41                         resizable  : "yes",
53                         tinyMCE.op enWindow(t emplate, { editor_id  : editor_i d, resizab le : "yes" , scrollba rs : "yes" , inline :  "yes", co ntent : ti nyMCE.getC ontent(),  content_cs s : tinyMC E.getParam ("content_ css")});   42                         scrollbars  : "yes",
    43                         inline : 1
    44                     });
54                    } el se {   45                } else {
55                         var   win   =   window.ope n("",   "mcePrevie w",   "menubar=n o,toolbar= no,scrollb ars=yes,re sizable=ye s,left=20, top=20,wid th="   +   previe w Width   +   ",height="    +   previewHei g h t );   46                    
win   =   window.ope n("",   "mcePrevie w",   "menubar=n o,toolbar= no,scrollb ars=yes,re sizable=ye s,left=20, top=20,wid th="   +  
w  
+   ",height="    +  
h
);
56                         var   html   =   "" ,   i ;   47                    
html   =   ""
;
57                         var   c   =   tinyMCE .getConten t();   48                    
c   =   ed .getConten t();
58                         var   pos   =   c.indexOf( '<body'),   pos2,   css   =   tinyMCE .getParam( "content_c ss"
).split(', ');
  49                    pos  = c.indexO f('<body') ;
    50                    
css   =   ed .getParam( "content_c ss" ,   '' ).split(', ');
    51  
    52                    tiny mce.map(cs s, functio n(u) {
    53                         return ed. documentBa seURI.toAb solute(u);
    54                    });
59     55  
60                         if (pos !=  -1) {   56                    if ( pos != -1)  {
61                             pos =  c.indexOf( '>', pos);   57                         pos = c.in dexOf('>',  pos);
62                             pos2 =  c.lastInd exOf('</bo dy>');   58                         pos2 = c.l astIndexOf ('</body>' );
63                             c = c. substring( pos + 1, p os2);   59                         c = c.subs tring(pos  + 1, pos2) ;
64                         }   60                    }
65     61  
66                         html   +=   tinyMCE .getParam( 'doctype') ;   62                     html   +=   ed .getParam( 'doctype') ;
67                         html += '< html xmlns ="http://w ww.w3.org/ 1999/xhtml ">';   63                    html  += '<html  xmlns="ht tp://www.w 3.org/1999 /xhtml">';
68                         html += '< head>';   64                    html  += '<head >';
69                         html   +=   '<title>'   +   tinyMCE .getLang(' lang_ preview_de sc')   +   '</title>' ;   65                     html   +=   '<title>'   +   ed .getLang(' preview. preview_de sc')   +   '</title>' ;
70                         html   +=   '<base   href="'   +   tinyMCE . s e tti n gs['b ase _hr e f']   +   '"   />';   66                     html   +=   '<base   href="'   +   ed . docum e
n tB ase URI.g e tURI()   +   '"   />';
71                         html += '< meta http- equiv="Con tent-Type"  content=" text/html;  charset=U TF-8" />';   67                    html  += '<meta  http-equi v="Content -Type" con tent="text /html; cha rset=UTF-8 " />';
72     68  
73                         for (i=0;  i<css.leng th; i++)   69                    for  (i=0; i<cs s.length;  i++)
74                             html + = '<link h ref="' + c ss[i] + '"  rel="styl esheet" ty pe="text/c ss" />';   70                         html += '< link href= "' + css[i ] + '" rel ="styleshe et" type=" text/css"  />';
75     71  
76                         html += '< script typ e="text/ja vascript"> ';    
77                         html += 'w indow.open er.TinyMCE _PreviewPl ugin._setD oc(documen t);';    
78                         html += 'w indow.open er.TinyMCE _PreviewPl ugin._setW in(window) ;';    
79                         html += 'w riteFlash  = window.o pener.Tiny MCE_Previe wPlugin._w riteFlash; ';    
80                         html += 'w riteShockW ave = wind ow.opener. TinyMCE_Pr eviewPlugi n._writeSh ockWave;';    
81                         html += 'w riteQuickT ime = wind ow.opener. TinyMCE_Pr eviewPlugi n._writeQu ickTime;';    
82                         html += 'w riteRealMe dia = wind ow.opener. TinyMCE_Pr eviewPlugi n._writeRe alMedia;';    
83                         html += 'w riteWindow sMedia = w indow.open er.TinyMCE _PreviewPl ugin._writ eWindowsMe dia;';    
84                         html += 'w riteEmbed  = window.o pener.Tiny MCE_Previe wPlugin._w riteEmbed; ';    
85                         html += '< /script>';    
86                         html += '< /head>';   72                    html  += '</hea d>';
87                         html   +=   '<body   dir="'   +   tinyMCE .getParam( "direction ality")   +   '"   onload="wi ndow.opene r. T iny MC E _P r
e vi e wP lugin
._onLoad(
);">';
  73                     html   +=   '<body   dir="'   +   ed .getParam( "direction ality")   +   '"   onload="wi ndow.opene r. t iny mce. E dito r Manag e r.g e t(\''   +   ed.id   +   '\').p lugin s[\'previe w\'] ._onLoad( window,doc ument );">';
88                         html += c;   74                    html  += c;
89                         html += '< /body>';   75                    html  += '</bod y>';
90                         html += '< /html>';   76                    html  += '</htm l>';
91     77  
92                         win.docume nt.write(h tml);   78                    win. document.w rite(html) ;
93                         win.docume nt.close() ;   79                    win. document.c lose();
94                    }   80                }
95      
96                    retu rn true;    
97           }    
98      
99           re turn false ;    
100       },   81           },
101     82  
102        _ setD o c   :   function(
d)   {
  83            _
o nLoad   :   function( w,   d)   {
103           Ti nyMCE_Prev iewPlugin. _doc = d;   84                var t =  this, nl,  i, el = [] , sv, ne;
104           d. _embeds =  new Array( );    
105       },    
106     85  
107       _setWi n : functi on(d) {   86                t._doc =  d;
108           Ti nyMCE_Prev iewPlugin. _win = d;   87                w.writeF lash = t._ writeFlash ;
109       },   88                w.writeS hockWave =  t._writeS hockWave;
110     89                w.writeQ uickTime =  t._writeQ uickTime;
111       _onLoa d : functi on() {   90                w.writeR ealMedia =  t._writeR ealMedia;
112           va r nl, i, e l = new Ar ray(), d =  TinyMCE_P reviewPlug in._doc, s v, ne;   91                w.writeW indowsMedi a = t._wri teWindowsM edia;
    92                w.writeE mbed = t._ writeEmbed ;
113     93  
114           nl  = d.getEl ementsByTa gName("scr ipt");   94                nl = d.g etElements ByTagName( "script");
115           fo r (i=0; i< nl.length;  i++) {   95                for (i=0 ; i<nl.len gth; i++)  {
116                 sv   =   tiny MCE .is MS IE   ?   nl[i].inne rHTML   :   nl[i].firs tChild.nod eValue;   96                     sv   =   tiny mce .is
IE   ?   nl[i].inne rHTML   :   nl[i].firs tChild.nod eValue;
117     97  
118                if (new  RegExp('wr ite(Flash| ShockWave| WindowsMed ia|QuickTi me|RealMed ia)\\(.*',  'g').test (sv))   98                    if ( new RegExp ('write(Fl ash|ShockW ave|Window sMedia|Qui ckTime|Rea lMedia)\\( .*', 'g'). test(sv))
119                    el[e l.length]  = nl[i];   99                         el[el.leng th] = nl[i ];
120           }   100                }
121     101  
122           fo r (i=0; i< el.length;  i++) {   102                for (i=0 ; i<el.len gth; i++)  {
123                ne = d.c reateEleme nt("div");   103                    ne =  d.createE lement("di v");
124                ne.inner HTML = d._ embeds[i];   104                    ne.i nnerHTML =  d._embeds [i];
125                el[i].pa rentNode.i nsertBefor e(ne.first Child, el[ i]);   105                    el[i ].parentNo de.insertB efore(ne.f irstChild,  el[i]);
126           }   106                }
127       },   107           },
128     108  
129       _write Flash : fu nction(p)  {   109           _w riteFlash  : function (p) {
130           p. src = tiny MCE.conver tRelativeT oAbsoluteU RL(tinyMCE .settings[ 'base_href '], p.src) ;   110                p.src =  this.edito r.document BaseURI.to Absolute(p .src);
131           Ti nyMCE_Prev iewPlugin. _writeEmbe d(   111                TinyMCE_ PreviewPlu gin._write Embed(
132                'D27CDB6 E-AE6D-11c f-96B8-444 553540000' ,   112                    'D27 CDB6E-AE6D -11cf-96B8 -444553540 000',
133                'http:// download.m acromedia. com/pub/sh ockwave/ca bs/flash/s wflash.cab #version=6 ,0,40,0',   113                    'htt p://downlo ad.macrome dia.com/pu b/shockwav e/cabs/fla sh/swflash .cab#versi on=6,0,40, 0',
134                'applica tion/x-sho ckwave-fla sh',   114                    'app lication/x -shockwave -flash',
135                p   115                    p
136           );   116                );
137       },   117           },
138     118  
139       _write ShockWave  : function (p) {   119           _w riteShockW ave : func tion(p) {
140           p. src = tiny MCE.conver tRelativeT oAbsoluteU RL(tinyMCE .settings[ 'base_href '], p.src) ;   120                this.edi tor.docume ntBaseURI. toAbsolute (p.src);
141           Ti nyMCE_Prev iewPlugin. _writeEmbe d(   121                TinyMCE_ PreviewPlu gin._write Embed(
142                '166B1BC A-3F9C-11C F-8075-444 553540000' ,   122                    '166 B1BCA-3F9C -11CF-8075 -444553540 000',
143                'http:// download.m acromedia. com/pub/sh ockwave/ca bs/directo r/sw.cab#v ersion=8,5 ,1,0',   123                    'htt p://downlo ad.macrome dia.com/pu b/shockwav e/cabs/dir ector/sw.c ab#version =8,5,1,0',
144                'applica tion/x-dir ector',   124                    'app lication/x -director' ,
145                p   125                    p
146           );   126                );
147       },   127           },
148     128  
149       _write QuickTime  : function (p) {   129           _w riteQuickT ime : func tion(p) {
150           p. src = tiny MCE.conver tRelativeT oAbsoluteU RL(tinyMCE .settings[ 'base_href '], p.src) ;   130                this.edi tor.docume ntBaseURI. toAbsolute (p.src);
151           Ti nyMCE_Prev iewPlugin. _writeEmbe d(   131                TinyMCE_ PreviewPlu gin._write Embed(
152                '02BF25D 5-8C17-4B2 3-BC80-D34 88ABDDC6B' ,   132                    '02B F25D5-8C17 -4B23-BC80 -D3488ABDD C6B',
153                'http:// www.apple. com/qtacti vex/qtplug in.cab#ver sion=6,0,2 ,0',   133                    'htt p://www.ap ple.com/qt activex/qt plugin.cab #version=6 ,0,2,0',
154                'video/q uicktime',   134                    'vid eo/quickti me',
155                p   135                    p
156           );   136                );
157       },   137           },
158     138  
159       _write RealMedia  : function (p) {   139           _w riteRealMe dia : func tion(p) {
160           p. src = tiny MCE.conver tRelativeT oAbsoluteU RL(tinyMCE .settings[ 'base_href '], p.src) ;   140                this.edi tor.docume ntBaseURI. toAbsolute (p.src);
161           Ti nyMCE_Prev iewPlugin. _writeEmbe d(   141                TinyMCE_ PreviewPlu gin._write Embed(
162                'CFCDAA0 3-8BE4-11c f-B84B-002 0AFBBCCFA' ,   142                    'CFC DAA03-8BE4 -11cf-B84B -0020AFBBC CFA',
163                'http:// download.m acromedia. com/pub/sh ockwave/ca bs/flash/s wflash.cab #version=6 ,0,40,0',   143                    'htt p://downlo ad.macrome dia.com/pu b/shockwav e/cabs/fla sh/swflash .cab#versi on=6,0,40, 0',
164                'audio/x -pn-realau dio-plugin ',   144                    'aud io/x-pn-re alaudio-pl ugin',
165                p   145                    p
166           );   146                );
167       },   147           },
168     148  
169       _write WindowsMed ia : funct ion(p) {   149           _w riteWindow sMedia : f unction(p)  {
170           p. src = tiny MCE.conver tRelativeT oAbsoluteU RL(tinyMCE .settings[ 'base_href '], p.src) ;   150                this.edi tor.docume ntBaseURI. toAbsolute (p.src);
171           p. url = p.sr c;   151                p.url =  p.src;
172           Ti nyMCE_Prev iewPlugin. _writeEmbe d(   152                TinyMCE_ PreviewPlu gin._write Embed(
173                '6BF52A5 2-394A-11D 3-B153-00C 04F79FAA6' ,   153                    '6BF 52A52-394A -11D3-B153 -00C04F79F AA6',
174                'http:// activex.mi crosoft.co m/activex/ controls/m player/en/ nsmp2inf.c ab#Version =5,1,52,70 1',   154                    'htt p://active x.microsof t.com/acti vex/contro ls/mplayer /en/nsmp2i nf.cab#Ver sion=5,1,5 2,701',
175                'applica tion/x-mpl ayer2',   155                    'app lication/x -mplayer2' ,
176                p   156                    p
177           );   157                );
178       },   158           },
179     159  
180       _write Embed : fu nction(cls , cb, mt,  p) {   160           _w riteEmbed  : function (cls, cb,  mt, p) {
181            var   h   =   '',   n,   d   =   TinyMCE_Pr eviewPlugi n ._doc,   ne,   c;   161                 var   h   =   '',   n,   d   =   t ._doc,   ne,   c;
182     162  
183           h  += '<objec t classid= "clsid:' +  cls + '"  codebase=" ' + cb + ' "';   163                h += '<o bject clas sid="clsid :' + cls +  '" codeba se="' + cb  + '"';
184           h  += typeof( p.id) != " undefined"  ? 'id="'  + p.id + ' "' : '';   164                h += typ eof(p.id)  != "undefi ned" ? 'id ="' + p.id  + '"' : ' ';
185           h  += typeof( p.name) !=  "undefine d" ? 'name ="' + p.na me + '"' :  '';   165                h += typ eof(p.name ) != "unde fined" ? ' name="' +  p.name + ' "' : '';
186           h  += typeof( p.width) ! = "undefin ed" ? 'wid th="' + p. width + '" ' : '';   166                h += typ eof(p.widt h) != "und efined" ?  'width="'  + p.width  + '"' : '' ;
187           h  += typeof( p.height)  != "undefi ned" ? 'he ight="' +  p.height +  '"' : '';   167                h += typ eof(p.heig ht) != "un defined" ?  'height=" ' + p.heig ht + '"' :  '';
188           h  += typeof( p.align) ! = "undefin ed" ? 'ali gn="' + p. align + '" ' : '';   168                h += typ eof(p.alig n) != "und efined" ?  'align="'  + p.align  + '"' : '' ;
189           h  += '>';   169                h += '>' ;
190     170  
191           fo r (n in p)   171                for (n i n p)
192                h += '<p aram name= "' + n + ' " value="'  + p[n] +  '">';   172                    h +=  '<param n ame="' + n  + '" valu e="' + p[n ] + '">';
193     173  
194           h  += '<embed  type="' +  mt + '"';   174                h += '<e mbed type= "' + mt +  '"';
195     175  
196           fo r (n in p)   176                for (n i n p)
197                h += n +  '="' + p[ n] + '" ';   177                    h +=  n + '="'  + p[n] + ' " ';
198     178  
199           h  += '></emb ed></objec t>';   179                h += '>< /embed></o bject>';
200     180  
201           d. _embeds[d. _embeds.le ngth] = h;   181                d._embed s[d._embed s.length]  = h;
202       }   182           }
203   }
;
  183        } ) ;
204     184  
205   tiny MCE . add Plugin
( " preview " ,   T iny MCE_ Preview Plugin );
  185       // Reg ister plug in
    186        tiny mce .
Plugin Manager.ad d ( ' preview ' ,   t iny mce.plugin s. Preview
);
    187   })();