diff --git a/chrome/chromeFiles/content/scholar/sidebar.js b/chrome/chromeFiles/content/scholar/sidebar.js
index fcdc2a6f7e..1186164735 100644
--- a/chrome/chromeFiles/content/scholar/sidebar.js
+++ b/chrome/chromeFiles/content/scholar/sidebar.js
@@ -1,6 +1,7 @@
var ScholarLocalizedStrings;
var myTreeView;
var dynamicBox;
+var itemBeingEdited; //the item currently being edited
Scholar.TreeView = function()
{
@@ -105,12 +106,11 @@ Scholar.TreeView.prototype.selectionChanged = function()
if(this.selection.count == 1 && !this.isContainer(this.selection.currentIndex))
{
viewSelectedItem();
- document.getElementById('view-pane').hidden = false;
document.getElementById('tb-edit').hidden = false;
}
else
{
- document.getElementById('view-pane').hidden = true;
+ removeDynamicRows();
document.getElementById('tb-edit').hidden = true;
}
}
@@ -187,17 +187,20 @@ function viewSelectedItem()
}
-function newItem()
+function newItem(typeID)
{
-
+ editItem(Scholar.Items.getNewItemByType(typeID));
}
function editSelectedItem()
+{
+ editItem(myTreeView._getItemAtRow(myTreeView.selection.currentIndex));
+}
+
+function editItem(thisItem)
{
document.getElementById('list-pane').hidden = true;
document.getElementById('edit-pane').hidden = false;
-
- var thisItem = myTreeView._getItemAtRow(myTreeView.selection.currentIndex);
removeDynamicRows();
var fieldNames = getFullFieldList(thisItem);
@@ -222,10 +225,10 @@ function editSelectedItem()
dynamicBox.appendChild(row);
}
}
-
+
+/* DISABLE EDITING OF CREATORS UNTIL WE COME UP WITH A GOOD METHOD
var beforeField = dynamicBox.firstChild.nextSibling;
-/* DISABLE EDITING OF CREATORS UNTIL WE COME UP WITH A GOOD METHOD
for (var i=0,len=thisItem.numCreators(); i
-
+
+
+
+
-
+
diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties
index 060f4f0619..e8522c5730 100644
--- a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties
+++ b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties
@@ -15,3 +15,7 @@ itemFields.pages = Pages
itemFields.ISBN = ISBN
itemFields.publication = Publication
itemFields.ISSN = ISSN
+
+
+itemTypes.book = Book
+itemTypes.journalArticle = Journal Article
\ No newline at end of file