From 4dc8f2c2e1bd543cd5124fba5dce7557b291490e Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Sun, 5 Jan 2014 01:26:23 -0500 Subject: [PATCH] closes #665 --- public/src/forum/admin/categories.js | 4 +++- public/templates/admin/categories.tpl | 2 +- public/templates/home.tpl | 11 ++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/public/src/forum/admin/categories.js b/public/src/forum/admin/categories.js index 47cf72b80a..a46b92cc11 100644 --- a/public/src/forum/admin/categories.js +++ b/public/src/forum/admin/categories.js @@ -186,7 +186,9 @@ define(['uploader'], function(uploader) { var cid = $(this).parents('li[data-cid]').attr('data-cid'); uploader.open(RELATIVE_PATH + '/admin/category/uploadpicture', {cid:cid}, function(imageUrlOnServer) { inputEl.value = imageUrlOnServer; - $(inputEl).parents('li[data-cid]').find('.preview-box').css('background', 'url(' + imageUrlOnServer + '?' + new Date().getTime() + ')'); + var previewBox = $(inputEl).parents('li[data-cid]').find('.preview-box'); + previewBox.css('background', 'url(' + imageUrlOnServer + '?' + new Date().getTime() + ')') + .css('background-size', 'cover'); modified(inputEl); }); }); diff --git a/public/templates/admin/categories.tpl b/public/templates/admin/categories.tpl index 721b03ddf6..25018e3f58 100644 --- a/public/templates/admin/categories.tpl +++ b/public/templates/admin/categories.tpl @@ -15,7 +15,7 @@