/[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 2910 by torben, Wed Feb 3 22:32:05 2016 UTC revision 3116 by torben, Wed Sep 21 09:33:45 2016 UTC
# Line 2  Line 2 
2    <head>    <head>
3    <head>    <head>
4          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5            
6            <link rel="stylesheet" href="webjars/jquery-ui/1.11.4/jquery-ui.css" />
7    
8          <link rel="stylesheet" href="webjars/bootstrap/3.3.5/css/bootstrap.min.css" />          <link rel="stylesheet" href="webjars/bootstrap/3.3.5/css/bootstrap.min.css" />
9                    
10          <link rel="stylesheet" href="webjars/bootstrap-fileinput/4.2.7/css/fileinput.min.css" />          <link rel="stylesheet" href="webjars/bootstrap-fileinput/4.2.7/css/fileinput.min.css" />
11            
12            <style>
13            
14    @media (min-width: 1300px) {
15            .container {
16                width: 1300px; /*default 1170px*/
17            }
18            .panel-actions {
19              margin-top: -20px;
20              margin-bottom: 0;
21              text-align: right;
22            }
23            .panel-actions a {
24              color:#333;
25            }
26            .panel-fullscreen {
27                display: block;
28                z-index: 9999;
29                position: fixed;
30                width: 100%;
31                height: 100%;
32                top: 0;
33                right: 0;
34                left: 0;
35                bottom: 0;
36                overflow: auto;
37            }      
38            
39    }
40            </style>
41    
42  <!--  use webjars for dependencies -->  <!--  use webjars for dependencies -->
43          <script src="webjars/jquery/2.1.4/jquery.js"></script>          <script src="webjars/jquery/2.1.4/jquery.js"></script>
44            <script src="webjars/jquery-ui/1.11.4/jquery-ui.js"></script>
45          <script src="webjars/bootstrap/3.3.5/js/bootstrap.min.js"></script>          <script src="webjars/bootstrap/3.3.5/js/bootstrap.min.js"></script>
46                    
47          <script src="webjars/bootstrap-fileinput/4.2.7/js/fileinput.min.js"></script>          <script src="webjars/bootstrap-fileinput/4.2.7/js/fileinput.min.js"></script>
# Line 41  function loadTasks() { Line 74  function loadTasks() {
74                                                    
75                                                    
76                          html += "<div class='panel " + pclass + "'>";                          html += "<div class='panel " + pclass + "'>";
77                          html += "<div class='panel-heading'><h4 class='panel-title'>" + entry.description + "</h4></div>";                          html += "<div class='panel-heading'>";
78                            if (entry.state == "STATE_DONE" || entry.state == "STATE_ABORTED" || entry.state ==  "STATE_QUEUED") {
79                                    html += "<button type='button' class='close removetask' aria-label='Close' taskid='" + entry.id+ "'><span aria-hidden='true'>&times;</span></button>";
80                            }
81                            html += "<h4 class='panel-title'>" + entry.description + "</h4>";
82                            html += "</div>";
83                          html += "  <div class='panel-body'>";                          html += "  <div class='panel-body'>";
84    
85                          html += entry.detail;                          html += entry.detail;
# Line 96  $(document).ready( function() { Line 134  $(document).ready( function() {
134          loadTasks();          loadTasks();
135          setInterval(loadTasks, 5000);          setInterval(loadTasks, 5000);
136                    
137            $("#center").resizable({
138            handles: 'e, w'
139            });
140            
141                    
142          $(document).on('click', '.viewlog', function(event) { // Bind future elements          $(document).on('click', '.viewlog', function(event) { // Bind future elements
143                  var taskid = $(this).attr('taskid');                  var taskid = $(this).attr('taskid');
# Line 103  $(document).ready( function() { Line 145  $(document).ready( function() {
145                                    
146          });          });
147                    
148            $(document).on('click', '.removetask', function(event) { // Bind future elements
149                    var taskid = $(this).attr('taskid');
150                    $.get('rest/tasks/remove/' + taskid, function() {
151                            loadTasks();
152                    });            
153            });
154            
155          $("#file").fileinput({          $("#file").fileinput({
156                  //'showUpload':false,                  //'showUpload':false,
157                  'showRemove': false,                              'showRemove': false,            
# Line 128  $(document).ready( function() { Line 177  $(document).ready( function() {
177          });          });
178                    
179                    
180            
181            
182          $("#afstandBtn").click( function(){          $("#afstandBtn").click( function(){
183                  var dist = $("#afstand_distributor").val();                  var dist = $("#afstand_distributor").val();
184                  if (dist == "") {                  if (dist == "") {
185                          alert("Du skal vælge distributør");                          alert("Du skal vælge distributør");
186                          return;                          return;
187                  }                  }
188                    var type = $("#afstand_type").val();
189                    var url = "rest/commands/distancecalculation/" + dist + "/" + type;
190                                    
191                                    
192                  $.get("rest/commands/distancecalculation/" + dist, function() {                  $.get(url, function() {
193                          loadTasks(); //Force reload of tasks immediately                          loadTasks(); //Force reload of tasks immediately
194                  } );                  } );
195                                    
196          });          });
197                    
198            $("#dawaBtn").click( function(){
199    
200                    var url = "rest/commands/dawa";
201                    
202                    
203                    $.get(url, function() {
204                            loadTasks(); //Force reload of tasks immediately
205                    } );
206                    
207            });
208            
209        //Toggle fullscreen
210        $("#panel-fullscreen").click(function (e) {
211            e.preventDefault();
212            
213            var $this = $(this);
214        
215            if ($this.children('i').hasClass('glyphicon-resize-full'))
216            {
217                $this.children('i').removeClass('glyphicon-resize-full');
218                $this.children('i').addClass('glyphicon-resize-small');
219            }
220            else if ($this.children('i').hasClass('glyphicon-resize-small'))
221            {
222                $this.children('i').removeClass('glyphicon-resize-small');
223                $this.children('i').addClass('glyphicon-resize-full');
224            }
225            $(this).closest('.panel').toggleClass('panel-fullscreen');
226        });
227    
228            
229  });  });
230    
231  </script>        </script>      
# Line 154  $(document).ready( function() { Line 238  $(document).ready( function() {
238      <h1>Dao Adresse Vedligehold</h1>      <h1>Dao Adresse Vedligehold</h1>
239    </div>    </div>
240    <div id="body">    <div id="body">
241      <div class="row">      <div class="row">
242        <div class="col-sm-3" id="leftCol" >        <div class="col-sm-3" id="leftCol" >
243          <div class="panel panel-primary">          <div class="panel panel-primary">
244                  <div class="panel-heading">                  <div class="panel-heading">
# Line 169  $(document).ready( function() { Line 253  $(document).ready( function() {
253        </div>        </div>
254                
255        <div class="col-sm-6" id="center">        <div class="col-sm-6" id="center">
256        <pre id="logview">          <div class="panel panel-primary">
257        </pre>                  <div class="panel-heading">
258                            <h3 class="panel-title">Log</h3>
259                             <ul class="list-inline panel-actions">
260    
261                            <li><a href="#" id="panel-fullscreen" role="button" title="Toggle fullscreen"><i class="glyphicon glyphicon-resize-full"></i></a></li>
262                            
263                      </ul>
264                            </div>
265                            <div class="panel-body">
266                                <pre id="logview">
267                            </pre>
268                            </div>
269                    </div>
270        </div>        </div>
271                
272        <div class="col-sm-3" id="rightCol" >        <div class="col-sm-3" id="rightCol" >
# Line 222  $(document).ready( function() { Line 318  $(document).ready( function() {
318                              <option>BK</option>                              <option>BK</option>
319                              <option>DAO</option>                              <option>DAO</option>
320                            </select>                            </select>
321    
322                              
323                              <label for="type">Type:</label>
324                              <select class="form-control" id="afstand_type" name="afstand_type">
325                                <option>Incremental</option>
326                                <option>Full</option>                          
327                              </select>
328                            <br>                            <br>
329    
330                                                        
331                            <button class="btn btn-primary" id="afstandBtn">Beregn</button>                            <button class="btn btn-primary" id="afstandBtn">Beregn</button>
332        
333                                                        
334                          </div>                          </div>
335                  </div><!-- Afstand-andenrute panel -->                  </div><!-- Afstand-andenrute panel -->
336                            
337              <div class="panel panel-primary">
338                    <div class="panel-heading">
339                            <h3 class="panel-title">Dawa Indlæsning</h3>
340                            </div>
341                            <div class="panel-body">
342                              
343                              <button class="btn btn-primary" id="dawaBtn">Beregn</button>
344    
345                            </div>
346                    </div> <!-- DAWA -->                    
347                    
348                    
349        </div><!-- rightcol -->        </div><!-- rightcol -->

Legend:
Removed from v.2910  
changed lines
  Added in v.3116

  ViewVC Help
Powered by ViewVC 1.1.20