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.220.110.45
//Jijo Added College Popup.
function openCollegeDetailsPopup()
{
switch(document.getElementById('module_name_for_save').value)
{
case 'saveCollegeDegreeStatus':
CollegePopHtml();
break;
default:
CollegePopHtml();
break;
}
}
var $g_ref_data_arr='';
$host_url= getCookie('host_url');
$image_path= getCookie('image_path');
function CollegePopHtml($search)
{
$('#dialog').dialog('open');
$("#dialog").data("height.dialog", 222);
$(".ui-dialog").css({width:460});
$('#ui-dialog-title-dialog').html("College Details");
$main="<table id='table_grid3' class='scroll' ondblclick='SelectCollegeCode();'></table>";
$main+="<div id='sub_grid_div3' class='scroll' style='text-align:center;'></div>";
document.getElementById('dialog').innerHTML=$main;
var college =jQuery("#table_grid3").jqGrid(
{
url:$host_url+'CollegeDetailsPopup.demo&search='+$search,
datatype: "json",
colNames:['Code','Description'],
colModel:[{name:'FCOLLCODE',index:'FCOLLCODE', width:115 },
{name:'FCOLLNAME',index:'FCOLLNAME', width:115 }],
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,
addCaption: "Add Recordddd"
}
).navGrid('#sub_grid_div3',{edit:false,add:false,del:true,search:true},{},{},{},{multipleSearch:true}).
navButtonAdd('#sub_grid_div3',{caption:"Search",
buttonicon :'ui-icon-search', onClickButton:function(){college[0].toggleToolbar() } }).
navButtonAdd('#sub_grid_div3',{caption:"Select", onClickButton:function()
{
SelectCollegeCode();
}
});
college.filterToolbar();
}
function SelectCollegeCode()
{
var id=jQuery("#table_grid3").getGridParam('selrow');
if( id!=null )
{
$.ajax({
type: "POST",
async:false,
url: $host_url+"getCollegeNames.demo",
data: "coll_code="+id,
success: PopulateCollegeCodeResponse
});
$('#dialog').dialog("close");
}
else
{
alert("Please select row");
}
return;
}
function PopulateCollegeCodeResponse($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code == 0)
{
switch(document.getElementById('module_name_for_save').value)
{
case 'saveCollegeDegreeStatus':
document.getElementById('cds_College_code').value = $responce.data['FCOLLCODE'];
document.getElementById('cds_College_name').value = $responce.data['FCOLLNAME'];
break;
case 'saveUserSetUpDetails':
document.getElementById('user_setup_college_code').value = $responce.data['FCOLLCODE'];
document.getElementById('user_setup_college_name').value = $responce.data['FCOLLNAME'];
break;
}
}
}
|