Changeset 3887 for addcommentmacro

Show
Ignore:
Timestamp:
06/23/08 05:58:56 (3 months ago)
Author:
osimons
Message:

AddCommentMacro:

  • Wiki page preview got us a double set of editing toolbars. Fixed.
  • Also adding some extra logging and deleting the redirect marker in search of possible issue with redirect (that I can't replicate).
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • addcommentmacro/0.11/addcomment/macro.py

    r3723 r3887  
    143143                    # We need to re-raise it in a post_process_request instead. 
    144144                    try: 
     145                        self.env.log.debug( 
     146                            "AddComment saved - redirecting to: %s" % page_url) 
    145147                        req._outheaders = [] 
    146148                        req.redirect(page_url) 
     
    190192                    action=page_url+"#commenting", 
    191193                ) 
    192          
    193         add_script(req, 'common/js/wikitoolbar.js') 
     194 
     195        if not wikipreview: 
     196            # Wiki edit preview already adds this javascript file 
     197            add_script(req, 'common/js/wikitoolbar.js') 
    194198         
    195199        return tag.div(the_preview, the_message, the_form, id="commenting") 
     
    208212        if hasattr(req, 'addcomment_raise'): 
    209213            self.env.log.debug("AddCommentMacro: Re-raising RequestDone from redirect") 
     214            del(req.addcomment_raise) 
    210215            raise RequestDone 
    211216        return template, data, content_type