From 84a1734b91d367373c3722430c57957137a861b4 Mon Sep 17 00:00:00 2001 From: Hacene SI HADJ MOHAND Date: Thu, 29 Jul 2021 11:42:32 +0200 Subject: [PATCH] us 7833 plot TT cat ok --- js/app/models/CatalogNode.js | 11 +++++++++++ js/app/models/InteractiveNode.js | 22 ++++++++++++++++------ js/app/models/sharedCatalogNode.js | 4 ++++ js/app/models/sharedTimeTableNode.js | 4 ++++ 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/js/app/models/CatalogNode.js b/js/app/models/CatalogNode.js index d42c993..914664c 100644 --- a/js/app/models/CatalogNode.js +++ b/js/app/models/CatalogNode.js @@ -36,6 +36,10 @@ Ext.define('amdaModel.CatalogNode', { text : 'Download '+ this.self.objectName, hidden : true },{ + fnId : 'leaf-plot', + text : 'Plot '+ this.self.objectName, + hidden : true + },{ fnId : 'leaf-visu', text : 'Visualize '+ this.self.objectName, hidden : true @@ -43,6 +47,10 @@ Ext.define('amdaModel.CatalogNode', { fnId : 'leaf-generateTT', text : 'Generate Time Table ', hidden : true + },{ + fnId : 'leaf-generateTT', + text : 'Generate Time Table ', + hidden : true } ]; @@ -57,6 +65,9 @@ Ext.define('amdaModel.CatalogNode', { },{ fnId : 'mult-downloadMulti', text : 'Download selected '+this.self.objectName+'s' + },{ + fnId : 'mult-plotMulti', + text : 'Plot selected '+this.self.objectName+'s' }]; return menuItems; diff --git a/js/app/models/InteractiveNode.js b/js/app/models/InteractiveNode.js index e3d3085..616cc02 100644 --- a/js/app/models/InteractiveNode.js +++ b/js/app/models/InteractiveNode.js @@ -457,11 +457,14 @@ Ext.define('amdaModel.InteractiveNode', { this.createDownload(this); break; case 'generateCatalog': - this.generateCatalog(this); - break; - case 'generateTT': - this.generateTT(this); - break; + this.generateCatalog(this); + break; + case 'generateTT': + this.generateTT(this); + break; + case 'plotTT': + this.ttPlot(this); + break; default: break; } // switch end @@ -813,6 +816,13 @@ Ext.define('amdaModel.InteractiveNode', { { timeTabNode.editInModule(); }); - } + }, + ttPlot : function(node) { + // download Module + if (node.get('disable')) return; + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id, true, function (module) { + module.addTT(node.get('text'), node.get('id')); + }); + }, }); diff --git a/js/app/models/sharedCatalogNode.js b/js/app/models/sharedCatalogNode.js index b0b5adf..b591834 100644 --- a/js/app/models/sharedCatalogNode.js +++ b/js/app/models/sharedCatalogNode.js @@ -33,6 +33,10 @@ Ext.define('amdaModel.sharedCatalogNode', { text : 'Edit Catalog', hidden : true },{ + fnId : 'leaf-plotTT', + text : 'Plot Catalog', + hidden : true + },{ fnId : 'leaf-generateTT', text : 'Generate Time Table ', hidden : true diff --git a/js/app/models/sharedTimeTableNode.js b/js/app/models/sharedTimeTableNode.js index e722351..b0deb55 100644 --- a/js/app/models/sharedTimeTableNode.js +++ b/js/app/models/sharedTimeTableNode.js @@ -32,6 +32,10 @@ Ext.define('amdaModel.sharedTimeTableNode', { text : 'Edit Time Table', hidden : true },{ + fnId : 'leaf-plotTT', + text : 'Plot Time Table', + hidden : true + },{ fnId : 'leaf-generateCatalog', text : 'Generate Catalog', hidden : true -- libgit2 0.21.2