projects
/
roojs1
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge changes for seperator change
[roojs1]
/
Roo
/
TabPanel.js
diff --git
a/Roo/TabPanel.js
b/Roo/TabPanel.js
index
b772652
..
e702b2f
100644
(file)
--- a/
Roo/TabPanel.js
+++ b/
Roo/TabPanel.js
@@
-59,8
+59,6
@@
Roo.TabPanel = function(container, config){
Roo.apply(this, config);
}
}
Roo.apply(this, config);
}
}
- Roo.log('running!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
-
if(this.tabPosition == "bottom"){
this.bodyEl = Roo.get(this.createBody(this.el.dom));
this.el.addClass("x-tabs-bottom");
if(this.tabPosition == "bottom"){
this.bodyEl = Roo.get(this.createBody(this.el.dom));
this.el.addClass("x-tabs-bottom");
@@
-368,7
+366,9
@@
Roo.extend(Roo.TabPanel, Roo.util.Observable, {
autoSizeTabs : function(){
var count = this.items.length;
var vcount = count - this.hiddenCount;
autoSizeTabs : function(){
var count = this.items.length;
var vcount = count - this.hiddenCount;
- if(!this.resizeTabs || count < 1 || vcount < 1 || this.updating) return;
+ if(!this.resizeTabs || count < 1 || vcount < 1 || this.updating) {
+ return;
+ }
var w = Math.max(this.el.getWidth() - this.cpad, 10);
var availWidth = Math.floor(w / vcount);
var b = this.stripBody;
var w = Math.max(this.el.getWidth() - this.cpad, 10);
var availWidth = Math.floor(w / vcount);
var b = this.stripBody;
@@
-404,7
+404,9
@@
Roo.extend(Roo.TabPanel, Roo.util.Observable, {
setTabWidth : function(width){
this.currentTabWidth = width;
for(var i = 0, len = this.items.length; i < len; i++) {
setTabWidth : function(width){
this.currentTabWidth = width;
for(var i = 0, len = this.items.length; i < len; i++) {
- if(!this.items[i].isHidden())this.items[i].setWidth(width);
+ if(!this.items[i].isHidden()) {
+ this.items[i].setWidth(width);
+ }
}
},
}
},
@@
-622,7
+624,11
@@
Roo.extend(Roo.TabPanelItem, Roo.util.Observable, {
autoSize : function(){
//this.el.beginMeasure();
this.textEl.setWidth(1);
autoSize : function(){
//this.el.beginMeasure();
this.textEl.setWidth(1);
- this.setWidth(this.textEl.dom.scrollWidth+this.pnode.getPadding("lr")+this.inner.getPadding("lr"));
+ /*
+ * #2804 [new] Tabs in Roojs
+ * increase the width by 2-4 pixels to prevent the ellipssis showing in chrome
+ */
+ this.setWidth(this.textEl.dom.scrollWidth+this.pnode.getPadding("lr")+this.inner.getPadding("lr") + 2);
//this.el.endMeasure();
},
//this.el.endMeasure();
},