diff options
Diffstat (limited to 'framework/Web/Javascripts/source')
3 files changed, 43 insertions, 43 deletions
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js b/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js index b15ceed3..24c1f30d 100644 --- a/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js +++ b/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js @@ -290,6 +290,7 @@ Prado.WebUI.TEventTriggeredCallback = Class.create(Prado.WebUI.Control, {
onInit : function(options)
{
+ this.options = options || {} ;
var element = $(options['ControlID']);
if(element)
this.observe(element, this.getEventName(element), this.doCallback.bind(this));
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js b/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js index cef0c998..a04a0243 100755 --- a/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js +++ b/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js @@ -3,10 +3,8 @@ */
Prado.WebUI.TActiveDatePicker = Class.create(Prado.WebUI.TDatePicker,
{
- initialize : function($super, options)
+ onInit : function(options)
{
- $super(options);
-
this.options = options || [];
this.control = $(options.ID);
this.dateSlot = new Array(42);
diff --git a/framework/Web/Javascripts/source/prado/datepicker/datepicker.js b/framework/Web/Javascripts/source/prado/datepicker/datepicker.js index c064bce1..e92904c8 100644 --- a/framework/Web/Javascripts/source/prado/datepicker/datepicker.js +++ b/framework/Web/Javascripts/source/prado/datepicker/datepicker.js @@ -1,41 +1,5 @@ Prado.WebUI.TDatePicker = Class.create(Prado.WebUI.Control,
{
- /**
- * @return Date the date from drop down list options.
- */
- getDropDownDate : function(control)
- {
- var now=new Date();
- var year=now.getFullYear();
- var month=now.getMonth();
- var day=1;
-
- var month_list = this.getMonthListControl(control);
- var day_list = this.getDayListControl(control);
- var year_list = this.getYearListControl(control);
-
- var day = day_list ? $F(day_list) : 1;
- var month = month_list ? $F(month_list) : now.getMonth();
- var year = year_list ? $F(year_list) : now.getFullYear();
-
- return new Date(year,month,day, 0, 0, 0);
- },
-
- getYearListControl : function(control)
- {
- return $(control.id+"_year");
- },
-
- getMonthListControl : function(control)
- {
- return $(control.id+"_month");
- },
-
- getDayListControl : function(control)
- {
- return $(control.id+"_day");
- },
-
MonthNames : [ "January", "February", "March", "April",
"May", "June", "July", "August",
"September", "October", "November", "December"
@@ -55,10 +19,8 @@ Prado.WebUI.TDatePicker = Class.create(Prado.WebUI.Control, FromYear : 2005, UpToYear: 2020,
- initialize : function($super, options)
+ onInit : function(options)
{
- $super(options);
-
this.options = options || [];
this.control = $(options.ID);
this.dateSlot = new Array(42);
@@ -534,7 +496,7 @@ Prado.WebUI.TDatePicker = Class.create(Prado.WebUI.Control, for(var i = 0; i < years.length; i++)
years[i].selected = years[i].value.toInteger() == currentYear;
}
- this.fireChangeEvent(day || month || year, capped);
+ this.fireChangeEvent(day || month || year, capevents);
}
},
@@ -787,3 +749,42 @@ Prado.WebUI.TDatePicker = Class.create(Prado.WebUI.Control, }
});
+
+Object.extend(Prado.WebUI.TDatePicker,
+{
+ /**
+ * @return Date the date from drop down list options.
+ */
+ getDropDownDate : function(control)
+ {
+ var now=new Date();
+ var year=now.getFullYear();
+ var month=now.getMonth();
+ var day=1;
+
+ var month_list = Prado.WebUI.TDatePicker.getMonthListControl(control);
+ var day_list = Prado.WebUI.TDatePicker.getDayListControl(control);
+ var year_list = Prado.WebUI.TDatePicker.getYearListControl(control);
+
+ var day = day_list ? $F(day_list) : 1;
+ var month = month_list ? $F(month_list) : now.getMonth();
+ var year = year_list ? $F(year_list) : now.getFullYear();
+
+ return new Date(year,month,day, 0, 0, 0);
+ },
+
+ getYearListControl : function(control)
+ {
+ return $(control.id+"_year");
+ },
+
+ getMonthListControl : function(control)
+ {
+ return $(control.id+"_month");
+ },
+
+ getDayListControl : function(control)
+ {
+ return $(control.id+"_day");
+ }
+});
\ No newline at end of file |