Revision: 8943
http://languagetool.svn.sourceforge.net/languagetool/?rev=8943&view=rev
Author: dnaber
Date: 2013-01-10 20:29:22 +0000 (Thu, 10 Jan 2013)
Log Message:
-----------
online check: remove unused code
Modified Paths:
--------------
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/atd.core.js
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/editor_plugin.js
Modified:
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
===================================================================
---
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
2013-01-10 20:25:55 UTC (rev 8942)
+++
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
2013-01-10 20:29:22 UTC (rev 8943)
@@ -14,10 +14,10 @@
//
// TODO:
-// 1. cursor position gets lost on check
-// 2. "ignore" and "ignore this kind of error" only works until the next check
-// 3. Ctrl-Z (undo) make the error markers go away
+// 1. "ignore" and "ignore this kind of error" only works until the next check
+// 2. Ctrl-Z (undo) make the error markers go away
//
+// fixed: cursor position gets lost on check
// fixed: "ignore all" doesn't work
// fixed: current cursor position is ignored when incorrect (it has its own
node)
// fixed: text with markup (even bold) messes up everything
@@ -34,9 +34,6 @@
/* these are the categories of errors AtD should ignore */
this.ignore_types = [];
- /* these are the phrases AtD should ignore */
- this.ignore_strings = {};
-
/* Localized strings */
this.i18n = {};
@@ -66,53 +63,6 @@
* Setters
*/
-AtDCore.prototype.setIgnoreStrings = function(string) {
- var parent = this;
-
- this.map(string.split(/,\s*/g), function(string) {
- parent.ignore_strings[string] = 1;
- });
-};
-
-AtDCore.prototype.showTypes = function(string) {
- var show_types = string.split(/,\s*/g);
- var types = {};
-
- /* set some default types that we want to make optional */
-
- /* grammar checker options */
- types["Double Negatives"] = 1;
- types["Hidden Verbs"] = 1;
- types["Passive voice"] = 1;
- types["Bias Language"] = 1;
-
- /* style checker options */
- types["Cliches"] = 1;
- types["Complex Expression"] = 1;
- types["Diacritical Marks"] = 1;
- types["Jargon Language"] = 1;
- types["Phrases to Avoid"] = 1;
- types["Redundant Expression"] = 1;
-
- var ignore_types = [];
-
- this.map(show_types, function(string) {
- types[string] = undefined;
- });
-
- this.map(this.ignore_types, function(string) {
- if (types[string] != undefined)
- ignore_types.push(string);
- });
-
- this.ignore_types = ignore_types;
-};
-
-// source: http://simonwillison.net/2006/Jan/20/escape/ (modified to not
escape \s)
-RegExp.escape = function(text) {
- return text.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&");
-};
-
AtDCore.prototype.processXML = function(responseXML) {
this.suggestions = [];
@@ -422,7 +372,7 @@
return editor.dom.getAttrib(node, key);
};
- core.findSpans = function(parent)
+ core.findSpans = function(parent)
{
if (parent == undefined)
return editor.dom.select('span');
@@ -452,7 +402,7 @@
core.removeParent = function(node)
{
- editor.dom.remove(node, 1);
+ editor.dom.remove(node, 1);
return node;
};
@@ -466,8 +416,6 @@
return editor.getLang("AtD." + key, defaultk);
};
- core.setIgnoreStrings(editor.getParam("atd_ignore_strings", ""));
- core.showTypes(editor.getParam("atd_show_types", ""));
return core;
},
@@ -776,8 +724,6 @@
}
});
- /* update atd_ignore_strings with the new value */
- t.editor.core.setIgnoreStrings(e.target.innerHTML);
/* this does an update */
}
t._removeWords(e.target.innerHTML);
Modified:
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/atd.core.js
===================================================================
--- trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/atd.core.js
2013-01-10 20:25:55 UTC (rev 8942)
+++ trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/atd.core.js
2013-01-10 20:29:22 UTC (rev 8943)
@@ -34,9 +34,6 @@
/* these are the categories of errors AtD should ignore */
this.ignore_types = [];
- /* these are the phrases AtD should ignore */
- this.ignore_strings = {};
-
/* Localized strings */
this.i18n = {};
@@ -66,53 +63,6 @@
* Setters
*/
-AtDCore.prototype.setIgnoreStrings = function(string) {
- var parent = this;
-
- this.map(string.split(/,\s*/g), function(string) {
- parent.ignore_strings[string] = 1;
- });
-};
-
-AtDCore.prototype.showTypes = function(string) {
- var show_types = string.split(/,\s*/g);
- var types = {};
-
- /* set some default types that we want to make optional */
-
- /* grammar checker options */
- types["Double Negatives"] = 1;
- types["Hidden Verbs"] = 1;
- types["Passive voice"] = 1;
- types["Bias Language"] = 1;
-
- /* style checker options */
- types["Cliches"] = 1;
- types["Complex Expression"] = 1;
- types["Diacritical Marks"] = 1;
- types["Jargon Language"] = 1;
- types["Phrases to Avoid"] = 1;
- types["Redundant Expression"] = 1;
-
- var ignore_types = [];
-
- this.map(show_types, function(string) {
- types[string] = undefined;
- });
-
- this.map(this.ignore_types, function(string) {
- if (types[string] != undefined)
- ignore_types.push(string);
- });
-
- this.ignore_types = ignore_types;
-};
-
-// source: http://simonwillison.net/2006/Jan/20/escape/ (modified to not
escape \s)
-RegExp.escape = function(text) {
- return text.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&");
-};
-
AtDCore.prototype.processXML = function(responseXML) {
this.suggestions = [];
Modified:
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/editor_plugin.js
===================================================================
---
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/editor_plugin.js
2013-01-10 20:25:55 UTC (rev 8942)
+++
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/editor_plugin.js
2013-01-10 20:29:22 UTC (rev 8943)
@@ -46,7 +46,7 @@
return editor.dom.getAttrib(node, key);
};
- core.findSpans = function(parent)
+ core.findSpans = function(parent)
{
if (parent == undefined)
return editor.dom.select('span');
@@ -76,7 +76,7 @@
core.removeParent = function(node)
{
- editor.dom.remove(node, 1);
+ editor.dom.remove(node, 1);
return node;
};
@@ -90,8 +90,6 @@
return editor.getLang("AtD." + key, defaultk);
};
- core.setIgnoreStrings(editor.getParam("atd_ignore_strings", ""));
- core.showTypes(editor.getParam("atd_show_types", ""));
return core;
},
@@ -400,8 +398,6 @@
}
});
- /* update atd_ignore_strings with the new value */
- t.editor.core.setIgnoreStrings(e.target.innerHTML);
/* this does an update */
}
t._removeWords(e.target.innerHTML);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits