From 942c6d5da200719a7a44ecd4ca7c8b078220967e Mon Sep 17 00:00:00 2001 From: David Norton Date: Fri, 16 Jun 2006 15:27:22 +0000 Subject: [PATCH] [interface] Number of notes column in items tree --- chrome/chromeFiles/content/scholar/itemTreeView.js | 10 +++++++++- chrome/chromeFiles/content/scholar/overlay.xul | 5 +++++ chrome/chromeFiles/locale/en-US/scholar/scholar.dtd | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/chrome/chromeFiles/content/scholar/itemTreeView.js b/chrome/chromeFiles/content/scholar/itemTreeView.js index 05078f354e..a5b34f0aaf 100644 --- a/chrome/chromeFiles/content/scholar/itemTreeView.js +++ b/chrome/chromeFiles/content/scholar/itemTreeView.js @@ -153,8 +153,16 @@ Scholar.ItemTreeView.prototype.getCellText = function(row, column) var obj = this._getItemAtRow(row); var val; - if(column.id != "typeIcon") + if(column.id == "numNotes") + { + var c = obj.numNotes(); + if(c) //don't display '0' + val = c; + } + else if(column.id != "typeIcon") + { val = obj.getField(column.id); + } if(column.id == 'dateAdded' || column.id == 'dateModified') //this is not so much that we will use this format for date, but a simple template for later revisions. { diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul index b2738d32fa..436a62ddaa 100644 --- a/chrome/chromeFiles/content/scholar/overlay.xul +++ b/chrome/chromeFiles/content/scholar/overlay.xul @@ -78,6 +78,11 @@ label="&items.creator_column;" flex="1" persist="width ordinal hidden sortActive sortDirection"/> + +