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


Python TextAreaWdg.set_value方法代码示例

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


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

示例1: get_advanced_definition_wdg

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
    def get_advanced_definition_wdg(self):
        # add the advanced entry
        advanced = DivWdg()
        advanced.add_style("margin-top: 10px")
        advanced.add_style("padding: 10px")
        advanced.add_border()
        title = DivWdg()
        title.add_style("color: black")
        title.add("Advanced - XML Column Definition")
        title.add_style("margin-top: -23")
        advanced.add(title)
        advanced.add("<br/>")

        input = TextAreaWdg("config_xml")
        input.set_id("config_xml")
        input.set_option("rows", "10")
        input.set_option("cols", "70")
        input.set_value(self.config_string)
        advanced.add(input)
        advanced.add(HtmlElement.br(2))

        button_div = DivWdg()
        button_div.add_style("text-align: center")
        

        button = ActionButtonWdg(title="Save Definition") 
        #button = ProdIconButtonWdg("Save Definition")
        button.add_event("onclick", "spt.custom_project.save_definition_cbk()")
        button_div.add(button)
        button_div.add_style("margin-left: 130px")
        advanced.add(button_div)

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

示例2: get_custom_layout_wdg

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
    def get_custom_layout_wdg(my, layout_view):

        content_div = DivWdg()

        from tactic.ui.panel import CustomLayoutWdg
        layout = CustomLayoutWdg(view=layout_view)
        content_div.add(layout)

        for widget in my.widgets:
            name = widget.get_name()
            if my.input_prefix:
                widget.set_input_prefix(my.input_prefix)

            layout.add_widget(widget, name)



        search_key = SearchKey.get_by_sobject(my.sobjects[0], use_id=True)
        search_type = my.sobjects[0].get_base_search_type()


        element_names = my.element_names[:]
        for element_name in my.skipped_element_names:
            element_names.remove(element_name)


        config_xml = my.kwargs.get("config_xml")
        bvr =  {
            'type': 'click_up',
            'mode': my.mode,
            'element_names': element_names,
            'search_key': search_key,
            'input_prefix': my.input_prefix,
            'view': my.view,
            'config_xml': config_xml
        }

        if my.mode == 'insert':
            bvr['refresh'] = 'true'
            # for adding parent relationship in EditCmd
            if my.parent_key:
                bvr['parent_key'] = my.parent_key


        hidden_div = DivWdg()
        hidden_div.add_style("display: none")
        content_div.add(hidden_div)

        hidden = TextAreaWdg("__data__")
        hidden_div.add(hidden)
        hidden.set_value( jsondumps(bvr) )

        show_action = my.kwargs.get("show_action")
        if show_action in [True, 'true']:
            content_div.add( my.get_action_html() )

        return content_div
开发者ID:funic,项目名称:TACTIC,代码行数:59,代码来源:edit_wdg.py

示例3: get_display

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

        wdg = TextAreaWdg(my.get_input_name())
        wdg.set_attr("rows", "8")
        parent_asset_code = WebContainer.get_web().get_form_value("edit|related")
        asset = Asset.get_by_code(parent_asset_code)
        if asset:
            wdg.set_value(asset.get_description())
        return wdg
开发者ID:0-T-0,项目名称:TACTIC,代码行数:11,代码来源:related_asset_wdg.py

示例4: get_display

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
    def get_display(self):
        self.run_init()

        name = self.get_name()
        if not name:
            name = self.kwargs.get("name")
        if self.is_refresh:
            widget = Widget()
        else:   
            widget = DivWdg()
            self.set_as_panel(widget) 

            widget.add_class("spt_note_top")

            widget.set_attr("spt_name", name)
            widget.set_attr("spt_parent_key", self.parent_key)
            
        web = WebContainer.get_web()
        value = web.get_form_value(name)

        text = TextAreaWdg(name)
        widget.add(text)
        if value:
            text.set_value(value)
        text.add_style("width: 100%")
        text.add_style("min-width: 200")
        text.add_attr("rows", "5")
        text.add_class('spt_note_text')

        color = text.get_color("background", -10);

        text.add_behavior( {
        'type': 'blur',
        'cbjs_action': '''
        //spt.dg_table._toggle_commit_btn($(this), false);
        var el = bvr.src_el;
        var td = el.getParent(".spt_table_td");
        var tbody = el.getParent(".spt_table_tbody");
        td.setStyle('background-color','#909977');
        td.addClass('spt_value_changed');
        tbody.addClass('spt_value_changed');
        td.setAttribute('spt_input_value', el.value);
        '''
        } )

        #text.add_event("onblur", "spt.dg_table._toggle_commit_btn($(this), false);$(this).getParent('.spt_table_td').setStyle('background-color','#030');$(this).getParent('.spt_table_td').addClass('spt_value_changed');$(this).getParent('.spt_table_tbody').addClass('spt_value_changed');$(this).getParent('.spt_table_td').setAttribute('spt_input_value',this.value)")
        #text.add_event("onclick", "spt.dg_table.edit_cell_cbk( this, spt.kbd.special_keys_map.ENTER)" );
        #behavior = {
        #    'type': 'keyboard',
        #    'kbd_handler_name': 'DgTableMultiLineTextEdit'
        #}
        #text.add_behavior(behavior)
        action_wdg = self.get_action_wdg(name)
        widget.add(action_wdg)
        return widget
开发者ID:mincau,项目名称:TACTIC,代码行数:57,代码来源:note_wdg.py

示例5: get_text_area_input_wdg

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
    def get_text_area_input_wdg(self, name, id):
        text_area_wdg = TextAreaWdg()
        text_area_wdg.set_id(id)

        if hasattr(self, id):
            text_area_wdg.set_value(getattr(self, id))

        text_area_div = DivWdg(name)
        text_area_div.add_style('font-weight', 'bold')

        section_div = DivWdg()
        section_div.add_style('margin', '10px')
        section_div.add(text_area_div)
        section_div.add(text_area_wdg)

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

示例6: get_general_comments_section

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
    def get_general_comments_section(self):
        general_comments_div = DivWdg()
        general_comments_div.add_style('margin', '10px')
        general_comments_wdg = TextAreaWdg()
        general_comments_wdg.set_id('general_comments')
        general_comments_wdg.set_name('general_comments')

        if hasattr(self, 'general_comments'):
            general_comments_wdg.set_value(self.general_comments)

        general_comments_text_div = DivWdg('General Comments')
        general_comments_text_div.add_style('font-weight', 'bold')
        general_comments_div.add(general_comments_text_div)
        general_comments_div.add(general_comments_wdg)

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

示例7: handle_xml_mode

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
    def handle_xml_mode(my, custom_table, mode):

        tbody = custom_table.add_tbody()
        tbody.add_class("spt_custom_xml")
        if mode != 'xml':
            tbody.add_style('display: none')

        # extra for custom config_xml
        custom_table.add_row()

        td = custom_table.add_cell()
        td.add("Config XML Definition")


        div = DivWdg()
        div.set_id("config_xml_options")
        #div.add_style("display: none")
        div.add_style("margin-top: 10px")


        default = '''
<element name=''>
  <display class=''>
    <option></option>
  </display>
</element>
        '''
        config_xml_wdg = TextAreaWdg("config_xml")
        config_xml_wdg.set_option("rows", "8")
        config_xml_wdg.set_option("cols", "50")
        config_xml_wdg.set_value(default)
        div.add( config_xml_wdg )

        custom_table.add_cell(div)

        # create columns
        custom_table.add_row()
        td = custom_table.add_cell()
        create_columns_wdg = CheckboxWdg("create_columns")
        create_columns_wdg.set_checked()
        td.add("Create required columns? ")

        td = custom_table.add_cell()
        td.add(create_columns_wdg)


        custom_table.close_tbody()
开发者ID:0-T-0,项目名称:TACTIC,代码行数:49,代码来源:custom_property_wdg.py

示例8: get_data_wdg

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]

#.........这里部分代码省略.........
            name_div.add(category_div)
            checkbox = RadioWdg("category")
            checkbox.set_option("value", "by_week")
            category_div.add(checkbox)
            category_div.add(" Categorize files by Week")
            category_div.add_style("margin-bottom: 5px")


            category_div = DivWdg()
            name_div.add(category_div)
            checkbox = RadioWdg("category")
            checkbox.set_option("value", "by_year")
            category_div.add(checkbox)
            category_div.add(" Categorize files by Year")
            category_div.add_style("margin-bottom: 5px")


            """
            checkbox = RadioWdg("category")
            checkbox.set_option("value", "custom")
            name_div.add(checkbox)
            name_div.add(" Custom")
            """

            name_div.add("<br/>")


 
        hidden = HiddenWdg(name="parent_key")
        dialog_data_div.add(hidden)
        hidden.add_class("spt_parent_key")
        parent_key = my.kwargs.get("parent_key") or ""
        if parent_key:
            hidden.set_value(parent_key)




 
        dialog_data_div.add("Keywords:<br/>")
        dialog.add(dialog_data_div)
        text = TextAreaWdg(name="keywords")
        dialog_data_div.add(text)
        text.add_class("spt_keywords")
        text.add_style("padding: 1px")


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


        extra_data = my.kwargs.get("extra_data")
        if not isinstance(extra_data, basestring):
            extra_data = jsondumps(extra_data)

        dialog_data_div.add("Extra Data (JSON):<br/>")
        text = TextAreaWdg(name="extra_data")
        dialog_data_div.add(text)
        if extra_data != "null":
            text.set_value(extra_data)
        text.add_class("spt_extra_data")
        text.add_style("padding: 1px")



        #### TEST Image options
        """
开发者ID:funic,项目名称:TACTIC,代码行数:70,代码来源:ingest_wdg.py

示例9: get_display

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

        view = my.kwargs.get("view")
        top.add_class("spt_help_edit_content")


        search = Search("config/widget_config")
        search.add_filter("category", "HelpWdg")
        search.add_filter("view", view)
        sobject = search.get_sobject()

        if not sobject:
            value = ""
            search_key = ""

        else:
            xml_value = sobject.get_xml_value("config")
            value = xml_value.get_value("config/%s/html/div" % (view) )
            search_key = sobject.get_search_key()


        title_wdg = DivWdg()
        top.add(title_wdg)
        title_wdg.add("<b>View: %s</b>" % view)
        title_wdg.add_style("font-style: bold")
        title_wdg.add_style("padding: 5px")
        title_wdg.add_gradient("background", "background", 0, -10)


        hidden = HiddenWdg("view")
        top.add(hidden)
        hidden.set_value(view)


        text = TextAreaWdg("content")
        text_id = text.set_unique_id()
        text.set_value(value)

        from tactic.ui.widget import ActionButtonWdg
        if sobject:
            delete_button = ActionButtonWdg(title="Delete")
            top.add(delete_button)
            delete_button.add_style("float: right")
            delete_button.add_style("margin-top: -3px")
            delete_button.add_behavior( {
            'type': 'click_up',
            'search_key': search_key,
            'cbjs_action': '''
            if (!confirm("Are you sure you wish to delete this help page?")) {
                return;
            }
            var server = TacticServerStub.get();
            server.delete_sobject(bvr.search_key);
            var top = bvr.src_el.getParent(".spt_help_edit_top");
            spt.panel.refresh(top);
            '''
            })



        test_button = ActionButtonWdg(title="Preview")
        top.add(test_button)
        test_button.add_style("float: right")
        test_button.add_style("margin-top: -3px")
        test_button.add_behavior( {
        'type': 'click_up',
        'text_id': text_id,
        'cbjs_action': '''

        var js_file = "ckeditor/ckeditor.js";

        var url = "/context/spt_js/" + js_file;
        var js_el = document.createElement("script");
        js_el.setAttribute("type", "text/javascript");
        js_el.setAttribute("src", url);

        var head = document.getElementsByTagName("head")[0];
        head.appendChild(js_el);



        var cmd = "CKEDITOR.instances." + bvr.text_id + ".getData()";
        var text_value = eval( cmd );

        bvr.options = {};
        bvr.options.html = text_value;
        spt.named_events.fire_event("show_help", bvr)
        '''
        })



        save_button = ActionButtonWdg(title="Save")
        top.add(save_button)
        save_button.add_style("float: right")
        save_button.add_style("margin-top: -3px")

        top.add("<br/>")

#.........这里部分代码省略.........
开发者ID:2gDigitalPost,项目名称:tactic_src,代码行数:103,代码来源:help_wdg.py

示例10: get_action_html

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
    def get_action_html(my):


        search_key = SearchKey.get_by_sobject(my.sobjects[0], use_id=True)
        search_type = my.sobjects[0].get_base_search_type()


        div = DivWdg(css='centered')


        # construct the bvr
        element_names = my.element_names[:]
        for element_name in my.skipped_element_names:
            element_names.remove(element_name)

        bvr =  {
            'type': 'click_up',
            'mode': my.mode,
            'element_names': element_names,
            'search_key': search_key,
            'input_prefix': my.input_prefix,
            'view': my.view
        }

        if my.mode == 'insert':
            bvr['refresh'] = 'true'
            # for adding parent relationship in EditCmd
            if my.parent_key:
                bvr['parent_key'] = my.parent_key




        hidden_div = DivWdg()
        hidden_div.add_style("display: none")
        div.add(hidden_div)

        hidden = TextAreaWdg("__data__")
        hidden_div.add(hidden)
        hidden.set_value( jsondumps(bvr) )

        show_action = my.kwargs.get("show_action")
        if show_action in [False, 'false']:
            return div



 
        div.add_styles('height: 35px; margin-top: 5px;')
        div.add_named_listener('close_EditWdg', '''
            var popup = spt.popup.get_popup( $('edit_popup') );
            if (popup != null) {
                spt.popup.destroy(popup);
            }
            ''')

     
        # custom callbacks
        cbjs_cancel = my.kwargs.get('cbjs_cancel')
        if not cbjs_cancel:
            cbjs_cancel = '''
            spt.named_events.fire_event('preclose_edit_popup', {});
            spt.named_events.fire_event('close_EditWdg', {})
            '''

        # custom callbacks
        cbjs_insert_path = my.kwargs.get('cbjs_%s_path' % my.mode)
        cbjs_insert = None
        if cbjs_insert_path:
            script_obj = CustomScript.get_by_path(cbjs_insert_path)
            if script_obj:
                cbjs_insert = script_obj.get_value("script")

        # get it inline
        if not cbjs_insert:
            cbjs_insert = my.kwargs.get('cbjs_%s' % my.mode)

        # use a default
        if not cbjs_insert:
            mode_label = my.mode.capitalize()
            cbjs_insert = '''
            spt.app_busy.show("%sing items", "");
            spt.edit.edit_form_cbk(evt, bvr);
            spt.app_busy.hide();
            '''%mode_label

        save_event = my.kwargs.get('save_event')
        if not save_event:
            save_event = div.get_unique_event("save")
        bvr['save_event'] = save_event
        bvr['named_event'] = 'edit_pressed'

        bvr['cbjs_action'] = cbjs_insert

        
        ok_btn_label = my.mode.capitalize()
        if ok_btn_label == 'Edit':
            ok_btn_label = 'Save'
        if ok_btn_label == 'Insert':
            ok_btn_label = 'Add'
#.........这里部分代码省略.........
开发者ID:funic,项目名称:TACTIC,代码行数:103,代码来源:edit_wdg.py

示例11: get_display

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
    def get_display(my):
        sobject = my.get_current_sobject()

        # handle the start and end
        frame_start = sobject.get_value("tc_frame_start")
        frame_end = sobject.get_value("tc_frame_end")

        frame_start_text = TextWdg("tc_frame_start")
        frame_start_text.set_value(frame_start)
        frame_start_text.set_option("size", "2")

        frame_end_text = TextWdg("tc_frame_end")
        frame_end_text.set_value(frame_end)
        frame_end_text.set_option("size", "2")

        # handle the notes
        frame_notes = sobject.get_value("frame_note")
        frame_notes_text = TextAreaWdg("frame_note")
        frame_notes_text.set_value(frame_notes)
        frame_notes_text.set_option("rows", "2")


        # handle the in and out handles
        frame_in = sobject.get_value("frame_in")
        frame_out = sobject.get_value("frame_out")

        frame_in_text = TextWdg("frame_in")
        frame_in_text.set_value(frame_in)
        frame_in_text.set_option("size", "2")

        frame_out_text = TextWdg("frame_out")
        frame_out_text.set_value(frame_out)
        frame_out_text.set_option("size", "2")


        div = DivWdg()


        table = Table()
        div.add(table)
        table.add_row()
        td = table.add_cell("Range:")
        td.add_style("width: 100px")
        td = table.add_cell()
        td.add_style("text-align: right")
        td.add_style("padding: 5px")
        td.add("start: ")
        td.add(frame_start_text)
        td = table.add_cell()
        td.add_style("text-align: right")
        td.add_style("padding: 5px")
        td.add("end: ")
        td.add(frame_end_text)

        table.add_row()
        table.add_cell("Handles:")
        td = table.add_cell()
        td.add_style("text-align: right")
        td.add_style("padding: 5px")
        td.add("in: ")
        td.add(frame_in_text)
        td = table.add_cell()
        td.add_style("text-align: right")
        td.add_style("padding: 5px")
        td.add("out: ")
        td.add(frame_out_text)
        td.add("<br/>")

        table.add_row()
        table.add_cell("Notes:")
        td = table.add_cell(frame_notes_text)
        td.add_style("padding: 5px")
        td.add_attr("colspan", "2")

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

示例12: get_import_wdg

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
    def get_import_wdg(self):
        div = DivWdg()

        if self.data:

            div.add("<br/>"*2)
            div.add("The following TACTIC share was found: ")
            div.add("<br/>"*2)

            data_input = TextAreaWdg("data")
            data_input.add_style("display: none")
            div.add(data_input)

            #print "xxxx: ", self.data
            data_str = jsondumps(self.data)
            #data_str = data_str.replace('"', "'")
            print "data: ", data_str
            data_input.set_value(data_str)




            table = Table()
            div.add(table)
            table.set_max_width()
            table.add_style("margin-left: 20px")
            table.add_style("margin-right: 20px")

            for name, value in self.data.items():
                name = Common.get_display_title(name)
                table.add_row()
                table.add_cell(name)
                table.add_cell(value)



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

            div.add( self.get_versions_wdg() )

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

            # check to see if the project exists
            project_code = self.data.get("project_code")
            project_code = self.data.get("projects")
            project = Project.get_by_code(project_code)
            #if project:
            if False:
                msg_div = DivWdg()
                div.add(msg_div)
                msg_div.add_style("padding: 20px")
                msg_div.add_color("background", "background3")
                msg_div.add_color("color", "color")
                msg_div.add_border()

                icon = IconWdg("WARNING", IconWdg.WARNING)
                msg_div.add(icon)
                icon.add_style("float: left")

                msg_div.add("The project with code [%s] already exists.  You must remove the installed project before trying to import this one." % project_code)
                return div





            if self.data.get("is_encrypted") == "true":
                div.add("The transactions in this share is encrypted.  Please provide an encryption key to decrypt the transactions<br/><br/>")
                div.add("Encryption Key: ")
                text = TextWdg("encryption_key")
                div.add(text)
                div.add("<br/>"*2)

            button = ActionButtonWdg(title="Import >>")
            button.add_style("float: right")
            div.add(button)
            div.add("<br/>"*2)
            button.add_behavior( {
                'type': 'click_up',
                'project_code': project_code,
                'cbjs_action': '''
                spt.app_busy.show("Importing Project "+bvr.project_code+"...");
                var top = bvr.src_el.getParent(".spt_sync_import_top");
                var values = spt.api.Utility.get_input_values(top, null, false);
                var cmd = "tactic.ui.sync.SyncImportCmd";
                var server = TacticServerStub.get();
                server.execute_cmd(cmd, values, {}, {use_transaction: false});
                spt.notify.show_message("Finished importing project");
                spt.app_busy.hide();
                document.location = '/tactic/'+bvr.project_code;
                '''
            } )



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

示例13: CKEditorWdg

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
class CKEditorWdg(BaseRefreshWdg):

    def init(self):
        name = self.kwargs.get("name")
        assert(name)
        self.text = TextAreaWdg(name)
        self.text_id = self.kwargs.get("text_id")
        if not self.text_id:
            self.text_id = self.text.set_unique_id()
    def get_display(self):

        top = self.top
        top.add_style("min-width: 600px")

        top.add_class("spt_ckeditor_top")
        top.add_attr("text_id", self.text_id)

        top.add(self.text)

        value = self.kwargs.get("value")
        if value:
            self.text.set_value(value)

        self.text.add_style("width: 100%")
        self.text.add_style("height: 100%")
        self.text.add_style("min-height: 500px")
        self.text.add_style("display: none")
        self.text.set_id(self.text_id)

        self.text.add_behavior( {
        'type': 'load',
        'color': self.text.get_color("background", -10),
        'text_id': self.text_id,
        'cbjs_action': '''

        /*
        var js_file = "ckeditor/ckeditor.js";
        var url = "/context/spt_js/" + js_file;
        var js_el = document.createElement("script");
        js_el.setAttribute("type", "text/javascript");
        js_el.setAttribute("src", url);
        var head = document.getElementsByTagName("head")[0];
        head.appendChild(js_el);
        */
        var init =  function() {

CKEDITOR.on( 'instanceReady', function( ev )
{
    ev.editor.dataProcessor.writer.indentationChars = ' ';
});


var config = {
  toolbar: 'Full',
  uiColor: bvr.color,
  height: '800px'
};

/*
config.toolbar_Full =
[
    ['Source'],
    //['Cut','Copy','Paste'],
    ['Undo','Redo','-','Find','Replace'],
    ['Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
    ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
    '/',
    ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
    ['HorizontalRule','SpecialChar'],
    ['Styles','Format','FontSize'],
    ['TextColor','BGColor'],
    ['Maximize', 'ShowBlocks']
];


*/

config.toolbar_Full =
[
    { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
    { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
    { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
    { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 
        'HiddenField' ] },
    '/',
    { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
    { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
    '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
    { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
    { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
    '/',
    { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
    { name: 'colors', items : [ 'TextColor','BGColor' ] },
    { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
];


config.entities = false;
config.basicEntities = false;
#.........这里部分代码省略.........
开发者ID:mincau,项目名称:TACTIC,代码行数:103,代码来源:ckeditor_wdg.py

示例14: get_display

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]
    def get_display(my):
        sobject = my.get_current_sobject()

        # handle the start and end
        frame_start = sobject.get_value("tc_frame_start")
        frame_end = sobject.get_value("tc_frame_end")

        frame_start_text = TextWdg("tc_frame_start")
        frame_start_text.set_value(frame_start)
        frame_start_text.set_option("size", "2")

        frame_end_text = TextWdg("tc_frame_end")
        frame_end_text.set_value(frame_end)
        frame_end_text.set_option("size", "2")

        # handle the notes
        frame_notes = sobject.get_value("frame_note")
        frame_notes_text = TextAreaWdg("frame_note")
        frame_notes_text.set_value(frame_notes)
        frame_notes_text.set_option("rows", "1")


        # handle the in and out handles
        frame_in = sobject.get_value("frame_in")
        frame_out = sobject.get_value("frame_out")

        frame_in_text = TextWdg("frame_in")
        frame_in_text.set_value(frame_in)
        frame_in_text.set_option("size", "2")

        frame_out_text = TextWdg("frame_out")
        frame_out_text.set_value(frame_out)
        frame_out_text.set_option("size", "2")


        div = DivWdg()


        table = Table()
        div.add(table)
        table.add_row()
        td = table.add_cell("Range:")
        td.add_style("width: 100px")
        td = table.add_cell()
        td.add("start: ")
        td.add(frame_start_text)
        td.add(" - end: ")
        td.add(frame_end_text)

        table.add_row()
        table.add_cell("Handles:")
        td = table.add_cell()
        td.add("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in: ")
        td.add(frame_in_text)
        td.add(" - out: ")
        td.add(frame_out_text)
        td.add("<br/>")

        table.add_row()
        table.add_cell("Notes:")
        td = table.add_cell(frame_notes_text)

        """
        div.add("Range - start: ")
        div.add(frame_start_text)
        div.add(" - end: ")
        div.add(frame_end_text)
        div.add("<br/>")
        div.add("Handles - in: ")
        div.add(frame_in_text)
        div.add(" - out: ")
        div.add(frame_out_text)
        div.add("<br/>")
        div.add("Notes:")
        div.add(frame_notes_text)
        """

        return div
开发者ID:blezek,项目名称:TACTIC,代码行数:80,代码来源:prod_input_wdg.py

示例15: get_display

# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_value [as 别名]

#.........这里部分代码省略.........
        })
        buttons_list.append( {'label': 'Save as Def', 'tip': 'Save as Definition',
                'bvr': { 'cbjs_action': "alert('Not Implemented')" }
        })

        buttons = TextBtnSetWdg( float="right", buttons=buttons_list,
                                 spacing=6, size='small', side_padding=4 )


        inner_div.add(buttons)


        title_div = DivWdg()
        title_div.add_style("margin-bottom: 10px")
        title_div.add_class("maq_search_bar")
        title_div.add("Element Definition")
        inner_div.add(title_div)



        test = SimpleElementDefinitionWdg(config_view=config_view, element_name=element_name)
        inner_div.add(test)



        config_title_wdg = DivWdg()
        inner_div.add(config_title_wdg)
        config_title_wdg.add("<b>Definitions in config</b>")
        config_title_wdg.add_style("margin: 15px 0px 5px 0px")

        for config in config_view.get_configs():
            view = config.get_view()
            xml = config.get_element_xml(element_name)

            config_div = DivWdg()
            inner_div.add(config_div)



            # add the title
            from pyasm.widget import SwapDisplayWdg, IconWdg

            view_div = DivWdg()
            view_div.add_class("spt_view")
            config_div.add(view_div)

            if not xml:
                icon_wdg = IconWdg( "Nothing defined", IconWdg.DOT_RED )
                icon_wdg.add_style("float: right")
                view_div.add(icon_wdg)
            else:
                icon_wdg = IconWdg( "Is defined", IconWdg.DOT_GREEN )
                icon_wdg.add_style("float: right")
                view_div.add(icon_wdg)

            swap = SwapDisplayWdg()
            view_div.add(swap)
            swap.add_action_script('''
                var info_wdg = bvr.src_el.getParent('.spt_view').getElement('.spt_info');
                spt.toggle_show_hide(info_wdg);
            ''')


            mode = "predefined"
            file_path = config.get_file_path()
            if not file_path:
                mode = "database"
            elif file_path == 'generated':
                mode = 'generated'
                

            # display the title
            view_div.add("%s" % view)
            view_div.add(" - [%s]" % mode)

            info_div = DivWdg()
            info_div.add_class("spt_info")
            info_div.add_style("margin-left: 20px")
            info_div.add_style("display: none")
            #if not xml:
            #    info_div.add_style("display: none")
            #else:
            #    swap.set_off()
            view_div.add(info_div)

            path_div = DivWdg()
            if not file_path:
                file_path = mode
            path_div.add("Defined in: %s" % file_path)
            info_div.add(path_div)

            text_wdg = TextAreaWdg()
            text_wdg.set_option("rows", 15)
            text_wdg.set_option("cols", 80)
            text_wdg.set_value(xml)
            info_div.add(text_wdg)

            #view_div.add("<hr/>")

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


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