diff options
Diffstat (limited to '')
-rw-r--r-- | admin/survey/script/ttest.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/admin/survey/script/ttest.js b/admin/survey/script/ttest.js index 6daf350..edea283 100644 --- a/admin/survey/script/ttest.js +++ b/admin/survey/script/ttest.js @@ -17,6 +17,7 @@ function ttestSpremenljivkaChange() { $('#ttestNumerusSpan').addClass('gray');
}
function ttestVariableChange() {
+
// prvi dropdown
var seq = new Array();
var spr = new Array();
@@ -24,6 +25,7 @@ function ttestVariableChange() { $('#ttestNumerus').each(function(index,el) {
spr.push($(el).val());
});
+
// omogočimo
$('#ttestNumerus').attr('disabled',false).focus().attr('size', 1);
$('#ttestNumerusSpan').removeClass('gray');
@@ -40,11 +42,13 @@ function ttestVariableChange() { var seq2 = $("#ttestSpremenljivka option:selected").attr('seq2');
var label2 = $("#ttestSpremenljivka option:selected").html();
+
// variable iz checkboxov
var sub_conditions = new Array();
$('#ttestVariablesSpan input:checked').each(function(index,el) {
sub_conditions.push($(el).val());
});
+
$("#ttestResults").load("ajax.php?t=ttest&a=variableChange", {anketa:srv_meta_anketa_id, sub_conditions:sub_conditions, spr:spr, seq:seq, grd:grd, spr2:spr2, seq2:seq2, grid2:grid2, label2:label2}, function() {
// preverimo da samo dva izbrana checkboxa
var cnt = $("input[name=subTtest]:checked").length;
@@ -54,9 +58,9 @@ function ttestVariableChange() { $(this).attr("disabled", true);
$(this).parent().addClass("gray");
});
- $("#ttestVariablesSpan").removeClass('active');
-
- } else if (cnt < 2) {
+ $("#ttestVariablesSpan").removeClass('active');
+ }
+ else if (cnt < 2) {
// onemogočimo
$('#ttestNumerus').attr('disabled',true);
$('#ttestNumerusSpan').addClass('gray');
@@ -80,7 +84,7 @@ function doArchiveTTest() { $('#fullscreen').show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
function submitArchiveTTest() {
@@ -97,7 +101,7 @@ function submitArchiveTTest() { $("#fullscreen").show();
});
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
}
@@ -113,9 +117,9 @@ function createArchiveTTestBeforeEmail() { });
} else {
if (parseInt(response) == -1) {
- alert("Nothing to archive!"+response);
+ genericAlertPopup('alert_no_archive_response',response);
} else {
- alert("Error while creating archive!"+response);
+ genericAlertPopup('alert_archive_error_response',response);
}
$('#fullscreen').hide();
$('#fade').fadeOut('slow');
@@ -123,6 +127,6 @@ function createArchiveTTestBeforeEmail() { });
} else {
- alert ('Ni podatkov za arhiv! Najprej kreirajte tabele.');
+ genericAlertPopup('alert_no_archive_tables');
}
};
\ No newline at end of file |