1 31 32 package org.opencms.workplace.list; 33 34 import org.opencms.util.CmsResourceUtil; 35 import org.opencms.util.CmsStringUtil; 36 import org.opencms.workplace.CmsWorkplace; 37 38 47 public class CmsListExplorerColumn extends CmsListColumnDefinition { 48 49 54 public CmsListExplorerColumn(String id) { 55 56 super(id); 57 } 58 59 62 public String htmlCell(CmsListItem item, CmsWorkplace wp, boolean isPrintable) { 63 64 if (isPrintable) { 65 return super.htmlCell(item, wp, isPrintable); 66 } 67 CmsResourceUtil resUtil = ((A_CmsListExplorerDialog)wp).getResourceUtil(item); 68 StringBuffer html = new StringBuffer (128); 69 html.append("<table cellpadding='0' cellspacing='0' border='0'><tr><td class='"); 70 html.append(resUtil.getStyleClassName()); 71 if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(resUtil.getStyleRange())) { 72 html.append(" ' style='"); 73 html.append(resUtil.getStyleRange()); 74 html.append("'"); 75 } 76 html.append("'>"); 77 html.append(super.htmlCell(item, wp, isPrintable)); 78 html.append("</td></tr></table>"); 79 return html.toString(); 80 } 81 82 87 public static String getExplorerStyleDef() { 88 89 StringBuffer result = new StringBuffer (256); 90 result.append("<style type='text/css'>\n"); 91 result.append(".fc, .fc .link a { color: #b40000; }\n"); 92 result.append(".fn, .fn .link a { color: #0000aa; }\n"); 93 result.append(".fd, .fd .link a { color: #000000; text-decoration: line-through; }\n"); 94 result.append(".fp, .fp .link a { color: #888888; }\n"); 95 result.append(".nf, .nf .link a { color:#000000; }\n"); 96 result.append("</style>"); 97 return result.toString(); 98 } 99 } 100 | Popular Tags |