Ignore:
Timestamp:
02/24/07 15:47:57 (13 years ago)
Author:
ray
Message:

updated branch

Location:
branches/ray/plugins/SuperClean
Files:
4 edited

Legend:

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

    r761 r762  
    11<h1 id="[h1]"><l10n>Clean up HTML</l10n></h1> 
    2 <div style="margin-left: 10px;"> 
     2<div style="margin-left: 10px;" id="[main]"> 
    33    <l10n>Please select from the following cleaning options...</l10n> 
    44    <!--filters--> 
    5   <div style="margin-top: 10px;"> 
    6     <input type="button" id="[ok]"     value="_(OK)"     /> 
    7     <input type="button" id="[cancel]" value="_(Cancel)" /> 
    8   </div> 
    95</div> 
     6 
     7<div id="[waiting]" style="display:none;margin:3em 1em;text-align:center"><l10n>Please stand by while cleaning in process...</l10n></div> 
     8<div id="[alert]" style="display:none;margin:3em 1em;text-align:center"></l10n></div> 
     9 
     10<div class="buttons" id="[buttons]"> 
     11  <input type="button" id="[ok]"     value="_(OK)"     /> 
     12  <input type="button" id="[cancel]" value="_(Cancel)" /> 
     13</div> 
  • branches/ray/plugins/SuperClean/lang/de.js

    r761 r762  
    1414  "Cancel": "Abbrechen", 
    1515  "Tidy failed.  Check your HTML for syntax errors.": "SÀubern fehlgeschlagen. ÜberprÃŒfen Sie Ihren Code auf Fehler.", 
    16   "You don't have anything to tidy!": "Es gibt nichts zu sÀubern...!" 
     16  "You don't have anything to tidy!": "Es gibt nichts zu sÀubern...!", 
     17  "Please stand by while cleaning in process..." : "Bitte warten Sie, wÀhrend die SÀuberung lÀuft..." 
    1718}; 
  • branches/ray/plugins/SuperClean/super-clean.js

    r761 r762  
    3737  var doOK = function() 
    3838  { 
    39     var opts = superclean._dialog.hide(); 
     39    superclean._dialog.dialog.getElementById("main").style.display = "none"; 
     40    superclean._dialog.dialog.getElementById("waiting").style.display = ""; 
     41    superclean._dialog.dialog.getElementById("buttons").style.display = "none"; 
     42     
     43        var opts = superclean._dialog.dialog.getValues(); 
    4044    var editor = superclean.editor; 
    4145 
     
    6670          case 'setHTML': 
    6771            editor.setHTML(response.value); 
     72            superclean._dialog.hide(); 
    6873          break; 
    6974          case 'alert': 
    70             alert(superclean._lc(response.value)); 
     75            superclean._dialog.dialog.getElementById("buttons").style.display = ""; 
     76            superclean._dialog.dialog.getElementById("ok").style.display = "none"; 
     77            superclean._dialog.dialog.getElementById("waiting").style.display = "none";  
     78            superclean._dialog.dialog.getElementById("alert").style.display = "";  
     79            superclean._dialog.dialog.getElementById("alert").innerHTML = superclean._lc(response.value); 
     80          break; 
     81          default: // make the dialog go away if sth goes wrong, who knows... 
     82           superclean._dialog.hide(); 
    7183          break; 
    7284        } 
    7385      } 
    7486      Xinha._postback(editor.config.SuperClean.tidy_handler, {'content' : editor.getInnerHTML()},callback); 
     87    } 
     88    else 
     89    { 
     90      superclean._dialog.hide(); 
    7591    } 
    7692    return true; 
     
    189205 
    190206 
    191 SuperClean.prototype.onGenerate = function() 
     207SuperClean.prototype.onGenerateOnce = function() 
    192208{ 
    193209  if(this.editor.config.SuperClean.show_dialog && !this._dialog) 
     
    282298 
    283299  // Now we have everything we need, so we can build the dialog. 
    284   var dialog = this.dialog = new Xinha.Dialog(SuperClean.editor, this.html, 'SuperClean'); 
     300  var dialog = this.dialog = new Xinha.Dialog(SuperClean.editor, this.html, 'SuperClean',{width:400}); 
    285301 
    286302  this.ready = true; 
     
    331347{ 
    332348  this.SuperClean.editor.enableToolbar(); 
     349  this.dialog.getElementById("main").style.display = ""; 
     350  this.dialog.getElementById("buttons").style.display = ""; 
     351  this.dialog.getElementById("waiting").style.display = "none"; 
     352  this.dialog.getElementById("alert").style.display = "none"; 
     353  this.dialog.getElementById("ok").style.display = ""; 
    333354  return this.dialog.hide(); 
    334355}; 
  • branches/ray/plugins/SuperClean/tidy.php

    r761 r762  
    116116    ob_end_clean(); 
    117117 
    118     if(!strlen($content)) 
     118    if(strlen($content) < 5) 
    119119    { 
    120120      // Tidy on the local machine failed, try a post 
Note: See TracChangeset for help on using the changeset viewer.