Closed #23
This commit is contained in:
parent
ab26cb8ef2
commit
53f9076bff
3 changed files with 59 additions and 7 deletions
|
@ -50,15 +50,48 @@
|
|||
margin-bottom: 4em;
|
||||
}
|
||||
|
||||
.post .remove-trigger {
|
||||
cursor: pointer;
|
||||
.post .ops {
|
||||
float: right;
|
||||
color: rgba(128, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.post .ops a {
|
||||
cursor: pointer;
|
||||
margin-left: 0.5em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.post .remove-trigger span {
|
||||
.post a span {
|
||||
margin-left: 0.25em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.post .move-up-trigger,
|
||||
.post .move-down-trigger {
|
||||
color: rgba(0, 64, 128, 0.5);
|
||||
}
|
||||
.post .move-up-trigger:hover,
|
||||
.post .move-down-trigger:hover {
|
||||
color: #00f;
|
||||
}
|
||||
.post .move-up-trigger span,
|
||||
.post .move-down-trigger span {
|
||||
color: rgba(0, 64, 128, 1);
|
||||
}
|
||||
|
||||
.post:first-child .move-up-trigger {
|
||||
display: none;
|
||||
}
|
||||
.post:last-child .move-down-trigger {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.post .remove-trigger {
|
||||
color: rgba(128, 0, 0, 0.5);
|
||||
}
|
||||
.post .remove-trigger:hover {
|
||||
color: #f00;
|
||||
}
|
||||
.post .remove-trigger span {
|
||||
color: rgba(128, 0, 0, 1);
|
||||
font-size: 130%;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,15 @@ $(function()
|
|||
handleFiles(this.files);
|
||||
});
|
||||
|
||||
$('.post .move-down-trigger, .post .move-up-trigger').on('click', function()
|
||||
{
|
||||
var dir = $(this).hasClass('move-down-trigger') ? 'd' : 'u';
|
||||
var post = $(this).parents('.post');
|
||||
if (dir == 'u')
|
||||
post.insertBefore(post.prev('.post'));
|
||||
else
|
||||
post.insertAfter(post.next('.post'));
|
||||
});
|
||||
$('.post .remove-trigger').on('click', function()
|
||||
{
|
||||
$(this).parents('.post').slideUp(function()
|
||||
|
|
|
@ -38,9 +38,19 @@
|
|||
<form action="<?php echo \Chibi\UrlHelper::route('post', 'upload') ?>" method="post">
|
||||
<p class="alert alert-error">Some kind of error</p>
|
||||
|
||||
<a class="remove-trigger">
|
||||
remove <span>×</span>
|
||||
</a>
|
||||
<div class="ops">
|
||||
<a class="move-up-trigger">
|
||||
move up <span>↑</span>
|
||||
</a>
|
||||
|
||||
<a class="move-down-trigger">
|
||||
move down <span>↓</span>
|
||||
</a>
|
||||
|
||||
<a class="remove-trigger">
|
||||
remove <span>×</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<img class="thumbnail" src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="Thumbnail"/>
|
||||
<div>
|
||||
|
|
Loading…
Reference in a new issue