# HG changeset patch # User cavaliet # Date 1383235389 -3600 # Node ID be387ef9e1eceed1908f2f417b854aa18ea32ce8 # Parent f525c8f169e33b97f90cf7a09f82e043bba6df8e v1.51.10 : config polemic max elements diff -r f525c8f169e3 -r be387ef9e1ec src/ldt/ldt/__init__.py --- a/src/ldt/ldt/__init__.py Thu Oct 31 11:59:19 2013 +0100 +++ b/src/ldt/ldt/__init__.py Thu Oct 31 17:03:09 2013 +0100 @@ -1,6 +1,6 @@ __all__ = ["VERSION", "get_version", "__version__"] -VERSION = (1, 51, 9, "final", 0) +VERSION = (1, 51, 10, "final", 0) def get_version(): diff -r f525c8f169e3 -r be387ef9e1ec src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html Thu Oct 31 11:59:19 2013 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html Thu Oct 31 17:03:09 2013 +0100 @@ -78,18 +78,19 @@ return url.replace('/ddc_player/video/','/ddc_player/mp4:video/'); }, autostart: {% if autostart %} true {% else %} false {% endif %} - } {% if polemic == 'all' or polemic == 'tweet' %}, - { + } + {% if polemic == 'all' or polemic == 'tweet' %} + ,{ type: "Polemic", - {% if polemic == 'all' %} - annotation_type: false, - {% endif %} - {% if polemic == 'tweet' %} - annotation_type: "tweet", - {% endif %} + {% if polemic == 'all' %} + annotation_type: false, + {% endif %} + {% if polemic == 'tweet' %} + annotation_type: "tweet", + {% endif %} + max_elements: {{ polemic__max_elements }}, defaultcolor: "#{{ polemic_defaultColor }}", foundcolor: "#{{ polemic_foundColor }}", - polemics : [ { "name" : "OK", diff -r f525c8f169e3 -r be387ef9e1ec src/ldt/ldt/ldt_utils/views/workspace.py --- a/src/ldt/ldt/ldt_utils/views/workspace.py Thu Oct 31 11:59:19 2013 +0100 +++ b/src/ldt/ldt/ldt_utils/views/workspace.py Thu Oct 31 17:03:09 2013 +0100 @@ -162,6 +162,14 @@ rend_dict["polemic_qColor"] = request.GET.get("polemic_qColor") else: rend_dict["polemic_qColor"] = "036aae" + if request.GET.has_key("polemic__max_elements"): + try: + pme = int(request.GET.get("polemic__max_elements")) + except: + pme = 20 + rend_dict["polemic__max_elements"] = pme + else: + rend_dict["polemic__max_elements"] = 20 if request.GET.has_key("autostart"): rend_dict["autostart"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("autostart").lower())