summaryrefslogtreecommitdiff
path: root/plugins/af_sort_bayes/init.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-11-25 21:07:24 +0300
committerAndrew Dolgov <[email protected]>2015-11-25 21:07:24 +0300
commit74a752879bcad54daa62994f9eae42fe4afdd299 (patch)
tree2168cc5bcb8d9bd0f5522d2bee732f0cc872ed55 /plugins/af_sort_bayes/init.js
parentf0ebb41b278a3ac9fdc276a9c13d3b4387f721dc (diff)
af_sort_bayes: move to -attic repo, not really suitable for production use
of any kind
Diffstat (limited to 'plugins/af_sort_bayes/init.js')
-rw-r--r--plugins/af_sort_bayes/init.js81
1 files changed, 0 insertions, 81 deletions
diff --git a/plugins/af_sort_bayes/init.js b/plugins/af_sort_bayes/init.js
deleted file mode 100644
index bb6bf5954..000000000
--- a/plugins/af_sort_bayes/init.js
+++ /dev/null
@@ -1,81 +0,0 @@
-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);
-
- notify_progress("Loading, please wait...");
-
- new Ajax.Request("backend.php", {
- parameters: query,
- onComplete: function(transport) {
- notify(transport.responseText);
- updateScore(id);
- } });
-
- } catch (e) {
- exception_error("showTrgmRelated", e);
- }
-}
-
-function bayesClearDatabase() {
- try {
-
- if (confirm(__("Clear classifier database?"))) {
-
- var query = "backend.php?op=pluginhandler&plugin=af_sort_bayes&method=clearDatabase";
-
- new Ajax.Request("backend.php", {
- parameters: query,
- onComplete: function (transport) {
- notify(transport.responseText);
- bayesUpdateUI();
- }
- });
- }
-
- } catch (e) {
- exception_error("showTrgmRelated", e);
- }
-}
-
-function bayesUpdateUI() {
- try {
-
- var query = "backend.php?op=pluginhandler&plugin=af_sort_bayes&method=renderPrefsUI";
-
- new Ajax.Request("backend.php", {
- parameters: query,
- onComplete: function (transport) {
- dijit.byId("af_sort_bayes_prefs").attr("content", transport.responseText);
- }
- });
-
- } catch (e) {
- exception_error("showTrgmRelated", e);
- }
-}
-
-function bayesShow(id) {
- try {
- if (dijit.byId("bayesShowDlg"))
- dijit.byId("bayesShowDlg").destroyRecursive();
-
- var query = "backend.php?op=pluginhandler&plugin=af_sort_bayes&method=showArticleStats&article_id=" + param_escape(id);
-
- dialog = new dijit.Dialog({
- id: "bayesShowDlg",
- title: __("Classifier information"),
- style: "width: 600px",
- href: query});
-
- dialog.show();
-
- } catch (e) {
- exception_error("shareArticle", e);
- }
-}
-
-