Vergleich jscripts/inline_moderation.js - 1.8.3 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
var inlineModeration = {
init: function()
{

var inlineModeration = {
init: function()
{

 
		$(function(){
if($("#inlinemoderation_options_selector").length !== 0) {
$("#inlinemoderation_options_selector").on('change', function() {
$("#inlinemoderation_options").trigger('submit');
});

$("#inlinemoderation_options").on('submit', function(){
if($("#inlinemoderation_options_selector").val() == "") {
$.jGrowl(lang.select_tool, {theme:'jgrowl_error'});
return false;
} else if($('input[name^="inlinemod_"]:checked').length === 0) {
$.jGrowl(lang.selected_nil, {theme:'jgrowl_error'});
return false;
}
});
}
});


		if(!inlineType || !inlineId)
{
return false;

		if(!inlineType || !inlineId)
{
return false;

Zeile 9Zeile 27
		inlineModeration.cookieName = 'inlinemod_'+inlineType+inlineId;
var inputs = $('input');


		inlineModeration.cookieName = 'inlinemod_'+inlineType+inlineId;
var inputs = $('input');


		if(!inputs)

		if(!inputs.length)

		{
return false;
}

		{
return false;
}

Zeile 22Zeile 40
			var element = $(this);
if((element.attr('name') != 'allbox') && (element.attr('type') == 'checkbox') && (element.attr('id')) && (element.attr('id').split('_')[0] == 'inlinemod'))
{

			var element = $(this);
if((element.attr('name') != 'allbox') && (element.attr('type') == 'checkbox') && (element.attr('id')) && (element.attr('id').split('_')[0] == 'inlinemod'))
{

				$(element).click(inlineModeration.checkItem);

				$(element).on('click', inlineModeration.checkItem);

			}

if(element.attr('id'))

			}

if(element.attr('id'))

Zeile 35Zeile 53
					if(inlineIds.indexOf(id) != -1 || (inlineIds.indexOf('ALL') != -1 && removedIds.indexOf(id) == -1))
{
element.prop('checked', true);

					if(inlineIds.indexOf(id) != -1 || (inlineIds.indexOf('ALL') != -1 && removedIds.indexOf(id) == -1))
{
element.prop('checked', true);

						var post = element.parents('.post_content');

						var post = element.parents('.post');

						var thread = element.parents('.inline_row');
var fieldset = element.parents('fieldset');

						var thread = element.parents('.inline_row');
var fieldset = element.parents('fieldset');

						if(post.length > 0)

						if(post.length)

						{
post.addClass('trow_selected');
}

						{
post.addClass('trow_selected');
}

						else if(thread.length > 0)

						else if(thread.length)

						{
thread.addClass('trow_selected');
}


						{
thread.addClass('trow_selected');
}


						if(fieldset.length > 0)

						if(fieldset.length)

						{
fieldset.addClass('inline_selected');
}

						{
fieldset.addClass('inline_selected');
}

Zeile 56Zeile 74
					else
{
element.prop('checked', false);

					else
{
element.prop('checked', false);

						var post = element.parents('.post_content');

						var post = element.parents('.post');

						var thread = element.parents('.inline_row');

						var thread = element.parents('.inline_row');

						if(post.length > 0)

						if(post.length)

						{
post.removeClass('trow_selected');
}

						{
post.removeClass('trow_selected');
}

						else if(thread.length > 0)

						else if(thread.length)

						{
thread.removeClass('trow_selected');
}

						{
thread.removeClass('trow_selected');
}

Zeile 83Zeile 101
			}
}
else if(inlineIds.indexOf('ALL') == -1 && allChecked == true)

			}
}
else if(inlineIds.indexOf('ALL') == -1 && allChecked == true)

		{
var selectRow = $('#selectAllrow');

		{
var selectRow = $('#selectAllrow');

			if(selectRow)
{
selectRow.show();

			if(selectRow)
{
selectRow.show();

			}
}

			}
}

		return true;
},


		return true;
},


Zeile 98Zeile 116
		var element = $(this);

if(!element || !element.attr('id'))

		var element = $(this);

if(!element || !element.attr('id'))

		{
return false;

		{
return false;

		}

		}





		var inlineCheck = element.attr('id').split('_');

		var inlineCheck = element.attr('id').split('_');

		var id = inlineCheck[1];


		var id = inlineCheck[1];


		if(!id)
{
return false;
}

		if(!id)
{
return false;
}





		var inlineIds = inlineModeration.getCookie(inlineModeration.cookieName);
var removedIds = inlineModeration.getCookie(inlineModeration.cookieName+'_removed');


		var inlineIds = inlineModeration.getCookie(inlineModeration.cookieName);
var removedIds = inlineModeration.getCookie(inlineModeration.cookieName+'_removed');


Zeile 123Zeile 141
			{
removedIds = inlineModeration.removeId(removedIds, id);
if(removedIds.length == 0)

			{
removedIds = inlineModeration.removeId(removedIds, id);
if(removedIds.length == 0)

				{

				{

					var allSelectedRow = $('#allSelectedrow');
if(allSelectedRow)
{
allSelectedRow.show();
}

					var allSelectedRow = $('#allSelectedrow');
if(allSelectedRow)
{
allSelectedRow.show();
}

				}
}
var post = element.parents('.post_content');
var thread = element.parents('.inline_row');
if(post.length > 0)
{
post.addClass('trow_selected');

				}







			}

			}

			else if(thread.length > 0)



			var post = element.parents('.post');
var thread = element.parents('.inline_row');
if(post.length)

			{

			{

				thread.addClass('trow_selected');
}





				post.addClass('trow_selected');
}
else if(thread.length)
{
thread.addClass('trow_selected');
}

		}
else
{
if(inlineIds.indexOf('ALL') == -1)

		}
else
{
if(inlineIds.indexOf('ALL') == -1)

			{

			{

				inlineIds = inlineModeration.removeId(inlineIds, id);
var selectRow = $('#selectAllrow');
if(selectRow)

				inlineIds = inlineModeration.removeId(inlineIds, id);
var selectRow = $('#selectAllrow');
if(selectRow)

Zeile 162Zeile 180
					allSelectedRow.hide();
}
}

					allSelectedRow.hide();
}
}

			var post = element.parents('.post_content');

			var post = element.parents('.post');

			var thread = element.parents('.inline_row');

			var thread = element.parents('.inline_row');

			if(post.length > 0)

			if(post.length)

			{
post.removeClass('trow_selected');

			{
post.removeClass('trow_selected');

			}
else if(thread.length > 0)

			}
else if(thread.length)

			{
thread.removeClass('trow_selected');
}

			{
thread.removeClass('trow_selected');
}

		}


		}


		inlineModeration.updateCookies(inlineIds, removedIds);

return true;

		inlineModeration.updateCookies(inlineIds, removedIds);

return true;

Zeile 181Zeile 199

clearChecked: function()
{


clearChecked: function()
{

		var selectRow = $('#selectAllrow');
if(selectRow)
{
selectRow.hide();
}

var allSelectedRow = $('#allSelectedrow');
if(allSelectedRow)
{
allSelectedRow.hide();
}

		$('#selectAllrow').hide();
$('#allSelectedrow').hide();











var inputs = $('input');



var inputs = $('input');


		if(!inputs)

		if(!inputs.length)

		{
return false;
}

		{
return false;
}

Zeile 229Zeile 238
		inputs = $('input');
master = $(master);


		inputs = $('input');
master = $(master);


		if(!inputs)

		if(!inputs.length)

		{
return false;
}

		{
return false;
}

Zeile 246Zeile 255
			{
var id = inlineCheck[1];
var changed = (element.prop('checked') != master.prop('checked'));

			{
var id = inlineCheck[1];
var changed = (element.prop('checked') != master.prop('checked'));

				element.prop('checked', master.prop('checked'));

 




				var post = element.parents('.post_content');

				var post = element.parents('.post');

				var fieldset = element.parents('fieldset');
var thread = element.parents('.inline_row');

				var fieldset = element.parents('fieldset');
var thread = element.parents('.inline_row');

				if(post.length > 0)

				if(post.length)

				{
if(master.prop('checked') == true)
{

				{
if(master.prop('checked') == true)
{

Zeile 260Zeile 268
					else
{
post.removeClass('trow_selected');

					else
{
post.removeClass('trow_selected');

					}
}
else if(thread.length > 0)
{

					}
}
else if(thread.length)
{

					if(master.prop('checked') == true)
{
thread.addClass('trow_selected');

					if(master.prop('checked') == true)
{
thread.addClass('trow_selected');

Zeile 274Zeile 282
					}
}


					}
}


				if(fieldset.length > 0)

				if(fieldset.length)

				{
if(master.prop('checked') == true)
{

				{
if(master.prop('checked') == true)
{

Zeile 288Zeile 296

if(changed)
{


if(changed)
{

 
					element.trigger('click');


					if(master.prop('checked') == true)
{
if(inlineIds.indexOf('ALL') == -1)

					if(master.prop('checked') == true)
{
if(inlineIds.indexOf('ALL') == -1)

Zeile 319Zeile 329
		if(count < all_text)
{
var selectRow = $('#selectAllrow');

		if(count < all_text)
{
var selectRow = $('#selectAllrow');

			if(selectRow)

			if(selectRow.length)

			{
if(master.prop('checked') == true)

			{
if(master.prop('checked') == true)

				{

				{

					selectRow.show();
}
else
{
selectRow.hide();
}

					selectRow.show();
}
else
{
selectRow.hide();
}

			}
}

if(inlineIds.indexOf('ALL') == -1 || removedIds.length != 0)
{
var allSelectedRow = $('#allSelectedrow');
if(allSelectedRow)
{
allSelectedRow.hide();
}
}
else if(inlineIds.indexOf('ALL') != -1 && removedIds.length == 0)
{
var allSelectedRow = $('#allSelectedrow');
if(allSelectedRow)
{
allSelectedRow.show();
}

			}
}

if(inlineIds.indexOf('ALL') == -1 || removedIds.length != 0)
{
$('#allSelectedrow').hide();
}
else if(inlineIds.indexOf('ALL') != -1 && removedIds.length == 0)
{
$('#allSelectedrow').show();









		}
},


		}
},


Zeile 354Zeile 356
	{
inlineModeration.updateCookies(new Array('ALL'), new Array());


	{
inlineModeration.updateCookies(new Array('ALL'), new Array());


		var selectRow = $('#selectAllrow');
if(selectRow)
{
selectRow.hide();
}

var allSelectedRow = $('#allSelectedrow');
if(allSelectedRow)
{
allSelectedRow.show();
}

		$('#selectAllrow').hide();
$('#allSelectedrow').show();










	},

getCookie: function(name)

	},

getCookie: function(name)