(self)
return table
Fake a table for inserting
Fake a table for inserting
Fake a table for inserting
def get_insert_wdg(self):
        '''Fake a table for inserting'''
        #self.group_columns = []
        self.edit_wdgs = {}
        table = Table(mode="div")
        table.add_style("display: none")
        table.add_class("spt_table_insert_table")

        insert_sobject = SearchType.create(self.search_type)

        # set the sobjects to all the widgets then preprocess
        for widget in self.widgets:
            widget.set_sobjects([insert_sobject])
            #widget.set_layout_wdg(table)
            widget.set_parent_wdg(self)
            # preprocess the elements if not in widget mode
            # it has been done otherwise
            if self.mode != 'widget':
                widget.preprocess()


        row = self.handle_row(table, insert_sobject, row=0)
        row.add_class("SPT_TEMPLATE")
        row.add_class("spt_table_insert_row spt_clone")
        # to make focusable
        row.add_attr('tabIndex','-1')

        row.remove_class("spt_table_row")

        return table
def get_insert_wdg ( self ) : #self.group_columns = [] self . edit_wdgs = { } table = Table ( mode = "div" ) table . add_style ( "display: none" ) table . add_class ( "spt_table_insert_table" ) insert_sobject = SearchType . create ( self . search_type ) # set the sobjects to all the widgets then preprocess for widget in self . widgets : widget . set_sobjects ( [ insert_sobject ] ) #widget.set_layout_wdg(table) widget . set_parent_wdg ( self ) # preprocess the elements if not in widget mode # it has been done otherwise if self . mode != 'widget' : widget . preprocess ( ) row = self . handle_row ( table , insert_sobject , row = 0 ) row . add_class ( "SPT_TEMPLATE" ) row . add_class ( "spt_table_insert_row spt_clone" ) # to make focusable row . add_attr ( 'tabIndex' , '-1' ) row . remove_class ( "spt_table_row" ) return table