mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 04:15:12 +00:00
Confirm webpage deletion prompt
This commit is contained in:
parent
575f2b3280
commit
aafc40069b
3 changed files with 7 additions and 6 deletions
|
@ -50,6 +50,7 @@ function editpost_content(&$a) {
|
|||
'$geotag' => $geotag,
|
||||
'$nickname' => $channel['channel_address'],
|
||||
'$expireswhen' => t('Expires YYYY-MM-DD HH:MM'),
|
||||
'$confirmdelete' => t('Delete item?'),
|
||||
));
|
||||
|
||||
|
||||
|
|
|
@ -112,7 +112,8 @@ function editwebpage_content(&$a) {
|
|||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $a->user['nickname']
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$confirmdelete' => t('Delete webpage?')
|
||||
));
|
||||
|
||||
|
||||
|
@ -185,7 +186,7 @@ function editwebpage_content(&$a) {
|
|||
$ob = get_observer_hash();
|
||||
|
||||
if(($itm[0]['author_xchan'] === $ob) || ($itm[0]['owner_xchan'] === $ob))
|
||||
$o .= '<br /><br /><a href="item/drop/' . $itm[0]['id'] . '" >' . t('Delete Webpage') . '</a><br />';
|
||||
$o .= '<br /><br /><a class="page-delete-link" href="item/drop/' . $itm[0]['id'] . '" >' . t('Delete Webpage') . '</a><br />';
|
||||
|
||||
return $o;
|
||||
|
||||
|
|
|
@ -306,16 +306,15 @@ function enableOnUser(){
|
|||
|
||||
</script>
|
||||
|
||||
<!--
|
||||
<script>
|
||||
$( document ).on( "click", ".wall-item-delete-link", function(e) {
|
||||
$( document ).on( "click", ".wall-item-delete-link,.page-delete-link", function(e) {
|
||||
var link = $(this).attr("href"); // "get" the intended link in a var
|
||||
e.preventDefault();
|
||||
bootbox.confirm("<h4>Delete item?</h4>", function(result) {
|
||||
bootbox.confirm("<h4>{{$confirmdelete}}</h4>", function(result) {
|
||||
if (result) {
|
||||
document.location.href = link;}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
-->
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue