roojs-core.js
authorAlan Knowles <alan@roojs.com>
Thu, 11 Mar 2021 07:15:34 +0000 (15:15 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 11 Mar 2021 07:15:34 +0000 (15:15 +0800)
roojs-core-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-core-debug.js
roojs-debug.js

index 9caf851..f0f281e 100644 (file)
@@ -2301,7 +2301,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);
@@ -2316,7 +2316,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<F){if(!G){B=0;}G=false;while(B<E){if(fn.call(D||this,A,B,cm)===true){return [A,B];}B++;}A++;}}return null;
 },getSelections:function(){return this.selModel.getSelections();},autoSize:function(){if(this.rendered){this.view.layout();if(this.view.adjustForScroll){this.view.adjustForScroll();}}},getGridEl:function(){return this.container;},stopEditing:function(){},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.grid.RowSelectionModel();
 }return this.selModel;},getDataSource:function(){return this.dataSource;},getColumnModel:function(){return this.colModel;},getView:function(){if(!this.view){this.view=new Roo.grid.GridView(this.viewConfig);}return this.view;},getDragDropText:function(){var A=this.selModel.getCount();
-return String.format(this.ddText,A,A==1?'':'s');}});Roo.grid.Grid.prototype.ddText="{0} selected row{1}";
+return String.format(this.ddText,A,A==1?'':'s');}});
 // Roo/grid/AbstractGridView.js
 Roo.grid.AbstractGridView=function(){this.grid=null;this.events={"beforerowremoved":true,"beforerowsinserted":true,"beforerefresh":true,"rowremoved":true,"rowsinserted":true,"rowupdated":true,"refresh":true};Roo.grid.AbstractGridView.superclass.constructor.call(this);
 };Roo.extend(Roo.grid.AbstractGridView,Roo.util.Observable,{rowClass:"x-grid-row",cellClass:"x-grid-cell",tdClass:"x-grid-td",hdClass:"x-grid-hd",splitClass:"x-grid-hd-split",init:function(A){this.grid=A;var B=this.grid.getGridEl().id;this.colSelector="#"+B+" ."+this.cellClass+"-";
index 82fe429..697592c 100644 (file)
@@ -22564,7 +22564,7 @@ Roo.dd.DropTarget = function(el, config){
          * target.  This default implementation adds the CSS class specified by overClass (if any) to the drop element
          * and returns the dropAllowed config value.  This method should be overridden if drop validation is required.
          * 
-         * IMPORTANT : it should set this.overClass and this.dropAllowed
+         * IMPORTANT : it should set  this.valid to true|false
          * 
          * @param {Roo.dd.DragSource} source The drag source that was dragged over this drop target
          * @param {Event} e The event
@@ -22578,7 +22578,7 @@ Roo.dd.DropTarget = function(el, config){
          * This method will be called on every mouse movement while the drag source is over the drop target.
          * This default implementation simply returns the dropAllowed config value.
          * 
-         * IMPORTANT : it should set this.dropAllowed
+         * IMPORTANT : it should set  this.valid to true|false
          * 
          * @param {Roo.dd.DragSource} source The drag source that was dragged over this drop target
          * @param {Event} e The event
@@ -22592,6 +22592,7 @@ Roo.dd.DropTarget = function(el, config){
          * out of the target without dropping.  This default implementation simply removes the CSS class specified by
          * overClass (if any) from the drop element.
          * 
+         * 
          * @param {Roo.dd.DragSource} source The drag source that was dragged over this drop target
          * @param {Event} e The event
          * @param {Object} data An object containing arbitrary data supplied by the drag source
index 29cb7b7..0512cba 100644 (file)
@@ -22564,7 +22564,7 @@ Roo.dd.DropTarget = function(el, config){
          * target.  This default implementation adds the CSS class specified by overClass (if any) to the drop element
          * and returns the dropAllowed config value.  This method should be overridden if drop validation is required.
          * 
-         * IMPORTANT : it should set this.overClass and this.dropAllowed
+         * IMPORTANT : it should set  this.valid to true|false
          * 
          * @param {Roo.dd.DragSource} source The drag source that was dragged over this drop target
          * @param {Event} e The event
@@ -22578,7 +22578,7 @@ Roo.dd.DropTarget = function(el, config){
          * This method will be called on every mouse movement while the drag source is over the drop target.
          * This default implementation simply returns the dropAllowed config value.
          * 
-         * IMPORTANT : it should set this.dropAllowed
+         * IMPORTANT : it should set  this.valid to true|false
          * 
          * @param {Roo.dd.DragSource} source The drag source that was dragged over this drop target
          * @param {Event} e The event
@@ -22592,6 +22592,7 @@ Roo.dd.DropTarget = function(el, config){
          * out of the target without dropping.  This default implementation simply removes the CSS class specified by
          * overClass (if any) from the drop element.
          * 
+         * 
          * @param {Roo.dd.DragSource} source The drag source that was dragged over this drop target
          * @param {Event} e The event
          * @param {Object} data An object containing arbitrary data supplied by the drag source
@@ -51470,10 +51471,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();
@@ -55407,6 +55408,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.
@@ -55443,6 +55447,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?)
     */
     
     /**
@@ -55517,6 +55524,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
@@ -55832,6 +55848,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(){
@@ -55839,12 +55856,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.