general: remove cell content only once new content has arrived (#9596)
This commit is contained in:
parent
9909a35461
commit
77c92c7b95
|
@ -7,6 +7,7 @@ function combo_load_cell(elem, url) {
|
|||
success: function(data) {
|
||||
var parent = $(elem).parent();
|
||||
$(elem).parent().parent().addClass('ajax-loaded');
|
||||
$(elem).parent().nextAll().remove();
|
||||
if (data == '') {
|
||||
$(elem).remove();
|
||||
} else {
|
||||
|
@ -73,10 +74,9 @@ $(function() {
|
|||
function combo_refresh_ajax_cells() {
|
||||
$('[data-ajax-cell-url]').each(function(idx, elem) {
|
||||
var $elem = $(elem);
|
||||
var $div = $elem.find('> div');
|
||||
$div.empty();
|
||||
var msg = $(elem).data('ajax-cell-loading-message');
|
||||
$div.append($('<span class="loading-message">' + msg + '</span>'));
|
||||
$elem.prepend('<div><div class="loading"><span class="loading-message">' + msg + '</span></div></div>');
|
||||
combo_load_cell($elem.find('div.loading'), $elem.data('ajax-cell-url'));
|
||||
combo_load_cell($div.find('span'), $elem.data('ajax-cell-url'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -49,6 +49,12 @@ div.cell div.loading {
|
|||
to { width: 100%; }
|
||||
}
|
||||
|
||||
div.ajax-loaded div.loading {
|
||||
position: absolute;
|
||||
width: 10%;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
div.cell div.loading span {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
|
|
Loading…
Reference in New Issue