Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.217.228.195
Current Path : /var/www/html/sdu/js/ |
| Current File : /var/www/html/sdu/js/convdet.js |
/*
*
* PROGRAMED BY Prashanth
* FOR THE Enable or block Exam application, Concession Fee and Hall Ticket
* DATE: 10/08/2018
* TIME: 2:11 PM
*
*/
$g_fmacs_total_row_count = 0;
$g_fmacas_org_rem_sub = "";
$g_fmacas_rem_sub = "";
function UpdConvDet() {
$g_fmacs_total_row_count = 0;
$g_fmacas_rem_sub = "";
$g_fmacas_org_rem_sub = "";
$("#page_main_div").load("html_modules/convdet.html", function() {
document.getElementById("display_module_name").innerHTML =
"Update Convocation Details";
document.getElementById("module_name_for_save").value = "ECHblk";
document.getElementById("is_add_edit").value = "Add";
getDefaultHeadFooterLinks("Update Convocation Details");
});
}
function getStudentsforconv() {
if (trim(document.getElementById("ech_degree_code").value) == "") {
alert("Please enter the Degree Code");
$("#ech_degree_code").focus();
return;
}
$("#ech_module_student_data").html("");
$.blockUI({
message:
"<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>"
});
$.ajax({
type: "POST",
data: "°ree=" + $("#ech_degree_code").val(),
url: $host_url + "getStudentsforconv.demo",
success: getStudentsforconvResponce
});
}
var total;
function getStudentsforconvResponce($responce) {
$.unblockUI();
$responce = eval("(" + $responce + ")");
if ($responce.error_code == 0) {
document.getElementById("ech_degree_code").disabled = false;
$("#ech_module_student_data").show();
$("#ech_module_student_data").html("");
$("#ech_module_student_data").html($responce.data.html_data);
total = $responce.data.total_count;
$g_fmacas_org_rem_sub = $responce.data.rem_sub;
$g_fmacas_rem_sub = $responce.data.rem_sub;
} else {
$("#ech_module_student_data").show();
$("#ech_module_student_data").html("");
// $g_fmacas_total_row_count=0;
alert($responce.data.msg);
}
}
function saveUpdConvDet() {
if (trim(document.getElementById("ech_degree_code").value) == "") {
alert("Please enter the Degree. Code");
document.getElementById("ech_degree_code").focus();
return;
}
var rgECH = [];
if ($("#ech_module_student_data [name='hidden']:checked").length == 0) {
alert("No changes Made");
return;
}
var i = 0;
$("#ech_module_student_data [name='hidden']:checked").each(function() {
var reg = this.id.split("_");
var regpush = {};
regpush["kanname"] = document.getElementById(`kan_${reg[1]}`).value;
regpush["feepaid"] = document.getElementById(`fee_${reg[1]}`).value;
regpush["recepet"] = document.getElementById(`recepet_${reg[1]}`).value; //$("#recepet_" + reg[1]).val();
regpush["regno"] = reg[1];
if (document.getElementById("eli_" + reg[1]).checked == true)
regpush["elig"] = "T";
else regpush["elig"] = "F";
if (document.getElementById("cns_" + reg[1]).checked == true)
regpush["cns"] = "T";
else regpush["cns"] = "F";
console.log(regpush);
rgECH.push(regpush);
i++;
});
var strECH = JSON.stringify(rgECH);
console.log(strECH);
$.ajax({
type: "POST",
data: "degree=" + $("#ech_degree_code").val() + "&strECH=" + strECH,
url: $host_url + "saveUpdConvDet.demo",
success: ssaveUpdConvDetResponce
});
}
function ssaveUpdConvDetResponce($responce) {
$responce = eval("(" + $responce + ")");
alert($responce.data);
$g_fmacas_rem_sub = $g_fmacas_org_rem_sub;
document.getElementById("fmacas_module_subject_data").innerHTML = "";
}
function statusChanged(obj) {
console.log(obj);
// console.log(
// $(obj)
// .parents("tr")
// .find("input[name='hidden']")
// .attr("checked", "checked")
// );
document.getElementById("h_" + obj).checked = true;
}
function ClearECHblk() {
document.getElementById("ech_degree_code").value = "";
document.getElementById("ech_degree_name").value = "";
document.getElementById("ech_sub_Examno").value = "";
document.getElementById("ech_sub_Exam_name").value = "";
document.getElementById("ech_module_student_data").innerHTML = "";
}
function selectall() {
var k;
if (document.getElementById("elig").checked == true) {
for (k = 1; k < parseInt(total); k++) {
var regno = document.getElementById("hregno_" + k).value;
document.getElementById("eligibility_" + k).checked = true;
document.getElementById("h_" + regno).checked = true;
}
} else {
for (k = 1; k < total; k++) {
var regno = document.getElementById("hregno_" + k).value;
document.getElementById("eligibility_" + k).checked = false;
document.getElementById("h_" + regno).checked = true;
}
}
}
function selecthtall() {
var k;
if (document.getElementById("ht").checked == true) {
//alert(total);
for (k = 1; k < parseInt(total); k++) {
var regno = document.getElementById("hregno_" + k).value;
document.getElementById("ht_" + k).checked = true;
document.getElementById("h_" + regno).checked = true;
}
} else {
for (k = 1; k < total; k++) {
var regno = document.getElementById("hregno_" + k).value;
document.getElementById("ht_" + k).checked = false;
document.getElementById("h_" + regno).checked = true;
}
}
}
function onLoad(evt, id) {
console.log(id);
var $i = 1;
var charCode = evt.which ? evt.which : evt.keyCode;
if (charCode == 32 || $i == 1) {
var options = {
sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH,
destinationLanguage: [
google.elements.transliteration.LanguageCode.KANNADA
],
shortcutKey: "ctrl+g",
transliterationEnabled: true
};
var control = new google.elements.transliteration.TransliterationControl(
options
);
// Enable transliteration in the editable elements with id
// 'transliterateDiv'.
control.makeTransliteratable([id]);
//control.makeTransliteratable(['transliterateDiv2']);
google.setOnLoadCallback(onLoad);
$i++;
}
}
|