Commit b27d196c authored by Jono Mingard's avatar Jono Mingard
Browse files

In Resume, show composite description in cell rather than row (Bug #1145156)



Changed showhideComposite() to add the requested content (description and
attachments) to the cell containing the title of the composite, rather than
adding a new row to the table.
This means that in places such as the Education history table, clicking on the
qualification will open the description immediately below the title instead
of creating a separate row.

Change-Id: Id05bf73e2932108abd9979359bb7f64e6b3ca3fc
Signed-off-by: default avatarJono Mingard <jonom@catalyst.net.nz>
parent 15b384bb
......@@ -991,28 +991,25 @@ EOF;
function showhideComposite(r, content, attachments) {
// get the reference for the title we just clicked on
var titleTD = $('composite-' + r.artefact + '-' + r.id);
var theRow = titleTD.parentNode;
var bodyRow = $('composite-body-' + r.artefact + '-' + r.id);
if (bodyRow) {
if (hasElementClass(bodyRow, 'hidden')) {
removeElementClass(bodyRow, 'hidden');
var bodyNode = $('composite-body-' + r.artefact + '-' + r.id);
if (bodyNode) {
if (hasElementClass(bodyNode, 'hidden')) {
removeElementClass(bodyNode, 'hidden');
}
else {
addElementClass(bodyRow, 'hidden');
addElementClass(bodyNode, 'hidden');
}
return false;
}
// we have to actually create the dom node too
var colspan = theRow.childNodes.length;
if (attachments) {
var newRow = TR({'id': 'composite-body-' + r.artefact + '-' + r.id},
TD({'colspan': colspan}, DIV({'class':'compositedesc'}, content), attachments));
var newNode = DIV({'id': 'composite-body-' + r.artefact + '-' + r.id},
DIV({'class':'compositedesc'}, content), attachments);
}
else {
var newRow = TR({'id': 'composite-body-' + r.artefact + '-' + r.id},
TD({'colspan': colspan}, DIV({'class':'compositedesc'}, content)));
var newNode = DIV({'id': 'composite-body-' + r.artefact + '-' + r.id},
DIV({'class':'compositedesc'}, content));
}
insertSiblingNodesAfter(theRow, newRow);
appendChildNodes(titleTD, newNode);
}
";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment