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


Python DivWdg.set_id方法代码示例

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


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

示例1: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_id [as 别名]
    def get_display(self):
        # This will be the main <div> that everything else goes into
        main_wdg = DivWdg()
        main_wdg.set_id('element_eval_panel')

        self.add_button_row_to_main_wdg(main_wdg)

        main_wdg.add(self.get_name_section())

        main_wdg.add(self.get_client_section())

        main_wdg.add(self.get_operator_section())
        main_wdg.add(self.get_title_section())
        main_wdg.add(self.get_season_section())
        main_wdg.add(self.get_episode_section())
        main_wdg.add(self.get_version_section())
        main_wdg.add(self.get_file_name_section())

        main_wdg.add(self.get_program_format_table())
        main_wdg.add(self.get_video_measurements_table())
        main_wdg.add(self.get_element_profile_table())

        if hasattr(self, 'element_eval_sobject') and self.element_eval_sobject:
            main_wdg.add(AudioLinesTableWdg(element_evaluation_code=self.element_eval_sobject.get_code()))

        main_wdg.add(self.get_general_comments_section())

        main_wdg.add(ElementEvalLinesWdg(element_evaluation_code=self.element_eval_sobject.get_code()))

        self.add_button_row_to_main_wdg(main_wdg)

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

示例2: IframePlainWdg

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_id [as 别名]
class IframePlainWdg(IframeWdg):
    ''' a plain iframe to be opened within an iframe '''
    
    def init(self):
        self.img_span_name = self.generate_unique_id('loadingplain')
        self.name = "iframeplain_%s" % (self.generate_unique_id())
        self.iframe = HtmlElement.iframe()
        self.iframe.set_id(self.name)
        self.iframe.set_attr('name',self.name)
        self.div = DivWdg(css='iframe_plain')
        self.div.add_style('display','none')
        self.div.set_id("iframeplain_cont_%s" % (self.generate_unique_id()))
        self.div.add(self.iframe)
        self.add(self.div)
        self.add(self._get_loading_span())
        
    def get_on_script(self, src, dynamic_element=[]):
        '''A script to display the iframe. this is not called on init'''
        scripts = []
        
        cont_on_script = "toggle_display('%s')" %self.div.get_id()
        iframe_script = "IframeLoader_display('%s','%s','%s','%s')" % \
            (self.img_span_name, self.name, src, '||'.join(dynamic_element))
        
        scripts.append(iframe_script)
        scripts.append(cont_on_script)
        
        resize_iframe = IframeWdg.get_resize_script(self.name, self.width)
     
        scripts.append(resize_iframe)
        return ";".join(scripts)

    def get_off_script(self):
        return "toggle_display('%s')" %self.div.get_id()
开发者ID:mincau,项目名称:TACTIC,代码行数:36,代码来源:shadowbox_wdg.py

示例3: get_menu_item

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_id [as 别名]
    def get_menu_item(my, element_name, display_handler):

        content = DivWdg()
        content.add_attr("spt_element_name", element_name)
        content.add_class("hand")

        # add the drag/drop behavior
        behavior = {
            "type": "drag",
            "mouse_btn": "LMB",
            "modkeys": "",
            "src_el": "@",
            "cbfn_setup": "spt.side_bar.pp_setup",
            "cbfn_motion": "spt.side_bar.pp_motion",
            "cbfn_action": "spt.side_bar.pp_action",
        }
        content.add_behavior(behavior)

        content.set_id("manage_%s" % element_name)
        content.add_style("position: relative")
        content.add_style("margin: 3px")
        content.add_style("left: 0")
        content.add_style("top: 0")
        content.add_style("z-index: 100")
        if display_handler == "SeparatorWdg":
            content.add(HtmlElement.hr())
        else:
            content.add(element_name)

        return content
开发者ID:hellios78,项目名称:TACTIC,代码行数:32,代码来源:view_manager_wdg.py

示例4: get_display

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

        outer_div.add(widgets.html_widgets.get_label_widget('Path'))
        outer_div.add(widgets.input_widgets.get_text_input_wdg('new_file_for_task_path', 800))

        outer_div.add(widgets.html_widgets.get_label_widget('Classification'))
        outer_div.add(get_file_classification_select_wdg())

        files = get_potential_origin_files(self.task_data.get_code())

        outer_div.add(widgets.html_widgets.get_label_widget('Original File'))
        outer_div.add(get_files_checkbox_from_file_list(files, []))

        order_sobject = get_order_sobject_from_task_sobject(self.task_sobject)
        order_code = order_sobject.get_code()

        submit_button = SubmitWdg('Submit')
        submit_button.add_behavior(
            self.get_submit_button_behavior(self.task_data.get_code(), self.division.get_code(), order_code,
                                            self.task_sobject.get_search_key())
        )
        outer_div.add(submit_button)

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

示例5: generate_div

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_id [as 别名]
 def generate_div(self):
     ''' this is meant to be called to get the container div for the 
         ajax widget '''
     div = DivWdg()
     div.set_id(self.display_id)
     div.add_style("display: block")
     return div
开发者ID:mincau,项目名称:TACTIC,代码行数:9,代码来源:web_tools.py

示例6: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_id [as 别名]
    def get_display(self):
        outer_div = DivWdg()
        outer_div.set_id('change-package-instructions')

        package_instructions_code = self.package_sobject.get_value('package_instructions_code')

        if package_instructions_code:
            package_instructions_sobject = get_sobject_by_code('twog/package_instructions', package_instructions_code)

            outer_div.add('Instruction Document is currently set to: {0}'.format(
                package_instructions_sobject.get_value('name')))
        else:
            outer_div.add('No Instructions Document currently selected')

        division_sobject = get_client_division_sobject_for_package_sobject(self.package_sobject)
        division_code = division_sobject.get_code()
        platform_code = self.package_sobject.get('platform_code')

        outer_div.add(get_instructions_select_wdg(division_code, platform_code))

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

        outer_div.add(submit_button)

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

示例7: get_example_chooser_content

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

示例8: get_display

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

示例9: init

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

        top = DivWdg()
        top.set_id('top_of_application')

        msg_div = DivWdg()
        msg_div.add_style('text-align: center')
        msg_div.add('<img src="/context/icons/common/indicator_snake.gif" border="0"/>')
        msg_div.add("&nbsp; &nbsp;")
        project = Project.get()
        title = project.get_value("title")
        if not title:
            title = "TACTIC"

        msg_div.add('''Loading "%s" ....'''% title)
        msg_div.add_style("font-size: 1.5em")

        msg_div.add_behavior( {
            'type': 'load',
            'hash': my.hash,
            'cbjs_action': '''
            if (bvr.hash) {
                spt.hash.hash = "/" + bvr.hash;
            }
            else {
                spt.hash.hash = "/index";
            }
            '''
        } )

        msg_div.add_style("margin: 200 0 500 0")
        top.add(msg_div)

        my.add(top)
        return
开发者ID:blezek,项目名称:TACTIC,代码行数:37,代码来源:top_wdg.py

示例10: get_display

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

        page_label = "<div>Enter the unique code of the Element Evaluation you want to import. The code will be in a " \
                     "format like this: ELEMENT_EVAL00001 </br>" \
                     "When the process finishes, a popup will tell you the new code for the imported report. Make " \
                     "note of this code before closing the window."
        outer_div.add(page_label)

        outer_div.add(get_label_widget('Code'))
        outer_div.add(get_text_input_wdg('code', 300))

        outer_div.add(get_label_widget('Username'))
        outer_div.add(get_text_input_wdg('username', 400))

        outer_div.add(get_label_widget('Password'))
        password_input = PasswordWdg('password')
        outer_div.add(password_input)

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

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

示例11: get_display

# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import set_id [as 别名]
    def get_display(self):
        instructions_template_div = DivWdg()
        instructions_template_div.set_id('instructions_template')
        instructions_template_div.add_style('display', 'inline-block')

        instructions_template_name_div = DivWdg()
        instructions_template_name_div.add_style('text-decoration', 'underline')
        instructions_template_name_div.add_style('font-size', '24px')
        instructions_template_name_div.add(self.instructions_template_sobject.get('name'))

        instructions_template_div.add(instructions_template_name_div)
        instructions_template_div.add(self.get_selected_department_instructions_section())

        outer_div = DivWdg()
        outer_div.set_id('instructions_template_builder')
        outer_div.add(instructions_template_div)

        create_new_instructions_document_button = ButtonNewWdg(
            title='Create an Instructions Document from this Template', icon='ADD')
        create_new_instructions_document_button.add_behavior(
            get_load_popup_widget_behavior(
                'Create an Instructions Document', 'widgets.CreateInstructionsDocumentFromTemplateWdg',
                self.instructions_template_sobject.get_search_key()
            )
        )

        outer_div.add(create_new_instructions_document_button)

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

示例12: get_display

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

        order_code = self.package_sobject.get('order_code')
        order_search = Search('twog/order')
        order_search.add_code_filter(order_code)
        order_sobject = order_search.get_sobject()

        deliverable_files = get_deliverable_files_in_order(order_sobject)
        selected_files = get_files_for_package(self.package_sobject.get_code())

        # Only show the selectable files and the submit button if the parent order has any deliverable files
        if deliverable_files:
            deliverable_file_select_wdg = get_files_checkbox_from_file_list(deliverable_files, selected_files)
            outer_div.add(deliverable_file_select_wdg)

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

            outer_div.add(submit_button)
        else:
            outer_div.add('<div>No deliverable files are available for this Order yet.</div>')

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

示例13: get_example_display

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

        div = DivWdg()

        # --- Example of new spt.fx animation slider --------------------------------------------------------------

        slide_div = DivWdg()
        slide_div.set_id( "ui_play_sliding_thing" )
        slide_div.set_style( "background: #9f9f9f; color: #0f0f0f; border: 1px solid black;" )
        slide_div.add( "For a moment after Mr. and Mrs. Darling left the house the night-lights by the beds of the three children continued to burn clearly. They were awfully nice little night-lights, and one cannot help wishing that they could have kept awake to see Peter; but Wendy&#39;s light blinked and gave such a yawn that the other two yawned also, and before they could close their mouths all the three went out. There was another light in the room now, a thousand times brighter than the night-lights, and in the time we have taken to say this, it had been in all the drawers in the nursery, looking for Peter&#39;s shadow, rummaged the wardrobe and turned every pocket inside out. It was not really a light; it made this light by flashing about so quickly, but when it came to rest for a second you saw it was a fairy, no longer than your hand, but still growing. It was a girl called Tinker Bell exquisitely gowned in a skeleton leaf, cut low and square, through which her figure could be seen to the best advantage. She was slightly inclined to embonpoint." )

        div.add( slide_div )

        div.add( '<br/>' )
        click_slide = DivWdg()
        click_slide.add( "Click Me to Slide!" )
        click_slide.set_style( "background: #0f0f0f; color: #9f9f9f; border: 1px solid black; width: 100px; " \
                               "cursor: pointer;" )

        click_slide.add_behavior( { 'type': 'click_up',
                                    'dst_el': 'ui_play_sliding_thing',
                                    'cbfn_action': 'spt.fx.slide_anim_cbk',
                                    'options': { 'direction': 'vertical',
                                                 'duration': 500,  # time in milliseconds
                                                 'frame_rate': 15   # frames per second
                                                }
                                    } )

        div.add( click_slide )
        return div
开发者ID:0-T-0,项目名称:TACTIC,代码行数:32,代码来源:fx_anim_examples_wdg.py

示例14: get_display

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

        page_label = "<div>Fill out the following form to submit a new request. The request will be added to the " \
                     "department's list, and will be addressed as soon as possible. You will receive a " \
                     "notification when the request is complete.</div><br/>"
        outer_div.add(page_label)

        outer_div.add(get_label_widget('Name'))
        outer_div.add(get_text_input_wdg('name', 800))

        outer_div.add(get_label_widget('Description'))
        outer_div.add(obu.get_text_area_input_wdg('description', 800, [('display', 'block')]))

        outer_div.add(get_label_widget('Due Date'))
        outer_div.add(get_datetime_calendar_wdg())

        department_select_wdg = SelectWdg('department_select')
        department_select_wdg.append_option('Onboarding', 'onboarding')
        department_select_wdg.append_option('Edel', 'edel')
        department_select_wdg.append_option('Compression', 'compression')
        department_select_wdg.append_option('QC', 'qc')

        outer_div.add(get_label_widget('Department'))
        outer_div.add(department_select_wdg)

        self.get_submit_widget(outer_div)

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

示例15: get_section_wdg

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

        parent_key = SearchKey.get_by_sobject(sobject)

        section_id = "wow"
        title = ""
        view = "children"
        target_id = "sobject_relation"

        kwargs = {
            'section_id': section_id,
            'title': title,
            'view': view,
            'target_id': target_id,
            'width': '125',
            'parent_key': parent_key
        }
        section_div = DivWdg()
        section_div.add_style("display: block")
        section_div.set_id(section_id)
        section_div.set_attr('spt_class_name', "tactic.ui.panel.ChildrenBookmarkMenuWdg")
        for name, value in kwargs.items():
            if name == "config":
                continue
            section_div.set_attr("spt_%s" % name, value)

        section_wdg = SObjectChildrenMenuWdg(**kwargs)
        section_div.add(section_wdg)
        return section_div
开发者ID:0-T-0,项目名称:TACTIC,代码行数:31,代码来源:search_type_panel_wdg.py


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