readded some missing classes, fixed some styling on category.tpl, fixed image uploading code

v1.18.x
Julian Lam 10 years ago
parent 765f15096b
commit 815ea88fa5

@ -295,3 +295,25 @@
max-width: calc( ~"(100% - 200px)/4" );
}
}
.category-preview {
width: 100%;
height: 100px;
text-align: center;
color: white;
margin-top: 0;
.icon {
width: 30px;
height: 30px;
line-height: 40px;
display: inline-block;
margin: 35px 5px 0 5px;
}
}
.table-reordering {
tr:hover {
cursor: move;
}
}

@ -111,7 +111,7 @@ define('admin/manage/category', [
var inputEl = $(this),
cid = inputEl.attr('data-cid');
uploader.open(RELATIVE_PATH + '/admin/category/uploadpicture', { cid: cid }, 0, function(imageUrlOnServer) {
uploader.open(RELATIVE_PATH + '/api/admin/category/uploadpicture', { cid: cid }, 0, function(imageUrlOnServer) {
inputEl.val(imageUrlOnServer);
var previewBox = inputEl.parent().siblings('.category-preview');
previewBox.css('background', 'url(' + imageUrlOnServer + '?' + new Date().getTime() + ')')

@ -15,6 +15,7 @@
</tr>
</thead>
<tbody id="active-categories">
<!-- IF active.length -->
<!-- BEGIN active -->
<tr data-cid="{active.cid}">
<td>
@ -39,6 +40,15 @@
</td>
</tr>
<!-- END active -->
<!-- ELSE -->
<tr>
<td colspan="6">
<div class="alert alert-info text-center">
You have no active categories.
</div>
</td>
</tr>
<!-- ENDIF active.length -->
</tbody>
</table>
</div>
@ -61,6 +71,7 @@
</tr>
</thead>
<tbody id="disabled-categories">
<!-- IF disabled.length -->
<!-- BEGIN disabled -->
<tr data-cid="{disabled.cid}">
<td>
@ -85,6 +96,15 @@
</td>
</tr>
<!-- END disabled -->
<!-- ELSE -->
<tr>
<td colspan="6">
<div class="alert alert-info text-center">
You have no disabled categories.
</div>
</td>
</tr>
<!-- ENDIF disabled.length -->
</tbody>
</table>
</div>

@ -83,7 +83,7 @@
</div>
</div>
<div class="col-md-3 options">
<div class="col-md-3 options acp-sidebar">
<div class="panel panel-default hidden-sm">
<div class="panel-heading">Preview</div>
<div class="panel-body">
@ -97,10 +97,14 @@
<i data-name="icon" value="{category.icon}" class="fa {category.icon} fa-2x"></i>
</div>
</div>
<div class="btn-group-vertical">
<div class="btn-group btn-group-justified">
<div class="btn-group">
<button type="button" data-cid="{category.cid}" data-name="image" data-value="{category.image}" class="btn btn-default upload-button"><i class="fa fa-upload"></i> Upload Image</button>
</div>
<!-- IF category.image -->
<div class="btn-group">
<button class="btn btn-warning delete-image"><i data-name="icon" value="fa-times" class="fa fa-times"></i> Remove Image</button>
</div>
<!-- ENDIF category.image -->
</div>
</div>

Loading…
Cancel
Save