aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver/template/ajax.js
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-07-14 11:57:53 -0400
committerJoas Schilling <nickvergessen@gmx.de>2013-07-14 11:57:53 -0400
commitd7a85ebc245e76038b8ccd56524f045cc92a6c13 (patch)
tree66aa645c4d86636f0bce04a7125a7757a466b224 /phpBB/styles/prosilver/template/ajax.js
parentfa3cdb6bf2cfdca9c26168bd258752718bc8a43f (diff)
parentf6865dc33a8cedb7d21a64401ed80d2edbac36bd (diff)
downloadforums-d7a85ebc245e76038b8ccd56524f045cc92a6c13.tar
forums-d7a85ebc245e76038b8ccd56524f045cc92a6c13.tar.gz
forums-d7a85ebc245e76038b8ccd56524f045cc92a6c13.tar.bz2
forums-d7a85ebc245e76038b8ccd56524f045cc92a6c13.tar.xz
forums-d7a85ebc245e76038b8ccd56524f045cc92a6c13.zip
Merge remote-tracking branch 'igorw/ticket/11574' into ticket/11574
* igorw/ticket/11574: (575 commits) [ticket/11702] Fix forum_posts left over for link-click counts in viewforum.php [ticket/11696] Move file to new directory [ticket/11696] Rename constructor to __construct() [ticket/11696] Remove manual loading of db_tools in extension controller test [ticket/11696] Rename db_tools.php so it can be autoloaded [ticket/11698] Moving all autoloadable files to phpbb/ [ticket/11694] Do not locate assets with root path [ticket/11692] Don't update search_type in dev migration if already appended [ticket/11675] Fix template loop [ticket/11690] Old module class names may get autoloaded by class_exists [ticket/9649] Display information on index for moderators on unapproved posts [ticket/10999] Fix assets_version in ACP [prep-release-3.0.12] More changelog items for the 3.0.12 release. [ticket/11687] Add assets_version to phpbb_config [ticket/11686] Not checking for phpBB Debug errors on functional tests [ticket/11670] Consistency with logo: Replace "phpBB(tm)" with "phpBB(R)". [ticket/11674] Do not include vendor folder if there are no dependencies. [ticket/11685] Remove logout confirmation page [ticket/11684] Remove useless confirmation page after login and admin login [ticket/9657] Define user before injecting ...
Diffstat (limited to 'phpBB/styles/prosilver/template/ajax.js')
-rw-r--r--phpBB/styles/prosilver/template/ajax.js34
1 files changed, 32 insertions, 2 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index 2528b96ece..394aca749b 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -126,11 +126,19 @@ phpbb.addAjaxCallback('post_delete', function() {
});
// This callback removes the approve / disapprove div or link.
-phpbb.addAjaxCallback('post_approve', function(res) {
- var remove = (res.approved) ? $(this) : $(this).parents('.post');
+phpbb.addAjaxCallback('post_visibility', function(res) {
+ var remove = (res.visible) ? $(this) : $(this).parents('.post');
$(remove).css('pointer-events', 'none').fadeOut(function() {
$(this).remove();
});
+
+ if (res.visible)
+ {
+ // Remove the "Deleted by" message from the post on restoring.
+ remove.parents('.post').find('.post_deleted_msg').css('pointer-events', 'none').fadeOut(function() {
+ $(this).remove();
+ });
+ }
});
// This removes the parent row of the link or form that fired the callback.
@@ -178,6 +186,20 @@ $('#qr_full_editor').click(function() {
});
+/**
+ * Make the display post links to use JS
+ */
+$('.display_post').click(function(e) {
+ // Do not follow the link
+ e.preventDefault();
+
+ var post_id = $(this).attr('data-post-id');
+ $('#post_content' + post_id).show();
+ $('#profile' + post_id).show();
+ $('#post_hidden' + post_id).hide();
+});
+
+
/**
* This AJAXifies the quick-mod tools. The reason it cannot be a standard
@@ -208,6 +230,14 @@ $('#quick-mod-select').change(function () {
$('#quickmodform').submit();
});
+$('#delete_permanent').click(function () {
+ if ($(this).attr('checked')) {
+ $('#delete_reason').hide();
+ } else {
+ $('#delete_reason').show();
+ }
+});
+
/**
* Toggle the member search panel in memberlist.php.
*