def getFilterScripts(self, pageColours): finder = ColourFinder(self.getConfigValue) rowHeaderColour = finder.find("row_header_bg") successColour = finder.find("success_bg") # Always put green at the start, we often want to filter that sortedColours = sorted(pageColours, key=lambda c: (c != successColour, c)) scriptCode = "var TEST_ROW_HEADER_COLOR = " + repr(rowHeaderColour) + ";\n" + \ "var Colors = " + repr(sortedColours) + ";" return [ HTMLgen.Script(code=scriptCode), HTMLgen.Script(src="../javascript/jquery.js"), HTMLgen.Script(src="../javascript/filter.js"), HTMLgen.Script(src="../javascript/comment.js") ]
def writeCommentListPage(self): filename = os.path.join(self.pageDir, "commentlist.html") plugins.log.info("Writing comment html page at " + filename + "...") doc = HTMLgen.SimpleDocument( title="All Comments", stylesheet="../javascript/commentliststyle.css", xhtml=True, meta='<meta charset="' + locale.getpreferredencoding() + '">') for scriptFile in ["jquery.js", "comment.js", "commentlist.js"]: doc.append(HTMLgen.Script(src="../javascript/" + scriptFile)) doc.write(filename)