Changeset 4445
- Timestamp:
- 10/12/08 14:57:41 (1 month ago)
- Files:
-
- clientsplugin/0.11/clients/eventsadmin.py (modified) (2 diffs)
- clientsplugin/0.11/clients/events.py (modified) (5 diffs)
- clientsplugin/0.11/clients/templates/admin_client_events.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
clientsplugin/0.11/clients/eventsadmin.py
r4439 r4445 11 11 get_datetime_format_hint 12 12 from trac.web.chrome import add_link, add_script 13 13 14 14 15 class ClientEventsAdminPanel(TicketAdminPanel): … … 26 27 # Client Events are not saved... just deleted or viewed... 27 28 for option in clev.summary_options: 28 arg = 'summary-option-%s' % option29 arg = 'summary-option-%s' % clev.summary_options[option]['md5'] 29 30 clev.summary_options[option]['value'] = req.args.get(arg) 30 31 for option in clev.action_options: 31 arg = 'action-option-%s' % option32 arg = 'action-option-%s' % clev.action_options[option]['md5'] 32 33 clev.action_options[option]['value'] = req.args.get(arg) 33 34 clev.update_options() clientsplugin/0.11/clients/events.py
r4443 r4445 1 import re1 import md5 2 2 import sys 3 3 import time 4 from datetime import date, datetime5 4 6 5 from trac.core import * 7 from trac.util import sorted, embedded_numbers8 from trac.util.datefmt import utc, utcmax, to_timestamp9 6 10 7 from clients.summary import IClientSummaryProvider 11 8 from clients.action import IClientActionProvider 9 10 11 12 12 __all__ = ['ClientEvent'] 13 13 … … 67 67 self.lastrun = 0 68 68 69 69 70 def loadoptions(self, db): 70 71 assert self.exists, 'Cannot load options for a non-existent client event' … … 84 85 self.summary_options = {} 85 86 for option in summary.instance_options(): 87 option['md5'] = md5.new(option['name']).hexdigest() 86 88 if options.has_key(option['name']): 87 89 option['value'] = options[option['name']] … … 97 99 self.action_options = {} 98 100 for option in action.instance_options(): 101 option['md5'] = md5.new(option['name']).hexdigest() 99 102 if options.has_key(option['name']): 100 103 option['value'] = options[option['name']] … … 104 107 105 108 exists = property(fget=lambda self: self._old_name is not None) 109 106 110 107 111 def delete(self, db=None): clientsplugin/0.11/clients/templates/admin_client_events.html
r4439 r4445 38 38 <label>$option.name</label><br /> 39 39 <!-- Todo: Support more modes other than textarea... --> 40 <textarea name="${field}-option-${option. name}" rows="10" cols="100">$option.value</textarea>40 <textarea name="${field}-option-${option.md5}" rows="10" cols="100">$option.value</textarea> 41 41 <p class="help">$option.description</p> 42 42 </div>
