Commit efdeca25c330d51506baee26df4b9fa6e4b9ac8f
1 parent
955c4995
Exists in
master
and in
108 other branches
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,8 +238,20 @@ Ext.define('amdaUI.CatalogUI', { | ||
238 | var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); | 238 | var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); |
239 | // store / columns are the same - not needed to reconfigure grid | 239 | // store / columns are the same - not needed to reconfigure grid |
240 | this.toReconfigure = false; | 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 | if (this.object.isModified('name') || this.object.get('fromPlugin')) { | 255 | if (this.object.isModified('name') || this.object.get('fromPlugin')) { |
244 | // if object already has an id : it's a 'rename' of an existing | 256 | // if object already has an id : it's a 'rename' of an existing |
245 | if (this.object.get('id')){ | 257 | if (this.object.get('id')){ |