def renderContent(self): """Generate a HTML version of the section""" # Construct the "open" view content = "<div id='" + self.openId() + "' " content += "style='display: " + self.__open_state + ";'>\n" content += "<span class=\"control close_control\">" content += "<a href=\"javascript://\" " content += "onclick=\"toggleElements('" + self.openId() + "'," content += "'" + self.closedId() + "');\">" content += Canary.makeToolTip(self.__close_link_text, self.__close_link_help_text) content += "</a></span>\n" # Add the content for the open view for element in self.__contents: try: content += element.render() except AttributeError: # Assume there is no render method, try str instead content += str(element) content += "</div>\n" # Construct the "closed" view content += "<div id='" + self.closedId() + "' " content += "style='display: " + self.__closed_state + ";'>\n" content += "<span class=\"control open_control\">" content += "<a href=\"javascript://\" " content += "onclick=\"toggleElements('" + self.openId() + "'," content += "'" + self.closedId() + "');\">" content += Canary.makeToolTip(self.__open_link_text, self.__open_link_help_text) content += "</a></span>\n" content += "</div>\n" # Return the HTML code return content
def renderContent(self): """Generate a HTML version of the section""" # Construct the "open" view content = "<div id='" + self.openId() + "' " content += "style='display: " + self.__open_state + ";'>\n" content += '<span class="control close_control">' content += '<a href="javascript://" ' content += "onclick=\"toggleElements('" + self.openId() + "'," content += "'" + self.closedId() + "');\">" content += Canary.makeToolTip(self.__close_link_text, self.__close_link_help_text) content += "</a></span>\n" # Add the content for the open view for element in self.__contents: try: content += element.render() except AttributeError: # Assume there is no render method, try str instead content += str(element) content += "</div>\n" # Construct the "closed" view content += "<div id='" + self.closedId() + "' " content += "style='display: " + self.__closed_state + ";'>\n" content += '<span class="control open_control">' content += '<a href="javascript://" ' content += "onclick=\"toggleElements('" + self.openId() + "'," content += "'" + self.closedId() + "');\">" content += Canary.makeToolTip(self.__open_link_text, self.__open_link_help_text) content += "</a></span>\n" content += "</div>\n" # Return the HTML code return content
def renderTitle(self): """Return the HTML code for the tab title""" return Canary.makeToolTip(self.__title, self.__help_text)