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


Python DivWdg.add_class方法代码示例

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


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

示例1: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [as 别名]
    def get_display(self):
        outer_div = DivWdg()
        outer_div.add_class('new-title-entry-form')

        title_name_input = TextInputWdg()
        title_name_input.set_name('name')

        outer_div.add(get_label_widget('Name'))
        outer_div.add(title_name_input)

        episode_input = TextInputWdg()
        episode_input.set_name('episode')

        outer_div.add(get_label_widget('Episode'))
        outer_div.add(episode_input)

        description_input = TextAreaInputWdg()
        description_input.set_name('description')

        outer_div.add(get_label_widget('Description'))
        outer_div.add(description_input)

        submit_button = SubmitWdg('Submit')
        submit_button.add_behavior(self.submit_button_behavior())

        outer_div.add(submit_button)

        return outer_div
开发者ID:2gDigitalPost,项目名称:custom,代码行数:30,代码来源:title_entry_wdg.py

示例2: get_display

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

        top = DivWdg()
        my.set_as_panel(top)
        top.add_class("spt_table_view_manager_top")

        my.search_type = my.kwargs.get("search_type")
        my.view = my.kwargs.get("view")

        web = WebContainer.get_web()
        if not my.search_type:
            my.search_type = web.get_form_value("search_type")
        if not my.view:
            my.view = web.get_form_value("view")
        if not my.view:
            my.view = 'table'


        filter_wdg = my.get_filter_wdg()
        top.add(filter_wdg)


        #web = WebContainer.get_web()
        #search_type = web.get_form_value("search_type")
        #view = web.get_form_value("view")

        view_manager_wdg = ViewManagerWdg(search_type=my.search_type,view=my.view)
        top.add(view_manager_wdg)


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

示例3: get_display

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

        if my.kwargs.get("is_refresh") == 'true':
            from tactic.ui.widget import TitleWdg
            title = TitleWdg(name_of_title='Import CSV',help_alias='importing-csv-data')
            widget.add(title)

        widget.add_style('padding: 10px')
        widget.add_style('font-size: 12px')
        #widget.add_border()
        widget.add_color('color','color') 
        widget.add_color('background','background') 
        widget.add_class("spt_import_top")
       

        inner = DivWdg()
        widget.add(inner)
        inner.add( my.get_first_row_wdg() )
        inner.add(ProgressWdg())

        if my.is_refresh:
            return inner
        else:
            return widget
开发者ID:davidsouthpaw,项目名称:TACTIC,代码行数:28,代码来源:data_export_wdg.py

示例4: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [as 别名]
    def get_display(self):
        outer_div = DivWdg()
        outer_div.add_class('new-order-entry-form')

        order_name_input = TextInputWdg()
        order_name_input.set_name('name')

        outer_div.add(get_label_widget('Name'))
        outer_div.add(order_name_input)

        po_number_input = TextInputWdg()
        po_number_input.set_name('po_number')

        outer_div.add(get_label_widget('PO Number'))
        outer_div.add(po_number_input)

        client_select_wdg = get_select_widget_from_search_type('twog/client', 'client', 'name', 'code')

        outer_div.add(get_label_widget('Client'))
        outer_div.add(client_select_wdg)

        sales_rep_select_wdg = get_select_widget_from_search_type('sthpw/login_in_group', 'Client', 'login_full_name',
                                                                  'code', [('login_group', 'sales')])

        outer_div.add(get_label_widget('Sales Rep'))
        outer_div.add(sales_rep_select_wdg)

        submit_button = SubmitWdg('Submit')
        submit_button.add_behavior(self.submit_button_behavior())

        outer_div.add(submit_button)

        return outer_div
开发者ID:2gDigitalPost,项目名称:custom,代码行数:35,代码来源:order_entry_wdg.py

示例5: get_example_chooser_content

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [as 别名]
    def get_example_chooser_content(self):
        choice_list_div = DivWdg()
        choice_list_div.set_id("UiExampleChoiceList")
        choice_list_div.add_styles( "background: #202020; color: #999999; border: 1px solid black; " \
                                    "border-top: 0px;" )

        example_wdg_classes = self._get_example_widget_classes()

        choice_list_div.add( "<br/>" )

        for ex_wdg_class in example_wdg_classes:
            ex_wdg = ex_wdg_class()

            ex_title = ex_wdg.get_example_title()
            ex_desc  = ex_wdg.get_example_description()
            ex_class_path = Common.get_full_class_name( ex_wdg )

            ex_div = DivWdg()
            ex_div.add_styles( "color: #999999; padding: 8px; padding-left: 20px; cursor: pointer;" )
            ex_div.add_class("SPT_DTS")
            ex_div.add_behavior( {'type': 'click_up',
                                  'cbjs_action': 'spt.ui_play.show_example("%s");' % ex_class_path } )
            ex_div.add( ex_title )
            choice_list_div.add( ex_div )

        choice_list_div.add( "<br/>" )
        return choice_list_div
开发者ID:mincau,项目名称:TACTIC,代码行数:29,代码来源:ui_playground_panel_wdg.py

示例6: get_sync_mode_wdg

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

        div = DivWdg()
        div.add_class("spt_sync_mode")

        div.add("Share Mode: ")
        select = SelectWdg("sync_mode")
        div.add(select)
        select.set_option("values", "file|xmlrpc")

        select.add_behavior( {
            'type': 'change',
            'cbjs_action': '''
            var top = bvr.src_el.getParent(".spt_sync_mode");
            var value = bvr.src_el.value;
            var xmlrpc_el = top.getElement(".spt_xmlrpc_mode");
            var file_el = top.getElement(".spt_file_mode");

            if (value == 'xmlrpc') {
                spt.show(xmlrpc_el);
                spt.hide(file_el);
            }
            else {
                spt.hide(xmlrpc_el);
                spt.show(file_el);
            }
            '''
        } )

        div.add( self.get_xmlrpc_mode_wdg() )
        div.add( self.get_file_mode_wdg() )

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

示例7: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [as 别名]
    def get_display(self):
        outer_div = DivWdg()
        outer_div.add_class('new-order-title-entry-form')

        self.get_order_code_select_widget(outer_div)
        self.get_order_entry_widget(outer_div)
        self.get_title_select_widget(outer_div)
        self.get_title_entry_wdg(outer_div)
        self.get_platform_select_widget(outer_div)

        self.get_languages_widget(outer_div)
        self.get_territory_widget(outer_div)
        self.get_description_input_widget(outer_div)
        self.get_total_program_runtime_widget(outer_div)
        self.get_checkboxes_section(outer_div)

        submit_button = SubmitWdg('Submit')
        submit_button.add_behavior(self.submit_button_behavior())

        popup_button = ButtonWdg('Popup')
        popup_button.add_behavior({'css_class': 'popup_click', 'type': 'click_up', 'cbjs_action': 'spt.panel.load_popup("Test", "order_builder.OrderTitleEntryWdg", {});'})
        outer_div.add(popup_button)

        outer_div.add(submit_button)

        return outer_div
开发者ID:2gDigitalPost,项目名称:custom,代码行数:28,代码来源:order_title_builder.py

示例8: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [as 别名]
    def get_display(self):
        outer_div = DivWdg()
        outer_div.add_class('new-work-order-entry-form')

        page_label = "Work Order for {0}".format(self.title_order)
        outer_div.add(page_label)

        process_input = TextInputWdg()
        process_input.set_name('process')

        outer_div.add(get_label_widget('Process'))
        outer_div.add(process_input)

        instructions_input = TextAreaInputWdg()
        instructions_input.set_name('instructions')

        outer_div.add(get_label_widget('Instructions'))
        outer_div.add(instructions_input)

        description_input = TextAreaInputWdg()
        description_input.set_name('description')

        outer_div.add(get_label_widget('Description (Optional)'))
        outer_div.add(description_input)

        submit_button = SubmitWdg('Submit')
        submit_button.add_behavior(self.submit_button_behavior())

        outer_div.add(submit_button)

        return outer_div
开发者ID:2gDigitalPost,项目名称:custom,代码行数:33,代码来源:work_order_builder.py

示例9: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [as 别名]
    def get_display(my):
        widget = DivWdg(id='link_view_select')
        widget.add_class("link_view_select")
        if my.refresh:
            widget = Widget()
        else:
            my.set_as_panel(widget)
        
        views = []
        if my.search_type:
            from pyasm.search import WidgetDbConfig
            search = Search( WidgetDbConfig.SEARCH_TYPE )
            search.add_filter("search_type", my.search_type)
            search.add_regex_filter("view", "link_search:|saved_search:", op="NEQI")
            search.add_order_by('view')
            widget_dbs = search.get_sobjects()
            views = SObject.get_values(widget_dbs, 'view')
        
        labels = [view for view in views]

        views.insert(0, 'table')
        labels.insert(0, 'table (Default)')
        st_select = SelectWdg('new_link_view', label='View: ')
        st_select.set_option('values', views)
        st_select.set_option('labels', labels)
        widget.add(st_select)
        return widget
开发者ID:blezek,项目名称:TACTIC,代码行数:29,代码来源:view_manager_wdg.py

示例10: get_folder_wdg

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [as 别名]
    def get_folder_wdg(my, element_name, config, options, base_path, current_path, info, personal, use_same_config):
        li = HtmlElement.li()
        li.add_class("spt_side_bar_link")
        li.add_class("main_li")


        title = my._get_title(config, element_name)
        title_wdg = DivWdg()
        title_wdg.add_class("menu_header")
        li.add(title_wdg)
        title_wdg.add(title)


        ul = HtmlElement.ul()
        li.add(ul)
        ul.add_class("spt_side_bar_section")
        ul.add_class("sub_ul")

        # then get view name from options in order to read a new
        # config and recurse ...
        options_view_name = options.get('view')
        if options_view_name:
            if use_same_config:
                xml = config.get_xml()
                sub_config = WidgetConfig.get(xml=xml)
                sub_config.set_view(options_view_name)
            else:
                sub_config = my.get_config( my.config_search_type, options_view_name, default=my.default, personal=personal)

            info['level'] += 1
            my.generate_section( sub_config, ul, info, base_path=current_path, personal=personal, use_same_config=use_same_config )
            info['level'] -= 1

        return li
开发者ID:davidsouthpaw,项目名称:TACTIC,代码行数:36,代码来源:simple_side_bar_wdg.py

示例11: get_section_wdg

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [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

示例12: get_security_wdg

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

        div = DivWdg()
        div.add_class("spt_security")

        div.add("A server can sync either be scoped for a single project or all projects.  Transactions that occur in the admin project never get synced.")

        div.add("<br/>"*2)

        div.add("Project: ")

        search = Search("sthpw/project")
        search.add_filters("code", ['admin','unittest'], op='not in')
        search.add_order_by("title")
        projects = search.get_sobjects()

        select = SelectWdg("projects")
        div.add(select)
        labels = [x.get_value("title") for x in projects]
        values = [x.get_value("code") for x in projects]

        project_code = Project.get_project_code()
        if project_code != 'admin':
            select.set_value(project_code)
        select.set_option("labels", labels)
        select.set_option("values", values)
        select.add_empty_option("-- All --")


        div.add("<br/>"*2)

        return div
开发者ID:mincau,项目名称:TACTIC,代码行数:34,代码来源:sync_settings_wdg.py

示例13: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [as 别名]
    def get_display(self):
        # Set up the outer <div> to hold all the form elements
        outer_div = DivWdg()
        outer_div.add_class('new-order-entry-form')
        outer_div.set_id('new-order-entry-form')

        # Set up the <input> widget for 'name'
        outer_div.add(HtmlElement.label('Name'))
        name_input = TextInputWdg(name='name')
        outer_div.add(name_input)

        # Set up the <input> widget for 'po_number'
        outer_div.add(HtmlElement.label('PO Number'))
        po_number_input = TextInputWdg()
        po_number_input.set_name('po_number')
        outer_div.add(po_number_input)

        # Set up the <select> widget and it's options for 'client'
        outer_div.add(HtmlElement.label('Client'))
        client_select_wdg = get_select_widget_from_search_type('twog/client', 'client', 'name', 'code')
        outer_div.add(client_select_wdg)

        # Set up the Save button
        save_button = SubmitWdg('Save')
        save_button.add_behavior(self.save_button_behavior())
        outer_div.add(save_button)

        # Set up the Save and Add button
        save_and_add_button = SubmitWdg('Save and Add')
        save_and_add_button.add_behavior(self.save_and_add_button_behavior())
        outer_div.add(save_and_add_button)

        return outer_div
开发者ID:2gDigitalPost,项目名称:custom-rewrite,代码行数:35,代码来源:new_order_entry.py

示例14: add_dummy

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [as 别名]
 def add_dummy(my, config, subsection_div):
     div = DivWdg()
     div.add_attr("spt_view", config.get_view() )
     div.add_class("spt_side_bar_element")
     div.add_class("spt_side_bar_dummy")
     div.add( my.get_drop_wdg() )
     subsection_div.add(div)
开发者ID:0-T-0,项目名称:TACTIC,代码行数:9,代码来源:base_section_wdg.py

示例15: get_bottom_wdg

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import add_class [as 别名]
    def get_bottom_wdg(my):
        # check if the user has enabled it 
        info = my.check_bottom_wdg()
        if info.get('check') == False:
            return None

        
        title = info.get('title')
        result = info.get('result')

        div = DivWdg()
        div.add(title)
        div.add(str(result))
        div.add_style("text-align: right")
        div.add_class( "spt_%s_expr_bottom" % (my.get_name()) )


        # DEPRECATED until we have a better solution
        # add a listener
        '''
        for sobject in sobjects:
            if sobject.is_insert():
                continue

            # DISABLE this for simple
            #if my.enable_eval_listener:
            #    my.add_js_expression(div, sobject, expression)
        '''

        return div
开发者ID:davidsouthpaw,项目名称:TACTIC,代码行数:32,代码来源:base_table_element_wdg.py


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