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.118.33.239
Current Path : /var/www/oasis/js/ |
| Current File : /var/www/oasis/js/markslistelement_report.js |
function CallMarksListElementWise() {
$geditinternalcode = 0;
window.enable_proper_module = "enableMarksListSubjectWise";
$("#page_main_div").load(
"../html_modules/marklist_element.html",
function () {
document.getElementById("display_module_name").innerHTML =
"Marks List (Elements)";
document.getElementById("module_name_for_save").value =
"Marks List (Elements)";
getDefaultHeadFooterLinks("Marks List (Elements)");
$("#report_marklist_subject_degree_code").focus();
$("#report_marklist_subject_degree_code").val("");
$("#report_marklist_subject_degree_name").val("");
$("#report_marklist_subject_Examno").val("");
$("#report_marklist_subject_Exam_name").val("");
}
);
$("#module_details_div").hide();
}
function GenerateMarksEntryElementWiseReport() {
if (trim($("#report_marklist_subject_degree_code").val()) == "") {
alert("Please Enter Degree Code!!");
$("#report_marklist_subject_degree_code").focus();
return;
}
var datastring =
"°ree_code=" + trim($("#report_marklist_subject_degree_code").val());
datastring +=
"&exam_code=" + trim($("#report_marklist_subject_Examno").val());
datastring +=
"&subwise_start=" + trim($("#report_marklist_subject_fromcode").val());
datastring +=
"&subwise_end=" + trim($("#report_marklist_subject_tocode").val());
datastring += "&elemtype=" + trim($("#element_type").val());
window.open($host_url + "GeneratElementWiseReport" + datastring);
}
function GetMarklistSubjectListGetExamNO($Examno) {
switch (document.getElementById("module_name_for_save").value) {
case "Marks List (Elements)":
$degcode = document.getElementById(
"report_marklist_subject_degree_code"
).value;
if ($degcode == "") {
alert("please Enter Degree Code");
document.getElementById("report_marklist_subject_degree_code").focus();
return;
}
PopupMarkEntrySubGetExamNO($degcode, $Examno);
break;
}
}
var rowid = "";
function keyboardSubjectPopup(evt, id) {
rowid = id;
var charCode = evt.which ? evt.which : evt.keyCode;
if (charCode == 112) {
// f1 KEY
var degcode = document.getElementById(
"report_marklist_subject_degree_code"
).value;
if (degcode == "") {
alert("Select Degree");
document.getElementById("report_marklist_subject_degree_code").focus();
return;
}
var examno = document.getElementById(
"report_marklist_subject_Examno"
).value;
if (examno == "") {
alert("Select Exam");
document.getElementById("report_marklist_subject_Examno").focus();
return;
}
$("#dialog").dialog("open");
$("#dialog").data("height.dialog", 222);
$(".ui-dialog").css({ width: 460 });
$("#ui-dialog-title-dialog").html("Subject Details");
$main =
"<table id='subject_grid' class='scroll' ondblclick='selectMarksListSubjCode();'></table> <div id='sub_grid_div3' class='scroll' style='text-align:center;'></div>";
document.getElementById("dialog").innerHTML = $main;
var subject = jQuery("#subject_grid")
.jqGrid({
url:
$host_url +
"markslistsubjpopup.demo" +
"°ree=" +
degcode +
"&exam=" +
examno,
datatype: "json",
colNames: ["Code", "Description"],
colModel: [
{ name: "FSUBCODE", index: "FSUBCODE", width: 80 },
{ name: "FSUBNAME", index: "FSUBNAME", width: 80 },
],
rowNum: 10,
rowList: [5, 10, 15, 20, 25, 30],
imgpath: $image_path,
pager: jQuery("#sub_grid_div3"),
sortname: "id",
height: "119",
width: "457",
viewrecords: true,
sortorder: "desc",
multiselect: false,
cellEdit: true,
//forceFit : true,
//cellsubmit: 'clientArray',
addCaption: "Add Recordddd",
})
.navGrid(
"#sub_grid_div3",
{ edit: false, add: false, del: false, search: false },
{},
{},
{},
{ multipleSearch: true }
)
.navButtonAdd("#sub_grid_div3", {
caption: "",
buttonicon: "ui-icon-search",
onClickButton: function () {
subject[0].toggleToolbar();
},
})
.navButtonAdd("#sub_grid_div3", {
caption: "Select",
onClickButton: function () {
selectMarksListSubjCode(id);
},
});
subject.filterToolbar();
$(".ui-search-toolbar").bind("keydown", function (evt) {
var kC = evt.which ? evt.which : evt.keyCode;
if (kC == 40) jQuery("#subject_grid").editCell(0, 0, false);
/* if(kC==39)
$('#'+evt.target.id).focusNextInputField();
if(kC==37)
$('#'+evt.target.id).focusPreviousInputField(); */
});
}
}
function selectMarksListSubjCode() {
var subcode = jQuery("#subject_grid").getGridParam("selrow");
if (subcode != null) {
$.ajax({
type: "POST",
async: false,
data: "subject_code=" + subcode,
url: $host_url + "getmarkslistsubjNames.demo",
success: function ($responce) {
$responce = eval("(" + $responce + ")");
if ($responce.error_code == 0) {
document.getElementById(rowid).value = $responce.data["FSUBCODE"];
//document.getElementById('report_marklist_subject_name').value = $responce.data['FSUBNAME'];
} else {
alert($responce.data);
document.getElementById(rowid).value = "";
//document.getElementById('report_marklist_subject_name').value = '';
document.getElementById(rowid).focus();
return false;
}
},
});
$("#dialog").dialog("close");
} else {
alert("Please select row");
}
return;
}
function getMarksListSubjName(subcode, id) {
if (subcode != "") {
$.ajax({
type: "POST",
async: false,
data: "subject_code=" + subcode,
url: $host_url + "getmarkslistsubjNames.demo",
success: function ($responce) {
$responce = eval("(" + $responce + ")");
if ($responce.error_code == 0) {
document.getElementById(id).value = $responce.data["FSUBCODE"];
//document.getElementById('report_marklist_subject_name').value = $responce.data['FSUBNAME'];
} else {
alert($responce.data);
document.getElementById(id).value = "";
//document.getElementById('report_marklist_subject_name').value = '';
document.getElementById(id).focus();
return false;
}
},
});
}
}
|