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.227.183.161
var $g_ref_data_arr='';
$host_url= getCookie('host_url');
$image_path= getCookie('image_path');
function openStudentSectionDetailsPopup()
{
switch(document.getElementById('module_name_for_save').value)
{
case 'SaveMarkEntrySubjectwise':
studentSectionPopupHtml('FCADSTATUS');
break;
case 'Attendance Summary Report':
studentSectionPopupHtml('FCCLSTATUS');
break;
default:
studentSectionPopupHtml('');
break;
}
}
function studentSectionPopupHtml($module)
{
$('#dialog').dialog('open');
$("#dialog").data("height.dialog", 340);
$(".ui-dialog").css({width:260});
$('#ui-dialog-title-dialog').html("Section Details");
var degCode=$("#markentry_sub_degree_code").val();
var examNo=$("#markentry_sub_Examno").val();
$main="<table id='section_grid' class='scroll' ondblclick='selectSectionCode();'></table> <div id='sub_grid_div3' class='scroll' style='text-align:center;'></div>";
document.getElementById('dialog').innerHTML=$main;
var section =jQuery("#section_grid").jqGrid(
{
url:$host_url+'sectionDetailsPopup.demo'+"°Code="+degCode+"&examNo="+examNo,
datatype: "json",
colNames:['Section'],
colModel:[{name:'FSECTION',index:'FSECTION', width:200 }],
rowNum:100,
rowList:[10,50,100],
imgpath:$image_path,
pager: jQuery('#sub_grid_div3'),
height:'237',
width:'257',
viewrecords: true,
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(){section[0].toggleToolbar() } }).
navButtonAdd('#sub_grid_div3',{caption:"Select", onClickButton:function()
{
selectSectionCode();
}
});
section.filterToolbar();
$('.ui-search-toolbar').bind('keydown',function(evt)
{
var kC = (evt.which) ? evt.which : evt.keyCode;
if(kC==40)
jQuery('#section_grid').editCell(0,0,false);
} );
}
function selectSectionCode()
{
var id=jQuery("#section_grid").getGridParam('selrow');
if( id!=null )
{
switch(document.getElementById('module_name_for_save').value)
{
case 'SaveMarkEntrySubjectwise':
$('#markentry_stud_section').val(id);
$('#dialog').dialog("close");
$("#markentry_sub_range").focus();
break;
case 'SaveAttendanceEntry':
$('#attentry_stud_section').val(id);
$('#dialog').dialog("close");
$("#markentry_sub_range").focus();
break;
}
}
else
{
alert("Please select row");
}
return;
}
function getSectionName()
{
switch(document.getElementById('module_name_for_save').value)
{
case 'SaveMarkEntrySubjectwise':
if((jQuery.trim($("#markentry_stud_section").val()))!='')
{
var section = $("#markentry_stud_section").val();
var degCode=$("#markentry_sub_degree_code").val();
var examNo=$("#markentry_sub_Examno").val();
$.ajax({
type: "POST",
//async:false,
url: $host_url+"getSectionName.demo"+"§ion="+section+"°Code="+degCode+"&examNo="+examNo,
data:"degree_code="+encodeURIComponent(trim($("#student_entry_degree_code").val()))+"&type="+"FCADSTATUS",
success: getSectionNameResponsedata
});
}
break;
case 'SaveAttendanceEntry':
if((jQuery.trim($("#attentry_stud_section").val()))!='')
{
var section = $("#attentry_stud_section").val();
var degCode=$("#markentry_sub_degree_code").val();
var examNo=$("#markentry_sub_Examno").val();
$.ajax({
type: "POST",
//async:false,
url: $host_url+"getSectionName.demo"+"§ion="+section+"°Code="+degCode+"&examNo="+examNo,
data:"degree_code="+encodeURIComponent(trim($("#student_entry_degree_code").val()))+"&type="+"FCADSTATUS",
success: getSectionNameResponsedata
});
}
break;
}
}
function getSectionNameResponsedata($response)
{
$response=eval('('+$response+')');
if($response.error_code==0)
{
switch(document.getElementById('module_name_for_save').value)
{
case 'SaveMarkEntrySubjectwise':
$('#markentry_stud_section').val($response.data.FSECTION);
$("#markentry_sub_range").focus();
break;
case 'SaveAttendanceEntry':
$('#attentry_stud_section').val($response.data.FSECTION);
$("#markentry_sub_range").focus();
break;
}
}
else
{
switch(document.getElementById('module_name_for_save').value)
{
case 'SaveMarkEntrySubjectwise':
$('#markentry_stud_section').val('');
alert($response.data);
break;
case 'SaveAttendanceEntry':
$('#attentry_stud_section').val('');
alert($response.data);
break;
}
}
}
|