jQuery ui dialog

Permalink 1 user found helpful
How can I design the Ok or cancel button at my own jquery ui dialog? Have the concrete5 version 5.6.1.2. Should I realy use the old jquery dialog.open function and then load the html content in it? In this example the buttons won't be shown in this dialog:
confirmSendMail = function () {
            jQuery.fn.dialog.open({
                element: '.dialog-inner',
                title: $('.dialog-inner').attr('dialog-title'),
                width: 350,
                modal: true,
                height: 180,
                buttons: {
                    Ok: function () {
                        $(this).dialog("close");
                        alert($(this).data('url'));
                        return $(this).data('url');
                    },
                    Cancel: function () {
                        $(this).dialog("close");


If I use the jQuery ui, the buttons are shown but not in the css with the bootcamp classes like all other buttons in concrete5.

here is the code how it works:

confirmSendMail = function () {
                $("#dialog-confirm").dialog({
                    resizable: false,
                    title: $('#dialog-confirm').attr('dialog-title'),
                    width: 350,
                    modal: true,
                    height: 180,
                    buttons: {
                        Ok: function () {
                            $(this).dialog("close");
                            return window.location.replace($('.confirm-button').data('url'));
                        },
                        Cancel: function () {
                            $(this).dialog("close");
                            return false;


At the attechment you'll sea how concrete5 show the dialog with the old jquery code and the second dialog is with the jQuery ui but I can't design this buttons with the bootcamp classes.

Can someone tell me how to figure this out?

Thanks Naume

1 Attachment

naumeK
 
Frog replied on at Permalink Reply
Did you eventually figure this out? I've been trying to show buttons in a dialog as well, but haven't been able to do so.
Frog replied on at Permalink Reply
Never mind, I figured it out myself. Just in case anyone else has the same question, take a look at my topic athttp://www.concrete5.org/community/forums/customizing_c5/open-modal...
daenu replied on at Permalink Reply
daenu
Another approach, maybe? Don't know if it's the best but it works for a simple close button.
C5-Version: 5.6.2.1

HTML-Part:
<a href="javascript::void(0)" id="my-dialog-close" class="btn ccm-button-right cancel">' + ccm_t('close') + '</a>

JS-Part:
$('#my-dialog-close').live('click', function (e) {
        e.preventDefault();
        ccm_blockWindowClose();
    })