Commit 14bf1620 authored by Eric Seigne's avatar Eric Seigne
Browse files

retour à une situation fonctionnelle ... reste a faire la mise en page de toutes les fiches

parent bcd847a0
......@@ -13,7 +13,7 @@
</div>
</ons-toolbar>
<div id="container">
<form id="leform" name="leform">
<form id="leformAgendaIK" name="leformAgendaIK">
<h4>Agenda -> IK</h4>
......
<ons-page id="ONSChoixListe">
<div id="container">
<form id="leform" name="leform">
<form id="leformChoixListe" name="leformChoixListe">
<ons-row>
<ons-col>
<ons-list-title id='title'></ons-list-title>
......
......@@ -13,7 +13,7 @@
</div>
</ons-toolbar>
<div id="container">
<form id="leform">
<form id="leformAddVehicule" name="leformAddVehicule">
<ons-row>
<ons-col>
<h1>Ajout d'un véhicule personnel</h1>
......@@ -93,14 +93,14 @@
<ons-row>
<ons-col>
<ons-button modifier="material large" onclick="checkForm();">Ajouter</ons-button>
<ons-button modifier="material large" onclick="checkForm('leformAddVehicule');">Ajouter</ons-button>
</ons-col>
</ons-row>
<ons-row>
<ons-col>
<!-- <ons-button class="submit" type="submit" value="Ajouter"></ons-button> -->
&nbsp;
<ons-button modifier="material large" onclick="fn.back();">Retour</ons-button>
<ons-button modifier="material large" onclick="closePage();">Retour</ons-button>
</ons-col>
</ons-row>
</form>
......@@ -127,9 +127,9 @@
}
//En attendant de trouver comment faire marcher OnsenUI + validate.js
function checkForm() {
if (genericCheckForm()) {
if ($("#leform").valid()) {
function checkForm(leform) {
if (genericCheckForm(leform)) {
if ($("#leformAddVehicule").valid()) {
// myDebug("addVehicule on passe dans le validate");
let nom = document.getElementById('nom').value;
let energie = document.getElementById('energievalue').value;
......@@ -137,7 +137,6 @@
let type = document.getElementById('typevalue').value;
let kmbefore = document.getElementById('kmbefore').value;
addVehicule("vehicules", nom, energie, puissance, type, kmbefore);
fn.back();
}
}
}
......
......@@ -13,7 +13,7 @@
</div>
</ons-toolbar>
<div id="container">
<form id="leform">
<form id="leformVehiculePro"leformAddVehicule>
<ons-row>
<ons-col>
<h1>Ajout d'un véhicule professionnel</h1>
......@@ -86,14 +86,14 @@
<ons-row>
<ons-col>
<ons-button modifier="material large" onclick="checkForm();">Ajouter</ons-button>
<ons-button modifier="material large" onclick="checkForm('leformVehiculePro');">Ajouter</ons-button>
</ons-col>
</ons-row>
<ons-row>
<ons-col>
<!-- <ons-button class="submit" type="submit" value="Ajouter"></ons-button> -->
&nbsp;
<ons-button modifier="material large" onclick="fn.back();">Retour</ons-button>
<ons-button modifier="material large" onclick="closePage();">Retour</ons-button>
</ons-col>
</ons-row>
</form>
......@@ -120,9 +120,11 @@
}
//En attendant de trouver comment faire marcher OnsenUI + validate.js
function checkForm() {
if (genericCheckForm()) {
if ($("#leform").valid()) {
function checkForm(leform) {
myDebug("Dans le html " + leform);
if (genericCheckForm(leform)) {
myDebug("Dans le html 2 " + leform);
if ($("#leformVehiculePro").valid()) {
// myDebug("addVehicule on passe dans le validate");
let nom = document.getElementById('nom').value;
let energie = document.getElementById('energievalue').value;
......@@ -130,7 +132,7 @@
let type = document.getElementById('typevalue').value;
let kmbefore = 0; //En vehicule pro on s'en fiche
addVehicule("vehiculesPro", nom, energie, puissance, type, kmbefore);
fn.back();
ons.notification.alert("Véhicule ajouté :-)", { title: "Succès" }).then(function () { closePage(true); });
}
}
}
......
......@@ -13,7 +13,7 @@
</div>
</ons-toolbar>
<div id="container">
<form id="leformcompta">
<form id="leformcompta" name="leformcompta">
<ons-row>
<ons-col>
<h2>Configuration - Export Comptable</h2>
......@@ -72,7 +72,7 @@
<ons-row>
<ons-col>
<ons-button modifier="material large" onclick="checkForm();">Sauvegarder</ons-button>
<ons-button modifier="material large" onclick="checkForm('leformcompta');">Sauvegarder</ons-button>
</ons-col>
</ons-row>
<ons-row>
......@@ -86,7 +86,7 @@
<script type="text/javascript">
configKeys = ['compta_email', 'compta_ik', 'compta_peage', 'compta_hotel', 'compta_train', 'compta_carburant', 'compta_taxi', 'compta_restauration', 'compta_divers', 'compta_compteperso', 'compta_tvadeductible'];
function checkForm() {
function checkForm(leform) {
// myDebug("exportCompta checkForm 1");
if ($("#leformcompta").valid()) {
//Si le formulaire est valide on sauvegarde les données
......
.has-float-label {
display: block;
position: relative;
}
.has-float-label label, .has-float-label > span {
position: absolute;
left: 0;
top: 0;
cursor: text;
font-size: 75%;
opacity: 1;
-webkit-transition: all .2s;
transition: all .2s;
}
.has-float-label select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.has-float-label textarea {
width: 100%;
}
.has-float-label input, .has-float-label select, .has-float-label textarea {
font-size: inherit;
padding-top: 1em;
margin-bottom: 2px;
border: 0;
border-radius: 0;
border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}
.has-float-label input::-webkit-input-placeholder, .has-float-label select::-webkit-input-placeholder, .has-float-label textarea::-webkit-input-placeholder {
opacity: 1;
-webkit-transition: all .2s;
transition: all .2s;
}
.has-float-label input::-moz-placeholder, .has-float-label select::-moz-placeholder, .has-float-label textarea::-moz-placeholder {
opacity: 1;
transition: all .2s;
}
.has-float-label input:-ms-input-placeholder, .has-float-label select:-ms-input-placeholder, .has-float-label textarea:-ms-input-placeholder {
opacity: 1;
transition: all .2s;
}
.has-float-label input::placeholder, .has-float-label select::placeholder, .has-float-label textarea::placeholder {
opacity: 1;
-webkit-transition: all .2s;
transition: all .2s;
}
.has-float-label input:placeholder-shown:not(:focus)::-webkit-input-placeholder, .has-float-label select:placeholder-shown:not(:focus)::-webkit-input-placeholder, .has-float-label textarea:placeholder-shown:not(:focus)::-webkit-input-placeholder {
opacity: 0;
}
.has-float-label input:placeholder-shown:not(:focus)::-moz-placeholder, .has-float-label select:placeholder-shown:not(:focus)::-moz-placeholder, .has-float-label textarea:placeholder-shown:not(:focus)::-moz-placeholder {
opacity: 0;
}
.has-float-label input:placeholder-shown:not(:focus):-ms-input-placeholder, .has-float-label select:placeholder-shown:not(:focus):-ms-input-placeholder, .has-float-label textarea:placeholder-shown:not(:focus):-ms-input-placeholder {
opacity: 0;
}
.has-float-label input:placeholder-shown:not(:focus)::placeholder, .has-float-label select:placeholder-shown:not(:focus)::placeholder, .has-float-label textarea:placeholder-shown:not(:focus)::placeholder {
opacity: 0;
}
.has-float-label input:placeholder-shown:not(:focus) + *, .has-float-label select:placeholder-shown:not(:focus) + *, .has-float-label textarea:placeholder-shown:not(:focus) + * {
font-size: 150%;
opacity: .5;
top: .25em;
}
.has-float-label input:focus, .has-float-label select:focus, .has-float-label textarea:focus {
outline: none;
border-color: rgba(0, 0, 0, 0.5);
}
.has-float-label select {
padding-right: 1em;
background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.5em bottom 0.25em;
background-size: 8px 10px;
}
@font-face {
font-family: 'Penna';
src: url('fonts/penna.otf') format('truetype');
font-family: "Penna";
src: url("fonts/penna.otf") format("truetype");
font-weight: normal;
font-style: normal;
}
h1 {
text-align: center;
font-family: Penna,sans-serif;
font-family: Penna, sans-serif;
font-weight: normal;
font-style: normal;
}
......@@ -21,29 +21,38 @@ h4 {
padding-top: 10px;
}
select.error, textarea.error, input.error {
border-color: #FF0000;
select.error,
textarea.error,
input.error {
border-color: #ff0000;
}
ons-input, ons-radio, ons-checkbox, ons-search-input {
ons-input,
ons-radio,
ons-checkbox,
ons-search-input {
width: 100%;
}
input, radio, checkbox, search-input {
input,
radio,
checkbox,
search-input {
width: 100%;
}
.alert-dialog-content, .alert-dialog-content ul {
.alert-dialog-content,
.alert-dialog-content ul {
text-align: left;
}
ons-select {
width:100%;
width: 100%;
}
ons-row {
/* ons-row {
margin-top: 5px;
}
} */
#sablier {
display: unset;
......@@ -53,7 +62,11 @@ ons-row {
display: unset;
}
.button, button, input[type="submit"], input[type="reset"], input[type="button"] {
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
font-size: unset;
background: unset;
}
......@@ -63,10 +76,10 @@ ons-row {
}
@media (min-width: 300px) {
#ladate {
/* #ladate {
width: 200px;
}
#depart, #arrivee, #label {
} */
/* #depart, #arrivee, #label {
width: 260px;
}
label[for=ht], label[for=ttc], label[for=tvaVal1], label[for=tvaVal2], label[for=tvaVal3], label[for=tvaVal4], label[for=distance] {
......@@ -75,8 +88,10 @@ ons-row {
}
#ht, #ttc, #tvaVal1, #tvaVal2, #tvaVal3, #tvaVal4, #distance {
width: 260px;
}
#listeDepart, #listeArrivee, #listeObjets {
} */
#listeDepart,
#listeArrivee,
#listeObjets {
width: 260px;
}
.menubutton {
......@@ -96,10 +111,10 @@ ons-row {
}
@media (min-width: 340px) {
#ladate {
/* #ladate {
width: 230px;
}
#depart, #arrivee, #label {
} */
/* #depart, #arrivee, #label {
width: 280px;
}
label[for=ht], label[for=ttc], label[for=tvaVal1], label[for=tvaVal2], label[for=tvaVal3], label[for=tvaVal4], label[for=distance] {
......@@ -108,8 +123,10 @@ ons-row {
}
#ht, #ttc, #tvaVal1, #tvaVal2, #tvaVal3, #tvaVal4, #distance {
width: 280px;
}
#listeDepart, #listeArrivee, #listeObjets {
} */
#listeDepart,
#listeArrivee,
#listeObjets {
width: 150px;
}
.menubutton {
......@@ -128,10 +145,10 @@ ons-row {
}
@media (min-width: 400px) {
#ladate {
/* #ladate {
width: 230px;
}
#depart, #arrivee, #label {
} */
/* #depart, #arrivee, #label {
width: 280px;
}
label[for=ht], label[for=ttc], label[for=tvaVal1], label[for=tvaVal2], label[for=tvaVal3], label[for=tvaVal4], label[for=distance] {
......@@ -140,8 +157,10 @@ ons-row {
}
#ht, #ttc, #tvaVal1, #tvaVal2, #tvaVal3, #tvaVal4, #distance {
width: 280px;
}
#listeDepart, #listeArrivee, #listeObjets {
} */
#listeDepart,
#listeArrivee,
#listeObjets {
width: 150px;
}
.menubutton {
......@@ -159,19 +178,20 @@ ons-row {
}
}
input[type=date] {
/* input[type="date"] {
font-size: 150%;
}
#ladate {
} */
/* #ladate {
float: right;
width: unset;
margin-right: 20px;
}
label[for=ladate], label[for=objet] {
} */
/* label[for="ladate"],
label[for="objet"] {
float: left;
font-size: 2rem;
width: 25%;
}
} */
#feedVehicules {
clear: both;
......@@ -190,7 +210,7 @@ label[for=ladate], label[for=objet] {
display: unset;
}
#depart, #arrivee, #label {
/* #depart, #arrivee, #label {
float: left;
}
......@@ -201,10 +221,13 @@ label[for=ht], label[for=ttc], label[for=tvaVal1], label[for=tvaVal2], label[for
#ht, #ttc, #tvaVal1, #tvaVal2, #tvaVal3, #tvaVal4, #distance {
float: left;
}
} */
#listeDepart, #listeArrivee, #listeObjets {
float: left;
#listeDepart,
#listeArrivee,
#listeObjets {
float: right;
margin-top: -14px;
}
#interobjets {
......@@ -212,7 +235,9 @@ label[for=ht], label[for=ttc], label[for=tvaVal1], label[for=tvaVal2], label[for
padding-top: 8px;
}
.page, .page__background, .page__content {
.page,
.page__background,
.page__content {
background-color: #fff;
}
......@@ -229,12 +254,14 @@ label[for=ht], label[for=ttc], label[for=tvaVal1], label[for=tvaVal2], label[for
position: relative;
}
th, td {
padding: 4px 0px 0px 4px;
th,
td {
padding: 4px 0px 0px 4px;
}
#smallImage {
max-height: 200px;
max-width: 40%;
padding-bottom: 10px;
}
......@@ -255,7 +282,6 @@ th, td {
}
#server {
}
#ldfId {
......@@ -264,29 +290,29 @@ th, td {
// ----------------------------------- select
.custom-select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
height: 57px;
padding: 10px 38px 10px 16px;
background: #fff url("https://anselmurban.de/codepen-img/select-arrows.svg") no-repeat right 16px center;
background-size: 10px;
transition: border-color .1s ease-in-out,box-shadow .1s ease-in-out;
border: 1px solid #ddd;
border-radius: 3px;
font-size: 1.6rem;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
height: 57px;
padding: 10px 38px 10px 16px;
background: #fff url("https://anselmurban.de/codepen-img/select-arrows.svg") no-repeat right 16px center;
background-size: 10px;
transition: border-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
border: 1px solid #ddd;
border-radius: 3px;
font-size: 1.6rem;
}
.custom-select:hover {
border: 1px solid #999;
border: 1px solid #999;
}
.custom-select:focus {
border: 1px solid #999;
box-shadow: 0 3px 5px 0 rgba(0,0,0,.2);
outline: none;
border: 1px solid #999;
box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2);
outline: none;
}
/* remove default arrow in IE */
select::-ms-expand {
display:none;
display: none;
}
.big {
......@@ -377,10 +403,19 @@ select::-ms-expand {
}
.text-input:invalid {
border: 1px solid #D1D1D1;
border: 1px solid #d1d1d1;
}
.blink {
color: #888888 !important;
background: #fafafa !important;
}
fieldset {
padding: 0.3em;
}
#ht, #ttc, #tvaVal1, #tvaVal2, #tvaVal3, #tvaVal4, #distance {
max-width: 120px;
margin-left: auto;
}
......@@ -13,12 +13,10 @@
</div>
</ons-toolbar>
<div id="container">
<form id="leform" name="leform">
<form id="leformCarburant" name="leformCarburant">
<input type="hidden" name="typeFrais" value="carburant">
<input type="hidden" id="updateID" name="updateID" value="0">
<ons-row>
<input type="text" id="photoFacturette" name="photoFacturette" value="">
</ons-row>
<input type="hidden" id="photoFacturette" name="photoFacturette" value="">
<ons-row>
<div class="one-half column">
......@@ -37,7 +35,7 @@
<div id='feedPaiements'></div>
<label for="ttc">TTC</label>
<input name="ttc" id="ttc" type="number" step="any" inputmode="decimal" placeholder="Montant TTC">
<input name="ttc" id="ttc" type="number" step="any" inputmode="decimal" placeholder="Montant TTC">
<input name="label" id="label" type="hidden" value="Carburant">
<!-- <ons-list style="clear: both;">
......@@ -47,18 +45,27 @@
</ons-list-item>
</ons-list> -->
<ons-button modifier="material large" onclick="checkForm();">Valider</ons-button>
<ons-button modifier="material large" onclick="checkForm('leformCarburant');">Valider</ons-button>
</div>
</ons-row>
</form>
</div>
<script type="text/javascript">
function checkForm() {
if (genericCheckForm()) {
addLocalStorageEntry('objetsCarburant', leform.label.value);
sendForm();
function checkForm(leform) {
if (genericCheckForm(leform)) {
let objForm = document.getElementById(leform);
addLocalStorageEntry('objetsCarburant', objForm.elements['label'].value);
sendForm(leform);
}
}
testVP = localGetData("vehiculesPro");
if (testVP == null || testVP.length == 0) {
ons.notification.alert("Si vous voulez saisir des notes de carburant ajoutez un véhicule professionnel dans le menu Configuration.", { title: "Attention" }).then(function () {
gotoPage("config.html", true);
});
}
</script>
</ons-page>
......@@ -13,12 +13,10 @@
</div>
</ons-toolbar>
<div id="container">
<form id="leform" name="leform">
<form id="leformDivers" name="leformDivers">
<input type="hidden" name="typeFrais" value="divers">
<input type="hidden" id="updateID" name="updateID" value="0">
<ons-row>
<input type="text" id="photoFacturette" name="photoFacturette" value="">
</ons-row>
<input type="hidden" id="photoFacturette" name="photoFacturette" value="">
<ons-row>
<div class="one-half column">
<div id="contenuLDFImage">
......@@ -68,17 +66,18 @@
</ons-list-item>
</ons-list>
<ons-button modifier="material large" onclick="checkForm();">Valider</ons-button>
<ons-button modifier="material large" onclick="checkForm('leformDivers');">Valider</ons-button>
</div>
</ons-row>
</form>
</div>
<script type="text/javascript">
function checkForm() {
if (genericCheckForm()) {
addLocalStorageEntry('objetsDivers', leform.label.value);
sendForm();
function checkForm(leform) {
if (genericCheckForm(leform)) {
let objForm = document.getElementById(leform);
addLocalStorageEntry('objetsDivers', objForm.elements['label'].value);
sendForm(leform);
}
}
</script>
......
......@@ -13,12 +13,10 @@
</div>
</ons-toolbar>
<div id="container">
<form id="leform" name="leform">
<form id="leformHotel" name="leformHotel">
<input type="hidden" name="typeFrais" value="hotel">
<input type="hidden" id="updateID" name="updateID" value="0">
<ons-row>
<input type="text" id="photoFacturette" name="photoFacturette" value="">
</ons-row>