imip-agent

Change of imipweb/event.py

622:a8b98a2cbdca
imipweb/event.py
     1.1 --- a/imipweb/event.py	Thu Jul 30 19:26:10 2015 +0200
     1.2 +++ b/imipweb/event.py	Thu Jul 30 19:29:10 2015 +0200
     1.3 @@ -921,8 +921,8 @@
     1.4  
     1.5          page = self.page
     1.6          args = self.env.get_args()
     1.7 -        sn = self._suffixed_name
     1.8 -        ssn = self._simple_suffixed_name
     1.9 +        _id = self.element_identifier
    1.10 +        _name = self.element_name
    1.11  
    1.12          # Add a dynamic stylesheet to permit the controls to modify the display.
    1.13          # NOTE: The style details need to be coordinated with the static
    1.14 @@ -947,15 +947,15 @@
    1.15              page.style.close()
    1.16  
    1.17          self._control(
    1.18 -            ssn("dtend-control", "recur", index), "checkbox",
    1.19 +            _name("dtend-control", "recur", index), "checkbox",
    1.20              index is not None and str(index) or "enable", p.end_enabled,
    1.21 -            id=sn("dtend-enable", index)
    1.22 +            id=_id("dtend-enable", index)
    1.23              )
    1.24  
    1.25          self._control(
    1.26 -            ssn("dttimes-control", "recur", index), "checkbox",
    1.27 +            _name("dttimes-control", "recur", index), "checkbox",
    1.28              index is not None and str(index) or "enable", p.times_enabled,
    1.29 -            id=sn("dttimes-enable", index)
    1.30 +            id=_id("dttimes-enable", index)
    1.31              )
    1.32  
    1.33      def show_datetime_controls(self, obj, formdate, show_start):
    1.34 @@ -1016,8 +1016,8 @@
    1.35          """
    1.36  
    1.37          page = self.page
    1.38 -        sn = self._suffixed_name
    1.39 -        ssn = self._simple_suffixed_name
    1.40 +        _id = self.element_identifier
    1.41 +        _name = self.element_name
    1.42  
    1.43          p = event_period_from_period(period)
    1.44          replaced = not recurrenceid and self.is_replaced(p, recurrenceids)
    1.45 @@ -1031,11 +1031,11 @@
    1.46  
    1.47              if show_start:
    1.48                  page.div(class_="dt enabled")
    1.49 -                self._show_date_controls(ssn("dtstart", "recur", index), p.get_form_start(), index=index, read_only=read_only)
    1.50 +                self._show_date_controls(_name("dtstart", "recur", index), p.get_form_start(), index=index, read_only=read_only)
    1.51                  if not read_only:
    1.52                      page.br()
    1.53 -                    page.label("Specify times", for_=sn("dttimes-enable", index), class_="time disabled enable")
    1.54 -                    page.label("Specify dates only", for_=sn("dttimes-enable", index), class_="time enabled disable")
    1.55 +                    page.label("Specify times", for_=_id("dttimes-enable", index), class_="time disabled enable")
    1.56 +                    page.label("Specify dates only", for_=_id("dttimes-enable", index), class_="time enabled disable")
    1.57                  page.div.close()
    1.58  
    1.59                  # Put the origin somewhere.
    1.60 @@ -1045,13 +1045,13 @@
    1.61              else:
    1.62                  page.div(class_="dt disabled")
    1.63                  if not read_only:
    1.64 -                    page.label("Specify end date", for_=sn("dtend-enable", index), class_="enable")
    1.65 +                    page.label("Specify end date", for_=_id("dtend-enable", index), class_="enable")
    1.66                  page.div.close()
    1.67                  page.div(class_="dt enabled")
    1.68 -                self._show_date_controls(ssn("dtend", "recur", index), p.get_form_end(), index=index, show_tzid=False, read_only=read_only)
    1.69 +                self._show_date_controls(_name("dtend", "recur", index), p.get_form_end(), index=index, show_tzid=False, read_only=read_only)
    1.70                  if not read_only:
    1.71                      page.br()
    1.72 -                    page.label("End on same day", for_=sn("dtend-enable", index), class_="disable")
    1.73 +                    page.label("End on same day", for_=_id("dtend-enable", index), class_="disable")
    1.74                  page.div.close()
    1.75  
    1.76              page.td.close()