Attachment 'MonthCalendar.diff'

Download

   1 --- MonthCalendar_old.py	2007-04-02 19:29:04.000000000 +0200
   2 +++ MonthCalendar.py	2007-04-02 19:37:46.000000000 +0200
   3 @@ -376,6 +376,7 @@
   4  
   5      maketip_js = []
   6      restrn = []
   7 +    onmouse = {}
   8      for week in monthcal:
   9          restdn = []
  10          for wkday in r7:
  11 @@ -393,20 +394,21 @@
  12                      csslink = "cal-usedday"
  13                      query = {}
  14                      r, g, b, u = (255, 0, 0, 1)
  15 -                    daycontent = daypage.get_raw_body()
  16 -                    header1_re = re.compile(r'^\s*=\s(.*)\s=$', re.MULTILINE) # re.UNICODE
  17 -                    titletext = []
  18 -                    for match in header1_re.finditer(daycontent):
  19 -                        if match:
  20 -                            title = match.group(1)
  21 -                            title = wikiutil.escape(title).replace("'", "\\'")
  22 -                            titletext.append(title)
  23 -                    tipname = link
  24 -                    tiptitle = link
  25 -                    tiptext = '<br>'.join(titletext)
  26 -                    maketip_js.append("maketip('%s','%s','%s');" % (tipname, tiptitle, tiptext))
  27 -                    onmouse = {'onMouseOver': "tip('%s')" % tipname,
  28 -                               'onMouseOut': "untip()"}
  29 +                    if request.user.may.read(daypage.page_name):
  30 +                        daycontent = daypage.get_raw_body()
  31 +                        header1_re = re.compile(r'^\s*=\s(.*)\s=$', re.MULTILINE) # re.UNICODE
  32 +                        titletext = []
  33 +                        for match in header1_re.finditer(daycontent):
  34 +                            if match:
  35 +                                title = match.group(1)
  36 +                                title = wikiutil.escape(title).replace("'", "\\'")
  37 +                                titletext.append(title)
  38 +                        tipname = link
  39 +                        tiptitle = link
  40 +                        tiptext = '<br>'.join(titletext)
  41 +                        maketip_js.append("maketip('%s','%s','%s');" % (tipname, tiptitle, tiptext))
  42 +                        onmouse = {'onMouseOver': "tip('%s')" % tipname,
  43 +                                   'onMouseOut': "untip()"}
  44                  else:
  45                      csslink = "cal-emptyday"
  46                      if parmtemplate:

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2007-04-02 17:58:17, 2.3 KB) [[attachment:MonthCalendar.diff]]
 All files | Selected Files: delete move to page copy to page

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