Changeset 149


Ignore:
Timestamp:
05/11/05 08:19:21 (10 years ago)
Author:
niko
Message:
  • tweaked Statusbar
    • generate textmode-message in createStatusBar and hide it (_statusBarTextMode)
    • when switching into textmode don't clear the StatusBar?, instead hide the _statusBarTree and show _statusBarTextMode
    • added onMode in CharCount?-Plugin to hide the charCounter there too (fixes bug there)
  • when displaying inline-dialogs don't clear the statusBar, instead make the dialog higher
    • changed calculation of height (the -2 is necessary for IE)
    • dialog-div now positioned absolute instaed of relative (IE would move the statusBar down else)
  • fixed bug in inline-dialog getValues
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r148 r149  
    10251025  this._statusBarTree = div; 
    10261026  this._statusBar.appendChild(div); 
     1027 
     1028  div = document.createElement("span"); 
     1029  div.innerHTML = HTMLArea._lc("You are in TEXT MODE.  Use the [<>] button to switch back to WYSIWYG."); 
     1030  div.style.display = "none"; 
     1031  this._statusBarTextMode = div; 
     1032  this._statusBar.appendChild(div); 
     1033 
    10271034  if (!this.config.statusBar) { 
    10281035    // disable it... 
     
    16751682      if (this.config.statusBar) 
    16761683      { 
    1677         this._statusBar.innerHTML = HTMLArea._lc("You are in TEXT MODE.  Use the [<>] button to switch back to WYSIWYG."); 
     1684        this._statusBarTree.style.display = "none"; 
     1685        this._statusBarTextMode.style.display = ""; 
    16781686      } 
    16791687 
     
    16991707      if (this.config.statusBar) 
    17001708      { 
    1701         this._statusBar.innerHTML = ''; 
    1702         this._statusBar.appendChild(this._statusBarTree); 
     1709        this._statusBarTree.style.display = ""; 
     1710        this._statusBarTextMode.style.display = "none"; 
    17031711      } 
    17041712 
  • trunk/inline-dialog.js

    r73 r149  
    99  this.rootElem = document.createElement('div'); 
    1010  this.rootElem.className = 'dialog'; 
    11   this.rootElem.style.position = 'relative'; 
     11  this.rootElem.style.position = 'absolute'; 
    1212  this.rootElem.style.display  = 'none'; 
    1313 
    1414  this.width  = parseInt(this.rootElem.style.width  = this.editor._iframe.style.width); 
    15   this.height = parseInt(this.rootElem.style.height = this.editor._iframe.style.height); 
    16  
     15  this.height = this.rootElem.style.height = (parseInt(this.editor._iframe.style.height)+this.editor._statusBar.offsetHeight-2)+'px'; 
     16   
    1717  var dialog = this; 
    1818  if(typeof localizer == 'function') 
     
    6767      { 
    6868        dialog.width  = parseInt(dialog.rootElem.style.width  = args.editorWidth  + 'px'); 
    69         dialog.height = parseInt(dialog.rootElem.style.height = args.editorHeight + 'px'); 
     69        dialog.height = dialog.rootElem.style.height = (args.editorHeight+dialog.editor._statusBar.offsetHeight-2)+'px'; 
    7070        dialog.onresize(); 
    7171      } 
     
    9494  this.editor._textArea.style.display = 'none'; 
    9595  this.editor._iframe.style.visibility   = 'hidden'; 
    96   if (this.editor.config.statusBar) 
    97   { 
    98     this.editor._statusBar.innerHTML = '&nbsp;'; 
    99   } 
    10096  this.rootElem.style.display   = ''; 
    10197} 
     
    107103  this.editor._iframe.style.visibility   = this._restoreTo[1]; 
    108104  this.editor.showPanels(this._restoreTo[2]); 
    109   if (this.editor.config.statusBar) 
    110   { 
    111     this.editor._statusBar.innerHTML = ''; 
    112     this.editor._statusBar.appendChild(this.editor._statusBarTree); 
    113   } 
     105   
    114106  // Restore the selection 
    115107  if(HTMLArea.is_ie) 
     
    117109    this._lastRange.select(); 
    118110  } 
     111  this.editor.updateToolbar(); 
    119112  return this.getValues(); 
    120113} 
     
    296289            if(i.checked) 
    297290            { 
    298               if(v.push) 
     291              if(v && v.push) 
    299292              { 
    300293                v.push(i.value); 
  • trunk/plugins/CharCounter/char-counter.js

    r131 r149  
    3535} 
    3636 
     37CharCounter.prototype.onMode = function (mode) 
     38{ 
     39  //Hide Chars in statusbar when switching into textmode 
     40  switch (mode) 
     41  { 
     42    case "textmode": 
     43      this.charCount.style.display = "none"; 
     44      break; 
     45    case "wysiwyg": 
     46      this.charCount.style.display = ""; 
     47      break; 
     48    default: 
     49      alert("Mode <" + mode + "> not defined!"); 
     50      return false; 
     51  } 
     52} 
     53 
    3754CharCounter.prototype.onKeyPress = function(ev) { 
    3855    var cnt = this.updateCharCount(); 
Note: See TracChangeset for help on using the changeset viewer.