Modification du CSS + création d'un div de protection d'envoi de multi requete a sphinx.

+ modification des critéres
This commit is contained in:
Damien LASSERRE 2011-12-19 09:44:31 +00:00
parent 78ae585306
commit 6a34fa7c35
7 changed files with 82 additions and 38 deletions

View File

@ -14,7 +14,6 @@ class CriteresController extends Zend_Controller_Action
public function entrepriseAction()
{
//$this->_helper->layout()->disableLayout();
$champs = array(array('name' => 'siege', 'libelle' => 'Siège', 'type' => 'select', 'parametres' => array('Etablissement' => '0', 'Siege' => '1')),
array('name' => 'sirenGrp', 'libelle' => 'Siren de groupe', 'type' => 'select', 'parametres' => array('Oui' => '1', 'Non' => '0')),
array('name' => 'tel', 'libelle' => 'Téléphone', 'type' => 'select', 'parametres' => array('Oui' => 1, 'Non' => '0')),
@ -46,7 +45,7 @@ class CriteresController extends Zend_Controller_Action
array('name' => 'NaceEtab', 'libelle' => 'Code NACE de l\'établissement', 'type' => 'text'),
array('name' => 'ou'),
array('name' => 'NaceEtab', 'libelle' => 'Liste Code NACE de l\'établissement', 'type' => 'textarea'),
array('name' => 'NaceEtab', 'libelle' => 'Code NACE de l\'établissement', 'type' => 'text'),
array('name' => 'NaceEntrep', 'libelle' => 'Code NACE de l\'entreprise', 'type' => 'text'),
array('name' => 'ou'),
array('name' => 'NaceEntrep', 'libelle' => 'Liste Code NACE de l\'entreprise', 'type' => 'textarea'),
array('name' => 'age_etab', 'libelle' => 'Code AGE Etablissement', 'type' => 'text'),
@ -110,10 +109,6 @@ class CriteresController extends Zend_Controller_Action
array('name' => 'adr_com', 'libelle' => 'Liste Code commune Insee', 'type' => 'textarea'),
);
$this->view->champs = $champs;
/*$regionsM = new Application_Model_Regions();
//$sql = $regionsM->select();
$this->view->assign('regions', $regionsM->fetchAll()->toArray());*/
}
public function juridiqueAction()

View File

@ -1,6 +1,12 @@
<?php
class IndexController extends Zend_Controller_Action
{
protected $entreprise = array('siege', 'sirenGrp', 'tel', 'fax', 'web', 'mail', 'presentRcs', 'adrDom', 'dirNom', 'lieuAct', 'nbMPubli', 'dateCrea_ent', 'dateCrea_etab', 'nbAction', 'nbPart');
protected $economique = array('ape_etab', 'ape_entrep', 'NaceEtab', 'NaceEntrep', 'age_etab', 'age_entrep', 'teff_entrep', 'teff_etab', 'nbEtab', 'eff_entrep', 'eff_etab', 'capital');
protected $geographique = array('adr_cp', 'adr_dep', 'adr_com');
protected $juridique = array('cj', 'actifEco', 'procolHisto', 'tvaIntraValide', 'dateImmat');
protected $financier = array('bilType', 'avisCs', 'bilDuree', 'bilTca', 'bilAnnee', 'bilCloture', 'bilEE', 'bilFL', 'bilFK', 'bilFR', 'bilGF', 'bilGP', 'bilGU', 'bilGW', 'bilHD', 'bilHH', 'bilHL', 'bilHM', 'bilHN', 'bilYP');
public function indexAction()
{
$session = new Zend_Session_Namespace('ciblage');
@ -25,12 +31,45 @@ class IndexController extends Zend_Controller_Action
public function criteresAction()
{
$entreprise = array();
$economique = array();
$geographique = array();
$financier = array();
$juridique = array();
require_once 'Scores/SessionCiblage.php';
$session = new Zend_Session_Namespace('ciblage');
$nbCriteres = count($session->ciblage);
$this->view->count = (($nbCriteres == 0)?0:($nbCriteres - 2));
$this->view->entreprise = $session->ciblage;
foreach($session->ciblage as $item => $valeur) {
if (in_array($item, $this->entreprise))
$entreprise[$item] = $valeur;
else if (in_array($item, $this->economique))
$economique[$item] = $valeur;
else if (in_array($item, $this->geographique))
$geographique[$item] = $valeur;
else if (in_array($item, $this->financier))
$financier[$item] = $valeur;
else if (in_array($item, $this->juridique))
$juridique[$item] = $valeur;
}
$nbCriteres = count($entreprise);
$Count['entreprise'] = $nbCriteres;
$nbCriteres = count($geographique);
$Count['geographique'] = $nbCriteres;
$nbCriteres = count($juridique);
$Count['juridique'] = $nbCriteres;
$nbCriteres = count($financier);
$Count['financier'] = $nbCriteres;
$nbCriteres = count($economique);
$Count['economique'] = $nbCriteres;
$this->view->Count = $Count;
$this->view->entreprise = $entreprise;
$this->view->geographique = $geographique;
$this->view->economique = $economique;
$this->view->juridique = $juridique;
$this->view->financier = $financier;
}
}

View File

@ -1,26 +1,17 @@
<h3><a href="#">Entreprise - <span style="font-size:10px">Nombre de critéres : <?php echo $this->count; ?></span></a></h3>
<?php
$elements = array('entreprise' => 'Entreprise',
'economique' => 'Situation economique',
'geographique' => 'Secteur géographique',
'juridique' => 'Situation juridique',
'financier' => 'Situation financiére');
?>
<?php foreach($elements as $variable => $name): ?>
<h3><a href="#"><?php echo $name; ?><span style="font-size:10px">Nombre de critéres : <?php echo $this->Count[$variable]; ?></span></a></h3>
<div>
<?php foreach($this->entreprise as $item => $valeur): ?>
<?php if($item != 'total' and $item != 'insee'):?>
<?php foreach($this->$variable as $item => $valeur): ?>
<span>
<?php echo '<b>'.$item.' :</b> '.(($valeur=='0' or $valeur == '1')?(($valeur=='0')?'Non':'Oui'):str_replace(',', ' à ', ((is_array($valeur))?implode(' à ', $valeur):$valeur))); ?>
<span/><br />
<?php endif; ?>
</span><br />
<?php endforeach; ?>
</div>
<h3><a href="#">Situation economique</a></h3>
<div>
<p></p>
</div>
<h3><a href="#">Secteur géographique</a></h3>
<div>
<p></p>
</div>
<h3><a href="#">Situation juridique</a></h3>
<div>
<p></p>
</div>
<h3><a href="#">Situation financiére</a></h3>
<div>
<p></p>
</div>
<?php endforeach;?>

View File

@ -16,13 +16,13 @@
<div id="accordion">
<h3><a href="">Résultats</a></h3>
<div style="padding:0px;height:100px;">
<div id="comptage" style="margin-bottom:40px;">
<div class="comptage" style="margin-bottom:40px;">
Nombre sélectionnées :
<span style="font-weight:800;" id="count"><?php echo ((!empty($this->total))?$this->total:'-');?></span>
<br/>
(dont <span style="font-weight:800;" id="insee"><?php echo ((!empty($this->insee))?$this->insee:'-');?></span> unité(s) insee)
</div>
<div id="attente" style="text-align:center;display:none;">
<div class="attente" style="text-align:center;display:none;">
<img width="15%" src="/themes/default/images/ajax.gif" /><br />
Chargement...
</div>

View File

@ -14,6 +14,7 @@
</div>
<div id="content" class="clearfix">
<?php echo $this->layout()->content; ?>
<div class="attente" style="display:none" id="wrapper"><img width="10%" src="/themes/default/images/ajax.gif" /></div>
</div>
<div id="footer">
<?php echo $this->render('footer.phtml'); ?>

View File

@ -70,13 +70,13 @@ $(document).ready(function(){
function set(key, value)
{
$('#comptage').css('display', 'none');
$('#attente').css('display', 'block');
$('.comptage').css('display', 'none');
$('.attente').css('display', 'block');
$.post('/comptage', { cle:key, valeur:value}, function(data, status) {
$('#count').html(data.count);
$('#insee').html(data.insee);
$('#attente').css('display', 'none');
$('#comptage').css('display', 'block');
$('.attente').css('display', 'none');
$('.comptage').css('display', 'block');
}, 'json')
.error(function(){ alert('error'); });
}

View File

@ -126,6 +126,24 @@ ul, ul li {
#content {
margin:0;
position:relative;
}
#wrapper
{
margin-top:34px;
margin-left:3px;
text-align:center;
background:black;
position:absolute;
top:0;
height:91%;
width:71%;
opacity: 0.5;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter:alpha(opacity=50);
}
#wrapper img {
margin-top:20%;
}
#content h1 {font-size:16px; text-decoration:underline;}
@ -161,13 +179,13 @@ h3 {
}
.ui-tabs .ui-tabs-nav {
font-size: 0.8em;
font-size: 1em;
}
#tabs {
float:left;
margin: 2px;
width:700px;
width:706px;
}
#result {