Mercurial > lada > lada-client
diff app/controller/form/Messprogramm.js @ 1108:7baaf2cd3f57
Redesign in Messgrogrammform
author | Evi Huber <ehuber@bfs.de> |
---|---|
date | Fri, 13 May 2016 14:24:07 +0200 |
parents | 60af12dd4a13 |
children | d57462b81444 c63acd44f8ca |
line wrap: on
line diff
--- a/app/controller/form/Messprogramm.js Thu May 12 16:03:04 2016 +0200 +++ b/app/controller/form/Messprogramm.js Fri May 13 14:24:07 2016 +0200 @@ -84,7 +84,6 @@ var netzbetreiber = combo.up().up('form') .down('netzbetreiber').down('combobox'); var nbId = records[0].get('netzbetreiberId'); - if (nbId != null) { //select the NB in the NB-Combobox netzbetreiber.select(nbId); @@ -323,8 +322,8 @@ var desk = field.up('deskriptor'); var media = field.up('messprogrammform').down('textfield[name="mediaDesk"]'); var current = media.getValue().split(' '); - if (current.length < 12) { + var value; for (var i = 0; i <= 12; i++) { if (i === 0) { current.push('D:'); @@ -365,6 +364,37 @@ } } media.setValue(current.join(' ').trim()); + + if (current[0].length == 0) { + current.splice(0,1); + } + var mediatext = field.up('messprogrammform').down('textfield[name="media"]'); + + if ( (desk.layer === 0 ) && (records[0].get('sn') === 0) ){ + mediatext.setValue(''); + } else { + if ( current[1] === '01') { + if ( (current[5] !== '00') && (desk.layer === 4 ) ){ + //mediatext.setValue(records[0].data.beschreibung); + } else if ( (current[4] !== '00') && (desk.layer === 3) ) { + mediatext.setValue(records[0].data.beschreibung); + } else if ( (current[3] !== '00') && (desk.layer === 2) ) { + mediatext.setValue(records[0].data.beschreibung); + } else if ( (current[2] !== '00') && (desk.layer === 1) ) { + mediatext.setValue(records[0].data.beschreibung); + } else if ( (current[1] !== '00') && (desk.layer === 0 )) { + mediatext.setValue(records[0].data.beschreibung); + } + } + + if ( current[1] !== '01') { + if ((current[2] !== '00') && (desk.layer === 1 )) { + mediatext.setValue(records[0].data.beschreibung); + } else if ((current[1] !== '00') && (desk.layer === 0 )) { + mediatext.setValue(records[0].data.beschreibung); + } + } + } }, clearChildDesk: function(field) {