# HG changeset patch # User souliane # Date 1392213073 -3600 # Node ID 83454ba70a9c043fc5544fbac15f4db2faae707a # Parent f1ba38043d788774aa1e0e556e4aa6d1f62cfff6 browser_side: added a method setVisible to ListManager diff -r f1ba38043d78 -r 83454ba70a9c browser_side/list_manager.py --- a/browser_side/list_manager.py Fri Feb 07 20:14:11 2014 +0100 +++ b/browser_side/list_manager.py Wed Feb 12 14:51:13 2014 +0100 @@ -38,7 +38,7 @@ # HTML content for the removal button (image or text) -REMOVE_BUTTON = 'x' +REMOVE_BUTTON = 'x' # Item to be considered for an empty list box selection. # Could be whatever which doesn't look like a JID or a group name. @@ -141,15 +141,20 @@ # this is done if self.registerPopupMenuPanel has been called yet self.popup_menu.registerClickSender(button) - def _refresh(self): + def _refresh(self, visible=True): """Set visible the sub-panels that are non optional or non empty, hide the rest.""" for key in self.__children: self.setContactPanelVisible(key, False) + if not visible: + return _map = self.getContacts() for key in _map: if len(_map[key]) > 0 or not self.__keys_dict[key]["optional"]: self.setContactPanelVisible(key, True) + def setVisible(self, visible): + self._refresh(visible) + def setContactPanelVisible(self, key, visible=True, sender=None): """Do not remove the "sender" param as it is needed for the context menu.""" self.__children[key]["button"].setVisible(visible) diff -r f1ba38043d78 -r 83454ba70a9c public/libervia.css --- a/public/libervia.css Fri Feb 07 20:14:11 2014 +0100 +++ b/public/libervia.css Wed Feb 12 14:51:13 2014 +0100 @@ -1353,7 +1353,7 @@ border-radius: 5px 5px 5px 5px; } -.richTextRemoveIcon { +.recipientRemoveIcon { color: red; width:15px; height:15px;