Changeset 1282


Ignore:
Timestamp:
11/18/10 17:14:00 (7 years ago)
Author:
ejucovy
Message:

closes #1538: add a cfg.TableOperations.addToolbarLineBreak option, default is true

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/TableOperations/TableOperations.js

    r1280 r1282  
    1616// HTMLArea-3.0 (except "insert table" which is included in the main file) 
    1717Xinha.Config.prototype.TableOperations = { 
    18   'showButtons' : true // Set to false to hide all but inserttable and toggleborders buttons on the toolbar 
     18  'showButtons' : true, // Set to false to hide all but inserttable and toggleborders buttons on the toolbar 
    1919  // this is useful if you have the ContextMenu plugin and want to save toolbar space 
    2020  // (the context menu can perform all the button operations) 
     21  'addToolbarLineBreak': true // By default TableOperations adds a 'linebreak' in the toolbar. 
     22  // Set to false to prevent this and instead just append the buttons without a 'linebreak'. 
    2123} 
    2224 
     
    3032  // register the toolbar buttons provided by this plugin 
    3133 
    32   // Remove existing inserttable and toggleborders, we will replace it in our group   
    33   cfg.removeToolbarElement(' inserttable toggleborders ');  
    34    
    35   var toolbar = ["linebreak", "inserttable", "toggleborders"]; 
    36    
    37    
     34  // Remove existing inserttable and toggleborders, we will replace it in our group 
     35  cfg.removeToolbarElement(' inserttable toggleborders '); 
     36 
     37  var toolbar; 
     38  if( cfg.TableOperations.addToolbarLineBreak ) { 
     39    toolbar = ["linebreak", "inserttable", "toggleborders"]; 
     40  } else { 
     41    toolbar = ["inserttable", "toggleborders"]; 
     42  } 
     43 
    3844  for (var i = 0; i < bl.length; ++i) { 
    3945    var btn = bl[i]; 
Note: See TracChangeset for help on using the changeset viewer.