Author: andrei_exadel
Date: 2008-02-28 08:45:15 -0500 (Thu, 28 Feb 2008)
New Revision: 6407
Modified:
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Log:
bugs fixing; cosmetics
Modified:
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
---
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-28
13:43:56 UTC (rev 6406)
+++
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-28
13:45:15 UTC (rev 6407)
@@ -96,7 +96,7 @@
FileUploadEntry.LABELS[FileUploadEntry.READY] = '';
FileUploadEntry.LABELS[FileUploadEntry.UPLOAD_IN_PROGRESS] = 'uploading';
FileUploadEntry.LABELS[FileUploadEntry.UPLOAD_CANCELED] = '';
-FileUploadEntry.LABELS[FileUploadEntry.UPLOAD_SUCCESS] = 'done';
+FileUploadEntry.LABELS[FileUploadEntry.UPLOAD_SUCCESS] =
'<b>Done</b>';
FileUploadEntry.LABELS[FileUploadEntry.UPLOAD_TRANSFER_ERROR] =
'transfer_error';
FileUploadEntry.LABELS[FileUploadEntry.UPLOAD_SERVER_ERROR] = 'server_error';
FileUploadEntry.LABELS[FileUploadEntry.UPLOAD_SIZE_ERROR] = 'File size
restricted';
@@ -634,10 +634,10 @@
var d1 = $(this.id + ":clean1");
var d2 = $(this.id + ":clean2");
if (disabled) {
- Element.hide(d1);
+ Element.hide(d1.parentNode);
return;
} else {
- Element.show(d1);
+ Element.show(d1.parentNode);
}
if(this.disabled) {
@@ -657,10 +657,10 @@
var d1 = $(this.id+":add1");
var d2 = $(this.id+":add2");
if (disabled) {
- Element.hide(d1);
+ Element.hide(d1.parentNode);
return;
} else {
- Element.show(d1);
+ Element.show(d1.parentNode);
}
d1.className = (this.disabled ? this.classes.ADD.DISABLED :
this.classes.ADD.ENABLED);
d2.className = (this.disabled ? this.classes.ADD_CONTENT.DISABLED :
this.classes.ADD_CONTENT.ENABLED);
@@ -671,9 +671,9 @@
var d1 = $(this.id + ":upload1");
var d2 = $(this.id + ":upload2");
if(disabled) {
- Element.hide(d1);
+ Element.hide(d1.parentNode);
} else {
- Element.show(d1);
+ Element.show(d1.parentNode);
}
if (this.disabled) {
d1.onclick = function() {return false;};
@@ -836,6 +836,8 @@
try {
var inputs = parentForm.elements;
var entryInput = entry.fileInput;
+
+ entryInput.name = this.id + ":file";
var l = inputs.length;
for (var i = 0; i < l; i++) {
Modified: trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
---
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-28
13:43:56 UTC (rev 6406)
+++
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-28
13:45:15 UTC (rev 6407)
@@ -54,7 +54,7 @@
<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; overflow: hidden; width:70px;"
id="#{clientId}:add1">
<div class="#{addButtonClassContent}"
id="#{clientId}:add2" style="direction:
rtl;">Add...</div>
@@ -65,11 +65,10 @@
onchange="return $('#{clientId}').component.add(this);"/>
</div>
</div>
- <div class="upload_button_border" style=" float:left;">
+ <div class="upload_button_border" style=" float:left; display:
none;">
<div class="upload_button upload_font
#{component.attributes['uploadButtonClass']}"
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'"
id="#{clientId}:upload1"
- style="display: none"
onclick="return $('#{clientId}').component.upload();">
<a href="#" class="upload_button_selection">
<div class="upload_button_content upload_font upload_ico upload_ico_start
#{component.attributes['uploadButtonClass']}"
@@ -84,12 +83,11 @@
<!-- -->
- <div class="upload_button_border" style=" float:right">
+ <div class="upload_button_border" style=" float:right; display:
none;">
<div class="upload_button upload_font
#{component.attributes['cleanButtonClass']}"
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'"
onclick="return $('#{clientId}').component.clear();"
- id="#{clientId}:clean1"
- style="display: none">
+ id="#{clientId}:clean1">
<a href="#" class="upload_button_selection">
<div class="upload_button_content upload_font upload_ico
upload_ico_clear_dis #{component.attributes['cleanButtonClass']}"
id="#{clientId}:clean2">Clear All</div>
Show replies by date