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,6 +192,10 @@ Ext.define('App.util.Format', {
192 } 192 }
193 return '<p>' + txt + '</p>' 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 'date': function(data) { 199 'date': function(data) {
196 if(isNaN(data)) { 200 if(isNaN(data)) {
197 return ''; 201 return '';
@@ -203,7 +207,7 @@ Ext.define(&#39;App.util.Format&#39;, { @@ -203,7 +207,7 @@ Ext.define(&#39;App.util.Format&#39;, {
203 var D = Math.floor((h % 153) / 5) + 1; 207 var D = Math.floor((h % 153) / 5) + 1;
204 var M = ((Math.floor(h / 153) + 2) % 12) + 1; 208 var M = ((Math.floor(h / 153) + 2) % 12) + 1;
205 var Y = Math.floor(e / 1461) - 4716 + Math.floor((12 + 2 - M) / 12); 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 'number': function(val) { 212 'number': function(val) {
209 if(val < 0) { 213 if(val < 0) {