--- a/src/pyams_thesaurus/zmi/widget/templates/terms-tree-input.pt Fri Feb 01 18:37:43 2019 +0100
+++ b/src/pyams_thesaurus/zmi/widget/templates/terms-tree-input.pt Fri Mar 22 15:23:35 2019 +0100
@@ -1,32 +1,37 @@
-<tal:loop repeat="term view/top_terms">
- <div class="col col-xs-6 col-sm-4 col-md-3 col-lg-3">
- <div class="ams-widget" data-ams-widget-toggle-button="false"
- id="them_${repeat/term/index}">
- <header class="no-margin">
- <h2>${python:term.alt or term.label}</h2>
- </header>
- <div class="widget-body no-padding viewport-y viewport-200 viewport-x-none"
- style="height: 200px; width: calc(100% - 2px);">
- <tal:loop repeat="subterm python:view.get_subterms(term)">
- <div style="padding-left: ${python:(subterm.level - 1) * 20}px; line-height: 1em;">
- <label class="checkbox"
- tal:define="published python:subterm.status == 'published'"
- tal:omit-tag="not:published">
- <input tal:condition="published"
- type="checkbox"
- name="${view/name}:list"
- id="term_${subterm/label}"
- name="${view/name}:list"
- value="${subterm/label}"
- checked="${python:'checked' if subterm.label in (view.value or ()) else None}" />
- <i></i>
- <div class="${python:'' if published else 'bold margin-top-5'}">
- ${python:subterm.alt or subterm.label}
- </div>
- </label>
- </div>
- </tal:loop>
+<div data-ams-plugins="pyams_thesaurus"
+ data-ams-plugin-pyams_thesaurus-src="${tales:resource_path('pyams_thesaurus.zmi:pyams_thesaurus')}"
+ data-ams-plugin-pyams_thesaurus-callback="PyAMS_thesaurus.widget.initTree">
+ <tal:loop repeat="term view/top_terms">
+ <div class="col col-xs-6 col-sm-4 col-md-3 col-lg-3">
+ <div class="ams-widget" data-ams-widget-toggle-button="false"
+ id="them_${repeat/term/index}">
+ <header class="no-margin">
+ <h2>${python:term.alt or term.label}</h2>
+ </header>
+ <div class="widget-body no-padding viewport-y viewport-200 viewport-x-none"
+ style="height: 200px; width: calc(100% - 2px);">
+ <tal:loop repeat="subterm python:view.get_subterms(term)">
+ <div style="padding-left: ${python:(subterm.level - 1) * 20}px; line-height: 1em;">
+ <label class="checkbox"
+ tal:define="published python:subterm.status == 'published'"
+ tal:omit-tag="not:published">
+ <input tal:condition="published"
+ type="checkbox"
+ name="${view/name}:list"
+ id="term_${subterm/label}"
+ name="${view/name}:list"
+ value="${subterm/label}"
+ checked="${python:'checked' if subterm.label in (view.value or ()) else None}"
+ data-ams-change-handler="PyAMS_thesaurus.widget.updateSelection"/>
+ <i></i>
+ <div class="${python:'' if published else 'bold margin-top-5'}">
+ ${python:subterm.alt or subterm.label}
+ </div>
+ </label>
+ </div>
+ </tal:loop>
+ </div>
</div>
</div>
- </div>
-</tal:loop>
+ </tal:loop>
+</div>
\ No newline at end of file