Merge pull request #268 from cvogeley/master
delete confirmation popup for blocks and layouts
This commit is contained in:
commit
df9e628495
@ -92,7 +92,8 @@ function editblock_content(&$a) {
|
|||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $a->user['nickname']
|
'$nickname' => $a->user['nickname'],
|
||||||
|
'$confirmdelete' => t('Delete block?')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
@ -159,7 +160,7 @@ function editblock_content(&$a) {
|
|||||||
$ob = get_observer_hash();
|
$ob = get_observer_hash();
|
||||||
|
|
||||||
if(($itm[0]['author_xchan'] === $ob) || ($itm[0]['owner_xchan'] === $ob))
|
if(($itm[0]['author_xchan'] === $ob) || ($itm[0]['owner_xchan'] === $ob))
|
||||||
$o .= '<br /><br /><a href="item/drop/' . $itm[0]['id'] . '" >' . t('Delete Block') . '</a><br />';
|
$o .= '<br /><br /><a class="block-delete-link" href="item/drop/' . $itm[0]['id'] . '" >' . t('Delete Block') . '</a><br />';
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
|
@ -78,7 +78,8 @@ function editlayout_content(&$a) {
|
|||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $a->user['nickname']
|
'$nickname' => $a->user['nickname'],
|
||||||
|
'$confirmdelete' => t('Delete layout?')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
@ -143,7 +144,7 @@ function editlayout_content(&$a) {
|
|||||||
$ob = get_observer_hash();
|
$ob = get_observer_hash();
|
||||||
|
|
||||||
if(($itm[0]['author_xchan'] === $ob) || ($itm[0]['owner_xchan'] === $ob))
|
if(($itm[0]['author_xchan'] === $ob) || ($itm[0]['owner_xchan'] === $ob))
|
||||||
$o .= '<br /><br /><a href="item/drop/' . $itm[0]['id'] . '" >' . t('Delete Layout') . '</a><br />';
|
$o .= '<br /><br /><a class="layout-delete-link" href="item/drop/' . $itm[0]['id'] . '" >' . t('Delete Layout') . '</a><br />';
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
|
@ -307,7 +307,7 @@ function enableOnUser(){
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$( document ).on( "click", ".wall-item-delete-link,.page-delete-link", function(e) {
|
$( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-delete-link,.block-delete-link", function(e) {
|
||||||
var link = $(this).attr("href"); // "get" the intended link in a var
|
var link = $(this).attr("href"); // "get" the intended link in a var
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
bootbox.confirm("<h4>{{$confirmdelete}}</h4>", function(result) {
|
bootbox.confirm("<h4>{{$confirmdelete}}</h4>", function(result) {
|
||||||
|
Reference in New Issue
Block a user