docs/default.css
[roojs1] / roojs-bootstrap.js
index f82e7ba..4803e5e 100644 (file)
@@ -987,7 +987,7 @@ if(this.faicon){A.cn[0].cls+=' fa '+this.faicon;}if(this.weight){A.cls+=' alert-
 }});
 // Roo/bootstrap/UploadCropbox.js
 Roo.bootstrap.UploadCropbox=function(A){Roo.bootstrap.UploadCropbox.superclass.constructor.call(this,A);this.addEvents({"beforeselectfile":true,"initial":true,"crop":true,"prepare":true,"exception":true,"beforeloadcanvas":true,"trash":true,"download":true,"footerbuttonclick":true,"resize":true,"rotate":true,"inspect":true,"upload":true,"arrange":true});
-this.buttons=this.buttons||Roo.bootstrap.UploadCropbox.footer.STANDARD;};Roo.extend(Roo.bootstrap.UploadCropbox,Roo.bootstrap.Component,{emptyText:'Click to upload image',rotateNotify:'Image is too small to rotate',errorTimeout:3000,scale:0,baseScale:1,rotate:0,dragable:false,pinching:false,mouseX:0,mouseY:0,cropData:false,minWidth:300,minHeight:300,file:false,exif:{},baseRotate:1,cropType:'image/jpeg',buttons:false,canvasLoaded:false,isDocument:false,getAutoCreate:function(){var A={tag:'div',cls:'roo-upload-cropbox',cn:[{tag:'div',cls:'roo-upload-cropbox-body',style:'cursor:pointer',cn:[{tag:'input',cls:'roo-upload-cropbox-selector',type:'file'},{tag:'div',cls:'roo-upload-cropbox-preview'},{tag:'div',cls:'roo-upload-cropbox-thumb'},{tag:'div',cls:'roo-upload-cropbox-empty-notify',html:this.emptyText},{tag:'div',cls:'roo-upload-cropbox-error-notify alert alert-danger',html:this.rotateNotify}]},{tag:'div',cls:'roo-upload-cropbox-footer',cn:{tag:'div',cls:'btn-group btn-group-justified roo-upload-cropbox-btn-group',cn:[]}}]};
+this.buttons=this.buttons||Roo.bootstrap.UploadCropbox.footer.STANDARD;};Roo.extend(Roo.bootstrap.UploadCropbox,Roo.bootstrap.Component,{emptyText:'Click to upload image',rotateNotify:'Image is too small to rotate',errorTimeout:3000,scale:0,baseScale:1,rotate:0,dragable:false,pinching:false,mouseX:0,mouseY:0,cropData:false,minWidth:300,minHeight:300,file:false,exif:{},baseRotate:1,cropType:'image/jpeg',buttons:false,canvasLoaded:false,isDocument:false,method:'POST',paramName:'imageUpload',getAutoCreate:function(){var A={tag:'div',cls:'roo-upload-cropbox',cn:[{tag:'input',cls:'roo-upload-cropbox-selector',type:'file'},{tag:'div',cls:'roo-upload-cropbox-body',style:'cursor:pointer',cn:[{tag:'div',cls:'roo-upload-cropbox-preview'},{tag:'div',cls:'roo-upload-cropbox-thumb'},{tag:'div',cls:'roo-upload-cropbox-empty-notify',html:this.emptyText},{tag:'div',cls:'roo-upload-cropbox-error-notify alert alert-danger',html:this.rotateNotify}]},{tag:'div',cls:'roo-upload-cropbox-footer',cn:{tag:'div',cls:'btn-group btn-group-justified roo-upload-cropbox-btn-group',cn:[]}}]};
 return A;},onRender:function(ct,A){Roo.bootstrap.UploadCropbox.superclass.onRender.call(this,ct,A);if(this.buttons.length){Roo.each(this.buttons,function(bb){var B=this.el.select('.roo-upload-cropbox-footer div.roo-upload-cropbox-btn-group').first().createChild(bb);
 B.on('click',this.onFooterButtonClick.createDelegate(this,[bb.action],true));},this);}},initEvents:function(){this.urlAPI=(window.createObjectURL&&window)||(window.URL&&URL.revokeObjectURL&&URL)||(window.webkitURL&&webkitURL);this.bodyEl=this.el.select('.roo-upload-cropbox-body',true).first();
 this.bodyEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.selectorEl=this.el.select('.roo-upload-cropbox-selector',true).first();this.selectorEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.selectorEl.hide();this.previewEl=this.el.select('.roo-upload-cropbox-preview',true).first();
@@ -1057,14 +1057,12 @@ this.baseScale=B/this.imageEl.OriginHeight;if(this.imageEl.OriginWidth*this.base
 },onTouchStart:function(e){if(!this.canvasLoaded){this.beforeSelectFile(e);return;}var A=e.browserEvent.touches;if(!A){return;}if(A.length==1){this.onMouseDown(e);return;}if(A.length!=2){return;}var B=[];for(var i=0,C;C=A[i];i++){B.push(C.pageX,C.pageY);}var x=Math.pow(B[0]-B[2],2);
 var y=Math.pow(B[1]-B[3],2);this.startDistance=Math.sqrt(x+y);this.startScale=this.scale;this.pinching=true;this.dragable=false;},onTouchMove:function(e){if(!this.pinching&&!this.dragable){return;}var A=e.browserEvent.touches;if(!A){return;}if(this.dragable){this.onMouseMove(e);
 return;}var B=[];for(var i=0,C;C=A[i];i++){B.push(C.pageX,C.pageY);}var x=Math.pow(B[0]-B[2],2);var y=Math.pow(B[1]-B[3],2);this.endDistance=Math.sqrt(x+y);this.scale=this.startScale+Math.floor(Math.log(this.endDistance/this.startDistance)/Math.log(1.1));
-if(!this.zoomable()){this.scale=this.startScale;return;}this.draw();},onTouchEnd:function(e){this.pinching=false;this.dragable=false;},process:function(A,B){this.xhr=new XMLHttpRequest();if(typeof(this.file.id)!='undefined'&&this.file.id*1>0){return;}A.xhr=this.xhr;
-this.xhr.open(this.method,this.url,true);var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);
-};this.xhr.onerror=function(){F.xhrOnError(F.xhr);};var G=new FormData();G.append('returnHTML','NO');if(B){G.append('crop',B);}G.append(this.paramName,A,A.name);if(this.fireEvent('arrange',this,G)!=false){this.xhr.send(G);};},xhrOnLoad:function(A){if(A.readyState!==4){this.fireEvent('exception',this,A);
+if(!this.zoomable()){this.scale=this.startScale;return;}this.draw();},onTouchEnd:function(e){this.pinching=false;this.dragable=false;},process:function(A,B){this.xhr=new XMLHttpRequest();A.xhr=this.xhr;this.xhr.open(this.method,this.url,true);var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};
+for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);};this.xhr.onerror=function(){F.xhrOnError(F.xhr);};var G=new FormData();G.append('returnHTML','NO');if(B){G.append('crop',B);}if(typeof(A)!='undefined'&&(typeof(A.id)=='undefined'||A.id*1<1)){G.append(this.paramName,A,A.name);
+}if(typeof(A.filename)!='undefined'){G.append('filename',A.filename);}if(typeof(A.mimetype)!='undefined'){G.append('mimetype',A.mimetype);}if(this.fireEvent('arrange',this,G)!=false){this.xhr.send(G);};},xhrOnLoad:function(A){if(A.readyState!==4){this.fireEvent('exception',this,A);
 return;}var B=Roo.decode(A.responseText);if(!B.success){this.fireEvent('exception',this,A);return;}var B=Roo.decode(A.responseText);this.fireEvent('upload',this,B);},xhrOnError:function(){Roo.log('xhr on error');var A=Roo.decode(xhr.responseText);Roo.log(A);
-},uploadFromSource:function(A,B){this.xhr=new XMLHttpRequest();this.xhr.open(this.method,this.url,true);var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);
-}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);};this.xhr.onerror=function(){F.xhrOnError(F.xhr);};var G=new FormData();G.append('returnHTML','NO');G.append('crop',B);if(typeof(A.filename)!='undefined'){G.append('filename',A.filename);}if(typeof(A.mimetype)!='undefined'){G.append('mimetype',A.mimetype);
-}if(this.fireEvent('arrange',this,G)!=false){this.xhr.send(G);};},prepare:function(A){this.file=false;this.exif={};if(typeof(A)==='string'){this.loadCanvas(A);return;}if(!A||!this.urlAPI){return;}this.file=A;this.cropType=A.type;var B=this;if(this.fireEvent('prepare',this,this.file)!=false){var C=new FileReader();
-C.onload=function(e){if(e.target.error){Roo.log(e.target.error);return;}var D=e.target.result,E=new DataView(D),F=2,G=E.byteLength-4,H,I;if(E.getUint16(0)===0xffd8){while(F<G){H=E.getUint16(F);if((H>=0xffe0&&H<=0xffef)||H===0xfffe){I=E.getUint16(F+2)+2;if(F+I>E.byteLength){Roo.log('Invalid meta data: Invalid segment size.');
+},prepare:function(A){this.file=false;this.exif={};if(typeof(A)==='string'){this.loadCanvas(A);return;}if(!A||!this.urlAPI){return;}this.file=A;this.cropType=A.type;var B=this;if(this.fireEvent('prepare',this,this.file)!=false){var C=new FileReader();C.onload=function(e){if(e.target.error){Roo.log(e.target.error);
+return;}var D=e.target.result,E=new DataView(D),F=2,G=E.byteLength-4,H,I;if(E.getUint16(0)===0xffd8){while(F<G){H=E.getUint16(F);if((H>=0xffe0&&H<=0xffef)||H===0xfffe){I=E.getUint16(F+2)+2;if(F+I>E.byteLength){Roo.log('Invalid meta data: Invalid segment size.');
 break;}if(H==0xffe1){B.parseExifData(E,F,I);}F+=I;continue;}break;}}var J=B.urlAPI.createObjectURL(B.file);B.loadCanvas(J);return;};C.readAsArrayBuffer(this.file);}},parseExifData:function(A,B,C){var D=B+10,E,F;if(A.getUint32(B+4)!==0x45786966){return;}if(A.getUint32(B+4)!==0x45786966){return;
 }if(D+8>A.byteLength){Roo.log('Invalid Exif data: Invalid segment size.');return;}if(A.getUint16(B+8)!==0x0000){Roo.log('Invalid Exif data: Missing byte alignment offset.');return;}switch(A.getUint16(D)){case 0x4949:E=true;break;case 0x4D4D:E=false;break;
 default:Roo.log('Invalid Exif data: Invalid byte alignment marker.');return;}if(A.getUint16(D+2,E)!==0x002A){Roo.log('Invalid Exif data: Missing TIFF marker.');return;}F=A.getUint32(D+4,E);this.parseExifTags(A,D,D+F,E);},parseExifTags:function(A,B,C,D){var E,F,i;
@@ -1077,7 +1075,7 @@ i+=1){c=J[i];if(c==='\u0000'){break;}K+=c;}return K;}return J;}});Roo.apply(Roo.
 },size:4},10:{getValue:function(A,B,C){return A.getInt32(B,C)/A.getInt32(B+4,C);},size:8}},footer:{STANDARD:[{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-left',action:'rotate-left',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-undo"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-picture',action:'picture',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-picture-o"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-right',action:'rotate-right',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-repeat"></i>'}]}],DOCUMENT:[{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-left',action:'rotate-left',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-undo"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-download',action:'download',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-download"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-crop',action:'crop',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-crop"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-trash',action:'trash',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-trash"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-right',action:'rotate-right',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-repeat"></i>'}]}],ROTATOR:[{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-left',action:'rotate-left',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-undo"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-right',action:'rotate-right',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-repeat"></i>'}]}]}});
 
 // Roo/bootstrap/DocumentManager.js
-Roo.bootstrap.DocumentManager=function(A){Roo.bootstrap.DocumentManager.superclass.constructor.call(this,A);this.addEvents({"initial":true,"inspect":true,"exception":true,"prepare":true,"remove":true,"refresh":true,"click":true,"edit":true,"beforeselectfile":true});
+Roo.bootstrap.DocumentManager=function(A){Roo.bootstrap.DocumentManager.superclass.constructor.call(this,A);this.addEvents({"initial":true,"inspect":true,"exception":true,"prepare":true,"remove":true,"refresh":true,"click":true,"edit":true,"beforeselectfile":true,"process":true});
 };Roo.extend(Roo.bootstrap.DocumentManager,Roo.bootstrap.Component,{boxes:0,inputName:'',thumbSize:300,multiple:true,files:[],method:'POST',url:'',paramName:'imageUpload',fieldLabel:'',labelWidth:4,labelAlign:'left',editable:true,delegates:[],getAutoCreate:function(){var A={tag:'div',cls:'roo-document-manager',cn:[{tag:'input',cls:'roo-document-manager-selector',type:'file'},{tag:'div',cls:'roo-document-manager-uploader',cn:[{tag:'div',cls:'roo-document-manager-upload-btn',html:'<i class="fa fa-plus"></i>'}]}]};
 var B=[{tag:'div',cls:'column col-md-12',cn:A}];if(this.fieldLabel.length){B=[{tag:'div',cls:'column col-md-12',html:this.fieldLabel},{tag:'div',cls:'column col-md-12',cn:A}];if(this.labelAlign=='left'){B=[{tag:'div',cls:'column col-md-'+this.labelWidth,html:this.fieldLabel},{tag:'div',cls:'column col-md-'+(12-this.labelWidth),cn:A}];
 }}var C={tag:'div',cls:'row clearfix',cn:B};return C;},initEvents:function(){this.managerEl=this.el.select('.roo-document-manager',true).first();this.managerEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.selectorEl=this.el.select('.roo-document-manager-selector',true).first();
@@ -1095,11 +1093,11 @@ this.progressBar.update(this.progressBar.aria_valuemax-this.delegates.length);A(
 },clear:function(){Roo.each(this.files,function(A){if(!A.target){return;}A.target.remove();},this);this.files=[];this.refresh();},onClick:function(e,el,o){e.preventDefault();this.fireEvent('click',this,o);},closable:function(A){Roo.each(this.managerEl.select('.roo-document-manager-preview > button.close',true).elements,function(el){el.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';
 if(A){el.show();return;}el.hide();},this);},xhrOnLoad:function(A){Roo.each(this.managerEl.select('.roo-document-manager-loading',true).elements,function(el){el.remove();},this);if(A.readyState!==4){this.arrange();this.fireEvent('exception',this,A);return;
 }var B=Roo.decode(A.responseText);if(!B.success){this.arrange();this.fireEvent('exception',this,A);return;}var C=this.renderPreview(B.data);this.files.push(C);this.arrange();},xhrOnError:function(){Roo.log('xhr on error');var A=Roo.decode(xhr.responseText);
-Roo.log(A);this.arrange();},process:function(A){if(this.editable&&A.type.indexOf('image')!=-1){this.fireEvent('edit',this,A);return;}this.uploadStart(A,false);return;},uploadStart:function(A,B){this.xhr=new XMLHttpRequest();if(typeof(A.id)!='undefined'&&A.id*1>0){this.arrange();
-return;}A.xhr=this.xhr;this.managerEl.createChild({tag:'div',cls:'roo-document-manager-loading',cn:[{tag:'div',tooltip:A.name,cls:'roo-document-manager-thumb',html:'<i class="fa fa-circle-o-notch fa-spin"></i>'}]});this.xhr.open(this.method,this.url,true);
-var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);};this.xhr.onerror=function(){F.xhrOnError(F.xhr);
-};var G=new FormData();G.append('returnHTML','NO');if(B){G.append('crop',B);}G.append(this.paramName,A,A.name);if(this.fireEvent('prepare',this,G)!=false){this.xhr.send(G);};},uploadCancel:function(){this.xhr.abort();this.delegates=[];Roo.each(this.managerEl.select('.roo-document-manager-loading',true).elements,function(el){el.remove();
-},this);this.arrange();},renderPreview:function(A){if(typeof(A.target)!='undefined'&&A.target){return A;}var B=this.managerEl.createChild({tag:'div',cls:'roo-document-manager-preview',cn:[{tag:'div',tooltip:A.filename,cls:'roo-document-manager-thumb',html:'<img src="'+baseURL+'/Images/Thumb/'+this.thumbSize+'/'+A.id+'/'+A.filename+'">'},{tag:'button',cls:'close',html:'<i class="fa fa-times-circle"></i>'}]});
+Roo.log(A);this.arrange();},process:function(A){if(this.fireEvent('process',this,A)!==false){if(this.editable&&A.type.indexOf('image')!=-1){this.fireEvent('edit',this,A);return;}this.uploadStart(A,false);return;}},uploadStart:function(A,B){this.xhr=new XMLHttpRequest();
+if(typeof(A.id)!='undefined'&&A.id*1>0){this.arrange();return;}A.xhr=this.xhr;this.managerEl.createChild({tag:'div',cls:'roo-document-manager-loading',cn:[{tag:'div',tooltip:A.name,cls:'roo-document-manager-thumb',html:'<i class="fa fa-circle-o-notch fa-spin"></i>'}]});
+this.xhr.open(this.method,this.url,true);var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);
+};this.xhr.onerror=function(){F.xhrOnError(F.xhr);};var G=new FormData();G.append('returnHTML','NO');if(B){G.append('crop',B);}G.append(this.paramName,A,A.name);if(this.fireEvent('prepare',this,G)!=false){this.xhr.send(G);};},uploadCancel:function(){this.xhr.abort();
+this.delegates=[];Roo.each(this.managerEl.select('.roo-document-manager-loading',true).elements,function(el){el.remove();},this);this.arrange();},renderPreview:function(A){if(typeof(A.target)!='undefined'&&A.target){return A;}var B=this.managerEl.createChild({tag:'div',cls:'roo-document-manager-preview',cn:[{tag:'div',tooltip:A.filename,cls:'roo-document-manager-thumb',html:'<img src="'+baseURL+'/Images/Thumb/'+this.thumbSize+'/'+A.id+'/'+A.filename+'">'},{tag:'button',cls:'close',html:'<i class="fa fa-times-circle"></i>'}]});
 var C=B.select('button.close',true).first();C.on('click',this.onRemove,this,A);A.target=B;var D=B.select('img',true).first();var E=this;D.dom.addEventListener("load",function(){E.onPreviewLoad(A,D);});D.on('click',this.onClick,this,A);return A;},onPreviewLoad:function(A,B){if(typeof(A.target)=='undefined'||!A.target){return;
 }var C=B.dom.naturalWidth||B.dom.width;var D=B.dom.naturalHeight||B.dom.height;if(C>D){A.target.addClass('wide');return;}A.target.addClass('tall');return;},uploadFromSource:function(A,B){this.xhr=new XMLHttpRequest();this.managerEl.createChild({tag:'div',cls:'roo-document-manager-loading',cn:[{tag:'div',tooltip:A.name,cls:'roo-document-manager-thumb',html:'<i class="fa fa-circle-o-notch fa-spin"></i>'}]});
 this.xhr.open(this.method,this.url,true);var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);
@@ -1113,16 +1111,17 @@ this.trashBtn=this.el.select('.roo-document-viewer-trash',true).first();this.tra
 },onClick:function(e){e.preventDefault();this.fireEvent('click',this);},onTrash:function(e){e.preventDefault();this.fireEvent('trash',this);}});
 // Roo/bootstrap/NavProgressBar.js
 Roo.bootstrap.NavProgressBar=function(A){Roo.bootstrap.NavProgressBar.superclass.constructor.call(this,A);this.bullets=this.bullets||[];this.addEvents({'changed':true});};Roo.extend(Roo.bootstrap.NavProgressBar,Roo.bootstrap.Component,{bullets:[],barItems:[],getAutoCreate:function(){var A=Roo.apply({},Roo.bootstrap.NavProgressBar.superclass.getAutoCreate.call(this));
-A={tag:'ul',cls:'roo-navigation-bar'};return A;},onRender:function(ct,A){Roo.bootstrap.NavProgressBar.superclass.onRender.call(this,ct,A);if(this.bullets.length){Roo.each(this.bullets,function(b){this.addItem(b);},this);}},addItem:function(A){var B=new Roo.bootstrap.NavProgressItem(A);
-B.parentId=this.id;B.render(this.el,null);this.barItems.push(B);this.formatBullets();return B;},getActive:function(){var A=false;Roo.each(this.barItems,function(v){if(!v.isActive()){return;}A=v;return false;});return A;},setActiveItem:function(A){var B=false;
-Roo.each(this.barItems,function(v){if(v.rid==A.rid){return;}if(v.isActive()){v.setActive(false);B=v;}});A.setActive(true);this.fireEvent('changed',this,A,B);},getBarItem:function(A){var B=false;Roo.each(this.barItems,function(e){if(e.rid!=A){return;}B=e;return false;
-});return B;},indexOfItem:function(A){var B=false;Roo.each(this.barItems,function(v,i){if(v.rid!=A.rid){return;}B=i;return false});return B;},setActiveNext:function(){var i=this.indexOfItem(this.getActive());if(i>this.barItems.length){return;}this.setActiveItem(this.barItems[i+1]);
-},setActivePrev:function(){var i=this.indexOfItem(this.getActive());if(i<1){return;}this.setActiveItem(this.barItems[i-1]);},formatBullets:function(){if(!this.barItems.length){return;}var A=100/this.barItems.length;Roo.each(this.barItems,function(i){i.el.setStyle('width',A+'%');
-},this);}});
+A={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 A;},initEvents:function(){},onRender:function(ct,A){Roo.bootstrap.NavProgressBar.superclass.onRender.call(this,ct,A);
+if(this.bullets.length){Roo.each(this.bullets,function(b){this.addItem(b);},this);}this.format();},addItem:function(A){var B=new Roo.bootstrap.NavProgressItem(A);B.parentId=this.id;B.render(this.el.select('.roo-navigation-bar',true).first(),null);if(A.html){var C=new Roo.bootstrap.Element({tag:'div',cls:'roo-navigation-bar-text'});
+var D=new Roo.bootstrap.Element({tag:'div',cls:'roo-navigation-bar-text'});C.onRender(this.el.select('.roo-navigation-top-bar',true).first(),null);D.onRender(this.el.select('.roo-navigation-bottom-bar',true).first(),null);var E=new Roo.bootstrap.Element({tag:'span',html:(typeof(A.position)!='undefined'&&A.position=='top')?A.html:''});
+var F=new Roo.bootstrap.Element({tag:'span',html:(typeof(A.position)!='undefined'&&A.position=='top')?'':A.html});E.onRender(C.el,null);F.onRender(D.el,null);B.topEl=C;B.bottomEl=D;}this.barItems.push(B);return B;},getActive:function(){var A=false;Roo.each(this.barItems,function(v){if(!v.isActive()){return;
+}A=v;return false;});return A;},setActiveItem:function(A){var B=false;Roo.each(this.barItems,function(v){if(v.rid==A.rid){return;}if(v.isActive()){v.setActive(false);B=v;}});A.setActive(true);this.fireEvent('changed',this,A,B);},getBarItem:function(A){var B=false;
+Roo.each(this.barItems,function(e){if(e.rid!=A){return;}B=e;return false;});return B;},indexOfItem:function(A){var B=false;Roo.each(this.barItems,function(v,i){if(v.rid!=A.rid){return;}B=i;return false});return B;},setActiveNext:function(){var i=this.indexOfItem(this.getActive());
+if(i>this.barItems.length){return;}this.setActiveItem(this.barItems[i+1]);},setActivePrev:function(){var i=this.indexOfItem(this.getActive());if(i<1){return;}this.setActiveItem(this.barItems[i-1]);},format:function(){if(!this.barItems.length){return;}var A=100/this.barItems.length;
+Roo.each(this.barItems,function(i){i.el.setStyle('width',A+'%');i.topEl.el.setStyle('width',A+'%');i.bottomEl.el.setStyle('width',A+'%');},this);}});
 // Roo/bootstrap/NavProgressItem.js
-Roo.bootstrap.NavProgressItem=function(A){Roo.bootstrap.NavProgressItem.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.NavProgressItem,Roo.bootstrap.Component,{rid:'',active:false,disabled:false,html:'',position:'bottom',icon:false,forceIcon:false,getAutoCreate:function(){var A='roo-navigation-bar-item-icon';
-if((this.forceIcon&&this.icon)||!this.forceIcon&&Roo.isTouch){A+=' '+this.icon;}var B={tag:'li',cls:'roo-navigation-bar-item',cn:[{tag:'i',cls:A},{tag:'span',cls:'roo-navigation-bar-item-text '+this.position,html:this.html}]};if(this.active){B.cls+=' active';
-}if(this.disabled){B.cls+=' disabled';}return B;},disable:function(){this.setDisabled(true);},enable:function(){this.setDisabled(false);},initEvents:function(){this.iconEl=this.el.select('.roo-navigation-bar-item-icon',true).first();this.textEl=this.el.select('.roo-navigation-bar-item-text',true).first();
-if(Roo.isTouch){this.textEl.setVisibilityMode(Roo.Element.DISPLAY).hide();}this.iconEl.on('click',this.onClick,this);},onClick:function(e){e.preventDefault();if(this.disabled){return;}if(this.fireEvent('click',this,e)===false){return;};this.parent().setActiveItem(this);
-},isActive:function(){return this.active;},setActive:function(A){if(this.active==A){return;}this.active=A;if(A){this.el.addClass('active');return;}this.el.removeClass('active');return;},setDisabled:function(A){if(this.disabled==A){return;}this.disabled=A;
-if(A){this.el.addClass('disabled');return;}this.el.removeClass('disabled');},tooltipEl:function(){return this.el.select('.roo-navigation-bar-item-icon',true).first();;}});
+Roo.bootstrap.NavProgressItem=function(A){Roo.bootstrap.NavProgressItem.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.NavProgressItem,Roo.bootstrap.Component,{rid:'',active:false,disabled:false,html:'',position:'bottom',icon:false,getAutoCreate:function(){var A='roo-navigation-bar-item-icon';
+A+=((this.icon)?(' '+this.icon):(' step-number'));var B={tag:'li',cls:'roo-navigation-bar-item',cn:[{tag:'i',cls:A}]};if(this.active){B.cls+=' active';}if(this.disabled){B.cls+=' disabled';}return B;},disable:function(){this.setDisabled(true);},enable:function(){this.setDisabled(false);
+},initEvents:function(){this.iconEl=this.el.select('.roo-navigation-bar-item-icon',true).first();this.iconEl.on('click',this.onClick,this);},onClick:function(e){e.preventDefault();if(this.disabled){return;}if(this.fireEvent('click',this,e)===false){return;
+};this.parent().setActiveItem(this);},isActive:function(){return this.active;},setActive:function(A){if(this.active==A){return;}this.active=A;if(A){this.el.addClass('active');return;}this.el.removeClass('active');return;},setDisabled:function(A){if(this.disabled==A){return;
+}this.disabled=A;if(A){this.el.addClass('disabled');return;}this.el.removeClass('disabled');},tooltipEl:function(){return this.el.select('.roo-navigation-bar-item-icon',true).first();;}});