Fixes #288, Add back comma after last name in item edit pane
This commit is contained in:
parent
73ff76aa39
commit
3b55fe520c
|
@ -395,6 +395,13 @@ var ScholarItemPane = new function()
|
||||||
tabindex
|
tabindex
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Comma
|
||||||
|
var comma = document.createElement('label');
|
||||||
|
comma.setAttribute('value', ',');
|
||||||
|
comma.className = 'comma';
|
||||||
|
firstlast.appendChild(comma);
|
||||||
|
|
||||||
firstlast.appendChild(
|
firstlast.appendChild(
|
||||||
createValueElement(
|
createValueElement(
|
||||||
firstName,
|
firstName,
|
||||||
|
@ -465,6 +472,7 @@ var ScholarItemPane = new function()
|
||||||
var button = row.lastChild.lastChild.previousSibling.previousSibling;
|
var button = row.lastChild.lastChild.previousSibling.previousSibling;
|
||||||
var hbox = button.previousSibling;
|
var hbox = button.previousSibling;
|
||||||
var lastName = hbox.firstChild;
|
var lastName = hbox.firstChild;
|
||||||
|
var comma = hbox.firstChild.nextSibling;
|
||||||
var firstName = hbox.lastChild;
|
var firstName = hbox.lastChild;
|
||||||
|
|
||||||
// Switch to single-field mode
|
// Switch to single-field mode
|
||||||
|
@ -485,6 +493,7 @@ var ScholarItemPane = new function()
|
||||||
|
|
||||||
// Hide first name field and prepend to last name field
|
// Hide first name field and prepend to last name field
|
||||||
firstName.setAttribute('hidden', true);
|
firstName.setAttribute('hidden', true);
|
||||||
|
comma.setAttribute('hidden', true);
|
||||||
var first = _getFieldValue(firstName);
|
var first = _getFieldValue(firstName);
|
||||||
if (first && first != _defaultFirstName)
|
if (first && first != _defaultFirstName)
|
||||||
{
|
{
|
||||||
|
@ -537,6 +546,7 @@ var ScholarItemPane = new function()
|
||||||
}
|
}
|
||||||
|
|
||||||
firstName.setAttribute('hidden', false);
|
firstName.setAttribute('hidden', false);
|
||||||
|
comma.setAttribute('hidden', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!initial)
|
if (!initial)
|
||||||
|
@ -863,7 +873,7 @@ var ScholarItemPane = new function()
|
||||||
function getCreatorFields(row){
|
function getCreatorFields(row){
|
||||||
var type = row.getElementsByTagName('label')[0].getAttribute('value');
|
var type = row.getElementsByTagName('label')[0].getAttribute('value');
|
||||||
var label1 = row.getElementsByTagName('hbox')[0].firstChild.firstChild;
|
var label1 = row.getElementsByTagName('hbox')[0].firstChild.firstChild;
|
||||||
var label2 = label1.nextSibling;
|
var label2 = label1.parentNode.lastChild;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
lastName: label1.firstChild ? label1.firstChild.nodeValue
|
lastName: label1.firstChild ? label1.firstChild.nodeValue
|
||||||
|
|
|
@ -201,6 +201,17 @@
|
||||||
font-weight: bold;
|
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
|
#scholar-splitter
|
||||||
{
|
{
|
||||||
border-top: none;
|
border-top: none;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user