Example #1
0
    def get_content_wdg(my):

        div = DivWdg()
        div.add_class("spt_tool_top")

        table = Table()
        div.add(table)
        table.add_row()

        td = table.add_cell()
        from table_layout_wdg import FastTableLayoutWdg

        kwargs = my.kwargs.copy()

        td.add_style("width: 1%")
        td.add_style("vertical-align: top")
        layout_div = DivWdg()
        layout_div.add_style("min-height: 500px")
        td.add(layout_div)

        element_names = my.kwargs.get("element_names")
        if not element_names:
            kwargs['element_names'] = [
                'name', 'description', 'detail', 'file_list', 'general_checkin'
            ]
        #kwargs['element_names'] = ['preview','name','detail', 'task_summary']

        kwargs['show_shelf'] = False
        kwargs['show_search_limit'] = False
        layout = FastTableLayoutWdg(**kwargs)
        layout_div.add(layout)
        #from tactic.ui.panel import TileLayoutWdg
        #layout = TileLayoutWdg(**my.kwargs)
        #layout_div.add(layout)

        td = table.add_cell()
        td.add_border(color="#EEE")
        td.add_style("vertical-align: top")

        content = DivWdg()
        td.add(content)
        content.add_class("spt_tool_content")
        #content.add_style("margin: -1px")

        no_content_wdg = DivWdg()
        content.add(no_content_wdg)
        no_content_wdg.add("<br/>" * 3)
        no_content_wdg.add("<i>-- No Content --</i>")
        #no_content_wdg.add_style("opacity: 0.5")
        no_content_wdg.add_style("margin: 30px auto")
        no_content_wdg.add_color("color", "color3")
        no_content_wdg.add_color("background", "background3")
        no_content_wdg.add_style("text-align", "center")
        no_content_wdg.add_style("padding-top: 20px")
        no_content_wdg.add_style("padding-bottom: 20px")
        no_content_wdg.add_style("width: 350px")
        no_content_wdg.add_style("height: 110px")
        no_content_wdg.add_border()

        return div
Example #2
0
    def get_content_wdg(self):

        div = DivWdg()
        div.add_class("spt_tool_top")

        #table = Table()
        from tactic.ui.container import ResizableTableWdg
        from table_layout_wdg import FastTableLayoutWdg

        #table = ResizableTableWdg()
        table = Table()
        table.add_style("table-layout", "fixed")
        table.add_style("width: 100%")
        div.add(table)
        table.add_row()

        td = table.add_cell()
        #td.add_style("width: 30%")


        kwargs = self.kwargs.copy()


        td.add_style("vertical-align: top")
        layout_div = DivWdg()
        layout_div.add_style("min-height: 500px")
        layout_div.add_style("height: auto")
        td.add(layout_div)
        #td.add_style("overflow: hidden")
        kwargs['height'] = 500

        kwargs['show_shelf'] = False
        kwargs['show_search_limit'] = False
        kwargs['expand_on_load'] = True

        layout = FastTableLayoutWdg(**kwargs)
        layout_div.add(layout)
        layout.set_sobjects(self.sobjects)
        #from tactic.ui.panel import TileLayoutWdg
        #layout = TileLayoutWdg(**self.kwargs)
        #layout_div.add(layout)


        td = table.add_cell()
        td.add_border(color="#EEE")
        td.add_style("vertical-align: top")

        content = DivWdg()
        td.add(content)
        content.add_class("spt_tool_content")
        content.add_border(color="#EEE")
        content.add_style("margin: -1px")
        content.add_style("height: auto")
        #content.add_style("padding: 0px 20px")



        no_content_wdg = DivWdg()
        content.add(no_content_wdg)
        no_content_wdg.add("<br/>"*3)

        '''
        The no content message displays tool icons
        and a message in format:
                         <tools>
                          <msg>
        '''
        tool_icons = self.kwargs.get('tool_icon')
        if isinstance(tool_icons, basestring):
            tool_icon_lst = tool_icons.split("|")
        else:
            tool_icon_lst = None

        if tool_icon_lst:
            for icon in tool_icon_lst:
                icon = IconWdg(icon=icon) 
                icon.add_style("padding", "5px")
                no_content_wdg.add(icon)
            no_content_wdg.add("</br></br>")
       
        tool_msg = self.kwargs.get('tool_msg')
        if tool_msg:
            no_content_wdg.add("<p>%s<p>" % tool_msg)
        else:
            no_content_wdg.add("Click the tool(s) to modify settings.") 
       
        #no_content_wdg.add_style("opacity: 0.5")
        no_content_wdg.add_style("margin: 30px auto")
        no_content_wdg.add_color("color", "color3")
        no_content_wdg.add_color("background", "background3")
        no_content_wdg.add_style("text-align", "center")
        no_content_wdg.add_style("padding-top: 20px")
        no_content_wdg.add_style("padding-bottom: 20px")
        no_content_wdg.add_style("width: 350px")
        no_content_wdg.add_style("height: 110px")
        no_content_wdg.add_style("margin: 30px auto")
        no_content_wdg.add_border()


        return div
Example #3
0
    def get_content_wdg(my):

        div = DivWdg()
        div.add_class("spt_tool_top")

        #table = Table()
        from tactic.ui.container import ResizableTableWdg
        from table_layout_wdg import FastTableLayoutWdg

        table = ResizableTableWdg()
        table.add_style("table-layout", "fixed")
        table.add_style("width: 100%")
        div.add(table)
        table.add_row()

        td = table.add_cell()


        kwargs = my.kwargs.copy()


        td.add_style("vertical-align: top")
        layout_div = DivWdg()
        layout_div.add_style("min-height: 500px")
        layout_div.add_style("height: auto")
        td.add(layout_div)
        td.add_style("overflow: hidden")

        kwargs['show_shelf'] = False
        kwargs['show_search_limit'] = False
        kwargs['expand_on_load'] = False
        layout = FastTableLayoutWdg(**kwargs)
        layout_div.add(layout)
        layout.set_sobjects(my.sobjects)
        #from tactic.ui.panel import TileLayoutWdg
        #layout = TileLayoutWdg(**my.kwargs)
        #layout_div.add(layout)


        td = table.add_cell()
        td.add_border(color="#EEE")
        td.add_style("vertical-align: top")

        content = DivWdg()
        td.add(content)
        content.add_class("spt_tool_content")
        content.add_border(color="#EEE")
        content.add_style("margin: -1px")
        content.add_style("height: 100%")
        #content.add_style("padding: 0px 20px")



        no_content_wdg = DivWdg()
        content.add(no_content_wdg)
        no_content_wdg.add("<br/>"*3)

        '''
        The no content message displays tool icons
        and a message in format:
                         <tools>
                          <msg>
        '''
        tool_icons = my.kwargs.get('tool_icon')
        if isinstance(tool_icons, basestring):
            tool_icon_lst = tool_icons.split("|")
        else:
            tool_icon_lst = None

        if tool_icon_lst:
            for icon in tool_icon_lst:
                icon = IconWdg(icon=icon) 
                icon.add_style("padding", "5px")
                no_content_wdg.add(icon)
            no_content_wdg.add("</br></br>")
       
        tool_msg = my.kwargs.get('tool_msg')
        if tool_msg:
            no_content_wdg.add("<p>%s<p>" % tool_msg)
        else:
            no_content_wdg.add("Click the tool(s) to modify settings.") 
       
        #no_content_wdg.add_style("opacity: 0.5")
        no_content_wdg.add_style("margin: 30px auto")
        no_content_wdg.add_color("color", "color3")
        no_content_wdg.add_color("background", "background3")
        no_content_wdg.add_style("text-align", "center")
        no_content_wdg.add_style("padding-top: 20px")
        no_content_wdg.add_style("padding-bottom: 20px")
        no_content_wdg.add_style("width: 350px")
        no_content_wdg.add_style("height: 110px")
        no_content_wdg.add_style("margin: 30px auto")
        no_content_wdg.add_border()


        return div
Example #4
0
    def get_content_wdg(my):

        div = DivWdg()
        div.add_class("spt_tool_top")

        #table = Table()
        from tactic.ui.container import ResizableTableWdg
        from table_layout_wdg import FastTableLayoutWdg

        table = ResizableTableWdg()
        table.add_style("table-layout", "fixed")
        table.add_style("width: 100%")
        div.add(table)
        table.add_row()

        td = table.add_cell()


        kwargs = my.kwargs.copy()


        td.add_style("vertical-align: top")
        layout_div = DivWdg()
        layout_div.add_style("min-height: 500px")
        layout_div.add_style("height: auto")
        td.add(layout_div)
        td.add_style("overflow: hidden")

        kwargs['show_shelf'] = False
        kwargs['show_search_limit'] = False
        kwargs['expand_on_load'] = False
        layout = FastTableLayoutWdg(**kwargs)
        layout_div.add(layout)
        layout.set_sobjects(my.sobjects)
        #from tactic.ui.panel import TileLayoutWdg
        #layout = TileLayoutWdg(**my.kwargs)
        #layout_div.add(layout)


        td = table.add_cell()
        td.add_border(color="#EEE")
        td.add_style("vertical-align: top")

        content = DivWdg()
        td.add(content)
        content.add_class("spt_tool_content")
        content.add_border(color="#EEE")
        content.add_style("margin: -1px")
        content.add_style("height: 100%")
        #content.add_style("padding: 0px 20px")



        no_content_wdg = DivWdg()
        content.add(no_content_wdg)
        no_content_wdg.add("<br/>"*3)
        no_content_wdg.add("<i>-- No Content --</i>")
        #no_content_wdg.add_style("opacity: 0.5")
        no_content_wdg.add_style("margin: 30px auto")
        no_content_wdg.add_color("color", "color3")
        no_content_wdg.add_color("background", "background3")
        no_content_wdg.add_style("text-align", "center")
        no_content_wdg.add_style("padding-top: 20px")
        no_content_wdg.add_style("padding-bottom: 20px")
        no_content_wdg.add_style("width: 350px")
        no_content_wdg.add_style("height: 110px")
        no_content_wdg.add_style("margin: 30px auto")
        no_content_wdg.add_border()


        return div