Attachment 'Close.py'

Download

   1 """
   2 MoinMoin Close macro
   3 
   4 Outputs the html code for a java call to close a page opened by a 'target="_blank"' link.
   5 
   6 @copyright: 2010 Ian Riley <ian.riley@adelaide.edu.au>
   7 @licence: GNU GPL, see COPYING for details.
   8  
   9 """
  10 def execute(macro, args):
  11     link = args
  12     if link == '':
  13         link = 'Close'
  14     return''.join(['<a href="JavaScript:window.close()">',macro.formatter.text(link),'</a>'])

You are not allowed to attach a file to this page.