555. File Comparison Report

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

555.1 Files compared

# Location File Last Modified
1 Mon May 12 13:06:21 2008 UTC
2 Dolphin-v.6.1.0\plugins\tiny_mce\plugins\table\js row.js Thu Mar 27 13:53:26 2008 UTC

555.2 Comparison summary

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

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

555.4 Active regular expressions

No regular expressions were active.

555.5 Comparison detail

    1   tinyMCEPop up.require LangPack() ;
    2  
    3   function i nit() {
    4       tinyMC EPopup.res izeToInner Size();
    5  
    6       docume nt.getElem entById('b ackgroundi magebrowse rcontainer ').innerHT ML = getBr owserHTML( 'backgroun dimagebrow ser','back groundimag e','image' ,'table');
    7       docume nt.getElem entById('b gcolor_pic kcontainer ').innerHT ML = getCo lorPickerH TML('bgcol or_pick',' bgcolor');
    8  
    9       var in st = tinyM CEPopup.ed itor;
    10       var do m = inst.d om;
    11       var tr Elm = dom. getParent( inst.selec tion.getNo de(), "tr" );
    12       var fo rmObj = do cument.for ms[0];
    13       var st  = dom.par seStyle(do m.getAttri b(trElm, " style"));
    14  
    15       // Get  table row  data
    16       var ro wtype = tr Elm.parent Node.nodeN ame.toLowe rCase();
    17       var al ign = dom. getAttrib( trElm, 'al ign');
    18       var va lign = dom .getAttrib (trElm, 'v align');
    19       var he ight = tri mSize(getS tyle(trElm , 'height' , 'height' ));
    20       var cl assName =  dom.getAtt rib(trElm,  'class');
    21       var bg color = co nvertRGBTo Hex(getSty le(trElm,  'bgcolor',  'backgrou ndColor')) ;
    22       var ba ckgroundim age = getS tyle(trElm , 'backgro und', 'bac kgroundIma ge').repla ce(new Reg Exp("url\\ ('?([^']*) '?\\)", 'g i'), "$1") ;;
    23       var id  = dom.get Attrib(trE lm, 'id');
    24       var la ng = dom.g etAttrib(t rElm, 'lan g');
    25       var di r = dom.ge tAttrib(tr Elm, 'dir' );
    26  
    27       // Set up form
    28       addCla ssesToList ('class',  'table_row _styles');
    29       formOb j.bgcolor. value = bg color;
    30       formOb j.backgrou ndimage.va lue = back groundimag e;
    31       formOb j.height.v alue = hei ght;
    32       formOb j.id.value  = id;
    33       formOb j.lang.val ue = lang;
    34       formOb j.style.va lue = dom. serializeS tyle(st);
    35       select ByValue(fo rmObj, 'al ign', alig n);
    36       select ByValue(fo rmObj, 'va lign', val ign);
    37       select ByValue(fo rmObj, 'cl ass', clas sName);
    38       select ByValue(fo rmObj, 'ro wtype', ro wtype);
    39       select ByValue(fo rmObj, 'di r', dir);
    40  
    41       // Res ize some e lements
    42       if (is Visible('b ackgroundi magebrowse r'))
    43           do cument.get ElementByI d('backgro undimage') .style.wid th = '180p x';
    44  
    45       update Color('bgc olor_pick' , 'bgcolor ');
    46   }
    47  
    48   function u pdateActio n() {
    49       var in st = tinyM CEPopup.ed itor;
    50       var do m = inst.d om;
    51       var tr Elm = dom. getParent( inst.selec tion.getNo de(), "tr" );
    52       var ta bleElm = d om.getPare nt(inst.se lection.ge tNode(), " table");
    53       var fo rmObj = do cument.for ms[0];
    54       var ac tion = get SelectValu e(formObj,  'action') ;
    55  
    56       inst.e xecCommand ('mceBegin UndoLevel' );
    57  
    58       switch  (action)  {
    59           ca se "row":
    60                updateRo w(trElm);
    61                break;
    62  
    63           ca se "all":
    64                var rows  = tableEl m.getEleme ntsByTagNa me("tr");
    65  
    66                for (var  i=0; i<ro ws.length;  i++)
    67                    upda teRow(rows [i], true) ;
    68  
    69                break;
    70  
    71           ca se "odd":
    72           ca se "even":
    73                var rows  = tableEl m.getEleme ntsByTagNa me("tr");
    74  
    75                for (var  i=0; i<ro ws.length;  i++) {
    76                    if ( (i % 2 ==  0 && actio n == "odd" ) || (i %  2 != 0 &&  action ==  "even"))
    77                         updateRow( rows[i], t rue, true) ;
    78                }
    79  
    80                break;
    81       }
    82  
    83       inst.a ddVisual() ;
    84       inst.n odeChanged ();
    85       inst.e xecCommand ('mceEndUn doLevel');
    86       tinyMC EPopup.clo se();
    87   }
    88  
    89   function u pdateRow(t r_elm, ski p_id, skip _parent) {
    90       var in st = tinyM CEPopup.ed itor;
    91       var fo rmObj = do cument.for ms[0];
    92       var do m = inst.d om;
    93       var cu rRowType =  tr_elm.pa rentNode.n odeName.to LowerCase( );
    94       var ro wtype = ge tSelectVal ue(formObj , 'rowtype ');
    95       var do c = inst.g etDoc();
    96  
    97       // Upd ate row el ement
    98       if (!s kip_id)
    99           tr _elm.setAt tribute('i d', formOb j.id.value );
    100  
    101       tr_elm .setAttrib ute('align ', getSele ctValue(fo rmObj, 'al ign'));
    102       tr_elm .setAttrib ute('vAlig n', getSel ectValue(f ormObj, 'v align'));
    103       tr_elm .setAttrib ute('lang' , formObj. lang.value );
    104       tr_elm .setAttrib ute('dir',  getSelect Value(form Obj, 'dir' ));
    105       tr_elm .setAttrib ute('style ', dom.ser ializeStyl e(dom.pars eStyle(for mObj.style .value)));
    106       dom.se tAttrib(tr _elm, 'cla ss', getSe lectValue( formObj, ' class'));
    107  
    108       // Cle ar depreca ted attrib utes
    109       tr_elm .setAttrib ute('backg round', '' );
    110       tr_elm .setAttrib ute('bgCol or', '');
    111       tr_elm .setAttrib ute('heigh t', '');
    112  
    113       // Set  styles
    114       tr_elm .style.hei ght = getC SSSize(for mObj.heigh t.value);
    115       tr_elm .style.bac kgroundCol or = formO bj.bgcolor .value;
    116  
    117       if (fo rmObj.back groundimag e.value !=  "")
    118           tr _elm.style .backgroun dImage = " url('" + f ormObj.bac kgroundima ge.value +  "')";
    119       else
    120           tr _elm.style .backgroun dImage = ' ';
    121  
    122       // Set up new row type
    123       if (cu rRowType ! = rowtype  && !skip_p arent) {
    124           //  first, cl one the no de we are  working on
    125           va r newRow =  tr_elm.cl oneNode(1) ;
    126  
    127           //  next, fin d the pare nt of its  new destin ation (cre ating it i f necessar y)
    128           va r theTable  = dom.get Parent(tr_ elm, "tabl e");
    129           va r dest = r owtype;
    130           va r newParen t = null;
    131           fo r (var i =  0; i < th eTable.chi ldNodes.le ngth; i++)  {
    132                if (theT able.child Nodes[i].n odeName.to LowerCase( ) == dest)
    133                    newP arent = th eTable.chi ldNodes[i] ;
    134           }
    135  
    136           if  (newParen t == null)  {
    137                newParen t = doc.cr eateElemen t(dest);
    138  
    139                if (dest  == "thead ") {
    140                    if ( theTable.f irstChild. nodeName = = 'CAPTION ')
    141                         inst.dom.i nsertAfter (newParent , theTable .firstChil d);
    142                    else
    143                         theTable.i nsertBefor e(newParen t, theTabl e.firstChi ld);
    144                } else
    145                    theT able.appen dChild(new Parent);
    146           }
    147  
    148           //  append th e row to t he new par ent
    149           ne wParent.ap pendChild( newRow);
    150  
    151           //  remove th e original
    152           tr _elm.paren tNode.remo veChild(tr _elm);
    153  
    154           //  set tr_el m to the n ew node
    155           tr _elm = new Row;
    156       }
    157  
    158       dom.se tAttrib(tr _elm, 'sty le', dom.s erializeSt yle(dom.pa rseStyle(t r_elm.styl e.cssText) ));
    159   }
    160  
    161   function c hangedBack groundImag e() {
    162       var fo rmObj = do cument.for ms[0], dom  = tinyMCE Popup.edit or.dom;
    163       var st  = dom.par seStyle(fo rmObj.styl e.value);
    164  
    165       st['ba ckground-i mage'] = " url('" + f ormObj.bac kgroundima ge.value +  "')";
    166  
    167       formOb j.style.va lue = dom. serializeS tyle(st);
    168   }
    169  
    170   function c hangedStyl e() {
    171       var fo rmObj = do cument.for ms[0], dom  = tinyMCE Popup.edit or.dom;
    172       var st  = dom.par seStyle(fo rmObj.styl e.value);
    173  
    174       if (st ['backgrou nd-image'] )
    175           fo rmObj.back groundimag e.value =  st['backgr ound-image '].replace (new RegEx p("url\\(' ?([^']*)'? \\)", 'gi' ), "$1");
    176       else
    177           fo rmObj.back groundimag e.value =  '';
    178  
    179       if (st ['height'] )
    180           fo rmObj.heig ht.value =  trimSize( st['height ']);
    181  
    182       if (st ['backgrou nd-color'] ) {
    183           fo rmObj.bgco lor.value  = st['back ground-col or'];
    184           up dateColor( 'bgcolor_p ick','bgco lor');
    185       }
    186   }
    187  
    188   function c hangedSize () {
    189       var fo rmObj = do cument.for ms[0], dom  = tinyMCE Popup.edit or.dom;
    190       var st  = dom.par seStyle(fo rmObj.styl e.value);
    191  
    192       var he ight = for mObj.heigh t.value;
    193       if (he ight != "" )
    194           st ['height']  = getCSSS ize(height );
    195       else
    196           st ['height']  = "";
    197  
    198       formOb j.style.va lue = dom. serializeS tyle(st);
    199   }
    200  
    201   function c hangedColo r() {
    202       var fo rmObj = do cument.for ms[0], dom  = tinyMCE Popup.edit or.dom;
    203       var st  = dom.par seStyle(fo rmObj.styl e.value);
    204  
    205       st['ba ckground-c olor'] = f ormObj.bgc olor.value ;
    206  
    207       formOb j.style.va lue = dom. serializeS tyle(st);
    208   }
    209  
    210   tinyMCEPop up.onInit. add(init);