You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2005/12/26 23:09:30 UTC

svn commit: r359107 - in /myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource: DB/theme.css popcalendar.js

Author: mmarinschek
Date: Mon Dec 26 14:09:21 2005
New Revision: 359107

URL: http://svn.apache.org/viewcvs?rev=359107&view=rev
Log:
fixed last problems with calendar and IE

Modified:
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/DB/theme.css
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/DB/theme.css
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/DB/theme.css?rev=359107&r1=359106&r2=359107&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/DB/theme.css (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/DB/theme.css Mon Dec 26 14:09:21 2005
@@ -40,11 +40,22 @@
 	cursor: pointer;
 }
 
+/* Normal appearance of images in calendar title. */
+/* Note: The right, left and down icons are images, jscalendar-DBich must be edited if you need to change them. */
+.jscalendar-DB-title-img-normal-style {
+	cursor: pointer;
+}
+
 /* Moused-over (selected) appearance of controls in calendar title. */
 .jscalendar-DB-title-control-select-style {
 	border-style: solid;
 	border-width: 1;
 	border-color: #88AAFF;
+	cursor: pointer;
+}
+
+/* Moused-over (selected) appearance of controls in calendar title. */
+.jscalendar-DB-title-img-select-style {
 	cursor: pointer;
 }
 

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js?rev=359107&r1=359106&r2=359107&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js Mon Dec 26 14:09:21 2005
@@ -127,7 +127,7 @@
     {
       var popup  = overDiv;
 
-      popup.style.zIndex	= 99;
+      popup.style.zIndex	= 98;
 
       iframe.style.zIndex = popup.style.zIndex - 1;
       iframe.style.width 	= popup.offsetWidth;
@@ -160,11 +160,6 @@
         srcImg.setAttribute("src",this.initData.imgDir + destImg);
 }
 
-org_apache_myfaces_PopupCalendar.prototype._getCrossObj=function(elem_id){
-    return document.getElementById(elem_id).style;
-    //old way of doing this: (this.dom) ? document.getElementById("calendar").style : this.ie ? document.all.calendar : document.calendar;
-}
-
 org_apache_myfaces_PopupCalendar.prototype._keypresshandler=function(){
     try
     {
@@ -341,13 +336,13 @@
 
         Event.observe(this.monthSpan,"mouseover",function(event){
             this._swapImage(this.changeMonthImg,"drop2.gif");
-            Event.element(event).className=this.initData.themePrefix+"-title-control-select-style";
+            this.monthSpan.className=this.initData.themePrefix+"-title-control-select-style";
             window.status=this.selectMonthMessage;
         }.bindAsEventListener(this),false);
 
         Event.observe(this.monthSpan,"mouseout",function(event){
             this._swapImage(this.changeMonthImg,"drop1.gif");
-            Event.element(event).className=this.initData.themePrefix+"-title-control-normal-style";
+            this.monthSpan.className=this.initData.themePrefix+"-title-control-normal-style";
             window.status="";
         }.bindAsEventListener(this),false);
 
@@ -363,13 +358,13 @@
 
         Event.observe(this.yearSpan,"mouseover",function(event){
             this._swapImage(this.changeYearImg,"drop2.gif");
-            Event.element(event).className=this.initData.themePrefix+"-title-control-select-style";
+            this.yearSpan.className=this.initData.themePrefix+"-title-control-select-style";
             window.status=this.selectYearMessage;
         }.bindAsEventListener(this),false);
 
         Event.observe(this.yearSpan,"mouseout",function(event){
             this._swapImage(this.changeYearImg,"drop1.gif");
-            Event.element(event).className=this.initData.themePrefix+"-title-control-normal-style";
+            this.yearSpan.className=this.initData.themePrefix+"-title-control-normal-style";
             window.status="";
         }.bindAsEventListener(this),false);
 
@@ -390,10 +385,22 @@
     imgLeft.setAttribute("style","width:10px;height:11px;border:0px;")
 
     var spanLeft = document.createElement("span");
+
+    this._createControl(direction,spanLeft,imgLeft);
+
+    this._appendNbsp(spanLeft);
+    spanLeft.appendChild(imgLeft);
+    this._appendNbsp(spanLeft);
+    this.captionSpan.appendChild(spanLeft);
+    this._appendNbsp(spanLeft);
+ }
+
+org_apache_myfaces_PopupCalendar.prototype._createControl=function(direction,spanLeft,imgLeft)
+{
     spanLeft.className=this.initData.themePrefix+"-title-control-normal-style";
     Event.observe(spanLeft,"mouseover",function(event){
         this._swapImage(imgLeft,direction+"2.gif");
-        Event.element(event).className=this.initData.themePrefix+"-title-control-select-style";
+        spanLeft.className=this.initData.themePrefix+"-title-control-select-style";
         if(direction=="left"){
             window.status=this.scrollLeftMessage;
         } else {
@@ -410,7 +417,7 @@
     Event.observe(spanLeft,"mouseout",function(event){
         clearInterval(this.intervalID1);
         this._swapImage(imgLeft,direction+"1.gif");
-        Event.element(event).className=""+this.initData.themePrefix+"-title-control-normal-style";
+        spanLeft.className=""+this.initData.themePrefix+"-title-control-normal-style";
         window.status="";
     }.bindAsEventListener(this),false);
     Event.observe(spanLeft,"mousedown",function(){
@@ -430,13 +437,8 @@
         clearTimeout(this.timeoutID1);
         clearInterval(this.intervalID1);
     }.bind(this),false);
+}
 
-    this._appendNbsp(spanLeft);
-    spanLeft.appendChild(imgLeft);
-    this._appendNbsp(spanLeft);
-    this.captionSpan.appendChild(spanLeft);
-    this._appendNbsp(spanLeft);
- }
 org_apache_myfaces_PopupCalendar.prototype._appendNbsp=function(element){
     if(element)
         element.appendChild(document.createTextNode(String.fromCharCode(160)));