W3C home > Mailing lists > Public > www-validator-cvs@w3.org > March 2010

2006/unicorn/WebContent/scripts w3c_unicorn_languages.js,1.5,1.6 w3c_unicorn_languages-yc.js,1.1,1.2

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 16 Mar 2010 16:25:08 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1NrZZs-0002EG-DG@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/WebContent/scripts
In directory hutz:/tmp/cvs-serv8504/WebContent/scripts

Modified Files:
	w3c_unicorn_languages.js w3c_unicorn_languages-yc.js 
Log Message:
Added Tooltips on untranslated strings too (ticket #77)

Index: w3c_unicorn_languages-yc.js
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/scripts/w3c_unicorn_languages-yc.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- w3c_unicorn_languages-yc.js	22 Oct 2009 12:56:50 -0000	1.1
+++ w3c_unicorn_languages-yc.js	16 Mar 2010 16:25:06 -0000	1.2
@@ -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.TableRows=$$("fieldset.translation table tbody tr");if($("a_miss")){$("a_miss").addEvent("click",function(b){b.preventDefault();W3C.TableRows.each(function(c){if(c.getElement("td.missing")){c.setStyle("display","")}else{c.setStyle("display","none")}})});$("a_mod").addEvent("click",function(b){b.preventDefault();W3C.TableRows.each(function(c){if(c.getElement("td.modified")){c.setStyle("display","")}else{c.setStyle("display","none")}})});$("a_all").addEvent("click",function(b){b.preventDefault();W3C.TableRows.each(function(c){c.setStyle("display","")})});$$("fieldset.translation td").each(function(c){var b=c.getElement("input");b.store("ucn:trad",b.value);b.addEvent("keyup",function(d){if(b.value!=b.retrieve("ucn:trad")&&b.value!=""){c.addClass("modified");c.removeClass("missing")}else{c.removeClass("modified");if(b.value==""){c.addClass("missing")}}W3C.updateLinks()})});W3C.updateLinks()}else{var a=$$("#translations td.ok");a.each(function(b){var c=b.getElement("span");b.store(tip:text",c.title);c.removeProperty("title")});new Tips(a)}},updateLinks:function(){if($("translations").getElements("td.missing").length==0){$("a_miss").setStyle("display","none")}else{$("a_miss").setStyle("display","")}if($("translations").getElements("td.modified").length==0){$("a_mod").setStyle("display","none")}else{$("a_mod").setStyle("display","")}$("a_all").setStyle("display","")}};window.addEvent("domready",W3C.start);
\ No newline at end of file
+var W3C={start:function(){W3C.TableRows=$$("fieldset.translation table tbody tr");if($("a_miss")){$("a_miss").addEvent("click",function(b){b.preventDefault();W3C.TableRows.each(function(c){if(c.getElement("td.missing")){c.setStyle("display","")}else{c.setStyle("display","none")}})});$("a_mod").addEvent("click",function(b){b.preventDefault();W3C.TableRows.each(function(c){if(c.getElement("td.modified")){c.setStyle("display","")}else{c.setStyle("display","none")}})});$("a_all").addEvent("click",function(b){b.preventDefault();W3C.TableRows.each(function(c){c.setStyle("display","")})});$$("fieldset.translation td").each(function(c){var b=c.getElement("input");b.store("ucn:trad",b.value);b.addEvent("keyup",function(d){if(b.value!=b.retrieve("ucn:trad")&&b.value!=""){c.addClass("modified");c.removeClass("missing")}else{c.removeClass("modified");if(b.value==""){c.addClass("missing")}}W3C.updateLinks()})});W3C.updateLinks()}else{var a=$$("#translations td");a.each(function(b){var c=b.getElement("span");b.store("ti:text",c.title);c.removeProperty("title")});new Tips(a)}},updateLinks:function(){if($("translations").getElements("td.missing").length==0){$("a_miss").setStyle("display","none")}else{$("a_miss").setStyle("display","")}if($("translations").getElements("td.modified").length==0){$("a_mod").setStyle("display","none")}else{$("a_mod").setStyle("display","")}$("a_all").setStyle("display","")}};window.addEvent("domready",W3C.start);
\ No newline at end of file

Index: w3c_unicorn_languages.js
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/scripts/w3c_unicorn_languages.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- w3c_unicorn_languages.js	22 Oct 2009 12:56:50 -0000	1.5
+++ w3c_unicorn_languages.js	16 Mar 2010 16:25:06 -0000	1.6
@@ -60,13 +60,13 @@
 		
 		} else {
 		
-			var tdOk = $$('#translations td.ok');
-			tdOk.each(function(element) {
+			var td = $$('#translations td');
+			td.each(function(element) {
 				var span = element.getElement('span'); 
 				element.store('tip:text', span.title);
 				span.removeProperty('title');
 			});
-			new Tips(tdOk);
+			new Tips(td);
 		}
 		
 	},
Received on Tuesday, 16 March 2010 16:25:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:19 GMT