问题
I want to use jQuery ui-icon-close
instead of ui-icon-cancel
. So I go to the fileupload.js
file in the primefaces jar (3.3.1), change the reference to ui-icon-cancel
to ui-icon-close
(line#2082, upload template). But it doesn't work. Any idea? Thanks.
回答1:
I found an easier way to solve this problem:
I added an id to my fileupload control:
<p:fileUpload id="related_file" ..../>
Then in my css, I add the following lines:
div[id*=related_file] .ui-icon-cancel{ background-position: -96px -128px !important; }
This works and the cancel button ends up using the ui-icon-closeThick icon.
But I would still like to know why my original approach didn't work if anybody knows the answer. Thanks.
来源:https://stackoverflow.com/questions/13594499/how-to-change-primefaces-fileupload-cancel-button-icon