[Spambayes-checkins] spambayes/spambayes UserInterface.py, 1.11, 1.12

Richie Hindle richiehindle at users.sourceforge.net
Wed Jul 2 13:28:20 EDT 2003


Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv18027

Modified Files:
	UserInterface.py 
Log Message:
Put the current date and time into the footer of the web interface,
rather than always displaying "Mon Dec 30 14:04:32 2002".


Index: UserInterface.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/UserInterface.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** UserInterface.py	15 May 2003 01:29:11 -0000	1.11
--- UserInterface.py	2 Jul 2003 19:28:17 -0000	1.12
***************
*** 96,100 ****
          htmlSource, self._images = self.readUIResources()
          self.html = PyMeldLite.Meld(htmlSource, readonly=True)
!   
      def onIncomingConnection(self, clientSocket):
          """Checks the security settings."""
--- 96,100 ----
          htmlSource, self._images = self.readUIResources()
          self.html = PyMeldLite.Meld(htmlSource, readonly=True)
! 
      def onIncomingConnection(self, clientSocket):
          """Checks the security settings."""
***************
*** 140,145 ****
          """Writes the end of time-consuming pages - see `_writePreamble`."""
          footer = self.html.footer.clone()
!         footer.timestamp = time.asctime(time.localtime())
!         self.write("</div>" + self.html.footer)
          self.write("</body></html>")
  
--- 140,145 ----
          """Writes the end of time-consuming pages - see `_writePreamble`."""
          footer = self.html.footer.clone()
!         footer.timestamp = time.strftime('%H:%M on %A %B %d %Y', time.localtime())
!         self.write("</div>" + footer)
          self.write("</body></html>")
  
***************
*** 425,429 ****
                      if options.multiple_values_allowed(sect, opt):
                          if val in options[sect, opt]:
!                             newOption.input_box.checked = "checked" 
                          newOption.input_box.type = "checkbox"
                          newOption.input_box.name = html_key + '-' + str(i)
--- 425,429 ----
                      if options.multiple_values_allowed(sect, opt):
                          if val in options[sect, opt]:
!                             newOption.input_box.checked = "checked"
                          newOption.input_box.type = "checkbox"
                          newOption.input_box.name = html_key + '-' + str(i)
***************
*** 442,449 ****
                      newOption.val_label = str(val)
                      newOption.input_box.value = str(val)
!                     if firstOpt: 
                          newConfigRow1.input = newOption
                          firstOpt = False
!                     else:                   
                          newConfigRow1.input += newOption
              # Insert the help text in a cell
--- 442,449 ----
                      newOption.val_label = str(val)
                      newOption.input_box.value = str(val)
!                     if firstOpt:
                          newConfigRow1.input = newOption
                          firstOpt = False
!                     else:
                          newConfigRow1.input += newOption
              # Insert the help text in a cell
***************
*** 455,459 ****
              newConfigRow2 = configRow2.clone()
              currentValue = options[sect, opt]
!  
              if type(currentValue) in types.StringTypes:
                  currentValue = currentValue.replace(',', ', ')
--- 455,459 ----
              newConfigRow2 = configRow2.clone()
              currentValue = options[sect, opt]
! 
              if type(currentValue) in types.StringTypes:
                  currentValue = currentValue.replace(',', ', ')
***************
*** 462,466 ****
                  currentValue = options.unconvert(sect, opt)
                  newConfigRow2 = configRow2.clone()
!             
              # Tim thinks that Yes/No makes more sense than True/False
              if options.is_boolean(sect, opt):
--- 462,466 ----
                  currentValue = options.unconvert(sect, opt)
                  newConfigRow2 = configRow2.clone()
! 
              # Tim thinks that Yes/No makes more sense than True/False
              if options.is_boolean(sect, opt):





More information about the Spambayes-checkins mailing list