diff --git a/gadjo/static/js/gadjo.js b/gadjo/static/js/gadjo.js index 6937eaf..923f8a2 100644 --- a/gadjo/static/js/gadjo.js +++ b/gadjo/static/js/gadjo.js @@ -38,12 +38,19 @@ var gadjo_js = gadjo_js || {}; * Submit is done in place if the $anchor has a data-inplace-submit="true" * attribute, a gadjo:dialog-done event is triggered on success, a * gadjo:dialog-submit-error event is triggered on failure. + * + * Dialog is modal by default, set data-modal="false" for non-modal + * dialogs. */ var $anchor = $(this); var url = $anchor.attr('href') || $anchor.data('url'); var selector = $anchor.data('selector') || 'form:not(.gadjo-popup-ignore)'; var title_selector = $anchor.data('title-selector') || '#appbar h2'; var inplace_submit = $anchor.data('inplace-submit'); + var modal = $anchor.data('modal'); + if (modal === undefined) { + modal = true; + } function show_error(message) { /* Add a div to body to show an error message and fade it out after 3 @@ -112,7 +119,7 @@ var gadjo_js = gadjo_js || {}; var title = $html.find(title_selector).text(); $form.dialog({ - modal: true, + modal: modal, 'title': title, width: 'auto', close: function (ev, ui) {