Commit 8497e83c161efce8a9ba2394fcb0777b1b905667
1 parent
ce38e649
Exists in
master
and in
111 other branches
redmine 5515
Showing
2 changed files
with
25 additions
and
24 deletions
Show diff stats
js/app/views/ParameterUI.js
... | ... | @@ -299,19 +299,19 @@ Ext.define('amdaUI.ParameterUI', |
299 | 299 | notifyEnter : function(ddSource, e, data) {}, |
300 | 300 | notifyOver : function(ddSource, e, data) |
301 | 301 | { |
302 | - if (data.records[0].data.nodeType == 'localParam' && data.records[0].get('notyet')) | |
302 | + if (data.records[0].get('nodeType') == 'localParam' && data.records[0].get('notyet')) | |
303 | 303 | { |
304 | 304 | this.valid = false; |
305 | 305 | return this.dropNotAllowed; |
306 | 306 | } |
307 | 307 | |
308 | - if (((data.records[0].data.nodeType == 'localParam') || | |
309 | - (data.records[0].data.nodeType == 'remoteParam') || | |
310 | - (data.records[0].data.nodeType == 'remoteSimuParam') || | |
311 | - (data.records[0].data.nodeType == 'derivedParam') || | |
312 | - (data.records[0].data.nodeType == 'myDataParam') || | |
313 | - (data.records[0].data.nodeType == 'alias')) && | |
314 | - //(data.records[0].data.leaf) && | |
308 | + if (((data.records[0].get('nodeType') == 'localParam') || | |
309 | + (data.records[0].get('nodeType') == 'remoteParam') || | |
310 | + (data.records[0].get('nodeType') == 'remoteSimuParam') || | |
311 | + (data.records[0].get('nodeType') == 'derivedParam') || | |
312 | + (data.records[0].get('nodeType')== 'myDataParam') || | |
313 | + (data.records[0].get('nodeType') == 'alias')) && | |
314 | + (data.records[0].isLeaf() || data.records[0].get('isParameter')) && | |
315 | 315 | !(data.records[0].data.disable)) |
316 | 316 | { |
317 | 317 | this.valid = true; |
... | ... | @@ -326,7 +326,7 @@ Ext.define('amdaUI.ParameterUI', |
326 | 326 | return false; |
327 | 327 | var nameToSent; |
328 | 328 | var components = null; |
329 | - switch (data.records[0].data.nodeType) | |
329 | + switch (data.records[0].get('nodeType')) | |
330 | 330 | { |
331 | 331 | case 'localParam' : |
332 | 332 | case 'remoteParam' : |
... | ... |
js/app/views/SearchUI.js
... | ... | @@ -346,24 +346,25 @@ Ext.define('amdaUI.SearchUI', |
346 | 346 | notifyEnter : function(ddSource, e, data){ }, |
347 | 347 | notifyOver : function(ddSource, e, data) |
348 | 348 | { |
349 | - if (data.records[0].data.nodeType == 'localParam' && data.records[0].get('notyet')) { | |
349 | + if (data.records[0].get('nodeType') == 'localParam' && data.records[0].get('notyet')) { | |
350 | 350 | this.valid = false; |
351 | 351 | return this.dropNotAllowed; |
352 | 352 | } |
353 | - if (((data.records[0].data.nodeType == 'localParam') || | |
354 | - (data.records[0].data.nodeType == 'remoteParam') || | |
355 | - (data.records[0].data.nodeType == 'remoteSimuParam') || | |
356 | - (data.records[0].data.nodeType == 'derivedParam') || | |
357 | - (data.records[0].data.nodeType == 'myDataParam') || | |
358 | - (data.records[0].data.nodeType == 'alias'))&& | |
359 | - //(data.records[0].data.leaf) && | |
360 | - !data.records[0].data.disable) | |
361 | - { | |
362 | - this.valid = true; | |
363 | - return this.dropAllowed; | |
364 | - } | |
365 | - this.valid = false; | |
366 | - return this.dropNotAllowed; | |
353 | + if (((data.records[0].get('nodeType') == 'localParam') || | |
354 | + (data.records[0].get('nodeType') == 'remoteParam') || | |
355 | + (data.records[0].get('nodeType') == 'remoteSimuParam') || | |
356 | + (data.records[0].get('nodeType') == 'derivedParam') || | |
357 | + (data.records[0].get('nodeType') == 'myDataParam') || | |
358 | + (data.records[0].get('nodeType') == 'alias')) && | |
359 | + (data.records[0].isLeaf() || data.records[0].get('isParameter')) && | |
360 | + !data.records[0].data.disable) | |
361 | + { | |
362 | + this.valid = true; | |
363 | + return this.dropAllowed; | |
364 | + } | |
365 | + | |
366 | + this.valid = false; | |
367 | + return this.dropNotAllowed; | |
367 | 368 | }, |
368 | 369 | notifyDrop : function(ddSource, e, data) |
369 | 370 | { |
... | ... |