/*
 Copyright (C) 2008 Nu Echo Inc.

 This file requires the Prototype.js library.
*/


var __grammars = [];


/* 
TABLE DEFINITION
*/

var grammarsTable = new TwoRowsSortableTable(function(getNewData) {if (getNewData) {refreshGrammarsTable();}  return __grammars; },
				      [new SortableColumn("Grammar path",  grammarPath, pathSorter, ""),
				       new SortableColumn("Owner",  owner, ownerSorter, "15%"),
				       new SortableColumn("Created on",  creationDate, creationDateSorter, "20%"),
				       new SortableColumn("Last update",  updateDate, updateDateSorter, "20%"),
				       new SortableColumn("Last comment",  lastCommentDate, lastCommentDateSorter, "45%")],
				      'allgrammars');

grammarsTable.selectSortedColumn(1, false);

/*
 Automatic table updated
*/
function refreshGrammarsTable() {   
   perform_list_refresh("all");
}

var __grammarUpdater = new PeriodicalExecuter(function(pe) { refreshGrammarsTable(); }, 60);

refreshGrammarsTable();
