Mercurial > libervia-web
comparison src/browser/sat_browser/base_menu.py @ 690:76a67d04c63e
browser_side: improve comments for menus-related methods
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 09 Apr 2015 11:40:53 +0200 |
parents | 9877607c719a |
children | f8a7a046ff9c |
comparison
equal
deleted
inserted
replaced
689:a6adefddcb0a | 690:76a67d04c63e |
---|---|
103 @classmethod | 103 @classmethod |
104 def getCategoryHTML(cls, category): | 104 def getCategoryHTML(cls, category): |
105 """Build the html to be used for displaying a category item. | 105 """Build the html to be used for displaying a category item. |
106 | 106 |
107 Inheriting classes may overwrite this method. | 107 Inheriting classes may overwrite this method. |
108 @param category(quick_menus.MenuCategory): category to add | 108 @param category (quick_menus.MenuCategory): category to add |
109 @return(unicode): HTML to display | 109 @return unicode: HTML to display |
110 """ | 110 """ |
111 return html_tools.html_sanitize(category.name) | 111 return html_tools.html_sanitize(category.name) |
112 | 112 |
113 def _buildMenus(self, container, flat_level, caller=None): | 113 def _buildMenus(self, container, flat_level, caller=None): |
114 """Recursively build menus of the container | 114 """Recursively build menus of the container |
162 pass | 162 pass |
163 | 163 |
164 def addCategory(self, category, menu_bar=None, flat=False): | 164 def addCategory(self, category, menu_bar=None, flat=False): |
165 """Add a new category. | 165 """Add a new category. |
166 | 166 |
167 @param menu_container(quick_menus.MenuCategory): Category to add | 167 @param category (quick_menus.MenuCategory): category to add |
168 @param menu_bar (GenericMenuBar): instance to popup as the category sub-menu. | 168 @param menu_bar (GenericMenuBar): instance to popup as the category sub-menu. |
169 """ | 169 """ |
170 html = self.getCategoryHTML(category) | 170 html = self.getCategoryHTML(category) |
171 | 171 |
172 if menu_bar is not None: | 172 if menu_bar is not None: |