aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2014-01-01 16:18:39 +0100
committerChristian Vogeley <christian.vogeley@hotmail.de>2014-01-01 16:18:39 +0100
commitaafc40069bf0955d935adb4632650c7c990063a7 (patch)
treeb673eff5aa0f9c63ce26c873bafcce6ffef3409b
parent575f2b3280049eba2bbead023d8fe7fc345af0b1 (diff)
downloadvolse-hubzilla-aafc40069bf0955d935adb4632650c7c990063a7.tar.gz
volse-hubzilla-aafc40069bf0955d935adb4632650c7c990063a7.tar.bz2
volse-hubzilla-aafc40069bf0955d935adb4632650c7c990063a7.zip
Confirm webpage deletion prompt
-rw-r--r--mod/editpost.php1
-rw-r--r--mod/editwebpage.php5
-rwxr-xr-xview/tpl/jot-header.tpl7
3 files changed, 7 insertions, 6 deletions
diff --git a/mod/editpost.php b/mod/editpost.php
index f012c47cd..7cc33d60d 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -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?'),
));
diff --git a/mod/editwebpage.php b/mod/editwebpage.php
index 85bd9e918..00659b4b7 100644
--- a/mod/editwebpage.php
+++ b/mod/editwebpage.php
@@ -112,7 +112,8 @@ function editwebpage_content(&$a) {
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$ispublic' => '&nbsp;', // 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;
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 09d035979..75239c179 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -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>
- -->
+