From c4ccaa4f4257f00b5de66e57c81c1eacf36b3201 Mon Sep 17 00:00:00 2001 From: Nathanael Jourdane <nathanael.jourdane@irap.omp.eu> Date: Mon, 6 Feb 2017 10:35:54 +0100 Subject: [PATCH] BugFix window size when launching epntap module from tree --- js/app/controllers/EpnTapModule.js | 15 +++++++++++++++ js/app/views/EpnTapUI.js | 9 +++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/js/app/controllers/EpnTapModule.js b/js/app/controllers/EpnTapModule.js index 023ef72..89c9a97 100644 --- a/js/app/controllers/EpnTapModule.js +++ b/js/app/controllers/EpnTapModule.js @@ -96,36 +96,46 @@ Ext.define('amdaDesktop.EpnTapModule', { createWindow: function (target) { this.callParent(); + this.launchedFromTree = true; this.onWindowLoaded(); console.log("selected target:", target); switch(target) { case 'icon-mercury': this.targetClassCB.select('planet'); + this.targetNameCB.select('mercury'); break; case 'icon-venus': this.targetClassCB.select('planet'); + this.targetNameCB.select('venus'); break; case 'icon-earth': this.targetClassCB.select('planet'); + this.targetNameCB.select('earth'); break; case 'icon-mars': this.targetClassCB.select('planet'); + this.targetNameCB.select('mars'); break; case 'icon-jupiter': this.targetClassCB.select('planet'); + this.targetNameCB.select('jupiter'); break; case 'icon-saturn': this.targetClassCB.select('planet'); + this.targetNameCB.select('saturn'); break; case 'icon-comet': this.targetClassCB.select('comet'); + this.targetNameCB.select('comet'); // À vérifier break; case 'icon-sw': this.targetClassCB.select('sun'); // À vérifier + // this.targetNameCB.select(''); // ? break; case 'icon-solarsystem': this.targetClassCB.select('sun'); // À vérifier + // this.targetNameCB.select(''); // ? break; default: console.log("Unknown target: " + target); @@ -151,6 +161,11 @@ Ext.define('amdaDesktop.EpnTapModule', { this.previousPageBtn = Ext.getCmp('epnTapPreviousPageBtn'); this.nextPageBtn = Ext.getCmp('epnTapNextPageBtn'); this.lastPageBtn = Ext.getCmp('epnTapLastPageBtn'); + this.epnTapPanel = this.productTypeCB.findParentByType('panelEpnTap'); + + if( this.launchedFromTree ) { + this.epnTapPanel.setSize(800, 600); + } this.productTypeCB.getStore().removeAll(); this.productTypeCB.getStore().add({'id': 'all', 'name': 'All data product types'}); diff --git a/js/app/views/EpnTapUI.js b/js/app/views/EpnTapUI.js index e2d324c..4e846b2 100644 --- a/js/app/views/EpnTapUI.js +++ b/js/app/views/EpnTapUI.js @@ -122,8 +122,8 @@ Ext.define('amdaUI.EpnTapUI', { alias: 'widget.panelEpnTap', requires: ['amdaUI.IntervalUI'], - width: 800, - height: 600, + // width: 800, + // height: 600, /** Method constructor, which basically call the `init()` method to create the EpnTap panel. @@ -582,10 +582,11 @@ Ext.define('amdaUI.EpnTapUI', { // Ext.apply(this, Ext.apply(arguments, config)); var myConf = { + id: 'epnTapWindow', items: [ createServiceFilterPanel(), - createGridsPanel() - // createInfoPanel() + createGridsPanel(), + createInfoPanel() ] }; Ext.apply(this, Ext.apply(arguments, myConf)); -- libgit2 0.21.2