Commit efdeca25c330d51506baee26df4b9fa6e4b9ac8f

Authored by Elena.Budnik
1 parent 955c4995

Anomalie #6181 : save shared catalog

Showing 1 changed file with 14 additions and 2 deletions   Show diff stats
js/app/views/CatalogUI.js
... ... @@ -238,8 +238,20 @@ Ext.define('amdaUI.CatalogUI', {
238 238 var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id);
239 239 // store / columns are the same - not needed to reconfigure grid
240 240 this.toReconfigure = false;
241   - // if the name has been modified this is a creation
242   - if (this.fclose()) {
  241 +
  242 + // if save shared catalog
  243 + if (module.contextNode && (module.contextNode.get('id') == 'sharedcatalog-treeRootNode'))
  244 + {
  245 + module.linkedNode = null;
  246 + module.createLinkedNode();
  247 + module.createObject(this.object.getJsonValues());
  248 + var obj = module.linkedNode.get('object');
  249 + // synchronisation of objects
  250 + this.object = obj;
  251 + module.linkedNode.create();
  252 + }
  253 + // if the name has been modified this is a creation
  254 + else if (this.fclose()) {
243 255 if (this.object.isModified('name') || this.object.get('fromPlugin')) {
244 256 // if object already has an id : it's a 'rename' of an existing
245 257 if (this.object.get('id')){
... ...