예제 #1
0
 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
예제 #2
0
파일: Jackdaw.py 프로젝트: gbourgh/edna
 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
예제 #3
0
 def renderTitle(self):
     """Return the HTML code for the tab title"""
     return Canary.makeToolTip(self.__title, self.__help_text)
예제 #4
0
파일: Jackdaw.py 프로젝트: gbourgh/edna
 def renderTitle(self):
     """Return the HTML code for the tab title"""
     return Canary.makeToolTip(self.__title, self.__help_text)