From f4fed77ef24549765f055aba8f873a9179d8e865 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Thu, 29 Mar 2012 13:16:34 +0000 Subject: Fixed T[Active]DatePicker js --- .../source/prado/activecontrols/activedatepicker.js | 4 +++- .../Web/Javascripts/source/prado/controls/controls.js | 2 +- .../Web/Javascripts/source/prado/datepicker/datepicker.js | 14 ++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js b/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js index a04a0243..cef0c998 100755 --- a/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js +++ b/framework/Web/Javascripts/source/prado/activecontrols/activedatepicker.js @@ -3,8 +3,10 @@ */ Prado.WebUI.TActiveDatePicker = Class.create(Prado.WebUI.TDatePicker, { - onInit : function(options) + initialize : function($super, options) { + $super(options); + this.options = options || []; this.control = $(options.ID); this.dateSlot = new Array(42); diff --git a/framework/Web/Javascripts/source/prado/controls/controls.js b/framework/Web/Javascripts/source/prado/controls/controls.js index 42fc77ff..bbc54e9e 100644 --- a/framework/Web/Javascripts/source/prado/controls/controls.js +++ b/framework/Web/Javascripts/source/prado/controls/controls.js @@ -4,7 +4,7 @@ Prado.WebUI.Control = Class.create({ initialize : function(options) { - this.registered = false; + this.registered = false; this.ID = options.ID; this.element = $(this.ID); this.observers = new Array(); diff --git a/framework/Web/Javascripts/source/prado/datepicker/datepicker.js b/framework/Web/Javascripts/source/prado/datepicker/datepicker.js index 781ff36a..c064bce1 100644 --- a/framework/Web/Javascripts/source/prado/datepicker/datepicker.js +++ b/framework/Web/Javascripts/source/prado/datepicker/datepicker.js @@ -1,5 +1,4 @@ -Prado.WebUI.TDatePicker = Class.create(); -Object.extend(Prado.WebUI.TDatePicker, +Prado.WebUI.TDatePicker = Class.create(Prado.WebUI.Control, { /** * @return Date the date from drop down list options. @@ -35,11 +34,8 @@ Object.extend(Prado.WebUI.TDatePicker, getDayListControl : function(control) { return $(control.id+"_day"); - } -}); + }, -Prado.WebUI.TDatePicker.prototype = -{ MonthNames : [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" @@ -59,8 +55,10 @@ Prado.WebUI.TDatePicker.prototype = FromYear : 2005, UpToYear: 2020, - initialize : function(options) + initialize : function($super, options) { + $super(options); + this.options = options || []; this.control = $(options.ID); this.dateSlot = new Array(42); @@ -788,4 +786,4 @@ Prado.WebUI.TDatePicker.prototype = } } -}; +}); -- cgit v1.2.3