Changeset 1199


Ignore:
Timestamp:
11/08/09 05:23:15 (9 years ago)
Author:
gogo
Message:

Ticket #1220

Add ability to pass extra arguments in the post to the backend handler for SuperClean?.

Location:
trunk/plugins/SuperClean
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/SuperClean/SuperClean.js

    r1141 r1199  
    3737  // it's called through XMLHTTPRequest 
    3838  'tidy_handler': Xinha.getPluginDir("SuperClean") + '/tidy.php', 
     39 
     40  // set additional arguments needed for the tidy request  
     41  'tidy_args' : {},   
    3942 
    4043  //avaliable filters (these are built-in filters) 
  • trunk/plugins/SuperClean/pluginMethods.js

    r1165 r1199  
    5757        } 
    5858      } 
    59       Xinha._postback(editor.config.SuperClean.tidy_handler, {'content' : editor.getInnerHTML()},callback); 
     59       
     60      var args = editor.config.SuperClean.tidy_args;  
     61      if ( typeof args != 'object' )  
     62      {  
     63        args = {};  
     64      }  
     65      args['content'] =  editor.getInnerHTML();  
     66      
     67      Xinha._postback(editor.config.SuperClean.tidy_handler, args, callback);        
    6068    } 
    6169    else 
     
    154162    } 
    155163  } 
    156   Xinha._postback(editor.config.SuperClean.tidy_handler, {'content' : html},callback); 
     164   
     165  var args = editor.config.SuperClean.tidy_args;  
     166  if ( typeof args != 'object' )  
     167  {  
     168    args = {};  
     169  } 
     170  args['content'] =  html;  
     171   
     172  Xinha._postback(editor.config.SuperClean.tidy_handler, args, callback);          
    157173}; 
    158174 
Note: See TracChangeset for help on using the changeset viewer.