- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 28 Aug 2009 12:18:53 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/WebContent/scripts In directory hutz:/tmp/cvs-serv20215/WebContent/scripts Modified Files: Tag: dev2 w3c_unicorn_results.js Log Message: updated to fold/unfold observer results Index: w3c_unicorn_results.js =================================================================== RCS file: /sources/public/2006/unicorn/WebContent/scripts/Attic/w3c_unicorn_results.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- w3c_unicorn_results.js 28 Aug 2009 09:05:23 -0000 1.1.2.1 +++ w3c_unicorn_results.js 28 Aug 2009 12:18:51 -0000 1.1.2.2 @@ -2,6 +2,13 @@ start: function() { + W3C.Links = $$('h2').concat($$('h3')); + W3C.Links.each(function(link) { + link.addClass('pointer'); + }); + + //$merge($$('h2'), $$('h3')).addClass('pointer'); + W3C.Observers = $$('div.observer'); W3C.Observers.each(function(observer) { @@ -10,7 +17,20 @@ }); }); - $$('div.observer.valid').getElement('div.results').slide('hide'); + $$('div.warnings').getElement('div.result').slide('hide'); + if ($$('div.observer.invalid').length > 0) + $$('div.observer.valid').getElement('div.results').slide('hide'); + + W3C.ResultBlock = $$('div.errors').concat($$('div.infos'), $$('div.warnings')); + + W3C.ResultBlock.each(function(results) { + results.getElement('h3').addEvent('click', function(event){ + results.getElement('div.result').slide('toggle'); + results.getParent('div').getParent('div').setStyle('height', 'auto'); + }); + }); + + } };
Received on Friday, 28 August 2009 12:19:02 UTC