Ignore:
Timestamp:
02/24/07 02:18:05 (13 years ago)
Author:
ray
Message:

updated branch

Location:
branches/ray/plugins/SuperClean
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/ray/plugins/SuperClean/dialog.html

    • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
    r363 r761  
    55  <div style="margin-top: 10px;"> 
    66    <input type="button" id="[ok]"     value="_(OK)"     /> 
    7     <input type="button" id="[cancel]" value="_(CANCEL)" /> 
     7    <input type="button" id="[cancel]" value="_(Cancel)" /> 
    88  </div> 
    99</div> 
  • branches/ray/plugins/SuperClean/filters/paragraph.js

    • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
  • branches/ray/plugins/SuperClean/filters/word.js

    • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
  • branches/ray/plugins/SuperClean/lang/de.js

    • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
  • branches/ray/plugins/SuperClean/lang/fr.js

    • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
  • branches/ray/plugins/SuperClean/lang/nb.js

    • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
  • branches/ray/plugins/SuperClean/super-clean.js

    r560 r761  
    2424 
    2525SuperClean.prototype._lc = function(string) { 
    26     return HTMLArea._lc(string, 'SuperClean'); 
     26    return Xinha._lc(string, 'SuperClean'); 
    2727}; 
    2828 
     
    5959    if(opts.tidy) 
    6060    { 
    61       HTMLArea._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; 
     
    92104}; 
    93105 
    94 HTMLArea.Config.prototype.SuperClean = 
     106Xinha.Config.prototype.SuperClean = 
    95107{ 
    96108  // set to the URL of a handler for html tidy, this handler 
     
    107119  // filterFunction in the second format above is optional. 
    108120 
    109   'filters': { 'tidy': HTMLArea._lc('General tidy up and correction of some problems.', 'SuperClean'), 
    110                'word_clean': HTMLArea._lc('Clean bad HTML from Microsoft Word', 'SuperClean'), 
    111                'remove_faces': HTMLArea._lc('Remove custom typefaces (font "styles").', 'SuperClean'), 
    112                'remove_sizes': HTMLArea._lc('Remove custom font sizes.', 'SuperClean'), 
    113                'remove_colors': HTMLArea._lc('Remove custom text colors.', 'SuperClean'), 
    114                'remove_lang': HTMLArea._lc('Remove lang attributes.', 'SuperClean'), 
    115                'remove_fancy_quotes': {label:HTMLArea._lc('Replace directional quote marks with non-directional quote marks.', 'SuperClean'), checked:false} 
     121  'filters': { 'tidy': Xinha._lc('General tidy up and correction of some problems.', 'SuperClean'), 
     122               'word_clean': Xinha._lc('Clean bad HTML from Microsoft Word', 'SuperClean'), 
     123               'remove_faces': Xinha._lc('Remove custom typefaces (font "styles").', 'SuperClean'), 
     124               'remove_sizes': Xinha._lc('Remove custom font sizes.', 'SuperClean'), 
     125               'remove_colors': Xinha._lc('Remove custom text colors.', 'SuperClean'), 
     126               'remove_lang': Xinha._lc('Remove lang attributes.', 'SuperClean'), 
     127               'remove_fancy_quotes': {label:Xinha._lc('Replace directional quote marks with non-directional quote marks.', 'SuperClean'), checked:false} 
    116128  //additional custom filters (defined in plugins/SuperClean/filters/word.js) 
    117129               //'paragraph': 'remove paragraphs'}, 
     
    171183SuperClean.filterFunctions.tidy = function(html, editor) 
    172184{ 
    173   HTMLArea._postback(editor.config.SuperClean.tidy_handler, {'content' : html}, 
     185  Xinha._postback(editor.config.SuperClean.tidy_handler, {'content' : html}, 
    174186                      function(javascriptResponse) { eval(javascriptResponse) }); 
    175187}; 
     
    207219      else 
    208220      { 
    209         HTMLArea._getback(_editor_url + 'plugins/SuperClean/filters/'+filter+'.js', 
     221        Xinha._getback(_editor_url + 'plugins/SuperClean/filters/'+filter+'.js', 
    210222                      function(func) { 
    211223                        eval('SuperClean.filterFunctions.'+filter+'='+func+';'); 
     
    244256  if(this.html == false) 
    245257  { 
    246     HTMLArea._getback(_editor_url + 'plugins/SuperClean/dialog.html', function(txt) { lDialog.html = txt; lDialog._prepareDialog(); }); 
     258    Xinha._getback(_editor_url + 'plugins/SuperClean/dialog.html', function(txt) { lDialog.html = txt; lDialog._prepareDialog(); }); 
    247259    return; 
    248260  } 
     
    270282 
    271283  // Now we have everything we need, so we can build the dialog. 
    272   var dialog = this.dialog = new HTMLArea.Dialog(SuperClean.editor, this.html, 'SuperClean'); 
     284  var dialog = this.dialog = new Xinha.Dialog(SuperClean.editor, this.html, 'SuperClean'); 
    273285 
    274286  this.ready = true; 
  • branches/ray/plugins/SuperClean/tidy.php

    r284 r761  
    11<?php 
    2   /** This PHP file is intended for use with XMLHTTPRequest from an HTMLArea 
    3    * it requrns javascript to set the htmlarea html with tidied html that is 
     2  /** This PHP file is intended for use with XMLHTTPRequest from Xinha 
     3   * it requrns javascript to set the Xinha html with tidied html that is 
    44   * submitted in a $_POST parameter called 'content' 
    55   */ 
     
    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.