Mercurial > libervia-web
diff libervia.py @ 66:9d8e79ac4c9c
Login/Register box: integration of Adrien Vigneron's design
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 15 Jun 2011 00:52:02 +0200 |
parents | 104e71ce2293 |
children | 68d360caeecb |
line wrap: on
line diff
--- a/libervia.py Wed Jun 15 00:49:34 2011 +0200 +++ b/libervia.py Wed Jun 15 00:52:02 2011 +0200 @@ -3,7 +3,7 @@ """ Libervia: a Salut à Toi frontend -Copyright (C) 2011 Jérôme Poisson (goffi@goffi.org) +Copyright (C) 2011 Jérôme Poisson <goffi@goffi.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by @@ -25,7 +25,7 @@ from pyjamas.ui.KeyboardListener import KEY_ESCAPE from pyjamas import Window, DOM from pyjamas.JSONService import JSONProxy -from browser_side.register import RegisterPanel, RegisterBox +from browser_side.register import RegisterBox from browser_side.contact import ContactPanel from browser_side import panels, dialog from browser_side.jid import JID @@ -110,7 +110,7 @@ self.discuss_panel.changePanel(0,self.mpanels[0]) self.discuss_panel.changePanel(1,self.mpanels[1]) self.discuss_panel.changePanel(2,self.mpanels[2]) - self._dialog = None + self._register_box = None RootPanel().add(self.panel) DOM.addEventPreview(self) self.resize() @@ -151,8 +151,9 @@ def _isRegisteredCB(self, registered): if not registered: - self._dialog = RegisterBox(self.logged,centered=True) - self._dialog.show() + self._register_box = RegisterBox(self.logged) + self._register_box.centerBox() + self._register_box.show() else: self._register.call('isConnected', self._isConnectedCB) @@ -163,9 +164,9 @@ self.logged() def logged(self): - if self._dialog: - self._dialog.hide() - del self._dialog # don't work if self._dialog is None + if self._register_box: + self._register_box.hide() + del self._register_box # don't work if self._register_box is None #it's time to fill the page self.bridge.call('getContacts', self._getContactsCB)