Major changes to the Rico 3 server control for SimpleGrids - much improved control...
[infodrom/rico3] / minsrc / ricoLiveGrid.js
index 6c89dc1..61030c1 100644 (file)
@@ -535,8 +535,8 @@ Rico.LiveGrid.prototype = {
 
     this.bookmark=document.getElementById(this.tableId+"_bookmark");
     this.sizeDivs();
-    var filterUIrow=this.buffer.options.canFilter ? this.options.FilterLocation : false;
-    if (typeof(filterUIrow)=='number' && filterUIrow<0)
+    var filterUIrow=-1;
+    if (this.buffer.options.canFilter && this.options.AutoFilter)
       filterUIrow=this.addHeadingRow('ricoLG_FilterRow');
     this.createDataCells(this.options.visibleRows);
     if (this.pageSize == 0) return;
@@ -561,7 +561,7 @@ Rico.LiveGrid.prototype = {
       this.scrollToRow(this.options.offset);
       this.buffer.fetch(this.options.offset);
     }
-    if (typeof(filterUIrow)=='number')
+    if (filterUIrow >= 0)
       this.createFilters(filterUIrow);
     this.scrollEventFunc=Rico.eventHandle(this,'handleScroll');
     this.wheelEventFunc=Rico.eventHandle(this,'handleWheel');
@@ -643,7 +643,7 @@ Rico.LiveGridMethods = {
       var theads=table.getElementsByTagName("thead");
       if (theads.length == 1) {
         Rico.log("createTables: using thead section, id="+this.tableId);
-        if (this.options.PanelNamesOnTabHdr && this.options.panels) {
+        if (this.options.ColGroupsOnTabHdr && this.options.ColGroups) {
           var r=theads[0].insertRow(0);
           this.insertPanelNames(r, 0, this.options.frozenColumns, 'ricoFrozen');
           this.insertPanelNames(r, this.options.frozenColumns, this.options.columnSpecs.length);
@@ -733,7 +733,7 @@ Rico.LiveGridMethods = {
     } else {
       this.createHdr(0,0,this.options.frozenColumns);
       this.createHdr(1,this.options.frozenColumns,this.options.columnSpecs.length);
-      if (this.options.PanelNamesOnTabHdr && this.options.panels) {
+      if (this.options.ColGroupsOnTabHdr && this.options.ColGroups) {
         this.insertPanelNames(this.thead[0].insertRow(0), 0, this.options.frozenColumns);
         this.insertPanelNames(this.thead[1].insertRow(0), this.options.frozenColumns, this.options.columnSpecs.length);
       }
@@ -935,15 +935,15 @@ Rico.LiveGridMethods = {
     r.className='ricoLG_hdg';
     var lastIdx=-1, span, newCell=null, spanIdx=0;
     for( var c=start; c < limit; c++ ) {
-      if (lastIdx == this.options.columnSpecs[c].panelIdx) {
+      if (lastIdx == this.options.columnSpecs[c].ColGroupIdx) {
         span++;
       } else {
         if (newCell) newCell.colSpan=span;
         newCell = r.insertCell(-1);
         if (cellClass) newCell.className=cellClass;
         span=1;
-        lastIdx=this.options.columnSpecs[c].panelIdx;
-        newCell.innerHTML=this.options.panels[lastIdx];
+        lastIdx=this.options.columnSpecs[c].ColGroupIdx;
+        newCell.innerHTML=this.options.ColGroups[lastIdx];
       }
     }
     if (newCell) newCell.colSpan=span;