comparison src/browser/libervia_main.py @ 500:67a4e8383b70

browser side (XMLUI): XMLUI update to follow core changes: - Dialogs are now managed - FileDialog raise a NotImplementedError, it's not yet possible in Libervia - XMLUIPanel.show is implemented - following core changes, we now create an XMLUI with xmlui.create(...) - WidgetFactory now inherit from GenericFactory - workaround for __getattr__ bug in pyjamas, now createXXX are automaticaly created with inspection
author Goffi <goffi@goffi.org>
date Wed, 13 Aug 2014 14:09:09 +0200
parents 587fe75d1b16
children 88ece2a00c63
comparison
equal deleted inserted replaced
499:ec3f30253040 500:67a4e8383b70
405 def _actionCb(self, data): 405 def _actionCb(self, data):
406 if not data: 406 if not data:
407 # action was a one shot, nothing to do 407 # action was a one shot, nothing to do
408 pass 408 pass
409 elif "xmlui" in data: 409 elif "xmlui" in data:
410 ui = xmlui.XMLUI(self, xml_data=data['xmlui']) 410 ui = xmlui.create(self, xml_data=data['xmlui'])
411 options = ['NO_CLOSE'] if ui.type == 'form' else [] 411 ui.show()
412 _dialog = dialog.GenericDialog(ui.title, ui, options=options)
413 ui.setCloseCb(_dialog.close)
414 _dialog.show()
415 elif "public_blog" in data: 412 elif "public_blog" in data:
416 # TODO: use the bare instead of node when all blogs can be retrieved 413 # TODO: use the bare instead of node when all blogs can be retrieved
417 node = jid.JID(data['public_blog']).node 414 node = jid.JID(data['public_blog']).node
418 self.addTab("%s's blog" % node, panels.WebPanel(self, "/blog/%s" % node)) 415 self.addTab("%s's blog" % node, panels.WebPanel(self, "/blog/%s" % node))
419 else: 416 else: