1 line
3.9 KiB
JavaScript
1 line
3.9 KiB
JavaScript
var valmap=new Object();valmap.read_only="read-only";valmap.read_write="read-write";valmap.label="label";valmap.textbox="textbox";valmap.textarea="textarea";valmap.passwdbox="textbox-passwd";valmap.radio="radio";valmap.radio_left="radio-left";valmap.radio_none="radio-none";valmap.combo="combo";valmap.combo_multiselect="combo-multiselect";valmap.checkbox="checkbox";valmap.checkboxNeg="checkbox-neg";valmap.button="button";valmap.file="file";valmap.url="url";valmap.hidden="hidden";valmap.onClick=1;valmap.onChange=1;valmap.onLoad=0;function xuiRunJSFunction(b,d){var a=window[b];var c=null;if(a!=null){c=a(d);return c}else{alert("User Defined JS function '"+b+"' missing")}}function xuiRunJSFunc(c,b){var a=window[c];var d=null;if(a!=null){d=a(b);return d}else{alert("User Defined JS function '"+c+"' missing")}}function xuiIncludeJSFile(a){document.write("<script");document.write(' language="javascript"');document.write(' type="text/javascript"');document.write(' src="'+a+'">');document.write("<\/script>")}function xuiIncludeCommonJSFiles(a){xuiIncludeJSFile(a+"_xe_jsvars.js");xuiIncludeJSFile(a+"_xeobj_enum.js");xuiIncludeJSFile(a+"xui_submit.js");xuiIncludeJSFile(a+"xui_error.js");xuiIncludeJSFile(a+"xui_shed.js");xuiIncludeJSFile(a+"xui_map.js");xuiIncludeJSFile(a+"xui_types.js");xuiIncludeJSFile(a+"xui_load.js");xuiIncludeJSFile(a+"xui_oem.js");xuiIncludeJSFile(a+"xui_validate.js");xuiIncludeJSFile(a+"_xe_validate.js");xuiIncludeJSFile(a+"_xe_buttonStyles.js");xuiIncludeJSFile(a+"xui_jspagination.js");xuiIncludeJSFile(a+"xui_oem_util.js");xuiIncludeJSFile(a+"_xeobj_refresh_profiles.js")}function xuiCommonArray2CSV(c){var a="";for(var b=0;b<c.length;b++){if(b==0){a=c[b]}else{a+=","+c[b]}}return a}function getInterSection(c,a){var d=new Array();for(var b=0;b<c.length;b++){if(!contains(a,c[b])){d[d.length]=c[b]}}return d}function xuiInsertEActionStrings(b,g,e){var l,k;var a=xeData["xa_"+b];var f=new Array();for(var d=0;d<e.length;d++){for(var c=0;c<a.length;c++){if(a[c]==e[d]){var h=(a[c+1]=="")?"":parseInt(a[c+1])-1;if(h==""||h>=g.length){g.push(e[d])}else{if(h<=0){l=new Array();l[0]=e[d];g=l.concat(g)}else{l=g.slice(0,h);k=g.slice(h);g=l;g.push(e[d]);g=g.concat(k)}}}}}for(var d=0;d<e.length;d++){for(var c=0;c<g.length;c++){if(e[d]==g[c]){f.push(c)}}}xeData["xtn_"+b]=f;return g}function xuiGetElementsByClass(e,d,b){if(d==null){d=document}if(b==null){b="*"}var c=new Array();var a=d.getElementsByTagName(b);var g=" "+e+" ";for(i=0,j=0;i<a.length;i++){var f=" "+a[i].className+" ";if(f.indexOf(g)!=-1){c[j++]=a[i]}}return c}function xuiGetElementsByTagAndAttribute(f,b,e,c){if(e==null){e=document}if(c==null){c="*"}var d=new Array();var a=e.getElementsByTagName(c);var h=" "+b+" ";for(i=0,j=0;i<a.length;i++){var g=" "+a[i].getAttribute(f)+" ";if(g.indexOf(h)!=-1){d[j++]=a[i]}}return d}function xuiGetPageTitle(){var a=document.getElementsByTagName("title")[0];if(!!a.childNodes.length){return a.firstChild.data}else{if(a.innerHTML){return a.innerHTML}}alert("xuiGetPageTitle : Failed to get page title");return""}function xuiGetScreenHeight(){return(typeof window.innerHeight!="undefined"?window.innerHeight:document.body.offsetHeight)}function xuiGetScreenWidth(){return(typeof window.innerWidth!="undefined"?window.innerWidth:document.body.offsetWidth)}function xuiSetDisplayHeight(c,a){var b=document.getElementById(c);b.style.height=String(a)+"px"}function xuiSetDisplayWidth(c,a){var b=document.getElementById(c);b.style.width=String(a)+"px"}function xuiInstallOnClick(b,a){if(b==undefined){alert("xuiInstallOnClick : failed");return}b.setAttribute("onclick",a)}function xuiAssert(a,b){if(!(a)){alert(b)}}function xuiSelect(d,a,e){var c=new Array();for(var b=0;b<d.length;b++){if(d[b].getAttribute(a)==e){c.push(d[b])}}return c}function xuiCommonGetBaseName(b){var a=b.split("\\");if(a.length<2){a=b.split("/")}return a[a.length-1]}function preLoad(){document.getElementById("xui_preload").style.display="none";document.getElementById("topdiv").style.display=""}; |