Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
543 views
in Q2A Core by

I ran into problems as a lot of users clicked on "best answer" and - as it immediately gives the option to unvote the best answer again - they clicked again.  For sure, they were not sure if they really voted! ... and then they clicked again.

I needed a solution so I removed/hid the options to unvote (nil-vote) in page.js and question.js

qa-page.js:

function qa_vote_click(elem) {
...
            } else {
                qa_ajax_error();
            }

            // disable button as soon as vote is done
            $(".qa-vote-buttons").hide();    
            $(".qa-vote-buttons-net").hide();

        }
    );
    return false;
}

qa-question.js:

function qa_answer_click(answerid, questionid, target) {
...

            } else {
                document.forms['q_page_form'].elements['qa_click'].value=target.name;
                document.forms['q_page_form'].submit();
            }

            // hide options to unvote
            $(".qa-a-selection").hide();
            $(".qa-a-unselect-button").hide();
            $(".qa-a-unselect-hover").hide();


        }
    );

    return false;
}
 

hope that helps someone :)

Please log in or register to answer this question.

...