Changeset 817 for trunk


Ignore:
Timestamp:
04/17/07 16:37:39 (12 years ago)
Author:
wymsy
Message:

Added new config variables to set iframe width if less than editor width (ticket:322) and set alignment of toolbar buttons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r815 r817  
    299299  }; 
    300300 
     301  // to make the iframe width narrower than the toolbar width, e.g. to maintain 
     302  // the layout when editing a narrow column of text, set the next parameter (in pixels). 
     303  this.iframeWidth = null; 
     304 
    301305  // enable creation of a status bar? 
    302306  this.statusBar = true; 
     
    415419 
    416420  this.flowToolbars = true; 
     421   
     422  // set to center or right to change button alignment in toolbar 
     423  this.toolbarAlign = "left"; 
    417424   
    418425  // set to true if you want the loading panel to show at startup 
     
    961968  toolbar.className = "toolbar"; 
    962969  toolbar.unselectable = "1"; 
     970  toolbar.align = this.config.toolbarAlign; 
    963971 
    964972  Xinha.freeLater(this, '_toolBar'); 
     
    21432151    edcellwidth -= parseInt(this.config.panel_dimensions.right, 10);     
    21442152  } 
    2145   this._iframe.style.width = edcellwidth + 'px'; 
     2153  var iframeWidth = (this.config.iframeWidth)? parseInt(this.config.iframeWidth,10): null; 
     2154  this._iframe.style.width = (iframeWidth && iframeWidth < edcellwidth)? iframeWidth + "px": edcellwidth + "px"; 
    21462155 
    21472156  this._textArea.style.height = this._iframe.style.height; 
Note: See TracChangeset for help on using the changeset viewer.