diff --git a/Consultations.php b/Consultations.php
index 173eb5e..5454d7f 100755
--- a/Consultations.php
+++ b/Consultations.php
@@ -43,16 +43,19 @@ if(!Authentification::checkUser(0)){
+
+
+
+
+
- Numéro invalide.
+
+
+
+
+
+
+ Clé de contrôle invalide.
diff --git a/css/global.css b/css/global.css
index b51825c..140c925 100755
--- a/css/global.css
+++ b/css/global.css
@@ -223,9 +223,10 @@ body{
/* position */
display: block;
position: relative;
- width: calc( 100% - 2*2em - 2*1px );
+ width: calc( 100% - 2*2em - 2*1px - 2*1em );
margin: 2em;
margin-bottom: 4em; /* pour séparer les */
+ padding: 1em;
/* border */
border: 1px solid #f09108;
@@ -237,8 +238,8 @@ body{
display: block;
position: relative;
margin-top: -2.5em;
- margin-left: -1px;
- width: calc( 100% - .5em - 2em );
+ margin-left: calc( -1px - 1em );
+ width: calc( 100% - .5em );
padding: .5em;
padding-left: 2em;
@@ -311,12 +312,6 @@ body{
margin-left: 1em;
}
-
-/* SPECIFIC */
-#CONTAINER > article select.associated ~ span:not(.associated){
- display: none; /* on cache le texte défault quand c'est le médecin associé */
-}
-
#CONTAINER > article select:not(.associated) ~ span.associated{
display: none; /* on cache le texte associé quand c'est pas le médecin associé */
}
@@ -333,6 +328,10 @@ body{
/* border */
border: 1px solid #e5e5e5;
+
+ /* background */
+ background: center right 1.5em no-repeat;
+ background-size: 0em auto;
/* animation */
transition: all .2s ease-in-out;
@@ -350,11 +349,17 @@ body{
/* .validated */
#CONTAINER > article input.validated{
border-color: #1cc952;
+ background-image: url(../src/validated.svg);
+ background-position: center right 1em;
+ background-size: 1em auto;
}
/* .invalid */
#CONTAINER > article input.invalid{
border-color: #ec111c;
+ background-image: url(../src/invalid.svg);
+ background-position: center right 1em;
+ background-size: 1em auto;
}
/* après */
@@ -392,8 +397,57 @@ body{
#CONTAINER > article input[type=submit]:hover{
/* background */
background-color: #f09108;
- background-image: url(../src/save@hover.svg);
/* foreground */
color: #fff;
}
+
+
+
+/* CHECKBOX HACK */
+input[type=checkbox]{ display: none !important; }
+
+/* label */
+input[type=checkbox] + label:before{
+ content: '';
+ /* position */
+ display: inline-block;
+ position: relative;
+ margin-right: .5em;
+ margin-bottom: -.3em;
+ width: 1.2em;
+ height: 1.2em;
+
+ /* border */
+ border-radius: 3px;
+ border: 1px solid #f18624;
+
+ /* background */
+ background: center center no-repeat;
+ background-size: 80% auto;
+
+ /* animation */
+ transition: all .2s ease-in-out;
+ -moz-transition: all .2s ease-in-out;
+ -webkit-transition: all .2s ease-in-out;
+ -ms-transition: all .2s ease-in-out;
+ -o-transition: all .2s ease-in-out;
+}
+
+/* @active + label */
+input[type=checkbox]:active + label:before{
+ transform: scale(.8);
+ -moz-transform: scale(.8);
+ -webkit-transform: scale(.8);
+ -ms-transform: scale(.8);
+ -o-transform: scale(.8);
+}
+
+
+/* @checked + label */
+input[type=checkbox]:checked + label:before{
+ /* background */
+ background-image:
+ background-size: 80% auto;
+}
+
diff --git a/js/consultations.js b/js/consultations.js
index dca135d..7e75d76 100755
--- a/js/consultations.js
+++ b/js/consultations.js
@@ -50,7 +50,6 @@ var dateFormat = new formatChecker(null,
var timeFormat = new formatChecker(null,
'Hi:Mi', { 'H': '[0-2]', 'M': '[0-6]' }
);
-
// format numéro SECU simplifié
var secuFormat = new formatChecker(null,
'S ii Mi ii iii iii ii', { 'S': '[0-1]', 'M': '[0-1]' }
@@ -60,9 +59,9 @@ var secuFormat = new formatChecker(null,
var now = new Date();
-inCk.append( inDate, dateFormat, now.toLocaleFormat('%d/%m/%Y') );
-inCk.append( inHeure, timeFormat, now.toLocaleFormat('%H:%M') );
-inCk.append( inSecu, secuFormat, '1 23 45 67 890 123 45' );
+inCk.append( inDate, dateFormat, now.toLocaleFormat('%d/%m/%Y') );
+inCk.append( inHeure, timeFormat, now.toLocaleFormat('%H:%M') );
+inCk.append( inSecu, secuFormat, inSecu.placeholder );
inDate.addEventListener('keyup', function(e){
@@ -84,6 +83,14 @@ inHeure.addEventListener('keyup', function(e){
}
}, false);
+inDuree.addEventListener('keyup', function(e){
+ if( !isNaN(parseInt(inDuree.value)) ){
+ inDuree.value = parseInt( inDuree.value ); // on caste en
+ addClass(inDuree, 'validated'); // on active la classe si correct
+ }else // si incorrect
+ remClass(inDuree, 'validated'); // on désactive la classe
+}, false);
+
function checkSecuControlKey(pNumSecu){
var NIR = pNumSecu.slice(0,-2).replace(/ /g, '');
var key = pNumSecu.slice(-2);
diff --git a/src/invalid.svg b/src/invalid.svg
new file mode 100644
index 0000000..e305f94
--- /dev/null
+++ b/src/invalid.svg
@@ -0,0 +1,49 @@
+
+
\ No newline at end of file
diff --git a/src/save.svg b/src/save.svg
index 684127c..116425b 100755
--- a/src/save.svg
+++ b/src/save.svg
@@ -12,7 +12,7 @@
width="18"
id="svg2"
inkscape:version="0.48.4 r9939"
- sodipodi:docname="save.svg">
+ sodipodi:docname="save@hover.svg">
@@ -45,7 +45,7 @@
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="18.986111"
- inkscape:cx="0.3544805"
+ inkscape:cx="0.2919805"
inkscape:cy="13.75954"
inkscape:window-x="0"
inkscape:window-y="24"
@@ -58,19 +58,19 @@
d="m 3,1037.4 v 2 2 6 c 0,1.1 0.8954,2 2,2 h 14 c 1.105,0 2,-0.9 2,-2 v -6 -2 -2 H 3 z"
id="path6"
inkscape:connector-curvature="0"
- style="fill:#cccccc" />
+ style="fill:#2980b9" />
+ style="fill:#3498db" />
+ style="fill:#2980b9" />
-
diff --git a/src/validated.svg b/src/validated.svg
new file mode 100755
index 0000000..67c7b48
--- /dev/null
+++ b/src/validated.svg
@@ -0,0 +1,49 @@
+
+
\ No newline at end of file