Changeset 3979 for BreadCrumbs
- Timestamp:
- 05/13/09 13:39:10 (3 years ago)
- Location:
- BreadCrumbs/js
- Files:
-
- 2 modified
-
breadcrumbslist.js (modified) (2 diffs)
-
crumb.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
BreadCrumbs/js/breadcrumbslist.js
r3978 r3979 97 97 return { 98 98 fontSize: parseInt(cont.getStyle("font-size")), 99 len: cont. textContent.length,100 text: cont. textContent99 len: cont.getText().length, 100 text: cont.getText() 101 101 }; 102 102 … … 131 131 var span = document.createElement("span"); 132 132 span.style.fontSize = maxEl.fontSize; 133 span.innerHTML = maxEl.text ;133 span.innerHTML = maxEl.text.gsub(/\s+/, " "); 134 134 span.hide(); 135 135 $$("body")[0].appendChild(span); -
BreadCrumbs/js/crumb.js
r3978 r3979 114 114 var len = Math.floor(this.dimensions.width/fsize); 115 115 116 console.log("TEXT: "+this.text);117 118 116 if ( len > this.text.length ) 119 117 { … … 183 181 } 184 182 185 console.log("CRUMB: "+this.acrumb.textContent); 186 187 this.text = ( this.acrumb != null ) ? ( this.acrumb.textContent ) : ""; 183 this.text = ( this.acrumb != null ) ? ( this.acrumb.getText() ) : ""; 188 184 189 185 Event.observe(this.licrumb, "mouseover", this.breadcrumbs.focusOn.bindAsEventListener(this.breadcrumbs, this, this)); … … 191 187 } 192 188 }); 189 190 Object.extend(Element.prototype, { 191 getText: function(){ 192 return (!Object.isUndefined(this.textContent)) ? this.textContent : this.innerText; 193 } 194 }); 195
