Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String EnumerateTableData(TableHeader Th, LinkedList<TableRow> T)
- {
- String toReturn = "";
- if(Th.FormAction != null) toReturn += "<form id='mainform' action='" + Th.FormAction + "'>";
- toReturn += "<table border='0' width='100%' cellpadding='0' cellspacing='0' id='table'><tr>";
- if(Th.Checkbox == true) toReturn += "<th class='table-header-check'><a id='toggle-all'></a></th>";
- for(String Value : Th.Fields)
- {
- toReturn += "<th class='table-header-repeat line-left minwidth-1'><a href=''>" + Value + "</a></th>";
- }
- toReturn += "</tr><tr>";
- int RowId = 0;
- for(TableRow Row : T)
- {
- if(Th.Checkbox) toReturn += "<td><input type='checkbox' name='" + Row.Values[0] + "'></td>";
- toReturn += "<tr>";
- for(String Value : Row.Values)
- {
- toReturn += "<td>" + Value + "</td>";
- }
- toReturn += "</tr>";
- if(Th.Options)
- {
- toReturn += "<tr><td class='options-width'>";
- for(int i = 0; i <= Row.OptionsGraphics.length; i++)
- {
- toReturn += "<a href='"+Row.OptionsHref[i]+"' class='";
- switch(Row.OptionsGraphics[i])
- {
- case Gear:
- toReturn += "icon-1";
- break;
- case Star:
- toReturn += "icon-3";
- break;
- case Buy:
- toReturn += "icon-4";
- break;
- case Check:
- toReturn += "icon-5";
- break;
- case X:
- toReturn += "icon-2";
- break;
- }
- toReturn += " info-tooltip'></a>";
- }
- toReturn += "</td>";
- }
- toReturn += "</tr>";
- }
- toReturn += "</table>";
- return toReturn;
Add Comment
Please, Sign In to add comment