Mercurial > libervia-web
comparison libervia.py @ 312:b4781a350483
browser_side: display a "New message" button and add a "comment" icon for main entries in MicroblogPanel when the unibox is disabled
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 30 Dec 2013 00:33:19 +0100 |
parents | 05e264e96a1c |
children | 5ad70625867a |
comparison
equal
deleted
inserted
replaced
311:3135ff840b8e | 312:b4781a350483 |
---|---|
172 self.tab_panel.addTabListener(self) | 172 self.tab_panel.addTabListener(self) |
173 self.libervia_widgets = set() # keep track of all actives LiberviaWidgets | 173 self.libervia_widgets = set() # keep track of all actives LiberviaWidgets |
174 self.room_list = [] # list of rooms | 174 self.room_list = [] # list of rooms |
175 self.mblog_cache = [] # used to keep our own blog entries in memory, to show them in new mblog panel | 175 self.mblog_cache = [] # used to keep our own blog entries in memory, to show them in new mblog panel |
176 self.avatars_cache = {} # keep track of jid's avatar hash (key=jid, value=file) | 176 self.avatars_cache = {} # keep track of jid's avatar hash (key=jid, value=file) |
177 #self.discuss_panel.addWidget(panels.EmptyPanel(self)) | |
178 self.discuss_panel.addWidget(panels.MicroblogPanel(self, [])) | |
179 #self.discuss_panel.addWidget(panels.EmptyPanel(self)) | |
180 self._register_box = None | 177 self._register_box = None |
181 RootPanel().add(self.panel) | 178 RootPanel().add(self.panel) |
182 DOM.addEventPreview(self) | 179 DOM.addEventPreview(self) |
183 self.resize() | |
184 self._register = RegisterCall() | 180 self._register = RegisterCall() |
185 self._register.call('isRegistered', self._isRegisteredCB) | 181 self._register.call('isRegistered', self._isRegisteredCB) |
186 self.initialised = False | 182 self.initialised = False |
187 self.init_cache = [] # used to cache events until initialisation is done | 183 self.init_cache = [] # used to cache events until initialisation is done |
188 | 184 |
326 | 322 |
327 def domain_eb(value): | 323 def domain_eb(value): |
328 self._defaultDomain = "libervia.org" | 324 self._defaultDomain = "libervia.org" |
329 | 325 |
330 self.bridge.call("getNewAccountDomain", (domain_cb, domain_eb)) | 326 self.bridge.call("getNewAccountDomain", (domain_cb, domain_eb)) |
331 self.bridge.call('asyncGetParamA', self._setUniBox, Const.ENABLE_UNIBOX_PARAM, Const.ENABLE_UNIBOX_KEY) | 327 |
328 def unibox_cb(enable): | |
329 self._setUniBox(enable) | |
330 self.discuss_panel.addWidget(panels.MicroblogPanel(self, [])) | |
331 self.resize() # resize after all the UI elements have been attached | |
332 | |
333 self.bridge.call('asyncGetParamA', unibox_cb, Const.ENABLE_UNIBOX_PARAM, Const.ENABLE_UNIBOX_KEY) | |
332 | 334 |
333 def _tryAutoConnect(self): | 335 def _tryAutoConnect(self): |
334 """This method retrieve the eventual URL parameters to auto-connect the user.""" | 336 """This method retrieve the eventual URL parameters to auto-connect the user.""" |
335 params = getURLParams(Window.getLocation().getSearch()) | 337 params = getURLParams(Window.getLocation().getSearch()) |
336 if "login" in params: | 338 if "login" in params: |