File: twiki.js

package info (click to toggle)
twiki 1%3A4.0.5-9.1
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 20,000 kB
  • ctags: 4,044
  • sloc: perl: 29,135; python: 2,583; xml: 573; sh: 256; makefile: 150; php: 129
file content (28 lines) | stat: -rw-r--r-- 836 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Reuses the same "calendar" object for all date-type fields on the page
function jscal_selected(cal, date) {
  cal.sel.value = date;
  if (cal.dateClicked)
    cal.callCloseHandler();
}
function jscal_close(cal) {
  cal.hide();
  _dynarch_popupCalendar = null;
}
function showCalendar(id, format) {
  var el = document.getElementById(id);
  if (_dynarch_popupCalendar != null) {
    _dynarch_popupCalendar.hide();
  } else {
    var cal = new Calendar(1, null, jscal_selected, jscal_close);
    cal.showsTime = false;
    cal.showsOtherMonths = true;
    _dynarch_popupCalendar = cal;
    cal.setRange(1900, 2070);
    cal.create();
  }
  _dynarch_popupCalendar.setDateFormat(format);
  _dynarch_popupCalendar.parseDate(el.value);
  _dynarch_popupCalendar.sel = el;
  _dynarch_popupCalendar.showAtElement(el, "Br");
  return false;
}