Mercurial > lada > lada-client
annotate app/lib/Helpers.js @ 474:6f5a11dea7e2
Fixed HTML comment.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 17 Jan 2014 12:16:09 +0100 |
parents | debfcc7713e3 |
children | 850ccfe5f3c4 |
rev | line source |
---|---|
472
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
402
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
402
diff
changeset
|
2 * Software engineering by Intevation GmbH |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
402
diff
changeset
|
3 * |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
402
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
402
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
402
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
402
diff
changeset
|
7 */ |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
402
diff
changeset
|
8 |
297
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
9 /** |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
10 * Helper class |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
11 * This class provides some globally used functions. |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
12 */ |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
13 Ext.define('Lada.lib.Helpers', { |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
14 statics: { |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
15 /** |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
16 * Function to translate a timestamp into a date |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
17 */ |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
18 ts2date: function(v, record){ |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
19 // Converts a timestamp into a date object. |
402
60a2812568cb
Fixed converting dates from timestamp to date object to allow empty(NULL) values.
Raimund Renkert <rrenkert@intevation.de>
parents:
297
diff
changeset
|
20 if (v === null || v === undefined) { |
60a2812568cb
Fixed converting dates from timestamp to date object to allow empty(NULL) values.
Raimund Renkert <rrenkert@intevation.de>
parents:
297
diff
changeset
|
21 return v; |
60a2812568cb
Fixed converting dates from timestamp to date object to allow empty(NULL) values.
Raimund Renkert <rrenkert@intevation.de>
parents:
297
diff
changeset
|
22 } |
297
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
23 return new Date(v); |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
24 } |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
25 } |
1e1ee8abf91b
Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
26 }) |