Mercurial > libervia-web
comparison src/browser/sat_browser/list_manager.py @ 741:c3cb68227cca
browser_side: read and write tags from microblog data:
- not tested!
- implementation missing in quick_blog.Item and quick_blog.Entry
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 19 Nov 2015 17:20:37 +0100 |
parents | b6510fd9ae15 |
children | f8a7a046ff9c |
comparison
equal
deleted
inserted
replaced
740:b6510fd9ae15 | 741:c3cb68227cca |
---|---|
481 TAGS = _("Tags") | 481 TAGS = _("Tags") |
482 | 482 |
483 STYLE = {"main": "tagsPanel-main", | 483 STYLE = {"main": "tagsPanel-main", |
484 "tags": "tagsPanel-tags"} | 484 "tags": "tagsPanel-tags"} |
485 | 485 |
486 def __init__(self, suggested_tags, tags): | 486 def __init__(self, suggested_tags, tags=None): |
487 """ | 487 """ |
488 | 488 |
489 @param suggested_tags (list[unicode]): list of all suggested tags | 489 @param suggested_tags (list[unicode]): list of all suggested tags |
490 @param tags (list[unicode]): already assigned tags | 490 @param tags (list[unicode]): already assigned tags |
491 """ | 491 """ |
492 base_panel.ToggleStackPanel.__init__(self, Width="100%") | 492 base_panel.ToggleStackPanel.__init__(self, Width="100%") |
493 self.addStyleName(self.STYLE["main"]) | 493 self.addStyleName(self.STYLE["main"]) |
494 | |
495 if tags is None: | |
496 tags = [] | |
497 | |
494 self.tags = ListPanel(quick_list_manager.QuickTagList(suggested_tags), tags) | 498 self.tags = ListPanel(quick_list_manager.QuickTagList(suggested_tags), tags) |
495 self.tags.addStyleName(self.STYLE["tags"]) | 499 self.tags.addStyleName(self.STYLE["tags"]) |
496 self.tags.ACCEPT_NEW_ENTRY = True | 500 self.tags.ACCEPT_NEW_ENTRY = True |
497 self.add(self.tags, self.TAGS) | 501 self.add(self.tags, self.TAGS) |
498 self.addStackChangeListener(self) | 502 self.addStackChangeListener(self) |