Author: abelevich
Date: 2008-03-20 14:07:18 -0400 (Thu, 20 Mar 2008)
New Revision: 7026
Modified:
trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2643
Modified: trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-20 18:05:10 UTC
(rev 7025)
+++ trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-20 18:07:18 UTC
(rev 7026)
@@ -134,7 +134,7 @@
]]>
</jsp:scriptlet>
</div>
- <div id="listParent#{clientId}"
class="rich-inplace-select-width-list" style="position : absolute; height :
100px; left : 0px; top: 13px">
+ <div id="listParent#{clientId}"
class="rich-inplace-select-width-list" style="display: none; 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>
@@ -162,8 +162,50 @@
</div>
</div>
</div>
+ <script type="text/javascript">
+ Richfaces.InplaceSelect.CLASSES = {
+ COMBO_LIST : {
+ LIST : {CLASSES :{ACTIVE : "rich-inplace-select-list-scroll
rich-inplace-select-list-decoration rich-inplace-select-list-position #{listClass}"
+ }
+ },
+ ITEM : {NORMAL : "rich-inplace-select-item rich-inplace-select-font
#{itemClass}",
+ SELECTED : 'rich-inplace-select-item rich-inplace-select-font
rich-inplace-select-selected-item #{itemSelectedClass}'
+ }
+ },
+ COMPONENT : {CHANGED : {NORMAL : 'rich-inplace-select rich-inplace-select-view
rich-inplace-select-changed #{component.attributes["changedClass"]}',
HOVERED : 'rich-inplace-select-changed-hover
#{component.attributes["changedHoverClass"]}'},
+ VIEW : {NORMAL : 'rich-inplace-select rich-inplace-select-view
#{component.attributes["viewClass"]}', HOVERED :
'rich-inplace-select-view-hover
#{component.attributes["viewHoverClass"]}'},
+ EDITABLE : 'rich-inplace-select rich-inplace-select-edit
#{component.attributes["editClass"]}'
+ }
+ };
+
+ var richInplaceSelAttributes = {defaultLabel :
'#{component.attributes["defaultLabel"]}',
+ showControls : #{component.attributes["showControls"]},
+ editEvent : '#{component.attributes["editEvent"]}',
+ verticalPosition :
'#{component.attributes["controlsVerticalPosition"]}',
+ horizontalPosition :
'#{component.attributes["controlsHorizontalPosition"]}',
+ inputWidth : '#{component.attributes["selectWidth"]}',
+ minInputWidth : '#{component.attributes["minSelectWidth"]}',
+ maxInputWidth : '#{component.attributes["maxSelectWidth"]}',
+ openOnEdit:#{component.attributes["openOnEdit"]}
+ };
+
+ var richInplaceSelEvents = {oneditactivation : #{this:getAsEventHandler(context,
component, "oneditactivation")},
+ onviewactivation : #{this:getAsEventHandler(context, component,
"onviewactivation")},
+ oneditactivated : #{this:getAsEventHandler(context, component,
"oneditactivated")},
+ onviewactivated : #{this:getAsEventHandler(context, component,
"onviewactivated")}};
+
+ var richInplaceList = new Richfaces.InplaceSelectList('list#{clientId}',
'listParent#{clientId}', true,
+ Richfaces.InplaceSelect.CLASSES.COMBO_LIST,
'#{component.attributes["listWidth"]}',
'#{component.attributes["listHeight"]}',
#{this:getItemsTextAsJSArray(context, component)}, null,
+ '#{clientId}inplaceTmpValue', 'shadow#{clientId}', 0,
0);
+ var richInplaceSelect = new Richfaces.InplaceSelect(richInplaceList,
'#{clientId}', '#{clientId}inplaceTmpValue',
+ '#{clientId}inplaceValue', '#{clientId}tabber',
+ richInplaceSelAttributes, richInplaceSelEvents,
Richfaces.InplaceSelect.CLASSES,
+ ['#{clientId}bar', '#{clientId}ok',
'#{clientId}cancel', '#{clientId}buttons',
'#{clientId}btns_shadow'], '#{clientId}inselArrow');
+ </script>
</div>
#{value}
+
+
<jsp:scriptlet>
if (layout.equals("block")) {
</jsp:scriptlet>
@@ -176,46 +218,4 @@
}
</jsp:scriptlet>
-
-<script type="text/javascript">
- Richfaces.InplaceSelect.CLASSES = {
- COMBO_LIST : {
- LIST : {CLASSES :{ACTIVE : "rich-inplace-select-list-scroll
rich-inplace-select-list-decoration rich-inplace-select-list-position #{listClass}"
- }
- },
- ITEM : {NORMAL : "rich-inplace-select-item rich-inplace-select-font
#{itemClass}",
- SELECTED : 'rich-inplace-select-item rich-inplace-select-font
rich-inplace-select-selected-item #{itemSelectedClass}'
- }
- },
- COMPONENT : {CHANGED : {NORMAL : 'rich-inplace-select rich-inplace-select-view
rich-inplace-select-changed #{component.attributes["changedClass"]}',
HOVERED : 'rich-inplace-select-changed-hover
#{component.attributes["changedHoverClass"]}'},
- VIEW : {NORMAL : 'rich-inplace-select rich-inplace-select-view
#{component.attributes["viewClass"]}', HOVERED :
'rich-inplace-select-view-hover
#{component.attributes["viewHoverClass"]}'},
- EDITABLE : 'rich-inplace-select rich-inplace-select-edit
#{component.attributes["editClass"]}'
- }
- };
-
- var richInplaceSelAttributes = {defaultLabel :
'#{component.attributes["defaultLabel"]}',
- showControls : #{component.attributes["showControls"]},
- editEvent : '#{component.attributes["editEvent"]}',
- verticalPosition :
'#{component.attributes["controlsVerticalPosition"]}',
- horizontalPosition :
'#{component.attributes["controlsHorizontalPosition"]}',
- inputWidth : '#{component.attributes["selectWidth"]}',
- minInputWidth : '#{component.attributes["minSelectWidth"]}',
- maxInputWidth : '#{component.attributes["maxSelectWidth"]}',
- openOnEdit:#{component.attributes["openOnEdit"]}
- };
-
- var richInplaceSelEvents = {oneditactivation : #{this:getAsEventHandler(context,
component, "oneditactivation")},
- onviewactivation : #{this:getAsEventHandler(context, component,
"onviewactivation")},
- oneditactivated : #{this:getAsEventHandler(context, component,
"oneditactivated")},
- onviewactivated : #{this:getAsEventHandler(context, component,
"onviewactivated")}};
-
- var richInplaceList = new Richfaces.InplaceSelectList('list#{clientId}',
'listParent#{clientId}', true,
- Richfaces.InplaceSelect.CLASSES.COMBO_LIST,
'#{component.attributes["listWidth"]}',
'#{component.attributes["listHeight"]}',
#{this:getItemsTextAsJSArray(context, component)}, null,
- '#{clientId}inplaceTmpValue', 'shadow#{clientId}', 0, 0);
- var richInplaceSelect = new Richfaces.InplaceSelect(richInplaceList,
'#{clientId}', '#{clientId}inplaceTmpValue',
- '#{clientId}inplaceValue', '#{clientId}tabber',
- richInplaceSelAttributes, richInplaceSelEvents,
Richfaces.InplaceSelect.CLASSES,
- ['#{clientId}bar', '#{clientId}ok',
'#{clientId}cancel', '#{clientId}buttons',
'#{clientId}btns_shadow'], '#{clientId}inselArrow');
-</script>
-
</f:root>