@@ -371,16 +374,28 @@ function uploadFile() {
$('#closecamera').hide();
$('input:radio').change(function ()
{
+
var total1 = 0;
var total2 = 0;
var total3 = 0;
+ var pensect1 = 0;
+ var pensect2 = 0;
+ var pensect3 = 0;
+ $totscore1 = 112;
+ $totscore2 = 62;
+ $totscore2 = 16;
+ $newscore1 = 0;
+
$('input:radio:checked').each(function(){
+ $cpid = $(this).data("cpid");
+ $ptscp = isNaN(parseInt($(this).data("ptscp"))) ? 0 : parseInt($(this).data("ptscp"));
+ $('[name="points['+$cpid +']"]').val($ptscp);
if (!$(this).hasClass('do-not-calc')) {
if ($(this).data("sect") === 1) {
total1 += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val());
total1pc = 100 * (total1 / 112);
- $("#score1").text(total1pc.toFixed(2) + '%');
+ $("#score1").text(total1pc.toFixed(2) + '%');
$("#score4").text(total1pc.toFixed(2) + '%');
}
if ($(this).data("sect") === 12) {
@@ -396,7 +411,20 @@ function uploadFile() {
$("#score6").text(total3pc.toFixed(2) + '%');
}
}
- });
+ });
+
+ $("input[data-sectpen='1']").each(function(){
+ pensect1 += parseInt($(this).val());
+ });
+ $("input[data-sectpen='12']").each(function(){
+ pensect2 += parseInt($(this).val());
+ });
+ $("input[data-sectpen='16']").each(function(){
+ pensect3 += parseInt($(this).val());
+ });
+ $('[name="pensect1"]').val(pensect1);
+ $('[name="pensect2"]').val(pensect2);
+ $('[name="pensect3"]').val(pensect3);
gauge1.set(total1);
AnimationUpdater.run();
@@ -516,11 +544,16 @@ function uploadFile() {
gauge6.animationSpeed = 32; // set animation speed (32 is default value)
gauge6.set(0); // set actual value
-
+var pensect1 = 0;
+ var pensect2 = 0;
+ var pensect3 = 0;
var total1 = 0;
var total2 = 0;
var total3 = 0;
$('input:radio:checked').each(function(){
+ $cpid = $(this).data("cpid");
+ $ptscp = isNaN(parseInt($(this).data("ptscp"))) ? 0 : parseInt($(this).data("ptscp"));
+ $('[name="points['+$cpid +']"]').val($ptscp);
if (!$(this).hasClass('do-not-calc')) {
if ($(this).data("sect") === 1) {
total1 += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val());
@@ -542,6 +575,18 @@ function uploadFile() {
}
}
});
+ $("input[data-sectpen='1']").each(function(){
+ pensect1 += parseInt($(this).val());
+ });
+ $("input[data-sectpen='12']").each(function(){
+ pensect2 += parseInt($(this).val());
+ });
+ $("input[data-sectpen='16']").each(function(){
+ pensect3 += parseInt($(this).val());
+ });
+ $('[name="pensect1"]').val(pensect1);
+ $('[name="pensect2"]').val(pensect2);
+ $('[name="pensect3"]').val(pensect3);
gauge1.set(total1);
AnimationUpdater.run();