roojs-bootstrap.js
authormichael <michael@office.ROOJS.COM>
Thu, 27 Nov 2014 10:32:13 +0000 (18:32 +0800)
committermichael <michael@office.ROOJS.COM>
Thu, 27 Nov 2014 10:32:13 +0000 (18:32 +0800)
roojs-bootstrap-debug.js

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

index 8a77694..cfd8cce 100644 (file)
@@ -18113,7 +18113,7 @@ Roo.extend(Roo.bootstrap.MessageBar, Roo.bootstrap.Component,  {
 
  
 
- /*
    /*
  * - LGPL
  *
  * Graph
@@ -18128,12 +18128,12 @@ Roo.extend(Roo.bootstrap.MessageBar, Roo.bootstrap.Component,  {
 > Prameters
  -sm {number} sm 4
  -md {number} md 5
-graphtype {String} graphtype bar | vbar | pie
-g_x {number}  x coodinator | centre x (pie)
-g_y {number}  y coodinator | centre y (pie)
-g_r {number}  radius (pie)
-g_height {number} height of the chart (respected by all elements in the set)
-g_width {number}  width of the chart (respected by all elements in the set)
@cfg {String} graphtype  bar | vbar | pie
@cfg {number} g_x coodinator | centre x (pie)
@cfg {number} g_y coodinator | centre y (pie)
@cfg {number} g_r radius (pie)
@cfg {number} g_height height of the chart (respected by all elements in the set)
@cfg {number} g_width width of the chart (respected by all elements in the set)
  -{Array}  values
  -opts (object) options for the chart 
      o {
@@ -18201,12 +18201,12 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
 
     onRender : function(ct,position){
         Roo.bootstrap.Graph.superclass.onRender.call(this,ct,position);
-        var r = {};
-        this.raphael = Raphael(this.el.dom),
-                    data1 = [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55], [12, 20, 30]],
-                    data2 = [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55], [12, 20, 30]],
-                    data3 = [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55], [12, 20, 30]],
-                    txtattr = { font: "12px 'Fontin Sans', Fontin-Sans, sans-serif" };
+        this.raphael = Raphael(this.el.dom);
+
+                    // data1 = [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55], [12, 20, 30]],
+                    // data2 = [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55], [12, 20, 30]],
+                    // data3 = [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55], [12, 20, 30]],
+                    // txtattr = { font: "12px 'Fontin Sans', Fontin-Sans, sans-serif" };
                 /*
                 r.text(160, 10, "Single Series Chart").attr(txtattr);
                 r.text(480, 10, "Multiline Series Chart").attr(txtattr);
@@ -18227,6 +18227,12 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
                 //     //yvalues : cols,
                    
                 // });
+        var xdata = [55, 20, 13, 32, 5, 1, 2, 10,5 , 10];
+        
+        this.load(null,xdata,{
+                axis : "0 0 1 1",
+                axisxlabels :  xdata
+                });
 
     },
 
@@ -18238,18 +18244,32 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
         if(!opts){
             opts = this.opts;
         }
+        var chart_title = '',
+                    r = this.raphael,
+                    fin = function () {
+                        this.flag = r.popup(this.bar.x, this.bar.y, this.bar.value || "0").insertBefore(this);
+                    },
+                    fout = function () {
+                        this.flag.animate({opacity: 0}, 300, function () {this.remove();});
+                    };
         switch(graphtype){
             case 'bar':
                 this.raphael.barchart(this.g_x,this.g_y,this.g_width,this.g_height,xdata,opts);
+                chart_title = 'This is Vertical Barchart';
                 break;
             case 'hbar':
-                this.raphael.hbarchart(this.g_x,this.g_y,this.g_width,this.g_height,xdata,opts);
+                this.raphael.hbarchart(this.g_x,this.g_y,this.g_width,this.g_height,xdata,opts).hover(fin,fout);
+                chart_title = 'This is Horizontal Barchart';
                 break;
             case 'pie':
-                this.raphael.piechart(this.g_x,this.g_y,this.g_r,xdata,opts);
+                opts = { 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,xdata,opts);
+                chart_title = 'This is Piechart';
                 break;
 
         }
+        this.raphael.text(150,50,chart_title).attr({ font: "20px 'Fontin Sans', Fontin-Sans, sans-serif" });
     },
     
     initEvents: function() {
@@ -18280,12 +18300,13 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
  * @class Roo.bootstrap.dash.NumberBox
  * @extends Roo.bootstrap.Component
  * Bootstrap NumberBox class
+ * @cfg {String} bgcolor
  * @cfg {number} sm 4
  * @cfg {number} md 5
  * @cfg {String} headline
  * @cfg {String} title
- * @cfg {String} more info url
- * @cfg {String} more info text
+ * @cfg {String} more_url
+ * @cfg {String} more_text
  * @cfg {Array}  opts values
  * 
  * @constructor
@@ -18293,6 +18314,7 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
  * @param {Object} config The config object
  */
 
+Roo.bootstrap.dash = Roo.bootstrap.dash || {};
 Roo.bootstrap.dash.NumberBox = function(config){
     Roo.bootstrap.dash.NumberBox.superclass.constructor.call(this, config);
     
@@ -18309,7 +18331,8 @@ Roo.bootstrap.dash.NumberBox = function(config){
 
 Roo.extend(Roo.bootstrap.dash.NumberBox, Roo.bootstrap.Component,  {
     
-    width: 200,
+    bgcolor:'',
+    // width: 200,
     height: 150,
     headline: '',
     title: 'Title',
@@ -18320,11 +18343,11 @@ Roo.extend(Roo.bootstrap.dash.NumberBox, Roo.bootstrap.Component,  {
         
         var cfg = {
             tag: 'div',
-            cls: '',
+            cls: 'small-box',
             html : null,
             cn: [
             {
-                tag: 'h',
+                tag: 'h3',
                 cls: '',
                 html: this.headline ? this.headline : 'Headline'
             },
@@ -18340,14 +18363,19 @@ Roo.extend(Roo.bootstrap.dash.NumberBox, Roo.bootstrap.Component,  {
                 cn: [{
                     tag: 'a',
                     href: this.more_url,
-                    cls: '',
+                    cls: 'small-box-footer',
                     html: this.more_text
                 }]
 
             }]
         }
-    
-        
+
+        cfg.cls += ' bg-' + (this.bgcolor ? this.bgcolor : 'aqua' );
+        if(!this.more_text){
+            cfg.cn[2].cn = null;
+
+        }
+
         return  cfg;
     },
 
index 9bb93ea..bc67c9f 100644 (file)
@@ -107,7 +107,18 @@ this.config[A].locked=B;if(!C){this.fireEvent("columnlockchange",this,A,B);}},ge
 //Roo/LoadMask.js
 Roo.LoadMask=function(el,A){this.el=Roo.get(el);Roo.apply(this,A);if(this.store){this.store.on('beforeload',this.onBeforeLoad,this);this.store.on('load',this.onLoad,this);this.store.on('loadexception',this.onLoadException,this);this.removeMask=false;}else {var um=this.el.getUpdateManager();um.showLoadIndicator=false;um.on('beforeupdate',this.onBeforeLoad,this);um.on('update',this.onLoad,this);um.on('failure',this.onLoad,this);this.removeMask=true;}};Roo.LoadMask.prototype={msg:'Loading...',msgCls:'x-mask-loading',disabled:false,disable:function(){this.disabled=true;},enable:function(){this.disabled=false;},onLoadException:function(){Roo.log(arguments);if(typeof(arguments[3])!='undefined'){Roo.MessageBox.alert("Error loading",arguments[3]);}this.el.unmask(this.removeMask);},onLoad:function(){this.el.unmask(this.removeMask);},onBeforeLoad:function(){if(!this.disabled){this.el.mask(this.msg,this.msgCls);}},destroy:function(){if(this.store){this.store.un('beforeload',this.onBeforeLoad,this);this.store.un('load',this.onLoad,this);this.store.un('loadexception',this.onLoadException,this);}else {var um=this.el.getUpdateManager();um.un('beforeupdate',this.onBeforeLoad,this);um.un('update',this.onLoad,this);um.un('failure',this.onLoad,this);}}};
 //Roo/bootstrap/Table.js
-undefined
+Roo.bootstrap.Table=function(A){Roo.bootstrap.Table.superclass.constructor.call(this,A);if(this.sm){this.selModel=Roo.factory(this.sm,Roo.bootstrap.Table);this.sm=this.selModel;this.sm.xmodule=this.xmodule||false;}if(this.cm&&typeof(this.cm.config)=='undefined'){this.colModel=new Roo.grid.ColumnModel(this.cm);this.cm=this.colModel;this.cm.xmodule=this.xmodule||false;}if(this.store){this.store=Roo.factory(this.store,Roo.data);this.ds=this.store;this.ds.xmodule=this.xmodule||false;}if(this.footer&&this.store){this.footer.dataSource=this.ds;this.footer=Roo.factory(this.footer);}
+this.addEvents({"cellclick":true,"celldblclick":true,"rowclick":true,"rowdblclick":true,'rowclass':true});};Roo.extend(Roo.bootstrap.Table,Roo.bootstrap.Component,{cls:false,align:false,bgcolor:false,border:false,cellpadding:false,cellspacing:false,frame:false,rules:false,sortable:false,summary:false,width:false,striped:false,bordered:false,hover:false,condensed:false,responsive:false,sm:false,cm:false,store:false,loadMask:false,tfoot:true,thead:true,RowSelection:false,CellSelection:false,layout:false,getAutoCreate:function(){var A=Roo.apply({},Roo.bootstrap.Table.superclass.getAutoCreate.call(this));A={tag:'table',cls:'table',cn:[]};if(this.striped){A.cls+=' table-striped';}if(this.hover){A.cls+=' table-hover';}if(this.bordered){A.cls+=' table-bordered';}if(this.condensed){A.cls+=' table-condensed';}if(this.responsive){A.cls+=' table-responsive';}if(this.cls){A.cls+=' '+this.cls;}if(this.align){A.align=this.align;}if(this.bgcolor){A.bgcolor=this.bgcolor;}if(this.border){A.border=this.border;}if(this.cellpadding){A.cellpadding=this.cellpadding;}if(this.cellspacing){A.cellspacing=this.cellspacing;}if(this.frame){A.frame=this.frame;}if(this.rules){A.rules=this.rules;}if(this.sortable){A.sortable=this.sortable;}if(this.summary){A.summary=this.summary;}if(this.width){A.width=this.width;}if(this.layout){A.style=(typeof(A.style)=='undefined')?('table-layout:'+this.layout+';'):(A.style+('table-layout:'+this.layout+';'));}if(this.store||this.cm){if(this.thead){A.cn.push(this.renderHeader());}
+A.cn.push(this.renderBody());if(this.tfoot){A.cn.push(this.renderFooter());}
+A.cls+=' TableGrid';}return {cn:[A]};},initEvents:function(){if(!this.store||!this.cm){return;}
+Roo.log('initEvents with ds!!!!');var A=this;Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.on('click',A.sort,A);});this.el.on("click",this.onClick,this);this.el.on("dblclick",this.onDblClick,this);this.parent().el.setStyle('position','relative');if(this.footer){this.footer.parentId=this.id;this.footer.onRender(this.el.select('tfoot tr td').first(),null);}
+this.maskEl=new Roo.LoadMask(this.el,{store:this.ds,msgCls:'roo-el-mask-msg'});this.store.on('load',this.onLoad,this);this.store.on('beforeload',this.onBeforeLoad,this);},onClick:function(e,el){var A=Roo.get(el);var B=A.findParent('tr',false,true);var C=A.dom.cellIndex;var D=B.dom.rowIndex;if(this.CellSelection){this.fireEvent('cellclick',this,A,D,C,e);}if(this.RowSelection){this.fireEvent('rowclick',this,B,D,e);}},onDblClick:function(e,el){var A=Roo.get(el);;var B=A.findParent('tr',false,true);var C=A.dom.cellIndex;var D=B.dom.rowIndex;if(this.CellSelection){this.fireEvent('celldblclick',this,A,D,C,e);}if(this.RowSelection){this.fireEvent('rowdblclick',this,B,D,e);}},sort:function(e,el){var A=Roo.get(el)if(!A.hasClass('sortable')){return;}var sort=A.attr('sort');var B='ASC';if(A.hasClass('glyphicon-arrow-up')){B='DESC';}
+this.store.sortInfo={field:sort,direction:B};if(this.footer){Roo.log("calling footer first");this.footer.onClick('first');}else {this.store.load({params:{start:0}});}},renderHeader:function(){var A={tag:'thead',cn:[]};var cm=this.cm;for(var i=0,B=cm.getColumnCount();i<B;i++){var C=cm.config[i];if(typeof(C.hidden)!='undefined'&&C.hidden){continue;}var c={tag:'th',style:'',html:cm.getColumnHeader(i)};if(typeof(C.dataIndex)!='undefined'){c.sort=C.dataIndex;}if(typeof(C.sortable)!='undefined'&&C.sortable){c.cls='sortable';}if(typeof(C.width)!='undefined'){c.style+=' width:'+C.width+'px;';}
+A.cn.push(c)}return A;},renderBody:function(){var A={tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:this.cm.getColumnCount()}]}]};return A;},renderFooter:function(){var A={tag:'tfoot',cn:[{tag:'tr',cn:[{tag:'td',colspan:this.cm.getColumnCount()}]}]};return A;},onLoad:function(){Roo.log('ds onload');this.clear();var A=this;var cm=this.cm;Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.removeClass(['glyphicon','glyphicon-arrow-up','glyphicon-arrow-down']);if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='ASC'){e.addClass(['glyphicon','glyphicon-arrow-up']);}if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='DESC'){e.addClass(['glyphicon','glyphicon-arrow-down']);}});var B=this.el.select('tbody',true).first();var C=[];if(this.store.getCount()>0){this.store.data.each(function(d,D){var E={tag:'tr',cn:[]};for(var i=0,F=cm.getColumnCount();i<F;i++){var G=cm.config[i];if(typeof(G.hidden)!='undefined'&&G.hidden){continue;}var H=cm.getRenderer(i);var I='';var id=Roo.id();if(typeof(H)!=='undefined'){I=H(d.data[cm.getDataIndex(i)],false,d);}if(typeof(I)==='object'){C.push({id:id,cfg:I})}var J={record:d,rowIndex:D,colIndex:i,rowClass:''}
+A.fireEvent('rowclass',this,J);var td={tag:'td',id:id,cls:J.rowClass,style:'',html:(typeof(I)==='object')?'':I};if(typeof(G.align)!='undefined'&&G.align.length){td.style+=' text-align:'+G.align+';';}if(typeof(G.width)!='undefined'){td.style+=' width:'+G.width+'px;';}
+E.cn.push(td);}
+B.createChild(E);});}if(C.length){var A=this;Roo.each(C,function(r){A.renderColumn(r);})}},onBeforeLoad:function(){},clear:function(){this.el.select('tbody',true).first().dom.innerHTML='';},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.bootstrap.Table.RowSelectionModel();}return this.selModel;},renderColumn:function(r){var A=this;r.cfg.render(Roo.get(r.id));if(r.cfg.cn){Roo.each(r.cfg.cn,function(c){var B={id:r.id,cfg:c}
+A.renderColumn(B);})}}});
 //Roo/bootstrap/TableCell.js
 Roo.bootstrap.TableCell=function(A){Roo.bootstrap.TableCell.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.TableCell,Roo.bootstrap.Component,{html:false,cls:false,tag:false,abbr:false,align:false,axis:false,bgcolor:false,charoff:false,colspan:false,headers:false,height:false,nowrap:false,rowspan:false,scope:false,valign:false,width:false,getAutoCreate:function(){var A=Roo.apply({},Roo.bootstrap.TableCell.superclass.getAutoCreate.call(this));A={tag:'td'};if(this.tag){A.tag=this.tag;}if(this.html){A.html=this.html}if(this.cls){A.cls=this.cls}if(this.abbr){A.abbr=this.abbr}if(this.align){A.align=this.align}if(this.axis){A.axis=this.axis}if(this.bgcolor){A.bgcolor=this.bgcolor}if(this.charoff){A.charoff=this.charoff}if(this.colspan){A.colspan=this.colspan}if(this.headers){A.headers=this.headers}if(this.height){A.height=this.height}if(this.nowrap){A.nowrap=this.nowrap}if(this.rowspan){A.rowspan=this.rowspan}if(this.scope){A.scope=this.scope}if(this.valign){A.valign=this.valign}if(this.width){A.width=this.width}return A;}});
 //Roo/bootstrap/TableRow.js
@@ -250,7 +261,23 @@ e.preventDefault();}return true;},getSelectionCount:function(){return this.selec
 A=this.getNode(A);return s.indexOf(A)!==-1;},select:function(A,B,C){if(A instanceof Array){if(!B){this.clearSelections(true);}for(var i=0,D=A.length;i<D;i++){this.select(A[i],true,true);}return;}var E=this.getNode(A);if(!E||this.isSelected(E)){return;}if(!B){this.clearSelections(true);}if(this.fireEvent("beforeselect",this,E,this.selections)!==false){Roo.fly(E).addClass(this.selectedClass);this.selections.push(E);if(!C){this.fireEvent("selectionchange",this,this.selections);}}},unselect:function(A,B,C){if(A instanceof Array){Roo.each(this.selections,function(s){this.unselect(s,A);},this);return;}var D=this.getNode(A);if(!D||!this.isSelected(D)){Roo.log("not selected");return;}var ns=[];Roo.each(this.selections,function(s){if(s==D){Roo.fly(D).removeClass(this.selectedClass);return;}
 ns.push(s);},this);this.selections=ns;this.fireEvent("selectionchange",this,this.selections);},getNode:function(A){if(typeof A=="string"){return document.getElementById(A);}else if(typeof A=="number"){return this.nodes[A];}return A;},getNodes:function(A,B){var ns=this.nodes;A=A||0;B=typeof B=="undefined"?ns.length-1:B;var C=[];if(A<=B){for(var i=A;i<=B;i++){C.push(ns[i]);}}else {for(var i=A;i>=B;i--){C.push(ns[i]);}}return C;},indexOf:function(A){A=this.getNode(A);if(typeof A.nodeIndex=="number"){return A.nodeIndex;}var ns=this.nodes;for(var i=0,B=ns.length;i<B;i++){if(ns[i]==A){return i;}}return -1;}});
 //Roo/bootstrap/Calendar.js
-undefined
+Roo.bootstrap=Roo.bootstrap||{};Roo.bootstrap.Calendar=function(A){Roo.bootstrap.Calendar.superclass.constructor.call(this,A);this.addEvents({'select':true,'monthchange':true,'evententer':true,'eventleave':true,'eventclick':true});};Roo.extend(Roo.bootstrap.Calendar,Roo.bootstrap.Component,{startDay:0,loadMask:false,header:false,getAutoCreate:function(){var A=function(H,I,J,K){return Roo.apply({},{tag:'span',cls:'fc-button fc-button-'+H+' fc-state-default '+(I.length?'fc-corner-'+I.split(' ').join(' fc-corner-'):''),html:'<SPAN class="fc-text-'+J+'">'+K+'</SPAN>',unselectable:'on'});};var B={};if(!this.header){B={tag:'table',cls:'fc-header',style:'width:100%',cn:[{tag:'tr',cn:[{tag:'td',cls:'fc-header-left',cn:[A('prev','left','arrow','&#8249;'),A('next','right','arrow','&#8250;'),{tag:'span',cls:'fc-header-space'},A('today','left right','','today')]},{tag:'td',cls:'fc-header-center',cn:[{tag:'span',cls:'fc-header-title',cn:{tag:'H2',html:'month / year'}}]},{tag:'td',cls:'fc-header-right',cn:[]}]}]};}
+B=this.header;var C=function(){var H=[];for(var i=0;i<Date.dayNames.length;i++){var d=Date.dayNames[i];H.push({tag:'th',cls:'fc-day-header fc-'+d.substring(0,3).toLowerCase()+' fc-widget-header',html:d.substring(0,3)});}
+H[0].cls+=' fc-first';H[6].cls+=' fc-last';return H;};var D=function(n){return {tag:'td',cls:'fc-day fc-'+n+' fc-widget-content',cn:[{cn:[{cls:'fc-day-number',html:'D'},{cls:'fc-day-content',cn:[{style:'position: relative;'}]}]}]}};var E=function(){var H=[]for(var r=0;r<6;r++){var row={tag:'tr',cls:'fc-week',cn:[]};for(var i=0;i<Date.dayNames.length;i++){var d=Date.dayNames[i];row.cn.push(D(d.substring(0,3).toLowerCase()));}
+row.cn[0].cls+=' fc-first';row.cn[0].cn[0].style='min-height:90px';row.cn[6].cls+=' fc-last';H.push(row);}
+H[0].cls+=' fc-first';H[4].cls+=' fc-prev-last';H[5].cls+=' fc-last';return H;};var F={tag:'table',cls:'fc-border-separate',style:'width:100%',cellspacing:0,cn:[{tag:'thead',cn:[{tag:'tr',cls:'fc-first fc-last',cn:C()}]},{tag:'tbody',cn:E()}]};var G={cls:'fc fc-ltr',cn:[B,{cls:'fc-content',style:"position: relative;",cn:[{cls:'fc-view fc-view-month fc-grid',style:'position: relative',unselectable:'on',cn:[{cls:'fc-event-container',style:'position:absolute;z-index:8;top:0;left:0;'},F]}]}]};return G;},initEvents:function(){if(!this.store){throw "can not find store for calendar";}var A={tag:"div",cls:"x-dlg-mask",style:"text-align:center",cn:[{tag:"div",style:"background-color:white;width:50%;margin:250 auto",cn:[{tag:"img",src:Roo.rootURL+'/images/ux/lightbox/loading.gif'},{tag:"span",html:"Loading"}]}]}
+this.maskEl=Roo.DomHelper.append(this.el.select('.fc-content',true).first(),A,true);var B=this.el.select('.fc-content',true).first().getSize();this.maskEl.setSize(B.width,B.height);this.maskEl.enableDisplayMode("block");if(!this.loadMask){this.maskEl.hide();}
+this.store=Roo.factory(this.store,Roo.data);this.store.on('load',this.onLoad,this);this.store.on('beforeload',this.onBeforeLoad,this);this.resize();this.cells=this.el.select('.fc-day',true);this.textNodes=this.el.query('.fc-day-number');this.cells.addClassOnOver('fc-state-hover');this.el.select('.fc-button-prev',true).on('click',this.showPrevMonth,this);this.el.select('.fc-button-next',true).on('click',this.showNextMonth,this);this.el.select('.fc-button-today',true).on('click',this.showToday,this);this.el.select('.fc-button',true).addClassOnOver('fc-state-hover');this.on('monthchange',this.onMonthChange,this);this.update(new Date().clearTime());},resize:function(){var sz=this.el.getSize();this.el.select('.fc-day-header',true).setWidth(sz.width/7);this.el.select('.fc-day-content div',true).setHeight(34);},showPrevMonth:function(e){this.update(this.activeDate.add("mo",-1));},showToday:function(e){this.update(new Date().clearTime());},showNextMonth:function(e){this.update(this.activeDate.add("mo",1));},showPrevYear:function(){this.update(this.activeDate.add("y",-1));},showNextYear:function(){this.update(this.activeDate.add("y",1));},update:function(A){var vd=this.activeDate;this.activeDate=A;var B=A.getDaysInMonth();var C=A.getFirstDateOfMonth();var D=C.getDay()-this.startDay;if(D<this.startDay){D+=7;}var pm=A.add(Date.MONTH,-1);var E=pm.getDaysInMonth()-D;this.cells=this.el.select('.fc-day',true);this.textNodes=this.el.query('.fc-day-number');this.cells.addClassOnOver('fc-state-hover');var F=this.cells.elements;var G=this.textNodes;Roo.each(F,function(V){V.removeClass(['fc-past','fc-other-month','fc-future','fc-state-highlight','fc-state-disabled']);});B+=D;var H=86400000;var d=(new Date(pm.getFullYear(),pm.getMonth(),E)).clearTime();var I=new Date().clearTime().getTime();var J=A.clearTime().getTime();var K=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;var L=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;var M=this.disabledDatesRE;var N=this.disabledDatesText;var O=this.disabledDays?this.disabledDays.join(""):false;var P=this.disabledDaysText;var Q=this.format;var R=function(V,W){W.row=0;W.events=[];W.more=[];W.title="";var t=d.getTime();W.dateValue=t;if(t==I){W.className+=" fc-today";W.className+=" fc-state-highlight";W.title=V.todayText;}if(t==J){}if(t<K){W.className=" fc-state-disabled";W.title=V.minText;return;}if(t>L){W.className=" fc-state-disabled";W.title=V.maxText;return;}if(O){if(O.indexOf(d.getDay())!=-1){W.title=P;W.className=" fc-state-disabled";}}if(M&&Q){var X=d.dateFormat(Q);if(M.test(X)){W.title=N.replace("%0",X);W.className=" fc-state-disabled";}}if(!W.initialClassName){W.initialClassName=W.dom.className;}
+W.dom.className=W.initialClassName+' '+W.className;};var i=0;for(;i<D;i++){G[i].innerHTML=(++E);d.setDate(d.getDate()+1);F[i].className="fc-past fc-other-month";R(this,F[i]);}var S=0;for(;i<B;i++){S=i-D+1;G[i].innerHTML=(S);d.setDate(d.getDate()+1);F[i].className='';R(this,F[i]);}var T=0;for(;i<42;i++){G[i].innerHTML=(++T);d.setDate(d.getDate()+1);F[i].className="fc-future fc-other-month";R(this,F[i]);}
+this.el.select('.fc-header-title h2',true).update(Date.monthNames[A.getMonth()]+" "+A.getFullYear());var U=Math.ceil((A.getDaysInMonth()+A.getFirstDateOfMonth().getDay())/7);this.el.select('tr.fc-week.fc-prev-last',true).removeClass('fc-last');this.el.select('tr.fc-week.fc-next-last',true).addClass('fc-last').show();if(U!=6){this.el.select('tr.fc-week.fc-last',true).removeClass('fc-last').addClass('fc-next-last').hide();this.el.select('tr.fc-week.fc-prev-last',true).addClass('fc-last');}
+this.fireEvent('monthchange',this,A);},findCell:function(dt){dt=dt.clearTime().getTime();var A=false;this.cells.each(function(c){if(c.dateValue==dt){A=c;return false;}return true;});return A;},findCells:function(ev){var s=ev.start.clone().clearTime().getTime();var e=ev.end.clone().clearTime().getTime();var A=[];this.cells.each(function(c){if(c.dateValue>e){return;}if(c.dateValue<s){return;}
+A.push(c);});return A;},addItem:function(ev){var A=this.findCells(ev);var B=false;var C=[];for(var i=0;i<A.length;i++){A[i].row=A[0].row;if(i==0){A[i].row=A[i].row+1;}if(!B){B={start:A[i],end:A[i]};continue;}if(B.start.getY()==A[i].getY()){B.end=A[i];continue;}
+C.push(B);B={start:A[i],end:A[i]};}
+C.push(B);ev.els=[];ev.rows=C;ev.cells=A;A[0].events.push(ev);this.calevents.push(ev);},clearEvents:function(){if(!this.calevents){return;}
+Roo.each(this.cells.elements,function(c){c.row=0;c.events=[];c.more=[];});Roo.each(this.calevents,function(e){Roo.each(e.els,function(el){el.un('mouseenter',this.onEventEnter,this);el.un('mouseleave',this.onEventLeave,this);el.remove();},this);},this);Roo.each(Roo.select('.fc-more-event',true).elements,function(e){e.remove();});},renderEvents:function(){var A=this;this.cells.each(function(c){if(c.row<5){return;}var ev=c.events;var r=4;if(c.row!=c.events.length){r=4-(4-(c.row-c.events.length));}
+c.events=ev.slice(0,r);c.more=ev.slice(r);if(c.more.length&&c.more.length==1){c.events.push(c.more.pop());}
+c.row=(c.row-ev.length)+c.events.length+((c.more.length)?1:0);});this.cells.each(function(c){c.select('.fc-day-content div',true).first().setHeight(Math.max(34,c.row*20));for(var e=0;e<c.events.length;e++){var ev=c.events[e];var B=ev.rows;for(var i=0;i<B.length;i++){var C={cls:'roo-dynamic fc-event fc-event-hori fc-event-draggable ui-draggable',style:'position: absolute',unselectable:"on",cn:[{cls:'fc-event-inner',cn:[{tag:'span',cls:'fc-event-title',html:String.format('{0}',ev.title)}]},{cls:'ui-resizable-handle ui-resizable-e',html:'&nbsp;&nbsp;&nbsp'}]};if(i==0){C.cls+=' fc-event-start';}if((i+1)==B.length){C.cls+=' fc-event-end';}var D=A.el.select('.fc-event-container',true).first();var cg=D.createChild(C);var E=B[i].start.select('.fc-day-content',true).first().getBox();var F=B[i].end.select('.fc-day-content',true).first().getBox();var r=(c.more.length)?1:0;cg.setXY([E.x+2,E.y+((c.row-c.events.length-r+e)*20)]);cg.setWidth(F.right-E.x-2);cg.on('mouseenter',A.onEventEnter,A,ev);cg.on('mouseleave',A.onEventLeave,A,ev);cg.on('click',A.onEventClick,A,ev);ev.els.push(cg);}}if(c.more.length){var C={cls:'fc-more-event roo-dynamic fc-event fc-event-hori fc-event-draggable ui-draggable fc-event-start fc-event-end',style:'position: absolute',unselectable:"on",cn:[{cls:'fc-event-inner',cn:[{tag:'span',cls:'fc-event-title',html:'More'}]},{cls:'ui-resizable-handle ui-resizable-e',html:'&nbsp;&nbsp;&nbsp'}]};var D=A.el.select('.fc-event-container',true).first();var cg=D.createChild(C);var E=c.select('.fc-day-content',true).first().getBox();var F=c.select('.fc-day-content',true).first().getBox();cg.setXY([E.x+2,E.y+((c.row-1)*20)]);cg.setWidth(F.right-E.x-2);cg.on('click',A.onMoreEventClick,A,c.more);}});},onEventEnter:function(e,el,A,d){this.fireEvent('evententer',this,el,A);},onEventLeave:function(e,el,A,d){this.fireEvent('eventleave',this,el,A);},onEventClick:function(e,el,A,d){this.fireEvent('eventclick',this,el,A);},onMonthChange:function(){this.store.load();},onMoreEventClick:function(e,el,A){var B=this;this.calpopover.placement='right';this.calpopover.setTitle('More');this.calpopover.setContent('');var C=this.calpopover.el.select('.popover-content',true).first();Roo.each(A,function(m){var D={cls:'fc-event-hori fc-event-draggable',html:m.title};var cg=C.createChild(D);cg.on('click',B.onEventClick,B,m);});this.calpopover.show(el);},onLoad:function(){this.calevents=[];var A=this;if(this.store.getCount()>0){this.store.data.each(function(d){A.addItem({id:d.data.id,start:(typeof(d.data.start_dt)==='string')?new Date.parseDate(d.data.start_dt,'Y-m-d H:i:s'):d.data.start_dt,end:(typeof(d.data.end_dt)==='string')?new Date.parseDate(d.data.end_dt,'Y-m-d H:i:s'):d.data.end_dt,time:d.data.start_time,title:d.data.title,description:d.data.description,venue:d.data.venue});});}
+this.renderEvents();if(this.calevents.length&&this.loadMask){this.maskEl.hide();}},onBeforeLoad:function(){this.clearEvents();if(this.loadMask){this.maskEl.show();}}});
 //Roo/bootstrap/Popover.js
 Roo.bootstrap.Popover=function(A){Roo.bootstrap.Popover.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Popover,Roo.bootstrap.Component,{title:'Fill in a title',html:false,placement:'right',trigger:'hover',over:'parent',can_build_overlaid:false,getChildContainer:function(){return this.el.select('.popover-content',true).first();},getAutoCreate:function(){Roo.log('make popover?');var A={cls:'popover roo-dynamic',style:'display:block',cn:[{cls:'arrow'},{cls:'popover-inner',cn:[{tag:'h3',cls:'popover-title',html:this.title},{cls:'popover-content',html:this.html}]}]};return A;},setTitle:function(A){this.el.select('.popover-title',true).first().dom.innerHTML=A;},setContent:function(A){this.el.select('.popover-content',true).first().dom.innerHTML=A;},onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);if(!this.el){var B=Roo.apply({},this.getAutoCreate());B.id=Roo.id();if(this.cls){B.cls+=' '+this.cls;}if(this.style){B.style=this.style;}
 Roo.log("adding to ")
@@ -370,6 +397,8 @@ 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:650,g_x:50,g_y:50,g_r:30,opts:{g_type:'soft',g_gutter:'20%'},getAutoCreate:function(){var A={tag:'div',html:null};return A;},onRender:function(ct,A){Roo.bootstrap.Graph.superclass.onRender.call(this,ct,A);var r={};this.raphael=Raphael(this.el.dom),data1=[[55,20,13,32,5,1,2,10],[10,2,1,5,32,13,20,55],[12,20,30]],data2=[[55,20,13,32,5,1,2,10],[10,2,1,5,32,13,20,55],[12,20,30]],data3=[[55,20,13,32,5,1,2,10],[10,2,1,5,32,13,20,55],[12,20,30]],txtattr={font:"12px 'Fontin Sans', Fontin-Sans, sans-serif"};},load:function(A,B,C){this.raphael.clear();if(!A){A=this.graphtype;}if(!C){C=this.opts;}switch(A){case 'bar':this.raphael.barchart(this.g_x,this.g_y,this.g_width,this.g_height,B,C);break;case 'hbar':this.raphael.hbarchart(this.g_x,this.g_y,this.g_width,this.g_height,B,C);break;case 'pie':this.raphael.piechart(this.g_x,this.g_y,this.g_r,B,C);break;}},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:650,g_x:50,g_y:50,g_r:30,opts:{g_type:'soft',g_gutter:'20%'},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);var B=[55,20,13,32,5,1,2,10,5,10];this.load(null,B,{axis:"0 0 1 1",axisxlabels:B});},load:function(A,B,C){this.raphael.clear();if(!A){A=this.graphtype;}if(!C){C=this.opts;}var D='',r=this.raphael,E=function(){this.flag=r.popup(this.bar.x,this.bar.y,this.bar.value||"0").insertBefore(this);},F=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);D='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(E,F);D='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);D='This is Piechart';break;}
+this.raphael.text(150,50,D).attr({font:"20px 'Fontin Sans', Fontin-Sans, sans-serif"});},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.NumberBox=function(A){Roo.bootstrap.dash.NumberBox.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.dash.NumberBox,Roo.bootstrap.Component,{width:200,height:150,headline:'',title:'Title',more_url:'',more_text:'',getAutoCreate:function(){var A={tag:'div',cls:'',html:null,cn:[{tag:'h',cls:'',html:this.headline?this.headline:'Headline'},{tag:'p',cls:'',html:this.title?this.title:'Title'},{tag:'div',cls:'',html:null,cn:[{tag:'a',href:this.more_url,cls:'',html:this.more_text}]}]};return A;},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=Roo.bootstrap.dash||{};Roo.bootstrap.dash.NumberBox=function(A){Roo.bootstrap.dash.NumberBox.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.dash.NumberBox,Roo.bootstrap.Component,{bgcolor:'',height:150,headline:'',title:'Title',more_url:'',more_text:'',getAutoCreate:function(){var A={tag:'div',cls:'small-box',html:null,cn:[{tag:'h3',cls:'',html:this.headline?this.headline:'Headline'},{tag:'p',cls:'',html:this.title?this.title:'Title'},{tag:'div',cls:'',html:null,cn:[{tag:'a',href:this.more_url,cls:'small-box-footer',html:this.more_text}]}]}
+A.cls+=' bg-'+(this.bgcolor?this.bgcolor:'aqua');if(!this.more_text){A.cn[2].cn=null;}return A;},initEvents:function(){if(!this.href){this.el.on('click',this.onClick,this);}},onClick:function(e){Roo.log('img onclick');this.fireEvent('click',this,e);}});