core: added advanced list to XMLUI (need improvment, very basic so far)

- the advanced list use headers which can be used as columns
    - in the future, should provide the ability to highly customize list disposition, in a way similar to Amarok 2's playlist.
This commit is contained in:
Goffi 2013-09-08 18:05:19 +02:00
commit 0cce82d3ea
4 changed files with 196 additions and 31 deletions

View file

@ -28,7 +28,7 @@ import random
from zope.interface import implements
from wokkel import disco, iwokkel, data_form
from sat.tools.xml_tools import dataForm2xml
from sat.tools.xml_tools import dataForm2XML
from sat.tools.games import TarotCard
from time import time

View file

@ -25,7 +25,7 @@ import random
from zope.interface import implements
from wokkel import disco, iwokkel, data_form
from sat.tools.xml_tools import dataForm2xml
from sat.tools.xml_tools import dataForm2XML
from sat.tools.games import TarotCard
from time import time
@ -600,7 +600,7 @@ class Tarot(object):
elif elt.name == 'contrat': # it's time to choose contrat
form = data_form.Form.fromElement(elt.firstChildElement())
xml_data = dataForm2xml(form)
xml_data = dataForm2XML(form)
self.host.bridge.tarotGameChooseContrat(room_jid.userhost(), xml_data, profile)
elif elt.name == 'contrat_choosed':
@ -753,7 +753,7 @@ class Tarot(object):
for looser in elt.elements(name='looser', uri=NS_CG):
loosers.append(unicode(looser))
form = data_form.Form.fromElement(form_elt)
xml_data = dataForm2xml(form)
xml_data = dataForm2XML(form)
self.host.bridge.tarotGameScore(room_jid.userhost(), xml_data, winners, loosers, profile)
elif elt.name == 'error':
if elt['type'] == 'invalid_cards':

View file

@ -20,7 +20,7 @@
from logging import debug, info, error
from twisted.words.protocols.jabber import jid
from twisted.words.protocols.jabber.xmlstream import IQ
from sat.tools.xml_tools import dataForm2xml
from sat.tools.xml_tools import dataForm2XML
from wokkel import data_form
@ -63,7 +63,7 @@ class XEP_0077(object):
return
form = data_form.Form.fromElement(x_elem)
xml_data = dataForm2xml(form)
xml_data = dataForm2XML(form)
self.host.bridge.actionResult("XMLUI", answer['id'], {"target": answer["from"], "type": "registration", "xml": xml_data}, profile)
def reg_err(self, failure, profile):