delete hide-show

This commit is contained in:
Claude 2016-09-04 13:30:47 +02:00
parent 122dd6ec04
commit 3feb215379
3 changed files with 18 additions and 9 deletions

View File

@ -172,7 +172,7 @@ h4 {
margin-bottom: 10px;
}
.hidden, .email, .url {
.hidden, .email, .url, .inv {
display: none;
}
@ -572,4 +572,4 @@ h4 {
position: absolute;
z-index: 100;
border:1px dotted black;
}
}

View File

@ -61,15 +61,18 @@ ST.spamadmin = function() {
filter: 'tr',
cancel: 'a',
stop: function() {
var $result = $(".paste_deletestack");
var $deletestack = $(".paste_deletestack");
var $input = $("input[name=pastes_to_delete]");
$result.empty();
$('.inv').show();
$deletestack.empty();
$input.empty();
var res = [];
$(".ui-selected").each(function(i, el) {
var id = $('a', el).attr('href').split('view/')[1];
$result.append(id + ' ');
res.push(id);
});
$deletestack.text(res.join(' '));
$input.val(res.join(' '));
}
});
};

View File

@ -37,9 +37,15 @@
<?php }?>
</tbody>
</table>
<h2 class="confirm_title">Confirm deletion of the following pastes:</h2>
<div class="paste_deletestack"></div>
<input type="hidden" name="pastes_to_delete" />
<form action="" method="post">
<h2 class="confirm_title inv">Confirm deletion of the following pastes:</h2>
<div class="paste_deletestack"></div>
<input type="hidden" name="pastes_to_delete" />
<input type="submit" name="delete_pastes" value="Delete selected pastes" class="inv" />
</form>
<?php } else { ?>
<p><?php echo lang('paste_missing'); ?> :(</p>
<?php }?>