Added expand/collapse all.

A link has been added into the details page to expand/collapse all
sections.

Previously each section's <div> container is identified using a long
ID. It is now identified using the section name.
This commit is contained in:
Endi S. Dewata
2011-02-10 16:10:53 -06:00
committed by Adam Young
parent 1ea463eced
commit 49a5f14b47
4 changed files with 78 additions and 34 deletions

View File

@@ -139,7 +139,7 @@ IPA.dialog = function(spec) {
var section = that.sections[j];
var div = $('<div/>', {
'id': that.entity_name+'-'+that.name+'-'+section.name,
name: section.name,
'class': 'details-section'
}).appendTo(that.container);
@@ -161,7 +161,7 @@ IPA.dialog = function(spec) {
for (var j=0; j<that.sections.length; j++) {
var section = that.sections[j];
var div = $('#'+that.entity_name+'-'+that.name+'-'+section.name,
var div = $('div.details-section[name='+section.name+']',
that.container);
section.setup(div);