I have had success with this code to help me change the color and text of my buttons. The icon isn't working in this case but I have made it work elsewhere so I will get that figured out eventually. What I don't understand is that after I upload a file, the button reverts to the purple default color and the default text. I have the ctrl.refresh();
in place but I suspect I need something else.
//Changing the button name; works upon first load but subsequent uploads reverts the button name back to Upload STEM
fd.spRendered(function() {
fd.control('StemMediaUpload').ready(function(dt) {
fd.control('StemMediaUpload').uploadingText = 'Uploading Stem Media';
fd.control('StemMediaUpload').refresh();
//dt parameter is the same as fd.control('StemMediaUpload')
dt.buttons[1].text = 'Upload Stem Media Here';
dt.buttons[1].class = 'btn-success';
dt.buttons[1].icon = 'Upload';
ctrl.refresh();
});
});
ON FIRST LOAD
DURING UPLOAD
AFTER UPLOAD
Anyone out there see this and have a solution?
Thanks in advance.