mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
closes #3530
This commit is contained in:
@@ -2,15 +2,15 @@
|
|||||||
/*global define, socket, app, admin, utils, bootbox, RELATIVE_PATH*/
|
/*global define, socket, app, admin, utils, bootbox, RELATIVE_PATH*/
|
||||||
|
|
||||||
define('admin/manage/flags', [
|
define('admin/manage/flags', [
|
||||||
'forum/infinitescroll',
|
'forum/infinitescroll',
|
||||||
'admin/modules/selectable',
|
'admin/modules/selectable',
|
||||||
'autocomplete'
|
'autocomplete'
|
||||||
], function(infinitescroll, selectable, autocomplete) {
|
], function(infinitescroll, selectable, autocomplete) {
|
||||||
|
|
||||||
var Flags = {};
|
var Flags = {};
|
||||||
|
|
||||||
Flags.init = function() {
|
Flags.init = function() {
|
||||||
$('.post-container .content img').addClass('img-responsive');
|
$('.post-container .content img:not(.not-responsive)').addClass('img-responsive');
|
||||||
|
|
||||||
var params = utils.params();
|
var params = utils.params();
|
||||||
$('#flag-sort-by').val(params.sortBy);
|
$('#flag-sort-by').val(params.sortBy);
|
||||||
@@ -91,7 +91,7 @@ define('admin/manage/flags', [
|
|||||||
infinitescroll.parseAndTranslate('admin/manage/flags', 'posts', {posts: data.posts}, function(html) {
|
infinitescroll.parseAndTranslate('admin/manage/flags', 'posts', {posts: data.posts}, function(html) {
|
||||||
$('[data-next]').attr('data-next', data.next);
|
$('[data-next]').attr('data-next', data.next);
|
||||||
$('.post-container').append(html);
|
$('.post-container').append(html);
|
||||||
html.find('img').addClass('img-responsive');
|
html.find('img:not(.not-responsive)').addClass('img-responsive');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ define('forum/account/favourites', ['forum/account/header', 'forum/account/posts
|
|||||||
Favourites.init = function() {
|
Favourites.init = function() {
|
||||||
header.init();
|
header.init();
|
||||||
|
|
||||||
$('[component="post/content"] img').addClass('img-responsive');
|
$('[component="post/content"] img:not(.not-responsive)').addClass('img-responsive');
|
||||||
|
|
||||||
posts.handleInfiniteScroll('posts.loadMoreFavourites', 'account/favourites');
|
posts.handleInfiniteScroll('posts.loadMoreFavourites', 'account/favourites');
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ define('forum/account/posts', ['forum/account/header', 'forum/infinitescroll'],
|
|||||||
AccountPosts.init = function() {
|
AccountPosts.init = function() {
|
||||||
header.init();
|
header.init();
|
||||||
|
|
||||||
$('[component="post/content"] img').addClass('img-responsive');
|
$('[component="post/content"] img:not(.not-responsive)').addClass('img-responsive');
|
||||||
|
|
||||||
AccountPosts.handleInfiniteScroll('posts.loadMoreUserPosts', 'account/posts');
|
AccountPosts.handleInfiniteScroll('posts.loadMoreUserPosts', 'account/posts');
|
||||||
};
|
};
|
||||||
@@ -43,7 +43,7 @@ define('forum/account/posts', ['forum/account/header', 'forum/infinitescroll'],
|
|||||||
function onPostsLoaded(posts, callback) {
|
function onPostsLoaded(posts, callback) {
|
||||||
infinitescroll.parseAndTranslate(template, 'posts', {posts: posts}, function(html) {
|
infinitescroll.parseAndTranslate(template, 'posts', {posts: posts}, function(html) {
|
||||||
$('[component="posts"]').append(html);
|
$('[component="posts"]').append(html);
|
||||||
html.find('img').addClass('img-responsive');
|
html.find('img:not(.not-responsive)').addClass('img-responsive');
|
||||||
html.find('.timeago').timeago();
|
html.find('.timeago').timeago();
|
||||||
app.createUserTooltips();
|
app.createUserTooltips();
|
||||||
utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
|
utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ define('forum/account/profile', ['forum/account/header', 'forum/infinitescroll',
|
|||||||
};
|
};
|
||||||
|
|
||||||
function processPage() {
|
function processPage() {
|
||||||
$('[component="posts"] img, [component="aboutme"] img').addClass('img-responsive');
|
$('[component="posts"] img:not(.not-responsive), [component="aboutme"] img:not(.not-responsive)').addClass('img-responsive');
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateButtons() {
|
function updateButtons() {
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ define('forum/categories', ['components', 'translator'], function(components, tr
|
|||||||
templates.parse('categories', 'posts', {categories: {posts: posts}}, function(html) {
|
templates.parse('categories', 'posts', {categories: {posts: posts}}, function(html) {
|
||||||
translator.translate(html, function(translatedHTML) {
|
translator.translate(html, function(translatedHTML) {
|
||||||
translatedHTML = $(translatedHTML);
|
translatedHTML = $(translatedHTML);
|
||||||
translatedHTML.find('img').addClass('img-responsive');
|
translatedHTML.find('img:not(.not-responsive)').addClass('img-responsive');
|
||||||
translatedHTML.find('.timeago').timeago();
|
translatedHTML.find('.timeago').timeago();
|
||||||
callback(translatedHTML);
|
callback(translatedHTML);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
chatContainer = $('.chat-content');
|
chatContainer = $('.chat-content');
|
||||||
newMessage.appendTo(chatContainer);
|
newMessage.appendTo(chatContainer);
|
||||||
newMessage.find('.timeago').timeago();
|
newMessage.find('.timeago').timeago();
|
||||||
newMessage.find('img:not(".chat-user-image")').addClass('img-responsive');
|
newMessage.find('img:not(.not-responsive)').addClass('img-responsive');
|
||||||
Chats.scrollToBottom($('.expanded-chat .chat-content'));
|
Chats.scrollToBottom($('.expanded-chat .chat-content'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrol
|
|||||||
handleMemberInfiniteScroll();
|
handleMemberInfiniteScroll();
|
||||||
handleMemberInvitations();
|
handleMemberInvitations();
|
||||||
|
|
||||||
components.get('groups/activity').find('.content img').addClass('img-responsive');
|
components.get('groups/activity').find('.content img:not(.not-responsive)').addClass('img-responsive');
|
||||||
|
|
||||||
detailsPage.on('click', '[data-action]', function() {
|
detailsPage.on('click', '[data-action]', function() {
|
||||||
var btnEl = $(this),
|
var btnEl = $(this),
|
||||||
|
|||||||
@@ -125,12 +125,12 @@ define('forum/search', ['search', 'autocomplete'], function(searchModule, autoco
|
|||||||
var result = $(this);
|
var result = $(this);
|
||||||
|
|
||||||
var text = result.html().replace(regex, '<strong>$1</strong>');
|
var text = result.html().replace(regex, '<strong>$1</strong>');
|
||||||
result.html(text).find('img').addClass('img-responsive').each(function() {
|
result.html(text).find('img:not(.not-responsive)').addClass('img-responsive').each(function() {
|
||||||
$(this).attr('src', $(this).attr('src').replace(/<strong>([\s\S]*?)<\/strong>/gi, '$1'));
|
$(this).attr('src', $(this).attr('src').replace(/<strong>([\s\S]*?)<\/strong>/gi, '$1'));
|
||||||
});
|
});
|
||||||
|
|
||||||
result.find('a').each(function() {
|
result.find('a').each(function() {
|
||||||
$(this).attr('href', $(this).attr('href').replace(/<strong>([\s\S]*?)<\/strong>/gi, '$1'));
|
$(this).attr('href', $(this).attr('href').replace(/<strong>([\s\S]*?)<\/strong>/gi, '$1'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ define('forum/topic/events', [
|
|||||||
|
|
||||||
editedPostEl.fadeOut(250, function() {
|
editedPostEl.fadeOut(250, function() {
|
||||||
editedPostEl.html(data.post.content);
|
editedPostEl.html(data.post.content);
|
||||||
editedPostEl.find('img').addClass('img-responsive');
|
editedPostEl.find('img:not(.not-responsive)').addClass('img-responsive');
|
||||||
app.replaceSelfLinks(editedPostEl.find('a'));
|
app.replaceSelfLinks(editedPostEl.find('a'));
|
||||||
editedPostEl.fadeIn(250);
|
editedPostEl.fadeIn(250);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
|
|
||||||
chatModal.find('.chat-content').css('height', module.calculateChatListHeight(chatModal));
|
chatModal.find('.chat-content').css('height', module.calculateChatListHeight(chatModal));
|
||||||
});
|
});
|
||||||
|
|
||||||
chatModal.draggable({
|
chatModal.draggable({
|
||||||
start:function() {
|
start:function() {
|
||||||
module.bringModalToTop(chatModal);
|
module.bringModalToTop(chatModal);
|
||||||
@@ -265,7 +265,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
$(window).one('action:ajaxify.end', function() {
|
$(window).one('action:ajaxify.end', function() {
|
||||||
components.get('chat/input').val(text);
|
components.get('chat/input').val(text);
|
||||||
});
|
});
|
||||||
|
|
||||||
ajaxify.go('chats/' + utils.slugify(data.username));
|
ajaxify.go('chats/' + utils.slugify(data.username));
|
||||||
module.close(chatModal);
|
module.close(chatModal);
|
||||||
}
|
}
|
||||||
@@ -471,7 +471,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
|
|
||||||
Chats.parseMessage(data, function(html) {
|
Chats.parseMessage(data, function(html) {
|
||||||
var message = $(html);
|
var message = $(html);
|
||||||
message.find('img:not(".chat-user-image")').addClass('img-responsive');
|
message.find('img:not(.not-responsive)').addClass('img-responsive');
|
||||||
message.find('.timeago').timeago();
|
message.find('.timeago').timeago();
|
||||||
message.appendTo(chatContent);
|
message.appendTo(chatContent);
|
||||||
Chats.scrollToBottom(chatContent);
|
Chats.scrollToBottom(chatContent);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
if (template.match(/^admin/)) {
|
if (template.match(/^admin/)) {
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
var widgetLocations = ['sidebar', 'footer', 'header'], numLocations;
|
var widgetLocations = ['sidebar', 'footer', 'header'], numLocations;
|
||||||
|
|
||||||
$('#content [widget-area]').each(function() {
|
$('#content [widget-area]').each(function() {
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var widgetAreas = $('#content [widget-area]');
|
var widgetAreas = $('#content [widget-area]');
|
||||||
widgetAreas.find('img:not(.user-img)').addClass('img-responsive');
|
widgetAreas.find('img:not(.not-responsive)').addClass('img-responsive');
|
||||||
widgetAreas.find('.timeago').timeago();
|
widgetAreas.find('.timeago').timeago();
|
||||||
widgetAreas.find('img[title].teaser-pic,img[title].user-img').each(function() {
|
widgetAreas.find('img[title].teaser-pic,img[title].user-img').each(function() {
|
||||||
$(this).tooltip({
|
$(this).tooltip({
|
||||||
|
|||||||
Reference in New Issue
Block a user