/* * ig_spellchecker.js * Version 10.2.20102.2230 * Copyright(c) 2001-2011 Infragistics, Inc. All Rights Reserved. */ function ig_CreateWebSpellChecker(props) { if(!ig_WebControl.prototype.isPrototypeOf(ig_WebSpellChecker.prototype)) { ig_WebSpellChecker.prototype = new ig_WebControl(); ig_WebSpellChecker.prototype.constructor = ig_WebSpellChecker; ig_WebSpellChecker.prototype.base=ig_WebControl.prototype; ig_WebSpellChecker.prototype.init = function(props) { this._isInitializing = true; this._initControlProps(props); var o; if(ig_all) o = ig_all[this.getClientID()]; this.base.init.apply(this,[this.getClientID()]); this._isInitializing = false; this._spellChecker = this; var id = this.getButtonId(); if(id != null && id.length > 0) { var button = document.getElementById(id); if(button != null) { button._spellChecker = this; ig_shared.addEventListener(button, "click", this._buttonClick, true); } } } ig_WebSpellChecker.prototype._onUnload = function(src, evnt) { if(this._window != null) this._window.close(); } ig_WebSpellChecker.prototype._buttonClick = function(evnt) { var elem = evnt.target; if (evnt.srcElement) elem = evnt.srcElement elem._spellChecker.checkTextComponent(); if (!ig_shared.IsIE7Compat) ig_cancelEvent(evnt); } ig_WebSpellChecker.prototype.checkTextComponent = function(textComponentId) { if(textComponentId == null) textComponentId = this._spellChecker.getTextComponentId() var textToBeChecked = this._spellChecker._escQuotes(this._spellChecker._escEntities(this._spellChecker.getText(textComponentId))); this._spellChecker.checkSpelling(textToBeChecked, null, textComponentId); } ig_WebSpellChecker.prototype.checkSpelling = function(textToBeChecked, returnFunc, textComponentId) { if(textToBeChecked != null && textToBeChecked.length > 0) { textToBeChecked = escape(textToBeChecked.replace(/\+/g,"%2B")); if(textComponentId == null && returnFunc != null) this._spellChecker._returnFunc = returnFunc; else this._spellChecker._returnFunc = null; if(textComponentId == null) textComponentId = ""; if(typeof iged_getById == 'function') if (iged_getById(textComponentId)) this._htmlEditor = true; var doc = ""; doc += ""+ this._spellChecker.getSpellCheckText()+""; var dialogUrl = this._spellChecker.getWebSpellCheckerDialogPage(); if(dialogUrl.length > 0) doc += "
"; doc += "