[richfaces-svn-commits] JBoss Rich Faces SVN: r4892 - in trunk: ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Dec 18 07:59:43 EST 2007


Author: pyaschenko
Date: 2007-12-18 07:59:42 -0500 (Tue, 18 Dec 2007)
New Revision: 4892

Modified:
   trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
   trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
   trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
RF-1461

Modified: trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
===================================================================
--- trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp	2007-12-18 12:53:59 UTC (rev 4891)
+++ trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp	2007-12-18 12:59:42 UTC (rev 4892)
@@ -40,7 +40,7 @@
 		        <br />
 		        <calendar:calendar todayControlMode="#{calendarBean.todayControlMode}" datePattern="#{calendarBean.pattern}" showApplyButton="#{calendarBean.showApplyButton}" popup="#{calendarBean.popup}"/>
 		        <calendar:calendar cellWidth="5" cellHeight="5"/>
-		        <calendar:calendar cellWidth="40" cellHeight="40"/>
+		        <calendar:calendar cellWidth="40" cellHeight="40" popup="#{calendarBean.popup}"/>
 				<calendar:calendar 
 					id="calendar"
 					dataModel="#{calendarDataModel}"

Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js	2007-12-18 12:53:59 UTC (rev 4891)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js	2007-12-18 12:59:42 UTC (rev 4892)
@@ -1935,12 +1935,12 @@
 CalendarView.nextMonthControl = CalendarView.getControl(">", CalendarView.toolButtonAttributes, "nextMonth");
 CalendarView.previousMonthControl = CalendarView.getControl("<", CalendarView.toolButtonAttributes, "prevMonth");
 CalendarView.currentMonthControl = function (context) { return Richfaces.Calendar.formatDate(context.calendar.getCurrentDate(), "MMMM, yyyy", context.monthLabels, context.monthLabelsShort);}; 
-CalendarView.todayControl = function (context) { return (context.calendar.todayControlMode!='hidden' ? CalendarView.getControl("Today", CalendarView.toolButtonAttributes, "today") : "");};
+CalendarView.todayControl = function (context) { return (context.calendar.todayControlMode!='hidden' ? CalendarView.getControl(context.controlLabels.today, CalendarView.toolButtonAttributes, "today") : "");};
 CalendarView.selectedDateControl = function (context) { return CalendarView.getSelectedDateControl(context.calendar);};
 CalendarView.timeControl = function (context) { return CalendarView.getTimeControl(context.calendar);};
-CalendarView.closeControl = function (context) { return (context.calendar.params.popup ? CalendarView.getControl("x", CalendarView.toolButtonAttributes, "close", "false") : "");};
-CalendarView.applyControl = function (context) { return (context.calendar.showApplyButton ? CalendarView.getControl("Apply", CalendarView.toolButtonAttributes, "close", "true") : "");};
-CalendarView.cleanControl = function (context) { return (context.calendar.selectedDate ? CalendarView.getControl("Clean", CalendarView.toolButtonAttributes, "resetSelectedDate") : "");};
+CalendarView.closeControl = function (context) { return (context.calendar.params.popup ? CalendarView.getControl(context.controlLabels.close, CalendarView.toolButtonAttributes, "close", "false") : "");};
+CalendarView.applyControl = function (context) { return (context.calendar.showApplyButton ? CalendarView.getControl(context.controlLabels.apply, CalendarView.toolButtonAttributes, "close", "true") : "");};
+CalendarView.cleanControl = function (context) { return (context.calendar.selectedDate ? CalendarView.getControl(context.controlLabels.clean, CalendarView.toolButtonAttributes, "resetSelectedDate") : "");};
 CalendarView.timeEditorFields = function (context) { return context.calendar.timePatternHtml;};
 
 CalendarView.header = [
@@ -2033,7 +2033,7 @@
 					[
 						new E('div',{'class': 'rich-calendar-time-btn', 'style': 'float:right;', 'onmousedown': "Element.addClassName(this, 'rich-calendar-time-btn-press');", 'onmouseout': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onmouseup': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onclick': function(context){return "$('"+context.calendar.id+"').component.hideTimeEditor(true)";}},
 						[
-							new T('Ok')
+							new ET(function (context) { return context.controlLabels.ok; })
 						])
 					])
 					,
@@ -2041,7 +2041,7 @@
 					[
 						new E('div',{'class': 'rich-calendar-time-btn', 'style': 'float:left;', 'onmousedown': "Element.addClassName(this, 'rich-calendar-time-btn-press');", 'onmouseout': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onmouseup': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onclick': function(context){return "$('"+context.calendar.id+"').component.hideTimeEditor(false)";}},
 						[
-							new T('Cancel')
+							new ET(function (context) { return context.controlLabels.cancel; })
 						])
 					])
 				])
@@ -2061,6 +2061,7 @@
 		this.monthLabelsShort=calendar.params.monthLabelsShort;
 		this.weekDayLabels=calendar.params.weekDayLabels;
 		this.weekDayLabelsShort=calendar.params.weekDayLabelsShort;
+		this.controlLabels=calendar.params.labels;
     },
 
 	nextYearControl: CalendarView.nextYearControl,

Modified: trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx	2007-12-18 12:53:59 UTC (rev 4891)
+++ trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx	2007-12-18 12:59:42 UTC (rev 4892)
@@ -188,16 +188,15 @@
 			showWeeksBar:#{component.attributes['showWeeksBar']},
 			showWeekDaysBar:#{component.attributes['showWeekDaysBar']},
 			showApplyButton:#{component.attributes['showApplyButton']}
+
+			<f:call name="writeLabels" />
 			
-			
-			
 			<f:call name="writeClass"/>
 			<f:call name="writeDayCellClass"/>
 			<f:call name="writeDayStyleClass"/>
 			<f:call name="writeIsDayEnabled"/>
 			<f:call name="writeSymbols" />
-			
-			
+
 			<f:call name="writeEventHandlerFunction"><f:parameter value="ondateselected" /></f:call>
 			<f:call name="writeEventHandlerFunction"><f:parameter value="ondateselect" /></f:call>
 			<f:call name="writeEventHandlerFunction"><f:parameter value="ondatemouseover" /></f:call>
@@ -228,7 +227,6 @@
 				writePreloadBody(context, component);
 			/*]]>*/</jsp:scriptlet>
 			);
-			<f:call name="writeLabels" />
 	</script>
 	</div>
 </f:root>




More information about the richfaces-svn-commits mailing list