function ndMaskeComboLaden(fname,zeilenanzahl, caption) { resetValidation(); var params = ""; for (i = 1; i < felder.length; i++) { e = document.forms['maske'].elements[felder[i]["htmlname"]]; if (e) { var t = e.type; var name = felder[i]["name"]; if (name == Feldname || t == 'button' || t == 'submit' || t == 'reset' || t == 'hidden') continue; //todo bei startsWith select_ label_ auch überspringen if (e.value != '' && e.value.indexOf("(")==-1) //leere Felder müssen auch übergeben werden MB!! // 1/2016 MB dies geht nicht weil ISO kodiert //params+="&"+felder[i]["cb_name"]+"="+encodeURIComponent(e.value); params += "&" + getEncoded(felder[i]["htmlname"]) + "=" + getEncoded(e.value); else params += "&" + getEncoded(felder[i]["htmlname"]) + "=--leer--"; } } var previousValue=document.forms['maske'].elements[fname].value; //Bei Lesezeichen und BackToMask Button wird der Delimiter zu "|" if(previousValue.indexOf("|")>-1) previousValue=previousValue.replace(/\|/g,","); params=encodeURIComponent(params); //alert(params); var editurl="/superx/edit/kern/maske_combo_laden.jsp?tid="+maskentid+ "&Feldname="+getEncoded(fname)+"&previousValue="+previousValue; editurl +="&zeilenanzahl="+zeilenanzahl+"¶ms="+params; neu2=window.open(editurl,"_blank","directories=no,location=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no,width=800,height=660"); return false; } function ndMaskeSichtLaden(fname,zeilenanzahl, caption) { resetValidation(); var params = ""; for (i = 1; i < felder.length; i++) { e = document.forms['maske'].elements[felder[i]["htmlname"]]; if (e) { var t = e.type; var name = felder[i]["name"]; if (name == Feldname || t == 'button' || t == 'submit' || t == 'reset' || t == 'hidden') continue; //todo bei startsWith select_ label_ auch überspringen if (e.value != '' && e.value.indexOf("(")==-1) //leere Felder müssen auch übergeben werden MB!! // 1/2016 MB dies geht nicht weil ISO kodiert //params+="&"+felder[i]["cb_name"]+"="+encodeURIComponent(e.value); params += "&" + getEncoded(felder[i]["htmlname"]) + "=" + getEncoded(e.value); else params += "&" + getEncoded(felder[i]["htmlname"]) + "=--leer--"; } } var previousValue=document.forms['maske'].elements[fname].value; var previousValue=document.forms['maske'].elements[fname].value; //Bei Lesezeichen und BackToMask Button wird der Delimiter zu "|" if(previousValue.indexOf("|")>-1) previousValue=previousValue.replace(/\|/g,","); params=encodeURIComponent(params); //alert(params); var editurl="/superx/edit/kern/maske_sicht_laden.jsp?tid="+maskentid+ "&Feldname="+getEncoded(fname)+"&previousValue="+previousValue; editurl +="&zeilenanzahl="+zeilenanzahl+"¶ms="+params; neu2=window.open(editurl,"_blank","directories=no,location=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no,width=800,height=660"); return false; } function toggleNavpanelFrame(buttonElem) { buttonElem.classList.toggle('shownavpanel'); buttonElem.classList.toggle('closenavpanel'); if(document.getElementById("navpanelFrame").style.display=="none") document.getElementById("navpanelFrame").style.display="flex"; else document.getElementById("navpanelFrame").style.display="none"; } function themenbaumsuche(inpElem) { var searchterm=inpElem.value; var searchResultsElem=document.getElementById("themenbaumSearchResults"); if(searchterm=="") { document.getElementById("themenbaumSearchResults").style.display="none"; document.getElementById("themenbaumStatic").style.display="inline"; return false; } if(menue) { searchResultsElem.style.display="block"; document.getElementById("themenbaumStatic").style.display="none"; var atLeastOneEntryFound=false; zs=""; for (i = 0; i < menue.length; i++) { if(menue[i].title.indexOf(searchterm) >-1) { if(menue[i].isMaske) zs+= "
  • "+menue[i].title+"
  • "; else zs+= "
  • "+menue[i].title+"
  • "; atLeastOneEntryFound=true; } } if(atLeastOneEntryFound) searchResultsElem.innerHTML=zs; else searchResultsElem.innerHTML="
  • Keine Abfrage gefunden
  • "; } } function toggleLegendeDisplay(legendeDiv) { var myDiv=document.getElementById(legendeDiv); if(myDiv.style.display=="block") myDiv.style.display="none"; else myDiv.style.display="block"; } function togglePortletDisplay(portletDiv) { var myDiv=document.getElementById(portletDiv); if(portletDiv !="portlet") //Login-Portlet heisst einfach nur portlet, ohne tid. { if(myDiv.style.display=="block") myDiv.style.display="none"; else myDiv.style.display="block"; } } function openModal(divUniquename) { var myModalCard=document.getElementById(divUniquename); myModalCard.classList.add('is-active'); } function closeModal(divUniquename) { var myModalCard=document.getElementById(divUniquename); myModalCard.classList.remove('is-active'); } function ndMaskDialogPreviousValueToArray(previousValues) { var currentFieldValueArray=new Array; if(!previousValues=="") { var splitchar=","; if(previousValues.indexOf("|")>-1) splitchar="\|"; currentFieldValueArray = previousValues.split(splitchar); } return currentFieldValueArray; } function ndMaskDialogToggleAllCheckboxes(frm,metaCheckbox) { for(var j=0;j < frm.elements.length;j++) { var inputType = frm.elements[j].type; if(inputType=="checkbox" && frm.elements[j].name != metaCheckbox.name) { frm.elements[j].checked=metaCheckbox.checked; } } } function ndMaskDialogLeeren(dialogFrm, referrerFrm) { for(var j=0;j < dialogFrm.elements.length;j++) { var inputType = dialogFrm.elements[j].type; if(inputType=="checkbox" || inputType=="radio" ) { dialogFrm.elements[j].checked=false; } } ndMaskDialogUebernehmen(dialogFrm,referrerFrm); } function ndMaskSichtDialogUebernehmen(dialogFrm, referrerFrm) { if(referrerFrm.elements[fname+"-Sicht"] ) { referrerFrm.elements[fname+"-Sicht"].value= dialogFrm.elements["sichtauswahlSelect"].value; } if(dialogFrm.elements["Standdatum"]) referrerFrm.elements[fname+"-Stand"].value= dateUSToDateGerman(dialogFrm.elements["Standdatum"].value); ndMaskDialogUebernehmen(dialogFrm,referrerFrm); } function ndMaskDialogUebernehmen(dialogFrm, referrerFrm) { var isFirst = true; var val = ""; var label = ""; for(var j=0;j < dialogFrm.elements.length;j++) { var inputType = dialogFrm.elements[j].type; if((inputType=="checkbox" || inputType=="radio") && dialogFrm.elements[j].checked && dialogFrm.elements[j].value != "") { if (isFirst == false) { val += ","; label += ";"; } else isFirst = false; val +=dialogFrm.elements[j].value; //console.log("FF"+dialogFrm.elements[j].value); label+= document.getElementById("label"+dialogFrm.elements[j].value).innerHTML; } } console.log("selected:"+val); if(referrerFrm.elements[fname] && val !="") { referrerFrm.elements[fname].value=val; referrerFrm.elements["label_" + createVarname(fname)].value =label; } else { referrerFrm.elements[fname].value = ''; referrerFrm.elements["label_" + createVarname(fname)].value = "nichts gewaehlt"; } window.close(); return false; } function dateGermanToDateUS(date_str) { var yyyy=date_str.substring(6,10); var mm=date_str.substring(3,5); var dd=date_str.substring(0,2); return yyyy+"-"+mm+"-"+dd; } function dateUSToDateGerman(date_str) { var yyyy=date_str.substring(0,4); var mm=date_str.substring(5,7); var dd=date_str.substring(8,10); return dd+"."+mm+"."+yyyy; } function toggleTableVisibility(buttonDiv,tableDiv) { var myDiv=document.getElementById(tableDiv); if(myDiv.style.display=="block") { myDiv.style.display="none"; document.getElementById(buttonDiv).src="../images/plus-circled.svg"; } else { myDiv.style.display="block"; document.getElementById(buttonDiv).src="../images/minus-circled.svg"; } } function pager(frm,stylesheet,offset) { frm.target='_self'; frm.elements["offset"].value=offset; frm.elements["stylesheet"].value=stylesheet; frm.elements["contenttype"].value="text/html"; frm.submit(); }