I have a strange error occurring with the dialog box, I'm loading the dialog box fine, but whenever I assign a button to it, although it'll display the button, it won't display the name of the button. Here is my code that launches the dialog successfully...
jQuery('#'+message_div_id).dialog({
modal: ui_popup_modal
, width: ui_popup_width
, height: ui_popup_height
, resizable: false
, draggable: false
, buttons: {
"Ok": function() {
jQuery( this ).dialog( "close" );
}
}
});
This is the resulting html from bugzilla after the popup has loaded...
< button type="button" text="Ok" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false">< span class="ui-button-text">< /span>< /button>
The span class is the area that should contain the text, but as you can see, it is not. Any ideas?
This inspired me a lot, but it didn't work exactly for me, I made the following modifications. I think this works better.
$('div.ui-dialog-buttonset button.ui-button span.ui-button-text').each(function() {
$(this).html($(this).parent().attr('text'));
});
This works for me with jQuery UI v1.8.22 CDN (tested):
$('div.ui-dialog button.ui-button').each(function() {
$(this).children('.ui-button-text').html($(this).attr('text'));
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With