Changeset 744 for trunk/plugins


Ignore:
Timestamp:
02/16/07 13:46:14 (12 years ago)
Author:
ray
Message:

SuperClean?: Ticket #905 Problems with compression / List of incompatible files

Location:
trunk/plugins/SuperClean
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/SuperClean/super-clean.js

    r681 r744  
    5959    if(opts.tidy) 
    6060    { 
    61       Xinha._postback(editor.config.SuperClean.tidy_handler, {'content' : editor.getInnerHTML()}, 
    62                          function(javascriptResponse) { eval(javascriptResponse) }); 
     61      var callback = function(javascriptResponse)  
     62      {  
     63        eval("var response = " + javascriptResponse); 
     64        switch (response.action) 
     65        { 
     66          case 'setHTML': 
     67            editor.setHTML(response.value); 
     68          break; 
     69          case 'alert': 
     70            alert(superclean._lc(response.value)); 
     71          break; 
     72        } 
     73      } 
     74      Xinha._postback(editor.config.SuperClean.tidy_handler, {'content' : editor.getInnerHTML()},callback); 
    6375    } 
    6476    return true; 
  • trunk/plugins/SuperClean/tidy.php

    r681 r744  
    160160    { 
    161161      ?> 
    162       editor.setHTML('<?php echo js_encode($content) ?>'); 
     162      {action:'setHTML',value:'<?php echo js_encode($content) ?>'}; 
    163163      <?php 
    164164    } 
     
    166166    { 
    167167      ?> 
    168       alert(this._lc('Tidy failed.  Check your HTML for syntax errors.')); 
     168      {action:'alert',value:'Tidy failed.  Check your HTML for syntax errors.'}; 
    169169      <?php 
    170170    } 
     
    173173  { 
    174174    ?> 
    175     alert(this._lc("You don't have anything to tidy!")); 
     175    {action:'alert',value:"You don't have anything to tidy!"} 
    176176    <?php 
    177177  } 
Note: See TracChangeset for help on using the changeset viewer.