594. File Comparison Report

Produced on Mon May 12 13:06:26 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.

594.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\plugins\tiny_mce\plugins\xhtmlxtras\jscripts element_common.js Thu Sep 20 08:59:18 2007 UTC
2 Mon May 12 13:06:26 2008 UTC

594.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 0 0
Removed 1 241

594.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

594.4 Active regular expressions

No regular expressions were active.

594.5 Comparison detail

1    /**    
2    * $Id: ed itor_plugi n_src.js 4 2 2006-08- 08 14:32:2 4Z spocke  $    
3    *    
4    * @author  Moxiecode  - based o n work by  Andrew Tet law    
5    * @copyri ght Copyri ght © 2004 -2007, Mox iecode Sys tems AB, A ll rights  reserved.    
6    */    
7      
8   function i nitCommonA ttributes( elm) {    
9       var fo rmObj = do cument.for ms[0];    
10      
11       // Set up form da ta for com mon elemen t attribut es    
12       setFor mValue('ti tle', tiny MCE.getAtt rib(elm, ' title'));    
13       setFor mValue('id ', tinyMCE .getAttrib (elm, 'id' ));    
14       select ByValue(fo rmObj, 'cl ass', tiny MCE.getAtt rib(elm, ' class'), t rue);    
15       setFor mValue('st yle', tiny MCE.getAtt rib(elm, ' style'));    
16       select ByValue(fo rmObj, 'di r', tinyMC E.getAttri b(elm, 'di r'));    
17       setFor mValue('la ng', tinyM CE.getAttr ib(elm, 'l ang'));    
18       setFor mValue('on focus', ti nyMCE.getA ttrib(elm,  'onfocus' ));    
19       setFor mValue('on blur', tin yMCE.getAt trib(elm,  'onblur')) ;    
20       setFor mValue('on click', ti nyMCE.getA ttrib(elm,  'onclick' ));    
21       setFor mValue('on dblclick',  tinyMCE.g etAttrib(e lm, 'ondbl click'));    
22       setFor mValue('on mousedown' , tinyMCE. getAttrib( elm, 'onmo usedown')) ;    
23       setFor mValue('on mouseup',  tinyMCE.ge tAttrib(el m, 'onmous eup'));    
24       setFor mValue('on mouseover' , tinyMCE. getAttrib( elm, 'onmo useover')) ;    
25       setFor mValue('on mousemove' , tinyMCE. getAttrib( elm, 'onmo usemove')) ;    
26       setFor mValue('on mouseout',  tinyMCE.g etAttrib(e lm, 'onmou seout'));    
27       setFor mValue('on keypress',  tinyMCE.g etAttrib(e lm, 'onkey press'));    
28       setFor mValue('on keydown',  tinyMCE.ge tAttrib(el m, 'onkeyd own'));    
29       setFor mValue('on keyup', ti nyMCE.getA ttrib(elm,  'onkeyup' ));    
30   }    
31      
32   function s etFormValu e(name, va lue) {    
33       if(doc ument.form s[0].eleme nts[name])  document. forms[0].e lements[na me].value  = value;    
34   }    
35      
36   function i nsertDateT ime(id) {    
37       docume nt.getElem entById(id ).value =  getDateTim e(new Date (), "%Y-%m -%dT%H:%M: %S");    
38   }    
39      
40   function g etDateTime (d, fmt) {    
41       fmt =  fmt.replac e("%D", "% m/%d/%y");    
42       fmt =  fmt.replac e("%r", "% I:%M:%S %p ");    
43       fmt =  fmt.replac e("%Y", ""  + d.getFu llYear());    
44       fmt =  fmt.replac e("%y", ""  + d.getYe ar());    
45       fmt =  fmt.replac e("%m", ad dZeros(d.g etMonth()+ 1, 2));    
46       fmt =  fmt.replac e("%d", ad dZeros(d.g etDate(),  2));    
47       fmt =  fmt.replac e("%H", ""  + addZero s(d.getHou rs(), 2));    
48       fmt =  fmt.replac e("%M", ""  + addZero s(d.getMin utes(), 2) );    
49       fmt =  fmt.replac e("%S", ""  + addZero s(d.getSec onds(), 2) );    
50       fmt =  fmt.replac e("%I", ""  + ((d.get Hours() +  11) % 12 +  1));    
51       fmt =  fmt.replac e("%p", ""  + (d.getH ours() < 1 2 ? "AM" :  "PM"));    
52       fmt =  fmt.replac e("%%", "% ");    
53      
54       return  fmt;    
55   }    
56      
57   function a ddZeros(va lue, len)  {    
58       var i;    
59      
60       value  = "" + val ue;    
61      
62       if (va lue.length  < len) {    
63           fo r (i=0; i< (len-value .length);  i++)    
64                value =  "0" + valu e;    
65       }    
66      
67       return  value;    
68   }    
69      
70   function s electByVal ue(form_ob j, field_n ame, value , add_cust om, ignore _case) {    
71       if (!f orm_obj ||  !form_obj .elements[ field_name ])    
72           re turn;    
73      
74       var se l = form_o bj.element s[field_na me];    
75      
76       var fo und = fals e;    
77       for (v ar i=0; i< sel.option s.length;  i++) {    
78           va r option =  sel.optio ns[i];    
79      
80           if  (option.v alue == va lue || (ig nore_case  && option. value.toLo werCase()  == value.t oLowerCase ())) {    
81                option.s elected =  true;    
82                found =  true;    
83           }  else    
84                option.s elected =  false;    
85       }    
86      
87       if (!f ound && ad d_custom & & value !=  '') {    
88           va r option =  new Optio n('Value:  ' + value,  value);    
89           op tion.selec ted = true ;    
90           se l.options[ sel.option s.length]  = option;    
91       }    
92      
93       return  found;    
94   }    
95      
96   function s etAttrib(e lm, attrib , value) {    
97       var fo rmObj = do cument.for ms[0];    
98       var va lueElm = f ormObj.ele ments[attr ib.toLower Case()];    
99      
100       if (ty peof(value ) == "unde fined" ||  value == n ull) {    
101           va lue = "";    
102      
103           if  (valueElm )    
104                value =  valueElm.v alue;    
105       }    
106      
107       if (va lue != "")  {    
108           if  (attrib = = "style")    
109                attrib =  "style.cs sText";    
110      
111           if  (attrib.s ubstring(0 , 2) == 'o n')    
112                value =  'return tr ue;' + val ue;    
113      
114           if  (attrib = = "class")  {    
115                tinyMCE. addCSSClas s(elm, val ue);    
116                return;    
117           }    
118      
119           el m.setAttri bute(attri b.toLowerC ase(), val ue);    
120       } else    
121           el m.removeAt tribute(at trib);    
122   }    
123      
124   function s etAllCommo nAttribs(e lm) {    
125       setAtt rib(elm, ' title');    
126       setAtt rib(elm, ' id');    
127       setAtt rib(elm, ' class');    
128       setAtt rib(elm, ' style');    
129       setAtt rib(elm, ' dir');    
130       setAtt rib(elm, ' lang');    
131       /*setA ttrib(elm,  'onfocus' );    
132       setAtt rib(elm, ' onblur');    
133       setAtt rib(elm, ' onclick');    
134       setAtt rib(elm, ' ondblclick ');    
135       setAtt rib(elm, ' onmousedow n');    
136       setAtt rib(elm, ' onmouseup' );    
137       setAtt rib(elm, ' onmouseove r');    
138       setAtt rib(elm, ' onmousemov e');    
139       setAtt rib(elm, ' onmouseout ');    
140       setAtt rib(elm, ' onkeypress ');    
141       setAtt rib(elm, ' onkeydown' );    
142       setAtt rib(elm, ' onkeyup'); */    
143   }    
144      
145   SXE = {    
146       curren tAction :  "insert",    
147       inst :  tinyMCE.g etInstance ById(tinyM CE.getWind owArg('edi tor_id')),    
148       update Element :  null    
149   }    
150      
151   SXE.focusE lement = S XE.inst.ge tFocusElem ent();    
152      
153   SXE.initEl ementDialo g = functi on(element _name) {    
154       addCla ssesToList ('class',  'xhtmlxtra s_styles') ;    
155       TinyMC E_Editable Selects.in it();    
156      
157       elemen t_name = e lement_nam e.toLowerC ase();    
158       var el m = tinyMC E.getParen tElement(S XE.focusEl ement, ele ment_name) ;    
159       if (el m != null  && elm.nod eName == e lement_nam e.toUpperC ase()) {    
160           SX E.currentA ction = "u pdate";    
161       }    
162      
163       if (SX E.currentA ction == " update") {    
164           in itCommonAt tributes(e lm);    
165           SX E.updateEl ement = el m;    
166       }    
167      
168       docume nt.forms[0 ].insert.v alue = tin yMCE.getLa ng('lang_'  + SXE.cur rentAction , 'Insert' , true);     
169   }    
170      
171   SXE.insert Element =  function(e lement_nam e) {    
172       var el m = tinyMC E.getParen tElement(S XE.focusEl ement, ele ment_name) , h, tagNa me;    
173      
174       tinyMC EPopup.exe cCommand(' mceBeginUn doLevel');    
175       if (el m == null)  {    
176           va r s = SXE. inst.selec tion.getSe lectedHTML ();    
177           if (s.length  > 0) {    
178                tagName  = element_ name;    
179      
180                if (tiny MCE.isIE & & !tinyMCE .isOpera & & element_ name.index Of('html:' ) == 0)    
181                    elem ent_name =  element_n ame.substr ing(5).toL owerCase() ;    
182      
183                h = '<'  + tagName  + ' id="#s xe_temp_'  + element_ name + '#" >' + s + ' </' + tagN ame + '>';    
184      
185                tinyMCEP opup.execC ommand('mc eInsertCon tent', fal se, h);    
186      
187                var elem entArray =  tinyMCE.g etElements ByAttribut eValue(SXE .inst.getB ody(), ele ment_name,  'id', '#s xe_temp_'  + element_ name + '#' );    
188                for (var  i=0; i<el ementArray .length; i ++) {    
189                    var  elm = elem entArray[i ];    
190      
191                    elm. id = '';    
192                    elm. setAttribu te('id', ' ');    
193                    elm. removeAttr ibute('id' );    
194      
195                    setA llCommonAt tribs(elm) ;    
196                }    
197           }    
198       } else  {    
199           se tAllCommon Attribs(el m);    
200       }    
201       tinyMC E.triggerN odeChange( );    
202       tinyMC EPopup.exe cCommand(' mceEndUndo Level');    
203   }    
204      
205   SXE.remove Element =  function(e lement_nam e){    
206       elemen t_name = e lement_nam e.toLowerC ase();    
207       elm =  tinyMCE.ge tParentEle ment(SXE.f ocusElemen t, element _name);    
208       if(elm  && elm.no deName ==  element_na me.toUpper Case()){    
209           ti nyMCEPopup .execComma nd('mceBeg inUndoLeve l');    
210           ti nyMCE.exec Command('m ceRemoveNo de', false , elm);    
211           ti nyMCE.trig gerNodeCha nge();    
212           ti nyMCEPopup .execComma nd('mceEnd UndoLevel' );    
213       }    
214   }    
215      
216   SXE.showRe moveButton  = functio n() {    
217           do cument.get ElementByI d("remove" ).style.di splay = 'b lock';    
218   }    
219      
220   SXE.contai nsClass =  function(e lm,cl) {    
221       return  (elm.clas sName.inde xOf(cl) >  -1) ? true  : false;    
222   }    
223      
224   SXE.remove Class = fu nction(elm ,cl) {    
225       if(elm .className  == null | | elm.clas sName == " " || !SXE. containsCl ass(elm,cl )) {    
226           re turn true;    
227       }    
228       var cl assNames =  elm.class Name.split (" ");    
229       var ne wClassName s = "";    
230       for (v ar x = 0,  cnl = clas sNames.len gth; x < c nl; x++) {    
231           if  (classNam es[x] != c l) {    
232                newClass Names += ( classNames [x] + " ") ;    
233           }    
234       }    
235       elm.cl assName =  newClassNa mes.substr ing(0,newC lassNames. length-1);  //removes  extra spa ce at the  end    
236   }    
237      
238   SXE.addCla ss = funct ion(elm,cl ) {    
239       if(!SX E.contains Class(elm, cl)) elm.c lassName ?  elm.class Name += "  " + cl : e lm.classNa me = cl;    
240       return  true;    
241   }