custom title bar icons
custom title bar icons
Hi Group,
I'm new to jQuery UI, but it's looking solid - I'm very happy :-)
I need to add some icons to a dialog, next to the close icon, and
while I could just hack those in, I would rather make this feature
generally available through the options.
Looking at the code that creates the close button...
uiDialogTitlebarClose = $('<a href="#"/>')
.addClass(
'ui-dialog-titlebar-close ' +
'ui-corner-all'
)
.attr('role', 'button')
.hover(
function() {
uiDialogTitlebarClose.addClass('ui-state-hover');
},
function() {
uiDialogTitlebarClose.removeClass('ui-state-hover');
}
)
.focus(function() {
uiDialogTitlebarClose.addClass('ui-state-focus');
})
.blur(function() {
uiDialogTitlebarClose.removeClass('ui-state-focus');
})
.mousedown(function(ev) {
ev.stopPropagation();
})
.click(function(event) {
self.close(event);
return false;
})
.appendTo(uiDialogTitlebar),
uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = $
('<span/>'))
.addClass(
'ui-icon ' +
'ui-icon-closethick'
)
.text(options.closeText)
.appendTo(uiDialogTitlebarClose),
What is the closeText for? The closeText option is undocumented, so
I'm guessing either it's incomplete, or it's something to do with
accessibility?