- Timestamp:
- 11/18/10 11:33:11 (2 years ago)
- Files:
-
- 1 modified
-
trunk/plugins/DefinitionList/DefinitionList.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/DefinitionList/DefinitionList.js
r1279 r1284 56 56 57 57 DefinitionList.prototype.buttonPress = function(editor,button_id) { 58 var pe; 59 var dx; 58 60 if (button_id=='dl') { //definition list 59 varpe = editor.getParentElement();61 pe = editor.getParentElement(); 60 62 if( pe.tagName.toLowerCase() != 'body' ) { 61 63 while (pe.parentNode.tagName.toLowerCase() != 'body') { … … 63 65 } 64 66 } 65 vardx = editor._doc.createElement(button_id);67 dx = editor._doc.createElement(button_id); 66 68 dx.innerHTML = ' '; 67 69 if( pe.tagName.toLowerCase() == 'body' ) { … … 73 75 } 74 76 } else if ((button_id=='dt')||(button_id=='dd')) { //definition term or description 75 varpe = editor.getParentElement();77 pe = editor.getParentElement(); 76 78 while (pe && (pe.nodeType == 1) && (pe.tagName.toLowerCase() != 'body')) { 77 79 if(pe.tagName.toLowerCase() == 'dl') { 78 vardx = editor._doc.createElement(button_id);80 dx = editor._doc.createElement(button_id); 79 81 dx.innerHTML = ' '; 80 82 pe.appendChild(dx); 81 83 break; 82 84 }else if((pe.tagName.toLowerCase() == 'dt')||(pe.tagName.toLowerCase() == 'dd')){ 83 var dx = editor._doc.createElement(button_id)85 dx = editor._doc.createElement(button_id); 84 86 dx.innerHTML = ' '; 85 87 if(pe.parentNode.lastChild==pe) {
