bayes: stop onclick event on our button from propagating back to article
This commit is contained in:
parent
13167d2a2f
commit
5b0cb9aa7f
|
@ -1,6 +1,8 @@
|
|||
function bayesTrain(id, train_up) {
|
||||
function bayesTrain(id, train_up, event) {
|
||||
try {
|
||||
|
||||
event.stopPropagation();
|
||||
|
||||
var query = "backend.php?op=pluginhandler&plugin=af_sort_bayes&method=trainArticle&article_id=" + param_escape(id) +
|
||||
"&train_up=" + param_escape(train_up);
|
||||
|
||||
|
|
|
@ -117,11 +117,11 @@ class Af_Sort_Bayes extends Plugin {
|
|||
function hook_article_button($line) {
|
||||
return "<img src=\"plugins/af_sort_bayes/thumb_up.png\"
|
||||
style=\"cursor : pointer\" style=\"cursor : pointer\"
|
||||
onclick=\"bayesTrain(".$line["id"].", true)\"
|
||||
onclick=\"bayesTrain(".$line["id"].", true, event)\"
|
||||
class='tagsPic' title='".__('+1')."'>" .
|
||||
"<img src=\"plugins/af_sort_bayes/thumb_down.png\"
|
||||
style=\"cursor : pointer\" style=\"cursor : pointer\"
|
||||
onclick=\"bayesTrain(".$line["id"].", false)\"
|
||||
onclick=\"bayesTrain(".$line["id"].", false, event)\"
|
||||
class='tagsPic' title='".__('-1')."'>";
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue