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

2006/unicorn/WebContent/scripts w3c_unicorn_index.js,1.10,1.11

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 30 Sep 2009 09:32:02 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MsvXW-0007G8-T2@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/WebContent/scripts
In directory hutz:/tmp/cvs-serv27799/WebContent/scripts

Modified Files:
	w3c_unicorn_index.js 
Log Message:
added mimeType list change on task change

Index: w3c_unicorn_index.js
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/scripts/w3c_unicorn_index.js,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- w3c_unicorn_index.js	15 Sep 2009 11:41:36 -0000	1.10
+++ w3c_unicorn_index.js	30 Sep 2009 09:32:00 -0000	1.11
@@ -162,12 +162,16 @@
 		
 		var options = $$('fieldset.options');
 		options.setStyle('display', 'none');
-		
 		options.getElements('.option_input').each(function (input) {
 			input.setProperty('disabled', 'disabled');
 		});
 		
+		var mimeSelect = $$('.ucn_text_mime');
+		mimeSelect.setStyle('display', 'none');
+		mimeSelect.setProperty('disabled', 'disabled');
+		
 		var currentOptions = options.filter('fieldset.' + taskId);
+		var currentMimeSelect = $$('.ucn_text_mime.' + taskId);
 		
 		if (!currentOptions.length > 0)
 			W3C.requestOptions(taskIndex, withFX);
@@ -182,6 +186,15 @@
 				currentOptions.tween('opacity', 0, 1);
 			}
 			currentOptions.setStyle('opacity', 1);
+			
+			currentMimeSelect.removeProperty('disabled');
+			currentMimeSelect.setStyle('opacity', 0);
+			currentMimeSelect.setStyle('display', 'block');
+			if (withFX) {
+				currentMimeSelect.set('tween', {'duration': 350});
+				currentMimeSelect.tween('opacity', 0, 1);
+			}
+			currentMimeSelect.setStyle('opacity', 1);
 		}
 		
 		W3C.toggleOptions(false);
@@ -208,6 +221,15 @@
 						clone.setStyle('opacity', 1);
 					});
 				});
+				responseElements.filter('.ucn_text_mime').each(function(select) {
+					select.setStyle('opacity', 0);
+					select.inject($('ucn_text'), 'after');
+					if (withFX) {
+						select.set('tween', {'duration': 350});
+						select.tween('opacity', 0, 1);
+					}
+					select.setStyle('opacity', 1);
+				});
 				W3C.Loader.dispose();
 				W3C.toggleOptions(false);
 				W3C.addOptionEvents();
Received on Wednesday, 30 September 2009 09:32:06 GMT

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