@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux phosweb009 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
Current Path :
/
homepage
/
v-mt
/
mt-static
/
js
/
tc
/
Path :
Upload File :
New :
File
Dir
//homepage/v-mt/mt-static/js/tc/spellcheck.js
/* # Movable Type (r) (C) 2003-2008 Six Apart, Ltd. All Rights Reserved. # This code cannot be redistributed without permission from www.sixapart.com. # For more information, consult your Movable Type license. # # $Id: spellcheck.js 1174 2008-01-08 21:02:50Z bchoate $ */ /* -------------------------------------------------------------------------------- TC.SpellCheck live spell checking class -------------------------------------------------------------------------------- */ /* constructor */ TC.SpellCheck = function() { this.eventElements = []; this.inputElements = []; this.displayElements = []; this.words = []; var self = this; this.processEventClosure = function( evt ) { return self.processEvent( evt ); }; this.processWordsClosure = function() { return self.processWords(); }; } /* config */ TC.SpellCheck.prototype.url = "/t/app/weblog/spell"; TC.SpellCheck.prototype.delay = 250; // milliseconds TC.SpellCheck.prototype.updateDelay = 1000; /* instance methods */ TC.SpellCheck.prototype.processEvent = function( evt ) { evt = evt || event; var element = evt.target || evt.srcElement; // debug testing for( var i in this.displayElements ) { element = this.displayElements[ i ]; if( element.body ) element = element.body; var color = TC.ColorPicker.prototype.colors[ Math.floor( Math.random( 1.0 ) * 256 ) ]; element.style.borderBottom = color + " solid 1px"; } // alert( evt.type ); } TC.SpellCheck.prototype.addEventElement = function( element ) { element = TC.elementOrId( element ); if( !element ) return; this.eventElements.push( element ); TC.attachEvent( element, "change", this.processEventClosure ); TC.attachEvent( element, "keydown", this.processEventClosure ); TC.attachEvent( element, "drop", this.processEventClosure ); TC.attachEvent( element, "dragdrop", this.processEventClosure ); TC.attachEvent( element, "mouseup", this.processEventClosure ); } TC.SpellCheck.prototype.addInputElement = function( element ) { element = TC.elementOrId( element ); if( !element ) return; this.inputElements.push( element ); } TC.SpellCheck.prototype.addDisplayElement = function( element ) { element = TC.elementOrId( element ); if( !element ) return; this.displayElements.push( element ); }