Author: andrei_exadel
Date: 2008-03-17 07:43:29 -0400 (Mon, 17 Mar 2008)
New Revision: 6846
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Log:
RF-2537
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
---
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-03-17
10:24:14 UTC (rev 6845)
+++
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-03-17
11:43:29 UTC (rev 6846)
@@ -410,6 +410,7 @@
this.checkFrame();
this.initFileEntryWidth();
this.initLabels(labels);
+ this.initFileInput();
},
initLabels: function (labels) {
@@ -420,6 +421,13 @@
}
},
+ initFileInput: function () {
+ var o = this.currentInput.parentNode;
+ var p = o.parentNode;
+ o.style.width = p.clientWidth;
+ o.style.height = p.clientHeight;
+ },
+
initFileEntryWidth: function () {
var w = this.element.clientWidth - 115;
this.fileEntryWidth = w;
Modified: trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
--- trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-03-17
10:24:14 UTC (rev 6845)
+++ trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-03-17
11:43:29 UTC (rev 6846)
@@ -65,16 +65,19 @@
<td>
<div class="upload_button_border" style=" float:left;">
<div class="#{addButtonClass}"
onmouseover="this.className='upload_button_light upload_font'"
onmousedown="this.className='upload_button_press upload_font'"
onmouseup="this.className='upload_button upload_font'"
onmouseout="this.className='upload_button upload_font'"
- style="position: relative; overflow: hidden; width:70px;"
+ style="position: relative;"
id="#{clientId}:add1">
<div class="#{addButtonClassContent}"
- id="#{clientId}:add2" style="direction:
rtl;">#{addLabel}</div>
- <input type="file" style="cursor: pointer; z-index: 3; right:
-10px; top: -10px; font-size: 10em; position: absolute"
- class="hidden"
- id="#{clientId}:file"
- name="#{clientId}:file"
- disabled="#{component.attributes['disabled']}"
- onchange="return $('#{clientId}').component.add(this);"/>
+ id="#{clientId}:add2"
+ style="position: relative;">#{addLabel}</div>
+ <div style="overflow : hidden; position : absolute; top : 0px; left : 0px;
">
+ <input type="file" style="cursor: pointer; right: 0px; top: 0px;
font-size: 10em; position: absolute"
+ class="hidden"
+ id="#{clientId}:file"
+ name="#{clientId}:file"
+ disabled="#{component.attributes['disabled']}"
+ onchange="return
$('#{clientId}').component.add(this);"/>
+ </div>
</div>
</div>
<div class="upload_button_border" style=" float:left; display:
none;">
Show replies by date