/**
* html-utils.js - keeper of the grounds
* Basic bits to verify user login and present
* appropriate UI when necessary.
*/
if (!htmlmaker)
var htmlmaker = {};
if (!htmlmaker.table)
htmlmaker.table = {};
$(function()
{
htmlmaker.table.make = function(){
var table = '
';
return table;
};
htmlmaker.table.makeRow = function(rowIndex, colCount){
var row = '';
for(var i = 0; i < colCount; i++) {
row += ' | ';
}
row += '
';
return row;
};
htmlmaker.table.makeMergeRow = function(rowIndex, colCount){
var row = '';
row += ' | ';
row += '
';
return row;
};
htmlmaker.table.makeZebra = function(table){
var childrens = table.find('tbody').children();
childrens.removeClass('row_even');
childrens.removeClass('row_odd');
var rowClass = 'row_odd';
for(var i = 0; i < childrens.length; i++) {
var children = $(childrens[i]);
children.addClass(rowClass);
children.attr('id', 'tableRow_' + i);
if(rowClass === 'row_even'){
rowClass = 'row_odd'
}else{
rowClass = 'row_even'
}
}
};
});