Exemplo n.º 1
0
    def get_info_wdg(self):

        div = DivWdg()
        div.set_name("Info")
        div.add_style("padding: 20px")

        
        table = Table()
        div.add(table)
        table.add_color("color", "color")
        #table.add_style("height: 280px")
        table.set_unique_id()

        table.add_smart_style("spt_table_header", "width", "200px")
        table.add_smart_style("spt_table_header", "text-align", "right")
        table.add_smart_style("spt_table_header", "padding-right", "20px")
        table.add_smart_style("spt_table_header", "margin-bottom", "10px")
        table.add_smart_style("spt_table_element", "vertical-align", "top")

        table.add_row()

        #if self.mode == 'insert':
        #    read_only = False
        #else:
        #    read_only = True
        read_only = False

        code = Config.get_value("install", "server") or ""

        td = table.add_cell()
        td.add_class("spt_table_header")
        td.add("Code: ")
        td.add_style("vertical-align: top")
        text = TextInputWdg(name="code", read_only=read_only)
        td = table.add_cell()
        td.add_class("spt_table_element")
        td.add(text)
        text.set_value(code)

        return div
Exemplo n.º 2
0
    def get_info_wdg(my):

        div = DivWdg()
        div.set_name("Info")
        div.add_style("padding: 20px")

        
        table = Table()
        div.add(table)
        table.add_color("color", "color")
        #table.add_style("height: 280px")
        table.set_unique_id()

        table.add_smart_style("spt_table_header", "width", "200px")
        table.add_smart_style("spt_table_header", "text-align", "right")
        table.add_smart_style("spt_table_header", "padding-right", "20px")
        table.add_smart_style("spt_table_header", "margin-bottom", "10px")
        table.add_smart_style("spt_table_element", "vertical-align", "top")

        table.add_row()

        #if my.mode == 'insert':
        #    read_only = False
        #else:
        #    read_only = True
        read_only = False

        code = Config.get_value("install", "server") or ""

        td = table.add_cell()
        td.add_class("spt_table_header")
        td.add("Code: ")
        td.add_style("vertical-align: top")
        text = TextInputWdg(name="code", read_only=read_only)
        td = table.add_cell()
        td.add_class("spt_table_element")
        td.add(text)
        text.set_value(code)

        return div
Exemplo n.º 3
0
    def get_info_wdg(my):

        div = DivWdg()
        div.set_name("Info")
        div.add_style("padding: 20px")

        
        table = Table()
        div.add(table)
        table.add_color("color", "color")
        #table.add_style("height: 280px")
        table.set_unique_id()

        table.add_smart_style("spt_table_header", "width", "200px")
        table.add_smart_style("spt_table_header", "text-align", "right")
        table.add_smart_style("spt_table_header", "padding-right", "20px")
        table.add_smart_style("spt_table_header", "margin-bottom", "10px")
        table.add_smart_style("spt_table_element", "vertical-align", "top")


        #if my.mode == 'insert':
        #    read_only = False
        #else:
        #    read_only = True
        read_only = False

        code = my.server.get_code() or ""
        description = my.server.get_value("description") or ""

        table.add_row()

        td = table.add_cell()
        td.add_class("spt_table_header")
        td.add("Code: ")
        td.add_style("vertical-align: top")
        text = TextInputWdg(name="code", read_only=read_only)
        td = table.add_cell()
        td.add_class("spt_table_element")
        td.add(text)
        text.set_value(code)

        table.add_row()
        td = table.add_cell()
        td.add_class("spt_table_header")
        td.add("Description: ")
        td.add_style("vertical-align: top")
        text = TextAreaWdg(name="description", read_only=read_only)
        td = table.add_cell()
        td.add_class("spt_table_element")
        td.add(text)
        text.set_value(description)

        table.add_row()
        td = table.add_cell()
        td.add_class("spt_table_header")
        td.add("Base Directory: ")
        td.add_style("vertical-align: top")
        text = TextInputWdg(name="base_dir", read_only=read_only)
        td = table.add_cell()
        td.add_class("spt_table_element")
        td.add(text)
        text.set_value(my.base_dir)



        return div
Exemplo n.º 4
0
    def get_info_wdg(my):

        div = DivWdg()
        div.set_name("Info")
        div.add_style("padding: 20px")

        table = Table()
        div.add(table)
        table.add_color("color", "color")
        #table.add_style("height: 280px")
        table.set_unique_id()

        table.add_smart_style("spt_table_header", "width", "200px")
        table.add_smart_style("spt_table_header", "text-align", "right")
        table.add_smart_style("spt_table_header", "padding-right", "20px")
        table.add_smart_style("spt_table_header", "margin-bottom", "10px")
        table.add_smart_style("spt_table_element", "vertical-align", "top")

        #if my.mode == 'insert':
        #    read_only = False
        #else:
        #    read_only = True
        read_only = False

        code = my.server.get_code() or ""
        description = my.server.get_value("description") or ""

        table.add_row()

        td = table.add_cell()
        td.add_class("spt_table_header")
        td.add("Code: ")
        td.add_style("vertical-align: top")
        text = TextInputWdg(name="code", read_only=read_only)
        td = table.add_cell()
        td.add_class("spt_table_element")
        td.add(text)
        text.set_value(code)

        table.add_row()
        td = table.add_cell()
        td.add_class("spt_table_header")
        td.add("Description: ")
        td.add_style("vertical-align: top")
        text = TextAreaWdg(name="description", read_only=read_only)
        td = table.add_cell()
        td.add_class("spt_table_element")
        td.add(text)
        text.set_value(description)

        table.add_row()
        td = table.add_cell()
        td.add_class("spt_table_header")
        td.add("Base Directory: ")
        td.add_style("vertical-align: top")
        text = TextInputWdg(name="base_dir", read_only=read_only)
        td = table.add_cell()
        td.add_class("spt_table_element")
        td.add(text)
        text.set_value(my.base_dir)

        return div