Project

General

Profile

1
/*
2
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
3
$Id$
4
*/
5

    
6
// Ensure this object's dependancies are loaded.
7
mapbuilder.loadScript(baseDir+"/widget/WidgetBaseXSL.js");
8

    
9
/**
10
 * Adds a timstamp listener to show the curretn timestamp value in a form.
11
 * @constructor
12
 * @base WidgetBaseXSL
13
 * @author Mike Adair mike.adairATccrs.nrcan.gc.ca
14
 * @param widgetNode      The tool node from the Config XML file.
15
 * @param model  The ButtonBar widget.
16
 */
17
function Timestamp(widgetNode, model) {
18
  WidgetBaseXSL.apply(this,new Array(widgetNode, model));
19

    
20
  this.updateTimestamp = function (objRef, timestamp) {
21
    var inputEl = document.getElementById("timestampValue");
22
    inputEl.value = objRef.model.timestampList.childNodes[timestamp].firstChild.nodeValue;
23
  }
24

    
25
  this.model.addListener("timestamp",this.updateTimestamp, this);
26
}
27

    
28

    
(92-92/111)