if (this.options.windowResize)
Rico.runLater(100,this,'pluginWindowResize');
Rico.log("initialize complete for "+this.tableId);
+ //alert('clientLeft='+this.scrollDiv.clientLeft);
+ if (this.direction=='rtl' && (!Rico.isWebKit || this.scrollDiv.clientLeft > 0)) {
+ this.scrollTab.style.right='0px';
+ } else {
+ this.scrollTab.style.left='0px';
+ Rico.setStyle(this.tabs[1], {'float': 'left'});
+ }
}
};
newdiv.className = 'ricoLG_cell '+cls;
newdiv.id=this.tableId+'_'+this.pageSize+'_'+c;
this.columns[c].dataColDiv.appendChild(newdiv);
- if (this.columns[c].format.canDrag && Rico.registerDraggable)
- Rico.registerDraggable( new Rico.LiveGridDraggable(this, this.pageSize, c), this.options.dndMgrIdx );
- newdiv.innerHTML=' '; // this seems to be required by IE
if (this.columns[c]._create) {
this.columns[c]._create(newdiv,this.pageSize);
+ } else {
+ newdiv.innerHTML=' '; // this seems to be required by IE
+ }
+ if (this.columns[c].format.canDrag && Rico.registerDraggable) {
+ Rico.registerDraggable( new Rico.LiveGridDraggable(this, this.pageSize, c), this.options.dndMgrIdx );
}
}
this.pageSize++;
return -1;
},
- findColumnName: function(name) {
- for (var n=0; n<this.columns.length; n++) {
- if (this.columns[n].fieldName == name) return n;
- }
- return -1;
- },
-
/**
* Searches options.columnSpecs colAttr for matching colValue
* @return array of matching column indexes
/**
* Set initial sort
*/
- setSortUI: function( columnNameOrNum, sortDirection ) {
- Rico.log("setSortUI: "+columnNameOrNum+' '+sortDirection);
+ setSortUI: function( columnIdOrNum, sortDirection ) {
+ Rico.log("setSortUI: "+columnIdOrNum+' '+sortDirection);
var colnum=this.findSortedColumn();
if (colnum >= 0) {
sortDirection=this.columns[colnum].getSortDirection();
sortDirection=sortDirection.toUpperCase();
if (sortDirection != Rico.ColumnConst.SORT_DESC) sortDirection=Rico.ColumnConst.SORT_ASC;
}
- switch (typeof columnNameOrNum) {
+ switch (typeof columnIdOrNum) {
case 'string':
- colnum=this.findColumnName(columnNameOrNum);
+ colnum=this.findColumnsBySpec('id',columnIdOrNum);
break;
case 'number':
- colnum=columnNameOrNum;
+ colnum=columnIdOrNum;
break;
}
}