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" ); 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), var inputEl = $(this),
cid = inputEl.attr('data-cid'); 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); inputEl.val(imageUrlOnServer);
var previewBox = inputEl.parent().siblings('.category-preview'); var previewBox = inputEl.parent().siblings('.category-preview');
previewBox.css('background', 'url(' + imageUrlOnServer + '?' + new Date().getTime() + ')') previewBox.css('background', 'url(' + imageUrlOnServer + '?' + new Date().getTime() + ')')

@ -15,6 +15,7 @@
</tr> </tr>
</thead> </thead>
<tbody id="active-categories"> <tbody id="active-categories">
<!-- IF active.length -->
<!-- BEGIN active --> <!-- BEGIN active -->
<tr data-cid="{active.cid}"> <tr data-cid="{active.cid}">
<td> <td>
@ -39,6 +40,15 @@
</td> </td>
</tr> </tr>
<!-- END active --> <!-- 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> </tbody>
</table> </table>
</div> </div>
@ -61,6 +71,7 @@
</tr> </tr>
</thead> </thead>
<tbody id="disabled-categories"> <tbody id="disabled-categories">
<!-- IF disabled.length -->
<!-- BEGIN disabled --> <!-- BEGIN disabled -->
<tr data-cid="{disabled.cid}"> <tr data-cid="{disabled.cid}">
<td> <td>
@ -85,6 +96,15 @@
</td> </td>
</tr> </tr>
<!-- END disabled --> <!-- 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> </tbody>
</table> </table>
</div> </div>

@ -83,7 +83,7 @@
</div> </div>
</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 panel-default hidden-sm">
<div class="panel-heading">Preview</div> <div class="panel-heading">Preview</div>
<div class="panel-body"> <div class="panel-body">
@ -97,10 +97,14 @@
<i data-name="icon" value="{category.icon}" class="fa {category.icon} fa-2x"></i> <i data-name="icon" value="{category.icon}" class="fa {category.icon} fa-2x"></i>
</div> </div>
</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> <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 --> <!-- 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> <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 --> <!-- ENDIF category.image -->
</div> </div>
</div> </div>

Loading…
Cancel
Save