Commit 75a90e82c8a677be056c3c2ba378cc039d073e21
1 parent
d9a1b6f6
Exists in
master
and in
84 other branches
ticket ok
Showing
1 changed file
with
20 additions
and
4 deletions
Show diff stats
js/app/views/VisuUI.js
... | ... | @@ -37,7 +37,7 @@ Ext.define('amdaUI.VisuUI', { |
37 | 37 | updateObject: function () { |
38 | 38 | return true; |
39 | 39 | }, |
40 | - addCatalog: function(cat) { | |
40 | + addCatalog: function (cat) { | |
41 | 41 | this.setObject(cat) |
42 | 42 | }, |
43 | 43 | |
... | ... | @@ -329,9 +329,25 @@ Ext.define('amdaUI.VisuUI', { |
329 | 329 | return false; |
330 | 330 | var visuModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.visu.id); |
331 | 331 | if (visuModule) { |
332 | - var dropObject = data.records[0]; | |
333 | - dropObject.set('name', data.records[0].get('text')); | |
334 | - visuModule.addCatalog(dropObject); | |
332 | + | |
333 | + var catNode = data.records[0]; | |
334 | + AmdaAction.getObject( catNode.get('id'), catNode.get('nodeType'), function(result, remoteEvent) { | |
335 | + var catObj = Ext.create(catNode.get('objectDataModel'), result); | |
336 | + if(catObj !== null){ | |
337 | + visuModule.addCatalog(catObj); | |
338 | + }else{ | |
339 | + Ext.MessageBox.show({title: 'Warning', | |
340 | + msg: '<br/>Undifined Catalog '+catNode.get('text'), | |
341 | + width: 300, | |
342 | + buttons: Ext.MessageBox, | |
343 | + fn: me.overwriteProcess, | |
344 | + icon: Ext.MessageBox.WARNING, | |
345 | + scope: me | |
346 | + }); | |
347 | + return false; | |
348 | + } | |
349 | + | |
350 | + }, this); | |
335 | 351 | } |
336 | 352 | return true; |
337 | 353 | } | ... | ... |