rem: .click( function(){  var idSubTable = $(this).attr('id');  var divIdToReplaceWithSubTable = 'subDataTable_'+idSubTable;  var NextStyle = $(this).next().attr('class'); var CurrentStyle = $(this).attr('class');  var currentRowLevel = getLevelFromClass(CurrentStyle); var nextRowLevel = getLevelFromClass(NextStyle);     if(currentRowLevel >= nextRowLevel) { var numberOfColumns = $(this).children().length; $(this).after( '\ <tr id="'+divIdToReplaceWithSubTable+'">\ <td colspan="'+numberOfColumns+'">\ <span id="loadingDataTable" style="display:inline"><img src="themes/default/images/loading-blue.gif"> Loading...</span>\ </td>\ </tr>\ '); var savedActionVariable = getRequestVariable(workingDivId,'action');  setVariable(workingDivId, 'idSubtable', idSubTable); setVariable(workingDivId, 'action', getRequestVariable(workingDivId,'actionToLoadTheSubTable'));  reloadAjaxDataTable(workingDivId, false, actionsSubDataTableLoaded ); setVariable(workingDivId, 'action', savedActionVariable); setVariable(workingDivId, 'idSubtable', false); }  else { var plusDetected = $('td img', this).attr('src').indexOf('plus') >= 0;   $(this).siblings().each( function(){ if( parents = $(this).attr('parent') ) 
add: $(this).siblings().each( function(){ if( parents = $(this).attr('parent') ) {  if(parents.indexOf(idSubTable) >= 0 || parents.indexOf('subDataTable_'+idSubTable) >= 0 ) 
context: 		.click( function(){			// get the idSubTable			var idSubTable = $(this).attr('id');					var divIdToReplaceWithSubTable = 'subDataTable_'+idSubTable;						var NextStyle = $(this).next().attr('class');			var CurrentStyle = $(this).attr('class');						var currentRowLevel = getLevelFromClass(CurrentStyle);			var nextRowLevel = getLevelFromClass(NextStyle);			// if the row has not been clicked			// which is the same as saying that the next row level is equal or less than the current row			// because when we click a row the level of the next rows is higher (level2 row gives level3 rows)			if(currentRowLevel >= nextRowLevel)			{				var numberOfColumns = $(this).children().length;				$(this).after( '\				<tr id="'+divIdToReplaceWithSubTable+'">\					<td colspan="'+numberOfColumns+'">\							<span id="loadingDataTable" style="display:inline"><img src="themes/default/images/loading-blue.gif"> Loading...</span>\					</td>\				</tr>\				');				var savedActionVariable = getRequestVariable(workingDivId,'action');							setVariable(workingDivId, 'idSubtable', idSubTable);				setVariable(workingDivId, 'action', getRequestVariable(workingDivId,'actionToLoadTheSubTable'));								reloadAjaxDataTable(workingDivId, false, actionsSubDataTableLoaded );				setVariable(workingDivId, 'action', savedActionVariable);				setVariable(workingDivId, 'idSubtable', false);					}			// else we toggle all these rows			else			{				var plusDetected = $('td img', this).attr('src').indexOf('plus') >= 0;								//alert('look for '+idSubTable);				$(this).siblings().each( function(){					if( parents = $(this).attr('parent') )					{						//alert('parent = '+ parents);						if(parents.indexOf(idSubTable) >= 0							|| parents.indexOf('subDataTable_'+idSubTable) >= 0						)						{							//alert('found');							if(plusDetected)								$(this).css('display','');							else								$(this).css('display','none');														}					}				});			}						// toggle the image			var plusDetected = $('td img', this).attr('src').indexOf('plus') >= 0;			if(plusDetected)			{				$(this).css('font-weight','bold');				setImageMinus( this );			}			else			{				$(this).css('font-weight','normal');				setImagePlus( this );			} 		})
meta: 1267	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1267/755961c5ed4e082ad9ea58c1ccd4c23d2aa7447e/datatable.js/clean/plugins/UserSettings/templates/datatable.js