Ignore:
Timestamp:
05/09/07 12:20:00 (12 years ago)
Author:
gogo
Message:

Add config option to not dispaly toolbar buttons (useful with ContextMenu? loaded).

To turn off:

xinha_config.TableOperations?.showButtons = false;

Defaults to on (of course).

See Ticket:1020

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/TableOperations/table-operations.js

    r800 r827  
    1515// Object that will encapsulate all the table operations provided by 
    1616// HTMLArea-3.0 (except "insert table" which is included in the main file) 
     17Xinha.Config.prototype.TableOperations =  
     18{ 
     19  'showButtons' : true // Set to false to hide all but inserttable and toggleborders buttons on the toolbar 
     20                       // this is useful if you have the ContextMenu plugin and want to save toolbar space 
     21                       // (the context menu can perform all the button operations) 
     22} 
     23 
    1724function TableOperations(editor) { 
    1825        this.editor = editor; 
     
    2936        var toolbar = ["linebreak", "inserttable", "toggleborders"]; 
    3037     
     38   
    3139        for (var i = 0; i < bl.length; ++i) { 
    3240                var btn = bl[i]; 
    3341                if (!btn) { 
    34                         toolbar.push("separator"); 
     42                  if(cfg.TableOperations.showButtons)   toolbar.push("separator"); 
    3543                } else { 
    3644                        var id = "TO-" + btn[0]; 
     
    4048                                                   self.buttonPress(editor, id); 
    4149                                           }, btn[1]); 
    42                         toolbar.push(id); 
    43                 } 
    44         } 
     50                        if(cfg.TableOperations.showButtons) toolbar.push(id); 
     51                } 
     52        } 
     53   
    4554 
    4655        // add a new line in the toolbar 
Note: See TracChangeset for help on using the changeset viewer.