Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function comment_vote(id, type, date) {
- $("#vote_up_"+id).removeAttr("href").removeAttr("title");
- $("#vote_down_"+id).removeAttr("href").removeAttr("title");;
- $("#vote_up_"+id).addClass("disabled");
- $("#vote_down_"+id).addClass("disabled");
- $("#vote_wrap_"+id).hint({
- msg: '<img src="/resources/images/icons/loading_mini.gif" /> Radim...',
- align: 'center',
- autoremove: true
- });
- $.ajax({
- type: "POST",
- url: "http://www.blic.rs/resources/templates/comments/comments_vote.php",
- data: "id="+id+"&type="+type+"&date="+date+"&comments_table=blic_article_comments",
- success: function(serverData) {
- data=serverData.split("###");
- if (data[0] == "OK") {
- if (type == "up") $("#vote_p_"+id).html( (($("#vote_p_"+id).html()*1)+1).toString() );
- if (type == "down") $("#vote_n_"+id).html( (($("#vote_n_"+id).html()*1)+1).toString() );
- $(".pointer").remove();
- $("#vote_wrap_"+id).hint({
- msg: 'Hvala na Vašoj preporuci.',
- align: 'center',
- autoremove: true
- });
- }
- else if (data[0] == "VOTED") {
- $(".pointer").remove();
- $("#vote_wrap_"+id).hint({
- msg: 'Već ste preporučili komentar. Hvala.',
- align: 'center',
- autoremove: true
- });
- }
- else if (data[0] == "LOGIN_ERROR") {
- $(".pointer").remove();
- $("#vote_wrap_"+id).hint({
- msg: 'Morate biti ulogovani da bi preporučili komentar.',
- autoremove: true
- });
- }
- },
- error: function() {
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement