本文整理汇总了Python中pyasm.common.Container.clear_seq方法的典型用法代码示例。如果您正苦于以下问题:Python Container.clear_seq方法的具体用法?Python Container.clear_seq怎么用?Python Container.clear_seq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.common.Container
的用法示例。
在下文中一共展示了Container.clear_seq方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_display
# 需要导入模块: from pyasm.common import Container [as 别名]
# 或者: from pyasm.common.Container import clear_seq [as 别名]
#.........这里部分代码省略.........
my.mode = my.kwargs.get("mode")
if not my.mode:
my.mode = 'view'
my.default = my.kwargs.get('default') == 'True'
div = DivWdg()
div.add_class("spt_section_top")
div.set_attr("SPT_ACCEPT_DROP", "manageSideBar")
# create the top widgets
label = SpanWdg()
label.add(title)
label.add_style("font-size: 1.1em")
section_div = LabeledHidableWdg(label=label)
div.add(section_div)
section_div.set_attr('spt_class_name', Common.get_full_class_name(my))
for name, value in my.kwargs.items():
if name == "config":
continue
section_div.set_attr("spt_%s" % name, value)
bgcolor = label.get_color("background3")
project_div = RoundedCornerDivWdg(hex_color_code=bgcolor,corner_size="10")
project_div.set_dimensions( width_str='%spx' % width, content_height_str='100px' )
content_div = project_div.get_content_wdg()
#project_div = DivWdg()
#content_div = project_div
section_div.add( project_div )
content_div.add_class("spt_side_bar_content")
content_div.add_attr("spt_view", view)
if type(view) in types.StringTypes:
view = [view]
view_margin_top = '4px'
web = WebContainer.get_web()
for viewx in view:
config = my.get_config(my.config_search_type, viewx, default=my.default)
if not config:
continue
# make up a title
title = DivWdg()
title.add_gradient( "background", "side_bar_title", 0, -15, default="background" )
title.add_color( "color", "side_bar_title_color", default="color" )
title.add_styles( "margin-top: %s; margin-bottom: 3px; vertical-align: middle" % view_margin_top )
if not web.is_IE():
title.add_styles( "margin-left: -5px; margin-right: -5px;")
title.add_looks( "navmenu_header" )
title.add_style( "height: 18px" )
title.add_style( "padding-top: 2px" )
"""
title = DivWdg()
title.add_styles( "margin-top: %s; margin-bottom: 3px; vertical-align: middle" % view_margin_top )
if not web.is_IE():
title.add_styles( "margin-left: -10px; margin-right: -10px;")
title.add_looks( "navmenu_header" )
"""
# FIXME: not sure if this logic should be here. It basically
# makes special titles for certain view names
view_attrs = config.get_view_attributes()
title_str = view_attrs.get("title")
if not title_str:
if viewx.startswith("my_view_"):
title_str = "My Views"
else:
title_str = viewx
title_str = Common.get_display_title(title_str)
title_label = SpanWdg()
title_label.add_styles( "margin-left: 6px; padding-bottom: 2px;" )
title_label.add_looks( "fnt_title_5 fnt_bold" )
title_label.add( title_str )
title.add( title_label )
content_div.add( title )
info = { 'counter' : 10, 'view': viewx }
my.generate_section( config, content_div, info )
error_list = Container.get_seq(my.ERR_MSG)
if error_list:
span = SpanWdg()
span.add_style('background', 'red')
span.add('<br/>'.join(error_list))
content_div.add(span)
Container.clear_seq(my.ERR_MSG)
my.add_dummy(config, content_div)
return div