~joetalbott/ubuntu-ci-services-itself/workflow_logs

« back to all changes in this revision

Viewing changes to webui/webui.js

  • Committer: Joe Talbott
  • Date: 2014-03-14 18:27:36 UTC
  • Revision ID: joe.talbott@canonical.com-20140314182736-ddx2lfkrx6j3fmv3
webui - Fix row linking to support middle-click in FF.

Fixes: LP:1292559

Show diffs side-by-side

added added

removed removed

Lines of Context:
300
300
 
301
301
            if (path) {
302
302
                result = path.slice(path.lastIndexOf('/') + 1, path.length);
303
 
            } 
 
303
            }
304
304
 
305
305
            return result;
306
306
        },
784
784
        },
785
785
        make_main_table: function (div_id) {
786
786
 
787
 
            var format_id = function (o) {
 
787
            var link_it = function (o) {
 
788
                    return '<a class="row_link" href="/ticket.html?ticket_id=' +
 
789
                        o.data.ticket_id + '">' + o.value + '</a>';
 
790
                },
 
791
                format_id = function (o) {
788
792
                    o.rowClass = "data-row-" + o.data.ticket_id;
789
793
 
790
 
                    return o.value;
 
794
                    return link_it(o);
791
795
                },
792
796
                columns = [
793
 
                    {key: 'title', label: 'Title', formatter: format_id},
794
 
                    {key: 'current_workflow_step', label: 'Landing Progress'},
795
 
                    {key: 'status', label: 'Status'}
 
797
                    {key: 'title', label: 'Title', formatter: format_id, allowHTML: true},
 
798
                    {key: 'current_workflow_step', label: 'Landing Progress', formatter: link_it, allowHTML: true},
 
799
                    {key: 'status', label: 'Status', formatter: link_it, allowHTML: true}
796
800
                ],
797
801
                data = [],
798
802
                main_table;