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 : 3.133.120.64
function shortcutEvents()
{
// View Grid Alt+Ctrl+V
shortcut.add("Ctrl+Shift+X",function(){view_records();});
// View Save Alt+Ctrl+S
shortcut.add("Ctrl+Shift+X",function() {saveRecords();});
// View New Alt+Ctrl+N
shortcut.add("Ctrl+Shift+X",function() {Clearfields();});
// View Download Alt+Ctrl+D
shortcut.add("Ctrl+Shift+X",function() {UploadRecords();});
// View Clear Alt+Ctrl+C
shortcut.add("Ctrl+Shift+X",function() {Clearfields();});
}
function PopupKeyEvent(system_name,$elementid, evt,$textelementid,divelementid,$module_id,search_ref_module_db_field,ref_search_value,$module_name,ref_mofule_code_active_field)
{
// Getting Internal code only
var finalString = divelementid.split("_");
//convert into string
var txtid = finalString[2]+"";
var kC = (evt.which) ? evt.which : evt.keyCode;
var id=($elementid.id.split("txt_ref_schema_")[1]);
if(kC == 38 || kC == 40 || kC == 13)
showIndex('txt_ref_schema_'+id,'details_'+id,'select_auto_complete_'+id,kC) ;
else if(kC < 14 || kC == 32 || ( kC > 47 && kC < 106))
loadAutoCompleteData(system_name,$elementid, evt,$textelementid,divelementid,$module_id,search_ref_module_db_field,ref_search_value,ref_mofule_code_active_field)
/* else
$("#select_auto_complete_"+txtid).focus(); */
//else loadAutoCompleteData(this, event,'select_auto_complete_344','search_div_344',14,'0',0);
switch(kC)
{
case 112: // F1 key
ShowPopup(txtid,$module_id,$module_name);
return false;
break;
case 113 :
if ($("#header_view_row").is(":visible"))
view_records();
return false;
break;
}
}
function ShowPopup(txtid,module_id,module_name)
{
assignSrefDataValue(txtid,module_id);
calingScript(module_id,txtid,module_name);
}
function globalkeyEvent(evt)
{
var kC = (evt.which) ? evt.which : evt.keyCode;
//escape key
if(kC==27)
$('#dialog').dialog('close');
// Enter key
if(kC==13)
{
var appnav=navigator.appName;
var obj = (appnav=="Netscape") ? evt.target : evt.srcElement;
if(!($('#dialog').dialog('isOpen')) && typeof(obj)!='undefined' && obj.id.split('gs_u_').length==1)
{
var appnav = navigator.appName;
var elementType = (appnav=="Netscape") ? obj.nodeName : obj.type;
var NumId =obj.id.split("txt_ref_schema_")[1];
//search_div_873
if(elementType !="TEXTAREA")
{
var Elements = $(".ElementCount");
currentElements = Elements.index(obj);
if(Elements[currentElements+1]!=null)
{
if(!($('#search_div_'+NumId).is(":visible")))
{
nextElement = Elements[currentElements+1];
nextElement.focus();
}
}
}
}
}
// $('.ui-search-toolbar input:first').bind('keydown',function(e) {alert(e.keyCode);alert('s');})
// alert(kC);
//f1=112 //f2=113 //f3=114 //f4=115 //f5=116 //f6=117 //f7=118 //f8=119
if(navigator.appName != 'Netscape')
{
window.history.forward(1);
document.attachEvent("onkeydown", my_onkeydown_handler);
function my_onkeydown_handler()
{
switch (event.keyCode)
{
case 113 : //F2
//event.returnValue = false;
//event.keyCode = 0;
//alert("We have disabled F5");
break;
case 114 : //F3
event.returnValue = false;
event.keyCode = 0;
//alert("We have disabled F5");
break;
case 115 : // 'F4'
event.returnValue = false;
event.keyCode = 0;
//alert("We have disabled F5");
break;
case 116 : // 'F5'
event.returnValue = false;
event.keyCode = 0;
//alert("We have disabled F5");
break;
case 118 : // F7
event.returnValue = false;
event.keyCode = 0;
break;
case 119 : // F8
event.returnValue = false;
event.keyCode = 0;
break;
case 120 : // F9
event.returnValue = false;
event.keyCode = 0;
break;
case 121 : // 'F10'
event.returnValue = false;
event.keyCode = 0;
//alert("We have disabled F5");
break;
}
}
}
switch(kC)
{
case 112: //f1
return false;
break;
case 113 :
if ($("#header_view_row").is(":visible"))
view_records();
return false;
break;
case 114: // F3 key
if ($("#header_clear_row").is(":visible"))
Clearfields();
return false;
break;
case 115: //f4
//addRecords();
return false;
break;
case 116: //f5
//editRecords();
return false;
break;
case 117: //f6
//saveRecords();
return false;
break;
case 118: //f7
//deleteRecords();
return false;
break;
case 119: //f8
if ($("#header_upload_row").is(":visible"))
UploadRecords();
return false;
break;
case 120: //f9
if ($("#header_clear_row").is(":visible"))
Clearfields();
return false;
break;
case 121: // F10 key
if ($("#header_finish_row").is(":visible"))
saveRecords();
return false;
break;
default: return true;
}
}
function disableDefault()
{
event.returnValue = false;
return false;
}
/* function enter2tab(e)
{
var key = e.charCode ? e.charCode : (e.keyCode ? e.keyCode : 0);
if ((key == 13) && /^(input|select)$/i.test(this.nodeName)) {
var next = this.tabIndex + 1;
} else if ((key == 38) && /^(input|select)$/i.test(this.nodeName)) {
var next = this.tabIndex - 1;
}
console.log(next);
if (next==0) {
return false;
}
var keytop = 0;
if (key==38 && this.nodeName == "SELECT") {
keytop = 0;
var indx = this.selectedIndex;
if (indx-1 < 0 ) {
keytop = 1;
}
} else if (key==38) {
keytop = 1;
}
if ((key == 13 || (keytop==1)) && /^(input|select)$/i.test(this.nodeName)) {
var list;
list = $("select[@tabIndex='" + next + "'],input[@tabIndex='" + next + "']");
list2 = $("select[@tabIndex='" + next + "'],textarea[@tabIndex='" + next + "']");
if (list.size() > 0 ) {
list.get(0).focus();
//return false;
} else if (list2.size()>0) {
list2.get(0).focus();
}
}
}
*/
/* if(kC==13)// enter
{
var obj = (evt.srcElement) ? evt.srcElement : evt.target;
var id = (evt.srcElement.id) ? (evt.srcElement.id) : evt.target.id;
var elementType =obj.nodeName;
if(elementType !="TEXTAREA")
{
var Elements = $(".ElementCount");
currentElements = Elements.index(obj);
//console.log(currentElements);
if(Elements[currentElements+1]!=null)
{
nextElement = Elements[currentElements+1];
nextElement.focus();
}
}
}
*/
function calenderpopup(txtid,imgid)
{
calender_popup(txtid,imgid);
}
|