Changeset 1142 for trunk/plugins


Ignore:
Timestamp:
12/11/08 15:32:38 (11 years ago)
Author:
nicholasbs
Message:

FIXES #314 (status bar screwed up when displaying long URL)

  • updates status bar to hide overflow content
  • adds standardized method (registerStatusWidget) for adding things to the status bar
  • updates the CharCounter? plugin to use this method
  • updates the skins to work correctly with new status bar
File:
1 edited

Legend:

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

    r1067 r1142  
    4040  var self = this; 
    4141  if (this.charCount==null) { 
    42     var charCount = document.createElement("span"); 
    43     charCount.style.padding = "2px 5px"; 
    44     if(Xinha.is_ie) { 
    45       charCount.style.styleFloat = "right"; 
    46     } else { 
    47       charCount.style.cssFloat = "right"; 
    48     } 
    49     var brk = document.createElement('div'); 
    50     brk.style.height = 
    51     brk.style.width = 
    52     brk.style.lineHeight = 
    53     brk.style.fontSize = '1px'; 
    54     brk.style.clear = 'both'; 
    55     if(Xinha.is_ie) { 
    56       this.editor._statusBarTree.style.styleFloat = "left"; 
    57     } else { 
    58       this.editor._statusBarTree.style.cssFloat = "left"; 
    59     } 
    60     this.editor._statusBar.appendChild(charCount); 
    61     this.editor._statusBar.appendChild(brk); 
    62     this.charCount = charCount; 
     42      var charCount = self.editor.registerStatusWidget('CharCounter', ['wysiwyg']); 
     43      this.charCount = charCount; 
    6344  } 
    6445}; 
     
    119100}; 
    120101 
    121 CharCounter.prototype.onMode = function (mode) 
    122 { 
    123   //Hide Chars in statusbar when switching into textmode 
    124   switch (mode) 
    125   { 
    126     case "textmode": 
    127       this.charCount.style.display = "none"; 
    128       break; 
    129     case "wysiwyg": 
    130       this.charCount.style.display = ""; 
    131       break; 
    132     default: 
    133       alert("Mode <" + mode + "> not defined!"); 
    134       return false; 
    135   } 
    136 }; 
Note: See TracChangeset for help on using the changeset viewer.