--- a/app/config/config.yml Thu Nov 17 11:38:06 2011 +0100
+++ b/app/config/config.yml Thu Nov 17 11:41:40 2011 +0100
@@ -77,6 +77,14 @@
type: text
weight: 0.5
+ # reactive_selectors is a list of jQuery selectors meant to let appear tag context search by selecting text.
+ # Example of list : '".any_class", "#any_div .p_class", "#another_selector"'. Write 'document' if you want the whole document/page to be reactive.
+ # Do not define reactive_selectors if you want nothing to be reactive.
+ #reactive_selectors: '".left_sheet", "#p_title .sheet_title", "#p_description"'
+ reactive_selectors: '"#p_title .sheet_title", "#p_description"'
+ #reactive_selectors: 'document'
+
+
services:
wiki_tag.tag_test_listener:
class: Company\BaseBundle\Event\TestListener
--- a/src/Company/BaseBundle/Resources/views/Index/tag_embedder.html.twig Thu Nov 17 11:38:06 2011 +0100
+++ b/src/Company/BaseBundle/Resources/views/Index/tag_embedder.html.twig Thu Nov 17 11:41:40 2011 +0100
@@ -9,6 +9,7 @@
{% block js_declaration %}
{{ parent() }}
{% render "WikiTagBundle:WikiTag:addJavascript" %}
+{% render "WikiTagBundle:WikiTag:addJavascriptForContextSearch" with {'context_name': "my_context"} %}
{% endblock %}
{% block content %}
@@ -18,8 +19,8 @@
<div class="left_sheet">
<p><b>HERE ARE THE INFORMATIONS ABOUT A DOCUMENT</b><br/></p>
<p><b>doc id</b><br/>{{doc.id}}</p>
- <p><b>Titre</b><br><span class="sheet_title">{{doc.title}}</span></p>
- <p><b>Description</b><br/>{{doc.description}}</p>
+ <p id="p_title"><b>Titre</b><br><span class="sheet_title">{{doc.title}}</span></p>
+ <p id="p_description"><b>Description</b><br/>{{doc.description}}</p>
</div>
<div class="right_sheet">
<p style="float:right;"><a href="{{ url('document_with_tags', { 'idDoc': (doc.id-1) }) }}"> < </a> - <a href="{{ url('document_with_tags', { 'idDoc': (doc.id+1) }) }}"> > </a></p>