g

mail@pastecode.io avatar
unknown
html
2 years ago
7.8 kB
2
Indexable
Never
<!doctype html>
<html>
    <head>
        <link href="decorazioneSimply4.css" rel="stylesheet" type"text/css" />
            <link rel="icon" type="image/x-icon" href="/appatk/usoprova/favicon.ico">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>  <!-- intestazioni per app json , css,ajax-->
            <link rel="manifest" href="/appatk/usoprova/manifest.json">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
            <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
            <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.10.0/js/bootstrap-select.min.js"></script>
            <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.10.0/css/bootstrap-select.min.css" rel="stylesheet" />
            </head>
        </head>
        <body>
            <p id="immagine"><img src="logo.png" width="70%" class="img-fluid"> </p>
            <div id="compilazione">   
            <div class="form-group">
                    <input type="text" class="form-control" id="postazione" aria-describedby="postazione" placeholder="inserisci postazione">
                    <input type="text" class="form-control" id="postazione2" aria-describedby="postazione2" placeholder="inserisci ordine"> 

                    <!----------------------------------------------------------------------------------------------------------->

                    <div class="container">
                    <div class="row-xs-2 " >
                    <div class="col-xl-12">
                    <div class="box">
                    <!-- /.box-header -->
                    <div class="box-body">
                        <form>
                        <div class="form-group row">
                        <label for="" class="col-sm-2 form-control-label"></label>
                        <div class="col-sm-10" >
                        <select class="form-control selectpicker" id="selectOptoperazione"  data-live-search="true" >  <br> <br>
                        <option id="operator">seleziona il numero dell'operazione</option> <br> <br> 
                        </select>
                        </div>
                        </div>
                        </form>
                        </div>
                        <!-- /.box-body -->
                        </div>
                        <!-- /.box -->
                        </div>
                        <!-- /.col -->
                        </div>
                        <!-- /.row -->
              
                    <!--------------------------------------------------------------------------------------------------->

                        <div class="container">
                        <div class="row-xs-2 " >
                        <div class="col-xl-12">
                        <div class="box">
                        <!-- /.box-header -->
                        <div class="box-body">
                        <form>
                        <div class="form-group row">
                        <label for="" class="col-sm-2 form-control-label"></label>
                        <div class="col-sm-10" >
                        <select class="form-control selectpicker" id="selectOpt"  data-live-search="true" >  <br> <br>
                        <option id="operator">seleziona nome dell operatore</option> <br> <br> 
                        </select>
                        </div>
                        </div>
                        </form>
                        </div>
                        <!-- /.box-body -->
                        </div>
                        <!-- /.box -->
                        </div>
                        <!-- /.col -->
                        </div>
                        <!-- /.row -->

                    </div>
                        <!------------------------------------------------------------------------------------->

                        </div> <!-- DIV BOX COMPILAZIONE-->

                        <div class="btn-gruppo">
                            <button type="button" id="btn_play" class="btn btn-outline-secondary" onclick="play()">play</button> &nbsp &nbsp &nbsp
                            <button type="button" id="btn_pause" class="btn btn-outline-secondary" onclick="pause()">pause</button>&nbsp &nbsp &nbsp
                            <button type="button" id="btn_stop" class="btn btn-outline-secondary" onclick="stop()">stop</button>&nbsp &nbsp &nbsp
                            </div>


    </body>

    <script>

        
function play(){
         

         window.st="play";
         window.qta=0;
         //verifico che i campi non siano nulli , nel caso lo fossero i buttoni non funzionano
             document.body.bgColor ="#7ccd95" !important;
             document.getElementById("btn_play").disabled = true;       
             document.getElementById("btn_pause").disabled = false;
         
             document.getElementById('postazione').disabled = true;       //disabilito i bottoni che non voglio che siano cliccabili in quella determianata circostanza
             document.getElementById('postazione2').disabled = true;
             document.getElementById('selectOpt').disabled = true;
             document.getElementById('selectOptoperazione').disabled = true;
             document.getElementById("btn_stop").disabled = false;
         
         
        }

         
        function pause(){
                    window.st="pause";
                    window.qta=0;
                        document.body.bgColor="#ffc426";
                        document.getElementById("btn_play").disabled = false;
                        document.getElementById("btn_pause").disabled = true;
                        document.getElementById("btn_stop").disabled = false;
      
                        document.getElementById('postazione').disabled= true;
                        document.getElementById('postazione2').disabled = true;
                        document.getElementById('selectOpt').disabled = true;
                        document.getElementById('selectOptoperazione').disabled = true;
        
        }


        
        function stop(){
                            window.st="stop";
                         
                   window.qta=prompt("inserisci la quantita",0);  
                   if (qta === null) {
                        return; }                                 //controllo che il campo qta non contenga valori non consentiti, come ad esempio 0 o campo nullo.
                                                                //in quel caso grazie al while , il prompt si crerà di nuovo ogni qual volta venga inserito un valore non consentito
                    while(qta==0){
                    alert('campi non validi');
                    qta = prompt('inserisci la quantità');  }                                  
                    

                           
                        document.body.bgColor="#e56052";
                        document.getElementById('selectOpt').disabled = true;
                        document.getElementById('selectOptoperazione').disabled = true;
                        document.getElementById("btn_play").disabled = false;
                        document.getElementById("btn_pause").disabled = true;
                        document.getElementById("btn_stop").disabled = true;
                    }

    </script>

</html>