1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 16:27:38 +02:00

Merge remote-tracking branch 'callumacrae/ticket/10949' into ticket/10949

Conflicts:
	phpBB/assets/javascript/core.js
This commit is contained in:
Marc Alexander
2013-01-04 20:46:56 +01:00
2 changed files with 84 additions and 128 deletions

View File

@@ -93,14 +93,12 @@ phpbb.add_ajax_callback('mark_topics_read', function(res) {
// This callback finds the post from the delete link, and removes it.
phpbb.add_ajax_callback('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');
@@ -142,8 +140,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,
@@ -177,12 +174,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;
}