Mercurial > lada > lada-client
comparison app/controller/form/Probe.js @ 1278:cb9609380056
merge
author | Michael Stanko <mstanko@bfs.de> |
---|---|
date | Mon, 16 Jan 2017 14:53:00 +0100 |
parents | 8f37f8832c4a |
children | 8012e5212bd5 |
comparison
equal
deleted
inserted
replaced
1277:a152353eba26 | 1278:cb9609380056 |
---|---|
228 | 228 |
229 deskriptorSelect: function(field, records) { | 229 deskriptorSelect: function(field, records) { |
230 var desk = field.up('deskriptor'); | 230 var desk = field.up('deskriptor'); |
231 var media = field.up('probeform').down('textfield[name="mediaDesk"]'); | 231 var media = field.up('probeform').down('textfield[name="mediaDesk"]'); |
232 var current = media.getValue().split(' '); | 232 var current = media.getValue().split(' '); |
233 | |
234 if (current.length < 12) { | 233 if (current.length < 12) { |
234 var value; | |
235 for (var i = 0; i < 12; i++) { | 235 for (var i = 0; i < 12; i++) { |
236 if (i === 0) { | 236 if (i === 0) { |
237 current.push('D:'); | 237 current.push('D:'); |
238 } | 238 } |
239 else if (i === desk.layer + 1) { | 239 else if (i === desk.layer + 1) { |
270 current[4] = '00'; | 270 current[4] = '00'; |
271 desk.up('fieldset').down('deskriptor[layer=3]').clearValue(); | 271 desk.up('fieldset').down('deskriptor[layer=3]').clearValue(); |
272 } | 272 } |
273 } | 273 } |
274 media.setValue(current.join(' ').trim()); | 274 media.setValue(current.join(' ').trim()); |
275 | |
276 if (current[0].length == 0) { | |
277 current.splice(0,1); | |
278 } | |
279 var mediatext = field.up('probeform').down('textfield[name="media"]'); | |
280 | |
281 if ( (desk.layer === 0 ) && (records[0].get('sn') === 0) ){ | |
282 mediatext.setValue(''); | |
283 } else { | |
284 if ( current[1] === '01') { | |
285 if ( (current[4] !== '00') && (desk.layer === 3) ) { | |
286 mediatext.setValue(records[0].data.beschreibung); | |
287 } else if ( (current[3] !== '00') && (desk.layer === 2) ) { | |
288 mediatext.setValue(records[0].data.beschreibung); | |
289 } else if ( (current[2] !== '00') && (desk.layer === 1) ) { | |
290 mediatext.setValue(records[0].data.beschreibung); | |
291 } else if ( (current[1] !== '00') && (desk.layer === 0 )) { | |
292 mediatext.setValue(records[0].data.beschreibung); | |
293 } | |
294 } | |
295 | |
296 if ( current[1] !== '01') { | |
297 if ((current[2] !== '00') && (desk.layer === 1 )) { | |
298 mediatext.setValue(records[0].data.beschreibung); | |
299 } else if ((current[1] !== '00') && (desk.layer === 0 )) { | |
300 mediatext.setValue(records[0].data.beschreibung); | |
301 } | |
302 } | |
303 } | |
275 }, | 304 }, |
276 | 305 |
277 clearChildDesk: function(field) { | 306 clearChildDesk: function(field) { |
278 var allS = field.up('fieldset').items.items; | 307 var allS = field.up('fieldset').items.items; |
279 for (var i = field.layer + 1; i < 12; i++) { | 308 for (var i = field.layer + 1; i < 12; i++) { |