diff --git a/chrome/chromeFiles/content/scholar/bindings/noteeditor.xml b/chrome/chromeFiles/content/scholar/bindings/noteeditor.xml
index 5bbb20556..b50696702 100644
--- a/chrome/chromeFiles/content/scholar/bindings/noteeditor.xml
+++ b/chrome/chromeFiles/content/scholar/bindings/noteeditor.xml
@@ -25,8 +25,8 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/chrome/chromeFiles/content/scholar/itemTreeView.js b/chrome/chromeFiles/content/scholar/itemTreeView.js
index 420c427be..f7859075a 100644
--- a/chrome/chromeFiles/content/scholar/itemTreeView.js
+++ b/chrome/chromeFiles/content/scholar/itemTreeView.js
@@ -116,7 +116,9 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids)
{
var item = Scholar.Items.get(ids);
- if((this._itemGroup.isLibrary() || item.inCollection(this._itemGroup.ref.getID())) && this._itemRowMap[ids] == null && (!item.isNote() || !item.getNoteSource()))
+ if((this._itemGroup.isLibrary() || item.inCollection(this._itemGroup.ref.getID())) //if the item belongs in this collection
+ && this._itemRowMap[ids] == null //if we haven't already added it to our hash map
+ && (item.isRegularItem() || !item.getSource())) //if it's stand-alone
{
this._showItem(new Scholar.ItemTreeView.TreeRow(item,0,false),this.rowCount);
this._treebox.rowCountChanged(this.rowCount-1,1);
@@ -205,7 +207,7 @@ Scholar.ItemTreeView.prototype.getImageSrc = function(row, col)
Scholar.ItemTreeView.prototype.isContainer = function(row)
{
- return !this._getItemAtRow(row).isNote();
+ return this._getItemAtRow(row).isRegularItem();
}
Scholar.ItemTreeView.prototype.isContainerOpen = function(row)
@@ -215,7 +217,7 @@ Scholar.ItemTreeView.prototype.isContainerOpen = function(row)
Scholar.ItemTreeView.prototype.isContainerEmpty = function(row)
{
- return (this._getItemAtRow(row).numNotes() == 0);
+ return (this._getItemAtRow(row).numNotes() == 0 && this._getItemAtRow(row).numFiles() == 0);
}
Scholar.ItemTreeView.prototype.getLevel = function(row)
@@ -260,13 +262,25 @@ Scholar.ItemTreeView.prototype.toggleOpenState = function(row)
else
{
var item = this._getItemAtRow(row).ref;
- var newRows = Scholar.Items.get(item.getNotes()); //Get children
+ //Get children
+ var files = item.getFiles();
+ var notes = item.getNotes();
+
+ var newRows;
+ if(files && notes)
+ newRows = files.concat(notes);
+ else if(files)
+ newRows = files;
+ else if(notes)
+ newRows = notes;
+
+ newRows = Scholar.Items.get(newRows);
for(var i = 0; i < newRows.length; i++)
{
count++;
this._showItem(new Scholar.ItemTreeView.TreeRow(newRows[i],thisLevel+1,false), row+i+1); //item ref, before row
- }
+ }
}
this._treebox.beginUpdateBatch();
@@ -430,7 +444,7 @@ Scholar.ItemTreeView.prototype.deleteSelection = function()
this._treebox.beginUpdateBatch();
for (var i=0; i
-
+
+
+
+
+
diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties
index 78ab9534d..ce09e72bd 100644
--- a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties
+++ b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties
@@ -18,9 +18,12 @@ pane.item.selected.multiple = %1 items selected
pane.item.changeType = Are you sure you want to change the item type? Certain fields may be lost.
pane.item.notes.untitled = Untitled Note
-pane.item.notes.delete.confirm = Are you sure you want to delete the selected note?
+pane.item.notes.delete.confirm = Are you sure you want to delete this note?
pane.item.notes.count.singular = %1 note
pane.item.notes.count.plural = %1 notes
+pane.item.files.delete.confirm = Are you sure you want to delete this file?
+pane.item.files.count.singular = %1 file
+pane.item.files.count.plural = %1 files
itemFields.title = Title
itemFields.dateAdded = Date Added
diff --git a/chrome/chromeFiles/skin/default/scholar/treeitem-file.png b/chrome/chromeFiles/skin/default/scholar/treeitem-file.png
new file mode 100755
index 000000000..99d532e8b
Binary files /dev/null and b/chrome/chromeFiles/skin/default/scholar/treeitem-file.png differ