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


Python DivWdg.set_round_corners方法代码示例

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


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

示例1: get_section_wdg

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_section_wdg(my, title, description, image, behavior):

        section_wdg = DivWdg()
        section_wdg.set_round_corners()
        section_wdg.add_border()
        section_wdg.add_class("spt_report_top")
        section_wdg.add_style("width: 200px")
        section_wdg.add_style("height: 100px")
        section_wdg.add_style("overflow: hidden")
        section_wdg.add_style("margin: 10px")
        section_wdg.set_box_shadow("0px 0px 10px")

        title_wdg = DivWdg()
        section_wdg.add(title_wdg)
        title_wdg.add(title)
        title_wdg.add_style("height: 20px")
        title_wdg.add_style("padding: 3px")
        title_wdg.add_style("margin-top: 3px")
        title_wdg.add_style("font-weight: bold")
        title_wdg.add_gradient("background", "background")


        button = IconButtonWdg(title="Options", icon=IconWdg.ARROWHEAD_DARK_DOWN)
        title_wdg.add(button)
        button.add_style("float: right")

        # set up menus
        menu = my.get_menu()
        SmartMenu.add_smart_menu_set( button, { 'MENU_ITEM': menu } )
        SmartMenu.assign_as_local_activator( button, "MENU_ITEM", True )


        section_wdg.add_color("background", "background")
        #section_wdg.add_gradient("background", "background", 0, -3)
        section_wdg.add_behavior( {
        'type': 'hover',
        'add_color_modifier': -5,
        'cb_set_prefix': 'spt.mouse.table_layout_hover',
        } )

        desc_div = DivWdg()
        desc_div.add(description)
        desc_div.add_style("padding: 5px 10px 10px 5px")


        div = DivWdg()
        section_wdg.add(div)
        div.add_style("padding: 3px")
        div.add_style("margin: 5px")
        div.add_style("width: 65px")
        div.add_style("height: 50px")
        div.add_style("float: left")
        div.add(image)
        section_wdg.add(desc_div)
        div.add_style("overflow: hidden")

        section_wdg.add_behavior( behavior )
        section_wdg.add_class("hand")

        return section_wdg
开发者ID:0-T-0,项目名称:TACTIC,代码行数:62,代码来源:reports_wdg.py

示例2: get_info_wdg

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_info_wdg(my, sobject):

        div = DivWdg()
        div.add_style("margin: 10px 20px 20px 20px")
        div.add_style("padding: 20px")
        div.add_color("background", "background", -3)
        div.add_border()
        div.add_color("color", "color3")
        div.set_round_corners(5)

        div.add_style("height", "100%")
        div.add_style("position: relative")

        element_names = my.kwargs.get("element_names")
        if not element_names:
            element_names = ["code","name","description",]
        else:
            element_names = element_names.split(",")


        view = "table"

        from pyasm.widget import WidgetConfigView
        search_type = sobject.get_search_type()
        config = WidgetConfigView.get_by_search_type(search_type, view)


        table = Table()
        table.add_style("height", "100%")
        div.add(table)
        for element_name in element_names:
            table.add_row()
            title = Common.get_display_title(element_name)
            td = table.add_cell("%s: " % title)
            td.add_style("width: 200px")
            td.add_style("padding: 5px")


            element = config.get_display_widget(element_name)
            element.set_sobject(sobject)
            element.preprocess()
            td = table.add_cell(element)
            td.add_style("padding: 5px")
            #value = sobject.get_value(element_name, no_exception=True) or "N/A"
            #table.add_cell(value)

        div.add("<br/>")
        from tactic.ui.widget import DiscussionWdg
        search_key = sobject.get_search_key()
        notes_wdg = DiscussionWdg(search_key=search_key)
        notes_wdg.set_sobject(sobject)
        div.add(notes_wdg)

        return div
开发者ID:nuxping,项目名称:TACTIC,代码行数:56,代码来源:tool_layout_wdg.py

示例3: get_section_wdg2

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_section_wdg2(self, title, description, image, behavior):

        section_wdg = DivWdg()
        section_wdg.set_round_corners()
        section_wdg.add_border()
        section_wdg.add_style("width: 200px")
        section_wdg.add_style("height: 175px")
        section_wdg.add_style("overflow: hidden")
        section_wdg.add_style("margin: 10px")
        section_wdg.set_box_shadow("1px 1px 1px 1px")

        title_wdg = DivWdg()
        section_wdg.add(title_wdg)
        title_wdg.add(title)
        title_wdg.add_style("height: 20px")
        title_wdg.add_style("padding: 3px")
        title_wdg.add_style("margin-top: 3px")
        title_wdg.add_style("font-weight: bold")
        title_wdg.add_gradient("background", "background")

        section_wdg.add_color("background", "background")
        section_wdg.add_behavior( {
        'type': 'hover',
        'add_color_modifier': -5,
        'cb_set_prefix': 'spt.mouse.table_layout_hover',
        } )

        desc_div = DivWdg()
        desc_div.add(description)
        desc_div.add_style("padding: 0px 10px 10px 5px")


        div = DivWdg()
        section_wdg.add(div)
        div.add_style("padding: 3px")
        div.add_style("margin: 5px")
        #div.add_style("width: 210px")
        #div.add_style("height: 170px")
        div.add_style("width: 105px")
        div.add_style("height: 85px")
        div.add(image)



        section_wdg.add(desc_div)
        div.add_style("overflow: hidden")

        section_wdg.add_behavior( behavior )
        section_wdg.add_class("hand")

        return section_wdg
开发者ID:mincau,项目名称:TACTIC,代码行数:53,代码来源:home_wdg.py

示例4: get_row_wdgXX

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_row_wdgXX(my, buttons, show_title=False):

        top = DivWdg()
        #top.add_style("-moz-transform: scale(1.0)")
        top.add_style("float: left")
        top.add_style("margin-left: 3px")
        top.add_style("margin-right: 3px")

        if show_title:
            top.add_style("height: 29px")
        else:
            top.add_style("height: 23px")
        top.add_style("height: 33px")

        left = DivWdg()
        left.set_round_corners(20)
        #left.add_style("-moz-border-radius-topleft: 20px")
        #left.add_style("-moz-border-radius-bottomleft: 20px")
        left.add_border()
        left.add_gradient("background", "background", 20, -35)
        #left.add_style("background: black")
        left.add_style("float: left")
        left.add_style("height: 100%")
        left.add_style("width: 5px")
        left.add_style("z-index: 0")
        left.add_style("margin-right: -1")
        top.add(left)

        for button in buttons:
            button.add_style("float: left")
            top.add(button)


        right = DivWdg()
        right.add_style("-moz-border-radius-topright: 20px")
        right.add_style("-moz-border-radius-bottomright: 20px")
        right.add_gradient("background", "background", 20, -35)
        #right.add_style("background: black")
        right.add_style("float: left")
        right.add_style("height: 100%")
        right.add_style("width: 5px")
        #right.add_style("margin-left: -1px")
        right.add_style("z-index: 0")
        right.add_style("border-style: solid")
        right.add_style("border-color: %s" % right.get_color("border") )
        right.add_style("border-width: 1 1 1 0")
        top.add(right)


        return top
开发者ID:0-T-0,项目名称:TACTIC,代码行数:52,代码来源:button_new_wdg.py

示例5: get_small_section_wdg

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_small_section_wdg(my, title, description, image, behavior):

        section_wdg = DivWdg()
        section_wdg.set_round_corners()
        section_wdg.add_border()
        section_wdg.add_style("width: 225px")
        section_wdg.add_style("height: 100px")
        section_wdg.add_style("overflow: hidden")
        section_wdg.add_style("margin: 10px")
        section_wdg.set_box_shadow("0px 0px 5px")

        title_wdg = DivWdg()
        section_wdg.add(title_wdg)
        title_wdg.add(title)
        title_wdg.add_style("height: 20px")
        title_wdg.add_style("padding: 3px")
        title_wdg.add_style("margin-top: 3px")
        title_wdg.add_style("font-weight: bold")
        title_wdg.add_gradient("background", "background")

        section_wdg.add_color("background", "background")
        #section_wdg.add_gradient("background", "background", 0, -3)
        section_wdg.add_behavior( {
        'type': 'hover',
        'add_color_modifier': -5,
        'cb_set_prefix': 'spt.mouse.table_layout_hover',
        } )

        desc_div = DivWdg()
        desc_div.add(description)
        desc_div.add_style("padding: 5px 10px 10px 5px")


        div = DivWdg()
        section_wdg.add(div)
        div.add_style("padding: 5px")
        div.add_style("margin: 5px")
        div.add_style("width: 65px")
        div.add_style("height: 50px")
        div.add_style("float: left")
	div.add_style("text-align: center")
        div.add(image)
        section_wdg.add(desc_div)
        div.add_style("overflow: hidden")

        section_wdg.add_behavior( behavior )
        section_wdg.add_class("hand")

        return section_wdg
开发者ID:asmboom,项目名称:TACTIC,代码行数:51,代码来源:main_wdg.py

示例6: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_display(my):

        msg = my.kwargs.get("message")

        arrow_div = DivWdg()
        icon = IconWdg(msg, IconWdg.ARROW_UP_LEFT_32)
        icon.add_style("margin-top: -20")
        icon.add_style("margin-left: -15")
        icon.add_style("position: absolute")
        arrow_div.add(icon)
        arrow_div.add("&nbsp;"*5)
        arrow_div.add("<b>%s</b>" % msg)
        arrow_div.add_style("position: relative")
        arrow_div.add_style("margin-top: 5px")
        arrow_div.add_style("margin-left: 20px")
        arrow_div.add_style("float: left")
        arrow_div.add_style("padding: 25px")
        arrow_div.set_box_shadow("1px 1px 2px 2px")
        arrow_div.set_round_corners(30)
        arrow_div.add_color("background", "background")
        return arrow_div
开发者ID:0-T-0,项目名称:TACTIC,代码行数:23,代码来源:misc_wdg.py

示例7: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_display(my):


        search = Search("sthpw/login")
        logins = search.get_sobjects()

        top = my.top
        top.add_class("spt_panel_user_top")
        top.add_style("min-width: 400px")

        button = SingleButtonWdg(title="Advanced Security", icon=IconWdg.LOCK)
        top.add(button)
        button.add_style("float: right")
        button.add_style("margin-top: -8px")
        button.add_behavior( {
            'type': 'click_up',
            'cbjs_action': '''
            var class_name = 'tactic.ui.startup.SecurityWdg';
            spt.tab.set_main_body_tab()
            spt.tab.add_new("Security", "Security", class_name)
            '''
        } )



        button = SingleButtonWdg(title="Add", tip="Add New User", icon=IconWdg.ADD)
        top.add(button)
        button.add_style("float: left")
        button.add_style("margin-top: -8px")
        top.add("<br clear='all'/>")
        button.add_behavior( {
            'type': 'click_up',
            'cbjs_action': '''
            var class_name = 'tactic.ui.panel.EditWdg';
            var kwargs = {
                search_type: "sthpw/login",
                view: "edit",
            }
            var popup = spt.panel.load_popup("Create New User", class_name, kwargs);
            var top = bvr.src_el.getParent(".spt_panel_user_top");
            popup.on_save_cbk = function() {
                spt.panel.refresh(top);
            }

            '''
        } )




        #logins = []
        if not logins:
            arrow_div = DivWdg()
            top.add(arrow_div)
            arrow_div.add("<b><<< Click to Add</b>")
            arrow_div.add_style("position: relative")
            arrow_div.add_style("margin-top: -35px")
            arrow_div.add_style("margin-left: 35px")
            arrow_div.add_style("float: left")
            arrow_div.add_style("padding: 5px")
            arrow_div.set_box_shadow("1px 1px 2px 2px")
            arrow_div.set_round_corners(10, corners=['TL','BL'])

            div = DivWdg()
            top.add(div)
            div.add_border()
            div.add_style("min-height: 180px")
            div.add_style("margin: 15px 30px 30px 30px")
            div.add_style("padding: 20px")
            div.add_color("background", "background3")
            icon = IconWdg( "WARNING", IconWdg.WARNING )
            div.add(icon)
            div.add("<b>No users have been added</b>")
            div.add("<br/><br/>")
            div.add("For more information, read the help docs: ")
            from tactic.ui.app import HelpButtonWdg
            help = HelpButtonWdg(alias=my.get_help_alias())
            div.add(help)
            div.add("<br/>")
            div.add("Click on the 'Add' button above to start adding new users.")

            return top




        div = DivWdg()
        top.add(div)
        #div.add_style("max-height: 300px")
        #div.add_style("overflow-y: auto")


        table = Table()
        table.set_max_width()
        table.add_style("margin-top: 10px")
        div.add(table)


        # group mouse over
        table.add_relay_behavior( {
#.........这里部分代码省略.........
开发者ID:funic,项目名称:TACTIC,代码行数:103,代码来源:project_config_wdg.py

示例8: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]

#.........这里部分代码省略.........
        var kwargs = {
	    'view': 'table',
            'search_type': 'config/widget_config',
            help_alias: 'tactic-widgets'
	};
        spt.tab.add_new("widget_config", "Widget Config", class_name, kwargs);
        '''
        }

        config_wdg = my.get_small_section_wdg(title, description, image, behavior)
        td.add(config_wdg)



        # Quicklinks

        tr, td = table.add_row_cell()
        td.add_style("font-size: 14px")
        td.add("<br/>")


        div = DivWdg()
        title = DivWdg()
        div.add(title)
        div.add_color("background", "background")
        div.add_style("margin: 0px 10px 15px 10px")


        title.add("Quick Links")
        title.add_style("font-size: 16px")
        title.add_style("padding: 5px")
        title.add_gradient("background", "background")
        title.add_border()
        title.set_round_corners(corners=['TL','TR'])

        content_wdg = DivWdg()
        div.add(content_wdg)
        content_wdg.add_border()
        content_wdg.add_style("padding: 20px")

        content_wdg.add("<div style='font-size: 12px'>The following links will help you find out more information on how to set up or use TACTIC.</div>")
        content_wdg.add("<hr/>")

        hover = title.get_color("background", -10)


        link_div = DivWdg()
        link_div.add_style("padding: 10px")
        content_wdg.add(link_div)
        icon = IconWdg("TACTIC Documentation", IconWdg.JUMP)
        link_div.add(icon)

        link = HtmlElement.href("TACTIC Documentation", "/doc/", target="_blank")
        link.add_behavior( {
            'type': 'click_up',
            'cbjs_action': '''
            spt.help.set_top();
            spt.help.load_alias("main");
            '''
        } )

        link.add_behavior( {
        'type': 'hover',
        'color': hover,
        'cbjs_action_over': '''
        bvr.src_el.setStyle("background", bvr.color);
开发者ID:blezek,项目名称:TACTIC,代码行数:70,代码来源:project_start_wdg.py

示例9: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_display(my):

        top = my.top

        #help_div = DivWdg()
        help_div = top
        #top.add(help_div)
        help_div.add_class("spt_help_top")
        help_div.set_id("spt_help_top")

        show_title = my.kwargs.get("show_title")
        if show_title in [True, 'true']:
            show_title = True
        else:
            show_title = False

        if show_title:
            title_wdg = DivWdg()
            help_div.add(title_wdg)
            title_wdg.add_style("font-size: 12px")
            title_wdg.add_style("font-weight: bold")
            title_wdg.add_color("background", "background", -10)
            title_wdg.add_style("padding: 3px")
            #title_wdg.add_style("margin-top: 8px")
            title_wdg.add_style("margin-bottom: 5px")
            title_wdg.add_style("height: 26px")
            title_wdg.add_style("padding: 6 0 0 6")
            title_wdg.set_round_corners(corners=['TL','TR'])

            icon = IconWdg("Close", IconWdg.KILL)
            title_wdg.add(icon)
            icon.add_style("float: right")
            title_wdg.add("Help")



        help_div.set_round_corners()
        help_div.add_color("color", "color2")
        help_div.add_color("background", "background")
        help_div.add_style("overflow: hidden")
        help_div.add_border()



        shelf_div = DivWdg()
        help_div.add(shelf_div)
        shelf_div.add_style("padding: 10px")
        shelf_div.add_color("background", "background", -10)
        shelf_div.add_style("height: 25px")


        #button = SingleButtonWdg(title="Documentation Main Page", icon=IconWdg.HOME)
        button = IconButtonWdg(title="Documentation Main Page", icon="BS_HOME")
        shelf_div.add(button)
        button.add_style("float: left")
        button.add_style("margin: 0px 10px")
        button.add_behavior( {
        'type': 'click_up',
        'cbjs_action': '''
        spt.help.set_top();
        spt.help.load_alias("main")
        '''
        } )




        #button = SingleButtonWdg(title="Edit Help", icon=IconWdg.EDIT)
        if my.show_add_new:
            button = IconButtonWdg(title="Add New Help", icon="BS_EDIT")
            shelf_div.add(button)
            button.add_style("float: left")
            button.add_style("margin: 0px 10px")
            button.add_behavior( {
            'type': 'click_up',
            'cbjs_action': '''
            spt.tab.set_main_body_tab();
            var class_name = 'tactic.ui.app.HelpEditWdg';

            var element_name = spt.help.get_view();
            if (!element_name) {
              element_name = "default";
            }
            var kwargs = {
              view: element_name
            }

            spt.tab.add_new("help_edit", "Help Edit", class_name, kwargs);
                
            '''
            } )



        #button = SingleButtonWdg(title="Go Back One Page", icon=IconWdg.ARROW_LEFT)
        button = IconButtonWdg(title="Go Back One Page", icon="BS_CIRCLE_ARROW_LEFT")
        shelf_div.add(button)
        button.add_style("float: left")
        button.add_style("margin: 0px 10px")
        button.add_behavior( {
#.........这里部分代码省略.........
开发者ID:2gDigitalPost,项目名称:tactic_src,代码行数:103,代码来源:help_wdg.py

示例10: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_display(self):

        top = self.top
        top.add_style("position: absolute")
        top.add_style("top: 300")
        top.add_style("left: 600")
        top.add_style("display: none")
        top.set_id("spt_hot_box")
        top.add_style("margin: 0 auto")

        top.add_behavior( {
            'type': 'listen',
            'event_name': 'hotbox|toggle',
            'cbjs_action': '''
            var size = $(window).getSize();
            bvr.src_el.setStyle("left", size.x/2-300);
            bvr.src_el.setStyle("top", size.y/2-200);
            if (bvr.src_el.getStyle("display") == "none") {
                spt.show(bvr.src_el);
                spt.body.add_focus_element(bvr.src_el);
                spt.popup.show_background();
            }
            else {
                spt.hide(bvr.src_el);
                spt.popup.hide_background();
            }
            '''
        } )

        top.add_behavior( {
            'type': 'listen',
            'event_name': 'hotbox|close',
            'cbjs_action': '''
            spt.hide(bvr.src_el);
            spt.popup.hide_background();
            '''
        } )



        div = DivWdg()
        top.add(div)
        div.add_style("width: 630px")
        div.add_style("height: 400px")
        div.add_style("opacity: 0.8")
        div.add_gradient("background", "background3", 10)
        div.add_style("position: fixed")
        div.add_style("z-index: 1000")
        #div.set_box_shadow("2px 2px 4px 4px")
        div.set_box_shadow(color="#000")
        div.set_round_corners(25)
        div.add_border()

        content_top_wdg = DivWdg()
        content_top_wdg.add_style("position: fixed")
        top.add(content_top_wdg)
        content_top_wdg.add_style("padding: 20px 50px 50px 50px")
        content_top_wdg.add_style("z-index: 1001")
        content_top_wdg.add_style("width: 550px")
        content_top_wdg.add_style("height: 400px")


        close_wdg = DivWdg()
        content_top_wdg.add(close_wdg)
        icon = IconWdg('Close Quick Links', "BS_REMOVE")
        close_wdg.add(icon)
        #close_wdg.add_style("position: fixed")
        #close_wdg.add_style("float: right")
        close_wdg.add_style("position: absolute")
        close_wdg.add_style("top: 10px")
        close_wdg.add_style("right: 30px")
        close_wdg.add_behavior( {
            'type': 'click_up',
            'cbjs_action': '''
            spt.named_events.fire_event("hotbox|close");
            '''
        } )
        close_wdg.add_class("hand")

        content_wdg = self.get_content_wdg()
        content_top_wdg.add(content_wdg)

        return top
开发者ID:mincau,项目名称:TACTIC,代码行数:85,代码来源:quick_box_wdg.py

示例11: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]

#.........这里部分代码省略.........
        client_asset_dir = env.get_client_repo_dir()

        login = Environment.get_login()
        user_name = login.get_value("login")
        user_id = login.get_id()
        login_groups = Environment.get_group_names()


        # add environment information
        script = HtmlElement.script('''
        var env = spt.Environment.get();
        env.set_project('%s');
        env.set_user('%s');
        env.set_user_id('%s');
        var login_groups = '%s'.split('|');
        env.set_login_groups(login_groups);
        env.set_client_handoff_dir('%s');
        env.set_client_repo_dir('%s');

        ''' % (Project.get_project_code(), user_name, user_id, '|'.join(login_groups), client_handoff_dir,client_asset_dir))
        body.add(script)


        # add a global container for commonly used widgets
        div = DivWdg()
        body.add(div)
        div.set_id("global_container")

        # add in the app busy widget
        # find out if there is an override for this
        search = Search("config/url")
        search.add_filter("url", "/app_busy")
        url = search.get_sobject()
        if url:
            busy_div = DivWdg()
            div.add(busy_div)

            busy_div.add_class( "SPT_PUW" )
            busy_div.add_styles( "display: none; position: absolute; z-index: 1000" )

            busy_div.add_class("app_busy_msg_block")
            busy_div.add_style("width: 300px")
            busy_div.add_style("height: 100px")
            busy_div.add_style("padding: 20px")
            busy_div.add_color("background", "background3")
            busy_div.add_border()
            busy_div.set_box_shadow()
            busy_div.set_round_corners(20)
            busy_div.set_attr("id","app_busy_msg_block")



            # put the custom url here

            title_wdg = DivWdg()
            busy_div.add(title_wdg)
            title_wdg.add_style("font-size: 20px")
            title_wdg.add_class("spt_app_busy_title")
            busy_div.add("<hr/>")
            msg_div = DivWdg()
            busy_div.add(msg_div)
            msg_div.add_class("spt_app_busy_msg")
 

        else:
            from page_header_wdg import AppBusyWdg
            div.add( AppBusyWdg() )


        # popup parent
        popup = DivWdg()
        popup.set_id("popup")
        div.add(popup)

        # create another general popup
        popup_div = DivWdg()
        popup_div.set_id("popup_container")
        popup_div.add_class("spt_panel")
        popup = PopupWdg(id="popup_template",destroy_on_close=True)
        popup_div.add(popup)
        div.add(popup_div)


        # popup parent
        inner_html_div = DivWdg()
        inner_html_div.set_id("inner_html")
        div.add(inner_html_div)


        # add in a global color
        from tactic.ui.input import ColorWdg
        color = ColorWdg()
        div.add(color)

        # add in a global notify wdg
        from notify_wdg import NotifyWdg
        widget.add(NotifyWdg())


        return widget
开发者ID:blezek,项目名称:TACTIC,代码行数:104,代码来源:top_wdg.py

示例12: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_display(my):

        top = my.top
        top.add_style("position: absolute")
        top.add_style("top: 300")
        top.add_style("left: 600")
        top.add_style("display: none")
        top.set_id("spt_hot_box")
        top.add_style("margin: 0 auto")

        top.add_behavior( {
            'type': 'listen',
            'event_name': 'hotbox|toggle',
            'cbjs_action': '''
            var size = $(window).getSize();
            bvr.src_el.setStyle("left", size.x/2-300);
            bvr.src_el.setStyle("top", size.y/2-200);
            if (bvr.src_el.getStyle("display") == "none") {
                spt.show(bvr.src_el);
                spt.body.add_focus_element(bvr.src_el);
                spt.popup.show_background();
            }
            else {
                spt.hide(bvr.src_el);
                spt.popup.hide_background();
            }
            '''
        } )

        top.add_behavior( {
            'type': 'listen',
            'event_name': 'hotbox|close',
            'cbjs_action': '''
            spt.hide(bvr.src_el);
            spt.popup.hide_background();
            '''
        } )



        div = DivWdg()
        top.add(div)
        div.add_style("width: 630px")
        div.add_style("height: 400px")
        div.add_style("opacity: 0.8")
        div.add_gradient("background", "background3", 10)
        div.add_style("position: fixed")
        div.add_style("z-index: 1000")
        #div.set_box_shadow("2px 2px 4px 4px")
        div.set_box_shadow(color="#000")
        div.set_round_corners(25)
        div.add_border()

        content_wdg = DivWdg()
        content_wdg.add_style("position: fixed")
        top.add(content_wdg)
        content_wdg.add_style("padding: 20px 50px 50px 50px")
        content_wdg.add_style("z-index: 1001")


        close_wdg = DivWdg()
        content_wdg.add(close_wdg)
        icon = IconWdg('Close Quick Links', IconWdg.POPUP_WIN_CLOSE)
        close_wdg.add(icon)
        #close_wdg.add_style("position: fixed")
        close_wdg.add_style("float: right")
        close_wdg.add_style("margin-top: -5px")
        close_wdg.add_style("margin-right: -40px")
        close_wdg.add_behavior( {
            'type': 'click_up',
            'cbjs_action': '''
            spt.named_events.fire_event("hotbox|close");
            '''
        } )
        close_wdg.add_class("hand")



        """
        image = "FLOW_CHART_02"
        image = eval("IconWdg('', IconWdg.%s)" % image)
        behavior = {
            'type': 'click_up',
            'cbjs_action': '''
            document.location = "/tactic/admin/#/link/create_project";
            spt.named_events.fire_event("hotbox|close");
            '''
        }
        section = my.get_section_wdg("Create Project", "Project Creation Wizard", image, behavior)
        section.add_style("float: left")
        content_wdg.add(section)
        """






        image = "FLOW_CHART_02"
        image = eval("IconWdg('', IconWdg.%s)" % image)
#.........这里部分代码省略.........
开发者ID:blezek,项目名称:TACTIC,代码行数:103,代码来源:quick_box_wdg.py

示例13: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_display(my):
        top = my.top
        top.add_class("spt_subscription_top")
        my.set_as_panel(top)

        top.add_style("width: 100px")
        top.add_style("height: 20px")

        top.add_class("hand")




        interval = my.kwargs.get("interval")
        if not interval:
            interval = 10 * 1000
        else:
            interval = int(interval) * 1000

        inner = DivWdg()
        top.add(inner)

        my.set_refresh(inner,interval)

        mode = my.kwargs.get("mode")
        if not mode:
            mode = "tab"

        mode = "dialog"
        if mode == "dialog":
            from tactic.ui.container import DialogWdg
            dialog = DialogWdg(display=False, show_title=False)
            inner.add(dialog)
            dialog.set_as_activator(inner)
            subscription_wdg = SubscriptionWdg()
            dialog.add(subscription_wdg)
            subscription_wdg.add_style("width: 400px")
            subscription_wdg.add_color("background", "background")
            subscription_wdg.add_style("height: 400px")

        elif mode == "popup":
            top.add_behavior( {
                'type': 'click_up',
                'cbjs_action': '''
                var class_name = 'tactic.ui.app.SubscriptionWdg';
                var kwargs = {};
                spt.panel.load_popup("Subscriptions", class_name, kwargs);
                '''
            } )
        else:
            top.add_behavior( {
                'type': 'click_up',
                'cbjs_action': '''
                spt.tab.set_main_body_tab();
                var class_name = 'tactic.ui.app.SubscriptionWdg';
                var kwargs = {};
                spt.tab.add_new("Subscriptions", "Subscriptions", class_name, kwargs);
                '''
            } )


        color = inner.get_color("border") 
        inner.add_style("border-style: solid")
        inner.add_style("border-size: 1px")
        inner.add_style("border-color: transparent")
        inner.set_round_corners(5)
        inner.add_style("padding: 2px")

        inner.add_behavior( {
            'type': 'mouseenter',
            'color': color,
            'cbjs_action': '''
            bvr.src_el.setStyle("border", "solid 1px "+bvr.color);
            '''
        } )
        inner.add_behavior( {
            'type': 'mouseleave',
            'cbjs_action': '''
            bvr.src_el.setStyle("border-color", "transparent");
            '''
        } )


        category = None
        subscriptions = my.get_subscriptions(category)



        if not subscriptions:
            inner.add_style("display: none")


        num = len(subscriptions)
        if num == 1:
            msg = "%s Message" % num
        else:
            msg = "%s Messages" % num

        icon = IconWdg(msg, IconWdg.STAR)
        inner.add(icon)
#.........这里部分代码省略.........
开发者ID:blezek,项目名称:TACTIC,代码行数:103,代码来源:message_wdg.py

示例14: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]

#.........这里部分代码省略.........
                if (index-1) % columns == 0:
                    table.add_row()
               
                td = table.add_cell()
                img_div = DivWdg()
                img_div.add(img_href)
                img_div.add_style("margin-right: 20px")
                img_div.add_style("float: left")
                img_div.add_border()
                #img_div.set_round_corners()
                img_div.set_box_shadow("0px 1px 5px")

                project_div = DivWdg()
                td.add(project_div)
                td.add_style("width: 230px")
                project_div.add_style("font-size: 16px")
                project_div.add_style("font-weight: bold")
                project_div.add_style("vertical-align: middle")
                project_div.add(img_div)
                #project_div.add(href)
                project_div.add(title)
                if project.get_value("is_template") == True:
                    project_div.add("<br/><i style='opacity: 0.5; font-size: 12px'>(template)</i>")
                project_div.add_style("height: %spx" % (icon_size-10))

                project_div.add_style("padding: 8px 10px 2px 20px")
                
                project_div.add_color("background", "background")
                project_div.add_behavior( {
                'type': 'hover',
                'add_color_modifier': -3,
                'cb_set_prefix': 'spt.mouse.table_layout_hover',
                } )
                project_div.set_round_corners()
                project_div.add_class("hand")

                project_div.add_behavior( {
                'type': 'click_up',
                'link': link,
                'title': title,
                'cbjs_action': '''
                document.location = bvr.link;
                '''
                } )

        elif not security.check_access("builtin", "view_site_admin", "allow", default="deny") and not security.check_access("builtin", "create_projects", "allow", default="deny"):
            tr, td = table.add_row_cell()

            msg_div = DivWdg()
            td.add(msg_div)
            from pyasm.widget import IconWdg
            icon = IconWdg("WARNING", IconWdg.WARNING)
            msg_div.add(icon)
            msg_div.add("You are not permitted to view any projects")
            msg_div.add_style("font-size: 16px")
            msg_div.add_style("text-align: center")
            msg_div.add_style("font-weight: bold")
            msg_div.add_style("margin: 50px")
            msg_div.add("<br/>"*2)
            msg_div.add("Please click to Sign Out:<br/>")
            action = ActionButtonWdg(title='Sign Out >>', size='m')
            msg_div.add(action)
            action.add_style('margin: 5px auto')
            action.add_style('text-align: center')
            web = WebContainer.get_web()
            action.add_behavior( {
开发者ID:mincau,项目名称:TACTIC,代码行数:70,代码来源:index_wdg.py

示例15: get_nav_wdg

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_round_corners [as 别名]
    def get_nav_wdg(self):

        #base_dir = self.kwargs.get("base_dir")
        #location = self.kwargs.get("location")
        base_dir = self.session.get_value("base_dir")
        location = self.session.get_value("location")

        nav_wdg = DivWdg()

        nav_wdg.add("<b>Session 101 - Clean up self Crap</b><hr/>")
    

        nav_wdg.add_style("margin-bottom: 10px")
        nav_wdg.add_class("spt_file_nav")
        nav_wdg.add_style("width: 575px")
        nav_wdg.add_border()
        nav_wdg.set_round_corners()
        nav_wdg.add_style("padding: 5px")

        button = ActionButtonWdg(title="Scan", tip="Scan for files in specified folder")
        button.add_style("float: right")
        button.add_style("margin-top: -5px")
        nav_wdg.add(button)


        from tactic.ui.input import TextInputWdg
        title_wdg = "Session Title: "
        nav_wdg.add(title_wdg)
        text = TextInputWdg(name="title")
        text.add_class("spt_title")
        text.add_style("width: 300px")
        nav_wdg.add(text)

        nav_wdg.add("<br/><br/>")


        folder_wdg = "Base folder of this session: "
        nav_wdg.add(folder_wdg)

        text = TextInputWdg(name="base_dir")
        text.add_class("spt_base_dir")
        text.add_style("width: 300px")
        if base_dir:
            text.set_value(base_dir)
        nav_wdg.add(text)

        # add a hidden paths variable
        text = HiddenWdg("paths")
        text.add_class("spt_paths")
        nav_wdg.add(text)

        nav_wdg.add("<br/>")

        # add a hidden paths variable
        select = SelectWdg("location")
        if location:
            select.set_value(location)
        nav_wdg.add("<br/>")
        nav_wdg.add("Folder is on ")
        nav_wdg.add(select)
        select.set_option("values", "local|server")

        
        button.add_behavior( {
        'type': 'click_up',
        'cbjs_action': '''

        var top = bvr.src_el.getParent(".spt_ingestion_top");
        var nav = top.getElement(".spt_file_nav");

        var nav_values = spt.api.Utility.get_input_values(nav,null,false);

        var base_dir = nav_values.base_dir;
        var location = nav_values.location;

        spt.app_busy.show("Scanning", base_dir);

        if (location == 'local') {
            var applet = spt.Applet.get();
            var paths = applet.list_dir(base_dir, 2);
            var paths_el = nav.getElement(".spt_paths");
            var js_paths = [];
            for (var i = 0; i < paths.length; i++) {
                var js_path = paths[i].replace(/\\\\/g,"/");
                if (applet.is_dir(js_path) ) {
                    js_path = js_path + '/';
                    js_paths.push(js_path);
                }
                //if (i > 100) break;
                else {
                    js_paths.push(js_path);
                }
            }

            paths_el.value = js_paths.join("|");

        }

        //var nav_values = spt.api.Utility.get_input_values(nav,null,false);
        //spt.panel.refresh(top, nav_values);
#.........这里部分代码省略.........
开发者ID:mincau,项目名称:TACTIC,代码行数:103,代码来源:ingestion_wdg.py


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