roojs-bootstrap.js
authorEdward <edward@roojs.com>
Tue, 2 Dec 2014 09:42:11 +0000 (17:42 +0800)
committerEdward <edward@roojs.com>
Tue, 2 Dec 2014 09:42:11 +0000 (17:42 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index c9aced8..3c14c20 100644 (file)
@@ -12998,7 +12998,7 @@ Roo.extend(Roo.bootstrap.ProgressBar, Roo.bootstrap.Component,  {
  * @cfg {Boolean} active panel active
  * @cfg {String} html panel content
  * @cfg {String} tabId tab relate id
- * @cfg {String} navId The navbar which triggers show hide
+ * @cfg {String} navId The Roo.bootstrap.NavGroup which triggers show hide ()
  * 
  * 
  * @constructor
@@ -18189,12 +18189,7 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
         g_gutter: '20%'
 
     },
-    title : {
-        text : '',
-        x : 150,
-        y : 50,
-        attr : { font: "20px 'Fontin Sans', Fontin-Sans, sans-serif" }
-    },
+    title : false,
 
     getAutoCreate : function(){
         
@@ -18263,11 +18258,9 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
         switch(graphtype){
             case 'bar':
                 this.raphael.barchart(this.g_x,this.g_y,this.g_width,this.g_height,xdata,opts).hover(fin,fout);
-                this.title.text = this.title.text || 'This is Vertical Barchart';
                 break;
             case 'hbar':
                 this.raphael.hbarchart(this.g_x,this.g_y,this.g_width,this.g_height,xdata,opts).hover(fin,fout);
-                this.title.text = this.title.text || 'This is Horizontal Barchart';
                 break;
             case 'pie':
                 opts = { legend: ["%% - Enterprise Users", "% - ddd","Chrome Users"], legendpos: "west", 
@@ -18275,12 +18268,14 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
             
                 this.raphael.piechart(this.g_x,this.g_y,this.g_r,xdata,opts);
                 
-                this.title.text = this.title.text || 'This is Piechart';
                 break;
 
         }
         
-        this.raphael.text(this.title.x, this.title.y, this.title.text).attr(this.title.attr);
+        if(this.title){
+            this.raphael.text(this.title.x, this.title.y, this.title.text).attr(this.title.attr);
+        }
+        
     },
     
     setTitle: function(o)
@@ -18414,25 +18409,17 @@ Roo.extend(Roo.bootstrap.dash.NumberBox, Roo.bootstrap.Component,  {
                 
     },
 
-    setHeadline: function ()
+    setHeadline: function (value)
     {
         this.el.select('.roo-headline',true).first().dom.innerHTML = value;
     },
 
 
-    initEvents: function() {
+    initEvents: function() 
+    {   
         
-        if(!this.href){
-            this.el.on('click', this.onClick, this);
-        }
-    },
-    
-    onClick : function(e)
-    {
-        Roo.log('img onclick');
-        this.fireEvent('click', this, e);
     }
-   
+    
 });
 
  
index 6bf65b0..4013b64 100644 (file)
@@ -397,8 +397,7 @@ this.el.select('>button.close').on('click',this.hide,this);},show:function(){if(
 this.el.show();this.fireEvent('show',this);},hide:function(){if(!this.rendered){this.render();}
 this.el.hide();this.fireEvent('hide',this);},update:function(){this.el.select('>.message',true).first().dom.innerHTML=this.html||'';}});
 //Roo/bootstrap/Graph.js
-Roo.bootstrap.Graph=function(A){Roo.bootstrap.Graph.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Graph,Roo.bootstrap.Component,{sm:4,md:5,graphtype:'bar',g_height:250,g_width:400,g_x:50,g_y:50,g_r:30,opts:{g_type:'soft',g_gutter:'20%'},title:{text:'',x:150,y:50,attr:{font:"20px 'Fontin Sans', Fontin-Sans, sans-serif"}},getAutoCreate:function(){var A={tag:'div',html:null};return A;},onRender:function(ct,A){Roo.bootstrap.Graph.superclass.onRender.call(this,ct,A);this.raphael=Raphael(this.el.dom);},load:function(A,B,C){this.raphael.clear();if(!A){A=this.graphtype;}if(!C){C=this.opts;}var r=this.raphael,D=function(){this.flag=r.popup(this.bar.x,this.bar.y,this.bar.value||"0").insertBefore(this);},E=function(){this.flag.animate({opacity:0},300,function(){this.remove();});};switch(A){case 'bar':this.raphael.barchart(this.g_x,this.g_y,this.g_width,this.g_height,B,C).hover(D,E);this.title.text=this.title.text||'This is Vertical Barchart';break;case 'hbar':this.raphael.hbarchart(this.g_x,this.g_y,this.g_width,this.g_height,B,C).hover(D,E);this.title.text=this.title.text||'This is Horizontal Barchart';break;case 'pie':C={legend:["%% - Enterprise Users","% - ddd","Chrome Users"],legendpos:"west",href:["http://raphaeljs.com","http://g.raphaeljs.com"]};this.raphael.piechart(this.g_x,this.g_y,this.g_r,B,C);this.title.text=this.title.text||'This is Piechart';break;}
-this.raphael.text(this.title.x,this.title.y,this.title.text).attr(this.title.attr);},setTitle:function(o){this.title=o;},initEvents:function(){if(!this.href){this.el.on('click',this.onClick,this);}},onClick:function(e){Roo.log('img onclick');this.fireEvent('click',this,e);}});
+Roo.bootstrap.Graph=function(A){Roo.bootstrap.Graph.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Graph,Roo.bootstrap.Component,{sm:4,md:5,graphtype:'bar',g_height:250,g_width:400,g_x:50,g_y:50,g_r:30,opts:{g_type:'soft',g_gutter:'20%'},title:false,getAutoCreate:function(){var A={tag:'div',html:null};return A;},onRender:function(ct,A){Roo.bootstrap.Graph.superclass.onRender.call(this,ct,A);this.raphael=Raphael(this.el.dom);},load:function(A,B,C){this.raphael.clear();if(!A){A=this.graphtype;}if(!C){C=this.opts;}var r=this.raphael,D=function(){this.flag=r.popup(this.bar.x,this.bar.y,this.bar.value||"0").insertBefore(this);},E=function(){this.flag.animate({opacity:0},300,function(){this.remove();});};switch(A){case 'bar':this.raphael.barchart(this.g_x,this.g_y,this.g_width,this.g_height,B,C).hover(D,E);break;case 'hbar':this.raphael.hbarchart(this.g_x,this.g_y,this.g_width,this.g_height,B,C).hover(D,E);break;case 'pie':C={legend:["%% - Enterprise Users","% - ddd","Chrome Users"],legendpos:"west",href:["http://raphaeljs.com","http://g.raphaeljs.com"]};this.raphael.piechart(this.g_x,this.g_y,this.g_r,B,C);break;}if(this.title){this.raphael.text(this.title.x,this.title.y,this.title.text).attr(this.title.attr);}},setTitle:function(o){this.title=o;},initEvents:function(){if(!this.href){this.el.on('click',this.onClick,this);}},onClick:function(e){Roo.log('img onclick');this.fireEvent('click',this,e);}});
 //Roo/bootstrap/dash/NumberBox.js
 Roo.bootstrap.dash=Roo.bootstrap.dash||{};Roo.bootstrap.dash.NumberBox=function(A){Roo.bootstrap.dash.NumberBox.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.dash.NumberBox,Roo.bootstrap.Component,{bgcolor:'aqua',headline:'',content:'',icon:'',footer:'',fhref:'',ficon:'',getAutoCreate:function(){var A={tag:'div',cls:'small-box bg-'+this.bgcolor,cn:[{tag:'div',cls:'inner',cn:[{tag:'h3',cls:'roo-headline',html:this.headline},{tag:'p',cls:'roo-content',html:this.content}]}]};if(this.icon){A.cn.push({tag:'div',cls:'icon',cn:[{tag:'i',cls:'ion '+this.icon}]});}if(this.footer){var footer={tag:'a',cls:'small-box-footer',href:this.fhref||'#',html:this.footer,cn:[]};if(this.ficon){footer.cn.push({tag:'i',cls:'fa '+this.ficon});}
-A.cn.push(footer);}return A;},onRender:function(ct,A){Roo.bootstrap.dash.NumberBox.superclass.onRender.call(this,ct,A);},setHeadline:function(){this.el.select('.roo-headline',true).first().dom.innerHTML=value;},initEvents:function(){if(!this.href){this.el.on('click',this.onClick,this);}},onClick:function(e){Roo.log('img onclick');this.fireEvent('click',this,e);}});
+A.cn.push(footer);}return A;},onRender:function(ct,A){Roo.bootstrap.dash.NumberBox.superclass.onRender.call(this,ct,A);},setHeadline:function(A){this.el.select('.roo-headline',true).first().dom.innerHTML=A;},initEvents:function(){}});