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.218.108.8
var $g_ref_data_arr='';
$host_url= getCookie('host_url');
$image_path= getCookie('image_path');
function SubjectCodePopup($degree_code,$exam_no)
{
$('#dialog').dialog('open');
$("#dialog").data("height.dialog", 222);
$(".ui-dialog").css({width:460});
$('#ui-dialog-title-dialog').html("Subject Details");
$main="<table id='dispatch_answer_script_grid' class='scroll' ondblclick='selectSubjecCodeDetails();' ></table> <div id='sub_grid_div3' class='scroll' style='text-align:center;'></div>";
document.getElementById('dialog').innerHTML=$main;
var dispatch_grid =jQuery("#dispatch_answer_script_grid").jqGrid(
{
url:$host_url+'SubjectCodePopupForAnswerScript.demo&DegCode='+trim($degree_code)+'&Examno='+trim($exam_no),
//url:$host_url+'SubjectMarkDetailsPopup.demo&DegCode='+$degree_code+'&Examno='+$exam_no+"'",
//url:+$host_url+'ExamnoDetailsPopup.demo&DegCode='+trim($degcode)+'&searchField='+trim($Examno)+,
datatype: 'json',
colNames:['SubCode','SubName','ShrotName'],
colModel:[{name:'FCSUBCODE',index:'FCSUBCODE', width:60 },
{name:'FSUBNAME',index:'FSUBNAME', width:210 },
{name:'FSHORTNAME',index:'FSHORTNAME', width:90 }],
rowNum:10,
rowList:[5,10,15,20,25,30],
pager: jQuery('#sub_grid_div3'),
sortname: 'id',
imgpath:$image_path,
height:'119',width:'455',
viewrecords: true,
sortorder: 'asc',multiselect: false,cellEdit: true,
//caption:'Subject Details',
addCaption: 'Add Record'
}
).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(){degree[0].toggleToolbar() } }).
navButtonAdd('#sub_grid_div3',{caption:"Select", onClickButton:function()
{
selectSubjecCodeDetails();
}
});
dispatch_grid.filterToolbar();
$("#gs_FCSUBCODE").focus();
$('.ui-search-toolbar').bind('keydown',function(evt)
{
var kC = (evt.which) ? evt.which : evt.keyCode;
if(kC==40)
jQuery('#dispatch_answer_script_grid').editCell(0,0,false);
});
}
function selectSubjecCodeDetails()
{
var id=jQuery("#dispatch_answer_script_grid").getGridParam('selrow');
if(id!=null)
{
switch(document.getElementById('module_name_for_save').value)
{
case 'saveDispatchAnswersScript':
$.ajax({
type: "POST",
async:false,
data: "subcode="+id+"°ree_code="+trim(window.location.g_popup_degree_code),
url: $host_url+"getSubjectCodePopupForAnswerScript.demo",
success: getSubjectCodePopupForAnswerScriptResponse
});
$('#dialog').dialog("close");
break;
case 'saveDailyReport':
$.ajax({
type: "POST",
async:false,
data: "subcode="+id+"°ree_code="+trim(window.location.g_popup_degree_code),
url: $host_url+"getSubjectCodePopupForAnswerScript.demo",
success: getSubjectCodePopupForAnswerScriptResponse
});
$('#dialog').dialog("close");
break;
}
}
else
{
alert("Please select row");
}
return;
}
function getSubjectCodePopupForAnswerScriptResponse($responce)
{
$responce = eval('(' + $responce + ')');
$id = window.location.g_dispatch_row_count_id;
if($responce.error_code == 0)
{
switch(document.getElementById('module_name_for_save').value)
{
case 'saveDispatchAnswersScript':
document.getElementById("dispatch_subcode_"+$id).value = $responce.data['FCSUBCODE'];
document.getElementById("dispatch_name_"+$id).value = $responce.data['FSUBNAME'];
break;
case 'saveDailyReport':
$id_daliy = window.location.g_daliy_id;
document.getElementById($id_daliy).value = $responce.data.FCSUBCODE;
break;
}
}
}
|