app/assets/javascripts/jqr-helpers.js in jqr-helpers-1.0.16 vs app/assets/javascripts/jqr-helpers.js in jqr-helpers-1.0.17

- old
+ new

@@ -91,17 +91,18 @@ } if (url) { $(this).trigger('jqr.beforedialogopen'); $(document.body).append('<div class="ui-widget-overlay ui-front">'); $(document.body).append('<div id="remote-dialog-throbber">'); + var closeX = $(this).data('close-x'); if (dialogElement.length == 0) { $('body').append("<div id='" + dialogID + "'>"); dialogElement = $('#' + dialogID); - if ($(this).data('close-x')) { - dialogElement.prepend('<span class="ujs-dialog-x"></span>'); - } } dialogElement.load(url, function() { + if (closeX) { + dialogElement.prepend('<span class="ujs-dialog-x"></span>'); + } $('.ui-widget-overlay').remove(); $('#remote-dialog-throbber').remove(); $(this).dialog(dialogOptions); $(dialogElement).trigger('jqr.load'); });