rem: if (xulSortService) { xulSortService = xulSortService.QueryInterface(Components.interfaces.nsIXULSortService); if (xulSortService) {  var sortDirection; if(direction) sortDirection = direction; else { var currentDirection = node.getAttribute('sortDirection'); if (currentDirection == "ascending") sortDirection = "descending"; else if (currentDirection == "descending") sortDirection = "ascending"; else    sortDirection = "ascending"; } 
add: if (xulSortService) { xulSortService = xulSortService.QueryInterface(Components.interfaces.nsIXULSortService); if (xulSortService) {  var sortDirection; if(direction) sortDirection = direction; else { var currentDirection = node.getAttribute('sortDirection'); if (currentDirection == "ascending") sortDirection = "descending"; else if (currentDirection == "descending") sortDirection = "ascending"; else    sortDirection = "ascending"; } 
context: function SortColumn(node, sortKey, secondarySortKey, direction){	var xulSortService = Components.classes["@mozilla.org/xul/xul-sort-service;1"].getService();	if (xulSortService)	{		xulSortService = xulSortService.QueryInterface(Components.interfaces.nsIXULSortService);		if (xulSortService)		{			// sort!!!			var sortDirection;			if(direction)				sortDirection = direction;			else			{				var currentDirection = node.getAttribute('sortDirection');				if (currentDirection == "ascending")						sortDirection = "descending";				else if (currentDirection == "descending")						sortDirection = "ascending";				else    sortDirection = "ascending";			}			try			{				if(secondarySortKey)					node.setAttribute('resource2', secondarySortKey);				xulSortService.Sort(node, sortKey, sortDirection);			}			catch(e)			{                		//dump("Sort failed: " + e + "\n");			}		}	}}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/eaa6754a0a946375badf1165b3e4af3999e4b03c/commandglue.js/clean/mailnews/base/resources/content/commandglue.js