Revision: 8947
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=8947&view=rev
Author:   dnaber
Date:     2013-01-11 10:46:28 +0000 (Fri, 11 Jan 2013)
Log Message:
-----------
online check: more cleanups, removing unused code

Modified Paths:
--------------
    trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/demo.html
    trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
    trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/readme.html
    
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/editor_plugin.js

Removed Paths:
-------------
    trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/changelog.html

Deleted: 
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/changelog.html
===================================================================
--- trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/changelog.html  
2013-01-10 23:07:25 UTC (rev 8946)
+++ trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/changelog.html  
2013-01-11 10:46:28 UTC (rev 8947)
@@ -1,103 +0,0 @@
-<html>
- <head>
-  <title>After the Deadline for TinyMCE - Change Log</title>
- </head>
- <body>
-   <h1>After the Deadline for TinyMCE - What's New?</h1>
-
-<h3>24 Mar 10</h3>
-
-<ul>
-      <li>Updated to latest AtD/Core module:
-      <ul>
-        <li>Added L10n string <em>menu_title_confused_word</em> to localize 
"Did you mean..."</li>
-        <li>Fixed two cases of parent variable polution (two for loops not 
declaring their vars)</li>
-        <li>Fixed bug preventing subsequent occurences of one error (w/ the 
same context) from highlighting</li>
-        <li>Error highlighter now uses beginning of word boundary to 
accurately find error location in text</li>
-        <li>Fixed bug preventing misspelled words in single quotes from being 
highlighted</li>
-      </ul></li>
-</ul>
-
-<h3>15 Feb 10</h3>
-
-<ul>
- <li>Fixed a highlighting issue</li>
- <li>Fixed I18n issue with AtD/Core module</li>
- <li>Fixed a bug where AtD Core was ignoring show types setting</li>
-</ul>
-
-<h3>14 Jan 10</h3>
-
-<ul>
- <li>Made plugin localizable. Just need string translations now :)</li>
- <li>Plugin now uses AtD Core UI module. Created a make.sh script to combine 
Core UI script and editor plugin src. Will also minify them if jsmin is in the 
current path.</li>
-</ul>
-
-<h3>11 Dec 09</h3>
-
-<ul>
- <lI>Error highlighting is better at not highlighting a suggestion within a 
word</li>
- <li>Plugin now checks if a global constant, AtD_proofread_click_count exists. 
If it does--it increments it with each use.</li>
-</ul>
-
-<h3>12 Nov 09</h3>
-
-<ul>
- <li>Updated docs/examples to reflect AtD support for diacritical marks 
(accented words)</li>
- <li>Plugin is now smarter about determining if no writing errors were 
highlighted and notifies the user when appropriate.</li>
-</ul>
-
-<h3>3 Nov 09</h3>
-
-<ul>
-  <li>Overhauled readme, change log, and added a demo.html file.</li>
-  <li>Fixed a bug where highlighted errors could step on eachother 
(sometimes).</li>
-</ul>
- 
-<h3>8 Sept 09</h3>
-
-<ul>
- <li>More updates than you can shake a stick at.</li>
-</ul>
-
-<h3>18 Jun 09</h3>
-
-<ul>
-  <li>(18 Jun 09) Added a atd_strip_on_get option.  Some applications like 
WordPress grab the editor
-  content occasionally for an auto save.  In these cases the app plugin needs 
to
-  strip the AtD tags and this option should be set to false. </li>
-  <li>(19 Jun 09) fixed syntax error in IE and Safari (that FF chose to 
ignore)... </li>
-</ul>
-
-<h3>1 Jun 09</h3>
-
-<ul>
-  <li>(31 May 09) updated plugin to treat -- as a separator.</li>
-  <li>(31 May 09) fixed plugin not turning off progress thingie when an AJAX 
error occurs</li>
-  <li>(29 May 09) fixed plugin not highlighting anything when string field of 
an error response is empty.</li>
-  <li>(25 May 09) fixed a bug causing underline and some other styles to get 
mangled in Wordpress.  Oops. :)</li>
-  <li>(24 May 09) fixed a bug with token text containing encoded HTML elements
-  rather than the text its meant to represent (i.e. &quote; over a ").
-  This caused highlighting to mess up in some cases.</li>
-  <li>(24 May 09) fixed a bug preventing mispelled words with a hyphen from 
getting 
-  highlighted.</li>
- <li>(24 May 09) fixed a bug where [hookword] [word 1] was causing other 
phrases with the
-  pattern [hookword] [word 1][rest of word] to get highlighted</li>
- <li>(17 May 09) multiword phrases now properly set the "previous" token used 
as a hook for
-  checking if the next word/phrase has an error associated with it.  Naturally 
this fixes
-  a bug where an error following a highlighted phrase isn't highlighted.</li>
-</ul>
-
-<h3>15 May 09</h3>
-
-<ul>
-  <li>Rewrote the word highlighting code, the new stuff is easier to mantain 
and much cleaner. This plugin is no longer such a bad hack.  It's still a hack 
though.</li>
-  <li>Added the atd_ignore_strings option and the atd_ignore_enable 
option.</li>
-</ul>
-
-<h3>Release 14 Apr 09</h3>
-
-<ul>
-  <li>updated readme to show correct fom for atd_rpc_url.  The variables 
requires a ?url= at the end.</li>
-</ul>
-

Modified: trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/demo.html
===================================================================
--- trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/demo.html       
2013-01-10 23:07:25 UTC (rev 8946)
+++ trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/demo.html       
2013-01-11 10:46:28 UTC (rev 8947)
@@ -19,20 +19,10 @@
             });
         },
 
-        /* the URL to the button image to display */
-        atd_button_url              : "atdbuttontr.gif",
         /* the URL of your proxy file */
-        atd_rpc_url                 : "server/proxy.php?url=",
-        /* set your API key */
-        atd_rpc_id                  : "dashnine",
-        /* edit this file to customize how AtD shows errors */
-        atd_css_url                 : "css/content.css",
-        /* strings this plugin should ignore */
-        atd_ignore_strings          : "",
-        /* enable "Ignore Always" menu item, uses cookies by default. Set 
atd_ignore_rpc_url to a URL AtD should send ignore requests to. */
-        atd_ignore_enable           : "false",
-        /* add the AtD button to the first row of the advanced theme */
-        theme_advanced_buttons1_add : "AtD",
+        languagetool_rpc_url                 : "server/proxy.php?url=",
+        /* edit this file to customize how LanguageTool shows errors */
+        languagetool_css_url                 : "css/content.css",
         /*
          * this stuff is a matter of preference
          */

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 23:07:25 UTC (rev 8946)
+++ 
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js    
    2013-01-11 10:46:28 UTC (rev 8947)
@@ -498,7 +498,7 @@
             /* loading the content.css file, why? I have no clue */
             if (editor.settings.content_css !== false)
             {
-               editor.dom.loadCSS(editor.getParam("atd_css_url", url + 
'/css/content.css'));
+               editor.dom.loadCSS(editor.getParam("languagetool_css_url", url 
+ '/css/content.css'));
             }
         });
 
@@ -540,17 +540,6 @@
 
       createControl : function(name, controlManager) 
       {
-         var control = this;
-
-         if (name == 'AtD') 
-         {
-            return controlManager.createButton(name, { 
-               title: this.editor.getLang('AtD.button_proofread_tooltip', 
'Proofread Writing'),
-               image: this.editor.getParam('atd_button_url', this.url + 
'/atdbuttontr.gif'), 
-               cmd: 'mceWritingImprovementTool', 
-               scope: control 
-            });
-         }
       },
 
       _removeWords : function(w) 
@@ -686,66 +675,17 @@
               }
             });
 
-            if (String(this.editor.getParam("atd_ignore_enable",  "false")) == 
"true")
-            {
-                m.add({
-                  title : 
plugin.editor.getLang('AtD.menu_option_ignore_always', 'Ignore always'),
-                  onclick : function() 
-                  {
-                      var url = t.editor.getParam('atd_ignore_rpc_url', 
'{backend}');
+            m.add({
+              title : plugin.editor.getLang('menu_option_ignore_all', 'Ignore 
this kind of error'),
+              onclick : function() 
+              {
+                 var surrogate = 
e.target.getAttribute(plugin.editor.core.surrogateAttribute);
+                 var ruleId = plugin.editor.core.getSurrogatePart(surrogate, 
'id');
+                 t._removeWordsByRuleId(ruleId);
+                 t._checkDone();
+              }
+           });
 
-                      if (url == '{backend}')
-                      {
-                         /* Default scheme is to save ignore preferences in a 
cookie */
-
-                         var ignore = 
tinymce.util.Cookie.getHash('atd_ignore'); 
-                         if (ignore == undefined) { ignore = {}; }
-                         ignore[e.target.innerHTML] = 1;
-                  
-                         tinymce.util.Cookie.setHash('atd_ignore', ignore, new 
Date( (new Date().getTime()) + 157680000000) );
-                      }
-                      else
-                      {
-                         /* Plugin is configured to send ignore preferences to 
server, do that */
-
-                         var id  = t.editor.getParam("atd_rpc_id",  
"12345678");
-
-                         tinymce.util.XHR.send({
-                             url          : url + 
encodeURI(e.target.innerHTML).replace(/&/g, '%26') + "&key=" + id,
-                             content_type : 'text/xml',
-                             async        : true,
-                             type         : 'GET',
-                             success      : function( type, req, o )
-                             {
-                                /* do nothing */
-                             },
-                             error        : function( type, req, o )
-                             {
-                                alert( "Ignore preference save failed\n" + 
type + "\n" + req.status + "\nAt: " + o.url ); 
-                             }
-                         });
-
-                     }
-
-                     t._removeWords(e.target.innerHTML);
-                     t._checkDone();
-                  }
-               });
-            }
-            else
-            {
-                m.add({
-                  title : plugin.editor.getLang('menu_option_ignore_all', 
'Ignore this kind of error'),
-                  onclick : function() 
-                  {
-                     var surrogate = 
e.target.getAttribute(plugin.editor.core.surrogateAttribute);
-                     var ruleId = 
plugin.editor.core.getSurrogatePart(surrogate, 'id');
-                     t._removeWordsByRuleId(ruleId);
-                     t._checkDone();
-                  }
-               });
-            }
-
             /* show the menu please */
             ed.selection.select(e.target);
             p1 = dom.getPos(e.target);
@@ -800,14 +740,13 @@
 
       sendRequest : function(file, data, languageCode, success)
       {
-         var id  = this.editor.getParam("atd_rpc_id",  "12345678");
-         var url = this.editor.getParam("atd_rpc_url", "{backend}");
+         var url = this.editor.getParam("languagetool_rpc_url", "{backend}");
          var plugin = this;
 
-         if (url == '{backend}' || id == '12345678') 
+         if (url == '{backend}') 
          {
             this.editor.setProgressState(0);
-            alert('Please specify: atd_rpc_url and atd_rpc_id');
+            alert('Please specify: languagetool_rpc_url');
             return;
          }
    

Modified: 
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/readme.html
===================================================================
--- trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/readme.html     
2013-01-10 23:07:25 UTC (rev 8946)
+++ trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/readme.html     
2013-01-11 10:46:28 UTC (rev 8947)
@@ -4,6 +4,10 @@
  </head>
  <body>
    <h1>After the Deadline for TinyMCE - README</h1>
+   
+   
+   ***** NOTE: this README is out of date, as a lot of things have been 
changed for LanguageTool *****
+   
 
    <p><a href="http://www.afterthedeadline.com";>After the Deadline</a> is an 
<a href="http://open.afterthedeadline.com";>open source</a> software service 
that checks 
    <a href="http://www.afterthedeadline.com/features.slp";>spelling, style, and 
grammar.</a> This package contains an AtD TinyMCE Plugin and an example for 
using After the Deadline

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 23:07:25 UTC (rev 8946)
+++ 
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/editor_plugin.js
    2013-01-11 10:46:28 UTC (rev 8947)
@@ -171,7 +171,7 @@
             /* loading the content.css file, why? I have no clue */
             if (editor.settings.content_css !== false)
             {
-               editor.dom.loadCSS(editor.getParam("atd_css_url", url + 
'/css/content.css'));
+               editor.dom.loadCSS(editor.getParam("languagetool_css_url", url 
+ '/css/content.css'));
             }
         });
 
@@ -213,17 +213,6 @@
 
       createControl : function(name, controlManager) 
       {
-         var control = this;
-
-         if (name == 'AtD') 
-         {
-            return controlManager.createButton(name, { 
-               title: this.editor.getLang('AtD.button_proofread_tooltip', 
'Proofread Writing'),
-               image: this.editor.getParam('atd_button_url', this.url + 
'/atdbuttontr.gif'), 
-               cmd: 'mceWritingImprovementTool', 
-               scope: control 
-            });
-         }
       },
 
       _removeWords : function(w) 
@@ -359,66 +348,17 @@
               }
             });
 
-            if (String(this.editor.getParam("atd_ignore_enable",  "false")) == 
"true")
-            {
-                m.add({
-                  title : 
plugin.editor.getLang('AtD.menu_option_ignore_always', 'Ignore always'),
-                  onclick : function() 
-                  {
-                      var url = t.editor.getParam('atd_ignore_rpc_url', 
'{backend}');
+            m.add({
+              title : plugin.editor.getLang('menu_option_ignore_all', 'Ignore 
this kind of error'),
+              onclick : function() 
+              {
+                 var surrogate = 
e.target.getAttribute(plugin.editor.core.surrogateAttribute);
+                 var ruleId = plugin.editor.core.getSurrogatePart(surrogate, 
'id');
+                 t._removeWordsByRuleId(ruleId);
+                 t._checkDone();
+              }
+           });
 
-                      if (url == '{backend}')
-                      {
-                         /* Default scheme is to save ignore preferences in a 
cookie */
-
-                         var ignore = 
tinymce.util.Cookie.getHash('atd_ignore'); 
-                         if (ignore == undefined) { ignore = {}; }
-                         ignore[e.target.innerHTML] = 1;
-                  
-                         tinymce.util.Cookie.setHash('atd_ignore', ignore, new 
Date( (new Date().getTime()) + 157680000000) );
-                      }
-                      else
-                      {
-                         /* Plugin is configured to send ignore preferences to 
server, do that */
-
-                         var id  = t.editor.getParam("atd_rpc_id",  
"12345678");
-
-                         tinymce.util.XHR.send({
-                             url          : url + 
encodeURI(e.target.innerHTML).replace(/&/g, '%26') + "&key=" + id,
-                             content_type : 'text/xml',
-                             async        : true,
-                             type         : 'GET',
-                             success      : function( type, req, o )
-                             {
-                                /* do nothing */
-                             },
-                             error        : function( type, req, o )
-                             {
-                                alert( "Ignore preference save failed\n" + 
type + "\n" + req.status + "\nAt: " + o.url ); 
-                             }
-                         });
-
-                     }
-
-                     t._removeWords(e.target.innerHTML);
-                     t._checkDone();
-                  }
-               });
-            }
-            else
-            {
-                m.add({
-                  title : plugin.editor.getLang('menu_option_ignore_all', 
'Ignore this kind of error'),
-                  onclick : function() 
-                  {
-                     var surrogate = 
e.target.getAttribute(plugin.editor.core.surrogateAttribute);
-                     var ruleId = 
plugin.editor.core.getSurrogatePart(surrogate, 'id');
-                     t._removeWordsByRuleId(ruleId);
-                     t._checkDone();
-                  }
-               });
-            }
-
             /* show the menu please */
             ed.selection.select(e.target);
             p1 = dom.getPos(e.target);
@@ -473,14 +413,13 @@
 
       sendRequest : function(file, data, languageCode, success)
       {
-         var id  = this.editor.getParam("atd_rpc_id",  "12345678");
-         var url = this.editor.getParam("atd_rpc_url", "{backend}");
+         var url = this.editor.getParam("languagetool_rpc_url", "{backend}");
          var plugin = this;
 
-         if (url == '{backend}' || id == '12345678') 
+         if (url == '{backend}') 
          {
             this.editor.setProgressState(0);
-            alert('Please specify: atd_rpc_url and atd_rpc_id');
+            alert('Please specify: languagetool_rpc_url');
             return;
          }
    

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to