Skip to content
Snippets Groups Projects
Commit 605d972e authored by TonyFord's avatar TonyFord
Browse files

qr code improvements

parent 21826753
No related branches found
No related tags found
No related merge requests found
......@@ -69,8 +69,8 @@
{% capture price %}{% if price_ex != "" %}{{price_ex}}{% else %}{{ o.price-source }}{% endif %}{% endcapture %}
<div class="orderlist-price"><font class="faircoin-price">{{ o.price-per-unit | divided_by: price | round:1 | decimals }} FAIR</font><br>{% if min-size > 0 %}{{ min-size }}..{% endif %}{{ max-size }} {{ o.unit }}{% if site.data.price-sources[priceref] %}<br>( {{ o.price-per-unit | decimals }} {{ site.data.price-sources[priceref].currency }} / {{ o.unit }} )<br>( {{ price }} {{ site.data.price-sources[priceref].currency }} / FAIR )<br><i>{% if price_ex != "" %}<a href="{{ site.data.price-sources[o.price-source].www }}">{{ o.price-source | replace: '-','/' }}</a>{% else %}fixed price{% endif %}</i>{% else %}<br><br><br>{% endif %}
<div class="qrcode d-none">
<div onclick="$(this).parent().toggleClass('d-none')" id="qrcode_{{ peer[0] }}_{{ hid }}" data-price="{{ o.price-per-unit | divided_by: price | round:1 | decimals }}" class=""></div>
<div class="qrcode invisble">
<div onclick="$(this).parent().toggleClass('invisble')" id="qrcode_{{ peer[0] }}_{{ hid }}" data-price="{{ o.price-per-unit | divided_by: price | round:1 | decimals }}" class=""></div>
</div>
</div>
</div>
......@@ -83,30 +83,6 @@
</div>
<style>
.qrcode {
position: relative;
width: 0px;
height: 0px;
right: 200px;
top: -85px;
z-index: 200;
}
.qrcode > div {
z-index: 201;
height: 150px;
width: 150px;
background: white;
border: 20px solid white;
}
.qrcode.d-none {
z-index: 0;
}
</style>
<script>
function createQRCode(qrcode){
......@@ -126,8 +102,8 @@ function createQRCode(qrcode){
window[qrcode].makeCode(url); // make another code.
}
$('.qrcode').toggleClass('d-none',true);
$('#'+qrcode).parent().toggleClass('d-none');
$('.qrcode').toggleClass('invisble',true);
$('#'+qrcode).parent().toggleClass('invisble');
}
......
......@@ -20,7 +20,11 @@ module Arrays
def objectsize(input)
c=0
for a in input
c+=a[1].length
for aa in a[1]
if aa['test'] != true
c+=1
end
end
end
c
end
......
......@@ -443,3 +443,27 @@ bid {
.user-address {
cursor: pointer;
}
.qrcode {
position: relative;
width: 0px;
height: 0px;
right: 200px;
top: -85px;
z-index: 200;
opacity: 1;
transition: opacity 0.4s 0s ease-out;
}
.qrcode > div {
z-index: 201;
height: 150px;
width: 150px;
background: white;
border: 20px solid white;
}
.qrcode.invisble {
z-index: 0;
opacity: 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment