diff --git a/source/Ox.UI/js/Calendar/Ox.Calendar.js b/source/Ox.UI/js/Calendar/Ox.Calendar.js index b0f76b41..f62cc24a 100644 --- a/source/Ox.UI/js/Calendar/Ox.Calendar.js +++ b/source/Ox.UI/js/Calendar/Ox.Calendar.js @@ -42,8 +42,8 @@ Ox.Calendar = function(options, self) { .options(options || {}) .addClass('OxCalendar') .css({ - width: self.options.width + 'px', - height: self.options.height + 'px' + //width: self.options.width + 'px', + //height: self.options.height + 'px' }) .bindEvent({ anyclick: function(e) { @@ -635,11 +635,12 @@ Ox.Calendar = function(options, self) { } function getOverlayWidths() { - var width = Math.round(self.options.width / getScrollbarFactor()); + var width = that.width() || self.options.width, + centerWidth = Math.round(width / getScrollbarFactor()); return [ - Math.floor((self.options.width - width) / 2), - width, - Math.ceil((self.options.width - width) / 2), + Math.floor((width - centerWidth) / 2), + centerWidth, + Math.ceil((width - centerWidth) / 2), ]; } @@ -1034,17 +1035,22 @@ Ox.Calendar = function(options, self) { if (key == 'date') { } else if (key == 'height') { - that.css({height: self.options.height + 'px'}); + //that.css({height: self.options.height + 'px'}); } else if (key == 'width') { - that.css({width: self.options.width + 'px'}); - self.$zoomInput.options({size: self.options.width}); - getLines(); - renderCalendar(); + //that.css({width: self.options.width + 'px'}); + //self.$zoomInput.options({size: self.options.width}); + //getLines(); } else if (key == 'zoom') { } }; + that.resizeCalendar = function() { + self.$zoomInput.options({size: that.width()}); + getLines(); + renderCalendar(); + }; + return that; }; diff --git a/source/Ox.UI/js/Form/Ox.Checkbox.js b/source/Ox.UI/js/Form/Ox.Checkbox.js index 089ce807..fc64b173 100644 --- a/source/Ox.UI/js/Form/Ox.Checkbox.js +++ b/source/Ox.UI/js/Form/Ox.Checkbox.js @@ -87,6 +87,8 @@ Ox.Checkbox = function(options, self) { self.setOption = function(key, value) { if (key == 'checked') { that.toggleChecked(); + } else if (key == 'title') { + self.$title.options({title: value}); } };