214. File Comparison Report

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

214.1 Files compared

# Location File Last Modified
1 Mon May 12 13:05:13 2008 UTC
2 Dolphin-v.6.1.0\inc\js\classes BxDolPageBuilder.js Sun Apr 20 20:19:12 2008 UTC

214.2 Comparison summary

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

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

214.4 Active regular expressions

No regular expressions were active.

214.5 Comparison detail

    1   function B xDolPageBu ilder( opt ions ) {
    2       this.o ptions = o ptions;
    3       this.l oadAreas() ;
    4       
    5       
    6   }
    7  
    8   BxDolPageB uilder.pro totype.new Page = fun ction() {
    9       var sN ewPage = p rompt('Ent er name of  new page' , 'New Pag e');
    10       if(sNe wPage != u ndefined & & $.trim(s NewPage) ! = '')
    11           wi ndow.locat ion = this .options.p arser + '? Page=' + e ncodeURICo mponent( s NewPage );
    12   }
    13  
    14   BxDolPageB uilder.pro totype.res etPage = f unction()  {
    15       if( !c onfirm( 'A re you sur e want to  reset this  page?\nTh e page con tents will  be reset  to factory  state!' )  )
    16           re turn false ;
    17       
    18       $.post (
    19           th is.options .parser,
    20           {
    21                action:  'resetPage ',
    22                Page: th is.options .page
    23           },
    24           fu nction() {
    25                location .reload();
    26           }
    27       );
    28   }
    29  
    30   BxDolPageB uilder.pro totype.loa dAreas = f unction()  {
    31       var _b uilder = t his;
    32       
    33       this.a ctiveArea    = $( '#a ctiveBlock sArea'   ) .get(0);
    34       this.i nactiveAre a = $( '#i nactiveBlo cksArea' ) .get(0);
    35       this.s amplesArea   = $( '#s amplesBloc ksArea'  ) .get(0);
    36       this.e AllAreas     = $(this .activeAre a).add(thi s.inactive Area).add( this.sampl esArea).pa rent().par ent().get( 0);
    37       
    38       $.getJ SON( this. options.pa rser, {act ion:'load' , Page: th is.options .page}, fu nction( oJ SON ){ _bu ilder.load JSON( oJSO N ) } );
    39   }
    40  
    41   BxDolPageB uilder.pro totype.loa dJSON = fu nction( oJ SON ) {
    42       var _b uilder = t his;
    43       if( wi ndow.conso le) consol e.log( oJS ON );
    44       
    45       if( !o JSON.activ e ||!oJSON .widths ||  !oJSON.in active ||  !oJSON.sam ples || !o JSON.min_w idths )
    46           re turn false ;
    47       
    48       $(this .activeAre a  ).html(  '' );
    49       $(this .inactiveA rea).html(  '' );
    50       $(this .samplesAr ea ).html(  '' );
    51       
    52       this.m inWidths =  oJSON.min _widths;
    53       
    54       var iC olumns = 0 ;
    55       //this .aColumnsW idths = ne w Array();
    56       
    57       //acti ve blocks
    58       for( v ar iColumn  in oJSON. widths ) {
    59           va r iWidth =  oJSON.wid ths[iColum n];
    60           va r aBlocks  = oJSON.ac tive[iColu mn];
    61           th is.drawCol umn( iColu mn, iWidth , aBlocks  );
    62           
    63           // this.aColu mnsWidths[ iColumns]  = parseInt ( iWidth ) ;
    64           
    65           iC olumns ++;
    66       }
    67       
    68       this.c heckAddCol umn();
    69       
    70       //inac tive block s
    71       for( v ar iBlockI D in oJSON .inactive  ) {
    72           va r sBlockCa ption = oJ SON.inacti ve[iBlockI D];
    73           th is.drawBlo ck( iBlock ID, sBlock Caption, t his.inacti veArea );
    74       }
    75       
    76       //inac tive block s
    77       for( v ar iBlockI D in oJSON .samples )  {
    78           va r sBlockCa ption = oJ SON.sample s[iBlockID ];
    79           th is.drawBlo ck( iBlock ID, sBlock Caption, t his.sample sArea );
    80       }
    81       
    82       $(this .inactiveA rea ).appe nd( '<div  class="bui ldBlockFak e"></div>  <div class ="clear_bo th"></div> ' );
    83       $(this .samplesAr ea  ).appe nd( '<div  class="cle ar_both">< /div>' );
    84       
    85       this.i nitPageWid thSlider() ;
    86       this.i nitOtherPa gesWidthSl ider();
    87       this.i nitColsSli der();
    88       this.c heckBlocks MaxWidths( );
    89       this.a ctivateSor tables();
    90   }
    91  
    92   BxDolPageB uilder.pro totype.ini tPageWidth Slider = f unction()  {
    93       var _b uilder = t his;
    94       var $s lider = $(  '#pageWid thSlider'  );
    95       
    96       if( !$ slider.len gth )
    97           re turn false ;
    98       
    99       $slide r.slider(  {
    100           ha ndle: 'div ',
    101           ch ange: func tion(e,s)  {_builder. onWidthSli derStop(s) },
    102           sl ide:  func tion(e,s)  {_builder. onWidthSli derMove(s) }
    103  
    104       } );
    105       
    106       var iC urSliderVa l = this.w idth2slide r( this.op tions.page Width );
    107       $slide r.sliderMo veTo( iCur SliderVal  );
    108       $( '#p ageWidthVa lue' ).htm l( this.op tions.page Width );
    109   }
    110  
    111   BxDolPageB uilder.pro totype.ini tOtherPage sWidthSlid er = funct ion() {
    112       var _b uilder = t his;
    113       var $s lider = $(  '#pageWid thSlider1'  );
    114       
    115       if( !$ slider.len gth )
    116           re turn false ;
    117       
    118       $slide r.slider(  {
    119           ha ndle: 'div ',
    120           ch ange: func tion(e,s)  {_builder. onOtherWid thSliderSt op(s)},
    121           sl ide:  func tion(e,s)  {_builder. onOtherWid thSliderMo ve(s)}
    122  
    123       } );
    124       
    125       var iC urSliderVa l = this.w idth2slide r( this.op tions.othe rPagesWidt h );
    126       $slide r.sliderMo veTo( iCur SliderVal  );
    127       $( '#p ageWidthVa lue1' ).ht ml( this.o ptions.oth erPagesWid th );
    128   }
    129  
    130   BxDolPageB uilder.pro totype.wid th2slider  = function ( sCurWidt h ) {
    131       if( sC urWidth ==  '100%' )
    132           re turn 100;
    133       
    134       var iC urWidth =  parseInt(  sCurWidth  );
    135       return  ( Math.ro und( ( ( i CurWidth -  774 ) * 9 0 ) / 826  ) + 5 );
    136   }
    137  
    138   BxDolPageB uilder.pro totype.sli der2width  = function ( iSliderV al ) {
    139       if( iS liderVal <  5 )
    140           re turn '774p x';
    141       
    142       if( iS liderVal >  95 )
    143           re turn '100% ';
    144       
    145       return  ( ( parse Int( ( ( i SliderVal  - 5 ) * 82 6 ) / 90 )  + 774 ) +  'px' );
    146   }
    147  
    148   BxDolPageB uilder.pro totype.onW idthSlider Stop = fun ction(slid er) {
    149       var _b uilder = t his;
    150       
    151       //set  current pa ge width
    152       this.o ptions.pag eWidth = t his.slider 2width( sl ider.value s );
    153       
    154       //subm it page wi dth
    155       $.post ( this.opt ions.parse r, {
    156           ac tion: 'sav ePageWidth ',
    157           Pa ge: this.o ptions.pag e,
    158           wi dth: this. options.pa geWidth
    159       },
    160       functi on( sRespo nse ) {
    161           if ( sRespons e != 'OK'  )
    162                alert( s Response ) ;
    163       } );
    164       
    165       //upda te columns  headers
    166       $( '.b uildColumn ', this.ac tiveArea ) .each( fun ction(iInd ){
    167           _b uilder.set ColumnHead er( this,  (iInd + 1)  );
    168       } );
    169       
    170       this.c heckBlocks MaxWidths( );
    171   }
    172  
    173   BxDolPageB uilder.pro totype.onW idthSlider Move = fun ction(slid er) {
    174       var sC urPageWidt h = this.s lider2widt h( slider. values );
    175       $( '#p ageWidthVa lue' ).htm l( sCurPag eWidth );
    176   }
    177  
    178   BxDolPageB uilder.pro totype.onO therWidthS liderStop  = function (slider) {
    179       var _b uilder = t his;
    180       
    181       //set  current pa ge width
    182       this.o ptions.oth erPagesWid th = this. slider2wid th( slider .values );
    183       
    184       //subm it page wi dth
    185       $.post ( this.opt ions.parse r, {
    186           ac tion: 'sav eOtherPage sWidth',
    187           Pa ge: this.o ptions.pag e,
    188           wi dth: this. options.ot herPagesWi dth
    189       },
    190       functi on( sRespo nse ) {
    191           if ( sRespons e != 'OK'  )
    192                alert( s Response ) ;
    193       } );
    194   }
    195  
    196   BxDolPageB uilder.pro totype.onO therWidthS liderMove  = function (slider) {
    197       var sC urPageWidt h = this.s lider2widt h( slider. values );
    198       $( '#p ageWidthVa lue1' ).ht ml( sCurPa geWidth );
    199   }
    200  
    201   BxDolPageB uilder.pro totype.che ckBlocksMa xWidths =  function()  {
    202       //remo ve alerts
    203       $( '.b lockAlert'  ).remove( );
    204       
    205       if( th is.options .pageWidth  == '100%'  )
    206           re turn ; //d o not chec k
    207       
    208       for( v ar iBlockI D in this. minWidths  ) {
    209           va r iBlockMi nWidth = t his.minWid ths[iBlock ID];
    210           
    211           va r $block =  $( '#buil dBlock_' +  iBlockID  );
    212           va r iColumnW idth = Mat h.round( p arseInt( t his.option s.pageWidt h ) * pars eInt( $blo ck.parent( ).parent() .css( 'wid th' ) ) /  100 );
    213           if ( iColumnW idth < iBl ockMinWidt h ) {
    214                $( '<img  src="imag es/icons/a lert.gif"  class="blo ckAlert" / >' )
    215                .appendT o( $block  )
    216                .hover( 
    217                    func tion(){ sh owFloatDes c( 'The co lumn conta ining this  block sho uld be at  least ' +  iBlockMinW idth + ' p x wide; na rrower wid th may res ult in des ign corrup tion.' );  },
    218                    func tion(){ hi deFloatDes c(); }
    219                )
    220                .mousemo ve( functi on(e){ mov eFloatDesc ( e ) } );
    221           }
    222       }
    223   }
    224  
    225   BxDolPageB uilder.pro totype.che ckAddColum n = functi on() {
    226       var _b uilder = t his;
    227       
    228       var iC olumns = $ ('.buildCo lumn', thi s.activeAr ea).length ;
    229       
    230       var $l inksCont =  $('#pageC ontrols');
    231       var $m yLink = $(  '#addColu mnLink', $ linksCont  );
    232       
    233       if( iC olumns >=  this.optio ns.maxCols  )
    234           $m yLink.remo ve();
    235       else i f( !$myLin k.length )  {
    236           $(  '<a href= "#" id="ad dColumnLin k">Add col umn</a>' )
    237           .c lick( func tion(){
    238                _builder .addColumn ();
    239                return f alse;
    240           }  )
    241           .a ppendTo( $ linksCont  );
    242       }
    243   }
    244  
    245   BxDolPageB uilder.pro totype.add Column = f unction()  {
    246       this.d estroySort ables();
    247       this.d rawColumn( $('.buildC olumn',thi s.activeAr ea).length , 0,{});
    248       this.c heckAddCol umn();
    249       this.a ctivateSor tables();
    250       this.r eArrangeCo lumns();
    251   }
    252  
    253   BxDolPageB uilder.pro totype.ini tColsSlide r = functi on() {
    254       var iS liderValue  = 0;
    255       var aS liderValue s = new Ar ray();
    256       var _b uilder = t his;
    257       
    258       var $C olumns = $ ( '.buildC olumn', th is.activeA rea )
    259       var iC olumns = $ Columns.le ngth;
    260       
    261       $( '#c olumnsSlid er' ).slid erDestroy( );
    262       
    263       if( iC olumns < 2  )
    264           re turn; //do nt insert
    265       
    266       var sS liderCode  = '';
    267       for( v ar iSlider Num = 0; i SliderNum  < (iColumn s - 1); iS liderNum + + ) {
    268           va r iColWidt h = parseI nt( $Colum ns.eq(iSli derNum).cs s( 'width'  ) );
    269           iS liderValue  += iColWi dth;
    270           aS liderValue s[iSliderN um] = iSli derValue;
    271           
    272           sS liderCode  += '<div>< /div>';
    273       }
    274       
    275       $(this .activeAre a).append(  sSliderCo de );
    276       
    277       //init  slider
    278       $( '#c olumnsSlid er' ).html ( sSliderC ode )
    279       .slide r( {
    280           ha ndle: 'div ',
    281           ch ange: func tion(e,s)  {_builder. onColsSlid erStop(s)} ,
    282           sl ide:  func tion(e,s)  {_builder. onColsSlid erMove(s)}
    283       } );
    284       
    285       for( v ar iSlider Num = 0; i SliderNum  < aSliderV alues.leng th; iSlide rNum ++ )  {
    286           va r iSliderV alue = aSl iderValues [iSliderNu m];
    287           
    288           $(  '#columns Slider' ). sliderMove To( iSlide rValue, iS liderNum ) ;
    289       }
    290   }
    291  
    292   BxDolPageB uilder.pro totype.onC olsSliderS top = func tion() {
    293       this.c heckBlocks MaxWidths( );
    294       this.s ubmitWidth s();
    295   }
    296  
    297   BxDolPageB uilder.pro totype.onC olsSliderM ove = func tion(slide r) {
    298       var _b uilder = t his;
    299       var aV alues = ne w Array();
    300       
    301       if( ty peof slide r.values = = 'object'  ) {
    302           va r iCounter  = 0;
    303           fo r( var iIn d in slide r.values )
    304                aValues[ iCounter++ ] = slider .values[iI nd];
    305       } else  if( typeo f slider.v alues == ' number' )  {
    306           aV alues[0] =  slider.va lues;
    307       }
    308       aValue s[aValues. length] =  100;
    309       
    310       //cons ole.log( a Values );
    311       
    312       var iM inusWidth  = 0;
    313       $('.bu ildColumn' , this.act iveArea).e ach( funct ion(iInd){
    314           va r iNewWidt h = aValue s[iInd] -  iMinusWidt h;
    315           
    316           $( this).css(  'width',  iNewWidth  + '%' );
    317           _b uilder.set ColumnHead er( this,  (iInd+1) ) ;
    318           
    319           iM inusWidth  += iNewWid th;
    320       } );
    321   }
    322  
    323   BxDolPageB uilder.pro totype.sub mit = func tion() {
    324       var _b uilder = t his;
    325       
    326       var aC olumns = n ew Array() ;
    327       //get  columns
    328       $( '.b uildColumn ', this.ac tiveArea ) .each( fun ction(){
    329           va r iColumn  = aColumns .length;
    330           
    331           aC olumns[iCo lumn] = ne w Array();
    332           // get blocks
    333           $(  '.buildBl ock', this  ).each( f unction(){
    334                var iIte mID = pars eInt( this .id.substr ( 'buildBl ock_'.leng th ) );
    335                aColumns [iColumn]. push(iItem ID);
    336           }  );
    337           
    338           aC olumns[iCo lumn] = aC olumns[iCo lumn].join (',');
    339           
    340           iC olumn ++;
    341       } );
    342       
    343       $.post (
    344           th is.options .parser, {
    345                action:  'saveBlock s',
    346                Page: th is.options .page,
    347                'columns []': aColu mns
    348           },
    349           fu nction(sRe sponse){
    350                if( sRes ponse != ' OK' )
    351                    aler t(sRespons e);
    352                
    353                _builder .submitWid ths();
    354           }
    355       );
    356   }
    357  
    358   BxDolPageB uilder.pro totype.sub mitWidths  = function () {
    359       var aW idths = ne w Array();
    360       
    361       $( '.b uildColumn ', this.ac tiveArea ) .each( fun ction(){
    362           aW idths[aWid ths.length ] = parseI nt( $(this ).css('wid th') );
    363       } );
    364       
    365       $.post (
    366           th is.options .parser,
    367           {
    368                action:' saveColsWi dths',
    369                Page: th is.options .page,
    370                'widths[ ]': aWidth s
    371           },
    372           fu nction(sRe sponse){
    373                if( sRes ponse != ' OK' )
    374                    aler t(sRespons e);
    375           }
    376       );
    377   }
    378  
    379   BxDolPageB uilder.pro totype.set ColumnHead er = funct ion( paren t, iNum, b IgnoreCols Num ) {
    380       var bI gnoreColsN um = bIgno reColsNum  || false;
    381       var _b uilder = t his;
    382       
    383       var iP erWidth =  parseInt(  $(parent). css('width ') );
    384       
    385       var sP ixAdd = '' ;
    386       
    387       if( th is.options .pageWidth .substr(-2 ) == 'px'  ) {
    388           va r iPixWidt h = Math.r ound( ( pa rseInt( th is.options .pageWidth  ) * iPerW idth ) / 1 00 );
    389           sP ixAdd = '/ ' + iPixWi dth + 'px' ;
    390       }
    391       
    392       var $h eader = $( '.buildCol umnHeader' , parent). html(
    393           'C olumn ' +  iNum +
    394           '  (' + iPerW idth + '%'  + sPixAdd  + ')'
    395       );
    396       
    397       if( bI gnoreColsN um || $('. buildColum n', this.a ctiveArea) .length >  this.optio ns.minCols  ) {
    398           $h eader.appe nd(
    399                ' <a hre f="#" titl e="Delete"  id="linkD elete">' +
    400                    '<im g src="ima ges/cross. gif" alt=" Delete" /> ' +
    401                '</a>'
    402           ). children(' a').click(  function( ){
    403                if( conf irm( 'Do y ou really  want to de lete this  column' )  ) {
    404                    _bui lder.delet eColumn( p arent );
    405                }
    406                return f alse;
    407           }) ;
    408       }
    409   }
    410  
    411   BxDolPageB uilder.pro totype.del eteColumn  = function ( column )  {
    412       $('.bu ildBlock',  column).p rependTo(  this.inact iveArea );
    413       $(colu mn).remove ();
    414       
    415       this.c heckAddCol umn();
    416       this.r eArrangeCo lumns();
    417   }
    418  
    419   BxDolPageB uilder.pro totype.reA rrangeColu mns = func tion() {
    420       var _b uilder = t his;
    421       var $c olumns = $ ('.buildCo lumn', thi s.activeAr ea);
    422       var iN ewWidth =  Math.floor ( 100 / $c olumns.len gth );
    423       
    424       $colum ns.css( 'w idth', iNe wWidth + ' %' ).each(  function(  iInd ) {
    425           _b uilder.set ColumnHead er( this,  (iInd+1) ) ;
    426       } );
    427       
    428       this.i nitColsSli der();
    429       this.s ubmit();
    430   }
    431  
    432   BxDolPageB uilder.pro totype.des troySortab les = func tion() {
    433       if( th is.oSIColu mns )
    434           th is.oSIColu mns.destro y();
    435       
    436       if( th is.oSIBloc ks )
    437           th is.oSIBloc ks.destroy ();
    438   }
    439  
    440   BxDolPageB uilder.pro totype.act ivateSorta bles = fun ction() {
    441       var _b uilder = t his;
    442       
    443       // SI  = Sortable Instance
    444       this.o SIColumns  = $(this.a ctiveArea) .sortable( {
    445           it ems: '.bui ldColumn',
    446           ho verClass:  'buildHove r',
    447           st op: functi on() { _bu ilder.colu mnsStopSor t(); }
    448       }).sor tableInsta nce();
    449       
    450       this.o SIBlocks =  $(this.eA llAreas).s ortable({
    451           it ems: '.bui ldBlock,.b uildBlockF ake',
    452           ho verClass:  'buildHove r',
    453           st op: functi on() { _bu ilder.bloc ksStopSort (this); }
    454       }).sor tableInsta nce();
    455       
    456   }
    457  
    458   BxDolPageB uilder.pro totype.col umnsStopSo rt = funct ion( cycle d ) {
    459       var _b uilder = t his;
    460       
    461       if( cy cled == un defined )  {
    462           se tTimeout(  function() {_builder. columnsSto pSort(true )}, 600 );
    463           re turn ;
    464       }
    465       
    466       var iC ounter = 0 ;
    467       var iS liderValue  = 0;
    468       $('.bu ildColumn' , this.act iveArea).e ach( funct ion(){
    469           iC ounter ++;
    470           va r iWidth =  parseInt(  $(this).c ss('width' ) );
    471           iS liderValue  += iWidth ;
    472           
    473           // alert( iSl iderValue  );
    474           
    475           // update sli der
    476           $(  '#columns Slider', t his.active Area ).sli derMoveTo(  iSliderVa lue, (iCou nter - 1)  );
    477           
    478           // update col umn header
    479           _b uilder.set ColumnHead er( this,  iCounter ) ;
    480       } );
    481       
    482       this.s ubmit();
    483   }
    484  
    485   BxDolPageB uilder.pro totype.blo cksStopSor t = functi on( eDragg ed, cycled  ) {
    486       var _b uilder = t his;
    487       
    488       if( cy cled == un defined )  {
    489           se tTimeout(  function() {_builder. blocksStop Sort(eDrag ged, true) }, 600 );
    490           re turn ;
    491       }
    492       
    493       //chec k if the d ragged ele ment is sa mple
    494       if( $(  '#' + eDr agged.id,  this.activ eArea ).le ngth ) { / / if it is  dragged t o the acti ve area
    495           va r iBlockID  = parseIn t( eDragge d.id.subst r( 'buildB lock_'.len gth ) );
    496           $. post(
    497                this.opt ions.parse r,
    498                {
    499                    acti on: 'check NewBlock',
    500                    Page : this.opt ions.page,
    501                    id:  iBlockID
    502                },
    503                function ( sRespons e ) {
    504                    if(  sResponse  == '' ) {
    505                         _builder.s ubmit();
    506                    } el se {
    507                         var iNewBl ockID = pa rseInt( sR esponse );
    508                         if( iNewBl ockID )
    509                             _build er.addBloc k(iNewBloc kID,eDragg ed);
    510                         _builder.s ubmit();
    511                    }
    512                }
    513           );
    514       } else
    515           th is.submit( );
    516   }
    517  
    518   BxDolPageB uilder.pro totype.add Block = fu nction( iN ewID, eBef ore ) {
    519       this.d rawBlock(  iNewID, $( eBefore).t ext(), thi s.samplesA rea );
    520       
    521       $( '#b uildBlock_ ' + iNewID , this.sam plesArea ) .insertBef ore( eBefo re );
    522       $( eBe fore ).pre pendTo( th is.samples Area );
    523       
    524       this.d estroySort ables();
    525       this.a ctivateSor tables();
    526   }
    527  
    528   BxDolPageB uilder.pro totype.dra wColumn =  function(  iColumnNum , iWidth,  aBlocks )  {
    529       $('div .clear_bot h',this.ac tiveArea). remove();
    530       
    531       var $n ewColumn =  $(
    532           '< div class= "buildColu mn" style= "width:' +  iWidth +  '%;">' +
    533                '<div cl ass="build ColumnCont ">' +
    534                    '<di v class="b uildColumn Header"></ div>' +
    535                    '<di v class="b uildBlockF ake"></div >' +
    536                '</div>'  +
    537           '< /div>'
    538       ).appe ndTo(this. activeArea );
    539       
    540       this.s etColumnHe ader( $new Column, iC olumnNum,  true );
    541       
    542       var eC olumnCont  = $( '.bui ldColumnCo nt', $newC olumn ).ge t(0);
    543       
    544       for( v ar iBlockI D in aBloc ks ) {
    545  
    546           va r sBlockCa ption = aB locks[iBlo ckID];
    547           th is.drawBlo ck( iBlock ID, sBlock Caption, e ColumnCont  );
    548       }
    549       
    550       $(this .activeAre a).append(  '<div cla ss="clear_ both"></di v>' );
    551   }
    552  
    553   BxDolPageB uilder.pro totype.dra wBlock = f unction( i BlockID, s BlockCapti on, eColum nCont ) {
    554       var _b uilder = t his;
    555       
    556       $(
    557           '< div class= "buildBloc k" id="bui ldBlock_'  + iBlockID  + '">' +
    558                '<a href ="#">' + s BlockCapti on + '</a> ' +
    559           '< /div>'
    560       )
    561       .appen dTo(eColum nCont)
    562       .child ren('a')
    563           .c lick( func tion() {
    564                _builder .openPrope rties( iBl ockID );
    565                return f alse;
    566           }  );
    567   }
    568  
    569   BxDolPageB uilder.pro totype.ope nPropertie s = functi on( iBlock ID ) {
    570       var _b uilder = t his;
    571       
    572       $( '#e ditFormWra pper' ).sh ow()
    573       .css({
    574           le ft  : this .getHorizS croll() -  30,
    575           to p   : this .getVertSc roll() - 3 0,
    576           wi dth : docu ment.body. clientWidt h + 30,
    577           he ight: (win dow.innerH eight ? (w indow.inne rHeight +  30) : scre en.height)
    578       });
    579       
    580       $( '#e ditFormCon t' )
    581       .html(  '<img src ="images/l oading.gif " alt="Loa ding..." t itle="Load ing..." /> ' )
    582       .load(
    583           th is.options .parser,
    584           {
    585                action:' loadEditFo rm',
    586                Page: th is.options .page,
    587                id: iBlo ckID
    588           },
    589           fu nction() {
    590                var $for m = $( 'fo rm', this  );
    591                
    592                $('#form _input_htm l', $form) .each( fun ction(){
    593                    tiny MCE.execCo mmand('mce AddControl ', false,  'form_inpu t_html');
    594                } );
    595                
    596                $(':rese t[name=Can cel]',$for m).click(  function() {
    597                    $('# form_input _html',$fo rm).each(  function()  {
    598                         tinyMCE.ex ecCommand( 'mceRemove Control',  false, 'fo rm_input_h tml');
    599                    } );
    600                    
    601                    $( ' #editFormW rapper' ). hide();
    602                    retu rn false;
    603                } );
    604                
    605                $(':rese t[name=Del ete]',$for m).click(  function() {
    606                    if(  confirm( ' Are you su re want to  delete th is item?'  ) ) {
    607                         _builder.d eleteBlock ( iBlockID  );
    608                         $( '#editF ormWrapper ' ).hide() ;
    609                    }
    610                });
    611                
    612                $form.aj axForm( {
    613                    befo reSubmit:  function() {
    614                         $('#form_i nput_html' ,$form).ea ch( functi on() {
    615                             tinyMC E.execComm and('mceRe moveContro l', false,  'form_inp ut_html');
    616                         });
    617                        
    618                         return tru e;
    619                    },
    620                    succ ess: funct ion(sRespo nse){
    621                         _builder.u pdateBlock ( iBlockID , sRespons e );
    622                         $( '#editF ormWrapper ' ).hide() ;
    623                    }
    624                } );
    625           }
    626       );
    627   }
    628  
    629   BxDolPageB uilder.pro totype.del eteBlock =  function(  iBlockID  ) {
    630       $( '#b uildBlock_ ' + iBlock ID ).remov e();
    631       $.post ( this.opt ions.parse r,{
    632           ac tion: 'del eteBlock',
    633           Pa ge: this.o ptions.pag e,
    634           id : iBlockID
    635       } );
    636   }
    637  
    638   BxDolPageB uilder.pro totype.upd ateBlock =  function(  iBlockID,  sCaption  ) {
    639       var _b uilder = t his;
    640       
    641       $( '#b uildBlock_ ' + iBlock ID ).html(  '<a href= "#">' + sC aption + ' </a>' )
    642       .child ren('a').c lick( func tion() {
    643           _b uilder.ope nPropertie s( iBlockI D );
    644           re turn false ;
    645       } );
    646   }
    647  
    648   BxDolPageB uilder.pro totype.get HorizScrol l = functi on() {
    649       if (na vigator.ap pName == " Microsoft  Internet E xplorer")
    650           re turn docum ent.docume ntElement. scrollLeft ;
    651       else
    652           re turn windo w.pageXOff set;
    653   }
    654  
    655   BxDolPageB uilder.pro totype.get VertScroll  = functio n()
    656   {
    657       if (na vigator.ap pName == " Microsoft  Internet E xplorer")
    658           re turn docum ent.docume ntElement. scrollTop;
    659       else
    660           re turn windo w.pageYOff set;
    661   }