parent
6e779160ea
commit
9144dc2f46
|
|
@ -10,6 +10,11 @@ define('PANIERS_GROUPES_TABLE_STRUCT', array(
|
|||
"del" => array( "type" => "bool", "default" => 0 )
|
||||
));
|
||||
|
||||
function getCountPaniersGroupesListSelectBaseSQL() {
|
||||
return "SELECT count(*) as nb"
|
||||
." FROM ".PANIERS_GROUPES_TABLE;
|
||||
}
|
||||
|
||||
function getPaniersGroupesSelectBaseSQL() {
|
||||
return "SELECT "
|
||||
.PANIERS_GROUPES_TABLE.".`ref`,"
|
||||
|
|
@ -253,6 +258,11 @@ define('CONTRATS_TYPES_TABLE_STRUCT', array(
|
|||
"del" => array( "type" => "bool", "default" => 0 )
|
||||
));
|
||||
|
||||
function getCountContratsTypesListSelectBaseSQL() {
|
||||
return "SELECT count(*) as nb"
|
||||
." FROM ".CONTRATS_TYPES_TABLE;
|
||||
}
|
||||
|
||||
function getContratsTypesTableSelectBaseSQL() {
|
||||
return "SELECT "
|
||||
.CONTRATS_TYPES_TABLE.".`ref`,"
|
||||
|
|
@ -262,6 +272,7 @@ function getContratsTypesTableSelectBaseSQL() {
|
|||
.CONTRATS_TYPES_TABLE.".`frequence`,"
|
||||
.CONTRATS_TYPES_TABLE.".`panier_type` as 'panier_type_ref',"
|
||||
.PANIERS_TYPES_TABLE.".`nom` as 'panier_type_nom',"
|
||||
.PANIERS_TYPES_TABLE.".`valeur` as 'panier_type_valeur',"
|
||||
.CONTRATS_TYPES_TABLE.".`nb_paniers`,"
|
||||
.CONTRATS_TYPES_TABLE.".`prix_total`"
|
||||
." FROM ".CONTRATS_TYPES_TABLE
|
||||
|
|
@ -269,6 +280,18 @@ function getContratsTypesTableSelectBaseSQL() {
|
|||
." LEFT JOIN ".PANIERS_TYPES_TABLE." ON ".CONTRATS_TYPES_TABLE.".`panier_type`=".PANIERS_TYPES_TABLE.".`ref`";
|
||||
}
|
||||
|
||||
function buildContratsTypesListFiltresSQL($sql, $filtres) {
|
||||
if(array_key_exists('groupe', $filtres) && (int)$filtres['groupe']>0) $sql.=" AND ".CONTRATS_TYPES_TABLE.".`groupe`=".intval($filtres['groupe']);
|
||||
if(array_key_exists('frequence', $filtres) && $filtres['frequence']!="") {
|
||||
switch($filtres['frequence']) {
|
||||
case 'hebdo' : $sql.=" AND ".CONTRATS_TYPES_TABLE.".`frequence`='hebdo'"; break;
|
||||
case 'quinz' : $sql.=" AND ".CONTRATS_TYPES_TABLE.".`frequence`='quinz'"; break;
|
||||
}
|
||||
}
|
||||
if(array_key_exists('panier', $filtres) && (int)$filtres['panier']>0) $sql.=" AND ".CONTRATS_TYPES_TABLE.".`panier_type`=".intval($filtres['panier']);
|
||||
return $sql;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// LEGUMES /////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -334,6 +357,11 @@ define('LIEUX_TABLE_STRUCT', array(
|
|||
"del" => array( "type" => "bool", "default" => 0 )
|
||||
));
|
||||
|
||||
function getCountLieuxListSelectBaseSQL() {
|
||||
return "SELECT count(*) as nb"
|
||||
." FROM ".LIEUX_TABLE;
|
||||
}
|
||||
|
||||
function getLieuxTableSelectBaseSQL() {
|
||||
return "SELECT "
|
||||
.LIEUX_TABLE.".`ref`,"
|
||||
|
|
|
|||
|
|
@ -16,11 +16,25 @@ $allowContratsTypesListOrder = array(
|
|||
'prix_total' => 'prix total'
|
||||
);
|
||||
|
||||
function getContratsTypesList($order='id',$sens='ASC', $search=false) {
|
||||
function getNbContratsTypesInList($filtres=array()) {
|
||||
$sql = getCountContratsTypesListSelectBaseSQL()." WHERE ".CONTRATS_TYPES_TABLE.".`del`=0";
|
||||
$sql = buildContratsTypesListFiltresSQL($sql, $filtres);
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql, 1);
|
||||
if(!$r['erreur']) return intval($r['datas']['nb']);
|
||||
else {
|
||||
$er = "</br>sql: ".$sql."</br>error: ".getReadableVar($r['erreur']);
|
||||
return "Une erreur est survenue durant du nombre d'item dans la liste !".$er;
|
||||
}
|
||||
}
|
||||
|
||||
function getContratsTypesList($order='id',$sens='ASC', $filtres=array(), $limits=false) {
|
||||
$list = array();
|
||||
|
||||
$sql = getContratsTypesTableSelectBaseSQL()." WHERE ".CONTRATS_TYPES_TABLE.".`del`=0";
|
||||
|
||||
// FILTRES
|
||||
$sql = buildContratsTypesListFiltresSQL($sql, $filtres);
|
||||
|
||||
// ORDRE
|
||||
$sql.=" ORDER BY ";
|
||||
|
||||
|
|
@ -37,10 +51,16 @@ function getContratsTypesList($order='id',$sens='ASC', $search=false) {
|
|||
if($sens=='DESC') $sql .= ' DESC';
|
||||
else $sql .= ' ASC';
|
||||
|
||||
// LIMITS
|
||||
if(is_array($limits)) $sql .= " LIMIT ".$limits['start'].", ".$limits['nbItemsByPage'];
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql);
|
||||
|
||||
if(!$r['erreur']) {
|
||||
foreach($r['datas'] as $i) $list[$i['ref']] = $i;
|
||||
foreach($r['datas'] as $i) {
|
||||
$i["frequence_print"] = CONTRATS_FREQUENCES[$i["frequence"]];
|
||||
$list[$i['ref']] = $i;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$er = "</br>sql: ".$sql."</br>error: ".getReadableVar($r['erreur']);
|
||||
|
|
@ -61,6 +81,7 @@ function getContratsTypeDatas($id) {
|
|||
|
||||
if(!$r['erreur']) {
|
||||
$i = $r['datas'];
|
||||
$i["frequence_print"] = CONTRATS_FREQUENCES[$i["frequence"]];
|
||||
}
|
||||
else {
|
||||
$er = "</br>sql: ".$sql."</br>error: ".getReadableVar($r['erreur']);
|
||||
|
|
@ -112,4 +133,39 @@ function eraseContratsType($id) {
|
|||
$id, // ID
|
||||
"du type de contrat" // ERROR STRING
|
||||
);
|
||||
}
|
||||
|
||||
// LINKED CONTRATS
|
||||
|
||||
function updateContratsTypeLinks($id) {
|
||||
$datas = getContratsTypeDatas($id);
|
||||
if(!is_array($datas)) return $datas;
|
||||
|
||||
// UNLINK CONTRATS
|
||||
$sql = "UPDATE ".CONTRATS_TABLE." SET `type`=NULL WHERE `type`=".intval($id)
|
||||
." AND (`groupe`!=".$datas["groupe_ref"]
|
||||
." OR `frequence`!='".$datas["frequence"]."'"
|
||||
." OR `panier_type`!=".$datas["panier_type_ref"]
|
||||
." OR `nb_paniers`!=".$datas["nb_paniers"].")";
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->execSql($sql);
|
||||
if(!$r || $r['erreur']!=false) {
|
||||
$er = "</br>sql: ".$r['sql']."</br>result: ".getReadableVar($r['result'])."</br>error: ".getReadableVar($r['erreur']);
|
||||
return "ERREUR : Une erreur est survenue durant la mise à jour des contrats liés dans la base de données ! ".$er;
|
||||
}
|
||||
|
||||
// LINK CUSTOM
|
||||
$sql = "UPDATE ".CONTRATS_TABLE." SET `type`=".intval($id)." WHERE `type` IS NULL"
|
||||
." AND `groupe`=".$datas["groupe_ref"]
|
||||
." AND `frequence`='".$datas["frequence"]."'"
|
||||
." AND `panier_type`=".$datas["panier_type_ref"]
|
||||
." AND `nb_paniers`=".$datas["nb_paniers"];
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->execSql($sql);
|
||||
if(!$r || $r['erreur']!=false) {
|
||||
$er = "</br>sql: ".$r['sql']."</br>result: ".getReadableVar($r['result'])."</br>error: ".getReadableVar($r['erreur']);
|
||||
return "ERREUR : Une erreur est survenue durant la mise à jour des contrats liés dans la base de données ! ".$er;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -11,22 +11,24 @@ $allowLieuxListOrder = array(
|
|||
'nom' => "nom"
|
||||
);
|
||||
|
||||
function getLieuxList($order='id',$sens='ASC', $search=false) {
|
||||
function getNbLieuxInList($search=false) {
|
||||
$sql = getCountLieuxListSelectBaseSQL()." WHERE ".LIEUX_TABLE.".`del`=0";
|
||||
$sql = buildSqlSearch($sql, $search, buildLieuxSearchSQL);
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql, 1);
|
||||
if(!$r['erreur']) return intval($r['datas']['nb']);
|
||||
else {
|
||||
$er = "</br>sql: ".$sql."</br>error: ".getReadableVar($r['erreur']);
|
||||
return "Une erreur est survenue durant du nombre d'item dans la liste !".$er;
|
||||
}
|
||||
}
|
||||
|
||||
function getLieuxList($order='id',$sens='ASC', $search=false, $limits=false) {
|
||||
$list = array();
|
||||
|
||||
$sql = getLieuxTableSelectBaseSQL()." WHERE ".LIEUX_TABLE.".`del`=0";
|
||||
|
||||
// SEARCH
|
||||
if($search && $search!="") {
|
||||
$parts = explode(" ", $search);
|
||||
if(is_array($parts) && count($parts>0)) {
|
||||
$search_sql = "";
|
||||
foreach($parts as $p) {
|
||||
if($p!="") $search_sql .= (($search_sql!="") ? " OR " : "").buildLieuxSearchSQL($p);
|
||||
}
|
||||
if($search_sql!="") $sql .= " AND (".$search_sql.")";
|
||||
}
|
||||
}
|
||||
$sql = buildSqlSearch($sql, $search, buildLieuxSearchSQL);
|
||||
|
||||
// ORDRE
|
||||
$sql.=" ORDER BY ";
|
||||
|
|
@ -39,6 +41,9 @@ function getLieuxList($order='id',$sens='ASC', $search=false) {
|
|||
if($sens=='DESC') $sql .= ' DESC';
|
||||
else $sql .= ' ASC';
|
||||
|
||||
// LIMITS
|
||||
if(is_array($limits)) $sql .= " LIMIT ".$limits['start'].", ".$limits['nbItemsByPage'];
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql);
|
||||
|
||||
if(!$r['erreur']) {
|
||||
|
|
|
|||
|
|
@ -11,22 +11,24 @@ $allowPaniersGroupesListOrder = array(
|
|||
'nom' => "nom"
|
||||
);
|
||||
|
||||
function getPaniersGroupesList($order='nom',$sens='ASC', $search=false) {
|
||||
function getNbPaniersGroupesInList($search=false) {
|
||||
$sql = getCountPaniersGroupesListSelectBaseSQL()." WHERE ".PANIERS_GROUPES_TABLE.".`del`=0";
|
||||
$sql = buildSqlSearch($sql, $search, buildPaniersGroupesListSearchSQL);
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql, 1);
|
||||
if(!$r['erreur']) return intval($r['datas']['nb']);
|
||||
else {
|
||||
$er = "</br>sql: ".$sql."</br>error: ".getReadableVar($r['erreur']);
|
||||
return "Une erreur est survenue durant du nombre d'item dans la liste !".$er;
|
||||
}
|
||||
}
|
||||
|
||||
function getPaniersGroupesList($order='nom',$sens='ASC', $search=false, $limits=false) {
|
||||
$list = array();
|
||||
|
||||
$sql = getPaniersGroupesSelectBaseSQL()." WHERE ".PANIERS_GROUPES_TABLE.".`del`=0";
|
||||
|
||||
// SEARCH
|
||||
if($search && $search!="") {
|
||||
$parts = explode(" ", $search);
|
||||
if(is_array($parts) && count($parts>0)) {
|
||||
$search_sql = "";
|
||||
foreach($parts as $p) {
|
||||
if($p!="") $search_sql .= (($search_sql!="") ? " OR " : "").buildPaniersGroupesListSearchSQL($p);
|
||||
}
|
||||
if($search_sql!="") $sql .= " AND (".$search_sql.")";
|
||||
}
|
||||
}
|
||||
$sql = buildSqlSearch($sql, $search, buildPaniersGroupesListSearchSQL);
|
||||
|
||||
// ORDRE
|
||||
$sql.=" ORDER BY ";
|
||||
|
|
@ -39,6 +41,9 @@ function getPaniersGroupesList($order='nom',$sens='ASC', $search=false) {
|
|||
if($sens=='DESC') $sql .= ' DESC';
|
||||
else $sql .= ' ASC';
|
||||
|
||||
// LIMITS
|
||||
if(is_array($limits)) $sql .= " LIMIT ".$limits['start'].", ".$limits['nbItemsByPage'];
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql);
|
||||
|
||||
if(!$r['erreur']) {
|
||||
|
|
|
|||
|
|
@ -37,33 +37,6 @@ if($id>0 && $action) {
|
|||
}
|
||||
}
|
||||
switch($action) {
|
||||
/****** CONTRATS TYPES ***********/
|
||||
// ADD CONTRATS TYPE
|
||||
case "add_contrats_type": {
|
||||
$datas = getContratsTypeDatasFromRequest();
|
||||
die( strval( addContratsType($datas) ) );
|
||||
} break;
|
||||
// EDIT CONTRATS TYPE
|
||||
case "edit_contrats_type": {
|
||||
$id = isset($_REQUEST['type_ref']) ? intval($_REQUEST['type_ref']) : 0;
|
||||
if($id>0) {
|
||||
$datas = getContratsTypeDatasFromRequest();
|
||||
die( strval( updateContratsType($id, $datas) ) );
|
||||
}
|
||||
else die("ERREUR : aucune référence de type de contrat transmis...");
|
||||
} break;
|
||||
// DELETE CONTRATS TYPE
|
||||
case "delete_contrats_type": {
|
||||
$id = isset($_REQUEST['type_ref']) ? intval($_REQUEST['type_ref']) : 0;
|
||||
if($id>0) die( strval( deleteContratsType($id) ) );
|
||||
else die("ERREUR : aucune référence de type de contrat transmis...");
|
||||
} break;
|
||||
// CONTRATS TYPES SELECT LIST
|
||||
case "contrats_types_select_list": {
|
||||
$GLOBALS['smarty'] -> assign('contrats_types_list', getContratsTypesList());
|
||||
die( $GLOBALS['smarty']->fetch("contrats/contrats_types_select_list.tpl") );
|
||||
} break;
|
||||
|
||||
/****** LIEUX DE DEPOT ***********/
|
||||
// ADD LIEU
|
||||
case "add_lieu": {
|
||||
|
|
@ -88,7 +61,7 @@ switch($action) {
|
|||
// LIEUX SELECT LIST
|
||||
case "lieux_select_list": {
|
||||
$GLOBALS['smarty'] -> assign('lieux_list', getLieuxList());
|
||||
die( $GLOBALS['smarty']->fetch("contrats/lieux_select_list.tpl") );
|
||||
die( $GLOBALS['smarty']->fetch("lieux/lieux_select_list.tpl") );
|
||||
} break;
|
||||
|
||||
/****** CONTRAT ***********/
|
||||
|
|
@ -106,7 +79,7 @@ switch($action) {
|
|||
|
||||
// REQUIRED LISTS & FILTRE
|
||||
$groupesList = getPaniersGroupesList();
|
||||
$groupe = getRequestAndSessionSave("groupe", "livraisons_filtre_groupe", "groupe", "int", 0, $groupesList, true);
|
||||
$groupe = getRequestAndSessionSave("groupe", "contrats_filtre_groupe", "groupe", "int", 0, $groupesList, true);
|
||||
$paniersTypesList = getPaniersTypesList('nom','ASC', false, $groupe);
|
||||
$lieuxList = getLieuxList();
|
||||
$filtres = array(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
|
||||
require_once('../init.php');
|
||||
$GLOBALS['smarty']->assign('page','contrats_types');
|
||||
$GLOBALS['template'] = 'contrats_types/contrats_types_list.tpl';
|
||||
$GLOBALS['smarty']->assign('secondbar','contrats_types/contrats_types_secondbar.tpl');
|
||||
$jsFiles[] = PUBLIC_HTML_ADMIN.'js/contrats_types.js';
|
||||
$cssFiles[] = PUBLIC_HTML_ADMIN.'css/contrats.css';
|
||||
|
||||
if($id>0 && $action) {
|
||||
$infos = getContratsTypeDatas($id);
|
||||
switch($action) {
|
||||
// AJAX GET DATAS
|
||||
case "getDatas": die(json_encode($infos)); break;
|
||||
// EDIT
|
||||
case "edit": {
|
||||
$datas = getContratsTypeDatasFromRequest();
|
||||
$r = updateContratsType($id,$datas);
|
||||
if($r == 1) $r = updateContratsTypeLinks($id);
|
||||
die( strval( $r ) );
|
||||
} break;
|
||||
// DELETE
|
||||
case "delete" : die( strval( deleteContratsType($id) ) ); break;
|
||||
// DEFAULT
|
||||
default: die("NO ACTION");
|
||||
}
|
||||
}
|
||||
switch($action) {
|
||||
// ADD
|
||||
case "add": {
|
||||
$datas = getContratsTypeDatasFromRequest();
|
||||
die( strval( addContratsType($datas) ) );
|
||||
} break;
|
||||
// SELECT LIST
|
||||
case "select_list": {
|
||||
$GLOBALS['smarty'] -> assign('contrats_types_list', getContratsTypesList());
|
||||
die( $GLOBALS['smarty']->fetch("contrats_types/contrats_types_select_list.tpl") );
|
||||
} break;
|
||||
// DEFAULT - LIST
|
||||
default: {
|
||||
// REQUIRED LISTS & FILTRE
|
||||
$groupesList = getPaniersGroupesList();
|
||||
$groupe = getRequestAndSessionSave("groupe", "contrats_types_filtre_groupe", "groupe", "int", 0, $groupesList, true);
|
||||
$paniersTypesList = getPaniersTypesList('nom','ASC', false, $groupe);
|
||||
$filtres = array(
|
||||
"groupe" => $groupe,
|
||||
"frequence" => getRequestAndSessionSave("frequence", "contrats_types_filtre_frequence", "frequence", "txt", 0, array("hebdo", "quinz", "quinz_A", "quinz_B")),
|
||||
"panier" => getRequestAndSessionSave("panier", "contrats_types_filtre_panier", "panier", "int", 0, $paniersTypesList, true)
|
||||
);
|
||||
|
||||
// LIMITS
|
||||
$limits = array("start" => 0, "end" => LIST_NB_LIGNES_PAR_PAGE, "nbItemsByPage" => LIST_NB_LIGNES_PAR_PAGE, "max" => getNbContratsTypesInList($filtres));
|
||||
if(isset($_REQUEST['startListAt']) && (int)$_REQUEST['startListAt']>0) {
|
||||
$limits['start'] = intval($_REQUEST['startListAt']);
|
||||
$limits['end'] = $limits['start'] + $limits['nbItemsByPage'];
|
||||
if($limits['end'] > $limits['max']) $limits['end'] = $limits['max'];
|
||||
}
|
||||
$limits['rest'] = $limits['max'] - $limits['end'];
|
||||
$GLOBALS['smarty'] -> assign('list_limits',$limits);
|
||||
|
||||
// LIST
|
||||
$order = getListOrder('contrats_types_list_order', 'contrats_types_list_sens', $allowContratsListOrder, 'nom');
|
||||
$list = getContratsTypesList($order["order"], $order["sens"], $filtres, $limits);
|
||||
$GLOBALS['smarty'] -> assign('list',$list);
|
||||
|
||||
// LIST PART
|
||||
if(isset($_REQUEST['startListAt']) && (int)$_REQUEST['startListAt']>0) {
|
||||
$limits["list"] = $GLOBALS['smarty']->fetch("contrats_types/contrats_types_list_builder.tpl");
|
||||
die(json_encode($limits));
|
||||
}
|
||||
|
||||
// REQUIRED LISTS
|
||||
$GLOBALS['smarty'] -> assign('paniers_groupes_list', $groupesList);
|
||||
$GLOBALS['smarty'] -> assign('paniers_list', $paniersTypesList);
|
||||
|
||||
// DISPLAY
|
||||
display();
|
||||
}
|
||||
}
|
||||
|
|
@ -49,6 +49,14 @@ div.main-navbar a.brand img {
|
|||
|
||||
div.main-navbar button.navbar-toggle { margin-right: 5px; padding: 5px; }
|
||||
|
||||
div.main-navbar a.btnAdmin {
|
||||
background-size: 24px;
|
||||
background-position: 12px;
|
||||
background-image: url(../img/gears.svg);
|
||||
background-repeat: no-repeat;
|
||||
padding-left: 42px;
|
||||
}
|
||||
|
||||
/* SECOND BAR */
|
||||
|
||||
div.secondbar {
|
||||
|
|
@ -86,11 +94,11 @@ div.secondbar ul.navbar-nav li.active > a {
|
|||
color: #3296C8;
|
||||
}
|
||||
|
||||
div.secondbar form.form-filtre-search { padding-right: 0; }
|
||||
div.secondbar .form-filtre-search { padding-right: 0; }
|
||||
|
||||
div.secondbar form.form-filtre-search i.btnClearSearch { cursor: pointer; }
|
||||
div.secondbar .form-filtre-search i.btnClearSearch { cursor: pointer; }
|
||||
|
||||
div.secondbar form.form-filtre-search span.separator {
|
||||
div.secondbar .form-filtre-search span.separator {
|
||||
display: inline-table;
|
||||
vertical-align: middle;
|
||||
width: 0; height: 30px;
|
||||
|
|
@ -98,7 +106,7 @@ div.secondbar form.form-filtre-search span.separator {
|
|||
border-left: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
div.secondbar form.form-filtre-search button.btnPrint span.txt { display: none; }
|
||||
div.secondbar .form-filtre-search button.btnPrint span.txt { display: none; }
|
||||
|
||||
@media (max-width: 767px) {
|
||||
div.main-navbar a.brand img { height: 40px; }
|
||||
|
|
@ -107,18 +115,18 @@ div.secondbar form.form-filtre-search button.btnPrint span.txt { display: none;
|
|||
div.secondbar a.brand { height: 40px; padding: 10px; }
|
||||
|
||||
div.secondbar div.navbar-filtre-search { border-top: 1px solid #CCCCCC; padding: 0 5px; }
|
||||
div.secondbar form.form-filtre-search { padding: 5px 0; margin: 0; }
|
||||
div.secondbar form.form-filtre-search > *:not(:last-child) { padding-bottom: 7px; }
|
||||
div.secondbar .form-filtre-search { padding: 5px 0; margin: 0; }
|
||||
div.secondbar .form-filtre-search > *:not(:last-child) { padding-bottom: 7px; }
|
||||
|
||||
div.secondbar form.form-filtre-search span.separator {
|
||||
div.secondbar .form-filtre-search span.separator {
|
||||
width: 100%; height: 0px;
|
||||
margin: 0;
|
||||
border-left: none;
|
||||
border-top: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
div.secondbar form.form-filtre-search button.btnPrint { width: 100%; }
|
||||
div.secondbar form.form-filtre-search button.btnPrint span.txt { display: inline; }
|
||||
div.secondbar .form-filtre-search button.btnPrint { width: 100%; }
|
||||
div.secondbar .form-filtre-search button.btnPrint span.txt { display: inline; }
|
||||
div.secondbar div.input-group.order {
|
||||
display: table!important;
|
||||
width: 100%;
|
||||
|
|
@ -126,7 +134,7 @@ div.secondbar form.form-filtre-search button.btnPrint span.txt { display: none;
|
|||
padding: 7px 0 0 0;
|
||||
}
|
||||
|
||||
div.secondbar button.btnPrint { margin: -5px; }
|
||||
div.secondbar button.btnPrint { margin-top: -5px; }
|
||||
}
|
||||
|
||||
/* LIST */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="800px" height="800px" viewBox="0 0 932.179 932.179"
|
||||
xml:space="preserve">
|
||||
<g>
|
||||
<path d="M61.2,341.538c4.9,16.8,11.7,33,20.3,48.2l-24.5,30.9c-8,10.1-7.1,24.5,1.9,33.6l42.2,42.2c9.1,9.1,23.5,9.899,33.6,1.899
|
||||
l30.7-24.3c15.8,9.101,32.6,16.2,50.1,21.2l4.6,39.5c1.5,12.8,12.3,22.4,25.1,22.4h59.7c12.8,0,23.6-9.601,25.1-22.4l4.4-38.1
|
||||
c18.8-4.9,36.8-12.2,53.7-21.7l29.7,23.5c10.1,8,24.5,7.1,33.6-1.9l42.2-42.2c9.1-9.1,9.9-23.5,1.9-33.6l-23.1-29.3
|
||||
c9.6-16.601,17.1-34.3,22.1-52.8l35.6-4.1c12.801-1.5,22.4-12.3,22.4-25.1v-59.7c0-12.8-9.6-23.6-22.4-25.1l-35.1-4.1
|
||||
c-4.801-18.3-12-35.8-21.199-52.2l21.6-27.3c8-10.1,7.1-24.5-1.9-33.6l-42.1-42.1c-9.1-9.1-23.5-9.9-33.6-1.9l-26.5,21
|
||||
c-17.2-10.1-35.601-17.8-54.9-23l-4-34.3c-1.5-12.8-12.3-22.4-25.1-22.4h-59.7c-12.8,0-23.6,9.6-25.1,22.4l-4,34.3
|
||||
c-19.8,5.3-38.7,13.3-56.3,23.8l-27.5-21.8c-10.1-8-24.5-7.1-33.6,1.9l-42.2,42.2c-9.1,9.1-9.9,23.5-1.9,33.6l23,29.1
|
||||
c-9.2,16.6-16.2,34.3-20.8,52.7l-36.8,4.2c-12.8,1.5-22.4,12.3-22.4,25.1v59.7c0,12.8,9.6,23.6,22.4,25.1L61.2,341.538z
|
||||
M277.5,180.038c54.4,0,98.7,44.3,98.7,98.7s-44.3,98.7-98.7,98.7c-54.399,0-98.7-44.3-98.7-98.7S223.1,180.038,277.5,180.038z"/>
|
||||
<path d="M867.699,356.238l-31.5-26.6c-9.699-8.2-24-7.8-33.199,0.9l-17.4,16.3c-14.699-7.1-30.299-12.1-46.4-15l-4.898-24
|
||||
c-2.5-12.4-14-21-26.602-20l-41.1,3.5c-12.6,1.1-22.5,11.4-22.9,24.1l-0.799,24.4c-15.801,5.7-30.701,13.5-44.301,23.3
|
||||
l-20.799-13.8c-10.602-7-24.701-5-32.9,4.7l-26.6,31.7c-8.201,9.7-7.801,24,0.898,33.2l18.201,19.399
|
||||
c-6.301,14.2-10.801,29.101-13.4,44.4l-26,5.3c-12.4,2.5-21,14-20,26.601l3.5,41.1c1.1,12.6,11.4,22.5,24.1,22.9l28.1,0.899
|
||||
c5.102,13.4,11.801,26.101,19.9,38l-15.699,23.7c-7,10.6-5,24.7,4.699,32.9l31.5,26.6c9.701,8.2,24,7.8,33.201-0.9l20.6-19.3
|
||||
c13.5,6.3,27.699,11,42.299,13.8l5.701,28.2c2.5,12.4,14,21,26.6,20l41.1-3.5c12.6-1.1,22.5-11.399,22.9-24.1l0.9-27.601
|
||||
c15-5.3,29.199-12.5,42.299-21.399l22.701,15c10.6,7,24.699,5,32.9-4.7l26.6-31.5c8.199-9.7,7.799-24-0.9-33.2l-18.301-19.399
|
||||
c6.701-14.2,11.602-29.2,14.4-44.601l25-5.1c12.4-2.5,21-14,20-26.601l-3.5-41.1c-1.1-12.6-11.4-22.5-24.1-22.9l-25.1-0.8
|
||||
c-5.201-14.6-12.201-28.399-20.9-41.2l13.699-20.6C879.4,378.638,877.4,364.438,867.699,356.238z M712.801,593.837
|
||||
c-44.4,3.801-83.602-29.3-87.301-73.699c-3.801-44.4,29.301-83.601,73.699-87.301c44.4-3.8,83.602,29.301,87.301,73.7
|
||||
C790.301,550.938,757.199,590.138,712.801,593.837z"/>
|
||||
<path d="M205,704.438c-12.6,1.3-22.3,11.899-22.4,24.6l-0.3,25.3c-0.2,12.7,9.2,23.5,21.8,25.101l18.6,2.399
|
||||
c3.1,11.301,7.5,22.101,13.2,32.301l-12,14.8c-8,9.899-7.4,24.1,1.5,33.2l17.7,18.1c8.9,9.1,23.1,10.1,33.2,2.3l14.899-11.5
|
||||
c10.5,6.2,21.601,11.101,33.2,14.5l2,19.2c1.3,12.6,11.9,22.3,24.6,22.4l25.301,0.3c12.699,0.2,23.5-9.2,25.1-21.8l2.3-18.2
|
||||
c12.601-3.101,24.601-7.8,36-14l14,11.3c9.9,8,24.101,7.4,33.201-1.5l18.1-17.7c9.1-8.899,10.1-23.1,2.301-33.2L496.6,818.438
|
||||
c6.6-11,11.701-22.7,15.201-35l16.6-1.7c12.6-1.3,22.299-11.9,22.4-24.6l0.299-25.301c0.201-12.699-9.199-23.5-21.799-25.1
|
||||
l-16.201-2.1c-3.1-12.2-7.699-24-13.699-35l10.1-12.4c8-9.9,7.4-24.1-1.5-33.2l-17.699-18.1c-8.9-9.101-23.102-10.101-33.201-2.3
|
||||
l-12.101,9.3c-11.399-6.9-23.6-12.2-36.399-15.8l-1.601-15.7c-1.3-12.601-11.899-22.3-24.6-22.4l-25.3-0.3
|
||||
c-12.7-0.2-23.5,9.2-25.101,21.8l-2,15.601c-13.199,3.399-25.899,8.6-37.699,15.399l-12.5-10.2c-9.9-8-24.101-7.399-33.201,1.5
|
||||
l-18.2,17.801c-9.1,8.899-10.1,23.1-2.3,33.199l10.7,13.801c-6.2,11-11.1,22.699-14.3,35L205,704.438z M368.3,675.837
|
||||
c36.3,0.4,65.399,30.301,65,66.601c-0.4,36.3-30.301,65.399-66.601,65c-36.3-0.4-65.399-30.3-65-66.601
|
||||
C302.1,704.538,332,675.438,368.3,675.837z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>layers</title>
|
||||
<path d="M1.508 9.149l14 6c0.145 0.064 0.314 0.101 0.492 0.101s0.347-0.037 0.5-0.104l-0.008 0.003 14-6c0.449-0.196 0.758-0.637 0.758-1.149s-0.308-0.953-0.75-1.146l-0.008-0.003-14-6c-0.145-0.064-0.314-0.101-0.492-0.101s-0.347 0.037-0.5 0.104l0.008-0.003-14 6c-0.449 0.196-0.758 0.637-0.758 1.149s0.308 0.953 0.75 1.146l0.008 0.003zM16 3.36l10.826 4.64-10.826 4.64-10.827-4.64zM30.492 14.851l-4-1.714c-0.144-0.063-0.312-0.099-0.489-0.099-0.691 0-1.25 0.56-1.25 1.25 0 0.511 0.307 0.951 0.747 1.145l0.008 0.003 1.318 0.564-10.826 4.641-10.826-4.641 1.318-0.564c0.452-0.195 0.762-0.637 0.762-1.151 0-0.691-0.56-1.25-1.25-1.25-0.179 0-0.35 0.038-0.504 0.106l0.008-0.003-4 1.714c-0.449 0.196-0.758 0.637-0.758 1.149s0.308 0.953 0.75 1.146l0.008 0.003 14 5.999c0.145 0.064 0.314 0.102 0.492 0.102s0.347-0.037 0.5-0.105l-0.008 0.003 14-5.999c0.449-0.196 0.758-0.637 0.758-1.149s-0.308-0.953-0.75-1.146l-0.008-0.003zM30.492 22.852l-4-1.715c-0.145-0.064-0.314-0.101-0.492-0.101-0.69 0-1.249 0.559-1.249 1.249 0 0.512 0.308 0.952 0.749 1.145l0.008 0.003 1.32 0.566-10.828 4.641-10.827-4.641 1.319-0.566c0.449-0.196 0.757-0.636 0.757-1.148 0-0.69-0.559-1.249-1.249-1.249-0.178 0-0.347 0.037-0.5 0.104l0.008-0.003-4 1.715c-0.449 0.196-0.758 0.636-0.758 1.148s0.308 0.953 0.75 1.145l0.008 0.003 14 6c0.145 0.064 0.314 0.102 0.492 0.102s0.347-0.037 0.5-0.105l-0.008 0.003 14-6c0.449-0.196 0.758-0.636 0.758-1.148s-0.308-0.953-0.75-1.145l-0.008-0.003z"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="792px" height="792px" viewBox="0 0 792 792" style="enable-background:new 0 0 792 792;" xml:space="preserve">
|
||||
<g>
|
||||
<g id="Location">
|
||||
<g>
|
||||
<path d="M398.275,188.651c-49.959,0-90.433,39.885-90.433,89.074c0,49.189,40.497,89.051,90.433,89.051
|
||||
c49.958,0,90.432-39.862,90.432-89.051C488.707,228.537,448.211,188.651,398.275,188.651z M425.303,668.36l56.523-124.002
|
||||
c114.336-35.811,197.207-141.16,197.207-265.592C679.033,124.771,552.315,0,396.011,0C239.685,0,112.967,124.771,112.967,278.767
|
||||
c0,127.307,86.81,234.489,205.244,267.811l58.356,121.443c-0.498,0.022-1.019,0.022-1.54,0.068c0.521,0,1.042,0,1.54-0.022
|
||||
l25.058,52.154l23.315-51.158c61.051,6.134,106.957,29.473,106.957,43.303c0,15.981-61.073,28.952-136.384,28.952
|
||||
s-136.384-12.971-136.384-28.952c0-14.51,50.321-39.727,115.875-44.276c-106.278,2.173-189.828,21.188-189.285,44.276
|
||||
C186.852,759.788,279.661,792,395.536,792c115.875,0,210.948-33.32,209.816-79.635
|
||||
C604.832,689.955,526.963,671.439,425.303,668.36z M393.363,477.627c-111.031,0-201.033-88.667-201.033-198
|
||||
S282.332,81.604,393.363,81.604c111.032,0,201.034,88.667,201.034,198.022C594.396,388.938,504.395,477.627,393.363,477.627z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -269,7 +269,7 @@ function modalViewClient_initAbsenceRow(row) {
|
|||
|
||||
/***** MODAL FORM ADD/EDIT *****/
|
||||
function modalFormClient_init(modal) {
|
||||
modal.find("form").on("submit", function(e) { e.preventDefault(); });
|
||||
modal.find("form").preventFormValidation();
|
||||
|
||||
// NOM
|
||||
initUpperCaseInput(modal.find("input[name=nom]"), null, function() { $(this).blur(); });
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ function modalViewContrat_clear(modal) {
|
|||
|
||||
/***** MODAL FORM ADD/EDIT *****/
|
||||
function modalFormContrat_init(modal) {
|
||||
modal.find("form").on("submit", function(e) { e.preventDefault(); });
|
||||
modal.find("form").preventFormValidation();
|
||||
|
||||
// CLIENT AUTOCOMPLETE
|
||||
initAutocompleteInput(
|
||||
|
|
@ -185,12 +185,12 @@ function modalFormContrat_init(modal) {
|
|||
"contrat", // MODAL FORM NAME
|
||||
modal.find("select[name=type]").parent(), // SELECT GROUPE
|
||||
"le type de contrat", // VALUE NAME
|
||||
contratsConf.baseURL, // URL
|
||||
"type_ref", // REF ATTR
|
||||
"add_contrats_type", // ADD ACTION
|
||||
"edit_contrats_type", // EDIT ACTION
|
||||
"delete_contrats_type", // DELETE ACTION
|
||||
"contrats_types_select_list", // REFRESH LIST ACTION
|
||||
"contrats_types.php", // URL
|
||||
"ref", // REF ATTR
|
||||
"add", // ADD ACTION
|
||||
"edit", // EDIT ACTION
|
||||
"delete", // DELETE ACTION
|
||||
"select_list", // REFRESH LIST ACTION
|
||||
modalFormContrat_contratType_selectClbkFct, // SELECT CLBK FCT
|
||||
modalFormContrat_showCustomType, // ADD CKBK FCT
|
||||
modalFormContrat_showCustomType, // EDIT CKBK FCT
|
||||
|
|
@ -219,12 +219,12 @@ function modalFormContrat_init(modal) {
|
|||
"contrat", // MODAL FORM NAME
|
||||
modal.find("select[name=lieu_depot]").parent(), // SELECT GROUPE
|
||||
"le lieu de dépôt", // VALUE NAME
|
||||
contratsConf.baseURL, // URL
|
||||
"lieu_ref", // REF ATTR
|
||||
"add_lieu", // ADD ACTION
|
||||
"edit_lieu", // EDIT ACTION
|
||||
"delete_lieu", // DELETE ACTION
|
||||
"lieux_select_list" // REFRESH LIST ACTION
|
||||
"lieux.php", // URL
|
||||
"ref", // REF ATTR
|
||||
"add", // ADD ACTION
|
||||
"edit", // EDIT ACTION
|
||||
"delete", // DELETE ACTION
|
||||
"select_list" // REFRESH LIST ACTION
|
||||
);
|
||||
|
||||
// NB PANIERS
|
||||
|
|
|
|||
|
|
@ -0,0 +1,324 @@
|
|||
// SETTINGS
|
||||
var contratsTypesConf = {
|
||||
type : "contrats type",
|
||||
baseURL : "contrats_types.php",
|
||||
// LIST
|
||||
list_selector : "#contratsTypesList",
|
||||
// FILTRES
|
||||
filtres_selector : "#contratsTypesSearch select",
|
||||
// VIEW
|
||||
view_modalSelector : "#modalViewContratsType",
|
||||
view_btnSelector : ".btnViewContratsType",
|
||||
// ADD
|
||||
add_modalSelector : "#modalAddContratsType",
|
||||
add_btnSelector : "#btnAddContratsType",
|
||||
// EDIT
|
||||
edit_modalSelector : "#modalEditContratsType",
|
||||
edit_btnSelector : ".btnEditContratsType",
|
||||
// DELETE
|
||||
delete_modalSelector : "#modalDeleteContratsType",
|
||||
delete_btnSelector : ".btnDeleteContratsType",
|
||||
}
|
||||
|
||||
// MODALS
|
||||
var modalViewContratsType = false;
|
||||
var modalAddContratsType = false;
|
||||
var modalEditContratsType = false;
|
||||
var modalDeleteContratsType = false;
|
||||
|
||||
$(document).ready( function() {
|
||||
// LIST LOADER
|
||||
initListProgressLoad($(contratsTypesConf.list_selector), contratsTypesConf.baseURL, contratsTypesConf.type+" list");
|
||||
|
||||
// FILTRES
|
||||
$(contratsTypesConf.filtres_selector).initFiltreSelect();
|
||||
|
||||
// VIEW
|
||||
modalViewContratsType = $(contratsTypesConf.view_modalSelector);
|
||||
if(modalViewContratsType.length>0) {
|
||||
initViewContratsType();
|
||||
// VIEW REQUEST
|
||||
var id = getUrlParameter("ref");
|
||||
if(id!==false && parseInt(id)>0 && current_page == "contratsTypes") {
|
||||
modalViewContratsType_clear(modalViewContratsType);
|
||||
modalViewContratsType_loadDatas(modalViewContratsType, id);
|
||||
}
|
||||
}
|
||||
|
||||
// ADD
|
||||
modalAddContratsType = $(contratsTypesConf.add_modalSelector);
|
||||
if(modalAddContratsType.length>0) initAddContratsType();
|
||||
|
||||
// EDIT
|
||||
modalEditContratsType = $(contratsTypesConf.edit_modalSelector);
|
||||
if(modalEditContratsType.length>0) initEditContratsType();
|
||||
|
||||
// DELETE
|
||||
modalDeleteContratsType = $(contratsTypesConf.delete_modalSelector);
|
||||
if(modalDeleteContratsType.length>0) initDeleteContratsType();
|
||||
});
|
||||
|
||||
/***** MODAL VIEW *****/
|
||||
function initViewContratsType() {
|
||||
// INIT VIEW BTNs
|
||||
var initBtnFct = function() { modalForm_initBtnView(
|
||||
$(contratsTypesConf.view_btnSelector), // BTNs
|
||||
modalViewContratsType, // MODAL
|
||||
modalViewContratsType_clear, // CLEAR FUNCTION
|
||||
modalViewContratsType_loadDatas // LOAD DATAS FUNCTION
|
||||
)};
|
||||
registerListProgressLoadCbkFct( $("tbody.progressLoadList"), initBtnFct );
|
||||
initBtnFct();
|
||||
|
||||
// CANCEL
|
||||
modalViewContratsType.on('hidden.bs.modal', function() { modalViewContratsType_clear(modalViewContratsType); });
|
||||
}
|
||||
|
||||
function modalViewContratsType_loadDatas(modal, id) {
|
||||
$.post(contratsTypesConf.baseURL, { 'ref' : id, 'action' : 'getDatas' }, function(jsonTxt) {
|
||||
var datas = JSON.parse(jsonTxt);
|
||||
|
||||
modal.find("small.db_ref > span").html(datas.ref);
|
||||
|
||||
modal.find("td.nom").html(datas.nom);
|
||||
modal.find("td.groupe").html(datas.groupe_nom);
|
||||
modal.find("td.frequence").html(datas.frequence_print);
|
||||
modal.find("td.panier_type").html(datas.panier_type_nom);
|
||||
modal.find("td.nb_paniers").html(datas.nb_paniers + " panier" + (datas.nb_paniers>1 ? "s" : ""));
|
||||
modal.find("td.prix_total").html(datas.prix_total + " €");
|
||||
|
||||
modal.modal('show');
|
||||
}).fail(function() { alert("("+contratsTypesConf.type+" - load modal view)"); });
|
||||
}
|
||||
|
||||
function modalViewContratsType_clear(modal) {
|
||||
modal.removeAttr("view_id");
|
||||
|
||||
modal.find("small.db_ref > span").html("");
|
||||
|
||||
modal.find("td.nom").html("");
|
||||
modal.find("td.groupe").html("");
|
||||
modal.find("td.frequence").html("");
|
||||
modal.find("td.panier_type").html("");
|
||||
modal.find("td.nb_paniers").html("");
|
||||
modal.find("td.prix_total").html("");
|
||||
}
|
||||
|
||||
/***** MODAL FORM ADD/EDIT *****/
|
||||
function modalFormContratsType_init(modal) {
|
||||
modal.find("form").on("submit", function(e) { e.preventDefault(); });
|
||||
|
||||
// GROUPE
|
||||
modal.find("select[name=groupe]").change(function(e) { modalFormContratsType_refreshPaniersTypesSelectList(modal, $(this).val()); });
|
||||
|
||||
// FREQUENCE
|
||||
modal.find("select[name=frequence]").change(function(e) { $(this).blur(); });
|
||||
|
||||
// PANIERS TYPE
|
||||
modal.find("select[name=panier_type]").change(function(e) {
|
||||
$(this).blur();
|
||||
$(this).attr("old", $(this).attr("valeur"))
|
||||
.attr("valeur", $(this).find("option:selected").attr("valeur"));
|
||||
modalFormContratsType_calcPrixTotal(modal, false);
|
||||
}).focus(function(e) {
|
||||
$(this).attr("old", $(this).attr("valeur"));
|
||||
});
|
||||
|
||||
// NB PANIERS
|
||||
initIntInputWithLimits(modal.find("input[name=nb_paniers]"), 1, 99);
|
||||
modal.find("input[name=nb_paniers]").focus(function(e) {
|
||||
$(this).attr("old", $(this).val());
|
||||
}).change( function(e) {
|
||||
modalFormContratsType_calcPrixTotal(modal, false);
|
||||
});
|
||||
|
||||
// PRIX TOTAL
|
||||
initFloatInput(modal.find("input[name=prix_total]"));
|
||||
modal.find("button.btnCalcTotal").click(function(e) {
|
||||
e.preventDefault();
|
||||
$(this).blur();
|
||||
modalFormContratsType_calcPrixTotal(modal, true);
|
||||
})
|
||||
}
|
||||
|
||||
function modalFormContratsType_loadDatas(modal,id) {
|
||||
$.post(contratsTypesConf.baseURL, { 'ref' : id, 'action' : 'getDatas' }, function(jsonTxt) {
|
||||
var datas = JSON.parse(jsonTxt);
|
||||
|
||||
modal.find("input[name=nom]").val(datas.nom);
|
||||
modal.find("select[name=groupe]").val(datas.groupe_ref);
|
||||
modal.find("select[name=frequence]").val(datas.frequence);
|
||||
modal.find("select[name=panier_type]").val(datas.panier_type_ref)
|
||||
.attr("valeur", datas.panier_type_valeur)
|
||||
.attr("old", datas.panier_type_valeur);
|
||||
modal.find("input[name=nb_paniers]").val(datas.nb_paniers)
|
||||
.attr("old", datas.nb_paniers);
|
||||
modal.find("input[name=prix_total]").val(datas.prix_total);
|
||||
|
||||
if(modal) modal.modal('show');
|
||||
}).fail(function() { alert("("+contratsTypesConf.type+" - load datas in modal form)"); });
|
||||
}
|
||||
|
||||
function modalFormContratsType_refreshPaniersTypesSelectList(modal, groupe) {
|
||||
datas = {
|
||||
'action' : 'select_list',
|
||||
'groupe' : groupe
|
||||
};
|
||||
$.post("paniers.php", datas, function(result) {
|
||||
var oldVal = parseInt( modal.find("select[name=panier_type]").val() );
|
||||
modal.find("select[name=panier_type]").html(result);
|
||||
if(oldVal>0 && modal.find("select[name=panier_type] option[value="+oldVal+"]")) modal.find("select[name=panier_type]").val(oldVal);
|
||||
}).fail(function() { alert("ERREUR SERVEUR ! (form contrats type - refresh paniers types select list)"); });
|
||||
}
|
||||
|
||||
function modalFormContratsType_calcPrixTotal(modal, force) {
|
||||
var panier_type = modal.find("select[name=panier_type]");
|
||||
var ipt_nb_paniers = modal.find("input[name=nb_paniers]");
|
||||
var ipt_total = modal.find("input[name=prix_total]");
|
||||
|
||||
var old_valeur_panier = parseFloat( panier_type.attr("old") );
|
||||
if(!old_valeur_panier>0) old_valeur_panier = 0.0;
|
||||
var valeur_panier = parseFloat( panier_type.attr("valeur") );
|
||||
if(!valeur_panier>0) valeur_panier = 0.0;
|
||||
var old_nb_paniers = parseFloat( ipt_nb_paniers.attr("old") );
|
||||
if(!nb_paniers>0) nb_paniers = 0.0;
|
||||
var nb_paniers = parseFloat( ipt_nb_paniers.val() );
|
||||
if(!nb_paniers>0) nb_paniers = 0.0;
|
||||
var total = parseFloat( ipt_total.val() );
|
||||
if(!total>0) total = 0.0;
|
||||
|
||||
if((
|
||||
(old_valeur_panier != valeur_panier || old_nb_paniers != nb_paniers)
|
||||
&& total == (old_valeur_panier * old_nb_paniers)
|
||||
) || force) ipt_total.val(number_format(nb_paniers * valeur_panier, 2, ".", ""));
|
||||
|
||||
panier_type.attr("old", panier_type.find("option:selected").attr("valeur"));
|
||||
ipt_nb_paniers.attr("old", ipt_nb_paniers.val());
|
||||
}
|
||||
|
||||
function modalFormContratsType_clear(modal) {
|
||||
modal.removeAttr("edit_id");
|
||||
modal.find("div.modaLoader").removeClass("show");
|
||||
|
||||
modal.find("input[name=nom]").val("");
|
||||
modal.find("select[name=groupe]").val(0);
|
||||
modal.find("select[name=frequence]").val(0);
|
||||
modal.find("select[name=panier_type]").val(0).attr("valeur", 0).attr("old", 0);
|
||||
modal.find("input[name=nb_paniers]").val(1).attr("old", 1);
|
||||
modal.find("input[name=prix_total]").val(0);
|
||||
}
|
||||
|
||||
function modalFormContratsType_getDatas(modal) {
|
||||
var datas = {
|
||||
'nom' : modal.find("input[name=nom]").val(),
|
||||
'groupe' : parseInt( modal.find("select[name=groupe]").val() ),
|
||||
'frequence' : modal.find("select[name=frequence]").val(),
|
||||
'panier_type' : parseInt( modal.find("select[name=panier_type]").val() ),
|
||||
'nb_paniers' : parseInt( modal.find("input[name=nb_paniers]").val() ),
|
||||
'prix_total' : parseFloat( modal.find("input[name=prix_total]").val() )
|
||||
};
|
||||
return datas;
|
||||
}
|
||||
|
||||
function modalFormContratsType_checkDatas(datas) {
|
||||
if( datas.nom==""
|
||||
|| !datas.groupe>0
|
||||
|| !(datas.frequence=="hebdo" || datas.frequence=="quinz")
|
||||
|| !datas.panier_type>0
|
||||
|| !datas.nb_paniers>1 ) {
|
||||
alert("ERREUR : un nom et tous les crit!ères du type de contrat doivent être renseigné !");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/***** ADD *****/
|
||||
function initAddContratsType() {
|
||||
// INIT FORM
|
||||
modalFormContratsType_init(modalAddContratsType);
|
||||
|
||||
// INIT ADD BTN
|
||||
modalForm_initBtnAdd(
|
||||
$(contratsTypesConf.add_btnSelector), // BTN ADD
|
||||
modalAddContratsType, // MODAL
|
||||
modalFormContratsType_clear // CLEAR FORM FUNCTION
|
||||
);
|
||||
|
||||
// INIT SAVE BTN
|
||||
modalForm_initBtnSaveAdd(
|
||||
modalAddContratsType.find(".btnSave"), // BTN SAVE
|
||||
contratsTypesConf.type, // ADD TYPE
|
||||
modalAddContratsType, // MODAL
|
||||
modalFormContratsType_getDatas, // GET FORM DATAS FUNCTION
|
||||
modalFormContratsType_checkDatas, // CHECK FORM DATAS FUNCTION
|
||||
contratsTypesConf.baseURL // SAVE URL
|
||||
);
|
||||
|
||||
// CANCEL
|
||||
modalAddContratsType.on('hidden.bs.modal', function (e) { modalFormContratsType_clear(modalAddContratsType); });
|
||||
}
|
||||
|
||||
/***** EDIT *****/
|
||||
function initEditContratsType() {
|
||||
// INIT FORM
|
||||
modalFormContratsType_init(modalEditContratsType);
|
||||
|
||||
// INIT EDIT BTNs
|
||||
var initBtnFct = function() { modalForm_initBtnEdit(
|
||||
$(contratsTypesConf.edit_btnSelector), // BTNs
|
||||
modalEditContratsType, // MODAL
|
||||
modalFormContratsType_clear, // CLEAR FUNCTION
|
||||
modalFormContratsType_loadDatas // LOAD DATAS FUNCTION
|
||||
)};
|
||||
registerListProgressLoadCbkFct( $("tbody.progressLoadList"), initBtnFct );
|
||||
initBtnFct();
|
||||
|
||||
// INIT SAVE EDIT BTN
|
||||
modalForm_initBtnSaveEdit(
|
||||
modalEditContratsType.find(".btnSave"), // BTN SAVE
|
||||
contratsTypesConf.type, // EDIT TYPE
|
||||
modalEditContratsType, // MODAL
|
||||
modalFormContratsType_getDatas, // GET FORM DATAS FUNCTION
|
||||
modalFormContratsType_checkDatas, // CHECK FORM DATAS FUNCTION
|
||||
contratsTypesConf.baseURL // SAVE URL
|
||||
);
|
||||
|
||||
// CANCEL
|
||||
modalEditContratsType.on('hidden.bs.modal', function (e) { modalFormContratsType_clear(modalEditContratsType); });
|
||||
}
|
||||
|
||||
/***** DELETE *****/
|
||||
function initDeleteContratsType() {
|
||||
// INIT DELETE BTNs
|
||||
var initBtnFct = function() { modalForm_initBtnDelete(
|
||||
$(contratsTypesConf.delete_btnSelector), // BTNs
|
||||
modalDeleteContratsType, // MODAL
|
||||
modalDeleteContratsType_clear, // CLEAR MODAL FUNCTION
|
||||
modalDeleteContratsType_loadDatas // LOAD DATAS FUNCTION
|
||||
)};
|
||||
registerListProgressLoadCbkFct( $("tbody.progressLoadList"), initBtnFct );
|
||||
initBtnFct();
|
||||
|
||||
// INIT SAVE DELETE BTN
|
||||
modalForm_initBtnSaveDelete(
|
||||
modalDeleteContratsType.find(".btnSave"), // BTN SAVE
|
||||
contratsTypesConf.type, // DELETE TYPE
|
||||
modalDeleteContratsType, // MODAL
|
||||
false, // GET FORM DATAS FUNCTION
|
||||
false, // CHECK FORM DATAS FUNCTION
|
||||
contratsTypesConf.baseURL // SAVE URL
|
||||
);
|
||||
|
||||
// CANCEL
|
||||
modalDeleteContratsType.on('hidden.bs.modal', function (e) { modalDeleteContratsType_clear(); });
|
||||
}
|
||||
|
||||
function modalDeleteContratsType_loadDatas(btn, id) {
|
||||
modalDeleteContratsType.find('b.name').html( btn.attr('nom') );
|
||||
modalDeleteContratsType.modal('show');
|
||||
}
|
||||
|
||||
function modalDeleteContratsType_clear() {
|
||||
modalDeleteContratsType.removeAttr("delete_id");
|
||||
modalDeleteContratsType.find('b.name').html("");
|
||||
}
|
||||
|
|
@ -605,9 +605,15 @@ $.fn.listProgressLoad_resize = function() {
|
|||
|
||||
/* SEARCH */
|
||||
|
||||
$.fn.preventFormValidation = function() {
|
||||
$(this).on("submit", function(e) { e.preventDefault(); e.stopPropagation(); });
|
||||
}
|
||||
|
||||
$.fn.initSearchGroup = function() {
|
||||
$(this).find("input[search]").unbind('keypress').keypress( function(event) {
|
||||
$(this).find("input[name=search]").unbind('keypress').keypress( function(event) {
|
||||
if(event.keyCode==13) {
|
||||
event.preventDefault();
|
||||
console.log("SEARCH", $(this).val());
|
||||
$(this).blur();
|
||||
document.location = "?search="+$(this).val();
|
||||
}
|
||||
|
|
@ -680,6 +686,14 @@ function beep(duration, frequency, volume, type, callback) {
|
|||
oscillator.stop(audioCtx.currentTime + ((duration || 500) / 1000));
|
||||
}
|
||||
|
||||
function round_number(number, decimals) {
|
||||
if(!decimals>0) return Math.round(number);
|
||||
number = parseFloat(number);
|
||||
mux = decimals * 10;
|
||||
n = Math.round(number * mux);
|
||||
return n / mux;
|
||||
}
|
||||
|
||||
function number_format(number, decimals, dec_point, thousands_sep) {
|
||||
number = (number + '')
|
||||
.replace(/[^0-9+\-Ee.]/g, '');
|
||||
|
|
@ -1772,84 +1786,3 @@ function uploadTmpPhotoFile(div, file, oldFile, calbckURL) {
|
|||
}
|
||||
}
|
||||
|
||||
function getUrlParameters() {
|
||||
var sPageURL = window.location.search.substring(1),
|
||||
sURLVariables = sPageURL.split('&'),
|
||||
sParameterName,
|
||||
params = [],
|
||||
i;
|
||||
for (i = 0; i < sURLVariables.length; i++) {
|
||||
sParameterName = sURLVariables[i].split('=');
|
||||
params[sParameterName[0]] = (sParameterName[1] === undefined) ? true : decodeURIComponent(sParameterName[1]);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
function getUrlParameter(sParam) {
|
||||
var sPageURL = window.location.search.substring(1),
|
||||
sURLVariables = sPageURL.split('&'),
|
||||
sParameterName,
|
||||
i;
|
||||
|
||||
for (i = 0; i < sURLVariables.length; i++) {
|
||||
sParameterName = sURLVariables[i].split('=');
|
||||
|
||||
if (sParameterName[0] === sParam) {
|
||||
return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function beep(duration, frequency, volume, type, callback) {
|
||||
var audioCtx = new (window.AudioContext || window.webkitAudioContext || window.audioContext);
|
||||
var oscillator = audioCtx.createOscillator();
|
||||
var gainNode = audioCtx.createGain();
|
||||
|
||||
oscillator.connect(gainNode);
|
||||
gainNode.connect(audioCtx.destination);
|
||||
|
||||
if(volume) gainNode.gain.value = volume;
|
||||
if(frequency) oscillator.frequency.value = frequency;
|
||||
if(type) oscillator.type = type;
|
||||
if(callback) oscillator.onended = callback;
|
||||
|
||||
oscillator.start(audioCtx.currentTime);
|
||||
oscillator.stop(audioCtx.currentTime + ((duration || 500) / 1000));
|
||||
}
|
||||
|
||||
function round_number(number, decimals) {
|
||||
if(!decimals>0) return Math.round(number);
|
||||
number = parseFloat(number);
|
||||
mux = decimals * 10;
|
||||
n = Math.round(number * mux);
|
||||
return n / mux;
|
||||
}
|
||||
|
||||
function number_format(number, decimals, dec_point, thousands_sep) {
|
||||
number = (number + '')
|
||||
.replace(/[^0-9+\-Ee.]/g, '');
|
||||
var n = !isFinite(+number) ? 0 : +number,
|
||||
prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
|
||||
sep = (typeof thousands_sep === 'undefined') ? '' : thousands_sep,
|
||||
dec = (typeof dec_point === 'undefined') ? '.' : dec_point,
|
||||
s = '',
|
||||
toFixedFix = function(n, prec) {
|
||||
var k = Math.pow(10, prec);
|
||||
return '' + (Math.round(n * k) / k)
|
||||
.toFixed(prec);
|
||||
};
|
||||
// Fix for IE parseFloat(0.55).toFixed(0) = 0;
|
||||
s = (prec ? toFixedFix(n, prec) : '' + Math.round(n))
|
||||
.split('.');
|
||||
if (s[0].length > 3) {
|
||||
s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
|
||||
}
|
||||
if ((s[1] || '')
|
||||
.length < prec) {
|
||||
s[1] = s[1] || '';
|
||||
s[1] += new Array(prec - s[1].length + 1)
|
||||
.join('0');
|
||||
}
|
||||
return s.join(dec);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ var legumesConf = {
|
|||
list_selector : "#legumesList",
|
||||
btn_list_print_selector : "#btnPrintLegumesList",
|
||||
// SEARCH
|
||||
search_form_selector : "#legumesSearch",
|
||||
search_selector : "#legumesSearch .searchGrp",
|
||||
filtres_selector : "#legumesSearch select",
|
||||
// VIEW
|
||||
view_modalSelector : "#modalViewLegume",
|
||||
view_btnSelector : ".btnViewLegume",
|
||||
|
|
@ -255,7 +255,7 @@ function modalViewLegume_addTarif(modal, datas, tarifs_courant) {
|
|||
|
||||
/***** MODAL FORM ADD/EDIT *****/
|
||||
function modalFormLegume_init(modal) {
|
||||
modal.find("form").on("submit", function(e) { e.preventDefault(); });
|
||||
modal.find("form").preventFormValidation();
|
||||
|
||||
// BTN ADD TARIF
|
||||
modal.find("button.btnAddTarif").click(function(e) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,223 @@
|
|||
// SETTINGS
|
||||
var lieuxConf = {
|
||||
type : "lieu",
|
||||
baseURL : "lieux.php",
|
||||
// LIST
|
||||
list_selector : "#lieuxList",
|
||||
// SEARCH
|
||||
search_selector : "#lieuxSearch .searchGrp",
|
||||
// VIEW
|
||||
view_modalSelector : "#modalViewLieu",
|
||||
view_btnSelector : ".btnViewLieu",
|
||||
// ADD
|
||||
add_modalSelector : "#modalAddLieu",
|
||||
add_btnSelector : "#btnAddLieu",
|
||||
// EDIT
|
||||
edit_modalSelector : "#modalEditLieu",
|
||||
edit_btnSelector : ".btnEditLieu",
|
||||
// DELETE
|
||||
delete_modalSelector : "#modalDeleteLieu",
|
||||
delete_btnSelector : ".btnDeleteLieu",
|
||||
}
|
||||
|
||||
// MODALS
|
||||
var modalViewLieu = false;
|
||||
var modalAddLieu = false;
|
||||
var modalEditLieu = false;
|
||||
var modalDeleteLieu = false;
|
||||
|
||||
$(document).ready( function() {
|
||||
// LIST LOADER
|
||||
initListProgressLoad($(lieuxConf.list_selector), lieuxConf.baseURL, lieuxConf.type+" list");
|
||||
|
||||
// SEARCH
|
||||
$(lieuxConf.search_selector).initSearchGroup();
|
||||
|
||||
// VIEW
|
||||
modalViewLieu = $(lieuxConf.view_modalSelector);
|
||||
if(modalViewLieu.length>0) {
|
||||
initViewLieu();
|
||||
// VIEW REQUEST
|
||||
var id = getUrlParameter("ref");
|
||||
if(id!==false && parseInt(id)>0 && current_page == "lieux") {
|
||||
modalViewLieu_clear(modalViewLieu);
|
||||
modalViewLieu_loadDatas(modalViewLieu, id);
|
||||
}
|
||||
}
|
||||
|
||||
// ADD
|
||||
modalAddLieu = $(lieuxConf.add_modalSelector);
|
||||
if(modalAddLieu.length>0) initAddLieu();
|
||||
|
||||
// EDIT
|
||||
modalEditLieu = $(lieuxConf.edit_modalSelector);
|
||||
if(modalEditLieu.length>0) initEditLieu();
|
||||
|
||||
// DELETE
|
||||
modalDeleteLieu = $(lieuxConf.delete_modalSelector);
|
||||
if(modalDeleteLieu.length>0) initDeleteLieu();
|
||||
});
|
||||
|
||||
/***** MODAL VIEW *****/
|
||||
function initViewLieu() {
|
||||
// INIT VIEW BTNs
|
||||
var initBtnFct = function() { modalForm_initBtnView(
|
||||
$(lieuxConf.view_btnSelector), // BTNs
|
||||
modalViewLieu, // MODAL
|
||||
modalViewLieu_clear, // CLEAR FUNCTION
|
||||
modalViewLieu_loadDatas // LOAD DATAS FUNCTION
|
||||
)};
|
||||
registerListProgressLoadCbkFct( $("tbody.progressLoadList"), initBtnFct );
|
||||
initBtnFct();
|
||||
|
||||
// CANCEL
|
||||
modalViewLieu.on('hidden.bs.modal', function() { modalViewLieu_clear(modalViewLieu); });
|
||||
}
|
||||
|
||||
function modalViewLieu_loadDatas(modal, id) {
|
||||
$.post(lieuxConf.baseURL, { 'ref' : id, 'action' : 'getDatas' }, function(jsonTxt) {
|
||||
var datas = JSON.parse(jsonTxt);
|
||||
|
||||
modal.find("small.db_ref > span").html(datas.ref);
|
||||
|
||||
modal.find("td.nom").html(datas.nom);
|
||||
|
||||
modal.modal('show');
|
||||
}).fail(function() { alert("("+lieuxConf.type+" - load modal view)"); });
|
||||
}
|
||||
|
||||
function modalViewLieu_clear(modal) {
|
||||
modal.removeAttr("view_id");
|
||||
|
||||
modal.find("small.db_ref > span").html("");
|
||||
|
||||
modal.find("td.nom").html("");
|
||||
}
|
||||
|
||||
/***** MODAL FORM ADD/EDIT *****/
|
||||
function modalFormLieu_init(modal) {
|
||||
modal.find("form").preventFormValidation();
|
||||
}
|
||||
|
||||
function modalFormLieu_loadDatas(modal,id) {
|
||||
$.post(lieuxConf.baseURL, { 'ref' : id, 'action' : 'getDatas' }, function(jsonTxt) {
|
||||
var datas = JSON.parse(jsonTxt);
|
||||
|
||||
modal.find("input[name=nom]").val(datas.nom);
|
||||
|
||||
if(modal) modal.modal('show');
|
||||
}).fail(function() { alert("("+lieuxConf.type+" - load datas in modal form)"); });
|
||||
}
|
||||
|
||||
function modalFormLieu_clear(modal) {
|
||||
modal.removeAttr("edit_id");
|
||||
modal.find("div.modaLoader").removeClass("show");
|
||||
|
||||
modal.find("input[name=nom]").val("");
|
||||
}
|
||||
|
||||
function modalFormLieu_getDatas(modal) {
|
||||
var datas = {
|
||||
'nom' : modal.find("input[name=nom]").val()
|
||||
};
|
||||
return datas;
|
||||
}
|
||||
|
||||
function modalFormLieu_checkDatas(datas) {
|
||||
if(datas.nom=="") {
|
||||
alert("ERREUR : merci de donner un nom à ce lieu !");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/***** ADD *****/
|
||||
function initAddLieu() {
|
||||
// INIT FORM
|
||||
modalFormLieu_init(modalAddLieu);
|
||||
|
||||
// INIT ADD BTN
|
||||
modalForm_initBtnAdd(
|
||||
$(lieuxConf.add_btnSelector), // BTN ADD
|
||||
modalAddLieu, // MODAL
|
||||
modalFormLieu_clear // CLEAR FORM FUNCTION
|
||||
);
|
||||
|
||||
// INIT SAVE BTN
|
||||
modalForm_initBtnSaveAdd(
|
||||
modalAddLieu.find(".btnSave"), // BTN SAVE
|
||||
lieuxConf.type, // ADD TYPE
|
||||
modalAddLieu, // MODAL
|
||||
modalFormLieu_getDatas, // GET FORM DATAS FUNCTION
|
||||
modalFormLieu_checkDatas, // CHECK FORM DATAS FUNCTION
|
||||
lieuxConf.baseURL // SAVE URL
|
||||
);
|
||||
|
||||
// CANCEL
|
||||
modalAddLieu.on('hidden.bs.modal', function (e) { modalFormLieu_clear(modalAddLieu); });
|
||||
}
|
||||
|
||||
/***** EDIT *****/
|
||||
function initEditLieu() {
|
||||
// INIT FORM
|
||||
modalFormLieu_init(modalEditLieu);
|
||||
|
||||
// INIT EDIT BTNs
|
||||
var initBtnFct = function() { modalForm_initBtnEdit(
|
||||
$(lieuxConf.edit_btnSelector), // BTNs
|
||||
modalEditLieu, // MODAL
|
||||
modalFormLieu_clear, // CLEAR FUNCTION
|
||||
modalFormLieu_loadDatas // LOAD DATAS FUNCTION
|
||||
)};
|
||||
registerListProgressLoadCbkFct( $("tbody.progressLoadList"), initBtnFct );
|
||||
initBtnFct();
|
||||
|
||||
// INIT SAVE EDIT BTN
|
||||
modalForm_initBtnSaveEdit(
|
||||
modalEditLieu.find(".btnSave"), // BTN SAVE
|
||||
lieuxConf.type, // EDIT TYPE
|
||||
modalEditLieu, // MODAL
|
||||
modalFormLieu_getDatas, // GET FORM DATAS FUNCTION
|
||||
modalFormLieu_checkDatas, // CHECK FORM DATAS FUNCTION
|
||||
lieuxConf.baseURL // SAVE URL
|
||||
);
|
||||
|
||||
// CANCEL
|
||||
modalEditLieu.on('hidden.bs.modal', function (e) { modalFormLieu_clear(modalEditLieu); });
|
||||
}
|
||||
|
||||
/***** DELETE *****/
|
||||
function initDeleteLieu() {
|
||||
// INIT DELETE BTNs
|
||||
var initBtnFct = function() { modalForm_initBtnDelete(
|
||||
$(lieuxConf.delete_btnSelector), // BTNs
|
||||
modalDeleteLieu, // MODAL
|
||||
modalDeleteLieu_clear, // CLEAR MODAL FUNCTION
|
||||
modalDeleteLieu_loadDatas // LOAD DATAS FUNCTION
|
||||
)};
|
||||
registerListProgressLoadCbkFct( $("tbody.progressLoadList"), initBtnFct );
|
||||
initBtnFct();
|
||||
|
||||
// INIT SAVE DELETE BTN
|
||||
modalForm_initBtnSaveDelete(
|
||||
modalDeleteLieu.find(".btnSave"), // BTN SAVE
|
||||
lieuxConf.type, // DELETE TYPE
|
||||
modalDeleteLieu, // MODAL
|
||||
false, // GET FORM DATAS FUNCTION
|
||||
false, // CHECK FORM DATAS FUNCTION
|
||||
lieuxConf.baseURL // SAVE URL
|
||||
);
|
||||
|
||||
// CANCEL
|
||||
modalDeleteLieu.on('hidden.bs.modal', function (e) { modalDeleteLieu_clear(); });
|
||||
}
|
||||
|
||||
function modalDeleteLieu_loadDatas(btn, id) {
|
||||
modalDeleteLieu.find('b.name').html( btn.attr('nom') );
|
||||
modalDeleteLieu.modal('show');
|
||||
}
|
||||
|
||||
function modalDeleteLieu_clear() {
|
||||
modalDeleteLieu.removeAttr("delete_id");
|
||||
modalDeleteLieu.find('b.name').html("");
|
||||
}
|
||||
|
|
@ -259,7 +259,7 @@ function modalViewLivraison_initPrintBtn() {
|
|||
|
||||
/***** MODAL FORM ADD/EDIT *****/
|
||||
function modalFormLivraison_init(modal) {
|
||||
modal.find("modal").on("submit", function(e) { e.preventDefault(); });
|
||||
modal.find("form").preventFormValidation();
|
||||
modalForm_initTabs(modal);
|
||||
|
||||
// TAB GENERAL
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ function modalViewPanier_clear(modal) {
|
|||
|
||||
/***** MODAL FORM ADD/EDIT *****/
|
||||
function modalFormPanier_init(modal) {
|
||||
modal.find("form").on("submit", function(e) { e.preventDefault(); });
|
||||
modal.find("form").preventFormValidation();
|
||||
|
||||
// NOM
|
||||
initFirstUpperCaseInput(modal.find("input[name=nom]"), null, function() { $(this).blur(); });
|
||||
|
|
|
|||
|
|
@ -0,0 +1,223 @@
|
|||
// SETTINGS
|
||||
var paniersGroupesConf = {
|
||||
type : "groupe",
|
||||
baseURL : "paniers_groupes.php",
|
||||
// LIST
|
||||
list_selector : "#paniersGroupesList",
|
||||
// SEARCH
|
||||
search_selector : "#paniersGroupesSearch .searchGrp",
|
||||
// VIEW
|
||||
view_modalSelector : "#modalViewPaniersGroupe",
|
||||
view_btnSelector : ".btnViewPaniersGroupe",
|
||||
// ADD
|
||||
add_modalSelector : "#modalAddPaniersGroupe",
|
||||
add_btnSelector : "#btnAddPaniersGroupe",
|
||||
// EDIT
|
||||
edit_modalSelector : "#modalEditPaniersGroupe",
|
||||
edit_btnSelector : ".btnEditPaniersGroupe",
|
||||
// DELETE
|
||||
delete_modalSelector : "#modalDeletePaniersGroupe",
|
||||
delete_btnSelector : ".btnDeletePaniersGroupe",
|
||||
}
|
||||
|
||||
// MODALS
|
||||
var modalViewPaniersGroupe = false;
|
||||
var modalAddPaniersGroupe = false;
|
||||
var modalEditPaniersGroupe = false;
|
||||
var modalDeletePaniersGroupe = false;
|
||||
|
||||
$(document).ready( function() {
|
||||
// LIST LOADER
|
||||
initListProgressLoad($(paniersGroupesConf.list_selector), paniersGroupesConf.baseURL, paniersGroupesConf.type+" list");
|
||||
|
||||
// SEARCH
|
||||
$(paniersGroupesConf.search_selector).initSearchGroup();
|
||||
|
||||
// VIEW
|
||||
modalViewPaniersGroupe = $(paniersGroupesConf.view_modalSelector);
|
||||
if(modalViewPaniersGroupe.length>0) {
|
||||
initViewPaniersGroupe();
|
||||
// VIEW REQUEST
|
||||
var id = getUrlParameter("ref");
|
||||
if(id!==false && parseInt(id)>0 && current_page == "paniersGroupes") {
|
||||
modalViewPaniersGroupe_clear(modalViewPaniersGroupe);
|
||||
modalViewPaniersGroupe_loadDatas(modalViewPaniersGroupe, id);
|
||||
}
|
||||
}
|
||||
|
||||
// ADD
|
||||
modalAddPaniersGroupe = $(paniersGroupesConf.add_modalSelector);
|
||||
if(modalAddPaniersGroupe.length>0) initAddPaniersGroupe();
|
||||
|
||||
// EDIT
|
||||
modalEditPaniersGroupe = $(paniersGroupesConf.edit_modalSelector);
|
||||
if(modalEditPaniersGroupe.length>0) initEditPaniersGroupe();
|
||||
|
||||
// DELETE
|
||||
modalDeletePaniersGroupe = $(paniersGroupesConf.delete_modalSelector);
|
||||
if(modalDeletePaniersGroupe.length>0) initDeletePaniersGroupe();
|
||||
});
|
||||
|
||||
/***** MODAL VIEW *****/
|
||||
function initViewPaniersGroupe() {
|
||||
// INIT VIEW BTNs
|
||||
var initBtnFct = function() { modalForm_initBtnView(
|
||||
$(paniersGroupesConf.view_btnSelector), // BTNs
|
||||
modalViewPaniersGroupe, // MODAL
|
||||
modalViewPaniersGroupe_clear, // CLEAR FUNCTION
|
||||
modalViewPaniersGroupe_loadDatas // LOAD DATAS FUNCTION
|
||||
)};
|
||||
registerListProgressLoadCbkFct( $("tbody.progressLoadList"), initBtnFct );
|
||||
initBtnFct();
|
||||
|
||||
// CANCEL
|
||||
modalViewPaniersGroupe.on('hidden.bs.modal', function() { modalViewPaniersGroupe_clear(modalViewPaniersGroupe); });
|
||||
}
|
||||
|
||||
function modalViewPaniersGroupe_loadDatas(modal, id) {
|
||||
$.post(paniersGroupesConf.baseURL, { 'ref' : id, 'action' : 'getDatas' }, function(jsonTxt) {
|
||||
var datas = JSON.parse(jsonTxt);
|
||||
|
||||
modal.find("small.db_ref > span").html(datas.ref);
|
||||
|
||||
modal.find("td.nom").html(datas.nom);
|
||||
|
||||
modal.modal('show');
|
||||
}).fail(function() { alert("("+paniersGroupesConf.type+" - load modal view)"); });
|
||||
}
|
||||
|
||||
function modalViewPaniersGroupe_clear(modal) {
|
||||
modal.removeAttr("view_id");
|
||||
|
||||
modal.find("small.db_ref > span").html("");
|
||||
|
||||
modal.find("td.nom").html("");
|
||||
}
|
||||
|
||||
/***** MODAL FORM ADD/EDIT *****/
|
||||
function modalFormPaniersGroupe_init(modal) {
|
||||
modal.find("form").preventFormValidation();
|
||||
}
|
||||
|
||||
function modalFormPaniersGroupe_loadDatas(modal,id) {
|
||||
$.post(paniersGroupesConf.baseURL, { 'ref' : id, 'action' : 'getDatas' }, function(jsonTxt) {
|
||||
var datas = JSON.parse(jsonTxt);
|
||||
|
||||
modal.find("input[name=nom]").val(datas.nom);
|
||||
|
||||
if(modal) modal.modal('show');
|
||||
}).fail(function() { alert("("+paniersGroupesConf.type+" - load datas in modal form)"); });
|
||||
}
|
||||
|
||||
function modalFormPaniersGroupe_clear(modal) {
|
||||
modal.removeAttr("edit_id");
|
||||
modal.find("div.modaLoader").removeClass("show");
|
||||
|
||||
modal.find("input[name=nom]").val("");
|
||||
}
|
||||
|
||||
function modalFormPaniersGroupe_getDatas(modal) {
|
||||
var datas = {
|
||||
'nom' : modal.find("input[name=nom]").val()
|
||||
};
|
||||
return datas;
|
||||
}
|
||||
|
||||
function modalFormPaniersGroupe_checkDatas(datas) {
|
||||
if(datas.nom=="") {
|
||||
alert("ERREUR : merci de donner un nomà ce groupe !");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/***** ADD *****/
|
||||
function initAddPaniersGroupe() {
|
||||
// INIT FORM
|
||||
modalFormPaniersGroupe_init(modalAddPaniersGroupe);
|
||||
|
||||
// INIT ADD BTN
|
||||
modalForm_initBtnAdd(
|
||||
$(paniersGroupesConf.add_btnSelector), // BTN ADD
|
||||
modalAddPaniersGroupe, // MODAL
|
||||
modalFormPaniersGroupe_clear // CLEAR FORM FUNCTION
|
||||
);
|
||||
|
||||
// INIT SAVE BTN
|
||||
modalForm_initBtnSaveAdd(
|
||||
modalAddPaniersGroupe.find(".btnSave"), // BTN SAVE
|
||||
paniersGroupesConf.type, // ADD TYPE
|
||||
modalAddPaniersGroupe, // MODAL
|
||||
modalFormPaniersGroupe_getDatas, // GET FORM DATAS FUNCTION
|
||||
modalFormPaniersGroupe_checkDatas, // CHECK FORM DATAS FUNCTION
|
||||
paniersGroupesConf.baseURL // SAVE URL
|
||||
);
|
||||
|
||||
// CANCEL
|
||||
modalAddPaniersGroupe.on('hidden.bs.modal', function (e) { modalFormPaniersGroupe_clear(modalAddPaniersGroupe); });
|
||||
}
|
||||
|
||||
/***** EDIT *****/
|
||||
function initEditPaniersGroupe() {
|
||||
// INIT FORM
|
||||
modalFormPaniersGroupe_init(modalEditPaniersGroupe);
|
||||
|
||||
// INIT EDIT BTNs
|
||||
var initBtnFct = function() { modalForm_initBtnEdit(
|
||||
$(paniersGroupesConf.edit_btnSelector), // BTNs
|
||||
modalEditPaniersGroupe, // MODAL
|
||||
modalFormPaniersGroupe_clear, // CLEAR FUNCTION
|
||||
modalFormPaniersGroupe_loadDatas // LOAD DATAS FUNCTION
|
||||
)};
|
||||
registerListProgressLoadCbkFct( $("tbody.progressLoadList"), initBtnFct );
|
||||
initBtnFct();
|
||||
|
||||
// INIT SAVE EDIT BTN
|
||||
modalForm_initBtnSaveEdit(
|
||||
modalEditPaniersGroupe.find(".btnSave"), // BTN SAVE
|
||||
paniersGroupesConf.type, // EDIT TYPE
|
||||
modalEditPaniersGroupe, // MODAL
|
||||
modalFormPaniersGroupe_getDatas, // GET FORM DATAS FUNCTION
|
||||
modalFormPaniersGroupe_checkDatas, // CHECK FORM DATAS FUNCTION
|
||||
paniersGroupesConf.baseURL // SAVE URL
|
||||
);
|
||||
|
||||
// CANCEL
|
||||
modalEditPaniersGroupe.on('hidden.bs.modal', function (e) { modalFormPaniersGroupe_clear(modalEditPaniersGroupe); });
|
||||
}
|
||||
|
||||
/***** DELETE *****/
|
||||
function initDeletePaniersGroupe() {
|
||||
// INIT DELETE BTNs
|
||||
var initBtnFct = function() { modalForm_initBtnDelete(
|
||||
$(paniersGroupesConf.delete_btnSelector), // BTNs
|
||||
modalDeletePaniersGroupe, // MODAL
|
||||
modalDeletePaniersGroupe_clear, // CLEAR MODAL FUNCTION
|
||||
modalDeletePaniersGroupe_loadDatas // LOAD DATAS FUNCTION
|
||||
)};
|
||||
registerListProgressLoadCbkFct( $("tbody.progressLoadList"), initBtnFct );
|
||||
initBtnFct();
|
||||
|
||||
// INIT SAVE DELETE BTN
|
||||
modalForm_initBtnSaveDelete(
|
||||
modalDeletePaniersGroupe.find(".btnSave"), // BTN SAVE
|
||||
paniersGroupesConf.type, // DELETE TYPE
|
||||
modalDeletePaniersGroupe, // MODAL
|
||||
false, // GET FORM DATAS FUNCTION
|
||||
false, // CHECK FORM DATAS FUNCTION
|
||||
paniersGroupesConf.baseURL // SAVE URL
|
||||
);
|
||||
|
||||
// CANCEL
|
||||
modalDeletePaniersGroupe.on('hidden.bs.modal', function (e) { modalDeletePaniersGroupe_clear(); });
|
||||
}
|
||||
|
||||
function modalDeletePaniersGroupe_loadDatas(btn, id) {
|
||||
modalDeletePaniersGroupe.find('b.name').html( btn.attr('nom') );
|
||||
modalDeletePaniersGroupe.modal('show');
|
||||
}
|
||||
|
||||
function modalDeletePaniersGroupe_clear() {
|
||||
modalDeletePaniersGroupe.removeAttr("delete_id");
|
||||
modalDeletePaniersGroupe.find('b.name').html("");
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
require_once('../init.php');
|
||||
$GLOBALS['smarty']->assign('page','lieux');
|
||||
$GLOBALS['template'] = 'lieux/lieux_list.tpl';
|
||||
$GLOBALS['smarty']->assign('secondbar','lieux/lieux_secondbar.tpl');
|
||||
$jsFiles[] = PUBLIC_HTML_ADMIN.'js/lieux.js';
|
||||
|
||||
if($id>0 && $action) {
|
||||
$infos = getLieuDatas($id);
|
||||
switch($action) {
|
||||
// AJAX GET DATAS
|
||||
case "getDatas": die(json_encode($infos)); break;
|
||||
// EDIT
|
||||
case "edit": {
|
||||
$datas = getLieuDatasFromRequest();
|
||||
die( strval( updateLieu($id,$datas) ) );
|
||||
} break;
|
||||
// DELETE
|
||||
case "delete" : die( strval( deleteLieu($id) ) ); break;
|
||||
// DEFAULT
|
||||
default: die("NO ACTION");
|
||||
}
|
||||
}
|
||||
switch($action) {
|
||||
// ADD
|
||||
case "add": {
|
||||
$datas = getLieuDatasFromRequest();
|
||||
die( strval( addLieu($datas) ) );
|
||||
} break;
|
||||
// SELECT LIST
|
||||
case "select_list": {
|
||||
$GLOBALS['smarty'] -> assign('lieux_list', getLieuxList());
|
||||
die( $GLOBALS['smarty']->fetch("lieux/lieux_select_list.tpl") );
|
||||
} break;
|
||||
// DEFAULT - LIST
|
||||
default: {
|
||||
// SEARCH
|
||||
$search = getSearch("lieux_search");
|
||||
|
||||
// LIMITS
|
||||
$limits = array("start" => 0, "end" => LIST_NB_LIGNES_PAR_PAGE, "nbItemsByPage" => LIST_NB_LIGNES_PAR_PAGE, "max" => getNbLieuxInList($search));
|
||||
if(isset($_REQUEST['startListAt']) && (int)$_REQUEST['startListAt']>0) {
|
||||
$limits['start'] = intval($_REQUEST['startListAt']);
|
||||
$limits['end'] = $limits['start'] + $limits['nbItemsByPage'];
|
||||
if($limits['end'] > $limits['max']) $limits['end'] = $limits['max'];
|
||||
}
|
||||
$limits['rest'] = $limits['max'] - $limits['end'];
|
||||
$GLOBALS['smarty'] -> assign('list_limits',$limits);
|
||||
|
||||
// LIST
|
||||
$order = getListOrder('lieux_list_order', 'lieux_list_sens', $allowLieuxListOrder, 'nom');
|
||||
$list = getLieuxList($order["order"], $order["sens"], $search, $limits);
|
||||
$GLOBALS['smarty'] -> assign('list',$list);
|
||||
|
||||
// LIST PART
|
||||
if(isset($_REQUEST['startListAt']) && (int)$_REQUEST['startListAt']>0) {
|
||||
$limits["list"] = $GLOBALS['smarty']->fetch("lieux/lieux_list_builder.tpl");
|
||||
die(json_encode($limits));
|
||||
}
|
||||
|
||||
// DISPLAY
|
||||
display();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
require_once('../init.php');
|
||||
$GLOBALS['smarty']->assign('page','paniers_groupes');
|
||||
$GLOBALS['template'] = 'paniers_groupes/paniers_groupes_list.tpl';
|
||||
$GLOBALS['smarty']->assign('secondbar','paniers_groupes/paniers_groupes_secondbar.tpl');
|
||||
$jsFiles[] = PUBLIC_HTML_ADMIN.'js/paniers_groupes.js';
|
||||
|
||||
if($id>0 && $action) {
|
||||
$infos = getPaniersGroupeDatas($id);
|
||||
switch($action) {
|
||||
// AJAX GET DATAS
|
||||
case "getDatas": die(json_encode($infos)); break;
|
||||
// EDIT
|
||||
case "edit": {
|
||||
$datas = getPaniersGroupeDatasFromRequest();
|
||||
die( strval( updatePaniersGroupe($id,$datas) ) );
|
||||
} break;
|
||||
// DELETE
|
||||
case "delete" : die( strval( deletePaniersGroupe($id) ) ); break;
|
||||
// DEFAULT
|
||||
default: die("NO ACTION");
|
||||
}
|
||||
}
|
||||
switch($action) {
|
||||
// ADD
|
||||
case "add": {
|
||||
$datas = getPaniersGroupeDatasFromRequest();
|
||||
die( strval( addPaniersGroupe($datas) ) );
|
||||
} break;
|
||||
// SELECT LIST
|
||||
case "select_list": {
|
||||
$GLOBALS['smarty'] -> assign('paniers_groupes_list', getPaniersGroupesList());
|
||||
die( $GLOBALS['smarty']->fetch("paniers_groupes/paniers_groupes_select_list.tpl") );
|
||||
} break;
|
||||
// DEFAULT - LIST
|
||||
default: {
|
||||
// SEARCH
|
||||
$search = getSearch("paniers_groupes_search");
|
||||
|
||||
// LIMITS
|
||||
$limits = array("start" => 0, "end" => LIST_NB_LIGNES_PAR_PAGE, "nbItemsByPage" => LIST_NB_LIGNES_PAR_PAGE, "max" => getNbPaniersGroupesInList($search));
|
||||
if(isset($_REQUEST['startListAt']) && (int)$_REQUEST['startListAt']>0) {
|
||||
$limits['start'] = intval($_REQUEST['startListAt']);
|
||||
$limits['end'] = $limits['start'] + $limits['nbItemsByPage'];
|
||||
if($limits['end'] > $limits['max']) $limits['end'] = $limits['max'];
|
||||
}
|
||||
$limits['rest'] = $limits['max'] - $limits['end'];
|
||||
$GLOBALS['smarty'] -> assign('list_limits',$limits);
|
||||
|
||||
// LIST
|
||||
$order = getListOrder('paniers_groupes_list_order', 'paniers_groupes_list_sens', $allowPaniersGroupesListOrder, "nom");
|
||||
$list = getPaniersGroupesList($order["order"], $order["sens"], $search, $limits);
|
||||
$GLOBALS['smarty'] -> assign('list',$list);
|
||||
|
||||
// LIST PART
|
||||
if(isset($_REQUEST['startListAt']) && (int)$_REQUEST['startListAt']>0) {
|
||||
$limits["list"] = $GLOBALS['smarty']->fetch("paniers_groupes/paniers_groupes_list_builder.tpl");
|
||||
die(json_encode($limits));
|
||||
}
|
||||
|
||||
// DISPLAY
|
||||
display();
|
||||
}
|
||||
}
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-filtre-search">
|
||||
<form class="navbar-form navbar-right form-filtre-search" role="search" id="clientsSearch">
|
||||
<div class="input-group class">
|
||||
<div class="navbar-form navbar-right form-filtre-search" role="search" id="clientsSearch">
|
||||
<div class="input-group searchGrp">
|
||||
<span class="input-group-addon{if $search!=""} active{/if}"><i class="glyphicon glyphicon-search"></i></span>
|
||||
<input type="text" class="form-control" placeholder="rechercher..." name="search" value="{$search}">
|
||||
{if $search!=""}<span class="input-group-addon btn-danger btnClearSearch"><i class="glyphicon glyphicon-remove"></i></span>{/if}
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
<div class="modaLoader"></div>
|
||||
<button class="hide"></button>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
|
|
@ -9,7 +8,7 @@
|
|||
<div class="form-group">
|
||||
<label>type de contrat :</label>
|
||||
<div class="input-group inlineSelectManager">
|
||||
<select class="form-control" name="type">{include file='contrats/contrats_types_select_list.tpl'}</select>
|
||||
<select class="form-control" name="type">{include file='contrats_types/contrats_types_select_list.tpl'}</select>
|
||||
<span class="input-group-btn hide">
|
||||
<button class="btn btn-default btnSecondAction"><i class="glyphicon glyphicon-remove"></i></button>
|
||||
</span>
|
||||
|
|
@ -48,7 +47,7 @@
|
|||
<div class="form-group">
|
||||
<label>lieu de dépôt :</label>
|
||||
<div class="input-group inlineSelectManager">
|
||||
<select class="form-control" name="lieu_depot">{include file='contrats/lieux_select_list.tpl'}</select>
|
||||
<select class="form-control" name="lieu_depot">{include file='lieux/lieux_select_list.tpl'}</select>
|
||||
<span class="input-group-btn hide">
|
||||
<button class="btn btn-default btnSecondAction"><i class="glyphicon glyphicon-remove"></i></button>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-filtre-search">
|
||||
<form class="navbar-form navbar-right form-filtre-search" role="search" id="contratsSearch">
|
||||
<div class="navbar-form navbar-right form-filtre-search" role="search" id="contratsSearch">
|
||||
<!-- GROUPE -->
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon{if $groupe>0} active{/if}">groupe :</span>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
<div class="input-group">
|
||||
<span class="input-group-addon{if $lieu>0} active{/if}">lieu :</span>
|
||||
<select class="form-control" name="lieu" load_value="{$lieu}" filtre_request="lieu">
|
||||
{include file='contrats/lieux_select_list.tpl'}
|
||||
{include file='lieux/lieux_select_list.tpl'}
|
||||
</select>
|
||||
</div>
|
||||
<!-- ARCHIVE -->
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
<i class="glyphicon glyphicon-print"></i>
|
||||
<span class="txt">Imprimer la liste...</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<div class="modaLoader"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>nom :</label>
|
||||
<input type="text" class="form-control" name="nom" placeholder="nom">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>groupe :</label>
|
||||
<select class="form-control" name="groupe">{include file='paniers_groupes/paniers_groupes_select_list.tpl'}</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>féquence :</label>
|
||||
<select class="form-control" name="frequence">
|
||||
<option value="hebdo">hedbomadaire</option>
|
||||
<option value="quinz">quinzaine</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>type de panier :</label>
|
||||
<select class="form-control" name="panier_type">{include file='paniers/paniers_select_list.tpl'}</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>nb. de panier :</label>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" name="nb_paniers" placeholder="nb. de panier">
|
||||
<span class="input-group-addon">panier(s)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>valeur :</label>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" name="prix_total" placeholder="prix total" leng="en">
|
||||
<span class="input-group-addon">€</span>
|
||||
<span class="input-group-btn"><button class="btn btn-default btnCalcTotal"><i class="glyphicon glyphicon-th"></i></button></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<!-- MODAL VIEW CONTRATS TYPE -->
|
||||
<div class="modal fade" id="modalViewContratsType" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<small class="db_ref">ref: <span>#</span></small>
|
||||
<h2 class="modal-title">
|
||||
<img src="img/contrat.svg">
|
||||
Fiche de type de contrat
|
||||
</h2>
|
||||
</div>
|
||||
<table class="table modal-body">
|
||||
<tr><th>nom :</th><td class="nom"></td></tr>
|
||||
<tr><th>groupe :</th><td class="groupe"></td></tr>
|
||||
<tr><th>frequence :</th><td class="frequence"></td></tr>
|
||||
<tr><th>type de panier :</th><td class="panier_type"></td></tr>
|
||||
<tr><th>nb. de paniers :</th><td class="nb_paniers"></td></tr>
|
||||
<tr><th>prix total :</th><td class="prix_total"></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL VIEW CONTRATS TYPE -->
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
{include file='structure/top.tpl'}
|
||||
|
||||
<table class="table table-hover scrollingTableList">
|
||||
<thead>
|
||||
<th class="center visible-lg id">
|
||||
<a href={if $order=="ref" && $sens=="ASC"}"?order=ref&sens=DESC"
|
||||
{else}"?order=ref&sens=ASC"{/if} style="text-decoration: none;">
|
||||
#{if $order=="ref"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="name">
|
||||
<a href={if $order=="nom" && $sens=="ASC"}"?order=nom&sens=DESC"
|
||||
{else}"?order=nom&sens=ASC"{/if} style="text-decoration: none;">
|
||||
nom{if $order=="nom"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="visible-lg groupe">
|
||||
<a href={if $order=="groupe" && $sens=="ASC"}"?order=groupe&sens=DESC"
|
||||
{else}"?order=groupe&sens=ASC"{/if} style="text-decoration: none;">
|
||||
groupe{if $order=="groupe"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="visible-md visible-lg center freq">
|
||||
<a href={if $order=="frequence" && $sens=="ASC"}"?order=frequence&sens=DESC"
|
||||
{else}"?order=frequence&sens=ASC"{/if} style="text-decoration: none;">
|
||||
fréquence{if $order=="frequence"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="visible-md visible-lg center panier_type">
|
||||
<a href={if $order=="panier_type" && $sens=="ASC"}"?order=panier_type&sens=DESC"
|
||||
{else}"?order=panier_type&sens=ASC"{/if} style="text-decoration: none;">
|
||||
type de panier{if $order=="panier_type"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="visible-md visible-lg center items_long">
|
||||
<a href={if $order=="nb_paniers" && $sens=="ASC"}"?order=nb_paniers&sens=DESC"
|
||||
{else}"?order=nb_paniers&sens=ASC"{/if} style="text-decoration: none;">
|
||||
nb. de panier{if $order=="nb_paniers"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="visible-md visible-lg center items_long">
|
||||
<a href={if $order=="prix_total" && $sens=="ASC"}"?order=prix_total&sens=DESC"
|
||||
{else}"?order=prix_total&sens=ASC"{/if} style="text-decoration: none;">
|
||||
prix total{if $order=="prix_total"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="btn_action right" colspan="2"><button class="btn btn-xs btn-info glyphicon glyphicon-plus" id="btnAddContratsType"></button></th>
|
||||
</thead>
|
||||
<tbody class="table progressLoadList" id="contratsTypesList" start="{$list_limits.start}" end="{$list_limits.end}" rest="{$list_limits.rest}">
|
||||
{include file='contrats_types/contrats_types_list_builder.tpl'}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{include file='contrats_types/contrats_type_modal_view.tpl'}
|
||||
|
||||
<!-- MODAL ADD CONTRAT TYPES -->
|
||||
<div class="modal fade" id="modalAddContratsType" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="pull-right hidden-xs">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
<h2 class="modal-title">
|
||||
<img src="img/contrat.svg">
|
||||
Ajouter un type de contrat
|
||||
</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="formContratsType">
|
||||
{include file='contrats_types/contrats_type_form.tpl'}
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer visible-xs">
|
||||
<div class="pull-right">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL ADD CONTRATS TYPE -->
|
||||
|
||||
<!-- MODAL EDIT CONTRATS TYPE -->
|
||||
<div class="modal fade" id="modalEditContratsType" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="pull-right hidden-xs">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
<h2 class="modal-title">
|
||||
<img src="img/contrat.svg">
|
||||
Modifier un type de contrat
|
||||
</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="formContratsType">
|
||||
{include file='contrats_types/contrats_type_form.tpl'}
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer visible-xs">
|
||||
<div class="pull-right">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL EDIT CONTRATS TYPE -->
|
||||
|
||||
<!-- MODAL DELETE CONTRATS TYPE -->
|
||||
<div class="modal fade" id="modalDeleteContratsType" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title">
|
||||
<img src="img/contrat.svg">
|
||||
Supprimer un type de contrat
|
||||
</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Etes-vous sûr de vouloir supprimer le type de contrat <b class="name">NAME</b> ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-danger btnSave">Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL DELETE CONTRATS TYPE -->
|
||||
|
||||
{include file='structure/bottom.tpl'}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{foreach from=$list item=i}
|
||||
<tr>
|
||||
<td class="center visible-lg id">{$i.ref}</td>
|
||||
<td class="name"><a href="#" class="btnViewContratsType" ref={$i.ref}>{$i.nom}</a></td>
|
||||
<td class="visible-lg groupe">{$i.groupe_nom}</td>
|
||||
<td class="visible-md visible-lg center freq">{$i.frequence_print}</td>
|
||||
<td class="visible-md visible-lg center panier_type">{$i.panier_type_nom}</td>
|
||||
<td class="visible-md visible-lg center items_long">{$i.nb_paniers}</td>
|
||||
<td class="visible-md visible-lg center items_long">{$i.prix_total} €</td>
|
||||
<td class="td_btn_action"><button class="btn btn-xs btn-link glyphicon glyphicon-edit btnEditContratsType" ref="{$i.ref}"></button></td>
|
||||
<td class="td_btn_action td_btn_delete"><button class="btn btn-xs btn-link glyphicon glyphicon-trash btnDeleteContratsType" ref="{$i.ref}" nom="{$i.nom}"></button></td>
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="9">aucun type de contrats</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<div class="navbar navbar-default secondbar" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle"><span class="glyphicon glyphicon-filter"></span></button>
|
||||
<a class="navbar-brand brand">
|
||||
<img src="img/contrat.svg" class="hidden-xs">
|
||||
<span>{$list_limits.max} TYPE{if $list_limits.max>1}S{/if} DE CONTRATS</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-filtre-search">
|
||||
<div class="navbar-form navbar-right form-filtre-search" role="search" id="contratsTypesSearch">
|
||||
<!-- GROUPE -->
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon{if $groupe>0} active{/if}">groupe :</span>
|
||||
<select class="form-control" name="groupe" load_value="{$groupe}" filtre_request="groupe">{include file='paniers_groupes/paniers_groupes_select_list.tpl'}</select>
|
||||
</div>
|
||||
<!-- FREQUENCE -->
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon{if $frequence!="0"} active{/if}">fréq. :</span>
|
||||
<select class="form-control" name="frequence" load_value="{$frequence}" filtre_request="frequence">
|
||||
<option value="0">choisir...</option>
|
||||
<option value="hebdo">hebdo</option>
|
||||
<option value="quinz">quinz.</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- PANIER -->
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon{if $panier>0} active{/if}">panier :</span>
|
||||
<select class="form-control" name="panier" load_value="{$panier}" filtre_request="panier">{include file='paniers/paniers_select_list.tpl'}</select>
|
||||
</div>
|
||||
<!-- ORDRE - SMALL SCREEN -->
|
||||
<div class="input-group order visible-xs">
|
||||
<span class="input-group-addon" filtre="{$filtre_items}">ordre :</span>
|
||||
<select class="form-control" name="order">
|
||||
{foreach from=$allowOrder key=id item=name}<option value="{$id}"{if $order == $id} selected{/if}>{$name}</option>{/foreach}
|
||||
</select>
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default {$sens}" name="sens">
|
||||
<i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<option value="0">choisir...</option>
|
||||
{foreach from=$contrats_types_list item=i}<option value="{$i.ref}" grp="{$i.groupe_ref}" freq="{$i.frequence}" panier="{$i.panier_type_ref}" nb_paniers="{$i.nb_paniers}">{$i.nom}</option>{/foreach}
|
||||
<option value="custom">nouveau / personnalisé...</option>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-filtre-search">
|
||||
<form class="navbar-form navbar-right form-filtre-search" role="search" id="legumesSearch">
|
||||
<div class="navbar-form navbar-right form-filtre-search" role="search" id="legumesSearch">
|
||||
<div class="input-group class searchGrp">
|
||||
<span class="input-group-addon{if $search!=""} active{/if}"><i class="glyphicon glyphicon-search"></i></span>
|
||||
<input type="text" class="form-control" placeholder="rechercher..." name="search" value="{$search}">
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<i class="glyphicon glyphicon-print"></i>
|
||||
<span class="txt">Imprimer la liste...</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<div class="modaLoader"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>nom :</label>
|
||||
<input type="text" class="form-control" name="nom" placeholder="nom">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<!-- MODAL VIEW LIEU -->
|
||||
<div class="modal fade" id="modalViewLieu" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<small class="db_ref">ref: <span>#</span></small>
|
||||
<h2 class="modal-title">
|
||||
<img src="img/lieux.svg">
|
||||
Fiche lieu de dépôt
|
||||
</h2>
|
||||
</div>
|
||||
<table class="table modal-body">
|
||||
<tr><th>nom :</th><td class="nom"></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL VIEW LIEU -->
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
{include file='structure/top.tpl'}
|
||||
|
||||
<table class="table table-hover scrollingTableList">
|
||||
<thead>
|
||||
<th class="center visible-lg id">
|
||||
<a href={if $order=="ref" && $sens=="ASC"}"?order=ref&sens=DESC"
|
||||
{else}"?order=ref&sens=ASC"{/if} style="text-decoration: none;">
|
||||
#{if $order=="ref"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="name">
|
||||
<a href={if $order=="nom" && $sens=="ASC"}"?order=nom&sens=DESC"
|
||||
{else}"?order=nom&sens=ASC"{/if} style="text-decoration: none;">
|
||||
nom{if $order=="nom"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="btn_action right" colspan="2"><button class="btn btn-xs btn-info glyphicon glyphicon-plus" id="btnAddLieu"></button></th>
|
||||
</thead>
|
||||
<tbody class="table progressLoadList" id="lieuxList" start="{$list_limits.start}" end="{$list_limits.end}" rest="{$list_limits.rest}">
|
||||
{include file='lieux/lieux_list_builder.tpl'}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{include file='lieux/lieu_modal_view.tpl'}
|
||||
|
||||
<!-- MODAL ADD LIEU -->
|
||||
<div class="modal fade" id="modalAddLieu" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="pull-right hidden-xs">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
|
||||
<h2 class="modal-title">
|
||||
<img src="img/lieux.svg">
|
||||
Ajouter un lieu de dépôt
|
||||
</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="formPanier">
|
||||
{include file='lieux/lieu_form.tpl'}
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer visible-xs">
|
||||
<div class="pull-right">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL ADD LIEU -->
|
||||
|
||||
<!-- MODAL EDIT LIEU -->
|
||||
<div class="modal fade" id="modalEditLieu" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="pull-right hidden-xs">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
|
||||
<h2 class="modal-title">
|
||||
<img src="img/lieux.svg">
|
||||
Modifier un lieu de dépôt
|
||||
</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="formPanier">
|
||||
{include file='lieux/lieu_form.tpl'}
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer visible-xs">
|
||||
<div class="pull-right">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL EDIT LIEU -->
|
||||
|
||||
<!-- MODAL DELETE LIEU -->
|
||||
<div class="modal fade" id="modalDeleteLieu" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title">
|
||||
<img src="img/lieux.svg">
|
||||
Supprimer un lieu
|
||||
</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Etes-vous sûr de vouloir supprimer le lieu de dépôt <b class="name">NAME</b> ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-danger btnSave">Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL DELETE LIEU -->
|
||||
|
||||
{include file='structure/bottom.tpl'}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{foreach from=$list item=i}
|
||||
<tr>
|
||||
<td class="center visible-lg id">{$i.ref}</td>
|
||||
<td class="name"><a href="#" class="btnViewLieu" ref={$i.ref}>{$i.nom}</a></td>
|
||||
<td class="td_btn_action"><button class="btn btn-xs btn-link glyphicon glyphicon-edit btnEditLieu" ref="{$i.ref}"></button></td>
|
||||
<td class="td_btn_action td_btn_delete"><button class="btn btn-xs btn-link glyphicon glyphicon-trash btnDeleteLieu" ref="{$i.ref}" nom="{$i.nom}"></button></td>
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="4">aucun lieu</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<div class="navbar navbar-default secondbar" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle"><span class="glyphicon glyphicon-filter"></span></button>
|
||||
<a class="navbar-brand brand">
|
||||
<img src="img/lieux.svg" class="hidden-xs">
|
||||
<span>{$list_limits.max} LIEU{if $list_limits.max>1}X{/if}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-filtre-search">
|
||||
<div class="navbar-form navbar-right form-filtre-search" role="search" id="lieuxSearch">
|
||||
<!-- SEARCH -->
|
||||
<div class="input-group searchGrp">
|
||||
<span class="input-group-addon{if $search!=""} active{/if}"><i class="glyphicon glyphicon-search"></i></span>
|
||||
<input type="text" class="form-control" placeholder="rechercher..." name="search" value="{$search}">
|
||||
{if $search!=""}<span class="input-group-addon btn-danger btnClearSearch"><i class="glyphicon glyphicon-remove"></i></span>{/if}
|
||||
</div>
|
||||
<!-- ORDRE - SMALL SCREEN -->
|
||||
<div class="input-group order visible-xs">
|
||||
<span class="input-group-addon" filtre="{$filtre_items}">ordre :</span>
|
||||
<select class="form-control" name="order">
|
||||
{foreach from=$allowOrder key=id item=name}<option value="{$id}"{if $order == $id} selected{/if}>{$name}</option>{/foreach}
|
||||
</select>
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default {$sens}" name="sens">
|
||||
<i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-filtre-search">
|
||||
<form class="navbar-form navbar-right form-filtre-search" role="search" id="livraisonsSearch">
|
||||
<div class="navbar-form navbar-right form-filtre-search" role="search" id="livraisonsSearch">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon{if $groupe>0} active{/if}">groupe :</span>
|
||||
<select class="form-control" name="groupe" load_value="{$groupe}" filtre_request="groupe">{include file='paniers_groupes/paniers_groupes_select_list.tpl'}</select>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
<div class="modaLoader"></div>
|
||||
<button class="hide"></button>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-filtre-search">
|
||||
<form class="navbar-form navbar-right form-filtre-search" role="search" id="paniersSearch">
|
||||
<div class="navbar-form navbar-right form-filtre-search" role="search" id="paniersSearch">
|
||||
<!-- GROUPE -->
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon{if $groupe>0} active{/if}">groupe :</span>
|
||||
<select class="form-control" name="groupe" load_value="{$groupe}" filtre_request="groupe">{include file='paniers_groupes/paniers_groupes_select_list.tpl'}</select>
|
||||
</div>
|
||||
<!-- SEARCH -->
|
||||
<div class="input-group class">
|
||||
<div class="input-group searchGrp">
|
||||
<span class="input-group-addon{if $search!=""} active{/if}"><i class="glyphicon glyphicon-search"></i></span>
|
||||
<input type="text" class="form-control" placeholder="rechercher..." name="search" value="{$search}">
|
||||
{if $search!=""}<span class="input-group-addon btn-danger btnClearSearch"><i class="glyphicon glyphicon-remove"></i></span>{/if}
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<div class="modaLoader"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>nom :</label>
|
||||
<input type="text" class="form-control" name="nom" placeholder="nom">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<!-- MODAL VIEW PANIERS GROUPE -->
|
||||
<div class="modal fade" id="modalViewPaniersGroupe" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<small class="db_ref">ref: <span>#</span></small>
|
||||
<h2 class="modal-title">
|
||||
<img src="img/groups.svg">
|
||||
Fiche groupe
|
||||
</h2>
|
||||
</div>
|
||||
<table class="table modal-body">
|
||||
<tr><th>nom :</th><td class="nom"></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL VIEW PANIERS GROUPE -->
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
{include file='structure/top.tpl'}
|
||||
|
||||
<table class="table table-hover scrollingTableList">
|
||||
<thead>
|
||||
<th class="center visible-lg id">
|
||||
<a href={if $order=="ref" && $sens=="ASC"}"?order=ref&sens=DESC"
|
||||
{else}"?order=ref&sens=ASC"{/if} style="text-decoration: none;">
|
||||
#{if $order=="ref"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="name">
|
||||
<a href={if $order=="nom" && $sens=="ASC"}"?order=nom&sens=DESC"
|
||||
{else}"?order=nom&sens=ASC"{/if} style="text-decoration: none;">
|
||||
nom{if $order=="nom"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="btn_action right" colspan="2"><button class="btn btn-xs btn-info glyphicon glyphicon-plus" id="btnAddPaniersGroupe"></button></th>
|
||||
</thead>
|
||||
<tbody class="table progressLoadList" id="paniersGroupesList" start="{$list_limits.start}" end="{$list_limits.end}" rest="{$list_limits.rest}">
|
||||
{include file='paniers_groupes/paniers_groupes_list_builder.tpl'}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{include file='paniers_groupes/paniers_groupe_modal_view.tpl'}
|
||||
|
||||
<!-- MODAL ADD PANIERS GROUPE -->
|
||||
<div class="modal fade" id="modalAddPaniersGroupe" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="pull-right hidden-xs">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
|
||||
<h2 class="modal-title">
|
||||
<img src="img/groups.svg">
|
||||
Ajouter un groupe
|
||||
</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="formPanier">
|
||||
{include file='paniers_groupes/paniers_groupe_form.tpl'}
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer visible-xs">
|
||||
<div class="pull-right">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL ADD PANIER -->
|
||||
|
||||
<!-- MODAL EDIT PANIERS GROUPES -->
|
||||
<div class="modal fade" id="modalEditPaniersGroupe" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="pull-right hidden-xs">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
|
||||
<h2 class="modal-title">
|
||||
<img src="img/groups.svg">
|
||||
Modifier un groupe
|
||||
</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="formPanier">
|
||||
{include file='paniers_groupes/paniers_groupe_form.tpl'}
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer visible-xs">
|
||||
<div class="pull-right">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-custom btnSave">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL EDIT PANIERS GROUPES -->
|
||||
|
||||
<!-- MODAL DELETE PANIERS GROUPES -->
|
||||
<div class="modal fade" id="modalDeletePaniersGroupe" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title">
|
||||
<img src="img/groups.svg">
|
||||
Supprimer un groupe
|
||||
</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Etes-vous sûr de vouloir supprimer le groupe <b class="name">NAME</b> ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-danger btnSave">Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end MODAL DELETE PANIERS GROUPES -->
|
||||
|
||||
{include file='structure/bottom.tpl'}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{foreach from=$list item=i}
|
||||
<tr>
|
||||
<td class="center visible-lg id">{$i.ref}</td>
|
||||
<td class="name"><a href="#" class="btnViewPaniersGroupe" ref={$i.ref}>{$i.nom}</a></td>
|
||||
<td class="td_btn_action"><button class="btn btn-xs btn-link glyphicon glyphicon-edit btnEditPaniersGroupe" ref="{$i.ref}"></button></td>
|
||||
<td class="td_btn_action td_btn_delete"><button class="btn btn-xs btn-link glyphicon glyphicon-trash btnDeletePaniersGroupe" ref="{$i.ref}" nom="{$i.nom}"></button></td>
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="4">aucun groupe</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<div class="navbar navbar-default secondbar" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle"><span class="glyphicon glyphicon-filter"></span></button>
|
||||
<a class="navbar-brand brand">
|
||||
<img src="img/groups.svg" class="hidden-xs">
|
||||
<span>{$list_limits.max} GROUPE{if $list_limits.max>1}S{/if}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-filtre-search">
|
||||
<div class="navbar-form navbar-right form-filtre-search" role="search" id="paniersGroupesSearch">
|
||||
<!-- SEARCH -->
|
||||
<div class="input-group searchGrp">
|
||||
<span class="input-group-addon{if $search!=""} active{/if}"><i class="glyphicon glyphicon-search"></i></span>
|
||||
<input type="text" class="form-control" placeholder="rechercher..." name="search" value="{$search}">
|
||||
{if $search!=""}<span class="input-group-addon btn-danger btnClearSearch"><i class="glyphicon glyphicon-remove"></i></span>{/if}
|
||||
</div>
|
||||
<!-- ORDRE - SMALL SCREEN -->
|
||||
<div class="input-group order visible-xs">
|
||||
<span class="input-group-addon" filtre="{$filtre_items}">ordre :</span>
|
||||
<select class="form-control" name="order">
|
||||
{foreach from=$allowOrder key=id item=name}<option value="{$id}"{if $order == $id} selected{/if}>{$name}</option>{/foreach}
|
||||
</select>
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default {$sens}" name="sens">
|
||||
<i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -16,14 +16,32 @@
|
|||
|
||||
<div class="collapse navbar-collapse topBar">
|
||||
<ul class="nav navbar-nav">
|
||||
<li{if $page=="legumes"} class="active"{/if}><a href="legumes.php">LÉGUMES</a></li>
|
||||
<li{if $page=="paniers"} class="active"{/if}><a href="paniers.php">PANIERS</a></li>
|
||||
<li{if $page=="clients"} class="active"{/if}><a href="clients.php">CLIENTS</a></li>
|
||||
<li{if $page=="contrats"} class="active"{/if}><a href="contrats.php">CONTRATS</a></li>
|
||||
<li{if $page=="livraisons"} class="active"{/if}><a href="livraisons.php">LIVRAISONS</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="https://connexion.pixap.fr/logout/"><i class="glyphicon glyphicon-off"></i> déconnection</a></li>
|
||||
<!-- DropDown Admin -->
|
||||
<li class="dropdown hidden-xs hidden-sm">
|
||||
<a href="#" class="dropdown-toggle btnAdmin" data-toggle="dropdown">
|
||||
<span class="txt">Administration</span>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="legumes.php">Légumes</a></li>
|
||||
<li><a href="paniers_groupes.php">Groupes</a></li>
|
||||
<li><a href="paniers.php">Types de paniers</a></li>
|
||||
<li><a href="contrats_types.php">Types de contrats</a></li>
|
||||
<li><a href="lieux.php">Lieux de dépôt</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="https://connexion.pixap.fr/logout/"><i class="glyphicon glyphicon-off"></i> déconnection</a></li>
|
||||
<li class="divider"></li>
|
||||
<li style="padding-left: 20px;">
|
||||
<b>GIT vs. : </b> {$gitVS.short}
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- end DropDown Admin -->
|
||||
</ul>
|
||||
</div><!-- end NavBar Content -->
|
||||
</div><!-- end Container Fluid -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue