Changeset 4397

Show
Ignore:
Timestamp:
Wed Jan 25 21:38:14 2006
Author:
paul
Message:

Fix for bugs #1675 and #1663.

Files:

Legend:

Unmodified
Added
Removed
Modified
  • branches/CAMPSITE_2_4_BRANCH/campsite/implementation/management/priv/articles/editor_load_xinha.php

    r4355 r4397  
    25 25 <script type="text/javascript">  
    26 26 function CampsiteSubhead(editor, objectName, object) {  
    27       parent = editor.getParentElement();  
    28       if ((parent.tagName.toLowerCase() == "span") &&  
    29           (parent.className.toLowerCase()=="campsite_subhead")) {  
    30           editor.selectNodeContents(parent);  
    31           //editor._doc.execCommand("unlink", false, null);  
    32           editor.updateToolbar();  
    33           return false;  
    34       }  
    35       else {  
    36           editor.surroundHTML('<span class="campsite_subhead">', '</span>');  
      27     if (!HTMLArea.is_ie) {  
      28         // This statement crashes in the most bizarre way on IE.  
      29         // If you remove the "parent = " here, then it doesnt crash.  
      30         // So IE will allow subheads within subheads (bad), while  
      31         // the code below will prevent that for the other browsers.  
      32         parent = editor.getParentElement();  
      33         if ((parent.tagName.toLowerCase() == "span") &&  
      34             (parent.className.toLowerCase()=="campsite_subhead")) {  
      35             editor.selectNodeContents(parent);  
      36             editor.updateToolbar();  
      37             return false;  
      38         } else {  
      39             editor.surroundHTML('<span class="campsite_subhead">', '</span>');  
      40         }  
      41     } else {  
      42         editor.surroundHTML('<span class="campsite_subhead">', '</span>');       
    37 43     }  
    38 44 } // fn CampsiteSubhead  
    353 359     }  
    354 360      
      361     if ($p_user->hasPermission('EditorFontFace')) {  
      362         $toolbar2[] = "\"formatblock\"";  
      363         $toolbar2[] = "\"fontname\"";  
      364     }  
      365      
      366     if ($p_user->hasPermission('EditorFontSize')) {  
      367         $toolbar2[] = "\"fontsize\"";  
      368     }  
      369      
    355 370     // This is to fix ticket #1602.  You only want the line break if  
    356 371     // there is more than one line in the toolbar.