CRM.loadPage - Set dialog title for confirm dialogs
authorColeman Watts <coleman@civicrm.org>
Sun, 1 Mar 2015 17:02:02 +0000 (12:02 -0500)
committerColeman Watts <coleman@civicrm.org>
Mon, 2 Mar 2015 15:55:21 +0000 (10:55 -0500)
js/crm.ajax.js

index 8a8e74cc49e60a72bbb73228a208c57f74369386..7c22c3ddd97a8e9abdef8bc4df6b9a501cf3ead3 100644 (file)
     // Create new dialog
     if (settings.dialog) {
       settings.dialog = CRM.utils.adjustDialogDefaults(settings.dialog);
-      $('<div id="'+ settings.target.substring(1) +'"><div class="crm-loading-element">' + ts('Loading') + '...</div></div>').dialog(settings.dialog);
+      $('<div id="' + settings.target.substring(1) + '"></div>').dialog(settings.dialog);
+    }
+    if ($(settings.target).data('uiDialog')) {
       $(settings.target)
         .on('dialogclose', function() {
-          if ($(this).attr('data-unsaved-changes') !== 'true') {
+          if (settings.dialog && $(this).attr('data-unsaved-changes') !== 'true') {
             $(this).crmSnippet('destroy').dialog('destroy').remove();
           }
         })