Node.js based forum software built for the modern web
closes #3530
barisusaklia1c407acd000
diff --git a/public/src/admin/manage/flags.js b/public/src/admin/manage/flags.jsindex 880094af20..5cbf55f7f1 100644--- a/public/src/admin/manage/flags.js+++ b/public/src/admin/manage/flags.js@@ -2,15 +2,15 @@/*global define, socket, app, admin, utils, bootbox, RELATIVE_PATH*/define('admin/manage/flags', [- 'forum/infinitescroll',- 'admin/modules/selectable',+ 'forum/infinitescroll',+ 'admin/modules/selectable','autocomplete'], function(infinitescroll, selectable, autocomplete) {var Flags = {};Flags.init = function() {- $('.post-container .content img').addClass('img-responsive');+ $('.post-container .content img:not(.not-responsive)').addClass('img-responsive');var params = utils.params();$('#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) {$('[data-next]').attr('data-next', data.next);$('.post-container').append(html);- html.find('img').addClass('img-responsive');+ html.find('img:not(.not-responsive)').addClass('img-responsive');done();});} else {diff --git a/public/src/client/account/favourites.js b/public/src/client/account/favourites.jsindex fd5931cc49..9d732418c4 100644--- a/public/src/client/account/favourites.js+++ b/public/src/client/account/favourites.js@@ -8,7 +8,7 @@ define('forum/account/favourites', ['forum/account/header', 'forum/account/postsFavourites.init = function() {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');};diff --git a/public/src/client/account/posts.js b/public/src/client/account/posts.jsindex 94dac96323..b5b04056e8 100644--- a/public/src/client/account/posts.js+++ b/public/src/client/account/posts.js@@ -9,7 +9,7 @@ define('forum/account/posts', ['forum/account/header', 'forum/infinitescroll'],AccountPosts.init = function() {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');};@@ -43,7 +43,7 @@ define('forum/account/posts', ['forum/account/header', 'forum/infinitescroll'],function onPostsLoaded(posts, callback) {infinitescroll.parseAndTranslate(template, 'posts', {posts: posts}, function(html) {$('[component="posts"]').append(html);- html.find('img').addClass('img-responsive');+ html.find('img:not(.not-responsive)').addClass('img-responsive');html.find('.timeago').timeago();app.createUserTooltips();utils.makeNumbersHumanReadable(html.find('.human-readable-number'));diff --git a/public/src/client/account/profile.js b/public/src/client/account/profile.jsindex 5e72605017..c369f9da16 100644--- a/public/src/client/account/profile.js+++ b/public/src/client/account/profile.js@@ -44,7 +44,7 @@ define('forum/account/profile', ['forum/account/header', 'forum/infinitescroll',};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() {diff --git a/public/src/client/categories.js b/public/src/client/categories.jsindex 33db4ef784..32f6af67c3 100644--- a/public/src/client/categories.js+++ b/public/src/client/categories.js@@ -62,7 +62,7 @@ define('forum/categories', ['components', 'translator'], function(components, trtemplates.parse('categories', 'posts', {categories: {posts: posts}}, function(html) {translator.translate(html, function(translatedHTML) {translatedHTML = $(translatedHTML);- translatedHTML.find('img').addClass('img-responsive');+ translatedHTML.find('img:not(.not-responsive)').addClass('img-responsive');translatedHTML.find('.timeago').timeago();callback(translatedHTML);});diff --git a/public/src/client/chats.js b/public/src/client/chats.jsindex ed91a75da7..4a0fdd942f 100644--- a/public/src/client/chats.js+++ b/public/src/client/chats.js@@ -130,7 +130,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',chatContainer = $('.chat-content');newMessage.appendTo(chatContainer);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'));}diff --git a/public/src/client/groups/details.js b/public/src/client/groups/details.jsindex ae6c46e03c..f5fb69e401 100644--- a/public/src/client/groups/details.js+++ b/public/src/client/groups/details.js@@ -24,7 +24,7 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrolhandleMemberInfiniteScroll();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() {var btnEl = $(this),diff --git a/public/src/client/search.js b/public/src/client/search.jsindex 5633884ff5..c7330f1ab8 100644--- a/public/src/client/search.js+++ b/public/src/client/search.js@@ -125,12 +125,12 @@ define('forum/search', ['search', 'autocomplete'], function(searchModule, autocovar result = $(this);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'));});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) {diff --git a/public/src/client/topic/events.js b/public/src/client/topic/events.jsindex 2d62781ee6..200a362b69 100644--- a/public/src/client/topic/events.js+++ b/public/src/client/topic/events.js@@ -110,7 +110,7 @@ define('forum/topic/events', [editedPostEl.fadeOut(250, function() {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'));editedPostEl.fadeIn(250);});diff --git a/public/src/modules/chat.js b/public/src/modules/chat.jsindex 4c934b19b8..2d364b0f8f 100644--- a/public/src/modules/chat.js+++ b/public/src/modules/chat.js@@ -241,7 +241,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'trachatModal.find('.chat-content').css('height', module.calculateChatListHeight(chatModal));});-+chatModal.draggable({start:function() {module.bringModalToTop(chatModal);@@ -265,7 +265,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra$(window).one('action:ajaxify.end', function() {components.get('chat/input').val(text);});-+ajaxify.go('chats/' + utils.slugify(data.username));module.close(chatModal);}@@ -471,7 +471,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'traChats.parseMessage(data, function(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.appendTo(chatContent);Chats.scrollToBottom(chatContent);diff --git a/public/src/widgets.js b/public/src/widgets.jsindex 56a7927e47..18d593ad1f 100644--- a/public/src/widgets.js+++ b/public/src/widgets.js@@ -18,7 +18,7 @@if (template.match(/^admin/)) {return callback();}-+var widgetLocations = ['sidebar', 'footer', 'header'], numLocations;$('#content [widget-area]').each(function() {@@ -74,7 +74,7 @@}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('img[title].teaser-pic,img[title].user-img').each(function() {$(this).tooltip({