annotate app/lib/Helpers.js @ 466:2561d203c77e

Added tag 1.0 for changeset 20df35a31490
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 09 Jan 2014 11:30:46 +0100
parents 60a2812568cb
children debfcc7713e3
rev   line source
297
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 /**
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
2 * Helper class
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
3 * 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
4 */
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 Ext.define('Lada.lib.Helpers', {
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
6 statics: {
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 /**
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
8 * 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
9 */
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 ts2date: function(v, record){
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 // 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
12 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
13 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
14 }
297
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 return new Date(v);
1e1ee8abf91b Added Helpers class to provide some helper methods.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16 }
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 })

http://lada.wald.intevation.org