equal
deleted
inserted
replaced
69 { |
69 { |
70 // WARNING : PREREQUISITE : the request to add a tag needs the external document id, |
70 // WARNING : PREREQUISITE : the request to add a tag needs the external document id, |
71 // which is gotten by the jQuery call $('#wikitag_document_id').val() in the page. |
71 // which is gotten by the jQuery call $('#wikitag_document_id').val() in the page. |
72 // So the page holding this context search MUST have a input value with this id. |
72 // So the page holding this context search MUST have a input value with this id. |
73 // We add the reactive selectors |
73 // We add the reactive selectors |
74 $reactive_selectors = $this->container->getParameter("wiki_tag.reactive_selectors"); |
74 $reac_sel_array = $this->container->getParameter("wiki_tag.reactive_selectors"); |
|
75 $reactive_selectors = null; |
|
76 if(array_key_exists($context_name, $reac_sel_array)){ |
|
77 if($reac_sel_array[$context_name][0]=='document'){ |
|
78 $reactive_selectors = 'document'; |
|
79 } |
|
80 else{ |
|
81 $reactive_selectors = '"'.join('","',$reac_sel_array[$context_name]).'"'; |
|
82 } |
|
83 } |
75 return $this->render('WikiTagBundle:WikiTag:javascriptForContextSearch.html.twig', array('reactive_selectors' => $reactive_selectors)); |
84 return $this->render('WikiTagBundle:WikiTag:javascriptForContextSearch.html.twig', array('reactive_selectors' => $reactive_selectors)); |
76 } |
85 } |
77 |
86 |
78 /** |
87 /** |
79 * Display a list of ordered tag for a document |
88 * Display a list of ordered tag for a document |