From 4d945604cc8c0e1cd97d8b29129efe2ea85f5628 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Fri, 3 Aug 2007 15:25:59 +0000 Subject: - support for Datepicker control --- live/js/live/pageenhance.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'live/js') diff --git a/live/js/live/pageenhance.js b/live/js/live/pageenhance.js index cb2cbb1..d469a8b 100644 --- a/live/js/live/pageenhance.js +++ b/live/js/live/pageenhance.js @@ -22,7 +22,9 @@ var PageEnhance = new Class({ notifyStrings: { successMsg: ' Success!', errorMsg: ' failed!' - } + }, + datePickerSelector: 'input.DatePicker', + datePickerOptions: '' }, initialize: function(options){ @@ -37,6 +39,7 @@ var PageEnhance = new Class({ $$(this.options.epgLinkSelector).each(this.epgPopup.bind(this)); this.addHintTips($$(this.options.hintTipSelector)); $$(this.options.actionLinkSelector).each(this.vdrRequest.bind(this)); + $$(this.options.datePickerSelector).each(this.datePicker.bind(this)); }, // actions applied on mouse down. @@ -117,7 +120,14 @@ var PageEnhance = new Class({ else { $$(elems).each(this.tips.build, this.tips); } + }, + + // add datepicker to input element + datePicker: function(el){ + el.alt = this.options.datePickerOptions; + new DatePicker(el); } + }); PageEnhance.implement(new Events, new Options); -- cgit v1.2.3