当前位置: 首页>>代码示例>>Python>>正文


Python ActionButtonWdg.add_event方法代码示例

本文整理汇总了Python中tactic.ui.widget.ActionButtonWdg.add_event方法的典型用法代码示例。如果您正苦于以下问题:Python ActionButtonWdg.add_event方法的具体用法?Python ActionButtonWdg.add_event怎么用?Python ActionButtonWdg.add_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tactic.ui.widget.ActionButtonWdg的用法示例。


在下文中一共展示了ActionButtonWdg.add_event方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_advanced_definition_wdg

# 需要导入模块: from tactic.ui.widget import ActionButtonWdg [as 别名]
# 或者: from tactic.ui.widget.ActionButtonWdg import add_event [as 别名]
    def get_advanced_definition_wdg(self):
        # add the advanced entry
        advanced = DivWdg()
        advanced.add_style("margin-top: 10px")
        advanced.add_style("padding: 10px")
        advanced.add_border()
        title = DivWdg()
        title.add_style("color: black")
        title.add("Advanced - XML Column Definition")
        title.add_style("margin-top: -23")
        advanced.add(title)
        advanced.add("<br/>")

        input = TextAreaWdg("config_xml")
        input.set_id("config_xml")
        input.set_option("rows", "10")
        input.set_option("cols", "70")
        input.set_value(self.config_string)
        advanced.add(input)
        advanced.add(HtmlElement.br(2))

        button_div = DivWdg()
        button_div.add_style("text-align: center")
        

        button = ActionButtonWdg(title="Save Definition") 
        #button = ProdIconButtonWdg("Save Definition")
        button.add_event("onclick", "spt.custom_project.save_definition_cbk()")
        button_div.add(button)
        button_div.add_style("margin-left: 130px")
        advanced.add(button_div)

        return advanced
开发者ID:mincau,项目名称:TACTIC,代码行数:35,代码来源:search_type_manager_wdg.py

示例2: get_error_wdg

# 需要导入模块: from tactic.ui.widget import ActionButtonWdg [as 别名]
# 或者: from tactic.ui.widget.ActionButtonWdg import add_event [as 别名]
    def get_error_wdg(my):
        div = DivWdg()
        error_div = DivWdg()
        error_div.add("Error %s" % my.status)
        div.add(error_div)
        error_div.add_style("font-size: 18px")
        error_div.add_style("font-weight: bold")
        error_div.add_style("padding: 10px")
        error_div.add_style("width: auto")
        error_div.add_gradient("background", "background")
        error_div.add_border()
        error_div.add_style("margin-left: 5px")
        error_div.add_style("margin-right: 5px")
        error_div.add_style("margin-top: -10px")

        div.add("<br/>")


        span = DivWdg()
        #span.add_color("color", "color")
        span.add_style("color", "#FFF")
        if my.status == 404:
            span.add(HtmlElement.b("You have tried to access a url that is not recognized."))
        else:
            span.add(HtmlElement.b(my.message))
        span.add(HtmlElement.br(2))

        web = WebContainer.get_web()
        root = web.get_site_root()
        if my.message.startswith('No project ['):
            label = 'You may need to correct the default_project setting in the TACTIC config.'
        else:
            label = "Go to the Main page for a list of valid projects"
        span.add(label)
        div.add(span)
        div.add(HtmlElement.br())

        from tactic.ui.widget import ActionButtonWdg
        button_div = DivWdg()
        button_div.add_style("width: 90px")
        button_div.add_style("margin: 0px auto")

        div.add(button_div)
        button = ActionButtonWdg(title="Go to Main", tip='Click to go to main page')
        button_div.add(button)
        
        button.add_behavior( {
        'type': 'click_up',
        'cbjs_action': '''
        document.location = '/';
        '''
        } )
        button.add_event("onmouseup", "document.location='/'")

        return div
开发者ID:0-T-0,项目名称:TACTIC,代码行数:57,代码来源:error_wdg.py

示例3: get_display

# 需要导入模块: from tactic.ui.widget import ActionButtonWdg [as 别名]
# 或者: from tactic.ui.widget.ActionButtonWdg import add_event [as 别名]
    def get_display(my):

        web = WebContainer.get_web()
        login_name = web.get_form_value('login')
        hidden = HiddenWdg('login', login_name)
        box = DivWdg(css='login')

        if web.is_IE():
            box.add_style("margin-top: 150px")
            box.add_style("margin-bottom: 150px")
        else:
            box.add_style("margin-top: auto")
            box.add_style("margin-bottom: auto")
        box.add_style("text-align: center")
     
        div = DivWdg()
        div.add_style("margin: 0px 0px")
        div.add_class("centered")



        div.add_style("padding-top: 95px")


        sthpw = SpanWdg("SOUTHPAW TECHNOLOGY INC", css="login_sthpw")
        sthpw.add_style("color: #CCCCCC")
        div.add( sthpw )
        div.add( HtmlElement.br() )
        div.add(hidden)
        box.add(div)


        # hidden element in the form to pass message that this was not
        # actually a typical submitted form, but rather the result
        # of a login page
        div.add( HiddenWdg("is_from_login", "yes") )
        div.add_style("font-size: 10px")

        table = Table(css="login")
        table.center()
        table.set_attr("cellpadding", "3px")
        table.add_row()

    

        table2 = Table(css="login")
        table2.center()
        table2.add_style("width: 240px")

        table2.add_row()

        td = table2.add_header('After reset, the new password will be sent to the email address for [ %s ].'%login_name)
        td.add_color('color','color', + 80)
        table2.add_row_cell('&nbsp;')
        # build the button manually
        from tactic.ui.widget import ActionButtonWdg
        button = ActionButtonWdg(tip='Reset Password', title='Reset')
        button.add_style('margin: auto')
        button.add_event('onclick',"document.form.elements['reset_password'].value='true'; document.form.submit()")
        table2.add_row()
        td = table2.add_cell(button)
        hidden = HiddenWdg('reset_password')
        td.add(hidden)
       
        #th.add_class('center_content')
        
        table2.add_row()
    

        div.add(HtmlElement.br())
        div.add(table)

        div.add( HtmlElement.spacer_div(1,14) )
        div.add(table2)
        #div.add(HiddenWdg(my.LOGIN_MSG))

        #box.add(script)

        widget = Widget()
        #widget.add( HtmlElement.br(3) )
        table = Table()
        table.add_style("width: 100%")
        table.add_style("height: 85%")
        table.add_row()
        td = table.add_cell()
        td.add_style("vertical-align: middle")
        td.add_style("text-align: center")
        td.add_style("background: transparent")
        td.add(box)
        widget.add(table)
        
        return widget
开发者ID:CeltonMcGrath,项目名称:TACTIC,代码行数:94,代码来源:reset_password_wdg.py


注:本文中的tactic.ui.widget.ActionButtonWdg.add_event方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。