diff options
author | wei <> | 2006-05-27 02:57:23 +0000 |
---|---|---|
committer | wei <> | 2006-05-27 02:57:23 +0000 |
commit | d333551610131ab486ef566f20b9762645ef5ebb (patch) | |
tree | 7e5edd647eecee9d6a4603e526b57393b33bfbdb /framework/Web/Javascripts/datepicker | |
parent | 8aaa310739ed96149251760092f70f78538c31eb (diff) |
Possible fix for #171 (including TColorPicker). Fixed #160.
Diffstat (limited to 'framework/Web/Javascripts/datepicker')
-rw-r--r-- | framework/Web/Javascripts/datepicker/datepicker.js | 29 | ||||
-rw-r--r-- | framework/Web/Javascripts/datepicker/default.css | 25 | ||||
-rwxr-xr-x | framework/Web/Javascripts/datepicker/spacer.gif | bin | 0 -> 43 bytes |
3 files changed, 38 insertions, 16 deletions
diff --git a/framework/Web/Javascripts/datepicker/datepicker.js b/framework/Web/Javascripts/datepicker/datepicker.js index 79763811..d5d9496c 100644 --- a/framework/Web/Javascripts/datepicker/datepicker.js +++ b/framework/Web/Javascripts/datepicker/datepicker.js @@ -81,11 +81,14 @@ Prado.WebUI.TDatePicker.prototype = Object.extend(this,options);
Event.observe(this.trigger, triggerEvent, this.show.bindEvent(this));
- this.create();
+
},
create : function()
{
+ if(typeof(this._calDiv) != "undefined")
+ return;
+
var div;
var table;
var tbody;
@@ -115,9 +118,10 @@ Prado.WebUI.TDatePicker.prototype = // Previous Month Button
td = document.createElement("td");
- var previousMonth = document.createElement("button");
- previousMonth.className = "prevMonthButton";
- previousMonth.appendChild(document.createTextNode("<<"));
+ var previousMonth = document.createElement("input");
+ previousMonth.className = "prevMonthButton button";
+ previousMonth.type = "button"
+ previousMonth.value = "<<";
td.appendChild(previousMonth);
tr.appendChild(td);
@@ -162,9 +166,10 @@ Prado.WebUI.TDatePicker.prototype = td = document.createElement("td");
- td.className = "nextMonthButton";
- var nextMonth = document.createElement("button");
- nextMonth.appendChild(document.createTextNode(">>"));
+ var nextMonth = document.createElement("input");
+ nextMonth.className = "nextMonthButton button";
+ nextMonth.type = "button";
+ nextMonth.value = ">>";
td.appendChild(nextMonth);
tr.appendChild(td);
@@ -178,6 +183,7 @@ Prado.WebUI.TDatePicker.prototype = var text;
table = document.createElement("table");
+ table.align="center";
table.className = "grid";
div.appendChild(table);
@@ -226,11 +232,12 @@ Prado.WebUI.TDatePicker.prototype = div.className = "calendarFooter";
this._calDiv.appendChild(div);
- var todayButton = document.createElement("button");
+ var todayButton = document.createElement("input");
+ todayButton.type="button";
todayButton.className = "todayButton";
var today = this.newDate();
var buttonText = today.SimpleFormat(this.Format,this);
- todayButton.appendChild(document.createTextNode(buttonText));
+ todayButton.value = buttonText;
div.appendChild(todayButton);
/*var clearButton = document.createElement("button");
@@ -243,7 +250,7 @@ Prado.WebUI.TDatePicker.prototype = if(Prado.Browser().ie)
{
this.iePopUp = document.createElement('iframe');
- this.iePopUp.src = "";
+ this.iePopUp.src = Prado.WebUI.TDatePicker.spacer;
this.iePopUp.style.position = "absolute"
this.iePopUp.scrolling="no"
this.iePopUp.frameBorder="0"
@@ -521,6 +528,8 @@ Prado.WebUI.TDatePicker.prototype = show : function()
{
+ this.create();
+
if(!this.showing)
{
var pos = Position.cumulativeOffset(this.control);
diff --git a/framework/Web/Javascripts/datepicker/default.css b/framework/Web/Javascripts/datepicker/default.css index e5d327e1..7e920f1b 100644 --- a/framework/Web/Javascripts/datepicker/default.css +++ b/framework/Web/Javascripts/datepicker/default.css @@ -21,6 +21,7 @@ margin-left: 1px;
}
+
.TDatePickerImageButton:hover
{
border-color: #ddd;
@@ -31,9 +32,9 @@ font-size: 11px;
}
-.TDatePicker .calendarHeader button
+.TDatePicker input.button
{
- font-size: 12px;
+ font-size: 11px;
width: 32px;
}
@@ -41,6 +42,7 @@ {
padding: 4px 0;
border: 1px solid white;
+ text-align: center;
}
.TDatePicker .hover
{
@@ -61,25 +63,36 @@ {
border: 1px solid white;
cursor: default;
- height: 23px;
+ height: 22px;
}
+
.TDatePicker th
{
width: 28px;
}
+
+.TDatePicker .calendarBody
+{
+ text-align: center;
+ width: 210px;
+ margin: 3px 6px;
+}
+
.TDatePicker .grid
{
border-spacing: 0px;
- margin: 3px;
}
+
.TDatePicker .calendarFooter
{
margin: 2px;
border-top: 1px solid #919EA9;
padding-top: 2px;
}
-.TDatePicker .calendarFooter button
+.TDatePicker .todayButton
{
- font-size: 12px;
+ font-size: 11px;
margin: 4px;
+ padding-left: 1em;
+ padding-right: 1em;
}
\ No newline at end of file diff --git a/framework/Web/Javascripts/datepicker/spacer.gif b/framework/Web/Javascripts/datepicker/spacer.gif Binary files differnew file mode 100755 index 00000000..fc256098 --- /dev/null +++ b/framework/Web/Javascripts/datepicker/spacer.gif |