This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
collective.dms.thesaurus/src/collective/dms/thesaurus/browser/dmsthesaurus_view.pt

56 lines
1.7 KiB
XML

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="context/main_template/macros/master"
i18n:domain="plone.app.dexterity">
<body>
<metal:main fill-slot="main">
<tal:contents_header condition="python: 'ajax_load' not in request.form.keys()">
<h1 class="documentFirstHeading" tal:content="context/Title" />
<div tal:replace="structure provider:plone.belowcontenttitle" />
</tal:contents_header>
<form id="thesaurus-search-form" tal:content="structure view/renderForm">
</form>
<div id="dmsthesaurus-entry-points-field"
class="field"
tal:define="widget python:view.widgets.get('entry_points')">
<label tal:content="widget/label" />
<br />
<div tal:content="structure widget/render" />
</div>
<script type="text/javascript" tal:condition="python: 'ajax_load' not in request.form.keys()">
function autocomplete_ready(event, data, formatted) {
window.location=window.location+'/'+data[1];
}
$(document).ready(function() {
$('.keyword-search').autocomplete('listKeywords', {
'cacheLength': 0, 'matchContains': true, 'scroll': true, 'max': 30}).result(autocomplete_ready);
});
</script>
<script type="text/javascript" tal:condition="python: 'ajax_load' in request.form.keys()">
function preplinks() {
$('.overlay-ajax a').click(function() {
$('.pb-ajax > div').load($(this).attr('href') + '?ajax_load=123 #content>*', preplinks);
return false;
});
}
preplinks();
</script>
</metal:main>
</body>
</html>