Commit 264edda70f54539983e2df81b189c614dd26d87a

Authored by Nathanael Jourdane
1 parent 33b0f682

Set product types to all when lauched from treeview

js/app/controllers/EpnTapModule.js
... ... @@ -52,8 +52,6 @@ Ext.define('amdaDesktop.EpnTapModule', {
52 52 this.granulesStore.removeAll();
53 53  
54 54 if(target) {
55   - var name = target[0].charAt(0).toUpperCase() + target[0].replace(/_/g, ' ').substr(1).toLowerCase();
56   - this.targetNameCB.getStore().add({'id': target[0], 'name': name});
57 55 this.targetNameCB.select(target[0]);
58 56 this.productTypeCB.select(target[1]);
59 57 this.getServices();
... ...
js/app/controllers/InteropModule.js
... ... @@ -62,16 +62,17 @@ Ext.define('amdaDesktop.InteropModule', {
62 62 if(!this.epntap) {
63 63 this.epntap = Ext.create('amdaDesktop.EpnTapModule');
64 64 }
  65 + // [Target name, product type]
65 66 var icons_dic = {
66   - 'icon-mercury': ['mercury', 'ts'],
67   - 'icon-venus': ['venus', 'ts'],
68   - 'icon-earth': ['earth', 'ts'],
69   - 'icon-mars': ['mars', 'ts'],
70   - 'icon-jupiter': ['jupiter', 'ts'],
71   - 'icon-saturn': ['saturn', 'ts'],
72   - 'icon-comet': ['comet', 'ts'],
73   - 'icon-sw': ['all', 'ts'],
74   - 'icon-solarsystem': ['all', 'ts']
  67 + 'icon-mercury': ['Mercury', 'all'],
  68 + 'icon-venus': ['Venus', 'all'],
  69 + 'icon-earth': ['Earth', 'all'],
  70 + 'icon-mars': ['Mars', 'all'],
  71 + 'icon-jupiter': ['Jupiter', 'all'],
  72 + 'icon-saturn': ['Saturn', 'all'],
  73 + 'icon-comet': ['Comet', 'all'],
  74 + 'icon-sw': ['', 'all'],
  75 + 'icon-solarsystem': ['', 'all']
75 76 }
76 77 this.epntap.loadTarget(icon_id ? icons_dic[icon_id]: false);
77 78 },
... ...
js/app/views/EpnTapUI.js
... ... @@ -470,7 +470,7 @@ Ext.define('amdaUI.EpnTapUI', {
470 470 }
471 471 },
472 472 listeners: {
473   - select: function(cb, records) {
  473 + change: function(cb, records) {
474 474 var val = cb.value[cb.value.length - 1];
475 475 if(val === 'all') {
476 476 cb.select(cb.store.getRange().slice(2));
... ...