Commit fb13a338 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

allow to flag fields in the HTML test output for auto expansion

Added the possibility of flagging some fields in the HTML test result
to be automatically expanded if the test is expanded. Currently it
happens only for "output_diff", but should be enabled for other cases
depending on the causes.
parent 013c50d8
......@@ -8,6 +8,10 @@ package manager: Marco Clemencic
! 2011-12-13 - Marco Clemencic
- Removed POOL from the list of *VERS variables (old Doxygen settings).
- Moved the genConf directories of the packages inside the binary directory.
- Added the possibility of flagging some fields in the HTML test result to be
automatically expanded if the test is expanded. Currently it happens only
for "output_diff", but should be enabled for other cases depending on the
causes.
! 2011-12-07 - Marco Clemencic
- Enforce the use of Boost Filesystem Version 3 also with Boost 1.44, for
......
......@@ -109,6 +109,8 @@ function foldingAction() {
if (me.hasClass('folded')) {
me.next().slideDown();
me.find('img').attr('src', 'minus.png');
// show all the sub elements that are folded and flagged as auto_show
$(".auto_show > span.folded", me.next()).click();
} else {
me.next().slideUp();
me.find('img').attr('src', 'plus.png');
......@@ -141,7 +143,7 @@ jQuery.fn.loader = function() {
if (me.data("url")) { // modify the element only if it does have a data "url"
me.addClass("foldable").prepend('<img src="plus.png"/>&nbsp;')
// wrap the "text" of the element with a clickable span that loads the url
.wrapInner($("<span class='clickable'/>")
.wrapInner($("<span class='clickable folded'/>")
.click(function(){ // trigger the loading on click
var me = $(this);
me.after($("<div/>").hide().load(me.parent().data("url"),
......@@ -151,6 +153,7 @@ jQuery.fn.loader = function() {
.prev()
.unbind("click") // replace the click handler
.click(foldingAction)
.toggleClass("folded") // flag it as unfolded
.find('img').attr('src', 'minus.png');
}));
return false; // avoid bubbling of the event
......@@ -226,8 +229,12 @@ jQuery.fn.results = function(tests, ignore_fields, fields_order) {
var fields = $("<ul class='fieldid'/>");
$.each(field_ids, function(index, field) {
fields.append($("<li/>").data("url", test.id + "/" + field)
.text(field));
var f = $("<li/>").data("url", test.id + "/" + field)
.text(field);
if (field == "GaudiTest.output_diff") {
f.addClass("auto_show");
}
fields.append(f);
});
entry.append(fields);
ul.append(entry);
......
Supports Markdown
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