/[projects]/dao/DaoAdresseVedligehold/src/main/webapp/index.html
ViewVC logotype

Diff of /dao/DaoAdresseVedligehold/src/main/webapp/index.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2852 by torben, Tue Jan 26 22:24:13 2016 UTC revision 2900 by torben, Mon Feb 1 09:39:11 2016 UTC
# Line 42  function loadTasks() { Line 42  function loadTasks() {
42                                                    
43                          html += "<div class='panel " + pclass + "'>";                          html += "<div class='panel " + pclass + "'>";
44                          html += "<div class='panel-heading'><h4 class='panel-title'>" + entry.description + "</h4></div>";                          html += "<div class='panel-heading'><h4 class='panel-title'>" + entry.description + "</h4></div>";
45                            html += "  <div class='panel-body'>";
46    
47                          html += entry.detail;                          html += entry.detail;
48                                                    
49                          if (entry.state == "STATE_ABORTED")                          if (entry.state == "STATE_ABORTED")
50                                  html += "<br><div style='color: red'>" + entry.errorMessage + "</div>";                                  html += "<br><div style='color: red'>" + entry.errorMessage + "</div>";
51                                    
52                            if (entry.state == "STATE_RUNNING") {
53                                    if (entry.percentCompleted >= 0) {
54                                            var percent = entry.percentCompleted.toFixed(2);
55                                            html += "<div class='progress'>";
56                                            html += "<div class='progress-bar' role='progressbar' aria-valuenow='" + percent + "' aria-valuemin='0' aria-valuemax='100' style='width:" + percent + "%'> " ;
57                                            html +=  percent + "%";
58                                            html += " </div>";
59                                            html += "</div>";
60                                    }
61                            }
62                                                    
63                          html += "<br/><div style='font-size: 8px; margin: 7px;'>" + entry.state + "</div>";                          html += "<br/><div style='font-size: 8px; '>" + entry.state + "</div>";
64                                                    
65                          html += "</div>";                          html += "  </div>"; //panel-body
66                            html += "</div>"; //panel
67                                                    
68                  });                  });
69                  if (html == "") {                  if (html == "") {
# Line 103  $(document).ready( function() { Line 116  $(document).ready( function() {
116                  $('#file').fileinput('upload');                  $('#file').fileinput('upload');
117          });          });
118                    
119            
120            $("#afstandBtn").click( function(){
121                    var dist = $("#afstand_distributor").val();
122                    if (dist == "") {
123                            alert("Du skal vælge distributør");
124                            return;
125                    }
126                    
127                    
128                    $.get("rest/commands/distancecalculation/" + dist, function() {
129                            loadTasks(); //Force reload of tasks immediately
130                    } );
131                    
132            });
133            
134  });  });
135    
136  </script>        </script>      
# Line 136  $(document).ready( function() { Line 164  $(document).ready( function() {
164        <div class="col-sm-3" id="rightCol" >        <div class="col-sm-3" id="rightCol" >
165          <div class="panel panel-primary">          <div class="panel panel-primary">
166                  <div class="panel-heading">                  <div class="panel-heading">
167                          <h3 class="panel-title">Actions</h3>                          <h3 class="panel-title">Upload File</h3>
168                          </div>                          </div>
169                          <div class="panel-body">                          <div class="panel-body">
170                                                    
# Line 167  $(document).ready( function() { Line 195  $(document).ready( function() {
195                                                                    
196                                                    
197                          </div>                          </div>
198          </div>          </div> <!--  upload panel -->
199        </div>          
200      </div>            <div class="panel panel-primary">
201                    <div class="panel-heading">
202                            <h3 class="panel-title">Afstand anden rute</h3>
203                            </div>
204                            <div class="panel-body">
205                            
206                            
207                              <label for="distributor">Distributør:</label>
208                              <select class="form-control" id="afstand_distributor" name="afstand_distributor">
209                                    <option></option>
210                                <option>BK</option>
211                                <option>DAO</option>
212                              </select>
213                              <br>
214                              
215                              <button class="btn btn-primary" id="afstandBtn">Beregn</button>
216      
217                              
218                            </div>
219                    </div><!-- Afstand-andenrute panel -->
220                            
221            
222            
223          </div><!-- rightcol -->
224        </div> <!-- row -->
225                
226    </div>    </div><!-- body -->
227      
228      
229  </div>  </div>
230        
231    

Legend:
Removed from v.2852  
changed lines
  Added in v.2900

  ViewVC Help
Powered by ViewVC 1.1.20