Ticket #37: posterity.diff
| File posterity.diff, 2.8 KB (added by fgsch@…, 14 months ago) |
|---|
-
trunk/posterity/model.py
288 288 msg.is_deleted = False 289 289 self._update_date_cache() 290 290 291 def mark_as_read(self, deleted=False):292 """Mark all messages in the conversation as read291 def mark_as_read(self, is_read=True, deleted=False): 292 """Mark all messages in the conversation as `is_read` 293 293 294 294 If @deleted is True all messages marked for deletions are marked 295 as read.295 as `is_read`. 296 296 """ 297 297 if deleted: 298 298 for msg in self.deleted_msgs: 299 msg.is_unread = False299 msg.is_unread = not is_read 300 300 else: 301 301 for msg in self.msgs: 302 msg.is_unread = False302 msg.is_unread = not is_read 303 303 304 304 def _update_date_cache(self): 305 305 """ -
trunk/posterity/controllers.py
86 86 elif do_action == 'undelete': 87 87 c.remove_tag('Trash') 88 88 c.undelete() 89 elif do_action == 'unread': 90 c.mark_as_read(is_read=False) 89 91 elif do_action.startswith('tag_'): 90 92 t = do_action[4:] 91 93 c.add_tag(t) -
trunk/posterity/templates/conv_index.html
34 34 35 35 <select py:if="account.tags" 36 36 onchange="submitAction(this.options[this.selectedIndex].value)"> 37 <option>Add/Remove Tag</option> 37 <option>More actions...</option> 38 <option value="unread">Mark as unread</option> 38 39 <optgroup label="Add Tag"> 39 40 <option py:for="t in account.tags" py:if="not t.is_special" 40 41 value="tag_$t.name">$t.name</option> -
trunk/posterity/templates/conv_show.html
46 46 onclick="submitAction('undelete')">Undelete</button> 47 47 <select py:if="account.tags" 48 48 onchange="submitAction(this.options[this.selectedIndex].value)"> 49 <option>Add/Remove Tag</option> 49 <option>More actions...</option> 50 <option value="unread">Mark as unread</option> 50 51 <optgroup label="Add Tag"> 51 52 <option py:for="t in account.tags" py:if="not t.is_special" 52 53 value="tag_$t.name">$t.name</option>
