Mercurial > libervia-web
comparison src/browser/sat_browser/blog.py @ 898:2d15b484ca33
blog, browser: updated imports to reflect renaming of common.py to common/data_format.py
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 22 Mar 2016 22:45:39 +0100 |
parents | ded96b54ee02 |
children | fd4eae654182 |
comparison
equal
deleted
inserted
replaced
897:6de862136eb6 | 898:2d15b484ca33 |
---|---|
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 import pyjd # this is dummy in pyjs | 20 import pyjd # this is dummy in pyjs |
21 from sat.core.log import getLogger | 21 from sat.core.log import getLogger |
22 log = getLogger(__name__) | 22 log = getLogger(__name__) |
23 from sat.tools import common | 23 from sat.tools.common import data_format |
24 from sat.core.i18n import _ #, D_ | 24 from sat.core.i18n import _ #, D_ |
25 | 25 |
26 from pyjamas.ui.SimplePanel import SimplePanel | 26 from pyjamas.ui.SimplePanel import SimplePanel |
27 from pyjamas.ui.VerticalPanel import VerticalPanel | 27 from pyjamas.ui.VerticalPanel import VerticalPanel |
28 from pyjamas.ui.ScrollPanel import ScrollPanel | 28 from pyjamas.ui.ScrollPanel import ScrollPanel |
134 | 134 |
135 def _setBubble(self): | 135 def _setBubble(self): |
136 """Set the bubble displaying the initial content.""" | 136 """Set the bubble displaying the initial content.""" |
137 content = {'text': self.item.content_xhtml if self.item.content_xhtml else self.item.content or '', | 137 content = {'text': self.item.content_xhtml if self.item.content_xhtml else self.item.content or '', |
138 'title': self.item.title_xhtml if self.item.title_xhtml else self.item.title or ''} | 138 'title': self.item.title_xhtml if self.item.title_xhtml else self.item.title or ''} |
139 common.iter2dict('tag', self.item.tags, content) | 139 data_format.iter2dict('tag', self.item.tags, content) |
140 | 140 |
141 if self.mode == C.ENTRY_MODE_TEXT: | 141 if self.mode == C.ENTRY_MODE_TEXT: |
142 # assume raw text message have no title | 142 # assume raw text message have no title |
143 self.bubble = editor_widget.LightTextEditor(content, modifiedCb=self._modifiedCb, afterEditCb=self._afterEditCb, options={'no_xhtml': True}) | 143 self.bubble = editor_widget.LightTextEditor(content, modifiedCb=self._modifiedCb, afterEditCb=self._afterEditCb, options={'no_xhtml': True}) |
144 elif self.mode in ENTRY_RICH: | 144 elif self.mode in ENTRY_RICH: |
275 # TODO: if the user change his parameters after the message edition started, | 275 # TODO: if the user change his parameters after the message edition started, |
276 # the message syntax could be different then the current syntax: pass the | 276 # the message syntax could be different then the current syntax: pass the |
277 # message syntax in mb_data for the frontend to use it instead of current syntax. | 277 # message syntax in mb_data for the frontend to use it instead of current syntax. |
278 self.item.content_rich = content['text'] # XXX: this also works if the syntax is XHTML | 278 self.item.content_rich = content['text'] # XXX: this also works if the syntax is XHTML |
279 self.item.title = content['title'] | 279 self.item.title = content['title'] |
280 self.item.tags = list(common.dict2iter('tag', content)) | 280 self.item.tags = list(data_format.dict2iter('tag', content)) |
281 else: | 281 else: |
282 self.item.content = content['text'] | 282 self.item.content = content['text'] |
283 | 283 |
284 self.send() | 284 self.send() |
285 | 285 |