|
@@ -33,6 +33,7 @@
|
|
<td style="text-align:center"><h3>Key Value</h3></td>
|
|
<td style="text-align:center"><h3>Key Value</h3></td>
|
|
<td style="text-align:center"><h3>Target Value</h3></td>
|
|
<td style="text-align:center"><h3>Target Value</h3></td>
|
|
<td style="text-align:center"><h3>Actual Value</h3></td>
|
|
<td style="text-align:center"><h3>Actual Value</h3></td>
|
|
|
|
+ <td style="text-align:center"><h3>Relevant Isos</h3></td>
|
|
</tr>
|
|
</tr>
|
|
|
|
|
|
{{ text | safe}}
|
|
{{ text | safe}}
|
|
@@ -58,13 +59,7 @@
|
|
<!--<div class="split right">-->
|
|
<!--<div class="split right">-->
|
|
<div class="column column-three">
|
|
<div class="column column-three">
|
|
<h1>Additional Infos</h1>
|
|
<h1>Additional Infos</h1>
|
|
- <table>
|
|
|
|
- {% for k in isos %}
|
|
|
|
- <tr>
|
|
|
|
- <td><a href="{{ url_for('generate', name=k) }}" > {{ k }} </a> </td>
|
|
|
|
- </tr>
|
|
|
|
- {% endfor %}
|
|
|
|
- </table>
|
|
|
|
|
|
+ {{ links }}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -112,15 +107,28 @@
|
|
|
|
|
|
var key = 'last' + "_" +'{{og_filename}}';
|
|
var key = 'last' + "_" +'{{og_filename}}';
|
|
|
|
|
|
- console.log(array_value);
|
|
|
|
|
|
+ //console.log({{ dim }});
|
|
set_redis(key, array_value);
|
|
set_redis(key, array_value);
|
|
});
|
|
});
|
|
|
|
|
|
- $("input[type=checkbox]").on("change keyup input", function(){
|
|
|
|
|
|
+ $("input[type=checkbox]").change(function(){
|
|
|
|
|
|
// Print entered value in a div box
|
|
// Print entered value in a div box
|
|
$("#result").text($(this).attr('name'));
|
|
$("#result").text($(this).attr('name'));
|
|
- set_redis(key, value);
|
|
|
|
|
|
+ var key1 = 'last' + "_" +'{{og_filename}}';
|
|
|
|
+ var array_value1 = [];
|
|
|
|
+
|
|
|
|
+ if ($(this).is(':checked')) {
|
|
|
|
+ console.log($(this).attr('name') + ' is now checked');
|
|
|
|
+ array_value1[0] = 'relevant.' + $(this).attr('name');
|
|
|
|
+ array_value1[1] = true;
|
|
|
|
+ } else {
|
|
|
|
+ console.log($(this).attr('name') + ' is now unchecked');
|
|
|
|
+ array_value1[0] = $(this).attr('name');
|
|
|
|
+ array_value1[1] = false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ set_redis(key1, array_value1);
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
@@ -132,33 +140,87 @@
|
|
|
|
|
|
var number = $(this).attr('name');
|
|
var number = $(this).attr('name');
|
|
var coords = $(this).attr('data-coords');
|
|
var coords = $(this).attr('data-coords');
|
|
- highlight_areas(coords);
|
|
|
|
|
|
+ highlight_areas(coords, "red");
|
|
|
|
+ var detail = $(this).attr('data-details');
|
|
|
|
+ console.log(detail, "green");
|
|
|
|
+ highlight_details(detail, "green");
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
$("input[type=number]").blur(function(){
|
|
$("input[type=number]").blur(function(){
|
|
|
|
|
|
$("div").removeClass("red");
|
|
$("div").removeClass("red");
|
|
|
|
+ $("div").removeClass("green");
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
- function highlight_areas(coords){
|
|
|
|
|
|
+ function highlight_areas(coords, color){
|
|
|
|
+
|
|
|
|
+ let w = {{w}}
|
|
|
|
+ let h = {{h}}
|
|
|
|
+ let pos = $("#drawing").position();
|
|
|
|
+ let drawing_x = pos.left;
|
|
|
|
+ let drawing_y = pos.top;
|
|
|
|
+ let array_coords = coords.split(",");
|
|
|
|
+ let coords_x = parseFloat(array_coords[0]);
|
|
|
|
+ let coords_xmax = parseFloat(array_coords[2]);
|
|
|
|
+ let coords_y = parseFloat(array_coords[1]);
|
|
|
|
+ let coords_ymax = parseFloat(array_coords[3]);
|
|
|
|
+ let coords_width = (coords_xmax - coords_x);
|
|
|
|
+
|
|
|
|
+ let coords_height = (coords_ymax - coords_y);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let width = $("#drawing").width();
|
|
|
|
+ let height = $("#drawing").height();
|
|
|
|
+ let rel_width = coords_width/h*width*1.4;
|
|
|
|
+ let rel_height = coords_height/w*height*1.4;
|
|
|
|
+
|
|
|
|
+ let x = width*(coords_x*height/width/w);
|
|
|
|
+
|
|
|
|
+ let y = height*(coords_y*width/height/h);
|
|
|
|
+ console.log(w, h, rel_width, rel_height,x,y);
|
|
|
|
+
|
|
|
|
+ let $point1 = jQuery("<div class="+color+"/>").css({top: (drawing_y + y -5) + 'px', left: (drawing_x + x-5) + 'px', width: rel_width , height: rel_height});
|
|
|
|
+
|
|
|
|
+ $(".images").append($point1);
|
|
|
|
+
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ function highlight_details(coords, color){
|
|
|
|
|
|
|
|
+ let w = {{w}}
|
|
|
|
+ let h = {{h}}
|
|
let pos = $("#drawing").position();
|
|
let pos = $("#drawing").position();
|
|
let drawing_x = pos.left;
|
|
let drawing_x = pos.left;
|
|
let drawing_y = pos.top;
|
|
let drawing_y = pos.top;
|
|
let array_coords = coords.split(",");
|
|
let array_coords = coords.split(",");
|
|
let coords_x = parseFloat(array_coords[0]);
|
|
let coords_x = parseFloat(array_coords[0]);
|
|
let coords_y = parseFloat(array_coords[1]);
|
|
let coords_y = parseFloat(array_coords[1]);
|
|
|
|
+ let width_div = (parseFloat(array_coords[2]) - parseFloat(array_coords[0]));
|
|
|
|
+
|
|
|
|
+ let height_div = (parseFloat(array_coords[3]) - parseFloat(array_coords[1]));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
let width = $("#drawing").width();
|
|
let width = $("#drawing").width();
|
|
|
|
+ let rel_width = width_div/h*width;
|
|
|
|
+
|
|
|
|
+
|
|
let height = $("#drawing").height();
|
|
let height = $("#drawing").height();
|
|
- let x = width*(coords_x/595)-60;
|
|
|
|
- let y = height*(coords_y/842)+10;
|
|
|
|
- console.log(width, height);
|
|
|
|
|
|
+ let rel_height = height*height_div/w;
|
|
|
|
+
|
|
|
|
+ let x = width*(coords_x*height/width/w);
|
|
|
|
+ let y= height*(coords_y*width/height/h);
|
|
|
|
+ console.log(rel_width, rel_height);
|
|
|
|
+ if (array_coords[3] > 10000) {
|
|
|
|
+ rel_height = height - y;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
- let $point = jQuery("<div class='red'/>").css({top: (drawing_y + y) + 'px', left: (drawing_x + x) + 'px'})
|
|
|
|
|
|
+ let $point = jQuery("<div class="+color+"/>").css({top: (drawing_y + y) + 'px', left: (drawing_x + x) + 'px', width: (rel_width) + 'px', height: (rel_height) + 'px'});
|
|
|
|
|
|
$(".images").append($point);
|
|
$(".images").append($point);
|
|
|
|
|