Mise à jour field RANGE
This commit is contained in:
parent
c8afc3902a
commit
4c1e01ef15
@ -9,13 +9,15 @@ class FieldsController extends Zend_Controller_Action
|
||||
$this->view->headLink()
|
||||
->appendStylesheet('/themes/default/styles/bootstrap.tabs.css')
|
||||
->appendStylesheet('/libs/tree-3.0.9/themes/default/style.css', 'all')
|
||||
->appendStylesheet('/libs/slider/css/bootstrap-slider.min.css', 'all')
|
||||
//->appendStylesheet('/libs/slider/css/bootstrap-slider.min.css', 'all')
|
||||
->appendStylesheet('/libs/nouislider/jquery.nouislider.min.css', 'all')
|
||||
->appendStylesheet('/libs/daterangepicker/daterangepicker-bs3.css', 'all');
|
||||
|
||||
$this->view->headScript()
|
||||
->appendFile('/libs/moment.min.js', 'text/javascript')
|
||||
->appendFile('/libs/tree-3.0.9/jstree.min.js', 'text/javascript')
|
||||
->appendFile('/libs/slider/bootstrap-slider.min.js')
|
||||
//->appendFile('/libs/slider/bootstrap-slider.min.js')
|
||||
->appendFile('/libs/nouislider/jquery.nouislider.all.min.js')
|
||||
->appendFile('/libs/daterangepicker/daterangepicker.js')
|
||||
->appendFile('/themes/default/scripts/scripts.js', 'text/javascript')
|
||||
->appendFile('/themes/default/scripts/fields.js', 'text/javascript');
|
||||
|
@ -1 +1,5 @@
|
||||
<?php
|
||||
<div class="container">
|
||||
|
||||
<p>ODEA vous permet d'extraire des informations sur toutes les entreprises françaises actives.</p>
|
||||
|
||||
</div>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<div class="container col-lg-12">
|
||||
<div class="container">
|
||||
<div id="actionMessage"></div>
|
||||
<div class="row">
|
||||
<div id="tabs" class="col-sm-8 col-md-8 col-lg-8">
|
||||
|
@ -3,96 +3,187 @@ class Scores_Ciblage_Field_Range
|
||||
{
|
||||
protected $name = null;
|
||||
protected $data = null;
|
||||
|
||||
protected $format = false;
|
||||
|
||||
protected $valueStep = 1;
|
||||
protected $valueMin = 0;
|
||||
protected $valueMax = 0;
|
||||
|
||||
protected $displayMin = '';
|
||||
protected $displayMax = '';
|
||||
|
||||
protected $selectedMin = '';
|
||||
protected $selectedMax = '';
|
||||
|
||||
protected $divider = 1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $data
|
||||
*/
|
||||
public function __construct($name, $data)
|
||||
public function __construct($name, $data, $format = false)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->data = $data;
|
||||
$this->format = $format;
|
||||
|
||||
$this->formatValue();
|
||||
}
|
||||
|
||||
protected function formatValue()
|
||||
{
|
||||
// --- Default
|
||||
$this->valueMin = $this->data['min'];
|
||||
$this->displayMin = number_format($this->valueMin, 0, ',', ' ');
|
||||
$this->valueMax = $this->data['max'];
|
||||
$this->displayMax = number_format($this->valueMax, 0, ',', ' ');
|
||||
|
||||
// --- Formattage activé
|
||||
if ( $this->format === true ) {
|
||||
$divider = 1000;
|
||||
$units = array(' k', ' M', ' G');
|
||||
|
||||
// --- Calcul borne min
|
||||
for ($i = 0; abs($this->valueMin) > pow($divider, $i+1); $i++) {
|
||||
$this->valueMin /= $divider;
|
||||
}
|
||||
$nbMinDivider = $i;
|
||||
|
||||
// --- Set display value
|
||||
if ($nbMinDivider > 0) {
|
||||
$num = ($this->valueMin > 0) ? ceil($this->valueMin) : floor($this->valueMin);
|
||||
if ($nbMinDivider > 3 ) {
|
||||
$this->displayMin = $num * pow($divider, $nbMinDivider - count($units));
|
||||
$this->displayMin = number_format($this->displayMin, 0, ',', ' ').$units[count($units) - 1];
|
||||
} else if ($nbMinDivider < 4 && $nbMinDivider > 0) {
|
||||
if ( $nbMinDivider - 2 > 0 ) {
|
||||
$this->displayMin = $num * pow($divider, $nbMinDivider - 2);
|
||||
} else {
|
||||
$this->displayMin = $num;
|
||||
}
|
||||
$this->displayMin = number_format($this->displayMin, 0, ',', ' ').$units[$nbMinDivider - 1];
|
||||
} else {
|
||||
$this->displayMin = $num * pow($divider, $nbMinDivider);
|
||||
$this->displayMin = number_format($this->displayMin, 0, ',', ' ');
|
||||
}
|
||||
}
|
||||
|
||||
// --- Get back rounded real value
|
||||
$this->valueMin = ($this->valueMin > 0) ? ceil($this->valueMin) : floor($this->valueMin);
|
||||
for ($i = 0; $i < $nbMinDivider; $i++) {
|
||||
$this->valueMin = $this->valueMin * $divider;
|
||||
}
|
||||
|
||||
// --- Calcul borne max
|
||||
for ($i = 0; abs($this->valueMax) > pow($divider, $i+1); $i++) {
|
||||
$this->valueMax /= $divider;
|
||||
}
|
||||
$nbMaxDivider = $i;
|
||||
|
||||
// --- Set display value
|
||||
if ($nbMaxDivider > 0) {
|
||||
$num = ($this->valueMax > 0) ? ceil($this->valueMax) : floor($this->valueMax);
|
||||
if ($nbMaxDivider > 3 ) {
|
||||
$this->displayMax = $num * pow($divider, $nbMaxDivider - count($units));
|
||||
$this->displayMax = number_format($this->displayMax, 0, ',', ' ').$units[count($units) - 1];
|
||||
} else if ($nbMaxDivider < 4 && $nbMaxDivider > 0) {
|
||||
if ( $nbMaxDivider - 2 > 0 ) {
|
||||
$this->displayMax = $num * pow($divider, $nbMaxDivider - 2);
|
||||
} else {
|
||||
$this->displayMax = $num;
|
||||
}
|
||||
$this->displayMax = number_format($this->displayMax, 0, ',', ' ').$units[$nbMaxDivider - 1];
|
||||
} else {
|
||||
$this->displayMax = $num * pow($divider, $nbMaxDivider);
|
||||
$this->displayMax = number_format($this->displayMax, 0, ',', ' ');
|
||||
}
|
||||
}
|
||||
|
||||
// --- Get back rounded real value
|
||||
$this->valueMax = ($this->valueMax > 0) ? ceil($this->valueMax) : floor($this->valueMax);
|
||||
for ($i = 0; $i < $nbMaxDivider; $i++) {
|
||||
$this->valueMax = $this->valueMax * $divider;
|
||||
}
|
||||
|
||||
// --- Amélioration valeur du slider
|
||||
if ($nbMinDivider > 1 && $nbMaxDivider >= $nbMinDivider) {
|
||||
$this->divider = pow($divider, $nbMinDivider);
|
||||
//$this->valueMin /= $this->divider;
|
||||
//$this->valueMax /= $this->divider;
|
||||
//$this->valueStep = $this->divider;
|
||||
} elseif ($nbMaxDivider > 1 && $nbMinDivider > $nbMaxDivider) {
|
||||
$this->divider = pow($divider, $nbMaxDivider);
|
||||
//$this->valueMin /= $this->divider;
|
||||
//$this->valueMax /= $this->divider;
|
||||
//$this->valueStep = $this->divider;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getHTML($valueSelected = array(), $format = false)
|
||||
public function getHTML($valueSelected = array())
|
||||
{
|
||||
$html = '<div class="row ciblage-range">'.
|
||||
'<div class="col-md-10">';
|
||||
$html = '<div class="ciblage-range">';
|
||||
if ( count($this->data) > 0 ) {
|
||||
|
||||
$valueMin = $this->data['min'];
|
||||
$displayMin = number_format($valueMinabsmin, 0, ',', ' ');
|
||||
$valueMax = $this->data['max'];
|
||||
$displayMax = number_format($valueMax, 0, ',', ' ');
|
||||
$step = 1;
|
||||
|
||||
if ( $format === true ) {
|
||||
|
||||
$stepMax = $stepMin = 0;
|
||||
|
||||
// --- Calcul des bornes
|
||||
$divider = 1000;
|
||||
$units = array('K','M');
|
||||
$absmin = $this->data['min'];
|
||||
for ($i = 0; $absmin >= $divider && $i < count($units); $i++) {
|
||||
$absmin /= $divider;
|
||||
$unit = $units[$i];
|
||||
}
|
||||
$valueMin = ceil($absmin);
|
||||
for ($iBorne = 0; $iBorne < $i; $iBorne++) {
|
||||
$valueMin = $valueMax * $divider;
|
||||
}
|
||||
$displayMin = number_format(ceil($absmin), 0, ',', ' ').' '.$unit;
|
||||
$stepMin = $i;
|
||||
|
||||
$absmax = $this->data['max'];
|
||||
for ($i = 0; $absmax >= $divider && $i < count($units); $i++) {
|
||||
$absmax /= $divider;
|
||||
$unit = $units[$i];
|
||||
}
|
||||
$valueMax = ceil($absmax);
|
||||
for ($iBorne = 0; $iBorne < $i; $iBorne++) {
|
||||
$valueMax = $valueMax * $divider;
|
||||
}
|
||||
$displayMax = number_format(ceil($absmax), 0, ',', ' ').' '.$unit;
|
||||
$stepMax = $i;
|
||||
|
||||
// --- Calcul du pas
|
||||
if ($stepMax > 0) {
|
||||
$step = 1000;
|
||||
}
|
||||
}
|
||||
|
||||
// --- Valeurs selectionnés
|
||||
if ( $valueSelected === null || count($valueSelected['in'])==0 ) {
|
||||
$selectedMin = $valueMin;
|
||||
$selectedMax = $valueMax;
|
||||
$this->selectedMin = $this->valueMin;
|
||||
$this->selectedMax = $this->valueMax;
|
||||
} else {
|
||||
$selectedMin = $valueSelected['in'][0];
|
||||
$selectedMax = $valueSelected['in'][1];
|
||||
// @todo : transform value as unit
|
||||
$this->selectedMin = $valueSelected['in'][0];
|
||||
$this->selectedMax = $valueSelected['in'][1];
|
||||
}
|
||||
|
||||
$html.= '<b style="margin:0 15px">'.$displayMin.'</b>'.
|
||||
'<input id="slider-'.$this->name.'" type="text" class="span2" value=""
|
||||
data-slider-min="'.$valueMin.'"
|
||||
data-slider-max="'.$valueMax.'"
|
||||
data-slider-step="'.$step.'"
|
||||
data-slider-value="['.$selectedMin.','.$selectedMax.']"/>'.
|
||||
'<b style="margin:0 15px">'.$displayMax.'</b>';
|
||||
$html.= '<div id="slider-'.$this->name.'"></div>';
|
||||
|
||||
$html.= '<div class="row">';
|
||||
|
||||
$html.= '<div class="col-xs-3"><span class="slider-valmin">'.$this->displayMin.'</span></div>';
|
||||
|
||||
$html.= '<div class="col-xs-6 slider-select">';
|
||||
$html.= '<input style="width:100px;" id="slider-'.$this->name.'-selectmin" class="slider-selectmin"> : <input style="width:100px;" id="slider-'.$this->name.'-selectmax" class="slider-selectmax">';
|
||||
$html.= '</div>';
|
||||
|
||||
$html.= '<div class="col-xs-3"><span class="slider-valmax">'.$this->displayMax.'</span></div>';
|
||||
|
||||
$html.= '</div>';
|
||||
}
|
||||
$html.= '</div>'.
|
||||
'<div class="col-md-2">' .
|
||||
|
||||
$html.= '</div>';
|
||||
|
||||
$html.= '<div class="row">';
|
||||
$html.= '<div class="col-md-12">' .
|
||||
'<button class="btn btn-primary btn-xs pull-right" type="button" data-ciblagename="'.$this->name.'">Sélectionner</button>' .
|
||||
'</div>'.
|
||||
'</div>';
|
||||
|
||||
$html.= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function getJS()
|
||||
{
|
||||
return '$("#slider-'.$this->name.'").slider({});';
|
||||
$js = "$('#slider-".$this->name."').noUiSlider({
|
||||
start: [ ".$this->selectedMin.", ".$this->selectedMax." ],
|
||||
range: {
|
||||
'min': [ ".$this->valueMin." ],
|
||||
'max': [ ".$this->valueMax." ],
|
||||
},
|
||||
step: ".$this->valueStep.",
|
||||
orientation: 'horizontal',
|
||||
behaviour: 'drag',
|
||||
connect: true,
|
||||
format: wNumb({
|
||||
decimals: 0,
|
||||
}),
|
||||
});
|
||||
$('#slider-".$this->name."').Link('lower').to($('#slider-".$this->name."-selectmin'));
|
||||
$('#slider-".$this->name."').Link('upper').to($('#slider-".$this->name."-selectmax'));
|
||||
";
|
||||
|
||||
return $js;
|
||||
}
|
||||
|
||||
}
|
148
library/Scores/Ciblage/Field/RangeInput.php
Normal file
148
library/Scores/Ciblage/Field/RangeInput.php
Normal file
@ -0,0 +1,148 @@
|
||||
<?php
|
||||
class Scores_Ciblage_Field_RangeInput
|
||||
{
|
||||
protected $name = null;
|
||||
protected $data = null;
|
||||
protected $format = false;
|
||||
|
||||
protected $valueMin = 0;
|
||||
protected $valueMax = 0;
|
||||
|
||||
protected $displayMin = '';
|
||||
protected $displayMax = '';
|
||||
|
||||
protected $selectedMin = '';
|
||||
protected $selectedMax = '';
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $data
|
||||
*/
|
||||
public function __construct($name, $data, $format = false)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->data = $data;
|
||||
$this->format = $format;
|
||||
|
||||
$this->formatValue();
|
||||
}
|
||||
|
||||
protected function formatValue()
|
||||
{
|
||||
// --- Default
|
||||
$this->valueMin = $this->data['min'];
|
||||
$this->displayMin = number_format($this->valueMin, 0, ',', ' ');
|
||||
$this->valueMax = $this->data['max'];
|
||||
$this->displayMax = number_format($this->valueMax, 0, ',', ' ');
|
||||
|
||||
// --- Formattage activé
|
||||
if ( $this->format === true ) {
|
||||
$divider = 1000;
|
||||
$units = array(' k', ' M', ' G');
|
||||
|
||||
// --- Calcul borne min
|
||||
for ($i = 0; abs($this->valueMin) > pow($divider, $i+1); $i++) {
|
||||
$this->valueMin /= $divider;
|
||||
}
|
||||
$nbMinDivider = $i;
|
||||
|
||||
// --- Set display value
|
||||
if ($nbMinDivider > 0) {
|
||||
$num = ($this->valueMin > 0) ? ceil($this->valueMin) : floor($this->valueMin);
|
||||
if ($nbMinDivider > 3 ) {
|
||||
$this->displayMin = $num * pow($divider, $nbMinDivider - count($units));
|
||||
$this->displayMin = number_format($this->displayMin, 0, ',', ' ').$units[count($units) - 1];
|
||||
} else if ($nbMinDivider < 4 && $nbMinDivider > 0) {
|
||||
if ( $nbMinDivider - 2 > 0 ) {
|
||||
$this->displayMin = $num * pow($divider, $nbMinDivider - 2);
|
||||
} else {
|
||||
$this->displayMin = $num;
|
||||
}
|
||||
$this->displayMin = number_format($this->displayMin, 0, ',', ' ').$units[$nbMinDivider - 1];
|
||||
} else {
|
||||
$this->displayMin = $num * pow($divider, $nbMinDivider);
|
||||
$this->displayMin = number_format($this->displayMin, 0, ',', ' ');
|
||||
}
|
||||
}
|
||||
|
||||
// --- Get back rounded real value
|
||||
$this->valueMin = ($this->valueMin > 0) ? ceil($this->valueMin) : floor($this->valueMin);
|
||||
for ($i = 0; $i < $nbMinDivider; $i++) {
|
||||
$this->valueMin = $this->valueMin * $divider;
|
||||
}
|
||||
|
||||
// --- Calcul borne max
|
||||
for ($i = 0; abs($this->valueMax) > pow($divider, $i+1); $i++) {
|
||||
$this->valueMax /= $divider;
|
||||
}
|
||||
$nbMaxDivider = $i;
|
||||
|
||||
// --- Set display value
|
||||
if ($nbMaxDivider > 0) {
|
||||
$num = ($this->valueMax > 0) ? ceil($this->valueMax) : floor($this->valueMax);
|
||||
if ($nbMaxDivider > 3 ) {
|
||||
$this->displayMax = $num * pow($divider, $nbMaxDivider - count($units));
|
||||
$this->displayMax = number_format($this->displayMax, 0, ',', ' ').$units[count($units) - 1];
|
||||
} else if ($nbMaxDivider < 4 && $nbMaxDivider > 0) {
|
||||
if ( $nbMaxDivider - 2 > 0 ) {
|
||||
$this->displayMax = $num * pow($divider, $nbMaxDivider - 2);
|
||||
} else {
|
||||
$this->displayMax = $num;
|
||||
}
|
||||
$this->displayMax = number_format($this->displayMax, 0, ',', ' ').$units[$nbMaxDivider - 1];
|
||||
} else {
|
||||
$this->displayMax = $num * pow($divider, $nbMaxDivider);
|
||||
$this->displayMax = number_format($this->displayMax, 0, ',', ' ');
|
||||
}
|
||||
}
|
||||
|
||||
// --- Get back rounded real value
|
||||
$this->valueMax = ($this->valueMax > 0) ? ceil($this->valueMax) : floor($this->valueMax);
|
||||
for ($i = 0; $i < $nbMaxDivider; $i++) {
|
||||
$this->valueMax = $this->valueMax * $divider;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getHTML($valueSelected = array())
|
||||
{
|
||||
$html = '<div class="ciblage-rangeinput">';
|
||||
if ( count($this->data) > 0 ) {
|
||||
// --- Valeurs selectionnés
|
||||
if ( $valueSelected === null || count($valueSelected['in'])==0 ) {
|
||||
$this->selectedMin = $this->valueMin;
|
||||
$this->selectedMax = $this->valueMax;
|
||||
} else {
|
||||
$this->selectedMin = $valueSelected['in'][0];
|
||||
$this->selectedMax = $valueSelected['in'][1];
|
||||
}
|
||||
|
||||
$html.= '<div id="rangeinput-'.$this->name.'"></div>';
|
||||
|
||||
$html.= '<div class="row">';
|
||||
$html.= '<div class="col-xs-4"><span class="rangeinput-valmin">'.$this->displayMin.'</span></div>';
|
||||
$html.= '<div class="col-xs-4"><span class="rangeinput-valmax">'.$this->displayMax.'</span></div>';
|
||||
$html.= '<div class="col-xs-4"></div>';
|
||||
$html.= '</div>';
|
||||
|
||||
$html.= '<div class="row">';
|
||||
$html.= '<div class="col-xs-4">';
|
||||
$html.= '<input id="rangeinput-'.$this->name.'-selectmin" class="rangeinput-selectmin" value="'.$this->selectedMin.'">';
|
||||
$html.= '</div>';
|
||||
|
||||
$html.= '<div class="col-xs-4">';
|
||||
$html.= '<input id="rangeinput-'.$this->name.'-selectmax" class="rangeinput-selectmax" value="'.$this->selectedMax.'">';
|
||||
$html.= '</div>';
|
||||
|
||||
$html.= '<div class="col-xs-4"><button class="btn btn-primary btn-xs pull-right" type="button" data-ciblagename="'.$this->name.'">Sélectionner</button></div>';
|
||||
|
||||
$html.= '</div>';
|
||||
}
|
||||
$html.= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
@ -256,7 +256,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Capital de l'entreprise",
|
||||
'desc' => "Limiter la sélection aux entreprises disposant d'un capital donné",
|
||||
'family' => 'economique',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -528,7 +528,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Total bilan (EE)",
|
||||
'desc' => "Limitation aux entreprises dont le poste EE (Montant du poste Total Bilan en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -536,7 +536,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "CA total (FL)",
|
||||
'desc' => "Limitation aux entreprises dont le poste FL (Montant du Chiffre d'Affaires en Euros) est connu (Chiffres Réels et Estimés)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -544,7 +544,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Chiffre d'affaires Export (FK)",
|
||||
'desc' => "Limitation aux entreprises dont le poste FK (Montant du Chiffre d'Affaires Export en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -552,7 +552,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Produits d'Exploitation (FR)",
|
||||
'desc' => "Limitation aux entreprises dont le poste FR (Montant des Produits d'Exploitation en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -560,7 +560,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Charges d'Exploitation (GF)",
|
||||
'desc' => "Limitation aux entreprises dont le poste GF (Montant des Charges d'Exploitation en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -568,7 +568,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Charges Financières (GP)",
|
||||
'desc' => "Limitation aux entreprises dont le poste GP (Montant des Charges Financières en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -576,7 +576,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "R.C.A.I - Résultat courant av. impôt (GW)",
|
||||
'desc' => "Limitation aux entreprises dont le poste GW (Montant du Résultat Courant Avant Impôt en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -584,7 +584,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Produits Exceptionnels (HD)",
|
||||
'desc' => "Limitation aux entreprises dont le poste HD (Montant des Produits Exceptionnels en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -592,7 +592,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Charges Exceptionnels (HH)",
|
||||
'desc' => "Limitation aux entreprises dont le poste HH (Montant des Charges Exceptionnels en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -600,7 +600,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Total des Produits (HL)",
|
||||
'desc' => "Limitation aux entreprises dont le poste HL (Montant du Total des Produits en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -608,7 +608,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Total des Charges (HM)",
|
||||
'desc' => "Limitation aux entreprises dont le poste HM (Montant du Total des Charges en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -616,7 +616,7 @@ class Scores_Ciblage_FieldList
|
||||
'label' => "Résultat (HN)",
|
||||
'desc' => "Limitation aux entreprises dont le poste HN (Montant du Résultat Net en Euros) est connu (Chiffres Réels uniquement)",
|
||||
'family' => 'financier',
|
||||
'type' => 'range',
|
||||
'type' => 'rangeinput',
|
||||
'minmax' => 'number',
|
||||
'activated' => true,
|
||||
),
|
||||
@ -689,6 +689,15 @@ class Scores_Ciblage_FieldList
|
||||
}
|
||||
}
|
||||
$field = new Scores_Ciblage_Field_Range($name, $values, $format);
|
||||
break;
|
||||
case 'range':
|
||||
$format = false;
|
||||
if ( array_key_exists('minmax', $this->items[$name]) ) {
|
||||
if ( $this->items[$name]['minmax'] == 'number' ) {
|
||||
$format = true;
|
||||
}
|
||||
}
|
||||
$field = new Scores_Ciblage_Field_RangeInput($name, $values, $format);
|
||||
break;
|
||||
case 'rangedate':
|
||||
$field = new Scores_Ciblage_Field_RangeDate($name, $values);
|
||||
@ -736,6 +745,15 @@ class Scores_Ciblage_FieldList
|
||||
}
|
||||
$field = new Scores_Ciblage_Field_Range($name, $values, $format);
|
||||
break;
|
||||
case 'rangeinput':
|
||||
$format = false;
|
||||
if ( array_key_exists('minmax', $this->items[$name]) ) {
|
||||
if ( $this->items[$name]['minmax'] == 'number' ) {
|
||||
$format = true;
|
||||
}
|
||||
}
|
||||
$field = new Scores_Ciblage_Field_RangeInput($name, $values, $format);
|
||||
break;
|
||||
case 'rangedate':
|
||||
$field = new Scores_Ciblage_Field_RangeDate($name, $values);
|
||||
break;
|
||||
|
3
public/libs/nouislider/jquery.nouislider.all.min.js
vendored
Normal file
3
public/libs/nouislider/jquery.nouislider.all.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/libs/nouislider/jquery.nouislider.min.css
vendored
Normal file
4
public/libs/nouislider/jquery.nouislider.min.css
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/*! noUiSlider - 7.0.10 - 2014-12-27 14:50:47 */
|
||||
|
||||
|
||||
.noUi-target,.noUi-target *{-webkit-touch-callout:none;-webkit-user-select:none;-ms-touch-action:none;-ms-user-select:none;-moz-user-select:none;-moz-box-sizing:border-box;box-sizing:border-box}.noUi-target{position:relative;direction:ltr}.noUi-base{width:100%;height:100%;position:relative}.noUi-origin{position:absolute;right:0;top:0;left:0;bottom:0}.noUi-handle{position:relative;z-index:1}.noUi-stacking .noUi-handle{z-index:10}.noUi-state-tap .noUi-origin{-webkit-transition:left .3s,top .3s;transition:left .3s,top .3s}.noUi-state-drag *{cursor:inherit!important}.noUi-base{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.noUi-horizontal{height:18px}.noUi-horizontal .noUi-handle{width:34px;height:28px;left:-17px;top:-6px}.noUi-vertical{width:18px}.noUi-vertical .noUi-handle{width:28px;height:34px;left:-6px;top:-17px}.noUi-background{background:#FAFAFA;box-shadow:inset 0 1px 1px #f0f0f0}.noUi-connect{background:#3FB8AF;box-shadow:inset 0 0 3px rgba(51,51,51,.45);-webkit-transition:background 450ms;transition:background 450ms}.noUi-origin{border-radius:2px}.noUi-target{border-radius:4px;border:1px solid #D3D3D3;box-shadow:inset 0 1px 1px #F0F0F0,0 3px 6px -5px #BBB}.noUi-target.noUi-connect{box-shadow:inset 0 0 3px rgba(51,51,51,.45),0 3px 6px -5px #BBB}.noUi-dragable{cursor:w-resize}.noUi-vertical .noUi-dragable{cursor:n-resize}.noUi-handle{border:1px solid #D9D9D9;border-radius:3px;background:#FFF;cursor:default;box-shadow:inset 0 0 1px #FFF,inset 0 1px 7px #EBEBEB,0 3px 6px -3px #BBB}.noUi-active{box-shadow:inset 0 0 1px #FFF,inset 0 1px 7px #DDD,0 3px 6px -3px #BBB}.noUi-handle:after,.noUi-handle:before{content:"";display:block;position:absolute;height:14px;width:1px;background:#E8E7E6;left:14px;top:6px}.noUi-handle:after{left:17px}.noUi-vertical .noUi-handle:after,.noUi-vertical .noUi-handle:before{width:14px;height:1px;left:6px;top:14px}.noUi-vertical .noUi-handle:after{top:17px}[disabled] .noUi-connect,[disabled].noUi-connect{background:#B8B8B8}[disabled] .noUi-handle{cursor:not-allowed}
|
@ -16,7 +16,16 @@ $(document).ready(function(){
|
||||
$('div.ciblage-range button').click(function(e){
|
||||
e.preventDefault();
|
||||
var key = $(this).data('ciblagename');
|
||||
var values = $('#slider-'+key).slider('getValue');
|
||||
var values = $('#slider-'+key).val();
|
||||
set(key, values);
|
||||
});
|
||||
|
||||
$('div.ciblage-rangeinput button').click(function(e){
|
||||
e.preventDefault();
|
||||
var key = $(this).data('ciblagename');
|
||||
var values = [];
|
||||
values[0] = $('#rangeinput-'+key+'-selectmin').val();
|
||||
values[1] = $('#rangeinput-'+key+'-selectmax').val();
|
||||
set(key, values);
|
||||
});
|
||||
|
||||
|
@ -50,3 +50,71 @@ div.ciblage-tag-items span.label {
|
||||
margin:2px;
|
||||
}
|
||||
|
||||
.slider-valmin:before {
|
||||
content: "Min: ";
|
||||
font: 700 12px Arial;
|
||||
}
|
||||
|
||||
.slider-valmax:before {
|
||||
content: "Max: ";
|
||||
font: 700 12px Arial;
|
||||
}
|
||||
|
||||
.slider-valmin {
|
||||
color: #888;
|
||||
display: block;
|
||||
font: 400 12px Arial;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.slider-valmax {
|
||||
color: #888;
|
||||
display: block;
|
||||
font: 400 12px Arial;
|
||||
margin: 15px 0;
|
||||
float:right;
|
||||
}
|
||||
|
||||
.slider-select {
|
||||
color: #888;
|
||||
font: 600 12px Arial;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.rangeinput-valmin:before {
|
||||
content: "Min: ";
|
||||
font: 700 12px Arial;
|
||||
}
|
||||
|
||||
.rangeinput-valmax:before {
|
||||
content: "Max: ";
|
||||
font: 700 12px Arial;
|
||||
}
|
||||
|
||||
.rangeinput-valmin {
|
||||
color: #888;
|
||||
display: block;
|
||||
font: 400 12px Arial;
|
||||
}
|
||||
|
||||
.rangeinput-valmax {
|
||||
color: #888;
|
||||
display: block;
|
||||
font: 400 12px Arial;
|
||||
}
|
||||
|
||||
.rangeinput-selectmin {
|
||||
color: #888;
|
||||
font: 600 12px Arial;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.rangeinput-selectmax {
|
||||
color: #888;
|
||||
font: 600 12px Arial;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.noUi-target {
|
||||
margin: 0 10px;
|
||||
}
|
@ -46,7 +46,7 @@ try {
|
||||
'minmax' => "Défini les minimums et maximum",
|
||||
'table' => "Créer le cache des tables",
|
||||
'overwrite' => "Ecrase les fichiers présents",
|
||||
'key' => "Agit uniquement sur une clé",
|
||||
'key=s' => "Agit uniquement sur une clé",
|
||||
'verbose' => "Mode manuel",
|
||||
)
|
||||
);
|
||||
@ -92,8 +92,12 @@ $minmaxSqlLimit = array(
|
||||
'dateImmat>17000101',
|
||||
'dateImmat<DATE_FORMAT(NOW() + INTERVAL 5 YEAR, "%Y%m%d")',
|
||||
),
|
||||
'bilAnnee' => array(),
|
||||
'bilCloture' => array(),
|
||||
'bilAnnee' => array(
|
||||
'bilAnnee != "0000"',
|
||||
),
|
||||
'bilCloture' => array(
|
||||
'bilCloture != "0000-00-00"'
|
||||
),
|
||||
'bilEE' => array(),
|
||||
'bilFL' => array(),
|
||||
'bilFK' => array(),
|
||||
|
Loading…
Reference in New Issue
Block a user