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:
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:
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
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");
Viewing 15 lines of 20 lines. View entire code block.
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;
Viewing 15 lines of 19 lines. View entire code block.
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

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.
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...
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:
JS-Part:
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(); })