rem: Ext.Gemma.AnnotationGrid.superclass.constructor.call( this, div, superConfig ); 
add: Ext.Gemma.AnnotationGrid.superclass.constructor.call( this, superConfig ); 
context: Ext.Gemma.AnnotationGrid = function ( div, config ) {		this.readMethod = config.readMethod; delete config.readMethod;	this.readParams = config.readParams; delete config.readParams;	this.editable = config.editable; delete config.editable;	this.showParent = config.showParent; delete config.showParent;	this.noInitialLoad = config.noInitialLoad; delete config.noInitialLoad;	this.pageSize = config.pageSize; delete config.pageSize;	this.uniqueId = Ext.Gemma.AnnotationGrid.getUniqueId();		var parentStyler = function( value, metadata, record, row, col, ds ) {		var parentLink = record.data.parentLink;		var parentDecription = record.data.parentDescription;		var parentOfParentLink = record.data.parentOfParentLink;		var parentOfParentDescription = record.data.parentOfParentDescription;				if ( parentOfParentLink ) {			return String.format( "{0}<br> from {1}", parentLink, parentOfParentLink )		} else {			return String.format ( "{0} <img id='{1}' src='/Gemma/images/magnifier.png' />", parentLink, Ext.Gemma.AnnotationGrid.getHandleId( this.uniqueId, record.id ) );		}	};		var superConfig = { };	var thisGrid = this;		if ( this.pageSize ) {		superConfig.ds = new Ext.Gemma.PagingDataStore( {			proxy : new Ext.data.DWRProxy( this.readMethod ),			reader : new Ext.data.ListRangeReader( {id:"id"}, Ext.Gemma.AnnotationGrid.getRecord() ),			pageSize : this.pageSize		} );	} else {		superConfig.ds = new Ext.data.Store( {			proxy : new Ext.data.DWRProxy( this.readMethod ),			reader : new Ext.data.ListRangeReader( {id:"id"}, Ext.Gemma.AnnotationGrid.getRecord() )		} );	}	superConfig.ds.setDefaultSort('className');	superConfig.ds.on( "load", function() {		thisGrid.getView().autoSizeColumns();	} );		superConfig.cm = new Ext.grid.ColumnModel( [		{ header: "Class", dataIndex: "className" },		{ header: "Term", dataIndex: "termName", renderer: Ext.Gemma.AnnotationGrid.getTermStyler() },		{ header: "Parent", dataIndex: "parentLink", renderer: Ext.Gemma.AnnotationGrid.getParentStyler(), hidden: this.showParent ? false: true }	] );	superConfig.cm.defaultSortable = true;	var CATEGORY_COLUMN = 0;	var VALUE_COLUMN = 1;	var PARENT_COLUMN = 2;	if ( this.editable ) {		this.categoryCombo = new Ext.Gemma.MGEDCombo( { lazyRender : true } );		var categoryEditor = new Ext.grid.GridEditor( this.categoryCombo );		this.categoryCombo.on( "select", function ( combo, record, index ) { categoryEditor.completeEdit(); } );		superConfig.cm.setEditor( CATEGORY_COLUMN, categoryEditor );				this.valueCombo = new Ext.Gemma.CharacteristicCombo( { lazyRender : true } );		var valueEditor = new Ext.grid.GridEditor( this.valueCombo );		this.valueCombo.on( "select", function ( combo, record, index ) { valueEditor.completeEdit(); } );		superConfig.cm.setEditor( VALUE_COLUMN, valueEditor );	}		superConfig.selModel = new Ext.grid.RowSelectionModel();		superConfig.loadMask = true;	superConfig.autoExpandColumn = this.showParent ? 2 : 1;	for ( property in config ) {		superConfig[property] = config[property];	}	Ext.Gemma.AnnotationGrid.superclass.constructor.call( this, div, superConfig );		/* these functions have to happen after we've called the super-constructor so that we know	 * we're a Grid...	 */	if ( this.editable ) {//		this.on( "afteredit", function( e ) {//			var row = e.record.data;//			var c = Ext.Gemma.AnnotationGrid.convertToCharacteristic( row );//			var callback = this.refresh.bind( this );//			CharacteristicBrowserController.updateCharacteristics( [ c ], callback );//		} );				this.on( "beforeedit", function( e ) {			var row = e.record.data;			var col = this.getColumnModel().getColumnId( e.column );			if ( col == VALUE_COLUMN ) {				var f = this.valueCombo.setCategory.bind( this.valueCombo );				f( row.className, row.classUri );			}		} );				this.on( "afteredit", function( e ) {			var col = this.getColumnModel().getColumnId( e.column );			if ( col == CATEGORY_COLUMN ) {				var f = this.categoryCombo.getTerm.bind( this.categoryCombo );				var term = f();				e.record.set( "className", term.term );				e.record.set( "classUri", term.uri );			} else if ( col == VALUE_COLUMN ) {				var f = this.valueCombo.getCharacteristic.bind( this.valueCombo );				var c = f();				e.record.set( "termName", c.value );				e.record.set( "termUri", c.valueUri );			}			this.getView().refresh();		} );	}		this.on( "celldblclick", function ( grid, rowIndex, cellIndex ) {		var record = grid.getDataSource().getAt( rowIndex );		var column = grid.getColumnModel().getColumnId( cellIndex )		if ( column == PARENT_COLUMN ) {			record.expanded = record.expanded ? 0 : 1;			grid.getView().refresh( true );		}	}, this );		if ( ! this.noInitialLoad )		this.getDataSource().load( { params : this.getReadParams() } );};
meta: 2891	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2891/d109eea1e59fbb030ac98e95f181f72da9611a48/AnnotationGrid.js/clean/gemma-web/src/main/webapp/scripts/ajax/annotation/AnnotationGrid.js