本文整理汇总了Python中pyasm.web.Table.close_tbody方法的典型用法代码示例。如果您正苦于以下问题:Python Table.close_tbody方法的具体用法?Python Table.close_tbody怎么用?Python Table.close_tbody使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.web.Table
的用法示例。
在下文中一共展示了Table.close_tbody方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_display
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import close_tbody [as 别名]
#.........这里部分代码省略.........
spt.show(elements[i]);
else
spt.hide(elements[i]);
}
var elements = top.getElements(".spt_scan_script");
for (var i = 0; i < elements.length; i++) {
if (value == 'script')
spt.show(elements[i]);
else
spt.hide(elements[i]);
}
'''
} )
# add in a list of stuff
tbody = table.add_tbody()
tbody.add_class("spt_scan_list")
if scan_type != 'list':
tbody.add_style("display: none")
tr = table.add_row()
td = table.add_cell()
td.add("List of files: ")
td = table.add_cell()
text = TextAreaWdg(name="file_list")
td.add(text)
text.add_style("width: 400px")
#text.set_readonly()
#text.add_color("background", "background", -10)
text.set_value(file_list)
table.close_tbody()
# add rule scan mode
tbody = table.add_tbody()
tbody.add_class("spt_scan_rule")
if scan_type != 'rule':
tbody.add_style("display: none")
# add the path
tr = table.add_row()
td = table.add_cell()
td.add("Starting Path: ")
td = table.add_cell()
hidden = HiddenWdg("session_code", session.get_code() )
td.add(hidden)
text = TextInputWdg(name="base_dir")
td.add(text)
text.set_value(base_dir)
text.add_style("width: 400px")
#text.set_readonly()
#text.add_color("background", "background", -10)
text.set_value(base_dir)
# add rule
tr = table.add_row()
示例2: get_display
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import close_tbody [as 别名]
#.........这里部分代码省略.........
# extra info for foreign key
custom_table.add_row()
div = DivWdg()
div.add_class("foreign_key_options")
div.add_style("display: none")
div.add_style("margin-top: 10px")
div.add("Options")
div.add(HtmlElement.br())
# extra info for foreign key
custom_table.add_row()
div = DivWdg()
div.add_class("foreign_key_options")
div.add_style("display: none")
div.add_style("margin-top: 10px")
div.add("Options")
div.add(HtmlElement.br())
# TODO: this class should not be in prod!!
from pyasm.prod.web import SearchTypeSelectWdg
div.add("Relate to: ")
search_type_select = SearchTypeSelectWdg("foreign_key_search_select", mode=SearchTypeSelectWdg.CURRENT_PROJECT)
div.add(search_type_select)
td.add(div)
# extra info for list
custom_table.add_row()
div = DivWdg()
div.add_class("list_options")
div.add_style("display: none")
div.add_style("margin-top: 10px")
div.add("Options")
div.add(HtmlElement.br())
# TODO: this class should not be in prod!!
from pyasm.prod.web import SearchTypeSelectWdg
div.add("Values: ")
search_type_text = TextWdg("list_values")
div.add(search_type_text)
td.add(div)
# extra info for button
custom_table.add_row()
div = DivWdg()
div.add_style("color: black")
div.add_class("button_options")
div.add_style("display: none")
div.add_style("margin-top: 10px")
#class_path = "tactic.ui.table.ButtonElementWdg"
class_path = display_handler
button = Common.create_from_class_path(class_path)
args_keys = button.get_args_keys()
div.add("Options")
div.add(HtmlElement.br())
for key in args_keys.keys():
option_name_text = HiddenWdg("option_name")
option_name_text.set_value(key)
div.add(option_name_text)
div.add("%s: " % key)
div.add(" ")
input = button.get_input_by_arg_key(key)
value = display_options.get(key)
if value:
input.set_value(value)
div.add(input)
div.add(HtmlElement.br())
td.add(div)
# is searchable checkbox
#custom_table.add_row()
#current_searchable_wdg = CheckboxWdg("is_searchable")
#current_view_wdg.set_checked()
#custom_table.add_cell("Searchable? ")
#td = custom_table.add_cell(current_searchable_wdg)
custom_table.close_tbody()
return top_wdg