OXIESEC PANEL
- Current Dir:
/
/
home
/
cubot
/
docroot
/
edash
/
jscripts_main
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/03/2023 07:49:02 AM
rwxr-xr-x
📄
.navigate.js.swo
52 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
access.js
1.53 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
ajax.js
7.17 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
dragdrop.js
36.78 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
dtpick.html
10.86 KB
08/14/2022 11:11:46 AM
rwxr-xr-x
📄
dtree.js
15.2 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
jquery.js
242.42 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
navigate.js
40.62 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
sorttable.js
16.52 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
tools.js
1.26 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
validate.js
10.53 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
validate_admin.js
4.7 KB
08/14/2022 11:11:46 AM
rw-r--r--
Editing: navigate.js
Close
function append_combo2txt(edit1, cb1) { var selected = cb1.selectedIndex; edit1.value = edit1.value + cb1[selected].text; } function filleditfld(edit1, cb1) { edit1.value = cb1.value; } //Shailesh - Mask Format page function filleditfldmask(edit1, cb1) { edit1.value = cb1.value; if(edit1.value.length) edit1.value = cb1.options[cb1.selectedIndex].text } //__VKJ__ :) function checkgrp(obj, grp) { var fm = obj; var chk = 0; var patrn; var selfmt; chk = grp.checked; for (var i = 0; i < fm.elements.length; i++) { if ((fm.elements[i].type == "checkbox") && (fm.elements[i].value)){ patrn = "(:" + fm.elements[i].value + ":|^" + fm.elements[i].value + ":)"; selfmt = new RegExp(patrn, ["g"]); if(grp.value.match(selfmt)) fm.elements[i].checked = chk; } } } function checkall(obj) { var fm = obj; var chk = 0; for (var i = 0; i < fm.elements.length; i++) { if (fm.elements[i].type == "button") { if (fm.elements[i].value == "Select All") { fm.elements[i].value = "Clear All"; chk = 1; break; } else if (fm.elements[i].value == "Clear All") { fm.elements[i].value = "Select All"; chk = 0; break; } } } for (var i = 0; i < fm.elements.length; i++) { if (fm.elements[i].type == "checkbox") fm.elements[i].checked = chk; } } function chkToggle(obj) { var fm = obj; var chk = 0; for (var i = 0; i < fm.elements.length; i++) { if (fm.elements[i].type == "checkbox" && (fm.elements[i].name == 'allrpt')) stat = fm.elements[i].checked; } for (var i = 0; i < fm.elements.length; i++) { if (fm.elements[i].type == "checkbox") fm.elements[i].checked = stat; } } function chCss(c){ if(this.checked) c.className = "mmselected"; else c.className = "mmnormal"; } function IsNumeric(sText){ var ValidChars = "0123456789."; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; } var dtField; function openDTPick(DTPickField) { myWind=window.open( "/edash/jscripts/dtpick.html", DTPickField,"toolbar = 0, menubar = 0, status = 0, height = 235, width = 300, resizable = 0, border = 0" ); } function filleditfldsubmit(form1, edit1, cb1) { filleditfld(edit1, cb1); //return document.eval(form1).submit(); } function addtoquerystring() { var txt= document.taskform.querymap; var list= document.taskform.sourcecolumn; txt.value = txt.value + list[list.selectedIndex].text; return 1; } function Help(HTMLName) { var myWind; myWind = open( "", "HelpWindow","status = 1, height = 600, width = 600, resizable = 0" ); myWind.document.open(); myWind.document.write("<HTML><head><title>CUBOT HELP</title></head>"); myWind.document.write('<FRAMESET rows="6%,*" frameborder="0">'); myWind.document.write('<FRAME src="/edash/help/close.html" scrolling=no>'); myWind.document.write("<FRAME src=" + HTMLName + ">"); myWind.document.write("</FRAMESET>"); myWind.document.write("</HTML>"); myWind.document.close(); return myWind; } function closeHTML(myWin) { if(confirm("Do you want to close the Help Window ?")) myWin.close(); } function openPop(url, winname){ window.open(url, winname,'width=600,height=400,menubar=no,toolbar=no,status=no,resizable=no,scrollbars=yes,top=70,left=100'); } function SwitchMenu(obj){ if(document.getElementById){ var el=document.getElementById(obj); var ar=document.getElementById("masterdiv").getElementsByTagName("span"); if(el.style.display!="block"){ for(var i=0;i<ar.length;i++){ if(ar[i].className=="nodewf") ar[i].style.display="none"; } el.style.display="block";} else{ el.style.display="none"; } } } function sethidden(map, desstrid, destbl, colname, srcstrid, srctbl, type) { if(type == 'src') { document.taskform.Map.value=map; document.taskform.desstrid.value=desstrid; document.taskform.destbl.value=destbl; document.taskform.srccol.value=document.taskform.srccol.value + colname; document.taskform.srcstrid.value=srcstrid; document.taskform.srctbl.value=srctbl; } else if(type == 'des') { document.taskform.Map.value=map; document.taskform.desstrid.value=desstrid; document.taskform.destbl.value=destbl; document.taskform.descol.value=colname; document.taskform.srcstrid.value=srcstrid; document.taskform.srctbl.value=srctbl; } else if(type == 'des1') { document.taskform.Map.value=map; document.taskform.desstrid.value=desstrid; } else if(type == 'mapallsrc') { document.taskform.Map.value=map; document.taskform.srcstrid.value=srcstrid; document.taskform.srctbl.value=srctbl; } else if(type == 'mapalldes') { document.taskform.Map.value=map; document.taskform.desstrid.value=desstrid; document.taskform.destbl.value=destbl; } else if(type == 'mapalldes1') { document.taskform.Map.value=map; document.taskform.desstrid.value=desstrid; } else if(type == 'selqrysrc') { document.taskform.Map.value=map; document.taskform.query.value=document.taskform.query.value + colname; document.taskform.srcstrid.value=srcstrid; } else if(type == 'selqrydes') { document.taskform.Map.value=map; document.taskform.desstrid.value=desstrid; document.taskform.destbl.value=destbl; document.taskform.descol.value=colname; } else if(type == 'selqrydes1') { document.taskform.Map.value=map; document.taskform.desstrid.value=desstrid; } else if(type == 'updatqry') { document.taskform.query.value=document.taskform.query.value + colname; } if(type != 'updatqry' || type != 'selqrysrc') { document.taskform.submit(); } return false; } /*function hrefsubmitvalue(val) { document.dform.Details.value=val; document.dform.submit(); return false; }*/ function showTableDesc(id, table, divid, conn_id){ var Val=document.getElementById(id).value; if(Val == "Show Table"){ document.getElementById(id).value="Hide Table"; loadsubmit("cubui.rx?page=admcfgform.rx&page_ix=5&tabname="+table+"&conn="+conn_id, divid, "", 0); document.getElementById(divid).focus(); } else{ document.getElementById(id).value="Show Table"; document.getElementById(divid).innerHTML=""; } } function hrefsubmitvalue1(val) { //ALERT. document.alertform.delformula.value=val; document.alertform.submit(); return false; } function intOnly(i) { if(i.value.length>0) { i.value = i.value.replace(/[^\d]+/g, ''); } } function vldtpassform(myForm) { emessage = 0; errormessage = ""; if(document.frmchangepass.newpass.value.length < 1) { errormessage += "\nNew password is required!\n"; emessage = 1; } if(document.frmchangepass.confnewpass.value.length < 1) { errormessage += "\nConfirn password!\n"; emessage = 1; } if(emessage == 1) { alert(errormessage) return false; } else { if(document.frmchangepass.newpass.value != document.frmchangepass.confnewpass.value) { errormessage += "\nPassword & Confirm password does not match !\n"; alert(errormessage) return false; } else return true; } } function validate_search() { var argv = validate_search.arguments; var argc = argv.length; var flag = 0; for (var i = 0; i < argc; i+=2) { if(argv[i].type == "checkbox"){//ARUN CHANGE if(argv[i].checked == true) flag = 1; }else{ if((argv[i].value.length > 0) && (argv[i].value.length < 50)) flag = 1; } } if(!flag){ alert("\n\tPlease enter some valid information to search!\n"); return false; } /* for (var i = 0; i < argc; i+=2) { var arrfmt = argv[i+1].value.split("_"); alert("Format Str" + argv[i+1].value + "\nMandatory : " + arrfmt[0] + "\nLabel : " + arrfmt[1] + "\nSize : " + arrfmt[2]); if((argv[i].value < 1) && (arrfmt[0] == "Y")){ alert("\n" + arrfmt[1] + " should not be blank!\n"); return false; } if((len = parseInt(arrfmt[2])) > 0){ if((argv[i].value.length > len)){ alert("\n" + arrfmt[1] + " should not be more than " + arrfmt[2] + " characters !\n"); return false; } } } var url = document.URL var connid = document.srchform.conn.value; toIndex = url.lastIndexOf('/'); newURL = url.substring(0, toIndex); for(var i=0; i<document.srchform.gtype.length; i++){ if(document.srchform.gtype[i].value == 'PDF' && document.srchform.gtype[i].checked){ alert(document.srchform.rx.value); if( document.srchform.rx.value == "admmetadata.rx" ){ alert("PDF Feature will come in user mode only"); return true; }else{ var NewHref=newURL+"/pdfreport.rx?conn=" + connid + "&export=PDF&op=canned"; window.open(NewHref, "Report",'width=1024,height=800,menubar=no,toolbar=no,status=no,resizable=no,scrollbars=yes,top=70,left=100'); return false; } } } */ return true; } //Generating Pop-up Print Preview page //function getPrint(print_area, frameid ){ function getPrint(print_area){ //Creating new page var pp = window.open(); // var fm = frameid; alert(print_area); //Adding HTML opening tag with <HEAD> … </HEAD> portion pp.document.writeln('<HTML><HEAD><title>Print Preview</title>') pp.document.writeln('<LINK href=Styles.css type="text/css" rel="stylesheet">') pp.document.writeln('<LINK href=PrintStyle.css type="text/css" rel="stylesheet" media="print">') pp.document.writeln('<base target="_self"></HEAD>') //Adding Body Tag pp.document.writeln('<body MS_POSITIONING="GridLayout" bottomMargin="0"'); pp.document.writeln(' leftMargin="0" topMargin="0" rightMargin="0">'); //Adding form Tag pp.document.writeln('<form method="post">'); //Creating two buttons Print and Close within a HTML table pp.document.writeln('<TABLE width=100%><TR><TD></TD></TR><TR><TD align=right>'); pp.document.writeln('<INPUT ID="PRINT" type="button" value="Print" '); pp.document.writeln('onclick="javascript:location.reload(true);window.print();">'); pp.document.writeln('<INPUT ID="CLOSE" type="button" value="Close" onclick="window.close();">'); pp.document.writeln('</TD></TR><TR><TD></TD></TR></TABLE>'); //Writing print area of the calling page pp.document.writeln(document.getElementById(print_area).innerHTML); //Ending Tag of </form>, </body> and </HTML> pp.document.writeln('</form></body></HTML>'); } function disable_edit() { alert("You cannot delete/ configure parameters due to insufficient privileges."); return false; } function fillcronfld(edit1, cb1, label) { if (label == 0) { if(cb1.value == "Every") edit1.value = "*" else edit1.value = cb1.value; } else edit1.value = cb1.options[cb1.selectedIndex].text; } function fillcronproc(edit1 ,cb1 ,txtscript ,txtallcron ,script) { scrpt = script+cb1.value; edit1.value = scrpt+"\)"; txtallcron.value = cb1.value; txtscript = scrpt+"\)"; } function vldtcronproc(myForm) { emessage = 0; errormessage = ""; if(document.cronform.txtprocess.value.length < 1) { errormessage += "\nPlease select or enter a process name \n"; emessage = 1; } if(emessage == 1) { alert(errormessage) return false; } else return true; } function open_excel(url) { this.document.excel.action = url; this.document.excel.submit(); } function refresh_gphctl( conn, web ){ var connid = conn; var myweb = web ; window.top.workarea.gphctl.location.href="http://" + myweb +"/graphctl.rx?conn=" + connid + "mode=report&op=canned"; } function show_meas_frame(size){ str="25,"+size+","+"*"; parent.document.getElementById('frame2').rows=str; } function showhide_frame(framesetname,sframesetname,option,framesize,grpid) { str="25,"+framesize+"," +"*" if(option=="reports"){ if(grpid!=0){ if(parent.document.getElementById(framesetname).cols != "0%,*") parent.document.getElementById(framesetname).cols = "0%,*"; else parent.document.getElementById(framesetname).cols = "25%,*"; } else parent.document.getElementById(framesetname).cols = "25%,*"; } if(option=="analyse") { if(grpid!=0){ if(parent.document.getElementById(sframesetname).rows != "0,0,*" ) { parent.document.getElementById(framesetname).cols = "0%,*"; parent.document.getElementById(sframesetname).rows="0,0,*"; } else { parent.document.getElementById(framesetname).cols = "20%,*"; parent.document.getElementById(sframesetname).rows=str; } } else{ parent.document.getElementById(framesetname).cols = "20%,*"; parent.document.getElementById(sframesetname).rows=str; } } } // ANU function setOption(frm, index, txtname, lstname,dirname) { str = document.getElementById ('List').options [document.getElementById ('List').selectedIndex].text; str1 = dirname + "/" +str; document.getElementById('dirname').value = str1; } function copyText(frm, src, dest){ document.getElementById('targettable').value = document.getElementById('maskname').value; } function filleditfield(edit1, cb1) { var cmp1 = edit1; var cmp2 = cb1; if(edit1.value == "") edit1.value = cb1.value; else edit1.value = edit1.value+ "," + cb1.value; } function fillfield_onkey(edit1, cb1, rad1) { var cmp1 = edit1; var cmp2 = cb1; if(rad1 != ""){ document.fkeydffrm.pributton[0].checked=true; } if(cb1.value){ if((edit1.value == "")) edit1.value = cb1.options[cb1.selectedIndex].text; else edit1.value = edit1.value+ "," + cb1.options[cb1.selectedIndex].text; } } function fillfield_upload(edit1, cb1, edit2) { var cmp1 = edit1; var cmp2 = cb1; if(cb1.value){ if((edit1.value == "")){ edit1.value = cb1.options[cb1.selectedIndex].text; edit2.value=cb1.value; } else{ edit1.value =edit1.value+ "," + cb1.options[cb1.selectedIndex].text; edit2.value=edit2.value+","+cb1.value; } } } function vsyntable(){ } function vgrpaddallr(myref,f,t) { var i,j,k,l=0; var frmlist, tolist; var frmlist= document.getElementById(f); var tolist= document.getElementById(t); for (i=0; i < frmlist.options.length; ++i) { if(myref == 1) tolist.options[tolist.options.length] = new Option(frmlist.options[i].text,frmlist.options[i].value); else tolist.options[tolist.options.length] = new Option(frmlist.options[i].text); l++; } for (j=0; j < l;j++ ) { for(k=0; k < frmlist.options.length; k++){ frmlist.options[k] = null; break; } } for(i=0; i<tolist.options.length; i++){ tolist.options[i].selected = true; } return false; } function vgrpaddalll(myref,f,t) { var i, j, k, l=0; var frmlist, tolist; var frmlist= document.getElementById(f); var tolist= document.getElementById(t); var iswf = 0; if(document.getElementById("pagewflow")) iswf = 1; for (i=0; i < tolist.options.length; ++i) { var tasktype = tolist.options[i].text.charAt(0); if(iswf && ((tasktype == 'P') || (tasktype == 'Q'))){ alert("You can't move Query or Command. Please delete them manually"); return false; } if(myref == 1) frmlist.options[frmlist.options.length] = new Option(tolist.options[i].text); else frmlist.options[frmlist.options.length] = new Option(tolist.options[i].text); l++ } for (j=0; j < l;j++ ) { for(k=0; k < tolist.options.length; k++){ tolist.options[k] = null; break; } } return false; } function markAsAdded(id, link){ // __VKJ__ //ptr = document.getElementById(id); //ptr.innerHTML = "<TD colspan=2>File WIP</TD>"; window.parent.etlwork.location.href = link; } function onEnterNextWizardPage(e) { if(e.keyCode == 13){ //Here we can add some validation rules frm = document.forms[0]; // alert(e.keyCode + ' ' + frm.wizardNext.value); frm.wizardNext.click(); } } function moveUpList(ltousr) { if ( ltousr.length == -1) { // If the list is empty alert("There are no values which can be moved!"); } else { var selected = document.forms[0].ltousr.selectedIndex; if (selected == -1) { alert("You must select an entry to be moved!"); } else { // Something is selected if (ltousr.length == 0 ) { // If there's only one in the list alert("There is only one entry!\nThe one entry will remain in place."); } else { // There's more than one in the list, rearrange the list order if ( selected == 0 ) { alert("The first entry in the list cannot be moved up."); } else { // Get the text/value of the one directly above the hightlighted entry as // well as the highlighted entry; then flip them var moveText1 = document.forms[0].ltousr[selected-1].text; var moveText2 = document.forms[0].ltousr[selected].text; var moveValue1 = document.forms[0].ltousr[selected-1].value; var moveValue2 = document.forms[0].ltousr[selected].value; document.forms[0].ltousr[selected].text = moveText1; document.forms[0].ltousr[selected].value = moveValue1; document.forms[0].ltousr[selected-1].text = moveText2; document.forms[0].ltousr[selected-1].value = moveValue2; document.forms[0].ltousr.selectedIndex = selected-1; // Select the one that was selected before } } } } } function moveDownList(ltousr) { if ( ltousr.length == -1) { alert("There are no values which can be moved!"); } else { var selected = document.forms[0].ltousr.selectedIndex; if (selected == -1) { alert("You must select an entry to be moved!"); } else { if (ltousr.length == 0 ) { alert("There is only one entry!\nThe one entry will remain in place."); } else { if ( selected == document.forms[0].ltousr.length-1 ) { alert("The last entry in the list cannot be moved down."); } else { var moveText1 = document.forms[0].ltousr[selected+1].text; var moveText2 = document.forms[0].ltousr[selected].text; var moveValue1 = document.forms[0].ltousr[selected+1].value; var moveValue2 = document.forms[0].ltousr[selected].value; document.forms[0].ltousr[selected].text = moveText1; document.forms[0].ltousr[selected].value = moveValue1; document.forms[0].ltousr[selected+1].text = moveText2; document.forms[0].ltousr[selected+1].value = moveValue2; document.forms[0].ltousr.selectedIndex = selected+1; } } } } } function vgrpaddr(myref,f,t) { var i,j,k,l=0; var frmlist, tolist; //frmlist = document.forms[0].lfrmusr; //tolist = document.forms[0].ltousr; var frmlist= document.getElementById(f); var tolist= document.getElementById(t); for (i=0; i < frmlist.options.length; ++i) { if (frmlist.options[i].selected == true) { if(myref == 1) tolist.options[tolist.options.length] = new Option(frmlist.options[i].text,frmlist.options[i].value); else tolist.options[tolist.options.length] = new Option(frmlist.options[i].text); //tolist.options[tolist.options.length].selected = true; l++; } } for (j=0; j < l;j++ ) { for(k=0; k < frmlist.options.length; k++){ if (frmlist.options[k].selected == true) { frmlist.options[k] = null; break; } } } for(i=0; i<tolist.options.length; i++){ tolist.options[i].selected = true; } return false; } function vgrprselall(myref,f,t){ var i,j,k,l=0; var frmlist= document.getElementById(f); var tolist= document.getElementById(t); for(i=0; i<tolist.options.length; i++){ tolist.options[i].selected = true; } return true; } function vgrpaddl(myref,f,t) { var i, j, k, l=0; var frmlist, tolist; var frmlist= document.getElementById(f); var tolist= document.getElementById(t); var iswf = 0; if(document.getElementById("pagewflow")) iswf = 1; for (i=0; i < tolist.options.length; ++i) { if (tolist.options[i].selected == true) { var tasktype = tolist.options[i].text.charAt(0); if(iswf && ((tasktype == 'P') || (tasktype == 'Q'))){ alert("You can't move Query or Command task. Please delete them manually"); return false; } if(myref == 1) frmlist.options[frmlist.options.length] = new Option(tolist.options[i].text,tolist.options[i].value); else frmlist.options[frmlist.options.length] = new Option(tolist.options[i].text); l++ } } for (j=0; j < l;j++ ) { for(k=0; k < tolist.options.length; k++){ if (tolist.options[k].selected == true) { tolist.options[k] = null; break; } } } return false; } function vgrpclr(myref) { var i; var tolist = document.forms[0].ltousr; document.forms[0].lfrmusr.options.length=0; for(i=0; i< tolist.options.length; i++){ tolist.options[i].selected = "true"; } return true; } function add_table_to_selected_list(){ var tolist = document.forms[0].ltousr; var tabname = document.fusrgrp.txtaddtbl.value; //reg = new RegExp("[A-Za-z_][A-Za-z0-9_$]+\.[A-Za-z_][A-Za-z0-9_$]+"); reg = new RegExp("[A-Za-z_][A-Za-z0-9_$]+\.[A-Za-z_][A-Za-z0-9_$]+"); if (!reg.test(tabname)){ alert("Table name " + tabname + " is not valid.\nName: Schema.Tablename\nAllowed _ & alphanumeric chars."); show_matched(reg); return false; } //if(show_matched(reg)) // return false; for(i=0; i< tolist.options.length; i++){ if(tolist.options[i].text == tabname){ alert(tabname + " already added."); return false; } } tolist.options[tolist.options.length] = new Option(tabname, tabname); return false; } function show_matched(reg) { var tabname = document.fusrgrp.txtaddtbl.value; var m = reg.exec(tabname); if (m == null) { alert("No match"); return true; } else { var str = "Match " + m.index + ":\n"; for (i = 0; i < m.length; i++) { str = str + m[i] + "\n"; } alert(str); } return false; } /* Delete after 01-Nov-2010 :) function fill_xform_field(xform, fun, col) { var fsel = fun.selectedIndex; var csel = col.selectedIndex; var funnamesel = fun.options[fun.selectedIndex].value; var split_string = funnamesel.split("-"); var narg = split_string[1]; var str = fun[fsel].text; var reg = new RegExp("Sel"); if (reg.test(str)) return (1); str = ''; for(i=1; i<narg; i++){ str += "'Arg" + i + "'"; if(i < narg-1){ str += ","; } } cm = narg==1?"'":"',"; xform.value = fun[fsel].text + "('" + col[csel].text + cm + str + ") "; }*/ /* Modified by Arun to handle inner function calls like "rtrim(concat('SERVICE_ID','Arg1'))" */ function fill_xform_field(xform, fun, col) { var fsel = fun.selectedIndex; var csel = col.selectedIndex; var funnamesel = fun.options[fun.selectedIndex].value; var split_string = funnamesel.split("-"); var narg = split_string[1]; var column = "", iscote = "", hascomma = ""; var str = fun[fsel].text; var reg = new RegExp("Sel"); if (reg.test(str)) return (1); str = ''; for(i=1; i<narg; i++){ str += "'Arg" + i + "'"; if(i < narg-1){ str += ","; } } if(xform.value.length && xform.value.replace(/\s/g,"").length > 0 ){ column = xform.value; if(column.indexOf("(") < 1) /* If column name or actual value */ column = "'" + column + "'"; } else{ column = "'" + col[csel].text + "'"; } hascomma = narg == 1 ? "" : ","; xform.value = fun[fsel].text + "(" + column + hascomma + str + ")"; } function fill_xfvalidtxt(edit1, cb1, cname) { var reg = new RegExp("No Fun"); if (reg.test(cb1.value)){ edit1.value = ""; return (1); } edit1.value = cb1.value + "('" + cname + "')"; } function disable_xform_row(id, chk, fun, src, dest, xform){ var chkbox = "chekbox1" + id; var ssel = src.selectedIndex; if(chk.checked == false){ fun.disabled = true; src.disabled = true; fun.selectedIndex = 0; dest.disabled = true; xform.disabled = true; xform.value = src[ssel].text + " will not go to destination table."; } else{ fun.disabled = false; src.disabled = false; dest.disabled = false; xform.disabled = false; xform.value = ""; } } function varfunc (myhref) { if(window.top.workarea.graph && window.top.workarea.graph.enable && (window.top.workarea.graph.enable == 1234)){ /* If Report Already Generated */ } else{ alert("Please generate report to apply variance"); return false; } if (window.document.gact.check.checked == true) { window.parent.graph.location.href = myhref + "&variance=Y"; } else { window.parent.graph.location.href = myhref + "&variance=N&hidemsr=N"; } } function showtable(conn_id, tablename) { var url = "admjoinform.rx?conn="+conn_id+"&tbltabsel=10&tabname="+tablename; openPop(url, "TableSchema"); } function resultparam(){ document.srchform.rqst.value="result"; //document.srchform.outfile.value="HTML"; if((document.srchform.iscubot.value == "1") && ((document.srchform.rx.value == "reportlist.rx") || (document.srchform.rx.value == "rxxml.rx"))){ document.srchform.rx.value="rxxml.rx"; document.srchform.action="rxxml.rx"; document.srchform.target="resultpage"; } else{ document.srchform.rx.value="preview.rx"; document.srchform.action="preview.rx"; } for(var i=0; i<document.srchform.gtype.length; i++){ if(document.srchform.gtype[i].value == 'PDF' && document.srchform.gtype[i].checked){ document.srchform.target="XYZ"; } } if(document.srchform.gtype.value == 'PDF') document.srchform.target="XYZ"; return true; } function setval(){ if( (document.srchform.iscubot.value == "1") && (document.srchform.rx.value == "rxxml.rx")){ document.srchform.rqst.value="search"; document.srchform.rx.value="reportlist.rx"; document.srchform.action="reportlist.rx"; document.srchform.target="enqury"; } } function setcompval(val) { document.srchform.selid.value=val; if(document.srchform.iscubot.value == "1"){ if((document.srchform.rx.value == "rxxml.rx") || (document.srchform.action == "rxxml.rx")){ document.srchform.rx.value="reportlist.rx"; document.srchform.action="reportlist.rx"; } if((document.srchform.rx.value == "preview.rx") || (document.srchform.action == "preview.rx")){ document.srchform.rx.value="admmetadata.rx"; document.srchform.action="admmetadata.rx"; } } if(document.srchform.rx.value == "admmetadata.rx") document.srchform.op.value="metaview"; document.srchform.rqst.value="search"; document.srchform.submit(); } function showtable(conn_id, tablename) { var url = "admjoinform.rx?conn="+conn_id+"&tbltabsel=10&tabname="+tablename; openPop(url, "TableSchema"); } /* Making combobox disable for ETL/WORKFLOW past task option-Shailesh(01-feb) */ function disablecombo(cb1, cb2) { if(cb1.value == 'C') cb2.disabled=true; else cb2.disabled=false; } var pricewin; function setfield(frm) { var src; src = 2; if (isFilled(document.addfrm.schemecod) == true ) { document.getprice.schemecod.value = document.addfrm.schemecod.value; } else { alert("Get a Fund in the Scheme Field"); return false; } if ((isFilled(document.addfrm.txtamount) == true && isFilled(document.addfrm.txtunits)==true)) { alert("Either Amount or Units should be filled"); document.addfrm.txtamount.focus(); return false; } if (isFilled(document.addfrm.txtamount) == true ) { if (isZero(document.addfrm.txtamount.value) == true ) { alert("Amount can not be Zero"); document.addfrm.txtamount.focus(); return false; } if (isFloat(document.addfrm.txtamount.value) == true ) { document.getprice.amount.value = document.addfrm.txtamount.value; } else { alert("Amount is in Wrong Format"); document.addfrm.txtamount.focus(); return false; } } else { if (isFilled(document.addfrm.txtunits) == true ) { if (isZero(document.addfrm.txtunits.value) == true ) { alert("Units can not be Zero"); document.addfrm.txtunits.focus(); return false; } if (isFloat(document.addfrm.txtunits.value) == true ) { document.getprice.units.value = document.addfrm.txtunits.value; } else { alert("Units is in Wrong Format"); document.addfrm.txtunits.focus(); return false; } } else { alert("Atleast Amount or Unit must be filled"); document.addfrm.txtamount.focus(); return false; } } if (document.addfrm.day.value != "Day" ) { document.getprice.day.value = document.addfrm.day.value; //alert(document.getprice.day.value); } else { alert("Day is not given"); document.addfrm.day.focus(); return false; } if (document.addfrm.month.value != "Month" ) { document.getprice.month.value = document.addfrm.month.value; //alert(document.getprice.month.value); } else { alert("Month is not given"); document.addfrm.month.focus(); return false; } if (document.addfrm.year.value != "Year" ) { document.getprice.year.value = document.addfrm.year.value; } else { alert("Year is not given"); document.addfrm.year.focus(); return false; } winarg="toolbar=no,scrollbars=yes,status=no,resizable=yes,width=400,height=200"; pricewin = window.open('','pricewin' ,winarg); pricewin.document.open() pricewin.document.write ('<img src=/images/vronlinefinal.gif><br>') pricewin.document.write ('Query Processing Pls Wait....') pricewin.document.close() if (src == 1) { document.forms[2].submit(); } else if (src == 2 ) { document.getprice.submit(); } return true; } function getprice(price) { document.addfrm.txtentryprice.value = price; document.addfrm.submit1.focus(); } function fScrollitem(val){ var hidScroll = window.top.admmenu.document.getElementById('hidScroll'); hidScroll.value = val.scrollTop; } function fScrollMoveitem(what){ var hidScroll = window.top.admmenu.document.getElementById('hidScroll'); if(hidScroll.value) document.getElementById(what).scrollTop = hidScroll.value; } function fScroll(val){ var hidScroll = window.top.menubar.document.getElementById('hidScroll'); hidScroll.value = val.scrollTop; } // function moves scroll position to saved value function fScrollMove(what){ var hidScroll = window.top.menubar.document.getElementById('hidScroll'); if(hidScroll.value) document.getElementById(what).scrollTop = hidScroll.value; } function CreateExcelSheet(){ var x=tabledata.rows var xls = new ActiveXObject("Excel.Application") xls.visible = true xls.Workbooks.Add for (i = 0; i < x.length; i++){ var y = x[i].cells for (j = 0; j < y.length; j++){ xls.Cells( i+1, j+1).Value = y[j].innerText } } } function TableToExcel(){ var strCopy = document.getElementById("MyTable").innerHTML; window.clipboardData.setData("Text", strCopy); var objExcel = new ActiveXObject ("Excel.Application"); objExcel.visible = true; var objWorkbook = objExcel.Workbooks.Add; var objWorksheet = objWorkbook.Worksheets(1); objWorksheet.Paste; } function select_combo(id, val){ var x=document.getElementById(id); for(i=0; i<x.length; i++){ if(x.options[i].value==val) x.options[i].selected=true; } return true; } function disableDiv(div1en, div2dis) { if(div1en == "seldimdiv") { //disable the div2 element divid = document.getElementById(div2dis); divid.style.background = "#dedede" ; divid.style.filter = "alpha(opacity=50)"; divid.style.opacity = "0.5" ; divid.style.mozOpacity = "0.5"; document.setfiltforform.txtarea.disabled = true; document.setfiltforform.setfiltforsel.disabled = true; //enable div1 element divid = document.getElementById(div1en); if(divid != null) { divid.style.background = "" ; divid.style.filter = "" ; divid.style.opacity = "" ; divid.style.mozOpacity = "" ; document.setfiltforform.dim.disabled = false; document.setfiltforform.topbottomsel.disabled = false; document.setfiltforform.topnsel.disabled = false; } } else { //disable the div2 element divid = document.getElementById(div2dis); if(divid != null) { divid.style.background = "#dedede"; divid.style.filter = "alpha(opacity=50)"; divid.style.opacity = "0.5"; divid.style.mozOpacity = "0.5"; document.setfiltforform.dim.disabled = true; document.setfiltforform.topbottomsel.disabled = true; document.setfiltforform.topnsel.disabled = true; } //enable div1 element divid = document.getElementById(div1en); divid.style.background = ""; divid.style.filter = ""; divid.style.opacity = ""; divid.style.mozOpacity = ""; document.setfiltforform.txtarea.disabled = false; document.setfiltforform.setfiltforsel.disabled = false; } } function hidediv(id) { var id1="D"+id; if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById(id).style.visibility = 'hidden'; document.getElementById(id).style.display = 'none'; // document.getElementById(id).style.height = '0px'; if(document.getElementById(id1)){ document.getElementById(id1).style.visibility = 'hidden'; document.getElementById(id1).style.display = 'none'; //document.getElementById(id1).style.height = '0px'; } } else { if (document.layers) { // Netscape 4 document.id.visibility = 'hidden'; } else { // IE 4 document.all.id.style.visibility = 'hidden'; document.all.id.style.height = '0'; } } return false; } function showdiv(id) { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById(id).style.visibility = 'visible'; document.getElementById(id).style.display = 'inline'; } else { if (document.layers) { // Netscape 4 document.id.visibility = 'visible'; } else { // IE 4 document.all.id.style.visibility = 'visible'; document.all.id.style.height = '0px'; } } return false; } function hideshow(which){ if (!document.getElementById) return; if (which.style.display=="none") which.style.display="" else which.style.display="none" } function onoff(id,imgid){ if(document.getElementById) { // DOM3 = IE5, NS6 if((document.getElementById(id).style.visibility == 'visible') || (document.getElementById(id).style.visibility == '')){ document.getElementById(id).style.visibility = 'hidden'; document.getElementById(id).style.display = 'none'; document.getElementById(id).style.height = '0px'; if(imgid.length){ document.getElementById(imgid).src = 'edash/assets/default/images/open.gif'; document.getElementById(imgid).title = "Show"; } } else{ document.getElementById(id).style.visibility = 'visible'; document.getElementById(id).style.display = ''; document.getElementById(id).style.height = ''; if(imgid.length){ document.getElementById(imgid).src = 'edash/assets/default/images/close.gif'; document.getElementById(imgid).title = "Hide"; } } } else{ if (document.layers) { // Netscape 4 if(document.id.visibility == 'visible'){ document.id.visibility = 'hidden'; } else{ document.id.visibility = 'visible'; } } else{ if( document.all.id.style.visibility == 'visible'){ document.all.id.style.visibility ='hidden'; document.all.id.style.height ='0'; } else{ document.all.id.style.visibility ='visible'; document.all.id.style.height =''; } } } return false; } function show(id, type) { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById(id).style.visibility = 'visible'; document.getElementById(id).style.display = type; } else { if (document.layers) { // Netscape 4 document.id.visibility = 'visible'; } else { // IE 4 document.all.id.style.visibility = 'visible'; document.all.id.style.height = '0px'; } } return false; } var stat=0; /* Function to hilight tabs */ function setClass(title, UlId){ var menu = document.getElementById(UlId); //if(!menu && stat==0){ if(!menu){ var func="setClass('"+title+"','"+ UlId+"');"; setTimeout(func,300); stat=1; return false; } else{ stat=0; } if(!menu) return false; for(var i in menu.childNodes) { var x = menu.childNodes[i]; if(x.title){ if(x.title==title){ x.setAttribute('class','active'); x.setAttribute('className','active'); } else{ x.setAttribute('class',''); x.setAttribute('className',''); } } } } /* Function to make dropdown selected */ function select(id, val){ if(!document.getElementById(id)) return false; var x=document.getElementById(id); for(i=0; i<x.length; i++){ if(x.options[i].value==val) x.options[i].selected=true; } return true; } function getSelectd(id){ if(!document.getElementById(id)) return ""; var sel=document.getElementById(id); return sel.options[sel.selectedIndex].value; } function isvalidName(nameStr){ var reg=/\W/g; if(reg.test(nameStr)==false) return true; else return false; } function chkDeleteAccess(Access){ if(Access == 'RA'){ return disable_edit(); } else{ return confirmDelete(); } } function isDisableEdit(Access){ if(Access == 'RA'){ return disable_edit(); } return true; } function DisplayFormat(dispfmt){ var str=dispfmt; var NumFmt=dispfmt.substring(0,2); if(NumFmt == "cu") str="Million"; else if(NumFmt == "ci") str="Lakhs"; else if(NumFmt == "ce") str="European"; else if(NumFmt == "al") str="Left Align"; else if(NumFmt == "ar") str="Right Align"; else if(NumFmt == "ac") str="Center Align"; else if(dispfmt == "HREF") str="HREF"; else str="No Format"; if(dispfmt.indexOf("#OA") >0){ str=str + " [Ascending Order]"; } else if(dispfmt.indexOf("#OD") >0){ str=str + " [Descending Order]"; } return str; } function setformatname(tableId, formatColNo){ var newid=document.getElementById(tableId); for(i = 1; i < newid.rows.length; i++){ newFormat=DisplayFormat(newid.rows[i].cells[formatColNo-1].innerHTML); newid.rows[i].cells[formatColNo-1].innerHTML=newFormat; } return false; } function sortCombo(selectid) { var tmpAry = []; var SelElement=document.getElementById(selectid); var selectedValue = SelElement[SelElement.selectedIndex].value; for (var i=0;i<SelElement.options.length;i++) { tmpAry.push(SelElement.options[i]); } tmpAry.sort(function(a,b){ return (a.text < b.text)?-1:1; }); while (SelElement.options.length > 0){ SelElement.options[0] = null; } var newSelectedIndex = 0; for (var i=0;i<tmpAry.length;i++) { SelElement.options[i] = tmpAry[i]; if(SelElement.options[i].value == selectedValue) newSelectedIndex = i; } SelElement.selectedIndex = newSelectedIndex; return; } var showRpt=false; function showHideTextReport(divId, params){ if(showRpt){ showRpt=false; document.getElementById('showId').innerHTML="<IMG src=/edash/assets/default/images/plus.gif height=15px width=15px border=0\>"; document.getElementById('text_report').style.display="none"; } else{ showRpt=true; document.getElementById('showId').innerHTML="<IMG src=/edash/assets/default/images/minus.gif height=15px width=15px border=0\>"; document.getElementById('text_report').style.display="inline"; if(document.getElementById('text_report').innerHTML.length<1) loadget("newgraph.rx?"+params, divId, ""); } } //Bug No:- 1075 function setWidth(tblId){ /* var rows="", i=0, j=0; rows=document.getElementById(tblId).tHead.rows; for(i = 0; i < rows.length; i++){ j = rows[i].cells.length - 1; rows[i].cells[j].style.paddingRight="22px"; } rows=document.getElementById(tblId).tFoot.rows; for(i = 0; i < rows.length; i++){ j = rows[i].cells.length - 1; rows[i].cells[j].style.paddingRight="22px"; }*/ /* To get actual width of cell we took help of jquery else u can avoid including jquery. Arun */ $('th, td', $('thead tr', '#'+tblId)).each(function(i){ $(this).css('width',$(this).width()+'px'); }); $('td', $('tbody tr:first', '#'+tblId)).each(function(i){ $(this).css('width',$(this).width()+'px'); }); $('td', $('tfoot tr:first', '#'+tblId)).each(function(i){ $(this).css('width',$(this).width()+'px'); }); } //Bug No:- 1075 function freezeHeader(tblId, loc){ var container=document.getElementById('container'); var header=document.getElementById('header'); var footer=document.getElementById('footer'); var height=getMheight()-170; if(header && header.innerHTML.length<1){ setWidth(tblId); header.innerHTML='<table border="0" cellspacing="1" cellpadding="3" class="tbl_border" id=headerId><THEAD>'+document.getElementById(tblId).tHead.innerHTML+'</THEAD></table>'; document.getElementById(tblId).deleteTHead(); if(footer && document.getElementById(tblId).tFoot){ footer.innerHTML='<table border="0" cellspacing="1" cellpadding="3" class="tbl_border" id=footerId><TFOOT>'+document.getElementById(tblId).tFoot.innerHTML+'</TFOOT></table>'; document.getElementById(tblId).deleteTFoot(); } container.style.height=height; container.style.overflow="auto"; container.style.overflowX="hidden"; } else{ var newThead=document.getElementById(tblId).createTHead(); newThead.innerHTML=document.getElementById('headerId').tHead.innerHTML; header.innerHTML=""; if(footer && footer.innerHTML.length>0){ var newTfoot=document.getElementById(tblId).createTFoot(); newTfoot.innerHTML=document.getElementById('footerId').tFoot.innerHTML; footer.innerHTML=""; } container.style.height="100%"; container.style.overflow="visible"; container.style.overflowX="visible"; } } function getMheight(){ var viewportheight; if (typeof window.innerWidth != 'undefined') { viewportheight = window.innerHeight; } else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) { viewportheight = document.documentElement.clientHeight; } else { viewportheight = document.getElementsByTagName('body')[0].clientHeight; } return viewportheight; } function UpdtWarn(rptType){ if(rptType == 'U'){ document.getElementById('Unote').innerHTML='<font color=orange>[ Note: \'Update Report\' option will overwrite your existing report. ]</font>'; } else{ document.getElementById('Unote').innerHTML=''; } }