From 795f765ce440577b9e3f76ecad27c6d9d0118498 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 11 Mar 2021 17:21:41 +0800 Subject: [PATCH] roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- roojs-debug.js | 3 ++- roojs-ui-debug.js | 30 +++++++++++++++++++++--------- roojs-ui.js | 4 ++-- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/roojs-debug.js b/roojs-debug.js index 0512cba0ee..197e32ca15 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -57766,7 +57766,8 @@ Roo.extend(Roo.grid.GridView, Roo.grid.AbstractGridView, { } }, - layout : function(initialRender, is2ndPass){ + layout : function(initialRender, is2ndPass) + { var g = this.grid; var auto = g.autoHeight; var scrollOffset = 16; diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index f7ccb4bad7..dffb102803 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -28466,10 +28466,10 @@ Roo.DDView = function(container, tpl, config) { this.getEl().setStyle("outline", "0px none"); this.getEl().unselectable(); if (this.dragGroup) { - this.setDraggable(this.dragGroup.split(",")); + this.setDraggable(this.dragGroup.split(",")); } if (this.dropGroup) { - this.setDroppable(this.dropGroup.split(",")); + this.setDroppable(this.dropGroup.split(",")); } if (this.deletable) { this.setDeletable(); @@ -32403,6 +32403,9 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, { /** * @cfg {String} ddGroup - drag drop group. */ + /** + * @cfg {String} dragGroup - drag group (?? not sure if needed.) + */ /** * @cfg {Number} minColumnWidth The minimum width a column can be resized to. Default is 25. @@ -32439,6 +32442,9 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, { /** * @cfg {Boolean} enableDrag True to enable drag of rows. Default is false. (double check if this is needed?) + */ + /** + * @cfg {Boolean} enableDrop True to enable drop of elements. Default is false. (double check if this is needed?) */ /** @@ -32513,6 +32519,15 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, { /** * @cfg {Number} maxHeight Sets the maximum height of the grid - ignored if autoHeight is not on. */ + + + /** + * @cfg {String} ddText Configures the text is the drag proxy (defaults to "%0 selected row(s)"). + * %0 is replaced with the number of selected rows. + */ + ddText : "{0} selected row{1}", + + /** * Called once after all setup has been completed and the grid is ready to be rendered. * @return {Roo.grid.Grid} this @@ -32828,6 +32843,7 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, { }, /** * Called to get grid's drag proxy text, by default returns this.ddText. + * Override this to put something different in the dragged text. * @return {String} */ getDragDropText : function(){ @@ -32835,12 +32851,7 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, { return String.format(this.ddText, count, count == 1 ? '' : 's'); } }); -/** - * Configures the text is the drag proxy (defaults to "%0 selected row(s)"). - * %0 is replaced with the number of selected rows. - * @type String - */ -Roo.grid.Grid.prototype.ddText = "{0} selected row{1}";/* +/* * Based on: * Ext JS Library 1.1.1 * Copyright(c) 2006-2007, Ext JS, LLC. @@ -34750,7 +34761,8 @@ Roo.extend(Roo.grid.GridView, Roo.grid.AbstractGridView, { } }, - layout : function(initialRender, is2ndPass){ + layout : function(initialRender, is2ndPass) + { var g = this.grid; var auto = g.autoHeight; var scrollOffset = 16; diff --git a/roojs-ui.js b/roojs-ui.js index 56160601dd..a4271a57f9 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -1407,7 +1407,7 @@ Roo.grid.Grid=function(A,B){this.container=Roo.get(A);this.container.update(""); }if(this.cm){this.colModel=this.cm;delete this.cm;}if(this.sm){this.selModel=this.sm;delete this.sm;}if(this.selModel){this.selModel=Roo.factory(this.selModel,Roo.grid);this.sm=this.selModel;this.sm.xmodule=this.xmodule||false;}if(typeof(this.colModel.config)=='undefined'){this.colModel=new Roo.grid.ColumnModel(this.colModel); this.cm=this.colModel;this.cm.xmodule=this.xmodule||false;}if(this.dataSource){this.dataSource=Roo.factory(this.dataSource,Roo.data);this.ds=this.dataSource;this.ds.xmodule=this.xmodule||false;}if(this.width){this.container.setWidth(this.width);}if(this.height){this.container.setHeight(this.height); }this.addEvents({"click":true,"dblclick":true,"contextmenu":true,"mousedown":true,"mouseup":true,"mouseover":true,"mouseout":true,"keypress":true,"keydown":true,"cellclick":true,"celldblclick":true,"rowclick":true,"rowdblclick":true,"headerclick":true,"headerdblclick":true,"rowcontextmenu":true,"cellcontextmenu":true,"headercontextmenu":true,"bodyscroll":true,"columnresize":true,"columnmove":true,"startdrag":true,"enddrag":true,"dragdrop":true,"dragover":true,"dragenter":true,"dragout":true,'rowclass':true,'render':true} -);Roo.grid.Grid.superclass.constructor.call(this);};Roo.extend(Roo.grid.Grid,Roo.util.Observable,{minColumnWidth:25,autoSizeColumns:false,autoSizeHeaders:true,monitorWindowResize:true,maxRowsToMeasure:0,trackMouseOver:true,enableDragDrop:false,enableColumnMove:true,enableColumnHide:true,enableRowHeightSync:false,stripeRows:true,autoHeight:false,autoExpandColumn:false,autoExpandMin:50,autoExpandMax:1000,view:null,loadMask:false,dropTarget:false,rendered:false,render:function(){var c=this.container; +);Roo.grid.Grid.superclass.constructor.call(this);};Roo.extend(Roo.grid.Grid,Roo.util.Observable,{minColumnWidth:25,autoSizeColumns:false,autoSizeHeaders:true,monitorWindowResize:true,maxRowsToMeasure:0,trackMouseOver:true,enableDragDrop:false,enableColumnMove:true,enableColumnHide:true,enableRowHeightSync:false,stripeRows:true,autoHeight:false,autoExpandColumn:false,autoExpandMin:50,autoExpandMax:1000,view:null,loadMask:false,dropTarget:false,rendered:false,ddText:"{0} selected row{1}",render:function(){var c=this.container; if((!c.dom.offsetHeight||c.dom.offsetHeight<20)||c.getStyle("height")=="auto"){this.autoHeight=true;}var A=this.getView();A.init(this);c.on("click",this.onClick,this);c.on("dblclick",this.onDblClick,this);c.on("contextmenu",this.onContextMenu,this);c.on("keydown",this.onKeyDown,this); if(Roo.isTouch){c.on("touchstart",this.onTouchStart,this);}this.relayEvents(c,["mousedown","mouseup","mouseover","mouseout","keypress"]);this.getSelectionModel().init(this);A.render();if(this.loadMask){this.loadMask=new Roo.LoadMask(this.container,Roo.apply({store:this.dataSource} ,this.loadMask));}if(this.toolbar&&this.toolbar.xtype){this.toolbar.container=this.getView().getHeaderPanel(true);this.toolbar=new Roo.Toolbar(this.toolbar);}if(this.footer&&this.footer.xtype){this.footer.dataSource=this.getDataSource();this.footer.container=this.getView().getFooterPanel(true); @@ -1422,7 +1422,7 @@ var ds=this.dataSource;if(cs.length==1&&ds.getAt(D)==cs[0]){A='dblclick';}}if(!A G=false;}while(A>=0){if(!G){B=E-1;}G=false;while(B>=0){if(fn.call(D||this,A,B,cm)===true){return [A,B];}B--;}A--;}}else{if(B>=E){A++;G=false;}while(A