*
* @return the list of HEAD elements for the Table
*/
@Override
public List<Element> getHeadElements() {
Context context = getContext();
String versionIndicator = ClickUtils.getResourceVersionIndicator(context);
if (headElements == null) {
headElements = super.getHeadElements();
headElements.add(new CssImport("/click/table.css", versionIndicator));
headElements.addAll(getControlLink().getHeadElements());
}
String tableId = getId();
CssStyle cssStyle = new CssStyle();
cssStyle.setId(tableId + "_css_setup");
if (!headElements.contains(cssStyle)) {
boolean isDarkStyle = isDarkStyle();
String contextPath = context.getRequest().getContextPath();
HtmlStringBuffer buffer = new HtmlStringBuffer(300);
buffer.append("th.sortable a {\n");
buffer.append("background: url(");
buffer.append(contextPath);
buffer.append("/click/column-sortable-");