Vergleich jscripts/post.js - 1.8.4 - 1.8.19

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

var Post = {
init: function()
{

		$(document).ready(function(){



		$(document).ready(function()
{
Post.initAttachments();

		});
},


		});
},


Zeile 14Zeile 16
			$.ajax(
{
url: 'xmlhttp.php?action=get_multiquoted&tid='+tid,

			$.ajax(
{
url: 'xmlhttp.php?action=get_multiquoted&tid='+tid,

				type: 'get',
complete: function (request, status)
{

				type: 'get',
complete: function (request, status)
{

					Post.multiQuotedLoaded(request, status);
}
});

return false;

					Post.multiQuotedLoaded(request, status);
}
});

return false;

		}

		}

		else
{
return true;

		else
{
return true;

Zeile 30Zeile 32
	},

loadMultiQuotedAll: function()

	},

loadMultiQuotedAll: function()

	{

	{

		if(use_xmlhttprequest == 1)
{
$.ajax(

		if(use_xmlhttprequest == 1)
{
$.ajax(

Zeile 43Zeile 45
				}
});


				}
});


			return false;
}

			return false;
}

		else
{
return true;

		else
{
return true;

Zeile 60Zeile 62
			{
$.each(json.errors, function(i, message)
{

			{
$.each(json.errors, function(i, message)
{

					$.jGrowl(lang.post_fetch_error + ' ' + message);

					$.jGrowl(lang.post_fetch_error + ' ' + message, {theme:'jgrowl_error'});

				});
return false;
}

				});
return false;
}

Zeile 103Zeile 105
					document.input.attachmentaid.value = aid;
document.input.attachmentact.value = "remove";


					document.input.attachmentaid.value = aid;
document.input.attachmentact.value = "remove";


					$("form#editpost").submit();


					$("input[name=rem]").parents('form').append('<input type="submit" id="rem_submit" class="hidden" />');
$('#rem_submit').click();

				}

				}

				else
{
document.input.attachmentaid.value = 0;
document.input.attachmentact.value = "";
}
}

			}






		});

return false;

		});

return false;

	},


	},


	attachmentAction: function(aid,action)
{
document.input.attachmentaid.value = aid;
document.input.attachmentact.value = action;

	attachmentAction: function(aid,action)
{
document.input.attachmentaid.value = aid;
document.input.attachmentact.value = action;

 
	},

initAttachments: function()
{
$('form').on('submit', Post.checkAttachments);
},

checkAttachments: function()
{
var files = $("input[type='file']");
var file = files.get(0);
if (!file)
{
return true;
}

if (file.files.length > php_max_file_uploads && php_max_file_uploads != 0)
{
alert(lang.attachment_too_many_files.replace('{1}', php_max_file_uploads));
file.value="";
return false;
}

var totalSize = 0;
files.each(function()
{
for (var i = 0; i < this.files.length; i++)
{
totalSize += this.files[i].size;
}
});

if (totalSize > php_max_upload_size && php_max_upload_size > 0)
{
var php_max_upload_size_pretty = Math.round(php_max_upload_size / 1e4) / 1e2;
alert(lang.attachment_too_big_upload.replace('{1}', php_max_upload_size_pretty));
file.value="";
return false;
}

return true;

	}
};


	}
};