Created
December 11, 2012 23:39
-
-
Save anonymous/4263413 to your computer and use it in GitHub Desktop.
Refresh page after forums have been marked read.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js | |
index fa31d32..c941b72 100644 | |
--- a/phpBB/styles/prosilver/template/ajax.js | |
+++ b/phpBB/styles/prosilver/template/ajax.js | |
@@ -2,6 +2,11 @@ | |
"use strict"; | |
+// This callback will quickly refresh the page without scrolling to the top | |
+phpbb.add_ajax_callback('quick_refresh', function() { | |
+ location.reload(); | |
+}); | |
+ | |
// This callback finds the post from the delete link, and removes it. | |
phpbb.add_ajax_callback('post_delete', function() { | |
var el = $(this), | |
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html | |
index 6babbf5..b7d9010 100644 | |
--- a/phpBB/styles/prosilver/template/index_body.html | |
+++ b/phpBB/styles/prosilver/template/index_body.html | |
@@ -8,7 +8,7 @@ | |
<!-- IF S_DISPLAY_SEARCH --> | |
<li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_LOAD_UNREADS --> • <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- ENDIF --><!-- IF S_USER_LOGGED_IN --> • <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> • <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li> | |
<!-- ENDIF --> | |
- <!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m" data-ajax="true">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF --> | |
+ <!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m" data-ajax="quick_refresh" data-overlay="false">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF --> | |
</ul> | |
<!-- ENDIF --> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment