Commit cc663bbe80f49e9e93414f986d57823f87b053be
1 parent
b96f55a5
Exists in
master
and in
112 other branches
Remove button disabling when fields are not filled
Showing
2 changed files
with
5 additions
and
27 deletions
Show diff stats
js/app/controllers/EpnTapModule.js
... | ... | @@ -71,14 +71,6 @@ Ext.define('amdaDesktop.EpnTapModule', { |
71 | 71 | }, |
72 | 72 | |
73 | 73 | addListeners: function () { |
74 | - this.targetNameCB.on('change', function () { | |
75 | - this.updateGetBtnStatus() | |
76 | - }, this) | |
77 | - | |
78 | - this.productTypeCB.on('change', function () { | |
79 | - this.updateGetBtnStatus() | |
80 | - }, this) | |
81 | - | |
82 | 74 | this.servicesGrid.on('cellclick', function (grid, td, cellIndex, record) { |
83 | 75 | this.onServiceSelected(record) |
84 | 76 | }, this) |
... | ... | @@ -88,18 +80,6 @@ Ext.define('amdaDesktop.EpnTapModule', { |
88 | 80 | }, this) |
89 | 81 | }, |
90 | 82 | |
91 | - /********************** | |
92 | - *** Utils functions *** | |
93 | - **********************/ | |
94 | - | |
95 | - updateGetBtnStatus: function () { | |
96 | - if (this.targetNameCB.rawValue.length > 0 && this.productTypeCB.rawValue.length > 0) { | |
97 | - this.getBtn.enable() | |
98 | - } else { | |
99 | - this.getBtn.disable() | |
100 | - } | |
101 | - }, | |
102 | - | |
103 | 83 | /************* |
104 | 84 | *** Events *** |
105 | 85 | *************/ |
... | ... |
js/app/views/EpnTapUI.js
... | ... | @@ -291,8 +291,7 @@ Ext.define('App.util.Format', { |
291 | 291 | }, |
292 | 292 | 'granule.size': function (data) { |
293 | 293 | const size = parseInt(data) |
294 | - // noinspection MagicNumberJS | |
295 | - const block = 1024 | |
294 | + const block = Math.pow(2, 10) | |
296 | 295 | const txt = isNaN(size) ? false |
297 | 296 | : size >= block * block ? (size / (block * block)).toPrecision(3) + 'Go' |
298 | 297 | : size >= block ? (size / block).toPrecision(3) + 'Mo' |
... | ... | @@ -537,7 +536,7 @@ Ext.define('amdaUI.EpnTapUI', { |
537 | 536 | Ext.ToolTip({target: cb.getEl(), html: '<div style="width:200px">' + cb.tooltip + '</div>'}) |
538 | 537 | } |
539 | 538 | } |
540 | - }; | |
539 | + } | |
541 | 540 | }, |
542 | 541 | |
543 | 542 | /** |
... | ... | @@ -550,7 +549,7 @@ Ext.define('amdaUI.EpnTapUI', { |
550 | 549 | return { |
551 | 550 | xtype: 'intervalSelector', |
552 | 551 | id: 'epnTapTimeSelector' |
553 | - }; | |
552 | + } | |
554 | 553 | }, |
555 | 554 | |
556 | 555 | /*********************** |
... | ... | @@ -565,11 +564,10 @@ Ext.define('amdaUI.EpnTapUI', { |
565 | 564 | xtype: 'button', |
566 | 565 | id: 'epnTapGetBtn', |
567 | 566 | text: 'Get services', |
568 | - disabled: true, | |
569 | 567 | width: 140, |
570 | 568 | height: 50, |
571 | 569 | margin: 10 |
572 | - }; | |
570 | + } | |
573 | 571 | }, |
574 | 572 | |
575 | 573 | /************ |
... | ... | @@ -679,4 +677,4 @@ Ext.define('amdaUI.EpnTapUI', { |
679 | 677 | columns: [] |
680 | 678 | } |
681 | 679 | } |
682 | -}) | |
683 | 680 | \ No newline at end of file |
681 | +}) | |
... | ... |