0fa9c2ab21ebaeb91466f146a43259e8b5b0cd05,Orange/canvas/report/owreport.py,OWReport,_build_html,#OWReport#,96

Before Change


                                        icon)] = self._get_scheme()

    def _build_html(self):
        n_widgets = len(self.widget_list_items)
        if not n_widgets:
            self.report_view.setHtml("")
            return

        selected_row = self.widget_list.currentRow()
        if selected_row < 0 and n_widgets:
            selected_row = n_widgets - 1
            self.widget_list.setCurrentRow(selected_row)

        html = self.report_html_template
        html += "<body>"
        for i, (item_name, item_icon) in enumerate(self.widget_list_items):
            html += "<div id="%s" class="%s">%s</div>" % (
                id(item_icon),
                "selected" if i == selected_row else "normal",
                self.report_view_items[(item_name, item_icon)]
            )
        html += "</body></html>"
        self.report_view.setHtml(html)

        if selected_row < len(self.widget_list_items):
            self.javascript(
                "document.getElementById("%s").scrollIntoView();"
                % id(self.widget_list_items[selected_row][1]))

    def make_report(self, widget):
        self._add_widget_item(widget)

After Change


    def _build_html(self):
        html = self.report_html_template
        html += "<body>"
        for i in range(self.table_model.rowCount()):
            item = self.table_model.item(i)
            html += "<div id="%s" class="normal" " \
                    "onClick="pybridge._select_item(this.id)">%s</div>" % \
                    (item.id, item.html)
        html += "</body></html>"
        self.report_view.setHtml(html)

    def _scroll_to_item(self, item):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: biolab/orange3
Commit Name: 0fa9c2ab21ebaeb91466f146a43259e8b5b0cd05
Time: 2015-12-04
Author: tankovesna@hotmail.com
File Name: Orange/canvas/report/owreport.py
Class Name: OWReport
Method Name: _build_html


Project Name: biolab/orange3
Commit Name: 2dcfbc69466198929f81fcdb4c5ca06ace7b1d2e
Time: 2015-10-30
Author: tankovesna@hotmail.com
File Name: Orange/canvas/report/owreport.py
Class Name: OWReport
Method Name: _build_html


Project Name: biolab/orange3
Commit Name: ad202ae0d526f208bfde4ed9ef47190f078be7de
Time: 2019-12-17
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/widgets/data/owselectcolumns.py
Class Name: OWSelectAttributes
Method Name: move_rows