Commit b2af123b authored by yPhil's avatar yPhil
Browse files

clearWindowSpinner

parent a4e7d83c
Pipeline #495150 passed with stage
in 38 seconds
......@@ -472,6 +472,18 @@ PTL.dialog = {
const $dialog = $(this);
function clearWindow (callback) {
$('div#feedNewListDiv')
.empty()
.append($('<p>')
.attr('class', 'feedsAddDivListP translate')
.text(PTL.tr('Feed categories') + ' ')
.data('content', 'Feed categories')
.append($('<i>').attr('class', 'icon-refresh spin clearWindowSpinner')))
.append(PTL.dialog.suggestionList(PTL.prefs.getDefaultFeeds(), $dialog));
callback();
}
$dialog.dialog({
title: PTL.tr('New feed'),
width: PTL.util.isMobile() ? 'auto' : 630,
......@@ -482,13 +494,9 @@ PTL.dialog = {
title: PTL.tr('Suggestions'),
class: 'translate',
click: function() {
$('div#feedNewListDiv')
.empty()
.append($('<p>')
.attr('class', 'feedsAddDivListP translate')
.text(PTL.tr('Feed categories'))
.data('content', 'Feed categories')
.append(PTL.dialog.suggestionList(PTL.prefs.getDefaultFeeds(), $dialog)));
clearWindow(function() {
$('i.clearWindowSpinner').remove();
});
}
},
{
......@@ -496,6 +504,7 @@ PTL.dialog = {
title: PTL.tr('Close'),
class: 'translate',
click: function() {
$('div#feedNewListDiv').empty();
PTL.dialog.kill($dialog);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment