Commit c4ccaa4f4257f00b5de66e57c81c1eacf36b3201
1 parent
04a55960
Exists in
master
and in
112 other branches
BugFix window size when launching epntap module from tree
Showing
2 changed files
with
20 additions
and
4 deletions
Show diff stats
js/app/controllers/EpnTapModule.js
... | ... | @@ -96,36 +96,46 @@ Ext.define('amdaDesktop.EpnTapModule', { |
96 | 96 | |
97 | 97 | createWindow: function (target) { |
98 | 98 | this.callParent(); |
99 | + this.launchedFromTree = true; | |
99 | 100 | this.onWindowLoaded(); |
100 | 101 | console.log("selected target:", target); |
101 | 102 | |
102 | 103 | switch(target) { |
103 | 104 | case 'icon-mercury': |
104 | 105 | this.targetClassCB.select('planet'); |
106 | + this.targetNameCB.select('mercury'); | |
105 | 107 | break; |
106 | 108 | case 'icon-venus': |
107 | 109 | this.targetClassCB.select('planet'); |
110 | + this.targetNameCB.select('venus'); | |
108 | 111 | break; |
109 | 112 | case 'icon-earth': |
110 | 113 | this.targetClassCB.select('planet'); |
114 | + this.targetNameCB.select('earth'); | |
111 | 115 | break; |
112 | 116 | case 'icon-mars': |
113 | 117 | this.targetClassCB.select('planet'); |
118 | + this.targetNameCB.select('mars'); | |
114 | 119 | break; |
115 | 120 | case 'icon-jupiter': |
116 | 121 | this.targetClassCB.select('planet'); |
122 | + this.targetNameCB.select('jupiter'); | |
117 | 123 | break; |
118 | 124 | case 'icon-saturn': |
119 | 125 | this.targetClassCB.select('planet'); |
126 | + this.targetNameCB.select('saturn'); | |
120 | 127 | break; |
121 | 128 | case 'icon-comet': |
122 | 129 | this.targetClassCB.select('comet'); |
130 | + this.targetNameCB.select('comet'); // À vérifier | |
123 | 131 | break; |
124 | 132 | case 'icon-sw': |
125 | 133 | this.targetClassCB.select('sun'); // À vérifier |
134 | + // this.targetNameCB.select(''); // ? | |
126 | 135 | break; |
127 | 136 | case 'icon-solarsystem': |
128 | 137 | this.targetClassCB.select('sun'); // À vérifier |
138 | + // this.targetNameCB.select(''); // ? | |
129 | 139 | break; |
130 | 140 | default: |
131 | 141 | console.log("Unknown target: " + target); |
... | ... | @@ -151,6 +161,11 @@ Ext.define('amdaDesktop.EpnTapModule', { |
151 | 161 | this.previousPageBtn = Ext.getCmp('epnTapPreviousPageBtn'); |
152 | 162 | this.nextPageBtn = Ext.getCmp('epnTapNextPageBtn'); |
153 | 163 | this.lastPageBtn = Ext.getCmp('epnTapLastPageBtn'); |
164 | + this.epnTapPanel = this.productTypeCB.findParentByType('panelEpnTap'); | |
165 | + | |
166 | + if( this.launchedFromTree ) { | |
167 | + this.epnTapPanel.setSize(800, 600); | |
168 | + } | |
154 | 169 | |
155 | 170 | this.productTypeCB.getStore().removeAll(); |
156 | 171 | this.productTypeCB.getStore().add({'id': 'all', 'name': 'All data product types'}); |
... | ... |
js/app/views/EpnTapUI.js
... | ... | @@ -122,8 +122,8 @@ Ext.define('amdaUI.EpnTapUI', { |
122 | 122 | alias: 'widget.panelEpnTap', |
123 | 123 | requires: ['amdaUI.IntervalUI'], |
124 | 124 | |
125 | - width: 800, | |
126 | - height: 600, | |
125 | + // width: 800, | |
126 | + // height: 600, | |
127 | 127 | |
128 | 128 | /** |
129 | 129 | Method constructor, which basically call the `init()` method to create the EpnTap panel. |
... | ... | @@ -582,10 +582,11 @@ Ext.define('amdaUI.EpnTapUI', { |
582 | 582 | // Ext.apply(this, Ext.apply(arguments, config)); |
583 | 583 | |
584 | 584 | var myConf = { |
585 | + id: 'epnTapWindow', | |
585 | 586 | items: [ |
586 | 587 | createServiceFilterPanel(), |
587 | - createGridsPanel() | |
588 | - // createInfoPanel() | |
588 | + createGridsPanel(), | |
589 | + createInfoPanel() | |
589 | 590 | ] |
590 | 591 | }; |
591 | 592 | Ext.apply(this, Ext.apply(arguments, myConf)); |
... | ... |