From 520aa22d24fdc05d2b63fdbcc76c8a516acc43e7 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 24 Sep 2020 14:12:20 +0800 Subject: [PATCH] sync --- docs/json/roodata.json | 18 + docs/src/Roo_Toolbar.js.html | 2 +- docs/symbols/Roo.PagingToolbar.json | 8 + docs/symbols/Roo.Toolbar.TextItem.json | 14 +- docs/symbols/Roo.Toolbar.json | 8 + roojs-all.js | 22 ++ roojs-core-debug.js | 457 +++++++++++++++++++++++++ roojs-core.js | 22 ++ roojs-debug.js | 457 +++++++++++++++++++++++++ 9 files changed, 1001 insertions(+), 7 deletions(-) diff --git a/docs/json/roodata.json b/docs/json/roodata.json index 2aca33ee49..ee66560b67 100644 --- a/docs/json/roodata.json +++ b/docs/json/roodata.json @@ -11100,6 +11100,12 @@ "type" : "Number", "desc" : "The number of records to display per page (defaults to 20)", "memberOf" : "" + }, + { + "name" : "text", + "type" : "string", + "desc" : "", + "memberOf" : "Roo.Toolbar" } ], "events" : [ @@ -13638,6 +13644,12 @@ "type" : "Array", "desc" : "array of button configs or elements to add (will be converted to a MixedCollection)", "memberOf" : "Roo" + }, + { + "name" : "text", + "type" : "string", + "desc" : "", + "memberOf" : "" } ], "events" : [ @@ -14852,6 +14864,12 @@ }, "Roo.Toolbar.TextItem" : { "props" : [ + { + "name" : "text", + "type" : "string", + "desc" : "", + "memberOf" : "Roo.Toolbar" + } ], "events" : [ { diff --git a/docs/src/Roo_Toolbar.js.html b/docs/src/Roo_Toolbar.js.html index 4c830344f4..fb36d085d4 100644 --- a/docs/src/Roo_Toolbar.js.html +++ b/docs/src/Roo_Toolbar.js.html @@ -523,7 +523,7 @@ * A simple class that renders text directly into a toolbar. * @constructor * Creates a new TextItem - * @param {String} text + * @cfg {string} text */ Roo.Toolbar.TextItem = function(cfg){ var text = cfg || ""; diff --git a/docs/symbols/Roo.PagingToolbar.json b/docs/symbols/Roo.PagingToolbar.json index 37a2e238d8..f9a5fd7bc8 100644 --- a/docs/symbols/Roo.PagingToolbar.json +++ b/docs/symbols/Roo.PagingToolbar.json @@ -23,6 +23,14 @@ "returns" : [ ], "config" : [ + { + "name" : "text", + "type" : "string", + "desc" : "", + "memberOf" : "Roo.Toolbar", + "optvals" : [ + ] + }, { "name" : "pageSize", "type" : "Number", diff --git a/docs/symbols/Roo.Toolbar.TextItem.json b/docs/symbols/Roo.Toolbar.TextItem.json index 261d990749..4a5454e26b 100644 --- a/docs/symbols/Roo.Toolbar.TextItem.json +++ b/docs/symbols/Roo.Toolbar.TextItem.json @@ -13,16 +13,18 @@ "since" : "", "see" : "", "params" : [ - { - "name" : "text", - "type" : "String", - "desc" : "", - "isOptional" : false - } ], "returns" : [ ], "config" : [ + { + "name" : "text", + "type" : "string", + "desc" : "", + "memberOf" : "Roo.Toolbar", + "optvals" : [ + ] + } ], "methods" : [ { diff --git a/docs/symbols/Roo.Toolbar.json b/docs/symbols/Roo.Toolbar.json index d3a8801f22..09b5242750 100644 --- a/docs/symbols/Roo.Toolbar.json +++ b/docs/symbols/Roo.Toolbar.json @@ -22,6 +22,14 @@ "returns" : [ ], "config" : [ + { + "name" : "text", + "type" : "string", + "desc" : "", + "memberOf" : "Roo.Toolbar", + "optvals" : [ + ] + }, { "name" : "container", "type" : "String/HTMLElement/Element", diff --git a/roojs-all.js b/roojs-all.js index 0c07603483..5dbfbde970 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -656,6 +656,28 @@ this.y=y;if(!this.boxReady){return this;}var A=this.adjustPosition(x,y);var ax=A return this;},onRender:function(ct,A){Roo.BoxComponent.superclass.onRender.call(this,ct,A);if(this.resizeEl){this.resizeEl=Roo.get(this.resizeEl);}if(this.positionEl){this.positionEl=Roo.get(this.positionEl);}},afterRender:function(){Roo.BoxComponent.superclass.afterRender.call(this); this.boxReady=true;this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y);}if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY);}},syncSize:function(){delete this.lastSize;this.setSize(this.el.getWidth(),this.el.getHeight()); return this;},onResize:function(A,B,C,D){},onPosition:function(x,y){},adjustSize:function(w,h){if(this.autoWidth){w='auto';}if(this.autoHeight){h='auto';}return {width:w,height:h};},adjustPosition:function(x,y){return {x:x,y:y};}}); +// Roo/Layer.js +(function(){Roo.Layer=function(C,D){C=C||{};var dh=Roo.DomHelper;var cp=C.parentEl,E=cp?Roo.getDom(cp):document.body;if(D){this.dom=Roo.getDom(D);}if(!this.dom){var o=C.dh||{tag:"div",cls:"x-layer"};this.dom=dh.append(E,o);}if(C.cls){this.addClass(C.cls);} +this.constrain=C.constrain!==false;this.visibilityMode=Roo.Element.VISIBILITY;if(C.id){this.id=this.dom.id=C.id;}else{this.id=Roo.id(this.dom);}this.zindex=C.zindex||this.getZIndex();this.position("absolute",this.zindex);if(C.shadow){this.shadowOffset=C.shadowOffset||4; +this.shadow=new Roo.Shadow({offset:this.shadowOffset,mode:C.shadow});}else{this.shadowOffset=0;}this.useShim=C.shim!==false&&Roo.useShims;this.useDisplay=C.useDisplay;this.hide();};var A=Roo.Element.prototype;var B=[];Roo.extend(Roo.Layer,Roo.Element,{getZIndex:function(){return this.zindex||parseInt(this.getStyle("z-index"),10)||11000; +},getShim:function(){if(!this.useShim){return null;}if(this.shim){return this.shim;}var C=B.shift();if(!C){C=this.createShim();C.enableDisplayMode('block');C.dom.style.display='none';C.dom.style.visibility='visible';}var pn=this.dom.parentNode;if(C.dom.parentNode!=pn){pn.insertBefore(C.dom,this.dom); +}C.setStyle('z-index',this.getZIndex()-2);this.shim=C;return C;},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);B.push(this.shim);delete this.shim;}},disableShadow:function(){if(this.shadow){this.shadowDisabled=true;this.shadow.hide();this.lastShadowOffset=this.shadowOffset; +this.shadowOffset=0;}},enableShadow:function(C){if(this.shadow){this.shadowDisabled=false;this.shadowOffset=this.lastShadowOffset;delete this.lastShadowOffset;if(C){this.sync(true);}}},sync:function(C){var sw=this.shadow;if(!this.updating&&this.isVisible()&&(sw||this.useShim)){var sh=this.getShim(); +var w=this.getWidth(),h=this.getHeight();var l=this.getLeft(true),t=this.getTop(true);if(sw&&!this.shadowDisabled){if(C&&!sw.isVisible()){sw.show(this);}else{sw.realign(l,t,w,h);}if(sh){if(C){sh.show();}var a=sw.adjusts,s=sh.dom.style;s.left=(Math.min(l,l+a.l))+"px"; +s.top=(Math.min(t,t+a.t))+"px";s.width=(w+a.w)+"px";s.height=(h+a.h)+"px";}}else if(sh){if(C){sh.show();}sh.setSize(w,h);sh.setLeftTop(l,t);}}},destroy:function(){this.hideShim();if(this.shadow){this.shadow.hide();}this.removeAllListeners();var pn=this.dom.parentNode; +if(pn){pn.removeChild(this.dom);}Roo.Element.uncache(this.id);},remove:function(){this.destroy();},beginUpdate:function(){this.updating=true;},endUpdate:function(){this.updating=false;this.sync(true);},hideUnders:function(C){if(this.shadow){this.shadow.hide(); +}this.hideShim();},constrainXY:function(){if(this.constrain){var vw=Roo.lib.Dom.getViewWidth(),vh=Roo.lib.Dom.getViewHeight();var s=Roo.get(document).getScroll();var xy=this.getXY();var x=xy[0],y=xy[1];var w=this.dom.offsetWidth+this.shadowOffset,h=this.dom.offsetHeight+this.shadowOffset; +var C=false;if((x+w)>vw+s.left){x=vw-w-this.shadowOffset;C=true;}if((y+h)>vh+s.top){y=vh-h-this.shadowOffset;C=true;}if(x=ay){y=ay-h-5;}}xy=[x,y]; +this.storeXY(xy);A.setXY.call(this,xy);this.sync();}}},isVisible:function(){return this.visible;},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("");}else if(this.lastXY){A.setXY.call(this,this.lastXY);}else if(this.lastLT){A.setLeftTop.call(this,this.lastLT[0],this.lastLT[1]); +}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false);}else{this.setLeftTop(-10000,-10000);}},setVisible:function(v,a,d,c,e){if(v){this.showAction();}if(a&&v){var cb=function(){this.sync(true);if(c){c();}}.createDelegate(this); +A.setVisible.call(this,true,true,d,cb,e);}else{if(!v){this.hideUnders(true);}var cb=c;if(a){cb=function(){this.hideAction();if(c){c();}}.createDelegate(this);}A.setVisible.call(this,v,a,d,cb,e);if(v){this.sync(true);}else if(!a){this.hideAction();}}},storeXY:function(xy){delete this.lastLT; +this.lastXY=xy;},storeLeftTop:function(C,D){delete this.lastXY;this.lastLT=[C,D];},beforeFx:function(){this.beforeAction();return Roo.Layer.superclass.beforeFx.apply(this,arguments);},afterFx:function(){Roo.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible()); +},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide();}},setLeft:function(C){this.storeLeftTop(C,this.getTop(true));A.setLeft.apply(this,arguments);this.sync();},setTop:function(C){this.storeLeftTop(this.getLeft(true),C);A.setTop.apply(this,arguments); +this.sync();},setLeftTop:function(C,D){this.storeLeftTop(C,D);A.setLeftTop.apply(this,arguments);this.sync();},setXY:function(xy,a,d,c,e){this.fixDisplay();this.beforeAction();this.storeXY(xy);var cb=this.createCB(c);A.setXY.call(this,xy,a,d,cb,e);if(!a){cb(); +}},createCB:function(c){var el=this;return function(){el.constrainXY();el.sync(true);if(c){c();}};},setX:function(x,a,d,c,e){this.setXY([x,this.getY()],a,d,c,e);},setY:function(y,a,d,c,e){this.setXY([this.getX(),y],a,d,c,e);},setSize:function(w,h,a,d,c,e){this.beforeAction(); +var cb=this.createCB(c);A.setSize.call(this,w,h,a,d,cb,e);if(!a){cb();}},setWidth:function(w,a,d,c,e){this.beforeAction();var cb=this.createCB(c);A.setWidth.call(this,w,a,d,cb,e);if(!a){cb();}},setHeight:function(h,a,d,c,e){this.beforeAction();var cb=this.createCB(c); +A.setHeight.call(this,h,a,d,cb,e);if(!a){cb();}},setBounds:function(x,y,w,h,a,d,c,e){this.beforeAction();var cb=this.createCB(c);if(!a){this.storeXY([x,y]);A.setXY.call(this,[x,y]);A.setSize.call(this,w,h,a,d,cb,e);cb();}else{A.setBounds.call(this,x,y,w,h,a,d,cb,e); +}return this;},setZIndex:function(C){this.zindex=C;this.setStyle("z-index",C+2);if(this.shadow){this.shadow.setZIndex(C+1);}if(this.shim){this.shim.setStyle("z-index",C);}}});})(); // Roo/XComponent.js Roo.XComponent=function(A){Roo.apply(this,A);this.addEvents({'built':true});this.region=this.region||'center';Roo.XComponent.register(this);this.modules=false;this.el=false;};Roo.extend(Roo.XComponent,Roo.util.Observable,{el:false,panel:false,layout:false,disabled:false,parent:false,order:false,name:false,region:'center',items:false,_tree:false,render:function(el){el=el||false; var hp=this.parent?1:0;Roo.debug&&Roo.log(this);var A=this._tree?this._tree():this.tree();if(!el&&typeof(this.parent)=='string'&&this.parent.substring(0,1)=='#'){var B=this.parent.substr(1);this.parent=false;Roo.debug&&Roo.log(B);switch(B){case 'bootstrap-body':if(typeof(A.el)!='undefined'&&A.el==document.body){this.parent={el:true} diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 69645532eb..189e93d749 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -16004,6 +16004,463 @@ Roo.extend(Roo.BoxComponent, Roo.Component, { return {x : x, y: y}; } });/* + * Based on: + * Ext JS Library 1.1.1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * + * Originally Released Under LGPL - original licence link has changed is not relivant. + * + * Fork - LGPL + *