Author: abelevich
Date: 2008-03-10 15:21:29 -0400 (Mon, 10 Mar 2008)
New Revision: 6665
Modified:
trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
layout "block" support
Modified: trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-10 19:20:11 UTC
(rev 6664)
+++ trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-10 19:21:29 UTC
(rev 6665)
@@ -56,25 +56,44 @@
variables.setVariable("controlHoveredClass", controlHoveredClass);
String controlPressedClass =
(String)component.getAttributes().get("controlPressedClass");
variables.setVariable("controlPressedClass", controlPressedClass);*/
+ String layout = (String)component.getAttributes().get("layout");
+ if (layout != null && layout.length() != 0) {
+ if (!layout.equals("block")) {
+ layout = "inline";
+ }
+ } else {
+ layout = "inline";
+ }
+
]]>
</jsp:scriptlet>
<f:resource var="spacer" name="images/spacer.gif"/>
-<span id="#{clientId}" class="rich-inplace-select-view"
- x:passThruWithExclusions="id,styleClass,class,style">
+
+<jsp:scriptlet>
+ if (layout.equals("inline")) {
+</jsp:scriptlet>
+ <span id="#{clientId}" class="rich-inplace-select-view"
x:passThruWithExclusions="id,styleClass,class,style">
+<jsp:scriptlet>
+ } else {
+</jsp:scriptlet>
+ <div id="#{clientId}" class="rich-inplace-select-view"
x:passThruWithExclusions="id,styleClass,class,style">
+<jsp:scriptlet>
+ }
+</jsp:scriptlet>
<input id="#{clientId}tabber" type="button" value=""
style="width: 1px; position: absolute; left: -32767px;" />
<input id="#{clientId}inplaceTmpValue"
- type="text"
- style='display:none;'
- value="#{fieldValue}"
- autocomplete="off"
- maxlength='#{component.attributes["inputMaxLength"]}'
- tabindex='#{component.attributes["tabindex"]}'
- readonly="readonly"
- class="rich-inplace-select-field"/>
- <input id="#{clientId}inselArrow" readonly="readonly"
type="Text" value="" class="rich-inplace-select-arrow"
style='display:none;'/>
- <input id='#{clientId}inplaceValue' name='#{clientId}inplaceValue'
type='hidden' value='#{fieldValue}'/>
+ type="text"
+ style='display:none;'
+ value="#{fieldValue}"
+ autocomplete="off"
+ maxlength='#{component.attributes["inputMaxLength"]}'
+ tabindex='#{component.attributes["tabindex"]}'
+ readonly="readonly"
+ class="rich-inplace-select-field"/>
+ <input id="#{clientId}inselArrow" readonly="readonly"
type="Text" value="" class="rich-inplace-select-arrow"
style='display:none;'/>
+ <input id='#{clientId}inplaceValue' name='#{clientId}inplaceValue'
type='hidden' value='#{fieldValue}'/>
<div id="#{clientId}bar" class="rich-inplace-select-control-set"
style="display:none;">
<jsp:scriptlet>
<![CDATA[
@@ -107,44 +126,56 @@
<input id="#{clientId}ok" type="image"
src="#{saveIcon}" class="rich-inplace-select-control"
onmousedown="this.className='rich-inplace-select-control-press'"
onmouseout="this.className='rich-inplace-select-control'"
onmouseup="this.className='rich-inplace-select-control'"/>
<input id="#{clientId}cancel" type="image"
src="#{cancelIcon}" class="rich-inplace-select-control"
onmousedown="this.className='rich-inplace-select-control-press'"
onmouseout="this.className='rich-inplace-select-control'"
onmouseup="this.className='rich-inplace-select-control'"/>
</div>
+
<jsp:scriptlet>
<![CDATA[
}
]]>
</jsp:scriptlet>
</div>
-
- <div id="listParent#{clientId}"
class="rich-inplace-select-width-list" style="position : absolute; height :
100px; left : 0px; top: 13px">
- <div class="rich-inplace-select-list-shadow">
- <table id="shadow#{clientId}" cellpadding="0"
cellspacing="0" border="0" width="257"
height="109">
- <tr>
- <td class="rich-inplace-select-shadow-tl">
- <img src="#{spacer}" width="10" height="1"
alt="" border="0"/><br/>
- </td>
- <td class="rich-inplace-select-shadow-tr">
- <img src="#{spacer}" width="1" height="10"
alt="" border="0"/><br/>
- </td>
- </tr>
- <tr>
- <td class="rich-inplace-select-shadow-bl">
- <img src="#{spacer}" width="1" height="10"
alt="" border="0"/><br/>
- </td>
- <td class="rich-inplace-select-shadow-br">
- <img src="#{spacer}" width="10" height="10"
alt="" border="0"/><br/>
- </td>
- </tr>
- </table>
- </div>
- <div id="listPosition#{clientId}"
class="rich-inplace-select-list-position">
- <div id="listDecoration#{clientId}"
class="rich-inplace-select-list-decoration">
- <div id="list#{clientId}"
class="rich-inplace-select-list-scroll">
- <f:call name="encodeItems"/>
+ <div id="listParent#{clientId}"
class="rich-inplace-select-width-list" style="position : absolute; height :
100px; left : 0px; top: 13px">
+ <div class="rich-inplace-select-list-shadow">
+ <table id="shadow#{clientId}" cellpadding="0"
cellspacing="0" border="0" width="257"
height="109">
+ <tr>
+ <td class="rich-inplace-select-shadow-tl">
+ <img src="#{spacer}" width="10" height="1"
alt="" border="0"/><br/>
+ </td>
+ <td class="rich-inplace-select-shadow-tr">
+ <img src="#{spacer}" width="1" height="10"
alt="" border="0"/><br/>
+ </td>
+ </tr>
+ <tr>
+ <td class="rich-inplace-select-shadow-bl">
+ <img src="#{spacer}" width="1" height="10"
alt="" border="0"/><br/>
+ </td>
+ <td class="rich-inplace-select-shadow-br">
+ <img src="#{spacer}" width="10" height="10"
alt="" border="0"/><br/>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id="listPosition#{clientId}"
class="rich-inplace-select-list-position">
+ <div id="listDecoration#{clientId}"
class="rich-inplace-select-list-decoration">
+ <div id="list#{clientId}"
class="rich-inplace-select-list-scroll">
+ <f:call name="encodeItems"/>
+ </div>
</div>
</div>
- </div>
</div>
#{value}
-</span>
+<jsp:scriptlet>
+ if (layout.equals("block")) {
+</jsp:scriptlet>
+ </div>
+<jsp:scriptlet>
+ } else {
+</jsp:scriptlet>
+ </span>
+<jsp:scriptlet>
+ }
+</jsp:scriptlet>
+
+
<script type="text/javascript">
Richfaces.InplaceSelect.CLASSES = {
COMBO_LIST : {
Show replies by date