scripts geographique .phtml
This commit is contained in:
parent
6989f98b89
commit
46c7f5a8ee
@ -1,23 +1,20 @@
|
|||||||
<div id="regions" class="jstree jstree-default" style="height:200px;overflow:auto;">
|
<div id="<?=$this->key?>" class="jstree jstree-default" style="overflow:auto;"></div>
|
||||||
<ul>
|
|
||||||
<?php foreach($this->regions as $region): ?>
|
|
||||||
<li id="region<?=$region['code']?>">
|
|
||||||
<ins class="jstree-icon"> </ins>
|
|
||||||
<a class="" href="#"><ins class="jstree-icon"> </ins><?=$region['libelle']?></a>
|
|
||||||
</li>
|
|
||||||
<?php endforeach;?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<?=$this->inlineScript()?>
|
|
||||||
<script>
|
<script>
|
||||||
$("#regions").jstree({
|
$("#<?=$this->key?>").jstree({
|
||||||
"themes" : {
|
"themes" : {
|
||||||
"theme" : "default",
|
"theme" : "default",
|
||||||
|
"url" : "/themes/jstree/default/style.css",
|
||||||
"dots" : true,
|
"dots" : true,
|
||||||
"icons" : false,
|
"icons" : false,
|
||||||
},
|
},
|
||||||
"plugins" : ["themes", "html_data", "ui", "checkbox"]
|
"plugins" : ["themes", "json_data", "checkbox"],
|
||||||
|
"json_data" : {
|
||||||
|
"data" : <?=$this->regions?>,
|
||||||
|
"ajax" : {
|
||||||
|
"url" : '<?=$this->url(array('controller'=>'arborescence', 'action'=>'geographiqueajax', 'key'=> $this->key))?>',
|
||||||
|
"data" : function(n) { return { id: n.attr ? n.attr("id") : '' , niveau : n.attr ? n.attr("niveau") : 1 }; },
|
||||||
|
"cache" : true,
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue
Block a user