Issue #3248448 by hooroomoo, lauriii, Wim Leers: Dialog loading text is unstyled
parent
96cfccf8f3
commit
02f32df865
|
@ -505,30 +505,18 @@
|
||||||
window.matchMedia('(min-width: 600px)').matches;
|
window.matchMedia('(min-width: 600px)').matches;
|
||||||
dialogSettings.width = 'auto';
|
dialogSettings.width = 'auto';
|
||||||
|
|
||||||
const $content = $(
|
|
||||||
`<div class="ckeditor5-dialog-loading"><span style="top: -40px;" class="ckeditor5-dialog-loading-link">${Drupal.t(
|
|
||||||
'Loading...',
|
|
||||||
)}</span></div>`,
|
|
||||||
);
|
|
||||||
$content.appendTo($('body'));
|
|
||||||
|
|
||||||
const ckeditorAjaxDialog = Drupal.ajax({
|
const ckeditorAjaxDialog = Drupal.ajax({
|
||||||
dialog: dialogSettings,
|
dialog: dialogSettings,
|
||||||
dialogType: 'modal',
|
dialogType: 'modal',
|
||||||
selector: '.ckeditor5-dialog-loading-link',
|
selector: '.ckeditor5-dialog-loading-link',
|
||||||
url,
|
url,
|
||||||
progress: { type: 'throbber' },
|
progress: { type: 'fullscreen' },
|
||||||
submit: {
|
submit: {
|
||||||
editor_object: {},
|
editor_object: {},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
ckeditorAjaxDialog.execute();
|
ckeditorAjaxDialog.execute();
|
||||||
|
|
||||||
// After a short delay, show "Loading…" message.
|
|
||||||
window.setTimeout(() => {
|
|
||||||
$content.find('span').animate({ top: '0px' });
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
// Store the save callback to be executed when this dialog is closed.
|
// Store the save callback to be executed when this dialog is closed.
|
||||||
Drupal.ckeditor5.saveCallback = saveCallback;
|
Drupal.ckeditor5.saveCallback = saveCallback;
|
||||||
},
|
},
|
||||||
|
|
|
@ -305,26 +305,19 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
||||||
dialogSettings.dialogClass = classes.join(' ');
|
dialogSettings.dialogClass = classes.join(' ');
|
||||||
dialogSettings.autoResize = window.matchMedia('(min-width: 600px)').matches;
|
dialogSettings.autoResize = window.matchMedia('(min-width: 600px)').matches;
|
||||||
dialogSettings.width = 'auto';
|
dialogSettings.width = 'auto';
|
||||||
var $content = $("<div class=\"ckeditor5-dialog-loading\"><span style=\"top: -40px;\" class=\"ckeditor5-dialog-loading-link\">".concat(Drupal.t('Loading...'), "</span></div>"));
|
|
||||||
$content.appendTo($('body'));
|
|
||||||
var ckeditorAjaxDialog = Drupal.ajax({
|
var ckeditorAjaxDialog = Drupal.ajax({
|
||||||
dialog: dialogSettings,
|
dialog: dialogSettings,
|
||||||
dialogType: 'modal',
|
dialogType: 'modal',
|
||||||
selector: '.ckeditor5-dialog-loading-link',
|
selector: '.ckeditor5-dialog-loading-link',
|
||||||
url: url,
|
url: url,
|
||||||
progress: {
|
progress: {
|
||||||
type: 'throbber'
|
type: 'fullscreen'
|
||||||
},
|
},
|
||||||
submit: {
|
submit: {
|
||||||
editor_object: {}
|
editor_object: {}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ckeditorAjaxDialog.execute();
|
ckeditorAjaxDialog.execute();
|
||||||
window.setTimeout(function () {
|
|
||||||
$content.find('span').animate({
|
|
||||||
top: '0px'
|
|
||||||
});
|
|
||||||
}, 1000);
|
|
||||||
Drupal.ckeditor5.saveCallback = saveCallback;
|
Drupal.ckeditor5.saveCallback = saveCallback;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue