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


Python SpanWdg.add_style方法代码示例

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


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

示例1: add_file_behaviors

# 需要导入模块: from pyasm.web import SpanWdg [as 别名]
# 或者: from pyasm.web.SpanWdg import add_style [as 别名]
    def add_file_behaviors(my, item_div, dirname, basename):
        item_div.add_class("spt_script_item")
        if not dirname:
            path = "///%s" % (basename)
        else:
            path = "%s/%s" % (dirname, basename)
        
        scripts = my.kwargs.get("scripts")
        script = scripts.get(path)
        if not script:
            item_div.add_style("background-color", "red")
            item_div.add_behavior({"type": "click_up",
                                 "cbjs_action" : '''spt.alert("Please remove leading / in this script path's Title attribute by using the Manage button.")'''})
            item_div.add_attr("title", "Please remove special characters like / in this script path")
            return
           
        script_code = script.get("code")
        language = script.get("language")
        item_div.add_attr("spt_script_code", script_code)
        item_div.add_style("background", "transparent")

        if language:
            span = SpanWdg()
            span.add_style("font-size: 9px")
            span.add_style("opacity: 0.2")
            span.add(" &nbsp; <i>(%s)</i>" % language)
            item_div.add(span)
开发者ID:0-T-0,项目名称:TACTIC,代码行数:29,代码来源:shelf_wdg.py

示例2: get_input_widget_with_label

# 需要导入模块: from pyasm.web import SpanWdg [as 别名]
# 或者: from pyasm.web.SpanWdg import add_style [as 别名]
    def get_input_widget_with_label(self, label, id, width):
        section_span = SpanWdg()
        section_span.add_style('display', 'inline-block')

        section_span.add(label)

        section_span.add(get_text_input_wdg(id, get_attribute_or_none(self, id), width))

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

示例3: _get_loading_span

# 需要导入模块: from pyasm.web import SpanWdg [as 别名]
# 或者: from pyasm.web.SpanWdg import add_style [as 别名]
 def _get_loading_span(my):
     span = SpanWdg()
     span.add_style("display","none")
     img = HtmlElement.img('/context/icons/common/loading.gif')
     img.add_style("height","10px")
     msg_span = SpanWdg('loading')
     msg_span.set_class('small')
     span.add(msg_span)
     span.add(img) 
     span.set_id(my.img_span_name)
     return span
开发者ID:0-T-0,项目名称:TACTIC,代码行数:13,代码来源:shadowbox_wdg.py

示例4: get_export_to_pdf_button

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

        export_to_pdf_button = ButtonNewWdg(title='Export to PDF', icon='ARROW_DOWN')
        export_to_pdf_button.add_class('export_to_pdf_button')
        export_to_pdf_button.add_behavior(self.get_export_to_pdf_behavior(self.metadata_report_sobject.get_code()))

        section_span.add(export_to_pdf_button)

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

示例5: get_add_row_button

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

        add_row_button = ButtonNewWdg(title='Add Row', icon='ADD')
        add_row_button.add_class('add_row_button')
        add_row_button.add_behavior(get_add_audio_configuration_line_behavior(self.element_evaluation_code))

        section_span.add(add_row_button)

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

示例6: get_save_as_new_version_button

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

        save_as_new_version_button = ButtonNewWdg(title='Save As New Version', icon='INSERT')
        save_as_new_version_button.add_class('save_as_new_version_button')
        save_as_new_version_button.add_behavior(self.get_save_as_new_version_behavior())

        section_span.add(save_as_new_version_button)

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

示例7: get_save_button

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

        save_button = ButtonNewWdg(title='Save', icon='SAVE')
        save_button.add_class('save_button')
        save_button.add_behavior(self.get_save_behavior(self.metadata_report_sobject.get_code()))

        section_span.add(save_button)

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

示例8: get_save_new_button

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

        save_new_button = ButtonNewWdg(title='Save', icon='NEW')
        save_new_button.add_class('save_due_date')
        save_new_button.add_behavior(self.get_save_new_behavior())

        section_span.add(save_new_button)

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

示例9: get_remove_row_button

# 需要导入模块: from pyasm.web import SpanWdg [as 别名]
# 或者: from pyasm.web.SpanWdg import add_style [as 别名]
    def get_remove_row_button(self, line_code):
        section_span = SpanWdg()
        section_span.add_style('display', 'inline-block')

        remove_row_button = ButtonNewWdg(title='Remove Row', icon='DELETE')
        remove_row_button.add_class('remove_row_button')
        remove_row_button.add_behavior(get_remove_audio_configuration_line_behavior(self.element_evaluation_code,
                                                                                    line_code))

        section_span.add(remove_row_button)

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

示例10: get_new_tab_wdg

# 需要导入模块: from pyasm.web import SpanWdg [as 别名]
# 或者: from pyasm.web.SpanWdg import add_style [as 别名]
    def get_new_tab_wdg(self):
        widget = Widget()

        span = SpanWdg()
        swap = SwapDisplayWdg.get_triangle_wdg()
        title = SpanWdg("Tab Creation")
        span.add(swap)
        span.add(title)
        span.add_style("float: left")
        widget.add(span)
        widget.add(HtmlElement.br() )

        # add the tab selector
        div = DivWdg()
        SwapDisplayWdg.create_swap_title( title, swap, div)

        tab_text = TextWdg("tab")
        tab_text.set_persistence()
        span = SpanWdg(css="med")
        span.add("Tab: ")
        span.add(tab_text)
        div.add(span)

        # parent
        index_text = TextWdg("parent_tab")
        index_text.set_persistence()
        span = SpanWdg(css="med")
        span.add("Parent Tab: ")
        span.add(index_text)
        span.add(HintWdg("Enter the name of the tab that this will fall under. Leave empty to put on the main tab") )
        div.add(span)


        # index
        index_text = TextWdg("index")
        index_text.set_attr("size", "4")
        index_text.set_persistence()
        span = SpanWdg(css="med")
        span.add("Index: ")
        span.add(index_text)
        span.add(HintWdg("Enter the numeric location for this tab to be placed") )
        div.add(span)

        WebContainer.register_cmd("CreateTabCmd")
        button = IconSubmitWdg("Create Tab", IconWdg.CREATE, True)
        div.add(button)

        widget.add(div)

        return widget
开发者ID:mincau,项目名称:TACTIC,代码行数:52,代码来源:custom_view_app_wdg.py

示例11: get_client_section

# 需要导入模块: from pyasm.web import SpanWdg [as 别名]
# 或者: from pyasm.web.SpanWdg import add_style [as 别名]
    def get_client_section(self):
        section_div = DivWdg()

        client_span = SpanWdg()
        client_span.add_style('display', 'inline-block')
        client_span.add('Client: ')
        client_span.add(self.get_client_select())

        status_span = SpanWdg()
        status_span.add_style('display', 'inline-block')
        status_span.add('Status: ')
        status_span.add(self.get_status_select())

        section_div.add(client_span)
        section_div.add(status_span)

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

示例12: get_display

# 需要导入模块: from pyasm.web import SpanWdg [as 别名]
# 或者: from pyasm.web.SpanWdg import add_style [as 别名]
    def get_display(self):
        ajax = AjaxCmd()
        ajax.register_cmd("pyasm.widget.ClipboardAddCbk")
        progress = ajax.generate_div()
        progress.add_style('display', 'inline')

        search_type = self.sobject.get_search_type()
        search_id = self.sobject.get_id()
        ajax.set_option("search_type", search_type)
        ajax.set_option("search_id", search_id)

        search_key = self.sobject.get_search_key()

        span = SpanWdg()
        span.set_id("clipboard_%s" % search_key)
        span.add_style("display: none")

        checkbox = CheckboxWdg()
        checkbox.add_style("vertical-align: top")
        checkbox.add_style("width: 7px")

        checkbox.add_event("onclick", "%s" % ajax.get_on_script(show_progress=False) )
        #checkbox.add_event("onmouseover", "this.style.width=15")
        #checkbox.add_event("onmouseout", "this.style.width=7")
        
        # FIXME :DEPRECATED
        """
        event = WebContainer.get_event_container()
        caller = event.get_event_caller(ClipboardWdg.EVENT_ID)

        from file_wdg import ThumbWdg
        post_script = [caller]

        if self.thumbnail_mode: 
            post_script.append( ThumbWdg.get_refresh_script(\
                self.sobject, self.icon_size, show_progress=False) )
        progress.set_post_ajax_script(';'.join(post_script))
        
        if Clipboard.is_selected(self.sobject):
            checkbox.set_option("checked", "1")
        """
        span.add(checkbox)
        span.add(progress)

        return span
开发者ID:mincau,项目名称:TACTIC,代码行数:47,代码来源:clipboard_wdg.py

示例13: get_display

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

        box = DivWdg(css="login")

        box.add_style("margin-top: auto")
        box.add_style("margin-bottom: auto")
        box.add_style("text-align: center")

        script = HtmlElement.script(
            """function login(e) {
                if (!e) var e = window.event;
                if (e.keyCode == 13) {
                submit_icon_button('Submit');
                }}
                """
        )

        div = DivWdg()
        div.add_style("margin: 0px 0px")
        div.add_class("centered")

        div.add(HtmlElement.br(6))
        sthpw = SpanWdg("SOUTHPAW TECHNOLOGY INC", css="login_sthpw")
        sthpw.add_style("color: #333")
        div.add(sthpw)
        div.add(HtmlElement.br(2))

        div.add(my.get_error_wdg())
        box.add(div)

        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:hellios78,项目名称:TACTIC,代码行数:46,代码来源:error_wdg.py

示例14: add_file_behaviors

# 需要导入模块: from pyasm.web import SpanWdg [as 别名]
# 或者: from pyasm.web.SpanWdg import add_style [as 别名]
    def add_file_behaviors(my, item_div, dirname, basename):
        item_div.add_class("spt_script_item")
        if not dirname:
            path = "///%s" % (basename)
        else:
            path = "%s/%s" % (dirname, basename)

        scripts = my.kwargs.get("scripts")
        script = scripts.get(path)
        script_code = script.get("code")
        language = script.get("language")
        item_div.add_attr("spt_script_code", script_code)
        item_div.add_style("background", "transparent")

        if language:
            span = SpanWdg()
            span.add_style("font-size: 9px")
            span.add_style("opacity: 0.2")
            span.add(" &nbsp; <i>(%s)</i>" % language)
            item_div.add(span)
开发者ID:nuxping,项目名称:TACTIC,代码行数:22,代码来源:shelf_wdg.py

示例15: get_title

# 需要导入模块: from pyasm.web import SpanWdg [as 别名]
# 或者: from pyasm.web.SpanWdg import add_style [as 别名]
    def get_title(my):
        widget = Widget()
        """
        search_key_wdg = HiddenWdg('search_key')
        search_key_wdg.get_value()
        widget.add(search_key_wdg)
        """
        WebContainer.register_cmd("pyasm.flash.widget.RenderCbk")
        if not my.get_option("no_button"):
            render_button = IconSubmitWdg("Render", IconWdg.RENDER, True, add_hidden=True)

            widget.add(render_button)
        else:
            widget.add("Frame Info")

        float_button = IconSubmitWdg("Render", IconWdg.RENDER, add_hidden=False)
        span = SpanWdg(float_button, css="med")
        span.add_style("border-left", "1px solid #777")
        WebContainer.get_float_menu().add(span)
        return widget
开发者ID:hellios78,项目名称:TACTIC,代码行数:22,代码来源:flash_render_wdg.py


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