minmod
This commit is contained in:
parent
65848c0fe0
commit
21a4ff24b8
|
@ -24,8 +24,6 @@
|
||||||
<span class='title' style='color: ".$_SESSION['WAREHOUSE']['theme']."'>@name <span>#@name</span></span>
|
<span class='title' style='color: ".$_SESSION['WAREHOUSE']['theme']."'>@name <span>#@name</span></span>
|
||||||
<span class='link_remove' data-cluster='@id_machine_cluster'>@icon_remove</span>
|
<span class='link_remove' data-cluster='@id_machine_cluster'>@icon_remove</span>
|
||||||
|
|
||||||
<span class='link_edit' data-cluster='@id_machine_cluster'>@icon_edit</span>
|
|
||||||
|
|
||||||
<span class='code'>
|
<span class='code'>
|
||||||
@icon_type
|
@icon_type
|
||||||
<span>utilisateurs (@count)</span>
|
<span>utilisateurs (@count)</span>
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
<span class='title' style='color: ".$_SESSION['WAREHOUSE']['theme']."'>@name <span>#@name</span></span>
|
<span class='title' style='color: ".$_SESSION['WAREHOUSE']['theme']."'>@name <span>#@name</span></span>
|
||||||
<span class='link_remove' data-cluster='@id_user_cluster'>@icon_remove</span>
|
<span class='link_remove' data-cluster='@id_user_cluster'>@icon_remove</span>
|
||||||
|
|
||||||
<span class='link_edit' data-cluster='@id_user_cluster'>@icon_edit</span>
|
|
||||||
|
|
||||||
<span class='code'>
|
<span class='code'>
|
||||||
@icon_type
|
@icon_type
|
||||||
<span>@count utilisateurs</span>
|
<span>@count utilisateurs</span>
|
||||||
|
|
|
@ -218,11 +218,7 @@
|
||||||
/* [0] Initialisation et éléments
|
/* [0] Initialisation et éléments
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
/* (1) Etats du système */
|
/* (1) Etats du système */
|
||||||
var STATE = {
|
var STATE = [ false, false, false ];
|
||||||
started: false,
|
|
||||||
signaled: false,
|
|
||||||
locked: false
|
|
||||||
};
|
|
||||||
|
|
||||||
/* (2) Elements du DOM */
|
/* (2) Elements du DOM */
|
||||||
var mBox = document.getElementById('machine-box');
|
var mBox = document.getElementById('machine-box');
|
||||||
|
@ -260,17 +256,17 @@
|
||||||
---------------------------------------------------------*/
|
---------------------------------------------------------*/
|
||||||
function updateChips(){
|
function updateChips(){
|
||||||
/* (1) Si machine bloquée */
|
/* (1) Si machine bloquée */
|
||||||
if( STATE.locked ){
|
if( STATE[2] ){
|
||||||
STATE.started = false;
|
STATE[0] = false;
|
||||||
STATE.signaled = false;
|
STATE[1] = false;
|
||||||
led.style.background = '#f00';
|
led.style.background = '#f00';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (2) Si machine allumée */
|
/* (2) Si machine allumée */
|
||||||
else if( STATE.started ){
|
else if( STATE[0] ){
|
||||||
|
|
||||||
// {1} Allumée + signalée //
|
// {1} Allumée + signalée //
|
||||||
if( STATE.signaled )
|
if( STATE[1] )
|
||||||
led.style.background = '#00f';
|
led.style.background = '#00f';
|
||||||
|
|
||||||
// {2} Allumée (non signalée) //
|
// {2} Allumée (non signalée) //
|
||||||
|
@ -280,7 +276,7 @@
|
||||||
}else
|
}else
|
||||||
led.style.background = '#000';
|
led.style.background = '#000';
|
||||||
|
|
||||||
if( STATE.started == true )
|
if( STATE[0] == true )
|
||||||
r1.addClass('active');
|
r1.addClass('active');
|
||||||
else
|
else
|
||||||
r1.remClass('active');
|
r1.remClass('active');
|
||||||
|
@ -323,9 +319,9 @@
|
||||||
function countRoutine(){
|
function countRoutine(){
|
||||||
COUNT++;
|
COUNT++;
|
||||||
|
|
||||||
if( COUNT == 1 ) STATE.started = !STATE.started;
|
if( COUNT == 1 ) STATE[0] = !STATE[0];
|
||||||
if( COUNT == 2 ) STATE.signaled = true;
|
if( COUNT == 2 ) STATE[1] = true;
|
||||||
if( COUNT == 3 ) STATE.locked = true;
|
if( COUNT == 3 ) STATE[2] = true;
|
||||||
|
|
||||||
updateChips();
|
updateChips();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue