r1934 - trunk/ui

r1934 - trunk/ui


Author: pazu2k@gmail.com
Date: Sat Jan 31 02:40:55 2009
New Revision: 1934
Modified:
trunk/ui/ui.datepicker.js
Log:
datepicker: #4003 - Inline datepicker and button panel.
Modified: trunk/ui/ui.datepicker.js
==============================================================================
--- trunk/ui/ui.datepicker.js    (original)
+++ trunk/ui/ui.datepicker.js    Sat Jan 31 02:40:55 2009
@@ -1307,7 +1307,7 @@
        var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ?
currentDate : today);
        currentText = (!navigationAsDateFormat ? currentText :
            this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
-        var controls = '<button type="button" class="ui-datepicker-close
ui-state-default ui-priority-primary ui-corner-all"
onclick="jQuery.datepicker._hideDatepicker();">' +
this._get(inst, 'closeText') + '</button>';
+        var controls = (!inst.inline ? '<button type="button"
class="ui-datepicker-close ui-state-default ui-priority-primary
ui-corner-all" onclick="jQuery.datepicker._hideDatepicker();">' +
this._get(inst, 'closeText') + '</button>' : '');
        var buttonPanel = (showButtonPanel) ? '<div
class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ?
controls : '') +
            (this._isInRange(inst, gotoDate) ? '<button type="button"
class="ui-datepicker-current ui-state-default ui-priority-secondary
ui-corner-all" onclick="jQuery.datepicker._gotoToday(\'#' + inst.id
+ '\');"' +
            '>' + currentText + '</button>' : '') + (isRTL ? '' : controls)
+ '</div>' : '';
@@ -1405,8 +1405,7 @@
            }
            html += group;
        }
-        html += (!inst.inline ? buttonPanel : '') +
-            ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
+        html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10)
< 7 && !inst.inline ?
            '<iframe src="javascript:false;" class="ui-datepicker-cover"
frameborder="0"></iframe>' : '');
        inst._keyEvent = false;
        return html;