Пример #1
0
    def get_display(self):

        clipboards = Clipboard.get_all("select")

        from layout_wdg import TableWdg
        widget = Widget()
        widget.add("<h3>Clipboard</h3>")
        table = TableWdg("sthpw/clipboard", self.view)
        table.set_sobjects(clipboards)
        widget.add(table)
        return widget
Пример #2
0
    def get_display(self):
    
        clipboards = Clipboard.get_all("select")

        from layout_wdg import TableWdg
        widget = Widget()
        widget.add( "<h3>Clipboard</h3>")
        table = TableWdg("sthpw/clipboard", self.view)
        table.set_sobjects(clipboards)
        widget.add(table)
        return widget
Пример #3
0
    def init(self):

        WebContainer.register_cmd("pyasm.widget.AnnotateCbk")

        sobject = self.get_current_sobject()

        if not sobject:
            if not self.__dict__.has_key("search_type"):
                web = WebContainer.get_web()
                self.search_type = web.get_form_value("search_type")
                self.search_id = web.get_form_value("search_id")

            if not self.search_type:
                self.add("No search type")
                return

            search = Search(self.search_type)
            search.add_id_filter(self.search_id)
            sobject = search.get_sobject()

        self.add("<h3>Design Review: Annotation</h3>")
        table = TableWdg(self.search_type)
        table.set_sobject(sobject)
        self.add(table)

        url = WebContainer.get_web().get_widget_url()
        url.set_option("widget", "AnnotateWdg")
        url.set_option("search_type", self.search_type)
        url.set_option("search_id", self.search_id)
        src = url.to_string()

        self.add("<h3>Click on image to add an annotation</h3>")
        self.add(
            "The annotation will be located where you clicked on the image")

        self.add("""
        <iframe id="annotate_frame" scrolling="no" src="%s" style='width: 800; height: 450; margin-left: 30px; border: none;">
        WARNING: iframes are not supported
        </iframe>
        """ % src)
Пример #4
0
    def init(my):

        WebContainer.register_cmd("pyasm.widget.AnnotateCbk")

        sobject = my.get_current_sobject()

        if not sobject:
            if not my.__dict__.has_key("search_type"):
                web = WebContainer.get_web()
                my.search_type = web.get_form_value("search_type")
                my.search_id = web.get_form_value("search_id")

            if not my.search_type:
                my.add("No search type")
                return

            search = Search(my.search_type)
            search.add_id_filter(my.search_id)
            sobject = search.get_sobject()

        my.add("<h3>Design Review: Annotation</h3>")
        table = TableWdg(my.search_type)
        table.set_sobject(sobject)
        my.add(table)

        url = WebContainer.get_web().get_widget_url()
        url.set_option("widget", "AnnotateWdg")
        url.set_option("search_type", my.search_type)
        url.set_option("search_id", my.search_id)
        src = url.to_string()

        my.add("<h3>Click on image to add an annotation</h3>")
        my.add("The annotation will be located where you clicked on the image")
        
        my.add( """
        <iframe id="annotate_frame" scrolling="no" src="%s" style='width: 800; height: 450; margin-left: 30px; border: none;">
        WARNING: iframes are not supported
        </iframe>
        """ % src )
Пример #5
0
    def get_display(self):

        sobject = self.get_current_sobject()
        sobject = sobject.get_parent()
        if not sobject:
            return Widget()

        # get all of the sobject_logs
        search = Search("sthpw/sobject_log")
        search.add_sobject_filter(sobject)
        logs = search.get_sobjects()

        search = Search("sthpw/transaction_log")
        search.add_filters("id",
                           [x.get_value("transaction_log_id") for x in logs])
        search.set_limit(200)
        logs = search.get_sobjects()

        from layout_wdg import TableWdg
        widget = Widget()
        table = TableWdg("sthpw/transaction_log")
        table.add_class("minimal")
        table.set_header_flag(False)
        table.set_show_property(False)
        table.set_no_results_wdg("&nbsp;")
        table.set_sobjects(logs)
        widget.add(table)
        return widget
Пример #6
0
    def get_display(self):

        sobject = self.get_current_sobject()
        sobject = sobject.get_parent()
        if not sobject:
            return Widget()

        # get all of the sobject_logs
        search = Search("sthpw/sobject_log")
        search.add_sobject_filter(sobject)
        logs = search.get_sobjects()

        search = Search("sthpw/transaction_log")
        search.add_filters("id", [x.get_value("transaction_log_id") for x in logs] )
        search.set_limit(200)
        logs = search.get_sobjects()
        
        from layout_wdg import TableWdg
        widget = Widget()
        table = TableWdg("sthpw/transaction_log")
        table.add_class("minimal")
        table.set_header_flag(False)
        table.set_show_property(False)
        table.set_no_results_wdg( "&nbsp;" )
        table.set_sobjects(logs)
        widget.add(table)
        return widget