[jboss-cvs] jboss-seam/src/ui/org/jboss/seam/ui/resource/date ...

Shane Bryzak sbryzak at redhat.com
Tue Feb 20 09:05:43 EST 2007


  User: sbryzak2
  Date: 07/02/20 09:05:43

  Modified:    src/ui/org/jboss/seam/ui/resource/date      cal-next.png
                        cal-prev.png calendar.css calendar.js
  Added:       src/ui/org/jboss/seam/ui/resource/date      bg.gif
  Log:
  JBSEAM-763
  
  Revision  Changes    Path
  1.2       +1 -3      jboss-seam/src/ui/org/jboss/seam/ui/resource/date/cal-next.png
  
  	<<Binary file>>
  
  
  1.2       +1 -2      jboss-seam/src/ui/org/jboss/seam/ui/resource/date/cal-prev.png
  
  	<<Binary file>>
  
  
  1.2       +69 -39    jboss-seam/src/ui/org/jboss/seam/ui/resource/date/calendar.css
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: calendar.css
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/ui/org/jboss/seam/ui/resource/date/calendar.css,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- calendar.css	19 Feb 2007 17:14:22 -0000	1.1
  +++ calendar.css	20 Feb 2007 14:05:43 -0000	1.2
  @@ -1,7 +1,18 @@
  - .seam-date 
  +div.seam-date 
   {
  -  width: 147px;
  -  border: 1px solid #333333;
  +  margin-top: 5px;
  +  border: 1px solid #AAAAAA;
  +  background: #fff url(bg.gif) 0 0 repeat-x;
  +  background-color: #FFFFFF;  
  +  color: #505050;
  +  font-family: Tahoma, Arial, Helvetica, sans-serif;
  +  font-size: 12px;
  +}
  +
  +table.seam-date td {
  +  font-family: Tahoma, Arial, Helvetica, sans-serif;
  +  font-weight: 11px; 
  +  border: 0px;
   }
   
   .seam-date-monthNames
  @@ -11,9 +22,9 @@
     border-right: 3px solid #444444;
     border-bottom: 3px solid #444444;
     background-color: #ffffff; 
  -  font-size: 11px;
  +  font-size: 12px;
     cursor: pointer;	
  -  font-family: arial;
  +  font-family: Tahoma, Arial, Helvetica, sans-serif;
     font-weight: normal;
   }
   
  @@ -26,8 +37,8 @@
   
   a.seam-date-monthNameLink:hover
   {
  -  background-color: #FFCC33;
  -  color: black;
  +  background-color: #CCCCCC;
  +  color: red;  
   }
   
   .seam-date-years
  @@ -39,9 +50,9 @@
     border-right: 3px solid #444444;
     border-bottom: 3px solid #444444;
     background-color: #ffffff; 
  -  font-size: 11px;
  +  font-size: 12px;
     cursor: pointer;	
  -  font-family: arial;
  +  font-family: Tahoma, Arial, Helvetica, sans-serif;
     font-weight: normal;
   }
   
  @@ -54,30 +65,23 @@
   
   a.seam-date-yearLink:hover
   {
  -  background-color: #FFCC33;
  -  color: black;
  +  background-color: #CCCCCC;
  +  color: red;    
   }  
     
  -.seam-date-header
  +tr.seam-date-header
   {
  -  padding: 0px 4px 0px 4px;
  -  background-color: #555555; 
  -  color: white;
  -  font-family: arial;
  -  font-weight: bold;
  -  font-size: 11px;
  +  padding: 2px 0px 2px 0px;
   }
   
  -table.seam-date td {
  -  font-family: arial;
  -  font-weight: 11px; 
  -  border: 0px;
  -}
  -
  -tr.seam-date-header > td
  +td.seam-date-header
   {
  +  padding: 0px 8px 0px 8px;
     text-align: center;
  -  height: 20px;
  +  color: gray;
  +  font-family: Tahoma, Arial, Helvetica, sans-serif;
  +  font-weight: bold;
  +  font-size: 12px;  
   }
   
   td.seam-date-header-prevMonth
  @@ -86,7 +90,8 @@
     background-repeat: no-repeat;
     background-position: center;
     padding: 0px 2px 0px 2px;
  -  width: 16px;
  +  width: 17px;
  +  margin-left: 2px;
   }
   
   td.seam-date-header-nextMonth
  @@ -95,28 +100,30 @@
     background-repeat: no-repeat;
     background-position: center;
     padding: 0px 2px 0px 2px;
  -  width: 16px;
  +  width: 17px;
  +  margin-right: 2px;
   }
   
   tr.seam-date-headerDays
   {
  -  background-color: #555555; 
     color: white;
     font-weight: normal;
   }
   
   tr.seam-date-headerDays > td
   {
  +  background-color: #CCCCCC;
  +  border: 1px solid #AAAAAA;
  +  color: white;
     text-align: center;
  -  border-top: 1px solid #ffffff;
  -/* border-bottom: 1px solid #f1b506;*/
  +  width: 26px;   
   }
   
   tr.seam-date-footer
   {
  -  background-color: #555555; 
  -  color: white;
  -  font-weight: normal;
  +  background-color: white; 
  +  color: #505050;
  +  font-weight: bold;
   }
   
   tr.seam-date-footer > td
  @@ -130,6 +137,7 @@
     color: black;
     font-weight: normal;
     cursor: pointer;
  +  border: 1px solid #ece9d8;
   }
   
   td.seam-date-eventDay
  @@ -138,6 +146,7 @@
     color: blue;
     font-weight: bold;
     cursor: pointer;
  +  border: 1px solid #ece9d8;
   }
   
   td.seam-date-outMonth
  @@ -146,21 +155,32 @@
     color: #999999;
     font-weight: normal;
     cursor: pointer;
  +  border: 1px solid #ece9d8;
   }
   
   td.seam-date-highlightDay
   {
  -  background-color: #ffcc33; 
  +  background-color: #CCCCCC;        
  +  border: 1px solid #AAAAAA; 
     color: black;
     font-weight: normal;
   }
   
   td.seam-date-today
   {
  -  background-color: #fff6ac; 
     color: black;
     font-weight: bold;
     cursor: pointer;
  +  background-color: #dddddd;
  +  border: 1px solid #cccccc;
  +}
  +
  +td.seam-date-selected
  +{
  +  background-color: #CCCCCC;        
  +  border: 1px solid #AAAAAA; 
  +  color: black;
  +  font-weight: normal;
   }
   
   td.seam-date-dayOff-inMonth
  @@ -169,6 +189,7 @@
     color: black;
     font-weight: normal;
     cursor: pointer;
  +  border: 1px solid #ece9d8;
   }
   
   td.seam-date-dayOff-outMonth
  @@ -177,4 +198,13 @@
     color: #999999;
     font-weight: normal;
     cursor: pointer;
  +  border: 1px solid #ece9d8;
  +}
  +
  +td.seam-date-hover 
  +{
  +  background-color: #CCCCCC;
  +  border: 1px solid #AAAAAA;
  +  cursor: pointer;
  +  color: red;
   }
  \ No newline at end of file
  
  
  
  1.2       +34 -29    jboss-seam/src/ui/org/jboss/seam/ui/resource/date/calendar.js
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: calendar.js
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/ui/org/jboss/seam/ui/resource/date/calendar.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- calendar.js	19 Feb 2007 17:14:22 -0000	1.1
  +++ calendar.js	20 Feb 2007 14:05:43 -0000	1.2
  @@ -133,8 +133,8 @@
     this.monthsLong = CAL_MONTHS_LONG.split(',');
   
     this.displayFormat = CAL_DATE_FORMAT.toLowerCase();
  -  this.entryFormats = new Array();
  -  this.entrySeparators = new Array();    
  +  this.entryFormats = [CAL_DATE_FORMAT.toLowerCase()];
  +  this.entrySeparators = [' ', '/'];
        
     __CalendarFactory.prototype.setDisplayFormat = function(displayFormat) { this.displayFormat = displayFormat.toLowerCase(); };
     __CalendarFactory.prototype.setEntryFormats = function(entryFormats) { this.entryFormats = entryFormats.split(','); };
  @@ -222,21 +222,6 @@
       return new Date(dateElements[0], (dateElements[1] * 1) - 1, dateElements[2]);       
     };
   
  -  __CalendarFactory.prototype.getJulianDate = function (dateString) {
  -  	var julianDate = 0;
  -  	if (!dateString) return 0;
  -
  -    var date = this.validateDate(dateString);
  -
  -    if (date) {
  -    	julianDate = date.year * 1000;
  -    	for (var monthIdx = 0; monthIdx < date.month - 1; monthIdx ++)
  -    	  julianDate += this.monthDays(date.year, date.month - 1);
  -    	julianDate += date.day;
  -    }
  -    return julianDate;
  -  };
  -
     __CalendarFactory.prototype.setViewDate = function(valueCtlName)
     {
     	var viewCtl = getObject("__" + valueCtlName + "_view");
  @@ -280,6 +265,13 @@
       return value.split(" ");
     };
   
  +  __CalendarFactory.prototype.parseDateValue = function(value)
  +  {
  +    var validatedDate = this.validateDate(value);
  +    if (validatedDate)
  +      return new Date(validatedDate.year, validatedDate.month - 1, validatedDate.day);
  +  }
  +
     __CalendarFactory.prototype.validateDate = function(value)
     {
       var entryElements = getEntryElements(value, this.entrySeparators);
  @@ -409,7 +401,7 @@
     this.staticCalendar = false;  
   
     this.dayNames = __calendarFactory.daysLong;
  -  this.dayHeaders = __calendarFactory.daysShort;
  +  this.dayHeaders = __calendarFactory.daysMedium;
     this.monthNames = __calendarFactory.monthsLong;
     this.checkEventDate = null;
     
  @@ -474,7 +466,7 @@
     {
       var html = "";
   
  -    html += "<table width=\"100%\" cellpadding=0 cellspacing=0 border=0 style=\"" + this.styleClass + "\">";
  +    html += "<table style=\"" + this.styleClass + "\">";
       html += this.buildDayHeaders();
       html += this.buildDays();
       html += this.buildFooter();
  @@ -583,47 +575,60 @@
       var dayOff = (this.daysOff) && (this.daysOff.contains((dow * 1) + 1)); 
       var thisDate = Math.floor(dayDate);
   
  +    var selectedDate = __calendarFactory.parseDateValue(getObject(this.name).value);
  +
       if ((dayIdx % DAYS_IN_WEEK) == 0)
         html += "<tr>";
   
       html += "<td align=\"center\"";
   
  +    var suffix = "";
  +    
       if (eventDate)
       {
         if (dayOff)
  -        html += " class=\"" + this.styleClass + "-eventDay-off\" "; 
  +        suffix = "-eventDay-off";
         else
  -        html += " class=\"" + this.styleClass + "-eventDay\" "; 
  +        suffix = "-eventDay";
       }
  -    else if (thisDate == Math.floor(this.today))
  +    else if (selectedDate && thisDate == Math.floor(selectedDate))
       {
  -      html += " class=\"" + this.styleClass + "-today\" ";
  +      suffix = "-selected"; 
       }
  +//    else if (thisDate == Math.floor(this.today))
  +//    {
  +//      suffix = "-today";
  +//    }
       else if ((thisDate >= this.highlightStart) && (thisDate <= this.highlightEnd))
       {
  -      html += " class=\"" + this.styleClass + "-highlightDay\" ";
  +      suffix = "-highlightDay";
         inRange = true;
       }
       else if (dayOff)
       {
         if (inMonth)
  -        html += " class=\"" + this.styleClass + "-dayOff-inMonth\" ";
  +        suffix = "-dayOff-inMonth";
         else
  -        html += " class=\"" + this.styleClass + "-dayOff-outMonth\" ";
  +        suffix = "-dayOff-outMonth";
       }
       else if (!inMonth)
  -      html += " class=\"" + this.styleClass + "-outMonth\" ";
  +      suffix = "-outMonth";
       else
       {
  -      html += " class=\"" + this.styleClass + "-inMonth\" ";
  +      suffix = "-inMonth";
       }
   
  +    html += " class=\"" + this.styleClass + suffix + "\" ";
  +
       if (!inRange && (this.onClickDate) && (!this.checkEventDate || eventDate))
       {
       	html += " onclick=\"" + this.onClickDate + "('" + this.name + "'," + dayDate.getFullYear() + "," + dayDate.getMonth() + "," + day + ")";
       	if (this.isPopup)
       	  html += ";__calendarFactory.depopupCalendar()";
       	html += "\"";
  +    	
  +    	html += " onmouseover='this.className=\"" + this.styleClass + "-hover\"'";
  +    	html += " onmouseout='this.className=\"" + this.styleClass + suffix + "\"'";
       }
   
       html += " >" + day + "</td>";
  
  
  
  1.1      date: 2007/02/20 14:05:43;  author: sbryzak2;  state: Exp;jboss-seam/src/ui/org/jboss/seam/ui/resource/date/bg.gif
  
  	<<Binary file>>
  
  



More information about the jboss-cvs-commits mailing list