JBoss Rich Faces SVN: r19934 - in trunk/ui/input/ui/src/main/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-11-04 13:45:23 -0400 (Thu, 04 Nov 2010)
New Revision: 19934
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
RF-9615
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2010-11-04 17:20:47 UTC (rev 19933)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2010-11-04 17:45:23 UTC (rev 19934)
@@ -113,7 +113,7 @@
public abstract String getHidePopupOnScroll();
@Attribute(defaultValue = "false")
- public abstract boolean isDisable();
+ public abstract boolean isDisabled();
@Attribute(defaultValue = "false")
public abstract boolean isEnableManualInput();
@@ -140,7 +140,7 @@
public abstract String getHorizontalOffset();
@Attribute(defaultValue = "0")
- public abstract String getVerticalOffsetOffset();
+ public abstract String getVerticalOffset();
@Attribute(defaultValue = "3")
public abstract int getZindex();
@@ -229,7 +229,7 @@
public abstract String getOninputkeypress();
@Attribute(events = @EventName("inputkeyup"))
- public abstract String getOninputkeypup();
+ public abstract String getOninputkeyup();
@Attribute(events = @EventName("inputfocus"))
public abstract String getOninputfocus();
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2010-11-04 17:20:47 UTC (rev 19933)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2010-11-04 17:45:23 UTC (rev 19934)
@@ -205,7 +205,7 @@
}
AbstractCalendar calendar = (AbstractCalendar)component;
- if (calendar.isDisable()){
+ if (calendar.isDisabled()){
return;
}
14 years, 2 months
JBoss Rich Faces SVN: r19933 - in modules/tests/metamer/trunk/application/src/main: resources/org/richfaces/tests/metamer/bean and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-04 13:20:47 -0400 (Thu, 04 Nov 2010)
New Revision: 19933
Added:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/heart.png
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/star.png
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
Log:
https://jira.jboss.org/browse/RF-9178
* added two images usable instead calendar's button
* calendar sample fixed
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2010-11-04 17:18:31 UTC (rev 19932)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2010-11-04 17:20:47 UTC (rev 19933)
@@ -58,10 +58,15 @@
attributes = Attributes.getUIComponentAttributes(UICalendar.class, getClass(), false);
+ attributes.setAttribute("datePattern", "MMM d, yyyy HH:mm");
attributes.setAttribute("popup", true);
attributes.setAttribute("rendered", true);
+ attributes.setAttribute("showApplyButton", true);
+ attributes.setAttribute("showHeader", true);
attributes.setAttribute("showFooter", true);
attributes.setAttribute("showInput", true);
+ attributes.setAttribute("showWeeksBar", true);
+ attributes.setAttribute("showWeekDaysBar", true);
// TODO has to be tested in another way
attributes.remove("converter");
Added: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties 2010-11-04 17:20:47 UTC (rev 19933)
@@ -0,0 +1,35 @@
+attr.boundaryDatesMode.inactive=inactive
+attr.boundaryDatesMode.scroll=scroll
+attr.boundaryDatesMode.select=select
+attr.boundaryDatesMode.null=
+
+attr.buttonIcon.star=/resources/images/star.png
+attr.buttonIcon.heart=/resources/images/heart.png
+attr.buttonIcon.null=
+
+attr.buttonIconDisabled.star=/resources/images/star.png
+attr.buttonIconDisabled.heart=/resources/images/heart.png
+attr.buttonIconDisabled.null=
+
+attr.dayStyleClass.yellowTuesdays=yellowTuesdays
+attr.dayStyleClass.aquaWeekends=aquaWeekends
+attr.dayStyleClass.null=
+
+attr.direction.top-left=top-left
+attr.direction.top-right=top-right
+attr.direction.bottom-left=bottom-left
+attr.direction.bottom-right=bottom-right
+attr.direction.auto=auto
+attr.direction.null=
+
+attr.jointPoint.top-left=top-left
+attr.jointPoint.top-right=top-right
+attr.jointPoint.bottom-left=bottom-left
+attr.jointPoint.bottom-right=bottom-right
+attr.jointPoint.auto=auto
+attr.jointPoint.null=
+
+attr.todayControlMode.scroll=scroll
+attr.todayControlMode.select=select
+attr.todayControlMode.hidden=hidden
+attr.todayControlMode.null=
\ No newline at end of file
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2010-11-04 17:18:31 UTC (rev 19932)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2010-11-04 17:20:47 UTC (rev 19933)
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
- xmlns:rich="http://richfaces.org/rich">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich">
<!--
JBoss, Home of Professional Open Source
@@ -34,8 +33,33 @@
<f:converter converterId="templatesListConverter" />
</f:viewParam>
</f:metadata>
+ <style type="text/css">
+ .yellowDay {
+ background: yellow;
+ }
+
+ .aquaDay {
+ background: aqua;
+ }
+
+ </style>
+
<script type="text/javascript">
- testedComponentId = "#{rich:clientId('calendar')}";
+ function yellowTuesdays(day) {
+ if (day.date.getDay() == 2) {
+ return 'yellowDay';
+ }
+ return false;
+ }
+
+ function aquaWeekends(day) {
+ if (day.isWeekend) {
+ return 'aquaDay';
+ }
+ return false;
+ }
+
+ testedComponentId = "#{rich:clientId('calendar')}";
</script>
</ui:define>
@@ -43,71 +67,73 @@
</ui:define>
<ui:define name="component">
+ <div style="padding: 250px">
+ <!-- add attributes direction and jointPoint ASAP -->
+ <rich:calendar id="calendar"
+ boundaryDatesMode="#{richCalendarBean.attributes['boundaryDatesMode'].value}"
+ buttonClass="#{richCalendarBean.attributes['buttonClass'].value}"
+ buttonIcon="#{richCalendarBean.attributes['buttonIcon'].value}"
+ buttonIconDisabled="#{richCalendarBean.attributes['buttonIconDisabled'].value}"
+ buttonLabel="#{richCalendarBean.attributes['buttonLabel'].value}"
+ converterMessage="#{richCalendarBean.attributes['converterMessage'].value}"
+ currentDate="#{richCalendarBean.attributes['currentDate'].value}"
+ datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+ dayEnabled="#{richCalendarBean.attributes['dayEnabled'].value}"
+ dayStyleClass="#{richCalendarBean.attributes['dayStyleClass'].value}"
+ defaultTime="#{richCalendarBean.attributes['defaultTime'].value}"
- <rich:calendar id="calendar"
- boundaryDatesMode="#{richCalendarBean.attributes['boundaryDatesMode'].value}"
- buttonClass="#{richCalendarBean.attributes['buttonClass'].value}"
- buttonIcon="#{richCalendarBean.attributes['buttonIcon'].value}"
- buttonIconDisabled="#{richCalendarBean.attributes['buttonIconDisabled'].value}"
- buttonLabel="#{richCalendarBean.attributes['buttonLabel'].value}"
- converterMessage="#{richCalendarBean.attributes['converterMessage'].value}"
- currentDate="#{richCalendarBean.attributes['currentDate'].value}"
- datePattern="#{richCalendarBean.attributes['datePattern'].value}"
- dayEnabled="#{richCalendarBean.attributes['dayEnabled'].value}"
- dayStyleClass="#{richCalendarBean.attributes['dayStyleClass'].value}"
- defaultTime="#{richCalendarBean.attributes['defaultTime'].value}"
- direction="#{richCalendarBean.attributes['direction'].value}"
- disable="#{richCalendarBean.attributes['disable'].value}"
- enableManualInput="#{richCalendarBean.attributes['enableManualInput'].value}"
- firstWeekDay="#{richCalendarBean.attributes['firstWeekDay'].value}"
- hidePopupOnScroll="#{richCalendarBean.attributes['hidePopupOnScroll'].value}"
- horizontalOffset="#{richCalendarBean.attributes['horizontalOffset'].value}"
- immediate="#{richCalendarBean.attributes['immediate'].value}"
- inputClass="#{richCalendarBean.attributes['inputClass'].value}"
- inputSize="#{richCalendarBean.attributes['inputSize'].value}"
- inputStyle="#{richCalendarBean.attributes['inputStyle'].value}"
- jointPoint="#{richCalendarBean.attributes['jointPoint'].value}"
- locale="#{richCalendarBean.attributes['locale'].value}"
- minDaysInFirstWeek="#{richCalendarBean.attributes['minDaysInFirstWeek'].value}"
- monthLabels="#{richCalendarBean.attributes['monthLabels'].value}"
- monthLabelsShort="#{richCalendarBean.attributes['monthLabelsShort'].value}"
- oninputblur="#{richCalendarBean.attributes['oninputblur'].value}"
- oninputchange="#{richCalendarBean.attributes['oninputchange'].value}"
- oninputclick="#{richCalendarBean.attributes['oninputclick'].value}"
- oninputdblclick="#{richCalendarBean.attributes['oninputdblclick'].value}"
- oninputfocus="#{richCalendarBean.attributes['oninputfocus'].value}"
- oninputkeydown="#{richCalendarBean.attributes['oninputkeydown'].value}"
- oninputkeypress="#{richCalendarBean.attributes['oninputkeypress'].value}"
- oninputkeyup="#{richCalendarBean.attributes['oninputkeyup'].value}"
- oninputmousedown="#{richCalendarBean.attributes['oninputmousedown'].value}"
- oninputmousemove="#{richCalendarBean.attributes['oninputmousemove'].value}"
- oninputmouseout="#{richCalendarBean.attributes['oninputmouseout'].value}"
- oninputmouseover="#{richCalendarBean.attributes['oninputmouseover'].value}"
- oninputmouseup="#{richCalendarBean.attributes['oninputmouseup'].value}"
- oninputselect="#{richCalendarBean.attributes['oninputselect'].value}"
- popup="#{richCalendarBean.attributes['popup'].value}"
- rendered="#{richCalendarBean.attributes['rendered'].value}"
- required="#{richCalendarBean.attributes['required'].value}"
- requiredMessage="#{richCalendarBean.attributes['requiredMessage'].value}"
- resetTimeOnDateSelect="#{richCalendarBean.attributes['resetTimeOnDateSelect'].value}"
- showApplyButton="#{richCalendarBean.attributes['showApplyButton'].value}"
- showFooter="#{richCalendarBean.attributes['showFooter'].value}"
- showHeader="#{richCalendarBean.attributes['showHeader'].value}"
- showInput="#{richCalendarBean.attributes['showInput'].value}"
- showWeekDaysBar="#{richCalendarBean.attributes['showWeekDaysBar'].value}"
- showWeeksBar="#{richCalendarBean.attributes['showWeeksBar'].value}"
- style="#{richCalendarBean.attributes['style'].value}"
- tabindex="#{richCalendarBean.attributes['tabindex'].value}"
- timeZone="#{richCalendarBean.attributes['timeZone'].value}"
- todayControlMode="#{richCalendarBean.attributes['todayControlMode'].value}"
- validatorMessage="#{richCalendarBean.attributes['validatorMessage'].value}"
- value="#{richCalendarBean.attributes['value'].value}"
- verticalOffset="#{richCalendarBean.attributes['verticalOffset'].value}"
- weekDayLabels="#{richCalendarBean.attributes['weekDayLabels'].value}"
- weekDayLabelsShort="#{richCalendarBean.attributes['weekDayLabelsShort'].value}"
- zindex="#{richCalendarBean.attributes['zindex'].value}"
- />
+ disable="#{richCalendarBean.attributes['disable'].value}"
+ enableManualInput="#{richCalendarBean.attributes['enableManualInput'].value}"
+ firstWeekDay="#{richCalendarBean.attributes['firstWeekDay'].value}"
+ hidePopupOnScroll="#{richCalendarBean.attributes['hidePopupOnScroll'].value}"
+ horizontalOffset="#{richCalendarBean.attributes['horizontalOffset'].value}"
+ immediate="#{richCalendarBean.attributes['immediate'].value}"
+ inputClass="#{richCalendarBean.attributes['inputClass'].value}"
+ inputSize="#{richCalendarBean.attributes['inputSize'].value}"
+ inputStyle="#{richCalendarBean.attributes['inputStyle'].value}"
+ locale="#{richCalendarBean.attributes['locale'].value}"
+ minDaysInFirstWeek="#{richCalendarBean.attributes['minDaysInFirstWeek'].value}"
+ monthLabels="#{richCalendarBean.attributes['monthLabels'].value}"
+ monthLabelsShort="#{richCalendarBean.attributes['monthLabelsShort'].value}"
+ oninputblur="#{richCalendarBean.attributes['oninputblur'].value}"
+ oninputchange="#{richCalendarBean.attributes['oninputchange'].value}"
+ oninputclick="#{richCalendarBean.attributes['oninputclick'].value}"
+ oninputdblclick="#{richCalendarBean.attributes['oninputdblclick'].value}"
+ oninputfocus="#{richCalendarBean.attributes['oninputfocus'].value}"
+ oninputkeydown="#{richCalendarBean.attributes['oninputkeydown'].value}"
+ oninputkeypress="#{richCalendarBean.attributes['oninputkeypress'].value}"
+ oninputkeyup="#{richCalendarBean.attributes['oninputkeyup'].value}"
+ oninputmousedown="#{richCalendarBean.attributes['oninputmousedown'].value}"
+ oninputmousemove="#{richCalendarBean.attributes['oninputmousemove'].value}"
+ oninputmouseout="#{richCalendarBean.attributes['oninputmouseout'].value}"
+ oninputmouseover="#{richCalendarBean.attributes['oninputmouseover'].value}"
+ oninputmouseup="#{richCalendarBean.attributes['oninputmouseup'].value}"
+ oninputselect="#{richCalendarBean.attributes['oninputselect'].value}"
+ popup="#{richCalendarBean.attributes['popup'].value}"
+ rendered="#{richCalendarBean.attributes['rendered'].value}"
+ required="#{richCalendarBean.attributes['required'].value}"
+ requiredMessage="#{richCalendarBean.attributes['requiredMessage'].value}"
+ resetTimeOnDateSelect="#{richCalendarBean.attributes['resetTimeOnDateSelect'].value}"
+ showApplyButton="#{richCalendarBean.attributes['showApplyButton'].value}"
+ showFooter="#{richCalendarBean.attributes['showFooter'].value}"
+ showHeader="#{richCalendarBean.attributes['showHeader'].value}"
+ showInput="#{richCalendarBean.attributes['showInput'].value}"
+ showWeekDaysBar="#{richCalendarBean.attributes['showWeekDaysBar'].value}"
+ showWeeksBar="#{richCalendarBean.attributes['showWeeksBar'].value}"
+ style="#{richCalendarBean.attributes['style'].value}"
+ tabindex="#{richCalendarBean.attributes['tabindex'].value}"
+ timeZone="#{richCalendarBean.attributes['timeZone'].value}"
+ todayControlMode="#{richCalendarBean.attributes['todayControlMode'].value}"
+ validatorMessage="#{richCalendarBean.attributes['validatorMessage'].value}"
+ value="#{richCalendarBean.attributes['value'].value}"
+ verticalOffset="#{richCalendarBean.attributes['verticalOffset'].value}"
+ weekDayLabels="#{richCalendarBean.attributes['weekDayLabels'].value}"
+ weekDayLabelsShort="#{richCalendarBean.attributes['weekDayLabelsShort'].value}"
+ zindex="#{richCalendarBean.attributes['zindex'].value}"
+ />
+ </div>
+
<br/><br/>
</ui:define>
Added: modules/tests/metamer/trunk/application/src/main/webapp/resources/images/heart.png
===================================================================
(Binary files differ)
Property changes on: modules/tests/metamer/trunk/application/src/main/webapp/resources/images/heart.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/tests/metamer/trunk/application/src/main/webapp/resources/images/star.png
===================================================================
(Binary files differ)
Property changes on: modules/tests/metamer/trunk/application/src/main/webapp/resources/images/star.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
14 years, 2 months
JBoss Rich Faces SVN: r19932 - modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-04 13:18:31 -0400 (Thu, 04 Nov 2010)
New Revision: 19932
Modified:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties
Log:
https://jira.jboss.org/browse/RFPL-674
* fixed select options for accordion
Modified: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties 2010-11-04 16:38:37 UTC (rev 19931)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties 2010-11-04 17:18:31 UTC (rev 19932)
@@ -1,7 +1,8 @@
attr.dir.ltr=ltr
attr.dir.rtl=rtl
-attr.dir.none=
+attr.dir.null=
attr.switchType.client=client
attr.switchType.server=server
attr.switchType.ajax=ajax
-attr.switchType.none=
\ No newline at end of file
+attr.switchType.null=
+
14 years, 2 months
JBoss Rich Faces SVN: r19931 - in trunk/ui/input/ui/src/main: java/org/richfaces/renderkit and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-11-04 12:38:37 -0400 (Thu, 04 Nov 2010)
New Revision: 19931
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputBase.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml
trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml
trunk/ui/input/ui/src/main/templates/select.template.xml
Log:
RF-9625, RF-9578, RF-9577
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java 2010-11-04 16:38:37 UTC (rev 19931)
@@ -74,7 +74,6 @@
@Attribute
public abstract String getListClass();
-
@Attribute(defaultValue="click")
public abstract String getEditEvent();
@@ -106,7 +105,7 @@
public abstract String getOninputkeypress();
@Attribute(events=@EventName("inputkeyup"))
- public abstract String getOninputkeypup();
+ public abstract String getOninputkeyup();
@Attribute(events=@EventName("inputfocus"))
public abstract String getOninputfocus();
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java 2010-11-04 16:38:37 UTC (rev 19931)
@@ -93,7 +93,7 @@
public abstract String getOnkeypress();
@Attribute(events=@EventName("keyup"))
- public abstract String getOnkeypup();
+ public abstract String getOnkeyup();
@Attribute(events=@EventName("mousedown"))
public abstract String getOnmousedown();
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java 2010-11-04 16:38:37 UTC (rev 19931)
@@ -23,19 +23,15 @@
import java.io.IOException;
import java.util.Collections;
-import java.util.HashMap;
import java.util.Map;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.javascript.JSFunction;
import org.richfaces.component.InplaceComponent;
import org.richfaces.component.InplaceState;
-import org.richfaces.component.util.HtmlUtil;
/**
* @author Anton Belevich
@@ -159,11 +155,11 @@
String style = getReadyStateCss(inplaceComponent);
switch (inplaceState) {
case edit:
- style = HtmlUtil.concatClasses(style, getEditStateCss(inplaceComponent));
+ style = concatClasses(style, getEditStateCss(inplaceComponent));
break;
case changed:
- style = HtmlUtil.concatClasses(style, getChangedStateCss(inplaceComponent));
+ style = concatClasses(style, getChangedStateCss(inplaceComponent));
break;
case disable:
@@ -183,105 +179,36 @@
public String getEditStyleClass(UIComponent component, InplaceState inplaceState) {
InplaceComponent inplaceComponent = (InplaceComponent)component;
- return (InplaceState.edit != inplaceState) ? HtmlUtil.concatClasses(getEditCss(inplaceComponent), getNoneCss(inplaceComponent)) : getEditCss(inplaceComponent);
+ return (InplaceState.edit != inplaceState) ? concatClasses(getEditCss(inplaceComponent), getNoneCss(inplaceComponent)) : getEditCss(inplaceComponent);
}
-
- public void buildScript(ResponseWriter writer, FacesContext facesContext,
- UIComponent component, Object additional) throws IOException {
- if (!(component instanceof InplaceComponent)) {
- return;
- }
-
- String scriptName = getScriptName();
- JSFunction function = new JSFunction(scriptName);
- String clientId = component.getClientId(facesContext);
- Map<String, Object> options = createInplaceComponentOptions(clientId,
- (InplaceComponent) component);
- addToOptions(facesContext, component, options, additional);
- function.addParameter(clientId);
- function.addParameter(options);
- writer.write(function.toString());
- }
-
- protected String getScriptName() {
- return "new RichFaces.ui.InplaceInput";
- }
-
- private Map<String, Object> createInplaceComponentOptions(String clientId,
- InplaceComponent inplaceComponent) {
- Map<String, Object> options = new HashMap<String, Object>();
-
- if(!"click".equals(inplaceComponent.getEditEvent())){
- options.put(OPTIONS_EDIT_EVENT, inplaceComponent.getEditEvent());
- }
-
- if(!(InplaceState.ready == inplaceComponent.getState())) {
- options.put(OPTIONS_STATE, inplaceComponent.getState());
- }
-
- String css = inplaceComponent.getNoneClass();
- if(css != null && css.trim().length() > 0) {
- options.put(OPTIONS_NONE_CSS, getNoneCss(inplaceComponent));
- }
-
- css = inplaceComponent.getChangedStateClass();
- if(css != null && css.trim().length() > 0) {
- options.put(OPTIONS_CHANGED_CSS, getChangedStateCss(inplaceComponent));
- }
-
- css = inplaceComponent.getEditStateClass();
- if(css != null && css.trim().length() > 0) {
- options.put(OPTIONS_EDIT_CSS, getEditStateCss(inplaceComponent));
- }
-
- String label = inplaceComponent.getDefaultLabel();
- if(label != null && label.trim().length() > 0) {
- options.put(OPTIONS_DEFAULT_LABEL, inplaceComponent.getDefaultLabel());
- }
-
- if(!inplaceComponent.isSaveOnBlur()) {
- options.put(OPTIONS_SAVE_ON_BLUR, inplaceComponent.isSaveOnBlur());
- }
-
- if(inplaceComponent.isShowControls()) {
- options.put(OPTIONS_SHOWCONTROLS, inplaceComponent.isShowControls());
- }
-
- return options;
- }
-
- public void addToOptions(FacesContext facesContext, UIComponent component,
- Map<String, Object> options, Object additional) {
- // override this method if you need additional options
- }
-
+
public String getReadyStateCss(InplaceComponent component) {
String css = component.getReadyStateClass();
- return HtmlUtil.concatClasses("rf-ii-d-s", css);
+ return concatClasses("rf-ii-d-s", css);
}
public String getEditStateCss(InplaceComponent component) {
String css = component.getEditStateClass();
- return HtmlUtil.concatClasses("rf-ii-e-s", css);
+ return concatClasses("rf-ii-e-s", css);
}
public String getChangedStateCss(InplaceComponent component) {
String css = component.getChangedStateClass();
- return HtmlUtil.concatClasses("rf-ii-c-s", css);
+ return concatClasses("rf-ii-c-s", css);
}
public String getDisableStateCss(InplaceComponent component) {
String css = component.getDisableStateClass();
- return HtmlUtil.concatClasses("rf-ii-dis-s", css);
+ return concatClasses("rf-ii-dis-s", css);
}
public String getEditCss(InplaceComponent component) {
String css = component.getEditClass();
- return HtmlUtil.concatClasses("rf-ii-edit", css);
+ return concatClasses("rf-ii-edit", css);
}
public String getNoneCss(InplaceComponent component) {
String css = component.getNoneClass();
- return HtmlUtil.concatClasses("rf-ii-none", css);
+ return concatClasses("rf-ii-none", css);
}
}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java 2010-11-04 16:38:37 UTC (rev 19931)
@@ -24,7 +24,6 @@
import java.io.IOException;
import java.util.List;
-import java.util.Map;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
@@ -32,9 +31,7 @@
import javax.faces.context.FacesContext;
import org.richfaces.component.AbstractInplaceSelect;
-import org.richfaces.component.AbstractSelect;
import org.richfaces.component.InplaceComponent;
-import org.richfaces.component.util.HtmlUtil;
/**
* @author Anton Belevich
@@ -68,12 +65,6 @@
public static final String LIST_CSS = "rf-is-lst-cord";
-
- @Override
- protected String getScriptName() {
- return "new RichFaces.ui.InplaceSelect";
- }
-
public List<ClientSelectItem> getConvertedSelectItems(FacesContext facesContext, UIComponent component) {
return SelectHelper.getConvertedSelectItems(facesContext, component);
}
@@ -95,20 +86,6 @@
return SelectHelper.getSelectInputLabel(facesContext, component);
}
- @Override
- public void addToOptions(FacesContext facesContext, UIComponent component, Map<String, Object> options, Object additional) {
- AbstractSelect abstractSelect = (AbstractSelect)component;
- SelectHelper.addSelectCssToOptions(abstractSelect, options, new String[] {ITEM_CSS, SELECT_ITEM_CSS, LIST_CSS});
- boolean openOnEdit = (Boolean)component.getAttributes().get("openOnEdit");
- boolean saveOnSelect = (Boolean)component.getAttributes().get("saveOnSelect");
- if(openOnEdit) {
- options.put(OPTIONS_OPEN_ON_EDIT, openOnEdit);
- options.put(OPTIONS_SAVE_ON_SELECT, saveOnSelect);
-
- }
- options.put(SelectHelper.OPTIONS_LIST_ITEMS, additional);
- }
-
public String getSelectLabel(FacesContext facesContext, UIComponent component) {
AbstractInplaceSelect select = (AbstractInplaceSelect) component;
String label = getSelectInputLabel(facesContext, select);
@@ -120,31 +97,31 @@
public String getReadyStateCss(InplaceComponent component) {
String css = component.getReadyStateClass();
- return HtmlUtil.concatClasses("rf-is-d-s", css);
+ return concatClasses("rf-is-d-s", css);
}
public String getEditStateCss(InplaceComponent component) {
String css = component.getEditStateClass();
- return HtmlUtil.concatClasses("rf-is-e-s", css);
+ return concatClasses("rf-is-e-s", css);
}
public String getChangedStateCss(InplaceComponent component) {
String css = component.getChangedStateClass();
- return HtmlUtil.concatClasses("rf-is-c-s", css);
+ return concatClasses("rf-is-c-s", css);
}
public String getDisableStateCss(InplaceComponent component) {
String css = component.getDisableStateClass();
- return HtmlUtil.concatClasses("rf-is-dis-s", css);
+ return concatClasses("rf-is-dis-s", css);
}
public String getEditCss(InplaceComponent component) {
String css = component.getEditClass();
- return HtmlUtil.concatClasses("rf-is-edit", css);
+ return concatClasses("rf-is-edit", css);
}
public String getNoneCss(InplaceComponent component) {
String css = component.getNoneClass();
- return HtmlUtil.concatClasses("rf-is-none", css);
+ return concatClasses("rf-is-none", css);
}
}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java 2010-11-04 16:38:37 UTC (rev 19931)
@@ -23,17 +23,13 @@
package org.richfaces.renderkit;
import java.io.IOException;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.javascript.JSFunction;
import org.richfaces.component.AbstractSelect;
/**
@@ -54,11 +50,6 @@
public static final String ITEM_CSS = "rf-sel-opt";
- public static final String SELECT_ITEM_CSS = "rf-sel-sel";
-
- public static final String LIST_CSS = "rf-sel-lst-cord";
-
-
public void renderListHandlers(FacesContext facesContext, UIComponent component) throws IOException {
RenderKitUtils.renderPassThroughAttributesOptimized(facesContext, component, SelectHelper.SELECT_LIST_HANDLER_ATTRIBUTES);
}
@@ -84,46 +75,4 @@
throws IOException {
SelectHelper.encodeItems(facesContext, component, clientSelectItems, HtmlConstants.DIV_ELEM, ITEM_CSS);
}
-
- public void buildScript(ResponseWriter writer, FacesContext facesContext, UIComponent component, List<ClientSelectItem> selectItems) throws IOException {
- if (!(component instanceof AbstractSelect)) {
- return;
- }
-
- AbstractSelect abstractSelect = (AbstractSelect)component;
- String scriptName = getScriptName();
- JSFunction function = new JSFunction(scriptName);
-
- String clientId = abstractSelect.getClientId(facesContext);
- Map<String, Object> options = new HashMap<String, Object>();
- options.put(SelectHelper.OPTIONS_LIST_ITEMS, selectItems);
-
- if(!abstractSelect.isShowButton()) {
- options.put(SelectHelper.OPTIONS_SHOWCONTROL, abstractSelect.isShowButton());
- }
-
- String defaultLabel = abstractSelect.getDefaultLabel();
- if( defaultLabel != null && defaultLabel.trim().length() > 0) {
- options.put(SelectHelper.OPTIONS_INPUT_DEFAULT_LABEL, defaultLabel);
- }
-
- if(abstractSelect.isEnableManualInput()) {
- options.put(SelectHelper.OPTIONS_ENABLE_MANUAL_INPUT, abstractSelect.isEnableManualInput());
- }
-
- if(!abstractSelect.isSelectFirst()) {
- options.put(SelectHelper.OPTIONS_LIST_SELECT_FIRST, abstractSelect.isSelectFirst());
- }
-
- SelectHelper.addSelectCssToOptions(abstractSelect, options, new String[] {ITEM_CSS, SELECT_ITEM_CSS, LIST_CSS});
-
- function.addParameter(clientId);
- function.addParameter(options);
-
- writer.write(function.toString());
- }
-
- protected String getScriptName() {
- return "new RichFaces.ui.Select";
- }
}
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js 2010-11-04 16:38:37 UTC (rev 19931)
@@ -55,10 +55,6 @@
oncancel: function() {
},
- isValueSaved: function() {
- return this.isSaved;
- },
-
save: function() {
var value = this.getValue()
if(value.length > 0) {
@@ -85,6 +81,10 @@
this.__hide();
this.oncancel();
},
+
+ isValueSaved: function() {
+ return this.isSaved;
+ },
isEditState: function() {
return this.editState;
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js 2010-11-04 16:38:37 UTC (rev 19931)
@@ -65,17 +65,8 @@
}
},
- __handleBlur: function() {
- if(!this.isValueSaved() && this.__isSaveOnBlur()) {
- this.save();
- } else {
- this.__hide();
- }
- this.getInput().bind("focus", $.proxy(this.__editHandler, this));
- },
-
__blurHandler: function(e) {
- this.__handleBlur();
+ this.onblur();
},
__changeHandler: function(e) {
@@ -121,8 +112,17 @@
onhide: function() {
this.focusElement.focus();
- }
-
+ },
+
+ onblur: function() {
+ if(!this.isValueSaved() && this.__isSaveOnBlur()) {
+ this.save();
+ } else {
+ this.__hide();
+ }
+ this.getInput().bind("focus", $.proxy(this.__editHandler, this));
+ }
+
}
})());
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2010-11-04 16:38:37 UTC (rev 19931)
@@ -5,7 +5,7 @@
rf.ui.InplaceSelect = function(id, options) {
var mergedOptions = $.extend({}, defaultOptions, options);
$super.constructor.call(this, id, mergedOptions)
-
+ this.getInput().bind("click", $.proxy(this.__clickHandler, this));
mergedOptions['attachTo'] = id;
mergedOptions['scrollContainer'] = $(document.getElementById(id + "Items")).parent()[0];
this.popupList = new rf.ui.PopupList(id+"List", this, mergedOptions);
@@ -81,7 +81,12 @@
this.saveItemValue(value);
}
},
-
+
+ onblur: function() {
+ this.hidePopup();
+ $super.onblur.call(this);
+ },
+
processItem: function(item) {
var label = this.getItemLabel(item);
this.setValue(label);
@@ -160,12 +165,11 @@
$super.__keydownHandler.call(this,e);
},
-
+
__blurHandler: function(e) {
if(this.isEditState()) {
this.timeoutId = window.setTimeout($.proxy(function(){
- this.hidePopup();
- this.__handleBlur();
+ this.onblur();
}, this), 200);
}
},
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputBase.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputBase.js 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputBase.js 2010-11-04 16:38:37 UTC (rev 19931)
@@ -13,7 +13,6 @@
this.input.bind("keydown", $.proxy(this.__keydownHandler, this));
this.input.bind("blur", $.proxy(this.__blurHandler, this));
this.input.bind("change", $.proxy(this.__changeHandler, this));
- this.input.bind("click", $.proxy(this.__clickHandler, this));
this.input.bind("focus", $.proxy(this.__focusHandler, this));
};
@@ -26,6 +25,7 @@
name : "inputBase",
+
getName: function() {
return this.name;
},
@@ -33,14 +33,10 @@
getNamespace: function() {
return this.namespace;
},
-
+
__focusHandler: function(e) {
-
},
- __clickHandler: function(e) {
- },
-
__keydownHandler: function(e) {
},
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2010-11-04 16:38:37 UTC (rev 19931)
@@ -24,8 +24,7 @@
var result = true;
for (var i = 0; i<this.values.length; i++) {
if (this.values[i].indexOf(this.key)!=0) {
- result = false;
- break;
+ result = false; break;
}
}
return result;
@@ -42,10 +41,13 @@
if (this.cache[key]) {
newCache = this.cache[key];
} else {
+
var useCustomFilterFunction = typeof filterFunction == "function";
var itemsCache = this.cache[this.key];
+
for (var i = 0; i<this.values.length; i++) {
var value = this.values[i];
+
if (useCustomFilterFunction && filterFunction(key, value)) {
newCache.push(itemsCache[i]);
} else {
@@ -58,6 +60,7 @@
if ((!this.lastKey || key.indexOf(this.lastKey)!=0) && newCache.length > 0) {
this.cache[key] = newCache;
+
if (newCache.length==1) {
this.lastKey = key;
}
@@ -94,16 +97,17 @@
rf.ui = rf.ui || {};
rf.ui.Select = function(id, options) {
- $super.constructor.call(this, id);
this.id = id;
- var mergedOptions = $.extend({}, defaultOptions, options);
+ var mergedOptions = $.extend({}, defaultOptions, options);
mergedOptions['attachTo'] = id;
mergedOptions['scrollContainer'] = $(document.getElementById(id + "Items")).parent()[0];
-
- this.defaultLabel = mergedOptions.defaultLabel;
+
+ $super.constructor.call(this, id, mergedOptions);
+
+ this.options = mergedOptions;
+ this.defaultLabel = mergedOptions.defaultLabel;
var inputLabel = this.getValue() ;
this.initialValue = (inputLabel != this.defaultLabel) ? inputLabel : "";
-
this.selValueInput = $(document.getElementById(id+"selValue"));
this.clientItems = mergedOptions.items;
@@ -114,15 +118,16 @@
this.focusin = false;
}));
}
+
this.selectFirst = mergedOptions.selectFirst;
this.popupList = new rf.ui.PopupList((id+"List"), this, mergedOptions);
this.listElem = $(document.getElementById(id+"List"));
this.listElem.bind("click", $.proxy(this.__onListClick, this));
+ this.items = this.popupList.__getItems();
+ this.enableManualInput = mergedOptions.enableManualInput;
- var items = this.popupList.__getItems();
- var enableManualInput = mergedOptions.enableManualInput;
- if (items.length>0 && enableManualInput) {
- this.cache = new rf.utils.Cache("", items, getData, true);
+ if (this.items.length>0 && this.enableManualInput) {
+ this.cache = new rf.utils.Cache("", this.items, getData, true);
}
this.changeDelay = mergedOptions.changeDelay;
@@ -153,7 +158,6 @@
}
$.extend(rf.ui.Select.prototype, ( function () {
-
return{
name : "select",
@@ -169,14 +173,19 @@
},
__focusHandler: function(e) {
- if(this.getValue() == this.defaultLabel) {
- this.setValue("");
+ if (!this.focused) {
+ if(this.getValue() == this.defaultLabel) {
+ this.setValue("");
+ }
+ this.focusValue = this.selValueInput.val();
+ this.focused = true;
+ this.invokeEvent.call(this, "focus", document.getElementById(this.id + 'Input'), e);
}
},
__keydownHandler: function(e) {
var code;
-
+
if(e.keyCode) {
code = e.keyCode;
} else if(e.which) {
@@ -184,6 +193,7 @@
}
var visible = this.popupList.isVisible();
+
switch(code) {
case rf.KEYS.DOWN:
e.preventDefault();
@@ -232,7 +242,6 @@
var newValue = this.getValue();
if(this.cache && this.cache.isCached(newValue)) {
-
this.__updateItems();
if(!this.popupList.isVisible()) {
@@ -241,19 +250,10 @@
}
},
- __handleBlur: function(e) {
- var inputLabel = this.getValue();
- if(!inputLabel || inputLabel == "") {
- this.setValue(this.defaultLabel);
- this.selValueInput.val("");
- }
- },
-
__blurHandler: function(e) {
this.timeoutId = window.setTimeout($.proxy(function(){
- this.hidePopup();
- this.__handleBlur();
- }, this), 200);
+ this.onblur(e);
+ }, this), 200);
},
__onListClick: function(e) {
@@ -264,16 +264,19 @@
var newValue = this.getValue();
newValue = (newValue != this.defaultLabel) ? newValue : "";
this.__updateItemsFromCache(newValue);
+
if(this.selectFirst) {
this.popupList.__selectByIndex(0);
}
},
__updateItemsFromCache: function(value) {
- var newItems = this.cache.getItems(value);
- var items = $(newItems);
- this.popupList.__setItems(items);
- $(document.getElementById(this.id+"Items")).empty().append(items);
+ if(this.items.length>0 && this.enableManualInput) {
+ var newItems = this.cache.getItems(value);
+ var items = $(newItems);
+ this.popupList.__setItems(items);
+ $(document.getElementById(this.id+"Items")).empty().append(items);
+ }
},
showPopup: function() {
@@ -287,7 +290,7 @@
processItem: function(item) {
var key = $(item).attr("id");
var value = this.getItemValue(key);
- this.saveItemValue(value);
+ this.selValueInput.val(value);
var label = this.getItemLabel(key);
this.setValue(label);
this.hidePopup();
@@ -312,11 +315,23 @@
}
},
- saveItemValue: function(value) {
- this.selValueInput.val(value);
+ onblur: function(e) {
+ this.hidePopup();
+ var inputLabel = this.getValue();
+ if(!inputLabel || inputLabel == "") {
+ this.setValue(this.defaultLabel);
+ this.selValueInput.val("");
+ }
+
+ this.focused = false;
+
+ this.invokeEvent.call(this,"blur", document.getElementById(this.id + 'Input'), e);
+
+ if(this.focusValue != this.selValueInput.val() ) {
+ this.invokeEvent.call(this, "change", document.getElementById(this.id + 'Input'), e);
+ }
}
}
-
})());
})(jQuery, window.RichFaces);
Modified: trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml 2010-11-04 16:38:37 UTC (rev 19931)
@@ -82,7 +82,13 @@
</c:if>
</span>
<script type="text/javascript">
- <cdk:call expression="buildScript(responseWriter, facesContext, component, null);"/>
+ <cdk:scriptObject name="options">
+ <cdk:scriptOption name="noneCss" value="#{concatClasses('rf-ii-none', component.attributes['noneClass'])}"/>
+ <cdk:scriptOption name="changedCss" value="#{concatClasses('rf-ii-c-s', component.attributes['changedClass'])}"/>
+ <cdk:scriptOption name="editCss" value="#{concatClasses('rf-ii-e-s', component.attributes['editClass'])}"/>
+ <cdk:scriptOption attributes="editEvent state defaultLabel saveOnBlur showControls" />
+ </cdk:scriptObject>
+ new RichFaces.ui.InplaceInput("#{clientId}", #{toScriptArgs(options)});
</script>
</c:if>
</span>
Modified: trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml 2010-11-04 16:38:37 UTC (rev 19931)
@@ -98,7 +98,14 @@
</span>
</span>
<script type="text/javascript">
- <cdk:call expression="buildScript(responseWriter, facesContext, component, clientSelectItems);" />
+ <cdk:scriptObject name="options">
+ <cdk:scriptOption name="items" value="#{clientSelectItems}" />
+ <cdk:scriptOption name="noneCss" value="#{concatClasses('rf-is-none', component.attributes['noneClass'])}"/>
+ <cdk:scriptOption name="changedCss" value="#{concatClasses('rf-is-c-s', component.attributes['changedClass'])}"/>
+ <cdk:scriptOption name="editCss" value="#{concatClasses('rf-is-e-s', component.attributes['editClass'])}"/>
+ <cdk:scriptOption attributes="editEvent state defaultLabel saveOnBlur showControls openOnEdit saveOnSelect" />
+ </cdk:scriptObject>
+ new RichFaces.ui.InplaceSelect("#{clientId}", #{toScriptArgs(options)});
</script>
</c:if>
</span>
Modified: trunk/ui/input/ui/src/main/templates/select.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/select.template.xml 2010-11-04 13:50:28 UTC (rev 19930)
+++ trunk/ui/input/ui/src/main/templates/select.template.xml 2010-11-04 16:38:37 UTC (rev 19931)
@@ -64,7 +64,15 @@
</div>
</div>
<script type="text/javascript">
- <cdk:call expression="buildScript(responseWriter, facesContext, component, clientSelectItems);"/>
+ <cdk:scriptObject name="options">
+ <cdk:scriptOption name="items" value="#{clientSelectItems}" />
+ <cdk:scriptOption name="itemCss" value="#{concatClasses('rf-sel-opt', component.attributes['itemClass'])}" />
+ <cdk:scriptOption name="selectItemCss" value="#{concatClasses('rf-sel-sel', component.attributes['selectItemClass'])}" />
+ <cdk:scriptOption name="listCss" value="#{concatClasses('rf-sel-lst-cord', component.attributes['listClass'])}" />
+ <cdk:scriptOption attributes="onchange onselect" wrapper="eventHandler"/>
+ <cdk:scriptOption attributes="showControl defaultLabel enableManualInput selectFirst" />
+ </cdk:scriptObject>
+ new RichFaces.ui.Select("#{clientId}", #{toScriptArgs(options)});
</script>
</div>
</cc:implementation>
14 years, 2 months
JBoss Rich Faces SVN: r19930 - in trunk: ui/input/ui/src/main/java/org/richfaces/renderkit/html/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-11-04 09:50:28 -0400 (Thu, 04 Nov 2010)
New Revision: 19930
Modified:
trunk/core/api/src/main/java/org/richfaces/skin/Skin.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarSeparator.java
Log:
http://jira.jboss.com/jira/browse/RF-9635
Modified: trunk/core/api/src/main/java/org/richfaces/skin/Skin.java
===================================================================
--- trunk/core/api/src/main/java/org/richfaces/skin/Skin.java 2010-11-04 13:14:03 UTC (rev 19929)
+++ trunk/core/api/src/main/java/org/richfaces/skin/Skin.java 2010-11-04 13:50:28 UTC (rev 19930)
@@ -148,7 +148,7 @@
* color, the table header color, color of the title of the active tab in the tabpanel,
* color of the title on the buttons. Default value #FFFFFF.
*/
- public static final String HEAD_TEXT_COLOR = "headTextColor";
+ public static final String HEADER_TEXT_COLOR = "headerTextColor";
/**
* Parameter responsible for 3D Look of panels and buttons.
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarSeparator.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarSeparator.java 2010-11-04 13:14:03 UTC (rev 19929)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarSeparator.java 2010-11-04 13:50:28 UTC (rev 19930)
@@ -34,6 +34,7 @@
import javax.faces.context.FacesContext;
+import org.richfaces.resource.DynamicResource;
import org.richfaces.resource.ImageType;
import org.richfaces.resource.Java2DUserResource;
import org.richfaces.resource.PostConstructResource;
@@ -45,6 +46,7 @@
* @author amarkhel
*
*/
+@DynamicResource
public class CalendarSeparator implements Java2DUserResource, StateHolderResource {
private static final Dimension DIMENSION = new Dimension(1, 15);
@@ -56,7 +58,7 @@
FacesContext context = FacesContext.getCurrentInstance();
Skin skin = SkinFactory.getInstance(context).getSkin(context);
- this.headerTextColor = skin.getColorParameter(context, Skin.HEAD_TEXT_COLOR);
+ this.headerTextColor = skin.getColorParameter(context, Skin.HEADER_TEXT_COLOR);
}
public boolean isTransient() {
14 years, 2 months
JBoss Rich Faces SVN: r19929 - in modules/tests/metamer/trunk/application/src/main: resources/org/richfaces/tests/metamer/bean and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-11-04 09:14:03 -0400 (Thu, 04 Nov 2010)
New Revision: 19929
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTooltipBean.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTooltipBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/
modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/targetting.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
rich:tooltip - added two samples: with default targetting to parent component and with custom target (RF-9589)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-11-04 12:38:24 UTC (rev 19928)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-11-04 13:14:03 UTC (rev 19929)
@@ -141,6 +141,7 @@
components.put("richToggleControl", "Rich Toggle Control");
components.put("richTogglePanel", "Rich Toggle Panel");
components.put("richTogglePanelItem", "Rich Toggle Panel Item");
+ components.put("richTooltip", "Rich Tooltip");
components.put("richTree", "Rich Tree");
}
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTooltipBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTooltipBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTooltipBean.java 2010-11-04 13:14:03 UTC (rev 19929)
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UITooltip;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:list.
+ *
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTooltipBean")
+@ViewScoped
+public class RichTooltipBean implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private static Logger logger;
+ private Attributes attributes;
+
+ private int counter = 0;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(UITooltip.class, getClass(), false);
+
+
+ // set defaults
+ attributes.setAttribute("attached", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("followMouse", true);
+ attributes.setAttribute("disabled", false);
+ attributes.setAttribute("layout", "inline");
+ attributes.setAttribute("direction", "bottomRight");
+ attributes.setAttribute("mode", "client");
+ attributes.setAttribute("showEvent", "mouseenter");
+ attributes.setAttribute("hideEvent", "mouseleave");
+ attributes.setAttribute("target", "form:panel");
+
+ // intentionally hidden attributes
+ attributes.remove("bypassUpdates");
+ attributes.remove("converter");
+ attributes.remove("data");
+ attributes.remove("execute");
+ attributes.remove("limitToList");
+ attributes.remove("localValue");
+ attributes.remove("render");
+ attributes.remove("value");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public int getCounter() {
+ return counter++;
+ }
+
+ public Date getTooltipDate() {
+ return new Date();
+ }
+}
Added: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTooltipBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTooltipBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTooltipBean.properties 2010-11-04 13:14:03 UTC (rev 19929)
@@ -0,0 +1,9 @@
+attr.layout.inline=inline
+attr.layout.block=block
+attr.direction.topRight=topRight
+attr.direction.topLeft=topLeft
+attr.direction.bottomRight=bottomRight
+attr.direction.bottomLeft=bottomLeft
+attr.direction.auto=auto
+attr.mode.client=client
+attr.mode.ajax=ajax
\ No newline at end of file
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/list.xhtml 2010-11-04 13:14:03 UTC (rev 19929)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Tooltip</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ The sample of <b>rich:tooltip</b> by default targeted to its parent (rich:panel).
+ </metamer:testPageLink>
+
+ <metamer:testPageLink id="targetting" outcome="targetting" value="Targetting">
+ The sample of <b>rich:tooltip</b> with ability to change target.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/simple.xhtml 2010-11-04 13:14:03 UTC (rev 19929)
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+ xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+
+ <h:outputStylesheet>
+ .sample-panel {
+ border: 1px solid black;
+ background: solid white;
+ }
+ </h:outputStylesheet>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:panel id="panel" style="width: 200px">
+
+ Panel's content 8
+
+ <rich:tooltip id="tooltip"
+ attached="#{richTooltipBean.attributes['attached'].value}"
+ direction="#{richTooltipBean.attributes['direction'].value}"
+ disabled="#{richTooltipBean.attributes['disabled'].value}"
+ followMouse="#{richTooltipBean.attributes['followMouse'].value}"
+ hideDelay="#{richTooltipBean.attributes['hideDelay'].value}"
+ hideEvent="#{richTooltipBean.attributes['hideEvent'].value}"
+ horizontalOffset="#{richTooltipBean.attributes['horizontalOffset'].value}"
+ layout="#{richTooltipBean.attributes['layout'].value}"
+ mode="#{richTooltipBean.attributes['mode'].value}"
+ rendered="#{richTooltipBean.attributes['rendered'].value}"
+ showDelay="#{richTooltipBean.attributes['showDelay'].value}"
+ showEvent="#{richTooltipBean.attributes['showEvent'].value}"
+ >
+
+ <!--
+
+
+
+
+
+
+
+
+ -->
+
+
+ Tooltip content (counter: #{richTooltipBean.counter})
+
+ </rich:tooltip>
+
+ <!--
+
+
+
+ verticalOffset="#{richTooltipBean.attributes['verticalOffset'].value}"
+ -->
+ </rich:panel>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richTooltipBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/targetting.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/targetting.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTooltip/targetting.xhtml 2010-11-04 13:14:03 UTC (rev 19929)
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+ xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+
+ <h:outputStylesheet>
+ .sample-panel {
+ border: 1px solid black;
+ background: solid white;
+ }
+ </h:outputStylesheet>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <div id="regular-div" class="sample-panel">Div with clientId="regular-div"</div>
+
+ <a4j:outputPanel styleClass="sample-panel" id="jsf-div" layout="block">
+ Div with id="jsf-div", clientId="#{rich:clientId('jsf-div')}"
+ </a4j:outputPanel>
+
+ <rich:panel id="panel" style="width: 200px">
+
+ Panel's content 3 (id="panel", clientId="#{rich:clientId('panel')}")
+
+ <rich:tooltip id="tooltip"
+ attached="#{richTooltipBean.attributes['attached'].value}"
+ direction="#{richTooltipBean.attributes['direction'].value}"
+ disabled="#{richTooltipBean.attributes['disabled'].value}"
+ followMouse="#{richTooltipBean.attributes['followMouse'].value}"
+ hideDelay="#{richTooltipBean.attributes['hideDelay'].value}"
+ hideEvent="#{richTooltipBean.attributes['hideEvent'].value}"
+ horizontalOffset="#{richTooltipBean.attributes['horizontalOffset'].value}"
+ layout="#{richTooltipBean.attributes['layout'].value}"
+ mode="#{richTooltipBean.attributes['mode'].value}"
+ rendered="#{richTooltipBean.attributes['rendered'].value}"
+ target="#{richTooltipBean.attributes['target'].value}"
+ showDelay="#{richTooltipBean.attributes['showDelay'].value}"
+ showEvent="#{richTooltipBean.attributes['showEvent'].value}">
+
+
+ Tooltip content
+
+ </rich:tooltip>
+
+ <!--
+
+
+
+ verticalOffset="#{richTooltipBean.attributes['verticalOffset'].value}"
+ -->
+ </rich:panel>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richTooltipBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
14 years, 2 months
JBoss Rich Faces SVN: r19928 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-11-04 08:38:24 -0400 (Thu, 04 Nov 2010)
New Revision: 19928
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/json-dom.js
Log:
http://jira.jboss.com/jira/browse/RF-9626
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/json-dom.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/json-dom.js 2010-11-04 11:01:49 UTC (rev 19927)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/json-dom.js 2010-11-04 12:38:24 UTC (rev 19928)
@@ -26,7 +26,8 @@
'"':""",
'\'':"'",
'\u00A0':" "
- },
+ },
+
// Public functions
getInnerHTML : function(context) {
var children = [];
@@ -38,12 +39,7 @@
},
// Escape XML symbols - < > & ' ...
xmlEscape : function(value) {
- var text = value ? value.toString() : "";
- for(var i in this._symbols ) {
- text = text.replace(i,this._symbols[i]);
-
- }
- return text;
+ return jQuery("<div></div>").text(value).html();
}
};
14 years, 2 months
JBoss Rich Faces SVN: r19927 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-11-04 07:01:49 -0400 (Thu, 04 Nov 2010)
New Revision: 19927
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
Log:
http://jira.jboss.com/jira/browse/RF-9637
http://jira.jboss.com/jira/browse/RF-9633
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss 2010-11-04 09:31:43 UTC (rev 19926)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss 2010-11-04 11:01:49 UTC (rev 19927)
@@ -59,6 +59,18 @@
color : '#{richSkin.headerTextColor}';
}
+.rf-ca-tl{
+ vertical-align : middle;
+ text-align : center;
+ width: 20px;
+ height : 22px;
+ background-color : '#{richSkin.headerBackgroundColor}';
+ font-size : '#{richSkin.headerSizeFont}';
+ font-family : '#{richSkin.headerFamilyFont}';
+ font-weight : '#{richSkin.headerWeightFont}';
+ color : '#{richSkin.headerTextColor}';
+}
+
.rf-ca-days{
border-bottom : 1px solid;
border-right : 0px solid;
@@ -288,7 +300,7 @@
padding: 5px 5px 5px 1px;
}
-.rich-ca-date-layout-ok {
+.rf-ca-date-layout-ok {
background: '#{richSkin.additionalBackgroundColor}';
border-top: 1px solid;
border-top-color: '#{richSkin.panelBorderColor}';
@@ -318,7 +330,7 @@
border: 1px solid;
border-color: '#{richSkin.panelBorderColor}';
border-right-color: '#{richSkin.tableBackgroundColor}';
- border-bottom-color: '#{richSkin.panelBorderColor}';
+ border-bottom-color: '#{richSkin.tableBackgroundColor}';
background-color: '#{richSkin.calendarWeekBackgroundColor}';
}
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-11-04 09:31:43 UTC (rev 19926)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-11-04 11:01:49 UTC (rev 19927)
@@ -128,24 +128,24 @@
[
new E('tr',{},
[
- new E('td',{'class': 'rf-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("selectedDateControl", context)})
]),
- new E('td',{'class': 'rf-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("cleanControl", context)})
]),
- new E('td',{'class': 'rf-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("timeControl", context)})
]),
- new E('td',{'class': 'rf-tl-ftr', 'style': 'background-image:none;', 'width': '100%'}, []),
- new E('td',{'class': 'rf-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+(context.calendar.params.disabled || context.calendar.params.readonly || !context.calendar.params.showApplyButton ? 'background-image:none;' : '');}},
+ new E('td',{'class': 'rf-ca-tl-ftr', 'style': 'background-image:none;', 'width': '100%'}, []),
+ new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+(context.calendar.params.disabled || context.calendar.params.readonly || !context.calendar.params.showApplyButton ? 'background-image:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("todayControl", context)})
]),
- new E('td',{'class': 'rf-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+'background-image:none;';}},
+ new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+'background-image:none;';}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("applyControl", context)})
])
14 years, 2 months
JBoss Rich Faces SVN: r19926 - trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/samples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-11-04 05:31:43 -0400 (Thu, 04 Nov 2010)
New Revision: 19926
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/samples/select-sample.xhtml
Log:
redundant elements removed.
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/samples/select-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/samples/select-sample.xhtml 2010-11-04 09:16:18 UTC (rev 19925)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/select/samples/select-sample.xhtml 2010-11-04 09:31:43 UTC (rev 19926)
@@ -30,10 +30,6 @@
defaultLabel="start typing for select">
<f:selectItems value="#{inplaceSelectBean.capitalsOptions}" />
</rich:select>
- <a4j:commandButton value="submit"></a4j:commandButton>
- <a4j:outputPanel ajaxRendered="true">
- <h:messages />
- </a4j:outputPanel>
</rich:panel>
</h:form>
</ui:composition>
\ No newline at end of file
14 years, 2 months
JBoss Rich Faces SVN: r19925 - trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataGrid/samples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-11-04 05:16:18 -0400 (Thu, 04 Nov 2010)
New Revision: 19925
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataGrid/samples/grid-sample.xhtml
Log:
layout improvements
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataGrid/samples/grid-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataGrid/samples/grid-sample.xhtml 2010-11-04 09:14:09 UTC (rev 19924)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataGrid/samples/grid-sample.xhtml 2010-11-04 09:16:18 UTC (rev 19925)
@@ -9,7 +9,9 @@
.label {
font-weight: bold;
}
-
+.rf-dg, .rf-dg-c{
+ border:none;
+}
.pbody {
width: 200px;
}
@@ -20,7 +22,7 @@
</f:facet>
<h:form>
<rich:dataGrid value="#{carsBean.allInventoryItems}" var="car"
- columns="3" elements="9" width="600px">
+ columns="3" elements="9" width="600px" border="0">
<rich:panel bodyClass="pbody">
<f:facet name="header">
<h:outputText value="#{car.vendor} #{car.model}"></h:outputText>
14 years, 2 months