Commit 2190f3809354c61184bb9b38dc465b4dcddc3c4c

Authored by Benjamin Renard
1 parent 6ab359f0

Fix cancel action when try to create a new catalog (#7084)

Showing 1 changed file with 6 additions and 5 deletions   Show diff stats
js/app/views/CatalogUI.js
... ... @@ -738,17 +738,18 @@ Ext.define('amdaUI.CatalogUI', {
738 738  
739 739 Ext.Msg.prompt('Define Parameters', 'Please enter parameters number:', function(btn, text){
740 740 if (btn == 'ok'){
  741 + module.createLinkedNode();
  742 + module.createObject();
  743 + var obj = module.linkedNode.get('object');
  744 +
741 745 var nbParam = parseInt(text);
742 746 if ((nbParam <= 0) || (nbParam > 100)) {
743 747 nbParam = 1;
744 748 }
745 749  
746   - obj.set('nbParameters', parseInt(text));
747   - }
748   - else {
749   - obj.set('nbParameters', 1);
  750 + obj.set('nbParameters', nbParam);
  751 + me.setObject(obj,true);
750 752 }
751   - me.setObject(obj,true);
752 753 }, this);
753 754  
754 755 }
... ...