summaryrefslogtreecommitdiffstats
path: root/autocomplete/js/modomt.js
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-03-28 17:02:18 +0100
committerAndreas Unterkircher <unki@netshadow.at>2008-03-28 17:02:18 +0100
commit144f16a71f7289bb891c52995061aee21e3e08f9 (patch)
treeb8cd9492463dad0cb0dbe751145e45a8fd54b53b /autocomplete/js/modomt.js
parentaf0be8f9546fb5dec947be33e465bb6d9e85d0a7 (diff)
remove autocomplete and use autosuggest instead
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
Diffstat (limited to 'autocomplete/js/modomt.js')
-rw-r--r--autocomplete/js/modomt.js259
1 files changed, 0 insertions, 259 deletions
diff --git a/autocomplete/js/modomt.js b/autocomplete/js/modomt.js
deleted file mode 100644
index 2987ae8..0000000
--- a/autocomplete/js/modomt.js
+++ /dev/null
@@ -1,259 +0,0 @@
-//
-// This script was created
-// by Mircho Mirev
-// mo /mo@momche.net/
-//
-// :: feel free to use it BUT
-// :: if you want to use this code PLEASE send me a note
-// :: and please keep this disclaimer intact
-//
-
-if ( document.ELEMENT_NODE == null )
-{
- document.ELEMENT_NODE = 1
- document.TEXT_NODE = 3
-}
-
-
-function getSubNodeByName( hNode, sNodeName )
-{
- if( hNode != null )
- {
- var nNc = 0
- var nC = 0
- var hNodeChildren = hNode.childNodes
- var hCNode = null
- while( nC < hNodeChildren.length )
- {
- hCNode = hNodeChildren.item( nC++ )
- if( ( hCNode.nodeType == 1 ) && ( hCNode.nodeName.toLowerCase() == sNodeName ) )
- {
- return hCNode
- }
- }
- }
- return null
-}
-
-function getPrevNodeSibling( hNode )
-{
- if( hNode != null )
- {
- do {
- hNode = hNode.previousSibling
- } while( hNode != null && hNode.nodeType != 1 )
- return hNode
- }
-}
-
-function getNextNodeSibling( hNode )
-{
- if( hNode != null )
- {
- do {
- hNode = hNode.nextSibling
- } while( hNode != null && hNode.nodeType != 1 )
- return hNode
- }
-}
-
-function getLastSubNodeByName( hNode, sNodeName )
-{
- if( hNode != null )
- {
- var nNc = 0
- var nC = 0
- var hNodeChildren = hNode.childNodes
- var hCNode = null
- var nLength = hNodeChildren.length - 1
- while( nLength >=0 )
- {
- hCNode = hNodeChildren.item( nLength )
- if( ( hCNode.nodeType == 1 ) && ( hCNode.nodeName.toLowerCase() == sNodeName ) )
- {
- return hCNode
- }
- nLength--
- }
- }
- return null
-}
-
-function getSubNodeByProperty( hNode, sProperty, sPropValue )
-{
- if( hNode != null )
- {
- var nNc = 0
- var nC = 0
- var hNodeChildren = hNode.childNodes
- var hCNode = null
- var sAttribute
- var hProp
- sPropValue = sPropValue.toLowerCase()
- while( nC < hNodeChildren.length )
- {
- hCNode = hNodeChildren.item( nC++ )
- if( hCNode.nodeType == document.ELEMENT_NODE )
- {
- hProp = eval( 'hCNode.'+sProperty )
- if( typeof( sPropValue ) != 'undefined' )
- {
- if( hProp.toLowerCase() == sPropValue )
- {
- return hCNode
- }
- }
- else
- {
- return hCNode
- }
- }
- nNc++
- }
- }
- return null
-}
-
-function findAttribute( hNode, sAtt )
-{
- sAtt = sAtt.toLowerCase()
- for( var nI = 0; nI < hNode.attributes.length; nI++ )
- {
- if( hNode.attributes.item( nI ).nodeName.toLowerCase() == sAtt )
- {
- return hNode.attributes.item( nI ).nodeValue
- }
- }
- return null
-}
-
-function getSubNodeByAttribute( hNode, sAtt, sAttValue )
-{
- if( hNode != null )
- {
- var nNc = 0
- var nC = 0
- var hNodeChildren = hNode.childNodes
- var hCNode = null
- var sAttribute
- sAttValue = sAttValue.toLowerCase()
- while( nC < hNodeChildren.length )
- {
- hCNode = hNodeChildren.item( nC++ )
- if( hCNode.nodeType == document.ELEMENT_NODE )
- {
- sAttribute = hCNode.getAttribute( sAtt )
- if( sAttribute && sAttribute.toLowerCase() == sAttValue )
- return hCNode
- }
- nNc++
- }
- }
- return null
-}
-
-function getLastSubNodeByAttribute( hNode, sAtt, sAttValue )
-{
- if( hNode != null )
- {
- var nNc = 0
- var nC = 0
- var hNodeChildren = hNode.childNodes
- var hCNode = null
- var nLength = hNodeChildren.length - 1
- while( nLength >= 0 )
- {
- hCNode = hNodeChildren.item( nLength )
- if( hCNode.nodeType == document.ELEMENT_NODE )
- {
- sAttribute = hCNode.getAttribute( sAtt )
- if( sAttribute && sAttribute.toLowerCase() == sAttValue )
- return hCNode
- }
- nLength--
- }
- }
- return null
-}
-
-function getParentByTagName( hNode, sParentTagName )
-{
- while( ( hNode.tagName ) && !( /(body|html)/i.test( hNode.tagName ) ) )
- {
- if( hNode.tagName == sParentTagName )
- {
- return hNode
- }
- hNode = hNode.parentNode
- }
- return null
-}
-
-function getParentByAttribute( hNode, sAtt, sAttValue )
-{
- while( ( hNode.tagName ) && !( /(body|html)/i.test( hNode.tagName ) ) )
- {
- //opera strangely returns non null result sometimes
- var sAttr = hNode.getAttribute( sAtt )
- if( sAttr != null && sAttr.toString().length > 0 )
- {
- if( sAttValue !== null )
- {
- if( sAttr == sAttValue )
- {
- return hNode
- }
- }
- else
- {
- return hNode
- }
- }
- hNode = hNode.parentNode
- }
- return null
-}
-
-function getParentByProperty( hNode, sProperty, sPropValue )
-{
- while( ( hNode.tagName ) && !( /(body|html)/i.test( hNode.tagName ) ) )
- {
- //opera strangely returns non null result sometimes
- var hProp = eval( 'hNode.'+sProperty )
- if( hProp != null && hProp.toString().length > 0 )
- {
- if( sPropValue !== null )
- {
- if( hProp == sPropValue )
- {
- return hNode
- }
- }
- else
- {
- return hNode
- }
- }
- hNode = hNode.parentNode
- }
- return null
-}
-
-
-function getNodeText( hNode )
-{
- if( hNode == null )
- {
- return ''
- }
- var sRes
- if( hNode.hasChildNodes() )
- {
- sRes = hNode.childNodes.item(0).nodeValue
- }
- else
- {
- sRes = hNode.text
- }
- return sRes
-} \ No newline at end of file