|
@@ -37,7 +37,9 @@
|
|
|
{% end %}
|
|
|
|
|
|
{% if data['style'][key]['type'] == "integer-to-string" %}
|
|
|
-<div style='position: absolute; top: {{ data['style'][key]['top'] }}; left:{{ data['style'][key]['left'] }}; width:{{ data['style'][key]['width'] }}px; height:{{ data['style'][key]['height'] }}px;' data-dict="{{ data['style'][key]['dict'] }}" data-type="{{ data['style'][key]['type'] }}" class='varbox' id="{{ key }}">
|
|
|
+<div style='position: absolute; top: {{ data['style'][key]['top'] }}; left:{{
|
|
|
+ data['style'][key]['left'] }}; width:{{ data['style'][key]['width'] }}px;
|
|
|
+ height:{{ data['style'][key]['height'] }}px;' data-cond="{{data['style'][key]['cond']}}" data-dict="{{ data['style'][key]['dict'] }}" data-type="{{ data['style'][key]['type'] }}" class='varbox' id="{{ key }}">
|
|
|
<p><span style="color: #000; font-size: {{ data['style'][key]['header']['size'] }}; font-weight: {{ data['style'][key]['header']['weight'] }};" class="title">{{ data['style'][key]['header']['title'] }} </span><br /><span style="color: #000; font-size: {{ data['style'][key]['unit']['size'] }}; font-weight: {{ data['style'][key]['unit']['weight'] }};" class="varval">??? </span></p>
|
|
|
</div>
|
|
|
{% else %}
|
|
@@ -203,6 +205,7 @@ function add() {
|
|
|
"id='" + varname +
|
|
|
"' data-type='" + vartype +
|
|
|
"' data-dict='" + unit_text +
|
|
|
+ "' data-cond='" + data_condition +
|
|
|
"'>" +
|
|
|
"<p>" +
|
|
|
"<span style='color: " + title_color + ";" +
|
|
@@ -271,6 +274,7 @@ function mysave(data) {
|
|
|
tmp["off"] = $("#"+key).attr("data-off");
|
|
|
} else if ( $("#"+key).attr("data-type") == "integer-to-string" ) {
|
|
|
tmp["dict"] = $("#"+key).attr("data-dict");
|
|
|
+ tmp["cond"] = $("#"+key).attr("data-cond");
|
|
|
header = {};
|
|
|
header["title"] = $(".title", "#"+key).text();
|
|
|
//header["color"] = $(".title", "#"+key).css("color");
|
|
@@ -290,10 +294,10 @@ function mysave(data) {
|
|
|
position[key] = tmp;
|
|
|
}
|
|
|
}
|
|
|
- //console.log("Check here");
|
|
|
- //console.log(position);
|
|
|
+ console.log("Check here");
|
|
|
+ console.log(position);
|
|
|
var dataToSend = JSON.stringify(position);
|
|
|
- console.log(dataToSend);
|
|
|
+ //console.log(dataToSend);
|
|
|
$.ajax({
|
|
|
url: '/save/',
|
|
|
type: 'POST',
|