2009-03-14 16:29:22 CET
Hi there,
unfortunately, in the current version of cfe this is not really
supported.
Still, i made up a frightening hack, which will work with the current
version 0.8.3:
Insert the following code after myCfe.init and replace the $('upload')
with your file input's id => $('myFileUploadId')
[code]
$('upload').addEvent("change", function(){
this.retrieve("cfe").a.addClass("hidden");
});
$('upload').retrieve("cfe").cross.addEvent("click", function()
{
this.a.removeClass("hidden");
}.bind($('upload').retrieve("cfe")));
$('upload').retrieve("cfe").initO = function(){
this.o.addEvents({
"mouseout":this.updateFilePath.bind(this),
"change": this.updateFilePath.bind(this)
});
this.o.addEvent("change", function(){
this.a.addClass("hidden");
}.bind(this));
this.o.setStyles({"cursor":"pointer","opacity":"0","visibility":"visible","height":
this.a.getHeight(),"width": "auto","position":"relative"});
if(window.gecko){this.o.setStyle("MozOpacity","0");}
};
[/code]
In the next version of cfe, this will be possible more elegantly :)
> 2009-03-13 19:27:08 CET byhttps://
sourceforge.net/users/hanscz/