page_size: (typeof fetchSize=='number') ? fetchSize : this.totalRows,
offset: startPos.toString()
};
- if (!this.foundRowCount) queryHash['get_total']='true';
+ queryHash[this.liveGrid.actionId]="query";
if (this.options.requestParameters) {
for ( var i=0; i < this.options.requestParameters.length; i++ ) {
var anArg = this.options.requestParameters[i];
this.liveGrid.showMsg(Rico.getPhraseById("httpError",xhr.status));
return;
}
+ Rico.log("ajaxUpdate: startPos="+startPos);
this._responseHandler=this['processResponse'+this.options.fmt.toUpperCase()];
if (!this._responseHandler(startPos,xhr)) return;
if (this.options.onAjaxUpdate)
},
dom2jstableStyle: function(rowsElement,firstRow) {
- var acceptStyle=this.options.acceptStyle;
Rico.log("dom2jstableStyle start");
var newRows = [];
var trs = rowsElement.getElementsByTagName("tr");
this.setTotalRows(eofrow);
newpos=Math.min(this.liveGrid.topOfLastPage(),offset);
Rico.log("updateGrid: new rowcnt="+eofrow+" newpos="+newpos);
- if (lastTotalRows==0 && this.liveGrid.sizeTo=='data')
- Rico.runLater(100,this.liveGrid,'adjustPageSize'); // FF takes a long time to calc initial size
this.liveGrid.scrollToRow(newpos);
if ( this.isInRange(newpos) ) {
this.liveGrid.refreshContents(newpos);
formQueryHashSQL: function(startPos,fetchSize,fmt) {
var queryHash=this.formQueryHashXML(startPos,fetchSize);
- queryHash[this.liveGrid.actionId]="query";
+ if (!this.foundRowCount) queryHash['get_total']='true';
if (fmt) queryHash._fmt=fmt;
// sort
queryHash['f['+colnum+'][len]']=c.filterValues.length;
for (var i=0; i<c.filterValues.length; i++) {
var fval=c.filterValues[i];
- if (c.filterOp=='LIKE' && fval.indexOf('*')==-1) fval='*'+fval+'*';
+ if (c.filterOp=='LIKE' && fval.indexOf('*')==-1) {
+ if (c.format.filterUI.charAt(1) == '^') fval=fval+'*';
+ else if (c.format.filterUI.charAt(1) == '$') fval='*'+fval;
+ else fval='*'+fval+'*';
+ }
queryHash['f['+colnum+']['+i+']']=fval;
}
}
this.startPos = start;
} else {
this.rows = this.rows.concat( newRows.slice(0, newRows.length));
- if (this.attr) this.attr = this.attr.concat( newStyle.slice(0, newStyle.length));
+ if (this.attr && newStyle) this.attr = this.attr.concat( newStyle.slice(0, newStyle.length));
if (this.rows.length > this.maxBufferSize) {
var fullSize = this.rows.length;
this.rows = this.rows.slice(this.rows.length - this.maxBufferSize, this.rows.length);