Mercurial > libervia-web
comparison browser_side/panels.py @ 293:7c79d4d66161
browser_side: blog post update: fix assignment to immutable element
author | souliane <souliane@mailoo.org> |
---|---|
date | Sun, 15 Dec 2013 12:01:25 +0100 |
parents | 1a5dc08c2749 |
children | a6b3715f0bd6 |
comparison
equal
deleted
inserted
replaced
292:1a5dc08c2749 | 293:7c79d4d66161 |
---|---|
351 self.timestamp = mblog_entry.timestamp | 351 self.timestamp = mblog_entry.timestamp |
352 _datetime = datetime.fromtimestamp(mblog_entry.timestamp) | 352 _datetime = datetime.fromtimestamp(mblog_entry.timestamp) |
353 self.comments = mblog_entry.comments | 353 self.comments = mblog_entry.comments |
354 self.pub_data = (mblog_entry.hash[0], mblog_entry.hash[1], mblog_entry.id) | 354 self.pub_data = (mblog_entry.hash[0], mblog_entry.hash[1], mblog_entry.id) |
355 | 355 |
356 self.editable_content = (mblog_entry.xhtml, const._SYNTAX_XHTML) if mblog_entry.xhtml else (mblog_entry.content, None) | 356 self.editable_content = [mblog_entry.xhtml, const._SYNTAX_XHTML] if mblog_entry.xhtml else [mblog_entry.content, None] |
357 | 357 |
358 self.panel = FlowPanel() | 358 self.panel = FlowPanel() |
359 self.panel.setStyleName('mb_entry') | 359 self.panel.setStyleName('mb_entry') |
360 header = HTMLPanel("""<div class='mb_entry_header'> | 360 header = HTMLPanel("""<div class='mb_entry_header'> |
361 <span class='mb_entry_author'>%(author)s</span> | 361 <span class='mb_entry_author'>%(author)s</span> |
466 self.entry_dialog.remove(self.bubble) | 466 self.entry_dialog.remove(self.bubble) |
467 self.entry_dialog.add(panel) | 467 self.entry_dialog.add(panel) |
468 self.editbox.setFocus(True) | 468 self.editbox.setFocus(True) |
469 self.editbox.setSelectionRange(len(text), 0) | 469 self.editbox.setSelectionRange(len(text), 0) |
470 self.edit_panel = panel | 470 self.edit_panel = panel |
471 self.editable_content = (text, container.format if isinstance(container, richtext.RichTextEditor) else None) | 471 self.editable_content = [text, container.format if isinstance(container, richtext.RichTextEditor) else None] |
472 | 472 |
473 if self.entry.xhtml: | 473 if self.entry.xhtml: |
474 options = ('no_recipient', 'no_sync_unibox', 'no_style', 'update_msg', 'no_close') | 474 options = ('no_recipient', 'no_sync_unibox', 'no_style', 'update_msg', 'no_close') |
475 | 475 |
476 def cb(result): | 476 def cb(result): |