Commit 9b93ada15124d79786a5517ec1085c95ce54440d
1 parent
ceac8bd0
Exists in
master
and in
77 other branches
shared cat to tt ok
Showing
4 changed files
with
32 additions
and
30 deletions
Show diff stats
js/app/models/CatalogNode.js
... | ... | @@ -114,25 +114,5 @@ Ext.define('amdaModel.CatalogNode', { |
114 | 114 | module.setLinkedNode(me); |
115 | 115 | module.createWindow();*/ |
116 | 116 | //}); |
117 | - }, | |
118 | - generateTT: function(node){ | |
119 | - var catObj = Ext.create('amdaModel.TimeTable'); | |
120 | - var timeTabNode = Ext.create('amdaModel.TimeTableNode',{leaf : true}); | |
121 | - catObj.set('relatedCatalogId', node.get('id')); | |
122 | - desc = 'Generated by CDPP/Amda Catalog Module \n'; | |
123 | - if (node.get('description')) | |
124 | - desc = desc + node.get('description'); | |
125 | - catObj.set('description', desc); | |
126 | - timeTabNode.set('object',catObj); | |
127 | - var explorerTree = Ext.getCmp(amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); | |
128 | - var ttRootNode = explorerTree.getRootNode().findChild('id', 'timeTable-treeRootNode', true); | |
129 | - amdaModel.InteractiveNode.preloadNodes(ttRootNode.getRootNode(), | |
130 | - function() | |
131 | - { | |
132 | - // edit newNode into Parameter Module with node as contextNode | |
133 | - timeTabNode.editInModule(); | |
134 | - }); | |
135 | - | |
136 | - | |
137 | - } | |
117 | + } | |
138 | 118 | }); | ... | ... |
js/app/models/InteractiveNode.js
... | ... | @@ -459,7 +459,9 @@ Ext.define('amdaModel.InteractiveNode', { |
459 | 459 | case 'generateCatalog': |
460 | 460 | this.generateCatalog(this); |
461 | 461 | break; |
462 | - | |
462 | + case 'generateTT': | |
463 | + this.generateTT(this); | |
464 | + break; | |
463 | 465 | default: |
464 | 466 | break; |
465 | 467 | } // switch end |
... | ... | @@ -792,8 +794,25 @@ Ext.define('amdaModel.InteractiveNode', { |
792 | 794 | { |
793 | 795 | catNode.editInModule(); |
794 | 796 | }); |
795 | - } | |
796 | - }, this); | |
797 | + } | |
798 | + }, this); | |
799 | + }, | |
800 | + generateTT: function(node){ | |
801 | + var catObj = Ext.create('amdaModel.TimeTable'); | |
802 | + var timeTabNode = Ext.create('amdaModel.TimeTableNode',{leaf : true}); | |
803 | + catObj.set('relatedCatalogId', node.get('id')); | |
804 | + desc = 'Generated by CDPP/Amda Catalog Module \n'; | |
805 | + if (node.get('description')) | |
806 | + desc = desc + node.get('description'); | |
807 | + catObj.set('description', desc); | |
808 | + timeTabNode.set('object',catObj); | |
809 | + var explorerTree = Ext.getCmp(amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); | |
810 | + var ttRootNode = explorerTree.getRootNode().findChild('id', 'timeTable-treeRootNode', true); | |
811 | + amdaModel.InteractiveNode.preloadNodes(ttRootNode.getRootNode(), | |
812 | + function() | |
813 | + { | |
814 | + timeTabNode.editInModule(); | |
815 | + }); | |
797 | 816 | } |
798 | 817 | |
799 | 818 | }); | ... | ... |
js/app/models/TimeTableNode.js
js/app/models/sharedCatalogNode.js
... | ... | @@ -32,7 +32,13 @@ Ext.define('amdaModel.sharedCatalogNode', { |
32 | 32 | fnId : 'leaf-editLeaf', |
33 | 33 | text : 'Edit Catalog', |
34 | 34 | hidden : true |
35 | - }]; | |
35 | + },{ | |
36 | + fnId : 'leaf-generateTT', | |
37 | + text : 'Generate Time Table ', | |
38 | + hidden : true | |
39 | + } | |
40 | + | |
41 | + ]; | |
36 | 42 | |
37 | 43 | return menuItems; |
38 | 44 | }, |
... | ... | @@ -40,5 +46,6 @@ Ext.define('amdaModel.sharedCatalogNode', { |
40 | 46 | getAllContextMenuItems: function(){ |
41 | 47 | |
42 | 48 | return this.localMenuItems(); |
43 | - } | |
49 | + } | |
50 | + | |
44 | 51 | }); | ... | ... |