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/18 21:13:17 UTC
svn commit: r357499 - in
/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar:
HtmlCalendarRenderer.java HtmlInputCalendar.java resource/date.js
resource/popcalendar.js
Author: mmarinschek
Date: Sun Dec 18 12:13:06 2005
New Revision: 357499
URL: http://svn.apache.org/viewcvs?rev=357499&view=rev
Log:
proper namespaces of dateformatsymbols
Modified:
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/date.js
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js
Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java?rev=357499&r1=357498&r2=357499&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java Sun Dec 18 12:13:06 2005
@@ -353,7 +353,7 @@
setStringVariable(script, "jscalendarSelectDateMessage",inputCalendar.getPopupSelectDateMessage());
}
- setVariable(script,"jscalendarDateFormatSymbols","new DateFormatSymbols()");
+ setVariable(script,"jscalendarDateFormatSymbols","new org_apache_myfaces_DateFormatSymbols()");
defineStringArray(script,"jscalendarDateFormatSymbols.weekdays",
mapWeekdaysStartingWithSunday(symbols));
Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java?rev=357499&r1=357498&r2=357499&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java Sun Dec 18 12:13:06 2005
@@ -153,7 +153,7 @@
ValueBinding vb = getValueBinding("popupButtonString");
return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
}
-
+
public void setPopupButtonStyle(String popupButtonStyle)
{
_popupButtonStyle = popupButtonStyle;
Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/date.js
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/date.js?rev=357499&r1=357498&r2=357499&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/date.js (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/date.js Sun Dec 18 12:13:06 2005
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-DateFormatSymbols = function()
+org_apache_myfaces_DateFormatSymbols = function()
{
this.eras = new Array('BC', 'AD');
this.months = new Array('January', 'February', 'March', 'April',
@@ -34,7 +34,7 @@
this.twoDigitYearStart = threshold;
}
-SimpleDateFormatParserContext = function()
+org_apache_myfaces_SimpleDateFormatParserContext = function()
{
this.newIndex=0;
this.retValue=0;
@@ -50,12 +50,13 @@
this.dateStr="";
}
-SimpleDateFormat = function(pattern, dateFormatSymbols)
+org_apache_myfaces_SimpleDateFormat = function(pattern, dateFormatSymbols)
{
this.pattern = pattern;
- this.dateFormatSymbols = dateFormatSymbols ? dateFormatSymbols : new DateFormatSymbols();
+ this.dateFormatSymbols = dateFormatSymbols ? dateFormatSymbols :
+ new org_apache_myfaces_DateFormatSymbols();
}
-SimpleDateFormat.prototype._handle = function(dateStr, date, parse)
+org_apache_myfaces_SimpleDateFormat.prototype._handle = function(dateStr, date, parse)
{
var patternIndex = 0;
var dateIndex = 0;
@@ -65,7 +66,7 @@
var nextChar=0;
var patternSub = null;
- var context = new SimpleDateFormatParserContext();
+ var context = new org_apache_myfaces_SimpleDateFormatParserContext();
if(date != null)
{
@@ -157,7 +158,7 @@
return context;
};
-SimpleDateFormat.prototype.parse = function(dateStr)
+org_apache_myfaces_SimpleDateFormat.prototype.parse = function(dateStr)
{
if(!dateStr || dateStr.length==0)
return null;
@@ -171,19 +172,19 @@
return this._createDateFromContext(context);
};
-SimpleDateFormat.prototype._createDateFromContext=function(context)
+org_apache_myfaces_SimpleDateFormat.prototype._createDateFromContext=function(context)
{
return new Date(context.year, context.month,
context.day,context.hour,context.min,context.sec);
};
-SimpleDateFormat.prototype.format = function(date)
+org_apache_myfaces_SimpleDateFormat.prototype.format = function(date)
{
var context = this._handle(null, date, false);
return context.dateStr;
};
-SimpleDateFormat.prototype._parseString = function(context, dateStr, dateIndex, strings)
+org_apache_myfaces_SimpleDateFormat.prototype._parseString = function(context, dateStr, dateIndex, strings)
{
var fragment = dateStr.substr(dateIndex);
var index = this._prefixOf(strings, fragment);
@@ -198,7 +199,7 @@
return context;
};
-SimpleDateFormat.prototype._parseNum = function(context, dateStr, posCount, dateIndex)
+org_apache_myfaces_SimpleDateFormat.prototype._parseNum = function(context, dateStr, posCount, dateIndex)
{
for(var i=Math.min(posCount,dateStr.length-dateIndex);i>0;i--)
{
@@ -218,7 +219,7 @@
return context;
};
-SimpleDateFormat.prototype._handlePatternSub = function(context, patternSub, dateStr, dateIndex, parse)
+org_apache_myfaces_SimpleDateFormat.prototype._handlePatternSub = function(context, patternSub, dateStr, dateIndex, parse)
{
if(patternSub==null || patternSub.length==0)
return;
@@ -403,7 +404,7 @@
}
};
-SimpleDateFormat.prototype._formatNum = function (context, num, length, ensureLength)
+org_apache_myfaces_SimpleDateFormat.prototype._formatNum = function (context, num, length, ensureLength)
{
var str = num+"";
@@ -420,7 +421,7 @@
};
// perhaps add to Array.prototype
-SimpleDateFormat.prototype._indexOf = function (array, value)
+org_apache_myfaces_SimpleDateFormat.prototype._indexOf = function (array, value)
{
for (var i = 0; i < array.length; ++i) {
if (array[i] == value) {
@@ -430,7 +431,7 @@
return -1;
};
-SimpleDateFormat.prototype._prefixOf = function (array, value)
+org_apache_myfaces_SimpleDateFormat.prototype._prefixOf = function (array, value)
{
for (var i = 0; i < array.length; ++i) {
if (value.indexOf(array[i]) == 0) {
@@ -440,7 +441,7 @@
return -1;
};
-SimpleDateFormat.prototype._parseInt = function(value)
+org_apache_myfaces_SimpleDateFormat.prototype._parseInt = function(value)
{
var sum = 0;
@@ -457,7 +458,7 @@
return sum;
};
-SimpleDateFormat.prototype._fullYearFromDate = function(year)
+org_apache_myfaces_SimpleDateFormat.prototype._fullYearFromDate = function(year)
{
var yearStr = year+"";
@@ -469,7 +470,7 @@
return year;
};
-SimpleDateFormat.prototype._adjustTwoDigitYear = function(context)
+org_apache_myfaces_SimpleDateFormat.prototype._adjustTwoDigitYear = function(context)
{
if(context.ambigousYear)
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=357499&r1=357498&r2=357499&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 Sun Dec 18 12:13:06 2005
@@ -50,7 +50,7 @@
objTop += objParent.offsetTop;
objParent = objParent.offsetParent;
}
-
+
objParent = obj.offsetParent;
*/
@@ -155,7 +155,7 @@
}
function jscalendarTodayIsDate(){
- var format = new SimpleDateFormat(jscalendarTodayFormat,jscalendarDateFormatSymbols);
+ var format = new org_apache_myfaces_SimpleDateFormat(jscalendarTodayFormat,jscalendarDateFormatSymbols);
return format.format(jscalendarToday);
}
@@ -173,7 +173,7 @@
}
function jscalendarConstructDate(d,m,y){
- var format = new SimpleDateFormat(jscalendarDateFormat,jscalendarDateFormatSymbols);
+ var format = new org_apache_myfaces_SimpleDateFormat(jscalendarDateFormat,jscalendarDateFormatSymbols);
return format.format(new Date(y,m,d,jscalendarHoursSelected,jscalendarMinutesSelected,jscalendarSecondsSelected));
}
@@ -465,7 +465,7 @@
jscalendarCtlToPlaceValue = ctl2;
jscalendarDateFormat=format;
- var simpleDateFormat = new SimpleDateFormat(jscalendarDateFormat, jscalendarDateFormatSymbols);
+ var simpleDateFormat = new org_apache_myfaces_SimpleDateFormat(jscalendarDateFormat, jscalendarDateFormatSymbols);
var dateSelected = simpleDateFormat.parse(ctl2.value);
if(dateSelected)
@@ -535,10 +535,10 @@
} catch (ex) {
// ignore
}
-
+
var leftScrollOffset = 0;
var topScrollOffset = 0;
-
+
aTag = ctl;
// Added try-catch (MYFACES-870)
try {
@@ -549,8 +549,8 @@
} while(aTag.tagName!="BODY");
} catch (ex) {
// ignore
- }
-
+ }
+
var bodyRect = getVisibleBodyRectangle();
var cal = document.getElementById("calendar");
var top = ctl.offsetTop + toppos - topScrollOffset + ctl.offsetHeight + 2;
@@ -587,39 +587,39 @@
function getVisibleBodyRectangle()
{
var visibleRect = new Rectangle();
-
+
if (window.pageYOffset != undefined)
{
//Most non IE
visibleRect.top = window.pageYOffset;
visibleRect.left = window.pageXOffset;
- }
+ }
else if(document.body && document.body.scrollTop )
{
//IE 6 strict mode
visibleRect.top = document.body.scrollTop;
visibleRect.left = document.body.scrollLeft;
- }
- else if(document.documentElement && document.documentElement.scrollTop )
+ }
+ else if(document.documentElement && document.documentElement.scrollTop )
{
//Older IE
visibleRect.top = document.documentElement.scrollTop;
visibleRect.left = document.documentElement.scrollLeft;
}
-
- if( window.innerWidth != undefined )
+
+ if( window.innerWidth != undefined )
{
//Most non-IE
visibleRect.right = visibleRect.left + window.innerWidth;
visibleRect.bottom = visibleRect.top + window.innerHeight;
- }
- else if( document.documentElement && document.documentElement.clientHeight )
+ }
+ else if( document.documentElement && document.documentElement.clientHeight )
{
//IE 6 strict mode
visibleRect.right = visibleRect.left + document.documentElement.clientWidth;
visibleRect.bottom = visibleRect.top + document.documentElement.clientHeight;
- }
- else if( document.body && document.body.clientHeight )
+ }
+ else if( document.body && document.body.clientHeight )
{
//IE 4 compatible
visibleRect.right = visibleRect.left + document.body.clientWidth;
@@ -658,14 +658,14 @@
else
{
var jscalendarOnloadBackup = window.onload;
-
+
function jscalendarOnload()
{
if(jscalendarOnloadBackup!=null)
jscalendarOnloadBackup();
jscalendarInit();
}
-
+
window.onload=jscalendarOnload;
}
}