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

2006/unicorn/WebContent/scripts w3c_unicorn_results-yc.js,1.2,1.3 w3c_unicorn_results.js,1.22,1.23

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 27 Oct 2009 14:13:04 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1N2mnI-00030P-E7@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/WebContent/scripts
In directory hutz:/tmp/cvs-serv11528/WebContent/scripts

Modified Files:
	w3c_unicorn_results-yc.js w3c_unicorn_results.js 
Log Message:
fixed, setHash does not add a '#' to the hash after parsing

Index: w3c_unicorn_results.js
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/scripts/w3c_unicorn_results.js,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- w3c_unicorn_results.js	23 Oct 2009 09:45:39 -0000	1.22
+++ w3c_unicorn_results.js	27 Oct 2009 14:13:02 -0000	1.23
@@ -309,7 +309,7 @@
 			return;
 		}
 		
-		W3C.setHash(hash);
+		W3C.setHash(hash.replace('#', ''));
 		
 	},
 	
@@ -339,8 +339,3 @@
 
 window.addEvent('domready', W3C.start);
 
-window.addEvent('onbeforeunload', function () {
-	console.log(history.toString());
-	history.go(-2);
-});
-

Index: w3c_unicorn_results-yc.js
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/scripts/w3c_unicorn_results-yc.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- w3c_unicorn_results-yc.js	23 Oct 2009 09:45:39 -0000	1.2
+++ w3c_unicorn_results-yc.js	27 Oct 2009 14:13:02 -0000	1.3
@@ -2,4 +2,4 @@
 // Author: Thomas GAMBET.
 // (c) COPYRIGHT MIT, ERCIM and Keio, 2009.
 // Compressed with YUI Compressor 2.4.2 (source: ./w3c_unicorn_index.js)
-var W3C={start:function(){W3C.cleanHash();W3C.ContextsToShow=7;W3C.Observers=$$(".observer");var g=500;var a=$$(".observer.invalid");var e=new Fx.Scroll(document);var j=new Fx.Scroll(document,{duration:0});$$(".section").each(function(o){var q=o.getElement(".title");var p=o.getElement(".block");if(!o.hasClass("observer")||o.getElement(".section")!=null){q.addClass("pointer");var n=new Element("span",{"class":"arrow"});var m;if(q.getElement("span.icons")!=null){m=q.getElement("span.icons")}else{m=q.getElement("a.anchor")}n.inject(m,"after")}o.store("fxSlide",new Fx.Slide(p,{duration:g,link:"cancel"}));o.store("block",p);q.addEvent("click",function(r){W3C.toggle(o)})});$$(".observer .section").each(function(m){if(m.hasClass("warnings")){W3C.close(m,false)}else{W3C.open(m,false)}});$$(".observer .title a").each(function(m){m.addEvent("click",function(n){n.stopPropagation()})});$$(".observer").each(function(m){W3C.open(m,false);if(m.hasClass("valid")&&a.length>0){W3C.close(m,false)}m.getElement("a.anchor").addvent("click",function(n){W3C.open(m,true)});if(!m.hasClass("grouped")){if(m.getElement("a.infos")){m.getElement("a.infos").addEvent("click",function(n){n.preventDefault();W3C.open(m,true);W3C.closeAllSectionsBut(m,m.getElement("div.infos"),true);e.toElement(m)})}if(m.getElement("a.errors")){m.getElement("a.errors").addEvent("click",function(n){n.preventDefault();W3C.open(m,true);W3C.closeAllSectionsBut(m,m.getElement("div.errors"),true);e.toElement(m)})}if(m.getElement("a.warnings")){m.getElement("a.warnings").addEvent("click",function(n){n.preventDefault();W3C.open(m,true);W3C.closeAllSectionsBut(m,m.getElement("div.warnings"),true);e.toElement(m)})}}});$$("div#messages pre").slide("hide");$$("div#messages > div").each(function(m){if(m.getElement("pre")){m.addClass("pointer");m.addEvent("click",function(n){m.getElement("pre").slide("toggle")})}});var d=new Fx.SmoothScroll({links:".smooth",wheelStops:true});W3C.parseHash();var c=$("observations").getProperty("class");var k=new RegExp(/contextShow:'[^']*'/);ar b=k.exec(c);var l="";for(i=0;i<b.length;i++){l=l+b[i]}var f=l.replace("contextShow:","").replace(/'/g,"");var k=new RegExp(/contextHide:'[^']*'/);var b=k.exec(c);var l="";for(i=0;i<b.length;i++){l=l+b[i]}var h=l.replace("contextHide:","").replace(/'/g,"");$$("td.message").each(function(m){if(m.getProperty("rowspan")>W3C.ContextsToShow){var n=m.getParent("tr");var t=n.getElement("td.anchor");var u=m.getProperty("rowspan");var o=1;var s=n;var r=new Array();var q=0;while(o<=u){if(o>W3C.ContextsToShow){s.setStyle("display","none");r[q]=s;q++}if(o==u){var v=new Element("tr",{"class":"showContext"});var p=new Element("td",{colspan:"3"});p.addClass("pointer");p.setProperty("title",f.replace(/%1/,r.length));p.set("text",f.replace(/%1/,r.length));p.inject(v);v.inject(s,"after");v.addEvent("click",function(w){var x=r.some(function(y){if(y.getStyle("display")=="none"){return true}else{return false}});if(x){r.each(function(y){y.setStyle("display","")});m.setProperty("rowspan",u+1);t.setProperty("rowspan",u+1);p.setPoperty("title",h);p.set("text",h);j.toElement(n)}else{r.each(function(y){y.setStyle("display","none")});m.setProperty("rowspan",W3C.ContextsToShow+1);t.setProperty("rowspan",W3C.ContextsToShow+1);p.setProperty("title",f.replace(/%1/,r.length));p.set("text",f.replace(/%1/,r.length));j.toElement(n)}})}s=s.getNext("tr");o++}m.setProperty("rowspan",W3C.ContextsToShow+1);t.setProperty("rowspan",W3C.ContextsToShow+1)}})},toggle:function(b){var c=b.getElement(".title");var a=b.retrieve("fxSlide");if(b.retrieve("open")){W3C.close(b,true)}else{W3C.open(b,true)}},close:function(b,e){var d=b.retrieve("open");var c=b.getElement(".title");var a=b.retrieve("fxSlide");c.removeClass("toggled");b.store("open",false);if(e&&d){a.slideOut().chain(function(){b.getElement("div").setStyle("display","none");a.callChain()})}else{a.hide();b.getElement("div").setStyle("display","none")}},open:function(c,e){var b=!c.retrieve("open");var d=c.getElement(".title");var a=c.retrieve("fxSlide");d.addClass("toggled");c.store("open",true);c.gtElement("div").setStyle("display","");if(e&&b){a.slideIn().chain(function(){c.getElement("div").setStyle("height","auto");a.callChain()})}else{a.show();c.getElement("div").setStyle("height","auto")}},closeAllObserversBut:function(a,b){W3C.Observers.each(function(c){if(c!=a){W3C.close(c,b)}});W3C.open(a,b)},closeAllSectionsBut:function(a,b,c){a.getElements(".section").each(function(d){if(d!=b){W3C.close(d,c)}});W3C.open(b,c)},parseHash:function(){var e=window.location.hash;if(e==""){return}var b=e.replace("#","").split("_");var k=b[0];var n=b[1];var a=b[2];var j=b[3];var f=new Fx.Scroll(document,{duration:0});var g=W3C.Observers.getProperty("id").indexOf(k);if(g==-1){W3C.setHash("");return}var h=W3C.Observers[g];W3C.open(h,false);if(!n){f.toElement(h);return}var l=h.getElements(".section").getProperty("id").indexOf(k+"_"+n);if(l==-1){W3C.setHash(k);return}var m=h.getElements(".section")[l];W3C.closeAllSectionsBut(h,m,false);if(!a){f.toElement(h);return}var d=m.getElements("td.uri").getProperty("id").indexOfk+"_"+n+"_"+a);if(d==-1){W3C.setHash(k+"_"+n);return}var c=m.getElements("td.uri")[d];if(!j){f.toElement(c);return}W3C.setHash(e)},updateHash:function(){var c=W3C.Forms[W3C.SelectedTab].getProperty("id");var b="+task_"+W3C.TaskOptions[W3C.SelectedTask].getProperty("value");var a=W3C.WithOptions?"+with_options":"";W3C.setHash(c+b+a)},cleanHash:function(){var a=window.location.hash;if(a.match("^#validate-by")){W3C.setHash("")}},setHash:function(a){if(window.webkit419){W3C.FakeForm=W3C.FakeForm||new Element("form",{method:"get"}).injectInside(document.body);W3C.FakeForm.setProperty("action","#"+a).submit()}else{window.location.replace("#"+a)}}};window.addEvent("domready",W3C.start);window.addEvent("onbeforeunload",function(){console.log(history.toString());history.go(-2)});
\ No newline at end of file
+var W3C={start:function(){W3C.cleanHash();W3C.ContextsToShow=7;W3C.Observers=$$(".observer");var g=500;var a=$$(".observer.invalid");var e=new Fx.Scroll(document);var j=new Fx.Scroll(document,{duration:0});$$(".section").each(function(o){var q=o.getElement(".title");var p=o.getElement(".block");if(!o.hasClass("observer")||o.getElement(".section")!=null){q.addClass("pointer");var n=new Element("span",{"class":"arrow"});var m;if(q.getElement("span.icons")!=null){m=q.getElement("span.icons")}else{m=q.getElement("a.anchor")}n.inject(m,"after")}o.store("fxSlide",new Fx.Slide(p,{duration:g,link:"cancel"}));o.store("block",p);q.addEvent("click",function(r){W3C.toggle(o)})});$$(".observer .section").each(function(m){if(m.hasClass("warnings")){W3C.close(m,false)}else{W3C.open(m,false)}});$$(".observer .title a").each(function(m){m.addEvent("click",function(n){n.stopPropagation()})});$$(".observer").each(function(m){W3C.open(m,false);if(m.hasClass("valid")&&a.length>0){W3C.close(m,false)}m.getElement("a.anchor").addvent("click",function(n){W3C.open(m,true)});if(!m.hasClass("grouped")){if(m.getElement("a.infos")){m.getElement("a.infos").addEvent("click",function(n){n.preventDefault();W3C.open(m,true);W3C.closeAllSectionsBut(m,m.getElement("div.infos"),true);e.toElement(m)})}if(m.getElement("a.errors")){m.getElement("a.errors").addEvent("click",function(n){n.preventDefault();W3C.open(m,true);W3C.closeAllSectionsBut(m,m.getElement("div.errors"),true);e.toElement(m)})}if(m.getElement("a.warnings")){m.getElement("a.warnings").addEvent("click",function(n){n.preventDefault();W3C.open(m,true);W3C.closeAllSectionsBut(m,m.getElement("div.warnings"),true);e.toElement(m)})}}});$$("div#messages pre").slide("hide");$$("div#messages > div").each(function(m){if(m.getElement("pre")){m.addClass("pointer");m.addEvent("click",function(n){m.getElement("pre").slide("toggle")})}});var d=new Fx.SmoothScroll({links:".smooth",wheelStops:true});W3C.parseHash();var c=$("observations").getProperty("class");var k=new RegExp(/contextShow:'[^']*'/);ar b=k.exec(c);var l="";for(i=0;i<b.length;i++){l=l+b[i]}var f=l.replace("contextShow:","").replace(/'/g,"");var k=new RegExp(/contextHide:'[^']*'/);var b=k.exec(c);var l="";for(i=0;i<b.length;i++){l=l+b[i]}var h=l.replace("contextHide:","").replace(/'/g,"");$$("td.message").each(function(m){if(m.getProperty("rowspan")>W3C.ContextsToShow){var n=m.getParent("tr");var t=n.getElement("td.anchor");var u=m.getProperty("rowspan");var o=1;var s=n;var r=new Array();var q=0;while(o<=u){if(o>W3C.ContextsToShow){s.setStyle("display","none");r[q]=s;q++}if(o==u){var v=new Element("tr",{"class":"showContext"});var p=new Element("td",{colspan:"3"});p.addClass("pointer");p.setProperty("title",f.replace(/%1/,r.length));p.set("text",f.replace(/%1/,r.length));p.inject(v);v.inject(s,"after");v.addEvent("click",function(w){var x=r.some(function(y){if(y.getStyle("display")=="none"){return true}else{return false}});if(x){r.each(function(y){y.setStyle("display","")});m.setProperty("rowspan",u+1);t.setProperty("rowspan",u+1);p.setPoperty("title",h);p.set("text",h);j.toElement(n)}else{r.each(function(y){y.setStyle("display","none")});m.setProperty("rowspan",W3C.ContextsToShow+1);t.setProperty("rowspan",W3C.ContextsToShow+1);p.setProperty("title",f.replace(/%1/,r.length));p.set("text",f.replace(/%1/,r.length));j.toElement(n)}})}s=s.getNext("tr");o++}m.setProperty("rowspan",W3C.ContextsToShow+1);t.setProperty("rowspan",W3C.ContextsToShow+1)}})},toggle:function(b){var c=b.getElement(".title");var a=b.retrieve("fxSlide");if(b.retrieve("open")){W3C.close(b,true)}else{W3C.open(b,true)}},close:function(b,e){var d=b.retrieve("open");var c=b.getElement(".title");var a=b.retrieve("fxSlide");c.removeClass("toggled");b.store("open",false);if(e&&d){a.slideOut().chain(function(){b.getElement("div").setStyle("display","none");a.callChain()})}else{a.hide();b.getElement("div").setStyle("display","none")}},open:function(c,e){var b=!c.retrieve("open");var d=c.getElement(".title");var a=c.retrieve("fxSlide");d.addClass("toggled");c.store("open",true);c.gtElement("div").setStyle("display","");if(e&&b){a.slideIn().chain(function(){c.getElement("div").setStyle("height","auto");a.callChain()})}else{a.show();c.getElement("div").setStyle("height","auto")}},closeAllObserversBut:function(a,b){W3C.Observers.each(function(c){if(c!=a){W3C.close(c,b)}});W3C.open(a,b)},closeAllSectionsBut:function(a,b,c){a.getElements(".section").each(function(d){if(d!=b){W3C.close(d,c)}});W3C.open(b,c)},parseHash:function(){var e=window.location.hash;if(e==""){return}var b=e.replace("#","").split("_");var k=b[0];var n=b[1];var a=b[2];var j=b[3];var f=new Fx.Scroll(document,{duration:0});var g=W3C.Observers.getProperty("id").indexOf(k);if(g==-1){W3C.setHash("");return}var h=W3C.Observers[g];W3C.open(h,false);if(!n){f.toElement(h);return}var l=h.getElements(".section").getProperty("id").indexOf(k+"_"+n);if(l==-1){W3C.setHash(k);return}var m=h.getElements(".section")[l];W3C.closeAllSectionsBut(h,m,false);if(!a){f.toElement(h);return}var d=m.getElements("td.uri").getProperty("id").indexOfk+"_"+n+"_"+a);if(d==-1){W3C.setHash(k+"_"+n);return}var c=m.getElements("td.uri")[d];if(!j){f.toElement(c);return}W3C.setHash(e.replace("#",""))},updateHash:function(){var c=W3C.Forms[W3C.SelectedTab].getProperty("id");var b="+task_"+W3C.TaskOptions[W3C.SelectedTask].getProperty("value");var a=W3C.WithOptions?"+with_options":"";W3C.setHash(c+b+a)},cleanHash:function(){var a=window.location.hash;if(a.match("^#validate-by")){W3C.setHash("")}},setHash:function(a){if(window.webkit419){W3C.FakeForm=W3C.FakeForm||new Element("form",{method:"get"}).injectInside(document.body);W3C.FakeForm.setProperty("action","#"+a).submit()}else{window.location.replace("#"+a)}}};window.addEvent("domready",W3C.start);
\ No newline at end of file
Received on Tuesday, 27 October 2009 14:13:07 UTC

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