mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 15:35:47 +01:00
closes #665
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<li data-cid="{categories.cid}" class="entry-row">
|
||||
<div class="row">
|
||||
<div class="col-sm-2 hidden-xs text-center">
|
||||
<div class="preview-box" style="background: {categories.background}; color: {categories.color};">
|
||||
<div class="preview-box" style="background: {categories.background}; color: {categories.color}; background-size:cover;">
|
||||
<div class="icon">
|
||||
<i data-name="icon" value="{categories.icon}" class="fa {categories.icon} fa-2x"></i>
|
||||
</div>
|
||||
|
||||
@@ -5,9 +5,18 @@
|
||||
<div class="row home" itemscope itemtype="http://www.schema.org/ItemList">
|
||||
<!-- BEGIN categories -->
|
||||
<div class="{categories.class}">
|
||||
<!-- IF categories.link -->
|
||||
<a href="{categories.link}" itemprop="url" target="_blank">
|
||||
<!-- ELSE -->
|
||||
<a href="{relative_path}/category/{categories.slug}" itemprop="url">
|
||||
<!-- ENDIF categories.link -->
|
||||
<meta itemprop="name" content="{categories.name}">
|
||||
<h4><span class="badge {categories.badgeclass}">{categories.topic_count} </span> {categories.name}</h4>
|
||||
<h4>
|
||||
<!-- IF !categories.link -->
|
||||
<span class="badge {categories.badgeclass}">{categories.topic_count} </span>
|
||||
<!-- ENDIF !categories.link -->
|
||||
{categories.name}
|
||||
</h4>
|
||||
<div class="icon" style="background: {categories.background}; color: {categories.color};">
|
||||
<div id="category-{categories.cid}" class="category-slider-{categories.post_count}">
|
||||
<div class="category-box"><i class="fa {categories.icon} fa-4x"></i></div>
|
||||
|
||||
Reference in New Issue
Block a user