mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* split global.js into its components, so it can be reasonably processed by setup * make reputation requirements configurable * move Markup and Locale back into global.js (removed associated build scripts) * extend Icon to display iconId in lightbox popup
29 lines
763 B
JavaScript
29 lines
763 B
JavaScript
$(document).ready(function()
|
|
{
|
|
$('form.vote-comment input').click(function() {
|
|
var vote = $(this).attr('data-vote');
|
|
var block = $(this).parent();
|
|
var ajax = block.find('.ajax');
|
|
var inputs = block.find('input');
|
|
var post = block.attr('data-post');
|
|
var type = block.attr('data-type');
|
|
|
|
inputs.attr('disabled', 'disabled');
|
|
ajax.show();
|
|
|
|
$.post('?vote', { post: post, type: type, vote: vote }, function(data) {
|
|
if (data != 'ok')
|
|
{
|
|
inputs.removeAttr('disabled');
|
|
ajax.hide();
|
|
alert(LANG.voteerror_tip);
|
|
return;
|
|
}
|
|
|
|
block.remove();
|
|
});
|
|
|
|
return false;
|
|
});
|
|
});
|