Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/spell-checker.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/spell-checker.js,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/spell-checker.js 2 Feb 2007 21:05:05 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SpellChecker/spell-checker.js 25 Feb 2007 19:06:31 -0000 1.5 @@ -1,73 +1,73 @@ -// Spell Checker Plugin for HTMLArea-3.0 -// Sponsored by www.americanbible.org -// Implementation by Mihai Bazon, http://dynarch.com/mishoo/ -// -// (c) dynarch.com 2003. -// Distributed under the same terms as HTMLArea itself. -// This notice MUST stay intact for use (see license.txt). -// -// $Id$ - -HTMLArea.Config.prototype.SpellChecker = { 'backend': 'php', 'personalFilesDir' : '', 'defaultDictionary' : 'en_GB', 'utf8_to_entities' : true }; - -function SpellChecker(editor) { - this.editor = editor; - - var cfg = editor.config; - var bl = SpellChecker.btnList; - var self = this; - - // see if we can find the mode switch button, insert this before that - var id = "SC-spell-check"; - cfg.registerButton(id, this._lc("Spell-check"), editor.imgURL("spell-check.gif", "SpellChecker"), false, - function(editor, id) { - // dispatch button press event - self.buttonPress(editor, id); - }); - - cfg.addToolbarElement("SC-spell-check", "htmlmode", 1); -} - -SpellChecker._pluginInfo = { - name : "SpellChecker", - version : "1.0", - developer : "Mihai Bazon", - developer_url : "http://dynarch.com/mishoo/", - c_owner : "Mihai Bazon", - sponsor : "American Bible Society", - sponsor_url : "http://www.americanbible.org", - license : "htmlArea" -}; - -SpellChecker.prototype._lc = function(string) { - return HTMLArea._lc(string, 'SpellChecker'); -}; - -SpellChecker.btnList = [ - null, // separator - ["spell-check"] - ]; - -SpellChecker.prototype.buttonPress = function(editor, id) { - switch (id) { - case "SC-spell-check": - SpellChecker.editor = editor; - SpellChecker.init = true; - var uiurl = _editor_url + "plugins/SpellChecker/spell-check-ui.html"; - var win; - if (HTMLArea.is_ie) { - win = window.open(uiurl, "SC_spell_checker", - "toolbar=no,location=no,directories=no,status=no,menubar=no," + - "scrollbars=no,resizable=yes,width=600,height=450"); - } else { - win = window.open(uiurl, "SC_spell_checker", - "toolbar=no,menubar=no,personalbar=no,width=600,height=450," + - "scrollbars=no,resizable=yes"); - } - win.focus(); - break; - } -}; - -// this needs to be global, it's accessed from spell-check-ui.html +// Spell Checker Plugin for HTMLArea-3.0 +// Sponsored by www.americanbible.org +// Implementation by Mihai Bazon, http://dynarch.com/mishoo/ +// +// (c) dynarch.com 2003. +// Distributed under the same terms as HTMLArea itself. +// This notice MUST stay intact for use (see license.txt). +// +// $Id$ + +HTMLArea.Config.prototype.SpellChecker = { 'backend': 'php', 'personalFilesDir' : '', 'defaultDictionary' : 'en_GB', 'utf8_to_entities' : true }; + +function SpellChecker(editor) { + this.editor = editor; + + var cfg = editor.config; + var bl = SpellChecker.btnList; + var self = this; + + // see if we can find the mode switch button, insert this before that + var id = "SC-spell-check"; + cfg.registerButton(id, this._lc("Spell-check"), editor.imgURL("spell-check.gif", "SpellChecker"), false, + function(editor, id) { + // dispatch button press event + self.buttonPress(editor, id); + }); + + cfg.addToolbarElement("SC-spell-check", "htmlmode", 1); +} + +SpellChecker._pluginInfo = { + name : "SpellChecker", + version : "1.0", + developer : "Mihai Bazon", + developer_url : "http://dynarch.com/mishoo/", + c_owner : "Mihai Bazon", + sponsor : "American Bible Society", + sponsor_url : "http://www.americanbible.org", + license : "htmlArea" +}; + +SpellChecker.prototype._lc = function(string) { + return HTMLArea._lc(string, 'SpellChecker'); +}; + +SpellChecker.btnList = [ + null, // separator + ["spell-check"] + ]; + +SpellChecker.prototype.buttonPress = function(editor, id) { + switch (id) { + case "SC-spell-check": + SpellChecker.editor = editor; + SpellChecker.init = true; + var uiurl = _editor_url + "plugins/SpellChecker/spell-check-ui.html"; + var win; + if (HTMLArea.is_ie) { + win = window.open(uiurl, "SC_spell_checker", + "toolbar=no,location=no,directories=no,status=no,menubar=no," + + "scrollbars=no,resizable=yes,width=600,height=450"); + } else { + win = window.open(uiurl, "SC_spell_checker", + "toolbar=no,menubar=no,personalbar=no,width=600,height=450," + + "scrollbars=no,resizable=yes"); + } + win.focus(); + break; + } +}; + +// this needs to be global, it's accessed from spell-check-ui.html SpellChecker.editor = null; \ No newline at end of file