Skip to content

Instantly share code, notes, and snippets.

@etdsoft
Created May 11, 2011 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etdsoft/967058 to your computer and use it in GitHub Desktop.
Save etdsoft/967058 to your computer and use it in GitHub Desktop.
Tidy up your Dradis notes list
// ./server/public/javascripts/dx/dradis.notes.NotesBrowserPanel.js
// [...]
columns: [
{
id:'text',
header: 'Text',
width: 180,
sortable: true,
dataIndex: 'text',
//renderer: Ext.util.Format.htmlEncode
renderer: function(value, metaData, record, rowIndex, colIndex, store) {
var re = /#\[Title\]#/;
if (re.test(value))
{
value = value.substring(9, value.indexOf("#", 10)) + " [more...]";
}
return Ext.util.Format.htmlEncode(value);
}
},
{
header: 'Category',
width: 40,
sortable: true,
dataIndex: 'category_id',
scope: this.categories,
renderer: this.categoryRenderer,
editor: this.categories.editor()
},
// [...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment