- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 02 Oct 2009 12:16:42 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/WebContent/scripts In directory hutz:/tmp/cvs-serv11627/WebContent/scripts Modified Files: w3c_unicorn_results.js Log Message: if an observer does not contain any section do not make it foldable Index: w3c_unicorn_results.js =================================================================== RCS file: /sources/public/2006/unicorn/WebContent/scripts/w3c_unicorn_results.js,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- w3c_unicorn_results.js 30 Sep 2009 17:00:27 -0000 1.14 +++ w3c_unicorn_results.js 2 Oct 2009 12:16:40 -0000 1.15 @@ -9,25 +9,27 @@ var invalidObservers = $$('.observer.invalid'); var scroller = new Fx.Scroll(document); - $$('.title').each(function(title) { - title.addClass('pointer'); - var iconHolder = new Element('span', {'class': 'arrow'}); - var a; - if (title.getElement('span.icons') != null) - a = title.getElement('span.icons'); - else - a = title.getElement('a.anchor'); - iconHolder.inject(a, 'after'); - }); - $$('.section').each(function(section) { var title = section.getElement('.title'); var block = section.getElement('.block'); - section.store('fxSlide', new Fx.Slide(block, {'duration': slideDuration, 'link': 'cancel'})); - section.store('block', block); - title.addEvent('click', function(event) { - W3C.toggle(section); - }); + var results = block.getElement('.results'); + + if (!section.hasClass('observer') || section.getElement('.section') != null) { + title.addClass('pointer'); + var iconHolder = new Element('span', {'class': 'arrow'}); + var a; + if (title.getElement('span.icons') != null) + a = title.getElement('span.icons'); + else + a = title.getElement('a.anchor'); + iconHolder.inject(a, 'after'); + + section.store('fxSlide', new Fx.Slide(block, {'duration': slideDuration, 'link': 'cancel'})); + section.store('block', block); + title.addEvent('click', function(event) { + W3C.toggle(section); + }); + } }); $$('.observer .section').each(function(section) {
Received on Friday, 2 October 2009 12:16:43 UTC