Changeset 744
- Timestamp:
- 02/16/07 13:46:14 (6 years ago)
- Location:
- trunk/plugins/SuperClean
- Files:
-
- 2 modified
-
super-clean.js (modified) (1 diff)
-
tidy.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/SuperClean/super-clean.js
r681 r744 59 59 if(opts.tidy) 60 60 { 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); 63 75 } 64 76 return true; -
trunk/plugins/SuperClean/tidy.php
r681 r744 160 160 { 161 161 ?> 162 editor.setHTML('<?php echo js_encode($content) ?>');162 {action:'setHTML',value:'<?php echo js_encode($content) ?>'}; 163 163 <?php 164 164 } … … 166 166 { 167 167 ?> 168 alert(this._lc('Tidy failed. Check your HTML for syntax errors.'));168 {action:'alert',value:'Tidy failed. Check your HTML for syntax errors.'}; 169 169 <?php 170 170 } … … 173 173 { 174 174 ?> 175 alert(this._lc("You don't have anything to tidy!"));175 {action:'alert',value:"You don't have anything to tidy!"} 176 176 <?php 177 177 }
