Author: amarkhel
Date: 2010-09-21 15:45:23 -0400 (Tue, 21 Sep 2010)
New Revision: 19295
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss
trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml
trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/InplaceInputRendererTest.java
Log:
RF-9303
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss 2010-09-21
19:44:36 UTC (rev 19294)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss 2010-09-21
19:45:23 UTC (rev 19295)
@@ -1,4 +1,4 @@
-input.rf-ii-f {
+input.rf-ii-fld {
background-image: none;
background-color : '#{richSkin.editBackgroundColor}';
border-bottom-width : 10px;
@@ -17,7 +17,7 @@
white-space : nowrap;
}
-.rf-ii-d-s {
+.rf-ii-ready-st {
display : inline-block;
white-space : nowrap;
background-color : '#{richSkin.editorBackgroundColor}';
@@ -30,14 +30,14 @@
position : relative;
}
-.rf-ii-c-s {
+.rf-ii-chd-st {
display : inline-block;
background-image :
url("#{resource['org.richfaces:mark_changed.gif']}");
background-position : top left;
background-repeat : no-repeat;
}
-.rf-ii-e-s {
+.rf-ii-edt-st {
position : absolute;
top : 0px;
left : 0px;
@@ -45,7 +45,7 @@
width: 100%;
}
-.rf-ii-f {
+.rf-ii-fld {
background-color : '#{richSkin.editBackgroundColor}';
border-bottom-width : 10px;
border-bottom-style: solid;
@@ -75,7 +75,7 @@
margin : 0px;
}
-.rf-ii-btn-p {
+.rf-ii-btn-prsd {
background-image :
"url(#{resource['org.richfaces.images:inplaceBtnPressGrad.png']})";
background-position: top;
background-repeat: repeat-x;
@@ -86,13 +86,6 @@
padding : 0px;
margin : 0px;
}
-
-.rf-ii-btn-set {
- position : absolute;
- top:0px;
- left : 100px;
- white-space : nowrap;
-}
.rf-ii-btn-prepos {
position : absolute;
@@ -109,7 +102,7 @@
white-space : nowrap;
}
-.rf-ii-btn-shadow {
+.rf-ii-btn-shdw {
display: inline-block;
position: relative;
padding : 6px 6px 6px 6px;
@@ -117,7 +110,7 @@
right : -6px;
}
-.rf-ii-btn-shadow-t {
+.rf-ii-btn-shdw-t {
background-position : left top;
background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
background-attachment: scroll;
@@ -130,7 +123,7 @@
left : 0px
}
-.rf-ii-btn-shadow-l {
+.rf-ii-btn-shdw-l {
background-position : left bottom;
background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
background-attachment: scroll;
@@ -143,7 +136,7 @@
right : 6px;
}
-.rf-ii-btn-shadow-r {
+.rf-ii-btn-shdw-r {
background-position : right bottom;
background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
background-attachment: scroll;
@@ -156,7 +149,7 @@
right: 0px;
}
-.rf-ii-btn-shadow-b {
+.rf-ii-btn-shdw-b {
background-position : right top;
background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
background-attachment: scroll;
Modified: trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml 2010-09-21 19:44:36 UTC
(rev 19294)
+++ trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml 2010-09-21 19:45:23 UTC
(rev 19295)
@@ -49,29 +49,29 @@
<input id="#{clientId}:focus" type="image"
style="position: absolute; top: 0px; left: 0px; outline-style: none;"
class="rf-ii-none"/>
<span id="#{clientId}:edit" class="#{getEditStyleClass(component,
inplaceState)}">
<input id="#{clientId}:input" autocomplete="off"
name="#{clientId}"
- type="text" value="#{getInputValue(facesContext, component)}"
class="rf-ii-f" style="width:
#{component.attributes['inputWidth']};"
+ type="text" value="#{getInputValue(facesContext, component)}"
class="rf-ii-fld" style="width:
#{component.attributes['inputWidth']};"
cdk:passThrough="tabIndex">
<cdk:call expression="renderInputHandlers(facesContext,
component);"/>
</input>
<c:if test="#{component.attributes['showControls']}">
<span class="rf-ii-btn-prepos">
<span class="rf-ii-btn-pos">
- <span id="#{clientId}:btnshadow"
class="rf-ii-btn-shadow">
- <span class="rf-ii-btn-shadow-t"></span>
- <span class="rf-ii-btn-shadow-l"></span>
- <span class="rf-ii-btn-shadow-r"></span>
- <span class="rf-ii-btn-shadow-b"></span>
+ <span id="#{clientId}:btnshadow"
class="rf-ii-btn-shdw">
+ <span class="rf-ii-btn-shdw-t"></span>
+ <span class="rf-ii-btn-shdw-l"></span>
+ <span class="rf-ii-btn-shdw-r"></span>
+ <span class="rf-ii-btn-shdw-b"></span>
<span id="#{clientId}:btn" style="position :
relative">
<input type="image"
id="#{clientId}:okbtn"
src="#{getResourcePath(facesContext,
'org.richfaces/ico_ok.gif')}"
- class="rf-ii-btn"
onmousedown="this.className='rf-ii-btn-p'"
+ class="rf-ii-btn"
onmousedown="this.className='rf-ii-btn-prsd'"
onmouseout="this.className='rf-ii-btn'"
onmouseup="this.className='rf-ii-btn'" />
<input type="image"
id="#{clientId}:cancelbtn"
src="#{getResourcePath(facesContext,'org.richfaces/ico_cancel.gif')}"
- class="rf-ii-btn"
onmousedown="this.className='rf-ii-btn-press'"
+ class="rf-ii-btn"
onmousedown="this.className='rf-ii-btn-prsd'"
onmouseout="this.className='rf-ii-btn'"
onmouseup="this.className='rf-ii-btn'" />
<br />
</span>
Modified:
trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/InplaceInputRendererTest.java
===================================================================
---
trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/InplaceInputRendererTest.java 2010-09-21
19:44:36 UTC (rev 19294)
+++
trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/InplaceInputRendererTest.java 2010-09-21
19:45:23 UTC (rev 19295)
@@ -59,7 +59,7 @@
HtmlPage page = environment.getPage("/test.jsf");
HtmlElement span = page.getFirstByXPath("//*[@id =
'form:input_default']");
assertEquals("span", span.getNodeName());
- assertEquals("rf-ii-d-s",
span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
+ assertEquals("rf-ii-ready-st",
span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
HtmlElement label = (HtmlElement)span.getFirstChild();
assertEquals("span", label.getNodeName());
@@ -69,11 +69,11 @@
HtmlElement edit = page.getFirstByXPath("//*[@id =
'form:input_default:edit']");
assertEquals("span", edit.getNodeName());
- assertEquals("rf-ii-e-s rf-ii-none",
edit.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
+ assertEquals("rf-ii-edt-st rf-ii-none",
edit.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
HtmlElement input = (HtmlElement)edit.getFirstChild();
assertEquals("input", input.getNodeName());
- assertEquals("rf-ii-f",
input.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
+ assertEquals("rf-ii-fld",
input.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
assertEquals(text.getNodeValue(),
input.getAttribute(HtmlConstants.VALUE_ATTRIBUTE));
List<?> buttons = page.getByXPath("//*[@id =
'form:input_default:btn']");
@@ -87,7 +87,7 @@
HtmlElement span = page.getFirstByXPath("//*[@id =
'form:input_edit']");
assertEquals("span", span.getNodeName());
- assertEquals("rf-ii-d-s",
span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
+ assertEquals("rf-ii-ready-st",
span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
HtmlElement label = (HtmlElement)span.getFirstChild();
assertEquals("span", label.getNodeName());
@@ -97,11 +97,11 @@
HtmlElement edit = page.getFirstByXPath("//*[@id =
'form:input_edit:edit']");
assertEquals("span", edit.getNodeName());
- assertEquals("rf-ii-e-s",
edit.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
+ assertEquals("rf-ii-edt-st",
edit.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
HtmlElement input = (HtmlElement)edit.getFirstChild();
assertEquals("input", input.getNodeName());
- assertEquals("rf-ii-f",
input.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
+ assertEquals("rf-ii-fld",
input.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
assertEquals(text.getNodeValue(),
input.getAttribute(HtmlConstants.VALUE_ATTRIBUTE));
HtmlElement button = page.getFirstByXPath("//*[@id =
'form:input_edit:btn']");
@@ -127,7 +127,7 @@
DomText text = page.getFirstByXPath("//*[@id =
'form:input_default:label']/text()");
assertEquals("Another Test String", text.getTextContent());
HtmlElement span = page.getFirstByXPath("//*[@id =
'form:input_default']");
- assertEquals("rf-ii-d-s rf-ii-c-s",
span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
+ assertEquals("rf-ii-ready-st rf-ii-chd-st",
span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
}
private void blur(HtmlPage page) throws Exception {
@@ -145,7 +145,7 @@
HtmlElement span = page.getFirstByXPath("//*[@id = 'form:" +
inplaceInputId + "']");
span.click();
HtmlElement edit = page.getFirstByXPath("//*[@id = 'form:" +
inplaceInputId + ":edit']");
- assertEquals("rf-ii-e-s",
edit.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
+ assertEquals("rf-ii-edt-st",
edit.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
typeNewValue(page, inplaceInputId, value);
}
@@ -161,7 +161,7 @@
assertEquals("Test String", text.getTextContent());
HtmlElement span = page.getFirstByXPath("//*[@id =
'form:input_controls']");
- assertEquals("rf-ii-d-s",
span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
+ assertEquals("rf-ii-ready-st",
span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
edit(page, "input_controls", "Another Test String");
@@ -172,7 +172,7 @@
assertEquals("Another Test String", text.getTextContent());
span = page.getFirstByXPath("//*[@id =
'form:input_controls']");
- assertEquals("rf-ii-d-s rf-ii-c-s",
span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
+ assertEquals("rf-ii-ready-st rf-ii-chd-st",
span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
edit(page, "input_controls", "Test String");