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 : 13.59.183.77
//Jijo Added OpenQpPopup.
function OpenQpPopup()
{
switch(document.getElementById('module_name_for_save').value)
{
case 'StudentEntry':
qp_popPopHtml('FCADSTATUS');
break;
default:
OpenQpPopupHtml('');
break;
}
}
var $g_ref_data_arr='';
$host_url= getCookie('host_url');
$image_path= getCookie('image_path');
function OpenQpPopupHtml($module)
{
$('#dialog').dialog('open');
$("#dialog").data("height.dialog", 222);
$(".ui-dialog").css({width:460});
$('#ui-dialog-title-dialog').html("QP Details");
$main="<table id='qp_grid' class='scroll' ondblclick='SelectQpCode();'></table> <div id='sub_grid_div3' class='scroll' style='text-align:center;'></div>";
document.getElementById('dialog').innerHTML=$main;
var module_name_for_save=document.getElementById('module_name_for_save').value;
var qp_pop =jQuery("#qp_grid").jqGrid(
{
url:$host_url+'QpPopup.demo&module_name_for_save='+module_name_for_save,
datatype: "json",
colNames:['QPCode','Subject','Max.Marks'],
colModel:[{name:'FQPCODE',index:'FQPCODE', width:80 },
{name:'QPSUBJECT',index:'QPSUBJECT', width:80},
{name:'QPMAXMARK',index:'QPMAXMARK', 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(){qp_pop[0].toggleToolbar() } }).
navButtonAdd('#sub_grid_div3',{caption:"Select", onClickButton:function()
{
SelectQpCode();
}
});
qp_pop.filterToolbar();
$("#gs_FQPCODE").focus();
$('.ui-search-toolbar').bind('keydown',function(evt)
{
var kC = (evt.which) ? evt.which : evt.keyCode;
if(kC==40)
jQuery('#qp_grid').editCell(0,0,false);
});
}
function SelectQpCode()
{
var id=jQuery("#qp_grid").getGridParam('selrow');
if( id!=null )
{
$.ajax({
type: "POST",
async:false,
data: "qp_code="+id,
url: $host_url+"GetQpCode.demo",
success: PopulateQpCodeResponse
});
$('#dialog').dialog("close");
}
else
{
alert("Please select row");
}
return;
}
function PopulateQpCodeResponse($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code =='0')
{
switch(document.getElementById('module_name_for_save').value)
{
case 'Evaluation':
$("#error_msg").html(" ");
$("#evaluation_qp_code").val($responce.data.FQPCODE);
$("#evaluation_qp_name").val($responce.data.FSUBNAME);
$("#evaluation_max_mark").val($responce.data.FMAXMARKS);
break;
case 'FreezeMarks':
$("#error_msg").html(" ");
$("#freeze_qp_code").val($responce.data.FQPCODE);
$("#freeze_qp_name").val($responce.data.FSUBNAME);
DisplayFreezeMarksGrid();
break;
}
}
else
{
switch(document.getElementById('module_name_for_save').value)
{
case 'Evaluation':
alert($responce.data);
$("#evaluation_qp_code").val("");
$("#evaluation_qp_name").val("");
$("#evaluation_max_mark").val("");
break;
case 'FreezeMarks':
alert($responce.data);
$("#evaluation_qp_code").val("");
$("#evaluation_qp_name").val("");
$("#evaluation_max_mark").val("");
break;
}
}
}
function GetQpCodeDetails()
{
switch(document.getElementById('module_name_for_save').value)
{
case 'Evaluation':
var qp_code=trim($("#evaluation_qp_code").val());
if(!$("#dialog").is(':visible'))
{
if(empty(qp_code))
{
alert('Enter the QP Code');
$("#evaluation_qp_code").val('');
$("#evaluation_qp_name").val('');
document.getElementById('evaluation_qp_code').focus();
return;
}
else
{
$.ajax({
type: "POST",
async:false,
data: "qp_code="+qp_code,
url: $host_url+"GetQpCode.demo",
success: GetQpCodeDetailseResponse
});
}
}
break;
case 'FreezeMarks':
var qp_code=trim($("#freeze_qp_code").val());
if(!$("#dialog").is(':visible'))
{
if(empty(qp_code))
{
alert('Enter the QP Code');
$("#freeze_qp_code").val('');
$("#freeze_qp_name").val('');
document.getElementById('freeze_qp_code').focus();
return;
}
else
{
$.ajax({
type: "POST",
async:false,
data: "qp_code="+qp_code,
url: $host_url+"GetQpCode.demo",
success: GetQpCodeDetailseResponse
});
}
}
break;
case 'SaveAbsentEntrySubjectwiseQP':
var qp_code=trim($("#abs_entry_qp_code").val());
if(!$("#dialog").is(':visible'))
{
if(empty(qp_code))
{
alert('Enter the QP Code');
$("#abs_entry_qp_code").val('');
$("#abs_sub_qp_name").val('');
document.getElementById('abs_entry_qp_code').focus();
return;
}
else
{
$.ajax({
type: "POST",
async:false,
data: "qp_code="+qp_code,
url: $host_url+"GetQpCode.demo",
success: GetQpCodeDetailseResponse
});
}
}
break;
}
}
function GetQpCodeDetailseResponse($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code == 0)
{
switch(document.getElementById('module_name_for_save').value)
{
case 'Evaluation':
$("#error_msg").html(" ");
var qp_code_val=$responce.data.FQPCODE;
var qp_subject_val=$responce.data.FSUBNAME;
var qp_max_mark_val=$responce.data.FMAXMARKS;
$("#evaluation_qp_code").val(qp_code_val);
$("#evaluation_qp_name").val(qp_subject_val);
$("#evaluation_max_mark").val(qp_max_mark_val);
break;
case 'FreezeMarks':
$("#error_msg").html(" ");
var freeze_code_val=$responce.data.FQPCODE;
var freeze_subject_val=$responce.data.FSUBNAME;
$("#freeze_qp_code").val(freeze_code_val);
$("#freeze_qp_name").val(freeze_subject_val);
DisplayFreezeMarksGrid();
break;
case 'SaveAbsentEntrySubjectwiseQP':
$("#error_msg").html(" ");
$("#abs_entry_qp_code").val($responce.data.FQPCODE);
$("#abs_sub_qp_name").val($responce.data.FSUBNAME);
DisplayFreezeMarksGrid();
break;
}
}
else
{
switch(document.getElementById('module_name_for_save').value)
{
case 'Evaluation':
alert($responce.data);
$("#evaluation_qp_code").val("");
$("#evaluation_qp_name").val("");
$("#evaluation_max_mark").val("");
break;
case 'FreezeMarks':
alert($responce.data);
$("#freeze_qp_code").val("");
$("#freeze_qp_name").val("");
break;
}
}
}
|