Author: vmolotkov
Date: 2008-03-04 10:06:25 -0500 (Tue, 04 Mar 2008)
New Revision: 6531
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
button positioning
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss
===================================================================
---
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss 2008-03-04
14:58:18 UTC (rev 6530)
+++
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss 2008-03-04
15:06:25 UTC (rev 6531)
@@ -18,7 +18,7 @@
width : 12px;
position : absolute;
top:1px;
- left : 88px;
+ /*left : 88px;*/
/*background-image:url(images/mark_list.gif);*/
background-position : center right;
background-repeat : no-repeat;
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
---
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-04
14:58:18 UTC (rev 6530)
+++
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-04
15:06:25 UTC (rev 6531)
@@ -1,9 +1,10 @@
if(!window.Richfaces) window.Richfaces = {};
Richfaces.InplaceSelect = Class.create(Richfaces.InplaceInput, {
- initialize : function($super, listObj, clientId, temValueKeepId, valueKeepId, tabberId,
strutId, attributes, events, classes, barParams) {
+ initialize : function($super, listObj, clientId, temValueKeepId, valueKeepId, tabberId,
strutId, attributes, events, classes, barParams, buttonId) {
this.comboList = listObj;
$super(clientId, temValueKeepId, valueKeepId, tabberId, strutId, attributes, events,
classes, barParams);
this.clickOnBar = false;
+ this.button = $(buttonId);
},
initHandlers : function($super) {
@@ -16,6 +17,11 @@
this.comboList.listParent.observe("click",
function(e){this.listClickHandler(e);}.bindAsEventListener(this));
},
+ setInputWidth : function($super) {
+ $super();
+ this.button.style.left = (parseInt(this.tempValueKeeper.style.width) - 12) +
"px";
+ },
+
switchingStatesHandler : function($super, e) {
var el = (e.srcElement) ? e.srcElement : e.target;
if ((el.id == this.inplaceInput.id) || (e.type == "focus")) {
@@ -27,11 +33,17 @@
startEditableState : function($super, textSize) {
$super(textSize);
+ this.button.show();
if (this.attributes.openOnEdit) {
this.comboList.showWithDelay();
}
},
+ endEditableState : function($super) {
+ $super();
+ this.button.hide();
+ },
+
tempKeeperClickHandler : function() {
this.comboList.isList = false;
this.comboList.showWithDelay();
Modified: trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-04 14:58:18 UTC
(rev 6530)
+++ trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-04 15:06:25 UTC
(rev 6531)
@@ -74,7 +74,7 @@
tabindex='#{component.attributes["tabindex"]}'
readonly="readonly"
class="rich-inplace-select-field"/>
- <input readonly="readonly" type="Text" value=""
class="insel_arrow"/>
+ <input id="#{clientId}inselArrow" readonly="readonly"
type="Text" value="" class="insel_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>
@@ -182,9 +182,9 @@
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',
'#{clientId}inplaceStrut',
+ '#{clientId}inplaceValue', '#{clientId}tabber',
'#{clientId}inplaceStrut',
richInplaceSelAttributes, richInplaceSelEvents,
Richfaces.InplaceSelect.CLASSES,
- ['#{clientId}bar', '#{clientId}ok',
'#{clientId}cancel', '#{clientId}buttons',
'#{clientId}btns_shadow']);
+ ['#{clientId}bar', '#{clientId}ok',
'#{clientId}cancel', '#{clientId}buttons',
'#{clientId}btns_shadow'], '#{clientId}inselArrow');
</script>
</f:root>