@ -2674,3 +2674,115 @@ function closeModalCardDetail(ergebniselementOrdnr)
myModalCard . classList . remove ( 'is-active' ) ;
myModalCard . classList . remove ( 'is-active' ) ;
}
}
function tabelleComboLaden ( maskentid , fname , caption , fnameEscaped ) {
Feldname = fname ;
var callurl = '/superx/servlet/SuperXmlMaske' ;
callurl += "?tid=" + maskentid + "&getJSON_" + getEncoded ( Feldname ) +
'=xxxxxx-xxxxxx@' ;
var params = "" ;
var e = document . forms [ "Weiterverarbeitung" ] . elements [ fname ] ;
if ( e ) {
var t = e . type ;
var name = fname ;
//todo bei startsWith select_ label_ auch überspringen
if ( e . value != '' ) //leere Felder müssen auch übergeben werden MB!!
params += "&" + getEncoded ( fname ) + "=" + getEncoded ( e . value ) ;
else
params += "&" + getEncoded ( fname ) + "=--leer--" ;
}
//alert(params);
//return false;
if ( ! caption || caption == '' ) caption = Feldname ;
document . getElementById ( "comboElementName" ) . innerHTML = 'Auswahl ' + caption ;
document . getElementById ( "comboload" ) . style . display = "" ;
document . getElementById ( "comboselect" ) . style . display = "none" ;
var currentFieldValue = document . forms [ 'Weiterverarbeitung' ] . elements [ Feldname ] . value ;
var splitchar = "," ;
if ( currentFieldValue . indexOf ( "|" ) > - 1 )
splitchar = "\|" ;
var currentFieldValueArray = currentFieldValue . split ( splitchar ) ;
var currentFieldValueCount = currentFieldValueArray . length ;
var combodlg = dojo . widget . byId ( "combodlg" ) ;
combodlg . _onKey = null ;
//alert(callurl + params);
combodlg . show ( ) ;
//return false;
dojo . io . bind ( {
url : callurl + params ,
encoding : "UTF-8" ,
method : "get" ,
handler : function ( type , data , evt ) {
var da = purgeval ( data ) ;
if ( type == 'error' || da . error ) {
//<!-- eigentlich sollte immer type gleich error geliefert werden, aber bug in dojo -->
if ( da . error ) msg = da . error ;
else msg = data . message ;
document . getElementById ( 'progressbar' ) . style . display = "none" ;
alert ( 'Fehler beim Lesen der Daten!\n' + msg ) ;
combodlg . hide ( ) ;
} else {
nodes = da . nodes ;
document . forms [ 'comboform' ] . comboselect . options . length = 0 ;
if ( nodes . length == 0 ) {
document . forms [ 'comboform' ] . comboselect . options [ 0 ] = new Option (
"keine Auswahl möglich" , "" ) ;
} else {
if ( da . zeilenanzahl > 1 && nodes . length > 1 ) {
document . forms [ 'comboform' ] . comboselect . size = 10 ;
document . forms [ 'comboform' ] . comboselect . multiple = true ;
document . getElementById ( "multiselecthint" ) . style . display = "" ;
document . getElementById ( "suchselect" ) . multiple = true ;
} else {
document . forms [ 'comboform' ] . comboselect . size = 1 ;
document . forms [ 'comboform' ] . comboselect . multiple = false ;
document . getElementById ( "multiselecthint" ) . style . display = "none" ;
document . getElementById ( "suchselect" ) . multiple = false ;
}
for ( i = 0 ; i < nodes . length ; i ++ )
{
sel = false ;
if ( nodes [ i ] . isSelected && nodes [ i ] . objectId != "" ) sel = true ;
if ( currentFieldValue
&& nodes [ i ] . objectId != ""
&& currentFieldValueArray . includes ( nodes [ i ] . objectId )
)
sel = true ;
//-------------------HIER IST DER ANGEPASSTE CODE------------------------------------------------------------------------
title = nodes [ i ] . title ;
var o = new Option ( title , nodes [ i ] . objectId , sel , sel ) ;
document . forms [ 'comboform' ] . comboselect . options [ i ] = o ;
if ( nodes [ i ] . nodeattrib && nodes [ i ] . nodeattrib == 3 ) o . innerHTML =
" " + title ;
//---------------------------------------- BIS HIER -------------------------------------------------------------
}
document . getElementById ( "comboload" ) . style . display = "none" ;
document . getElementById ( "comboselect" ) . style . display = "" ;
}
document . getElementById ( 'progressbar' ) . style . display = "none" ;
}
}
} ) ;
}
function tabelleComboHide ( )
{
var combodlg = dojo . widget . byId ( "combodlg" ) ;
combodlg . hide ( ) ;
}