Changeset 315


Ignore:
Timestamp:
09/11/05 18:13:05 (14 years ago)
Author:
mokhet
Message:

fix detection of parent element (OL or UL)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ListType/list-type.js

    r314 r315  
    125125{ 
    126126  if ( this.editor.config.ListType.mode == 'toolbar' ) return ; 
    127   var courant = this.editor.getParentElement(); 
    128   var parent = courant; 
    129   if ( ( courant.tagName.toLowerCase() == 'li' ) && ( typeof courant.parentNode != 'undefined' ) ) 
    130    parent = courant.parentNode; 
    131   if ( ( parent.tagName.toLowerCase() == 'ul' ) || ( parent.tagName.toLowerCase() == 'ol' ) ) 
     127  var parent = editor.getParentElement(); 
     128  while ( parent && !/^[o|u]l$/i.test( parent.tagName ) ) 
     129    parent = parent.parentNode; 
     130  if (parent) 
    132131  { 
    133132    this.showPanel( parent ); 
Note: See TracChangeset for help on using the changeset viewer.