thesaurus view: adapt links so they stary within the overlay

This commit is contained in:
Frédéric Péters 2013-04-13 14:21:43 +02:00
parent a300313f0d
commit fadfd7593e
1 changed files with 13 additions and 1 deletions

View File

@ -23,7 +23,7 @@
<div tal:content="structure widget/render" /> <div tal:content="structure widget/render" />
</div> </div>
<script type="text/javascript"> <script type="text/javascript" tal:condition="python: 'ajax_load' not in request.form.keys()">
function autocomplete_ready(event, data, formatted) { function autocomplete_ready(event, data, formatted) {
window.location=window.location+'/'+data[1]; window.location=window.location+'/'+data[1];
} }
@ -34,6 +34,18 @@ $(document).ready(function() {
}); });
</script> </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') + ' #content>*', preplinks);
return false;
});
}
preplinks();
</script>
</metal:main> </metal:main>
</body> </body>