Mercurial > libervia-web
comparison libervia.py @ 218:4e6467efd6bf
browser_side: small improvements for parameters panel
- auto-select the first tab
- remove the parameters item if there's nothing to display
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 07 Sep 2013 19:54:41 +0200 |
parents | e830a0c60d32 |
children | 624a87377412 |
comparison
equal
deleted
inserted
replaced
217:f7ec248192de | 218:4e6467efd6bf |
---|---|
285 self._register_box.hide() | 285 self._register_box.hide() |
286 del self._register_box # don't work if self._register_box is None | 286 del self._register_box # don't work if self._register_box is None |
287 | 287 |
288 #it's time to fill the page | 288 #it's time to fill the page |
289 self.bridge.call('getContacts', self._getContactsCB) | 289 self.bridge.call('getContacts', self._getContactsCB) |
290 self.bridge.call('getParamsUI', self._getParamsUICB) | |
290 self.bridge_signals.call('getSignals', self._getSignalsCB) | 291 self.bridge_signals.call('getSignals', self._getSignalsCB) |
291 #We want to know our own jid | 292 #We want to know our own jid |
292 self.bridge.call('getProfileJid', self._getProfileJidCB) | 293 self.bridge.call('getProfileJid', self._getProfileJidCB) |
293 | 294 |
294 def _getContactsCB(self, contacts_data): | 295 def _getContactsCB(self, contacts_data): |
343 elif name == 'entityDataUpdated': | 344 elif name == 'entityDataUpdated': |
344 self._entityDataUpdatedCb(*args) | 345 self._entityDataUpdatedCb(*args) |
345 elif name == 'chatStateReceived': | 346 elif name == 'chatStateReceived': |
346 self._chatStateReceivedCb(*args) | 347 self._chatStateReceivedCb(*args) |
347 | 348 |
349 def _getParamsUICB(self, xmlui): | |
350 """Hide the parameters item if there's nothing to display""" | |
351 if not xmlui: | |
352 self.panel.menu.removeItemParams() | |
353 | |
348 def _ownBlogsFills(self, mblogs): | 354 def _ownBlogsFills(self, mblogs): |
349 #put our own microblogs in cache, then fill all panels with them | 355 #put our own microblogs in cache, then fill all panels with them |
350 for publisher in mblogs: | 356 for publisher in mblogs: |
351 for mblog in mblogs[publisher]: | 357 for mblog in mblogs[publisher]: |
352 if not mblog.has_key('content'): | 358 if not mblog.has_key('content'): |