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


Python Common.get_full_class_name方法代码示例

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


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

示例1: get_display

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def get_display(my):
        div = DivWdg()
        class_path = Common.get_full_class_name(my)

        from tactic.ui.panel import HashPanelWdg
        try:
            widget = HashPanelWdg.get_widget_from_hash("/index", return_none=True)
            div.add(widget)
        except:
            widget = None


        if not widget:
            class_path = class_path.replace("IndexWdg", "IndexWdg2")
            kwargs = {}
            div.add_behavior( {
                'type': 'load',
                'class_path': class_path,
                'kwargs': kwargs,
                'cbjs_action': '''
                spt.dom.load_js(["popup.js"], function() {
                    spt.panel.load(bvr.src_el, bvr.class_path, bvr.kwargs);
                });
                '''
            } )
        return div
开发者ID:funic,项目名称:TACTIC,代码行数:28,代码来源:index_wdg.py

示例2: get_section_wdg

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def get_section_wdg(my, view, editable=True, default=False):

        title = ""
        if editable:
            edit_mode = "edit"
        else:
            edit_mode = "read"
        kwargs = {
            "title": title,
            "config_search_type": my.search_type,
            "view": view,
            "width": "300",
            "mode": edit_mode,
            "default": str(default),
        }
        if view in ["definition", "custom_definition"]:
            kwargs["recurse"] = "false"

        from view_section_wdg import ViewSectionWdg

        section_wdg = ViewSectionWdg(**kwargs)
        class_path = Common.get_full_class_name(section_wdg)

        section_div = DivWdg(css="spt_panel")
        section_div.add_style("display: block")
        section_div.set_attr("spt_class_name", class_path)
        for name, value in kwargs.items():
            if name == "config":
                continue
            section_div.set_attr("spt_%s" % name, value)

        section_div.add(section_wdg)
        return section_div
开发者ID:hellios78,项目名称:TACTIC,代码行数:35,代码来源:view_manager_wdg.py

示例3: get_section_wdg

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def get_section_wdg(my, view, editable=True, default=False):

        title = ""
        if editable:
            edit_mode = 'edit'
        else:
            edit_mode = 'read'
        kwargs = {
            'title': title,
            'config_search_type': my.search_type,
            'view': view,
            'width': '300',
            'mode': edit_mode,
            'default': str(default)
        }
        if view in ["definition", "custom_definition"]:
            kwargs['recurse'] = "false"

        from view_section_wdg import ViewSectionWdg
        section_wdg = ViewSectionWdg(**kwargs)
        class_path = Common.get_full_class_name(section_wdg)


        section_div = DivWdg(css='spt_panel')
        section_div.add_style("display: block")
        section_div.set_attr('spt_class_name', class_path)
        for name, value in kwargs.items():
            if name == "config":
                continue
            section_div.set_attr("spt_%s" % name, value)

        section_div.add(section_wdg)
        return section_div
开发者ID:0-T-0,项目名称:TACTIC,代码行数:35,代码来源:view_manager_wdg.py

示例4: set_as_panel

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def set_as_panel(my, widget):
        widget.add_class("spt_panel")

        widget.add_attr("spt_class_name", Common.get_full_class_name(my) )

        for name, value in my.kwargs.items():
            widget.add_attr("spt_%s" % name, value)
开发者ID:hellios78,项目名称:TACTIC,代码行数:9,代码来源:search_wdg.py

示例5: get_section_wdg

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def get_section_wdg(self, view, editable=True, default=False):

        title = ""
        target_id = "sobject_relation"
        if editable:
            edit_mode = 'edit'
        else:
            edit_mode = 'read'
        kwargs = {
            'title': title,
            'config_search_type': self.search_type,
            'view': view,
            'target_id': target_id,
            'width': '300',
            'prefix': 'manage_side_bar',
            'mode': edit_mode,
            'default': str(default)
        }
        if view in ["definition", "custom_definition"]:
            kwargs['recurse'] = "false"

        section_wdg = ViewSectionWdg(**kwargs)
        class_path = Common.get_full_class_name(section_wdg)

        section_div = DivWdg()
        section_div.add_style("display: block")
        section_div.set_attr('spt_class_name', class_path)
        for name, value in kwargs.items():
            if name == "config":
                continue
            section_div.set_attr("spt_%s" % name, value)

        section_div.add(section_wdg)
        return section_div
开发者ID:mincau,项目名称:TACTIC,代码行数:36,代码来源:view_section_wdg.py

示例6: get_example_chooser_content

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

示例7: setup_ajax

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def setup_ajax(my, display_id):
        # set up ajax
        ajax = AjaxLoader()
        ajax.set_load_class(Common.get_full_class_name(my))
        ajax.set_display_id(display_id)
        ajax_inputs = my.get_ajax_inputs()
        for input in ajax_inputs:
            ajax.set_option(input, my.__dict__.get(input))

        ajax_elements = my.get_ajax_elements()
        for element in ajax_elements:
            ajax.add_element_name(element)
        return ajax.get_on_script()
开发者ID:hellios78,项目名称:TACTIC,代码行数:15,代码来源:naming_wdg.py

示例8: get_display_single_on_load_bvr

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def get_display_single_on_load_bvr(self):
        class_path = Common.get_full_class_name(self)

        top = DivWdg()
        top.add_styles("border: 1px solid black;")

        count = self.kwargs.get('count')
        print "count: ", count
        if count:
            count = int(count)
        else:
            count = 0

        top.add('top: %s' % count)
        top.add_class('my_dynamic_add_div_%s' % count)

        max = 10

        if count == 0:

            top.add_behavior( {
                'type': 'load',
                'cbjs_action': '''
                    var server = TacticServerStub.get();

                    var widget_class = '%s';
                    var count = 1;
                    var max = %s;

                    var main = $('main_body');

                    for( var c=count; c <= max; c++ ) {
                        spt.app_busy.show("Dynamic Loading ...", "Loading widget with count of " + c);
                        var div = document.createElement('div');
                        args = { "count": '' + c };
                        html = server.get_widget(widget_class, {"args": args}) + '<br/>';
                        spt.behavior.replace_inner_html(div, html);
                        main.appendChild(div);
                    }

                    spt.app_busy.hide();
                ''' % (class_path, max)
            } )

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

示例9: set_as_panel

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def set_as_panel(my, widget, class_name='spt_panel', kwargs=None):
        my.top = widget

        widget.add_class(class_name)
        widget.add_attr("spt_class_name", Common.get_full_class_name(my) )

        if not kwargs:
            kwargs = my.kwargs
        for name, value in kwargs.items():
            if name == 'class_name':
                continue
            if value == None:
                continue
            if type(value) not in types.StringTypes:
                value = str(value)
            # replace " with ' in case the kwargs is a dict
            value = value.replace('"', "'")
            widget.add_attr("spt_%s" % name, value)
开发者ID:CeltonMcGrath,项目名称:TACTIC,代码行数:20,代码来源:base_refresh_wdg.py

示例10: get_sobject_wdg

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def get_sobject_wdg(my, sobject, search_type, view="table", title="", show_count=True):

        key = search_type

        search_type_obj = SearchType.get(search_type)
        if not title:
            title = search_type_obj.get_title()

        content_id ='sub_sobj_%s_%s' % (key, sobject.get_id())
        title_id = '%s_head_%s' % (key, sobject.get_id())

        div = DivWdg(id=content_id)
        div.add_style('display','none')
        #div.add_style('width','100%')

        head = DivWdg()
        head.add_style('height','1.8em')
        title_span = my._get_title_span(title) 

        dyn_load = AjaxLoader(display_id=content_id)

        args_dict = {'sobj_search_type': sobject.get_search_type()}
        args_dict['search_id'] = sobject.get_id()
        args_dict['search_type'] = search_type
        args_dict['view'] = view
        
        
        dyn_load.set_load_method('_get_sobject_wdg')
        dyn_load.set_load_class(Common.get_full_class_name(my), load_args=args_dict)
        on_script = dyn_load.get_on_script(load_once=True)

        swap_wdg = my._get_swap_wdg(title_id)
        swap_wdg.add_action_script(on_script, "toggle_display('%s')" %content_id)

        head.add(swap_wdg)
        head.add(title_span)
        my.add_title_style(title_span, title_id, swap_wdg)

        if show_count:
            search = my._get_sobject_search(sobject, search_type)
            title_span.add(" ( %s )" % search.get_count() )
        

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

示例11: get_section_wdg

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def get_section_wdg(my, view, editable=True, default=False):
        from panel_wdg import SideBarBookmarkMenuWdg

        title = ""
        target_id = "sobject_relation"
        if editable:
            edit_mode = 'edit'
        else:
            edit_mode = 'read'
        kwargs = {
            'title': title,
            'config_search_type': my.search_type,
            'view': view,
            'target_id': target_id,
            'width': '300',
            'prefix': 'manage_side_bar',
            'mode': edit_mode,
            'default': str(default)
        }
        if view in ["definition", "custom_definition"]:
            kwargs['recurse'] = "false"
            kwargs['sortable'] = "true"

        section_wdg = SectionListWdg(**kwargs)
        class_path = Common.get_full_class_name(section_wdg)

        # FIXME: get rid of this id
        id = "ManageSideBarBookmark_" + view
        section_div = DivWdg(id=id)
        section_div.add_style("display: block")
        section_div.set_attr('spt_class_name', class_path)
        for name, value in kwargs.items():
            if name == "config":
                continue
            section_div.set_attr("spt_%s" % name, value)

        section_div.add(section_wdg)
        return section_div
开发者ID:blezek,项目名称:TACTIC,代码行数:40,代码来源:view_manager_wdg.py

示例12: get_display_on_load_bvr_on_each_widget

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def get_display_on_load_bvr_on_each_widget(self):
        class_path = Common.get_full_class_name(self)

        top = DivWdg()
        top.add_styles("border: 1px solid black;")

        count = self.kwargs.get('count')
        print "count: ", count
        if count:
            count = int(count)
        else:
            count = 0

        count += 1
        top.add('top: %s' % count)
        top.add_class('my_dynamic_add_div_%s' % count)

        if count < 10:

            top.add_behavior( {
                'type': 'load',
                'cbjs_action': '''
                    var server = TacticServerStub.get();
                    var widget_class = '%s';
                    var args = {
                        count: '%s'
                    };
                    var html = server.get_widget(widget_class, {args:args});
                    var main = $('main_body');

                    var div = document.createElement('div');
                    spt.behavior.replace_inner_html(div, html);
                    main.appendChild(div);

                ''' % (class_path, count)
            } )

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

示例13: serialize

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def serialize(my):
        '''provide the ability for a widget to serialize itself'''

        xml = Xml()
        xml.create_doc("config")

        # create the top element
        element = xml.create_element("element")
        xml.set_attribute(element, "name", my.name)

        # create the display handler
        display = xml.create_element("display")
        xml.set_attribute(display, "class", Common.get_full_class_name(my) )
        element.appendChild(display)

        # create the options
        for name, value in my.kwargs.items():
            if value:
                option = xml.create_text_element(name, value)
            else:  # avoid the \n in the textContent of the textNode 
                option = xml.create_element(name) 
            display.appendChild(option)

        return xml.to_string(element)
开发者ID:CeltonMcGrath,项目名称:TACTIC,代码行数:26,代码来源:base_refresh_wdg.py

示例14: get_display

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

        my.kwargs['search_key'] = 'prod/asset?project=sample3d&code=chr001'



        custom = """<?xml version='1.0' encoding='UTF-8'?>
        <custom>

        <html>
        <div>
            This is html
            <textarea class='spt_test spt_input' name='description'>
</textarea>
            <input class='spt_input' type='text' name='title'/>
            <br/>
            <input class='spt_button1' type='button' value='Press Me'/>
            <input class='spt_button2' type='button' value='Press Me2'/>
            <input class='spt_button3' type='button' value='Calendar'/>
            <input class='spt_refresh' type='button' value='Refresh'/>


            <element>
              <display class='tactic.ui.widget.CalendarWdg'/>
            </element>
            Much simpler!!!
            <elemeent class='CalendarWdg' blah='adasf'/>

        </div>
        </html>
        <behavior class='spt_button1'>{
            "type": "click_up",
            "cbjs_action": '''
            app.mel('sphere');
            //var top = bvr.src_el.getParent(".spt_panel");
            //var values = spt.api.Utility.get_input_values(top);
            //console.log(values);
            '''
        }</behavior>
        <behavior class='spt_button2'>{
            "type": "click_up",
            "cbjs_action": "alert(bvr.kwargs.search_key);"
        }</behavior>
        <behavior class='spt_button3'>{
            "type": "click_up",
            "cbjs_action": '''
            spt.panel.load('main_body', bvr.class_name, bvr.kwargs);
            //spt.panel.load('main_body', 'tactic.ui.widget.CalendarWdg', bvr.kwargs);
            '''
        }</behavior>
        <behavior class='spt_refresh'>{
            "type": "click_up",
            "cbjs_action": '''
            var top = bvr.src_el.getParent(".spt_panel");
            spt.panel.refresh(top);
            '''

        }</behavior>

        </custom>

        """

        xml = Xml()
        xml.read_string(custom)

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

        inner = DivWdg()
        top.add(inner)

        html_node = xml.get_node("custom/html")
        html = xml.to_string(html_node)
        inner.add(html)

        behaviors = xml.get_nodes("custom/behavior")
        for behavior in behaviors:
            css_class = Xml.get_attribute(behavior, 'class')
            value = Xml.get_node_value(behavior)
            value = eval(value)

            # add the kwargs to this so behaviors have access
            value['kwargs'] = my.kwargs
            value['class_name'] = Common.get_full_class_name(my)

            inner.add_behavior({
                'type': 'load',
                'value': value,
                'css_class': css_class,
                'cbjs_action': '''
                var el = bvr.src_el.getElement("."+bvr.css_class);
                if (!el) {
                    alert("WARNING: element ["+bvr.css_clsss+"] does not exist");
                }
                spt.behavior.add( el, bvr.value);
                '''
            })
#.........这里部分代码省略.........
开发者ID:0-T-0,项目名称:TACTIC,代码行数:103,代码来源:test_custom_wdg.py

示例15: get_subdisplay

# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_full_class_name [as 别名]
    def get_subdisplay(my, views):
        div = DivWdg()
        div.set_attr('spt_class_name', Common.get_full_class_name(my))

        div.add( my.get_bookmark_menu_wdg("", None, views) )
        return div
开发者ID:davidsouthpaw,项目名称:TACTIC,代码行数:8,代码来源:simple_side_bar_wdg.py


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