mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-03 19:11:22 +01:00
fix: overflowing images on /world
This commit is contained in:
@@ -19,7 +19,7 @@ define('forum/world', [
|
|||||||
});
|
});
|
||||||
|
|
||||||
sort.handleSort('categoryTopicSort', 'world');
|
sort.handleSort('categoryTopicSort', 'world');
|
||||||
|
handleImages();
|
||||||
handleButtons();
|
handleButtons();
|
||||||
handleHelp();
|
handleHelp();
|
||||||
|
|
||||||
@@ -30,7 +30,6 @@ define('forum/world', [
|
|||||||
socket.removeListener('event:new_post', onNewPost);
|
socket.removeListener('event:new_post', onNewPost);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Add label to sort
|
// Add label to sort
|
||||||
const sortLabelEl = document.getElementById('sort-label');
|
const sortLabelEl = document.getElementById('sort-label');
|
||||||
const sortOptionsEl = document.getElementById('sort-options');
|
const sortOptionsEl = document.getElementById('sort-options');
|
||||||
@@ -76,6 +75,7 @@ define('forum/world', [
|
|||||||
const listEl = document.getElementById('world-feed');
|
const listEl = document.getElementById('world-feed');
|
||||||
$(listEl).append(html);
|
$(listEl).append(html);
|
||||||
html.find('.timeago').timeago();
|
html.find('.timeago').timeago();
|
||||||
|
handleImages();
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -204,6 +204,10 @@ define('forum/world', [
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleImages() {
|
||||||
|
$('[component="post/content"] img:not(.not-responsive)').addClass('img-fluid');
|
||||||
|
}
|
||||||
|
|
||||||
function updateDropdowns(modified_cids, state) {
|
function updateDropdowns(modified_cids, state) {
|
||||||
modified_cids.forEach(function (cid) {
|
modified_cids.forEach(function (cid) {
|
||||||
const category = $('[data-cid="' + cid + '"]');
|
const category = $('[data-cid="' + cid + '"]');
|
||||||
@@ -229,6 +233,7 @@ define('forum/world', [
|
|||||||
}
|
}
|
||||||
|
|
||||||
feedEl.prepend(...html);
|
feedEl.prepend(...html);
|
||||||
|
handleImages();
|
||||||
}
|
}
|
||||||
|
|
||||||
return World;
|
return World;
|
||||||
|
|||||||
Reference in New Issue
Block a user