From: Andrew Dolgov Date: Thu, 18 Jun 2015 12:57:17 +0000 (+0300) Subject: bayes: stop onclick event on our button from propagating back to article X-Git-Tag: 16.3~280 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5b0cb9aa7f5088bcf4dbbe614bfee982fbc07d2e;p=tt-rss.git bayes: stop onclick event on our button from propagating back to article --- diff --git a/plugins/af_sort_bayes/init.js b/plugins/af_sort_bayes/init.js index 6ea8f6c1..6b8dcf78 100644 --- a/plugins/af_sort_bayes/init.js +++ b/plugins/af_sort_bayes/init.js @@ -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); diff --git a/plugins/af_sort_bayes/init.php b/plugins/af_sort_bayes/init.php index 3958d27b..51294b46 100644 --- a/plugins/af_sort_bayes/init.php +++ b/plugins/af_sort_bayes/init.php @@ -117,11 +117,11 @@ class Af_Sort_Bayes extends Plugin { function hook_article_button($line) { return "" . ""; }