X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsymbols%2Fsrc%2FRoo_bootstrap_NavProgressBar.js.html;h=a72080077fea1a4d6c8d9229d2380dd16a0d680e;hb=c9e64e2d28d0360fc566f90f2d0f878c4372f144;hp=81a170ce3d0518d1d44f930a2fd5b3d5d7381807;hpb=9630137da0ec41a1daa9fe9455577141f5894d78;p=roojs1 diff --git a/docs/symbols/src/Roo_bootstrap_NavProgressBar.js.html b/docs/symbols/src/Roo_bootstrap_NavProgressBar.js.html index 81a170ce3d..a72080077f 100644 --- a/docs/symbols/src/Roo_bootstrap_NavProgressBar.js.html +++ b/docs/symbols/src/Roo_bootstrap_NavProgressBar.js.html @@ -39,20 +39,46 @@ bullets : [], barItems : [], - getAutoCreate : function() { var cfg = Roo.apply({}, Roo.bootstrap.NavProgressBar.superclass.getAutoCreate.call(this)); cfg = { - tag : 'ul', - cls: 'roo-navigation-bar' - } + tag : 'div', + cls : 'roo-navigation-bar-group', + cn : [ + { + tag : 'div', + cls : 'roo-navigation-top-bar' + }, + { + tag : 'div', + cls : 'roo-navigation-bullets-bar', + cn : [ + { + tag : 'ul', + cls : 'roo-navigation-bar' + } + ] + }, + + { + tag : 'div', + cls : 'roo-navigation-bottom-bar' + } + ] + + }; return cfg; }, + initEvents: function() + { + + }, + onRender : function(ct, position) { Roo.bootstrap.NavProgressBar.superclass.onRender.call(this, ct, position); @@ -63,6 +89,8 @@ }, this); } + this.format(); + }, addItem : function(cfg) @@ -70,11 +98,40 @@ var item = new Roo.bootstrap.NavProgressItem(cfg); item.parentId = this.id; - item.render(this.el, null); + item.render(this.el.select('.roo-navigation-bar', true).first(), null); - this.barItems.push(item); + if(cfg.html){ + var top = new Roo.bootstrap.Element({ + tag : 'div', + cls : 'roo-navigation-bar-text' + }); + + var bottom = new Roo.bootstrap.Element({ + tag : 'div', + cls : 'roo-navigation-bar-text' + }); + + top.onRender(this.el.select('.roo-navigation-top-bar', true).first(), null); + bottom.onRender(this.el.select('.roo-navigation-bottom-bar', true).first(), null); + + var topText = new Roo.bootstrap.Element({ + tag : 'span', + html : (typeof(cfg.position) != 'undefined' && cfg.position == 'top') ? cfg.html : '' + }); + + var bottomText = new Roo.bootstrap.Element({ + tag : 'span', + html : (typeof(cfg.position) != 'undefined' && cfg.position == 'top') ? '' : cfg.html + }); + + topText.onRender(top.el, null); + bottomText.onRender(bottom.el, null); + + item.topEl = top; + item.bottomEl = bottom; + } - this.formatBullets(); + this.barItems.push(item); return item; }, @@ -172,17 +229,20 @@ this.setActiveItem(this.barItems[i-1]); }, - formatBullets : function() + format : function() { if(!this.barItems.length){ return; } - + var width = 100 / this.barItems.length; Roo.each(this.barItems, function(i){ i.el.setStyle('width', width + '%'); + i.topEl.el.setStyle('width', width + '%'); + i.bottomEl.el.setStyle('width', width + '%'); }, this); + } });