commit 3b55fe520ceffde4ac288f612ba87e3a8a103e38
parent 73ff76aa39fd3986207f0a2aee8cb901f4588ab0
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 23 Sep 2006 23:40:10 +0000
Fixes #288, Add back comma after last name in item edit pane
Diffstat:
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/chrome/chromeFiles/content/scholar/itemPane.js b/chrome/chromeFiles/content/scholar/itemPane.js
@@ -395,6 +395,13 @@ var ScholarItemPane = new function()
tabindex
)
);
+
+ // Comma
+ var comma = document.createElement('label');
+ comma.setAttribute('value', ',');
+ comma.className = 'comma';
+ firstlast.appendChild(comma);
+
firstlast.appendChild(
createValueElement(
firstName,
@@ -465,6 +472,7 @@ var ScholarItemPane = new function()
var button = row.lastChild.lastChild.previousSibling.previousSibling;
var hbox = button.previousSibling;
var lastName = hbox.firstChild;
+ var comma = hbox.firstChild.nextSibling;
var firstName = hbox.lastChild;
// Switch to single-field mode
@@ -485,6 +493,7 @@ var ScholarItemPane = new function()
// Hide first name field and prepend to last name field
firstName.setAttribute('hidden', true);
+ comma.setAttribute('hidden', true);
var first = _getFieldValue(firstName);
if (first && first != _defaultFirstName)
{
@@ -537,6 +546,7 @@ var ScholarItemPane = new function()
}
firstName.setAttribute('hidden', false);
+ comma.setAttribute('hidden', false);
}
if (!initial)
@@ -863,7 +873,7 @@ var ScholarItemPane = new function()
function getCreatorFields(row){
var type = row.getElementsByTagName('label')[0].getAttribute('value');
var label1 = row.getElementsByTagName('hbox')[0].firstChild.firstChild;
- var label2 = label1.nextSibling;
+ var label2 = label1.parentNode.lastChild;
return {
lastName: label1.firstChild ? label1.firstChild.nodeValue
diff --git a/chrome/chromeFiles/skin/default/scholar/overlay.css b/chrome/chromeFiles/skin/default/scholar/overlay.css
@@ -201,6 +201,17 @@
font-weight: bold;
}
+/* no space between last name and comma */
+#editpane-dynamic-fields row hbox label:first-child
+{
+ margin-right:1px;
+}
+
+#editpane-dynamic-fields row hbox label.comma
+{
+ margin-left:0;
+}
+
#scholar-splitter
{
border-top: none;