Mercurial > libervia-web
comparison browser_side/dialog.py @ 439:d52f529a6d42
browser side: use of new log system (first draft):
- configuration is hardcoded in libervia.py, it will change in the (hopefuly) near future
- log level is DEBUG for the moment, will be changed to INFO when configuration will not be hardcoded anymore
- the basic log backend is used, in the future, a console.debug/info/etc should be used instead. A log widget which HTML colors is also an option
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 08 May 2014 17:21:34 +0200 |
parents | 6e38d317bc16 |
children |
comparison
equal
deleted
inserted
replaced
438:582c435dab6b | 439:d52f529a6d42 |
---|---|
15 # GNU Affero General Public License for more details. | 15 # GNU Affero General Public License for more details. |
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 from sat.core.log import getLogger | |
21 log = getLogger(__name__) | |
20 from pyjamas.ui.VerticalPanel import VerticalPanel | 22 from pyjamas.ui.VerticalPanel import VerticalPanel |
21 from pyjamas.ui.Grid import Grid | 23 from pyjamas.ui.Grid import Grid |
22 from pyjamas.ui.HorizontalPanel import HorizontalPanel | 24 from pyjamas.ui.HorizontalPanel import HorizontalPanel |
23 from pyjamas.ui.PopupPanel import PopupPanel | 25 from pyjamas.ui.PopupPanel import PopupPanel |
24 from pyjamas.ui.DialogBox import DialogBox | 26 from pyjamas.ui.DialogBox import DialogBox |
115 elif len(nb_contact) == 1: | 117 elif len(nb_contact) == 1: |
116 nb_contact = (nb_contact[0], nb_contact[0]) | 118 nb_contact = (nb_contact[0], nb_contact[0]) |
117 elif nb_contact is not None: | 119 elif nb_contact is not None: |
118 nb_contact = (nb_contact, nb_contact) | 120 nb_contact = (nb_contact, nb_contact) |
119 if nb_contact is None: | 121 if nb_contact is None: |
120 print "Need to select as many contacts as you want" | 122 log.warning("Need to select as many contacts as you want") |
121 else: | 123 else: |
122 print "Need to select between %d and %d contacts" % nb_contact | 124 log.warning("Need to select between %d and %d contacts" % nb_contact) |
123 self.nb_contact = nb_contact | 125 self.nb_contact = nb_contact |
124 self.ok_button = ok_button | 126 self.ok_button = ok_button |
125 VerticalPanel.__init__(self, Width='100%') | 127 VerticalPanel.__init__(self, Width='100%') |
126 self.contacts_list = ListBox() | 128 self.contacts_list = ListBox() |
127 self.contacts_list.setMultipleSelect(True) | 129 self.contacts_list.setMultipleSelect(True) |