mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 08:17:47 +02:00
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into feature/softdelete-1-permission
* 'develop' of https://github.com/phpbb/phpbb3: (480 commits) [ticket/6723] Show info that message has been deleted before delivery [ticket/11385] Fix issue with migration module tool not getting extension module info [ticket/11386] Fix failing tests from constructor changes [ticket/11386] Fix circular reference error & serialize error [ticket/11386] Remove tests that check if finder cache is working [ticket/11386] Forgot to get the migration classes [ticket/11386] Update tests with new constructors for ext.manager/migrator [ticket/11386] Use finder to find migration files [ticket/11363] Fix to make get_module_infos get from all extensions [ticket/11381] Make finder able to search in all available extensions [ticket/11103] Revert whitespace changes [ticket/11103] Few more minor language things [ticket/11103] Don't call generate_board_url many times [ticket/11103] Case time in queries as an int [ticket/11103] Fix effectively installed check [ticket/11103] Remove padding from notifications for now. [ticket/11363] Fix a couple bugs and throw errors if the file not found [ticket/11372] Migrator should only check if effectively installed if not [ticket/11363] Load module info files for extensions too [ticket/11103] Notifications Migration file ... Conflicts: phpBB/includes/functions_posting.php phpBB/includes/mcp/mcp_queue.php phpBB/includes/search/fulltext_mysql.php phpBB/includes/search/fulltext_native.php phpBB/includes/search/fulltext_postgres.php phpBB/includes/search/fulltext_sphinx.php phpBB/install/database_update.php phpBB/styles/prosilver/template/ajax.js
This commit is contained in:
@@ -14,13 +14,13 @@ phpbb.closeDarkenWrapper = function(delay) {
|
||||
};
|
||||
|
||||
// This callback will mark all forum icons read
|
||||
phpbb.add_ajax_callback('mark_forums_read', function(res) {
|
||||
phpbb.addAjaxCallback('mark_forums_read', function(res) {
|
||||
var readTitle = res.NO_UNREAD_POSTS;
|
||||
var unreadTitle = res.UNREAD_POSTS;
|
||||
var iconsArray = {
|
||||
'forum_unread': 'forum_read',
|
||||
'forum_unread_subforum': 'forum_read_subforum',
|
||||
'forum_unread_locked': 'forum_read_locked',
|
||||
'forum_unread_locked': 'forum_read_locked'
|
||||
};
|
||||
|
||||
$('li.row').find('dl[class*="forum_unread"]').each(function() {
|
||||
@@ -37,14 +37,24 @@ phpbb.add_ajax_callback('mark_forums_read', function(res) {
|
||||
// Mark subforums read
|
||||
$('a.subforum[class*="unread"]').removeClass('unread').addClass('read');
|
||||
|
||||
// Mark topics read if we are watching a category and showing active topics
|
||||
if ($('#active_topics').length) {
|
||||
phpbb.ajaxCallbacks['mark_topics_read'].call(this, res, false);
|
||||
}
|
||||
|
||||
// Update mark forums read links
|
||||
$('[data-ajax="mark_forums_read"]').attr('href', res.U_MARK_FORUMS);
|
||||
|
||||
phpbb.closeDarkenWrapper(3000);
|
||||
});
|
||||
|
||||
// This callback will mark all topic icons read
|
||||
phpbb.add_ajax_callback('mark_topics_read', function(res) {
|
||||
/**
|
||||
* This callback will mark all topic icons read
|
||||
*
|
||||
* @param update_topic_links bool Wether "Mark topics read" links should be
|
||||
* updated. Defaults to true.
|
||||
*/
|
||||
phpbb.addAjaxCallback('mark_topics_read', function(res, update_topic_links) {
|
||||
var readTitle = res.NO_UNREAD_POSTS;
|
||||
var unreadTitle = res.UNREAD_POSTS;
|
||||
var iconsArray = {
|
||||
@@ -58,6 +68,10 @@ phpbb.add_ajax_callback('mark_topics_read', function(res) {
|
||||
var classMap = {};
|
||||
var classNames = [];
|
||||
|
||||
if (typeof update_topic_links === 'undefined') {
|
||||
update_topic_links = true;
|
||||
}
|
||||
|
||||
$.each(iconsArray, function(unreadClass, readClass) {
|
||||
$.each(iconsState, function(key, value) {
|
||||
// Only topics can be hot
|
||||
@@ -85,22 +99,22 @@ phpbb.add_ajax_callback('mark_topics_read', function(res) {
|
||||
$('a').has('span.icon_topic_newest').remove();
|
||||
|
||||
// Update mark topics read links
|
||||
$('[data-ajax="mark_topics_read"]').attr('href', res.U_MARK_TOPICS);
|
||||
if (update_topic_links) {
|
||||
$('[data-ajax="mark_topics_read"]').attr('href', res.U_MARK_TOPICS);
|
||||
}
|
||||
|
||||
phpbb.closeDarkenWrapper(3000);
|
||||
});
|
||||
|
||||
// This callback finds the post from the delete link, and removes it.
|
||||
phpbb.add_ajax_callback('post_delete', function() {
|
||||
phpbb.addAjaxCallback('post_delete', function() {
|
||||
var el = $(this),
|
||||
post_id;
|
||||
postId;
|
||||
|
||||
if (el.attr('data-refresh') === undefined)
|
||||
{
|
||||
post_id = el[0].href.split('&p=')[1];
|
||||
var post = el.parents('#p' + post_id).css('pointer-events', 'none');
|
||||
if (post.hasClass('bg1') || post.hasClass('bg2'))
|
||||
{
|
||||
if (el.attr('data-refresh') === undefined) {
|
||||
postId = el[0].href.split('&p=')[1];
|
||||
var post = el.parents('#p' + postId).css('pointer-events', 'none');
|
||||
if (post.hasClass('bg1') || post.hasClass('bg2')) {
|
||||
var posts1 = post.nextAll('.bg1');
|
||||
post.nextAll('.bg2').removeClass('bg2').addClass('bg1');
|
||||
posts1.removeClass('bg1').addClass('bg2');
|
||||
@@ -112,9 +126,8 @@ phpbb.add_ajax_callback('post_delete', function() {
|
||||
});
|
||||
|
||||
// This callback removes the approve / disapprove div or link.
|
||||
phpbb.add_ajax_callback('post_visibility', function(res) {
|
||||
phpbb.addAjaxCallback('post_visibility', function(res) {
|
||||
var remove = (res.visible) ? $(this) : $(this).parents('.post');
|
||||
|
||||
$(remove).css('pointer-events', 'none').fadeOut(function() {
|
||||
$(this).remove();
|
||||
});
|
||||
@@ -129,12 +142,12 @@ phpbb.add_ajax_callback('post_visibility', function(res) {
|
||||
});
|
||||
|
||||
// This removes the parent row of the link or form that fired the callback.
|
||||
phpbb.add_ajax_callback('row_delete', function() {
|
||||
phpbb.addAjaxCallback('row_delete', function() {
|
||||
$(this).parents('tr').remove();
|
||||
});
|
||||
|
||||
// This handles friend / foe additions removals.
|
||||
phpbb.add_ajax_callback('zebra', function(res) {
|
||||
phpbb.addAjaxCallback('zebra', function(res) {
|
||||
var zebra;
|
||||
|
||||
if (res.success) {
|
||||
@@ -151,8 +164,7 @@ $('[data-ajax]').each(function() {
|
||||
ajax = $this.attr('data-ajax'),
|
||||
fn;
|
||||
|
||||
if (ajax !== 'false')
|
||||
{
|
||||
if (ajax !== 'false') {
|
||||
fn = (ajax !== 'true') ? ajax : null;
|
||||
phpbb.ajaxify({
|
||||
selector: this,
|
||||
@@ -200,12 +212,9 @@ phpbb.ajaxify({
|
||||
filter: function (data) {
|
||||
var action = $('#quick-mod-select').val();
|
||||
|
||||
if (action === 'make_normal')
|
||||
{
|
||||
if (action === 'make_normal') {
|
||||
return $(this).find('select option[value="make_global"]').length > 0;
|
||||
}
|
||||
else if (action === 'lock' || action === 'unlock')
|
||||
{
|
||||
} else if (action === 'lock' || action === 'unlock') {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -221,6 +230,21 @@ $('#quick-mod-select').change(function () {
|
||||
$('#quickmodform').submit();
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Toggle the member search panel in memberlist.php.
|
||||
*
|
||||
* If user returns to search page after viewing results the search panel is automatically displayed.
|
||||
* In any case the link will toggle the display status of the search panel and link text will be
|
||||
* appropriately changed based on the status of the search panel.
|
||||
*/
|
||||
$('#member_search').click(function () {
|
||||
$('#memberlist_search').slideToggle('fast');
|
||||
phpbb.ajax_callbacks['alt_text'].call(this);
|
||||
// Focus on the username textbox if it's available and displayed
|
||||
if ($('#memberlist_search').is(':visible')) {
|
||||
$('#username').focus();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
||||
|
Reference in New Issue
Block a user