2012-03-28 15:54:49 +00:00
|
|
|
<style>
|
|
|
|
.jstree-default a.jstree-search { color: red; }
|
|
|
|
</style>
|
|
|
|
<div>
|
2012-12-03 14:19:39 +00:00
|
|
|
<?php if ( $this->edition ) {?>
|
|
|
|
<span style="margin:0 5px;"><input type="radio" name="pctMin" value="0"<?php
|
|
|
|
if ($this->pctMin == 0) echo ' checked';?>> Tout</span>
|
|
|
|
<?php }?>
|
|
|
|
<span style="margin:0 5px;"><input type="radio" name="pctMin" value="33"<?php
|
|
|
|
if ($this->pctMin == 33) echo ' checked';?>> 33%</span>
|
|
|
|
<span style="margin:0 5px;"><input type="radio" name="pctMin" value="40"<?php
|
|
|
|
if ($this->pctMin == 40) echo ' checked';?>> 40%</span>
|
|
|
|
<span style="margin:0 5px;"><input type="radio" name="pctMin" value="50"<?php
|
|
|
|
if ($this->pctMin == 50) echo ' checked';?>> 50%</span>
|
2012-03-28 15:54:49 +00:00
|
|
|
<input id="text" type="text" value="">
|
|
|
|
<input id="search" type="button" value="Recherche">
|
|
|
|
<input id="clear_search" type="button" value="Initialiser">
|
|
|
|
</div>
|
|
|
|
<div id="groups" class="jstree jstree-default" style="overflow:auto;"></div>
|
2012-11-19 12:00:06 +00:00
|
|
|
<script src="/libs/jstree/jstree.min.js"></script>
|
2012-03-28 15:54:49 +00:00
|
|
|
<script>
|
2012-12-03 14:19:39 +00:00
|
|
|
$('input[name=pctMin]').on('click', function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
var pct = $(this).val();
|
|
|
|
$('div#dialogarbo').load('<?=$this->url(array('controller'=>'identite','action'=>'groupesarbo','siret'=>$this->siret),null,true)?>/pctMin/'+pct);
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2012-11-19 12:00:06 +00:00
|
|
|
$("#groups").jstree({
|
2012-11-23 16:31:57 +00:00
|
|
|
"core" : { "html_titles" : true },
|
2012-03-28 15:54:49 +00:00
|
|
|
"plugins" : ["themes", "json_data", "search"],
|
2012-11-23 16:31:57 +00:00
|
|
|
"json_data" : { "data" : [<?=$this->data?>] },
|
|
|
|
"search" : { "show_only_matches" : true },
|
2012-03-28 15:54:49 +00:00
|
|
|
"themes" : {
|
|
|
|
"theme" : "default",
|
|
|
|
"url" : "/libs/jstree/themes/default/style.css",
|
|
|
|
"dots" : true,
|
2012-11-23 16:31:57 +00:00
|
|
|
"icons" : false
|
2012-11-19 12:00:06 +00:00
|
|
|
}
|
2012-03-28 15:54:49 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#clear_search').on('click', function() {
|
|
|
|
$("#text").val('');
|
2012-11-19 12:00:06 +00:00
|
|
|
$("#groups").jstree("clear_search");
|
2012-03-28 15:54:49 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#search').on('click', function(){
|
2012-11-19 12:00:06 +00:00
|
|
|
$("#groups").jstree("search", $("#text").val());
|
2012-03-28 15:54:49 +00:00
|
|
|
});
|
|
|
|
</script>
|