unicorn commit: + is hash equals #collapsed close all observers

changeset:   1649:bf29589888d8
tag:         tip
user:        Thomas Gambet <tgambet@w3.org>
date:        Sat Jun 11 19:35:09 2011 -0400
files:       WebContent/scripts/w3c_unicorn_results.js
description:
+ is hash equals #collapsed close all observers


diff -r 6b5e39091655 -r bf29589888d8 WebContent/scripts/w3c_unicorn_results.js
--- a/WebContent/scripts/w3c_unicorn_results.js	Tue May 10 12:53:36 2011 -0400
+++ b/WebContent/scripts/w3c_unicorn_results.js	Sat Jun 11 19:35:09 2011 -0400
@@ -108,6 +108,11 @@
 			wheelStops: true
 		});
 		
+		if (window.location.hash == '#collapsed')
+			$$('.observer').each(function(observer) {
+				W3C.close(observer, false);
+			});
+		
 		W3C.parseHash();
 		
 		var classes = $('observations').getProperty('class');
@@ -263,7 +268,7 @@
 	
 	parseHash: function(){
 		var hash = window.location.hash;
-		if (hash == "") {
+		if (hash == "" || hash == '#collapsed') {
 			return;
 		}
 		var tab = hash.replace('#', '').split('_');

Received on Saturday, 11 June 2011 23:35:51 UTC