W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2009

2006/unicorn/WebContent/scripts w3c_unicorn_results.js,1.2,1.3

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 28 Aug 2009 17:07:05 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Mh4un-0000Rv-8g@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/WebContent/scripts
In directory hutz:/tmp/cvs-serv1652/WebContent/scripts

Modified Files:
	w3c_unicorn_results.js 
Log Message:
updated result page for javascript

Index: w3c_unicorn_results.js
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/scripts/w3c_unicorn_results.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- w3c_unicorn_results.js	28 Aug 2009 12:40:05 -0000	1.2
+++ w3c_unicorn_results.js	28 Aug 2009 17:07:03 -0000	1.3
@@ -5,34 +5,36 @@
 		W3C.Links = $$('h2').concat($$('h3'));
 		W3C.Links.each(function(link) {
 			link.addClass('pointer');
+			link.addClass('toggles');
 		});
 		
-		//$merge($$('h2'), $$('h3')).addClass('pointer');
+		$$('div.warnings').getElement('div.result').slide('hide');
+		if ($$('div.observer.invalid').length > 0)	
+			$$('div.observer.valid').getElement('div.results').slide('hide');
+		else
+			$$('div.observer.valid').getElement('h2').addClass('toggled');
 		
-		W3C.Observers = $$('div.observer');
+		$$('div.observer.invalid').getElement('h2').addClass('toggled');
+		$$('div.errors').getElement('h3').addClass('toggled');
+		$$('div.infos').getElement('h3').addClass('toggled');
 		
-		W3C.Observers.each(function(observer) {
+		$$('div.observer').each(function(observer) {
 			observer.getElement('h2').addEvent('click', function(event) {
 				observer.getElement('div.results').slide('toggle');
+				this.toggleClass('toggled');
 			});
 		});
 		
-		$$('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');
+				this.toggleClass('toggled');
 			});
 		});
 		
-		
 	}
-	
 };
 
 window.addEvent('domready', W3C.start);
Received on Friday, 28 August 2009 17:07:14 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:38 UTC