# HG changeset patch # User cavaliet # Date 1321356422 -3600 # Node ID f457dd0e7a1e21f687f7e28f1cd357f1a2d52786 # Parent 1abde4d1040269a0d6f524803dc986d492dc9c03 First step to add context search to a page. Works fine but needs to be improved with several list of selectors. diff -r 1abde4d10402 -r f457dd0e7a1e .hgsubstate --- a/.hgsubstate Wed Nov 09 16:28:46 2011 +0100 +++ b/.hgsubstate Tue Nov 15 12:27:02 2011 +0100 @@ -1,1 +1,1 @@ -d2fba1e3b94b958bf762c43dc0bcd8184437675a vendor/bundles/IRI/Bundle/WikiTagBundle +6c87166b819cb05e9969e532dfb8e4c8b52be0cc vendor/bundles/IRI/Bundle/WikiTagBundle diff -r 1abde4d10402 -r f457dd0e7a1e app/config/config.yml --- a/app/config/config.yml Wed Nov 09 16:28:46 2011 +0100 +++ b/app/config/config.yml Tue Nov 15 12:27:02 2011 +0100 @@ -76,4 +76,10 @@ description: 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' diff -r 1abde4d10402 -r f457dd0e7a1e src/Company/BaseBundle/Resources/views/Index/tag_embedder.html.twig --- a/src/Company/BaseBundle/Resources/views/Index/tag_embedder.html.twig Wed Nov 09 16:28:46 2011 +0100 +++ b/src/Company/BaseBundle/Resources/views/Index/tag_embedder.html.twig Tue Nov 15 12:27:02 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 @@
HERE ARE THE INFORMATIONS ABOUT A DOCUMENT
doc id
{{doc.id}}
Titre
{{doc.title}}
Description
{{doc.description}}
Titre
{{doc.title}}
Description
{{doc.description}}