JBoss Rich Faces SVN: r2096 - trunk/ui/calendar/design/funcspec.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-08-07 09:21:20 -0400 (Tue, 07 Aug 2007)
New Revision: 2096
Modified:
trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
Log:
Modified: trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
===================================================================
(Binary files differ)
18 years, 9 months
JBoss Rich Faces SVN: r2095 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-07 08:19:56 -0400 (Tue, 07 Aug 2007)
New Revision: 2095
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
Log:
small fix
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2007-08-07 12:18:59 UTC (rev 2094)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2007-08-07 12:19:56 UTC (rev 2095)
@@ -173,7 +173,7 @@
background-color : #e4f5e2; /*unknown parameter - need to add
}
*/
- <u:selector name=".calendar_boundary_dates table tr td">
+ <u:selector name=".calendar_boundary_dates">
<u:style name="color" value="#a0a0a0"/> /*unknown parameter - need to add*/
</u:selector>
18 years, 9 months
JBoss Rich Faces SVN: r2094 - in trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html: scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-07 08:18:59 -0400 (Tue, 07 Aug 2007)
New Revision: 2094
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
boundaryDatesMode parameter added
styles fixes
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2007-08-07 11:21:30 UTC (rev 2093)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2007-08-07 12:18:59 UTC (rev 2094)
@@ -173,6 +173,10 @@
background-color : #e4f5e2; /*unknown parameter - need to add
}
*/
+ <u:selector name=".calendar_boundary_dates table tr td">
+ <u:style name="color" value="#a0a0a0"/> /*unknown parameter - need to add*/
+ </u:selector>
+
<u:selector name=".calendar_current">
<u:style name="background-color" value="#ff7800"/> /*unknown parameter - need to add*/
<u:style name="color" value="#ffebda"/> /*unknown parameter - need to add*/
@@ -185,6 +189,10 @@
<u:style name="font-weight" skin="headerWeightFont"/>
</u:selector>
+ <u:selector name=".calendar_hover">
+ <u:style name="background-color" value="#f3f3f3"/> /*unknown parameter - need to add*/
+ </u:selector>
+
<u:selector name=".calendar_toolfooter">
<u:style name="border-top-color" skin="panelBorderColor"/>
<u:style name="border-right-color" skin="panelBorderColor"/>
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-08-07 11:21:30 UTC (rev 2093)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-08-07 12:18:59 UTC (rev 2094)
@@ -363,7 +363,12 @@
// id+PopupButton, id+InputDate,
// inputType - [readonly-default, hidden, editable] - this parameter used only on server side
+ // boundaryDatesMode - boundary dates onclick action:
+ // "inactive" or undefined - no action (default)
+ // "scroll" - change current month
+ // "select" - change current month and select date
+
this.id = id;
this.params = parameters;
if (!this.params.showWeekDaysBar) this.params.showWeekDaysBar = true;
@@ -380,7 +385,9 @@
this.currentDate = this.params.currentDate ? this.params.currentDate : new Date();
this.currentDate.setDate(1);
this.selectedDate = this.params.selectedDate;
-
+
+ if (typeof this.params.boundaryDatesMode=="string") this.params.boundaryDatesMode = this.params.boundaryDatesMode.toLowerCase();
+
this.todayDate = new Date();
this.selectedDateElement;
@@ -474,7 +481,7 @@
bottomStyleClass = (k==6 ? "bottom_cell " : "");
for (var i=0;i<7;i++)
{
- styleClass = bottomStyleClass+"cell_size calendar_cell calendar_btn";
+ styleClass = bottomStyleClass+"cell_size calendar_cell";
if (i==this.firstWeekendDayNumber || i==this.secondWeekendDayNumber) styleClass+=" calendar_holly";
if (i==6) styleClass+=" right_cell";
@@ -680,10 +687,18 @@
this.renderFooter();
// popup mode
- if (this.params.popup) this.doCollapse();
+ this.doCollapse();
} else {
- if (daydata._month==-1) this.prevMonth(); else this.nextMonth();
+ if (this.params.boundaryDatesMode == "scroll")
+ if (daydata._month==-1) this.prevMonth(); else this.nextMonth();
+ else if (this.params.boundaryDatesMode == "select")
+ {
+ this.selectDate(new Date(this.currentDate.getFullYear(), this.currentDate.getMonth()+daydata._month, daydata.day), true);
+ $(this.INPUT_DATE_ID).value=this.getSelectedDateString(this.params.datePattern);
+ // popup mode
+ this.doCollapse();
+ }
}
}
},
@@ -693,7 +708,7 @@
if (obj)
{
var daydata = this.days[parseInt(obj.id.substr(this.DATE_ELEMENT_ID.length),10)];
- if (daydata._month==0 && Element.hasClassName(obj,daydata._className)) Element.replaceClassName(obj,daydata._className, daydata._hoverClassName);
+ if (daydata._month==0) Element.addClassName(obj,'calendar_hover');
}
},
@@ -702,7 +717,7 @@
if (obj)
{
var daydata = this.days[parseInt(obj.id.substr(this.DATE_ELEMENT_ID.length),10)];
- if (daydata._month==0 && Element.hasClassName(obj,daydata._hoverClassName)) Element.replaceClassName(obj,daydata._hoverClassName, daydata._className);
+ if (daydata._month==0) Element.removeClassName(obj,'calendar_hover');
}
},
@@ -774,7 +789,7 @@
var dayCounter = previousMonthDays - wd + 1;
// previuos month days
- if (wd>0) while (dayCounter<=previousMonthDays) {this.days.push({day:dayCounter, _isWeekend: this.isWeekend(p), _month:month, _className:"Disableddayclass"}); dayCounter++; p++; }
+ if (wd>0) while (dayCounter<=previousMonthDays) {this.days.push({day:dayCounter, _isWeekend: this.isWeekend(p), _month:month}); dayCounter++; p++; }
dayCounter = 1;
month=0;
@@ -787,10 +802,7 @@
var firstDay = this.daysData.days[idx].day;
while (dayCounter<firstDay)
{
- if (this.isWeekend(p%7))
- this.days.push({day:dayCounter, _isWeekend: true, _month:month, _className:"Weekenddayclass", _hoverClassName:"Hoveredweekclass"});
- else
- this.days.push({day:dayCounter, _isWeekend: false, _month:month, _className:"Commondayclass", _hoverClassName:"Hovereddayclass"});
+ this.days.push({day:dayCounter, _isWeekend:this.isWeekend(p%7), _month:month});
dayCounter++;
p++;
@@ -806,8 +818,6 @@
obj.day = dayCounter;
obj._isWeekend = flag;
obj._month = month;
- if (flag) {obj._className = "Weekenddayclass"; obj._hoverClassName = "Hoveredweekclass";}
- else {obj._className = "Commondayclass"; obj._hoverClassName = "Hovereddayclass";}
this.days.push(obj);
idx++;
dayCounter++;
@@ -817,10 +827,7 @@
while (p<42)
{
if (dayCounter>currentMonthDays) {dayCounter=1; month=1;}
- if (this.isWeekend(p%7))
- this.days.push({day:dayCounter, _isWeekend: true, _month:month, _className:"Weekenddayclass", _hoverClassName:"Hoveredweekclass"});
- else
- this.days.push({day:dayCounter, _isWeekend: false, _month:month, _className:"Commondayclass", _hoverClassName:"Hovereddayclass"});
+ this.days.push({day:dayCounter, _isWeekend: this.isWeekend(p%7), _month:month});
dayCounter++;
p++;
}
@@ -841,6 +848,8 @@
var weekflag=true;
var e;
+
+ var boundaryDatesModeFlag = (this.params.boundaryDatesMode == "scroll" || this.params.boundaryDatesMode == "select");
//var _d=new Date();
@@ -884,7 +893,9 @@
// class styles
e = Element.classNames(element);
- // ?? dataobj._className
+ if (dataobj._month!=0) { e.add('calendar_boundary_dates'); if (boundaryDatesModeFlag) e.add('calendar_btn');}
+ else e.add('calendar_btn');
+
// TODO make some optimization with calendar_current class
if (todayflag && dataobj._month==0 && dataobj.day==todaydate) e.add("calendar_current"); else e.remove("calendar_current");
if (selectedflag && dataobj._month==0 && dataobj.day==selecteddate) {
18 years, 9 months
JBoss Rich Faces SVN: r2093 - trunk/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-08-07 07:21:30 -0400 (Tue, 07 Aug 2007)
New Revision: 2093
Modified:
trunk/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
Add check for null.
Modified: trunk/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-08-07 09:27:31 UTC (rev 2092)
+++ trunk/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-08-07 11:21:30 UTC (rev 2093)
@@ -202,7 +202,10 @@
}
},
updateSize: function() {
- this.defaultRowHeight = Element.getHeight(this.templNormal.getElement().rows[0].cells[0]);
+ var row = this.templNormal.getElement().rows[0];
+ if(row) {
+ this.defaultRowHeight = Element.getHeight(row.cells[0]);
+ }
//if(ClientUILib.isGecko) {
// this.defaultRowHeight -= this.getBorderWidth("tb") + this.getPadding("tb");
//}
18 years, 9 months
JBoss Rich Faces SVN: r2092 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-08-07 05:27:31 -0400 (Tue, 07 Aug 2007)
New Revision: 2092
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/usage.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-524
Language correction in richfaces-demo for aj4 components
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/usage.xhtml 2007-08-07 09:18:49 UTC (rev 2091)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/usage.xhtml 2007-08-07 09:27:31 UTC (rev 2092)
@@ -14,9 +14,9 @@
}
</style>
- <p>a4j:actionparam is a component that combains together the functionality of f:param and ActionListener.
- Additional to the f:param, this component allows to assign the value to the property of the manager bean
- directly using assignTo attribute.
+ <p>a4j:actionparam is a component that combines together the functionality of f:param and ActionListener.
+ Additionally to the f:param, this component allows to assign the value to the property of the manager bean
+ directly using the assignTo attribute.
</p>
<div class="sample-container">
<h:form>
@@ -36,9 +36,9 @@
</div>
<p>
You can use a4j:param not only with ajax components, but with non-ajax command component also.
- In the following example, the used skin of the demo is changed when the full page is refreshed
- with regular non-ajax h:commandLink. Using this feature, you can update model values without
- invoking even single line of java code on the server side.
+ In the following example, the used skin of the demo is changed when the whole page is refreshed
+ with the regular non-ajax h:commandLink. Using this feature you can update model values without
+ invoking even a single line of java code on the server side.
</p>
<div class="sample-container">
<h:form>
@@ -58,14 +58,14 @@
</div>
<p>Attributes 'name' and 'value' are mandatory. You can specify the converter with 'converter'
attribute if you need to convert the value before the model is updates. Note that
- the property is assigned with parameter's value on the UPDATE_MODEL phase. So, if
+ the property is assigned with a parameter value on the UPDATE_MODEL phase. Thus, if
the validation of the form is failed, this phase will be skipped and the property
is not updated.
</p>
- <p>It is possible to use javascript variable of custom function for 'value' attribute. In this
+ <p>It is possible to use javascript variable of custom function for the 'value' attribute. In this
case the 'noEscape' attribute should be set to true. When noEscape="true", the 'value' can contain
any javascript expression or javascript function invocation and the result of them will be send
- to the server as a value of a4j:actionparam. For following example demonstrate how to assign
+ to the server as a value of a4j:actionparam. The following example demonstrates how to assign
the backing bean with browser screen size values.
</p>
<div class="sample-container">
@@ -89,7 +89,7 @@
</div>
</ui:define>
<ui:define name="sources">
- Here is a fragment of page sources for the given example:
+ Here is a part of page sources for the given example:
<iframe src="${facesContext.externalContext.requestContextPath}/richfaces/actionparam/source/usage.html" class="source_frame"/>
</ui:define>
</ui:composition>
18 years, 9 months
JBoss Rich Faces SVN: r2091 - trunk/ui/calendar/design/funcspec.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-08-07 05:18:49 -0400 (Tue, 07 Aug 2007)
New Revision: 2091
Modified:
trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
Log:
Modified: trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
===================================================================
(Binary files differ)
18 years, 9 months
JBoss Rich Faces SVN: r2090 - trunk/ui/scrollable-grid/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-08-07 04:52:03 -0400 (Tue, 07 Aug 2007)
New Revision: 2090
Modified:
trunk/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
Log:
fixed NPE in process updates
Modified: trunk/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
===================================================================
--- trunk/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-08-07 08:23:02 UTC (rev 2089)
+++ trunk/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-08-07 08:52:03 UTC (rev 2090)
@@ -150,7 +150,7 @@
}
super.processUpdates(faces);
- ranges.clear();
+ ranges = null;
}
public void encodeBegin(FacesContext context) throws IOException {
18 years, 9 months
JBoss Rich Faces SVN: r2089 - trunk/ui/scrollable-grid/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-08-07 04:23:02 -0400 (Tue, 07 Aug 2007)
New Revision: 2089
Modified:
trunk/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
trunk/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-itself.jspx
Log:
Add way to reload styles for header cell.
Like:
1. padding
2. height
Modified: trunk/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
===================================================================
--- trunk/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-08-07 00:47:52 UTC (rev 2088)
+++ trunk/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-08-07 08:23:02 UTC (rev 2089)
@@ -12,7 +12,7 @@
component="javax.faces.component.UIComponent"
>
- <td class="dr-sgrid-hc rich-sgrid-header-cell #{component.attributes['headerClass']}" id="#{client_id}:hc_#{cell_index}" columnIndex="#{cell_index}" sortable="#{component.attributes['sortable']}">
+ <td class="dr-sgrid-hc rich-sgrid-header-cell" id="#{client_id}:hc_#{cell_index}" columnIndex="#{cell_index}" sortable="#{component.attributes['sortable']}">
<vcp:body/>
@@ -21,7 +21,7 @@
int offset = ((Integer)variables.getVariable("sepOffset")).intValue() - 3;
</jsp:scriptlet>
- <span column="#{cell_index}" id="#{client_id}:hsep_#{cell_index}" style="left: #{offset}px;" class="dr-sgrid-hsep" />
+ <span column="#{cell_index}" id="#{client_id}:hsep_#{cell_index}" style="left: #{offset}px;" class="dr-sgrid-hsep rich-sgrid-hsep" />
</td>
</f:root>
\ No newline at end of file
Modified: trunk/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-itself.jspx
===================================================================
--- trunk/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-itself.jspx 2007-08-07 00:47:52 UTC (rev 2088)
+++ trunk/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-itself.jspx 2007-08-07 08:23:02 UTC (rev 2089)
@@ -12,7 +12,7 @@
component="javax.faces.component.UIComponent"
>
-<div id="#{client_id}:hcb_#{cell_index}" class="dr-sgrid-hcbody">
+<div id="#{client_id}:hcb_#{cell_index}" class="dr-sgrid-hcbody #{component.attributes['headerClass']}">
<vcp:body/>
<div align="right" id="#{client_id}:hs_#{cell_index}" class="dr-sgrid-sort-icon">
18 years, 9 months
JBoss Rich Faces SVN: r2088 - trunk/framework/impl/src/main/java/org/ajax4jsf/io.
by richfaces-svn-commits@lists.jboss.org
Author: ishabalov
Date: 2007-08-06 20:47:52 -0400 (Mon, 06 Aug 2007)
New Revision: 2088
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/io/CharBuffer.java
Log:
http://jira.jboss.org/jira/browse/RF-549
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/io/CharBuffer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/io/CharBuffer.java 2007-08-06 20:44:27 UTC (rev 2087)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/io/CharBuffer.java 2007-08-07 00:47:52 UTC (rev 2088)
@@ -40,7 +40,7 @@
* Length of char array.
*/
private int cacheSize;
-
+ private static int MIN_CACHE_SIZE = 64;
/**
* number of characters stored in the array.
*/
@@ -51,8 +51,12 @@
* @param cacheSize length of char array
*/
public CharBuffer(int cacheSize) {
- this.cacheSize = cacheSize;
- chars = new char[cacheSize];
+ if (cacheSize<MIN_CACHE_SIZE) {
+ this.cacheSize = MIN_CACHE_SIZE;
+ } else {
+ this.cacheSize = cacheSize;
+ }
+ chars = new char[this.cacheSize];
usedSize = 0;
}
@@ -63,12 +67,16 @@
public CharBuffer(char[] chars) {
this.chars = chars;
usedSize = chars.length;
- cacheSize = usedSize;
+ if (usedSize<MIN_CACHE_SIZE) {
+ this.cacheSize = MIN_CACHE_SIZE;
+ } else {
+ this.cacheSize = usedSize;
+ }
}
/**
* Appends character to array chars if there are unfilled positions in it.
- * Otherwize creates next link in the chain, and appends the character to it.
+ * Otherwise creates next link in the chain, and appends the character to it.
* @param c
* @return instance of CharBuffer to which character was appended.
*/
@@ -89,13 +97,13 @@
/**
* Appends segment of a char array to array if there are unfilled positions in it.
- * Otherwize creates next link in the chain, and appends data to it.
+ * Otherwise creates next link in the chain, and appends data to it.
* @param c
* @return instance of CharBuffer to which char array was appended.
*/
public CharBuffer append(char[] cs, int off, int len) {
if(next != null) {
- return append(cs, off, len);
+ return next.append(cs, off, len);
}
if(len + usedSize <= cacheSize) {
System.arraycopy(cs, off, chars, usedSize, len);
18 years, 9 months