Mercurial > libervia-web
comparison browser_side/base_panels.py @ 433:bbdbee25123a
import constants.Const as C (according to the coding rules)
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 01 May 2014 11:29:09 +0200 |
parents | 9977de10b7da |
children | d52f529a6d42 |
comparison
equal
deleted
inserted
replaced
432:8ecc5a7062e4 | 433:bbdbee25123a |
---|---|
37 from datetime import datetime | 37 from datetime import datetime |
38 from time import time | 38 from time import time |
39 | 39 |
40 from html_tools import html_sanitize, html_strip, inlineRoot, convertNewLinesToXHTML | 40 from html_tools import html_sanitize, html_strip, inlineRoot, convertNewLinesToXHTML |
41 | 41 |
42 from constants import Const | 42 from constants import Const as C |
43 from sat_frontends.tools.strings import addURLToText, addURLToImage | 43 from sat_frontends.tools.strings import addURLToText, addURLToImage |
44 from sat.core.i18n import _ | 44 from sat.core.i18n import _ |
45 | 45 |
46 | 46 |
47 class ChatText(HTMLPanel): | 47 class ChatText(HTMLPanel): |
95 for symbol in special: | 95 for symbol in special: |
96 self.special = self.special.replace(symbol, "") | 96 self.special = self.special.replace(symbol, "") |
97 self._refresh() | 97 self._refresh() |
98 | 98 |
99 def _refresh(self): | 99 def _refresh(self): |
100 state = (' %s' % Const.MUC_USER_STATES[self._state]) if self._state else '' | 100 state = (' %s' % C.MUC_USER_STATES[self._state]) if self._state else '' |
101 special = "" if len(self.special) == 0 else " %s" % self.special | 101 special = "" if len(self.special) == 0 else " %s" % self.special |
102 self.setHTML("<div class='occupant'>%s%s%s</div>" % (html_sanitize(self.nick), special, state)) | 102 self.setHTML("<div class='occupant'>%s%s%s</div>" % (html_sanitize(self.nick), special, state)) |
103 | 103 |
104 | 104 |
105 class OccupantsList(AbsolutePanel): | 105 class OccupantsList(AbsolutePanel): |