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

View File

@ -61,15 +61,18 @@ ST.spamadmin = function() {
filter: 'tr', filter: 'tr',
cancel: 'a', cancel: 'a',
stop: function() { stop: function() {
var $result = $(".paste_deletestack"); var $deletestack = $(".paste_deletestack");
var $input = $("input[name=pastes_to_delete]"); var $input = $("input[name=pastes_to_delete]");
$('.inv').show();
$result.empty(); $deletestack.empty();
$input.empty(); $input.empty();
var res = [];
$(".ui-selected").each(function(i, el) { $(".ui-selected").each(function(i, el) {
var id = $('a', el).attr('href').split('view/')[1]; 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 }?> <?php }?>
</tbody> </tbody>
</table> </table>
<h2 class="confirm_title">Confirm deletion of the following pastes:</h2>
<div class="paste_deletestack"></div> <form action="" method="post">
<input type="hidden" name="pastes_to_delete" /> <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 { ?> <?php } else { ?>
<p><?php echo lang('paste_missing'); ?> :(</p> <p><?php echo lang('paste_missing'); ?> :(</p>
<?php }?> <?php }?>