[rt-viewer commit] r9 - trunk/html

0 views
Skip to first unread message

codesite...@google.com

unread,
Jan 8, 2008, 7:55:31 PM1/8/08
to rt-viewe...@googlegroups.com
Author: wcoleda
Date: Tue Jan 8 16:55:07 2008
New Revision: 9

Modified:
trunk/html/rt.js

Log:
* don't use hyperlink to open a new window; respond to doubleclick event
* update some column widths
* slight tweak to grid config

Modified: trunk/html/rt.js
==============================================================================
--- trunk/html/rt.js (original)
+++ trunk/html/rt.js Tue Jan 8 16:55:07 2008
@@ -2,17 +2,12 @@

Ext.BLANK_IMAGE_URL = '/js/ext-2.0/resources/images/default/s.gif';

-function ticketDecorator (ticket) {
- var link = '<a target="_blank"
href="http://rt.perl.org/rt3/Public/Bug/Display.html?id=' + ticket
+ '">' + ticket + '</a>';
- return link;
-}
-
var cm = new Ext.grid.ColumnModel ([
- {id: 'id', header: 'Ticket', width: 25, sortable: true,
dataIndex: 'id', renderer: ticketDecorator},
- {header: 'Queue', width: 25, sortable: true, dataIndex: 'queue'},
- {header: 'Status', width: 25, sortable: true, dataIndex: 'status'},
- {header: 'Priority', width: 15, sortable: true, dataIndex: 'priority'},
- {header: 'Last Updated', width: 75, sortable: true, dataIndex: 'lastupdated'},
+ {id: 'id', header: 'Ticket', width: 30, sortable: true, dataIndex: 'id'},
+ {header: 'Queue', width: 30, sortable: true, dataIndex: 'queue'},
+ {header: 'Status', width: 30, sortable: true, dataIndex: 'status'},
+ {header: 'Priority', width: 30, sortable: true, dataIndex: 'priority'},
+ {header: 'Last Updated', width: 80, sortable: true, dataIndex: 'lastupdated'},
{header: 'Subject', width: 150, dataIndex: 'subject'},
{header: 'Summary', width: 200, dataIndex: 'summary'}
]);
@@ -39,7 +34,18 @@
sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
width:600,
enableColumnMove: true,
- enableColumnResize: true
+ enableColumnResize: true,
+ stripeRows: true,
+ viewConfig: {
+ forceFit: true
+ },
+ listeners: {
+ 'rowdblclick':
+ function(grid, row, event) {
+ var ticket = grid.getStore().getAt(row).get('id');
+
window.open('http://rt.perl.org/rt3/Public/Bug/Display.html?id=' + ticket ,'_blank');
+ }
+ }
});

tp.activate(tab);
@@ -146,7 +152,10 @@
activeTab: 0,
items: [{
title: 'Instructions',
- html: 'Click on queries to the left to open new tabs',
+ html: 'Click on queries to the left to open new tabs. Each new
tab ' +
+ 'will contain a list of tickets for that query.<br><br>' +
+ 'From the grid, double click on a row to open the
corresponding ' +
+ 'page for that ticket.',
closable: true
}]
}, {
@@ -158,7 +167,6 @@
'<li>Setup a cron job to load this data every hour or so.' +
'<li>only load the parts of ext we are using.' +
'<li>Clicking on a ticket should open it in a tab, not a new
window.' +
- '<li>clicking anywhere on a row should open the ticket, (no
point in ticket hyperlink then.)' +
'</ul>'
}]
});

Reply all
Reply to author
Forward
0 new messages