Changeset 856 for trunk/plugins/ListType


Ignore:
Timestamp:
06/13/07 18:34:34 (12 years ago)
Author:
wymsy
Message:

Change namespace from HTMLArea to Xinha in all the plugins - ref ticket #916

File:
1 edited

Legend:

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

    r430 r856  
    11// ListType Plugin for Xinha 
    22// Toolbar Implementation by Mihai Bazon, http://dynarch.com/mishoo/ 
    3 HTMLArea.loadStyle( 'ListType.css', 'ListType' ); 
     3Xinha.loadStyle( 'ListType.css', 'ListType' ); 
    44 
    55function ListType( editor ) 
     
    1212  { 
    1313  var options = {}; 
    14     options[HTMLArea._lc( "Decimal numbers", "ListType" )] = "decimal"; 
    15     options[HTMLArea._lc( "Lower roman numbers", "ListType" )] = "lower-roman"; 
    16     options[HTMLArea._lc( "Upper roman numbers", "ListType" )] = "upper-roman"; 
    17     options[HTMLArea._lc( "Lower latin letters", "ListType" )] = "lower-alpha"; 
    18     options[HTMLArea._lc( "Upper latin letters", "ListType" )] = "upper-alpha"; 
    19     if (!HTMLArea.is_ie) 
     14    options[Xinha._lc( "Decimal numbers", "ListType" )] = "decimal"; 
     15    options[Xinha._lc( "Lower roman numbers", "ListType" )] = "lower-roman"; 
     16    options[Xinha._lc( "Upper roman numbers", "ListType" )] = "upper-roman"; 
     17    options[Xinha._lc( "Lower latin letters", "ListType" )] = "lower-alpha"; 
     18    options[Xinha._lc( "Upper latin letters", "ListType" )] = "upper-alpha"; 
     19    if (!Xinha.is_ie) 
    2020      // IE doesn't support this property; even worse, it complains 
    2121      // with a gross error message when we tried to select it, 
    2222      // therefore let's hide it from the damn "browser". 
    23       options[HTMLArea._lc( "Lower greek letters", "ListType" )] = "lower-greek"; 
     23      options[Xinha._lc( "Lower greek letters", "ListType" )] = "lower-greek"; 
    2424    var obj = 
    2525    { 
    2626      id            : "listtype", 
    27       tooltip       : HTMLArea._lc( "Choose list style type (for ordered lists)", "ListType" ), 
     27      tooltip       : Xinha._lc( "Choose list style type (for ordered lists)", "ListType" ), 
    2828      options       : options, 
    2929      action        : function( editor ) { self.onSelect( editor, this ); }, 
     
    3737  { 
    3838    editor._ListType = editor.addPanel( 'right' ); 
    39     HTMLArea.freeLater( editor, '_ListType' ); 
    40     HTMLArea.addClass( editor._ListType, 'ListType' ); 
     39    Xinha.freeLater( editor, '_ListType' ); 
     40    Xinha.addClass( editor._ListType, 'ListType' ); 
    4141    // hurm, ok it's pretty to use the background color for the whole panel, 
    4242    // but should not it be set by default when creating the panel ? 
    43     HTMLArea.addClass( editor._ListType.parentNode, 'dialog' ); 
     43    Xinha.addClass( editor._ListType.parentNode, 'dialog' ); 
    4444 
    4545    editor.notifyOn( 'modechange', 
     
    7777} 
    7878 
    79 HTMLArea.Config.prototype.ListType = 
     79Xinha.Config.prototype.ListType = 
    8080{ 
    8181  'mode': 'toolbar' // configuration mode : toolbar or panel 
     
    150150  var a = document.createElement( 'a' ); 
    151151  a.href = 'javascript:void(0)'; 
    152   HTMLArea._addClass( a, listStyleType ); 
    153   HTMLArea._addEvent( a, "click", function () 
     152  Xinha._addClass( a, listStyleType ); 
     153  Xinha._addEvent( a, "click", function () 
    154154    { 
    155155      var parent = editor._ListType.currentListTypeParent; 
     
    173173  { 
    174174    var elt = activeDiv.childNodes[i]; 
    175     if ( HTMLArea._hasClass( elt, defaultType ) ) 
     175    if ( Xinha._hasClass( elt, defaultType ) ) 
    176176    { 
    177       HTMLArea._addClass( elt, 'active' ); 
     177      Xinha._addClass( elt, 'active' ); 
    178178    } 
    179179    else 
    180180    { 
    181       HTMLArea._removeClass( elt, 'active' ); 
     181      Xinha._removeClass( elt, 'active' ); 
    182182    } 
    183183  } 
Note: See TracChangeset for help on using the changeset viewer.