Commit c7967cba683bfe28126efeb2c274d546f0c9d7f2

Authored by Nathanael Jourdane
1 parent cdf35aa6

Improve display for processing level values

Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
js/app/views/EpnTapUI.js
... ... @@ -192,6 +192,10 @@ Ext.define('App.util.Format', {
192 192 }
193 193 return '<p>' + txt + '</p>'
194 194 },
  195 + 'proc_lvl': function(data) {
  196 + var levels = {1: 'Raw', 2: 'Edited', 3: 'Calibrated', 4: 'Resampled', 5: 'Derived', 6: 'Ancillary'};
  197 + return (data in levels) ? '<p>' + levels[data] + '</p>' : '<em>' + data + '</em>';
  198 + },
195 199 'date': function(data) {
196 200 if(isNaN(data)) {
197 201 return '';
... ... @@ -203,7 +207,7 @@ Ext.define(&#39;App.util.Format&#39;, {
203 207 var D = Math.floor((h % 153) / 5) + 1;
204 208 var M = ((Math.floor(h / 153) + 2) % 12) + 1;
205 209 var Y = Math.floor(e / 1461) - 4716 + Math.floor((12 + 2 - M) / 12);
206   - return Ext.Date.format(new Date(Y, M-1, D), 'Y-m-d');
  210 + return Ext.Date.format(new Date(Y, M-1, D), 'Y/m/d');
207 211 },
208 212 'number': function(val) {
209 213 if(val < 0) {
... ...