Diverses corrections

This commit is contained in:
Michael RICOIS 2012-05-14 07:49:58 +00:00
parent 41f9ce83e3
commit a4ac98b4e6
7 changed files with 43 additions and 38 deletions

View File

@ -1,16 +1,16 @@
<div id="<?=$this->key?>" class="jstree jstree-default" style="overflow:auto;"></div>
<div id="<?=$this->key?>_dialog" class="jstree jstree-default" style="overflow:auto;"></div>
<script>
$("#<?=$this->key?>").jstree({
$("#<?=$this->key?>_dialog").jstree({
"themes" : {
"theme" : "default",
"url" : "/themes/jstree/classic/style.css",
"dots" : true,
"icons" : false,
"icons" : false,
},
"plugins" : ["themes", "json_data", "checkbox"],
"json_data" : {
"data" : <?=$this->regions?>,
"ajax" : {
"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,

View File

@ -1,20 +1,20 @@
<div id="<?=$this->key?>" class="jstree jstree-default" style="overflow:auto;"></div>
<div id="<?=$this->key?>_dialog" class="jstree jstree-default" style="overflow:auto;"></div>
<script>
$("#<?=$this->key?>").jstree({
$("#<?=$this->key?>_dialog").jstree({
"themes" : {
"theme" : "default",
"url" : "/style.css",
"url" : "/themes/jstree/classic/style.css",
"dots" : true,
"icons" : false,
"icons" : false,
},
"plugins" : ["themes", "json_data", "checkbox"],
"json_data" : {
"data" : <?=$this->formejuridiques?>,
"ajax" : {
"json_data" : {
"data" : <?=$this->formejuridiques?>,
"ajax" : {
"url" : '<?=$this->url(array('controller'=>'arborescence', 'action'=>'juridiqueajax', 'key'=> $this->key))?>',
"data" : function(n)
{
return { id: n.attr ? n.attr("id") : 0 };
"data" : function(n)
{
return { id: n.attr ? n.attr("id") : 0 };
},
"cache" : true,
}

View File

@ -1,16 +1,16 @@
<div id="<?=$this->key?>" class="jstree jstree-default" style="overflow:auto;"></div>
<div id="<?=$this->key?>_dialog" class="jstree jstree-default" style="overflow:auto;"></div>
<script>
$("#<?=$this->key?>").jstree({
$("#<?=$this->key?>_dialog").jstree({
"themes" : {
"theme" : "default",
"url" : "/jstree/style.css",
"url" : "/themes/jstree/classic/style.css",
"dots" : true,
"icons" : false,
"icons" : false,
},
"plugins" : ["themes", "json_data", "checkbox"],
"json_data" : {
"data" : <?=$this->naf?>,
"ajax" : {
"json_data" : {
"data" : <?=$this->naf?>,
"ajax" : {
"url" : '<?=$this->url(array('controller'=>'arborescence', 'action'=>'nafajax', 'key'=> $this->key))?>',
"data" : function(n) { return { parent: n.attr ? n.attr("id") : '' , niveau : n.attr ? n.attr("niveau") : 1 }; },
"cache" : true,

View File

@ -4,9 +4,8 @@ class Object_Codepostaux
/* Selection des classes statut pour jstree */
public function _jstree_checked($type)
{
require_once('Scores/SessionCiblage.php');
$session = new SessionCiblage();
$valeurs = $session->getCritere($type);
$fields = new Scores_Fields();
$valeurs = $fields->getCritere($type);
return (substr($valeurs, 0, strlen($valeurs)-1));
}
@ -45,11 +44,10 @@ class Object_Codepostaux
public function _getClass($valeur, $niveau)
{
require_once('Scores/SessionCiblage.php');
$session = new SessionCiblage();
$valeurs = explode(',', $valeur);
$key = ((strlen($valeur) < 5)?'adr_dept':'adr_com');
$session = explode(',', $session->getCritere('adr_dept'));
$fields = new Scores_Fields();
$session = explode(',', $fields->getCritere('adr_dept'));
$row = 0;
foreach ($session as $dept) {
if(in_array($dept, $valeurs))

View File

@ -3,9 +3,8 @@ class Object_Formejuridique
{
protected function _jstree_checked()
{
require_once('Scores/SessionCiblage.php');
$session = new SessionCiblage();
$valeurs = explode(',', $session->getCritere('cj'));
$fields = new Scores_Fields();
$valeurs = explode(',', $fields->getCritere('cj'));
foreach($valeurs as $valeur) {
if($valeur != '')

View File

@ -3,9 +3,9 @@ class Object_Naf
{
public function naf($niveau, $key)
{
require_once 'Scores/SessionCiblage.php';
$sessionCiblage = new SessionCiblage();
$val = $sessionCiblage->getCritere($key);
$fields = new Scores_Fields();
$val = $fields->getCritere($key);
$valuesChecked = array();
$valuesUndetermined = array();
@ -60,9 +60,8 @@ class Object_Naf
public function ajax($parent, $niveau, $key)
{
//Récupération des valeurs enregistrées en session
require_once 'Scores/SessionCiblage.php';
$sessionCiblage = new SessionCiblage();
$val = $sessionCiblage->getCritere($key);
$fields = new Scores_Fields();
$val = $fields->getCritere($key);
$valuesChecked = array();
$valuesUndetermined = array();

View File

@ -50,6 +50,15 @@ $(document).ready(function()
set($(this).attr('name'), $(this).val());
});
$('#tabs').delegate('a.selectMultiple', 'click', function(e){
});
$('#tabs').delegate('a.selectMultipleEx', 'click', function(e){
});
$('#tabs').delegate('a.autocomplet', 'click', function(e){
e.preventDefault();
var key = $(this).attr('textarea');