<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
-Copyright (c) 2008, Paul Mucur, http://mucur.name
+Copyright (c) 2008-2009, Paul Mucur, http://mucur.name
 
 All rights reserved.
 </diff>
      <filename>BSD-LICENSE.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-jQuery Form Example Plugin 1.4.1
+jQuery Form Example Plugin 1.4.2
 ======================================
 
 This is a jQuery plugin to populate form inputs with example text that
@@ -111,4 +111,4 @@ the Free Software Foundation; either version 2 of the License, or
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
\ No newline at end of file
+GNU General Public License for more details.</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 /*
- * jQuery Form Example Plugin 1.4.1
+ * jQuery Form Example Plugin 1.4.2
  * Populate form inputs with example text that disappears on focus.
  *
  * e.g.
@@ -129,7 +129,14 @@
           $(this).removeClass(o.className);
         }
       });
-    
+
+      /* Detect a change event to the field and remove the example class. */
+      $this.change(function() {
+        if ($(this).is('.' + o.className)) {
+          $(this).removeClass(o.className);
+        }
+      });
+
       /* Make the example text reappear if the input is blank on blurring. */
       $this.blur(function() {
         if ($(this).val() == '') {
@@ -157,4 +164,4 @@
   /* All the class names used are stored as keys in the following array. */
   $.fn.example.boundClassNames = [];
   
-})(jQuery);
\ No newline at end of file
+})(jQuery);</diff>
      <filename>jquery.example.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 /*
- * jQuery Form Example Plugin 1.4.1
+ * jQuery Form Example Plugin 1.4.2
  * Populate form inputs with example text that disappears on focus.
  *
  * e.g.
@@ -25,4 +25,4 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
-(function(A){A.fn.example=function(E,C){var D=A.isFunction(E);var B=A.extend({},C,{example:E});return this.each(function(){var F=A(this);if(A.metadata){var G=A.extend({},A.fn.example.defaults,F.metadata(),B)}else{var G=A.extend({},A.fn.example.defaults,B)}if(!A.fn.example.boundClassNames[G.className]){A(window).unload(function(){A(&quot;.&quot;+G.className).val(&quot;&quot;)});A(&quot;form&quot;).submit(function(){A(this).find(&quot;.&quot;+G.className).val(&quot;&quot;)});A.fn.example.boundClassNames[G.className]=true}if(A.browser.msie&amp;&amp;!F.attr(&quot;defaultValue&quot;)&amp;&amp;(D||F.val()==G.example)){F.val(&quot;&quot;)}if(F.val()==&quot;&quot;&amp;&amp;this!=document.activeElement){F.addClass(G.className);F.val(D?G.example.call(this):G.example)}F.focus(function(){if(A(this).is(&quot;.&quot;+G.className)){A(this).val(&quot;&quot;);A(this).removeClass(G.className)}});F.blur(function(){if(A(this).val()==&quot;&quot;){A(this).addClass(G.className);A(this).val(D?G.example.call(this):G.example)}})})};A.fn.example.defaults={className:&quot;example&quot;};A.fn.example.boundClassNames=[]})(jQuery);
\ No newline at end of file
+(function(a){a.fn.example=function(e,c){var d=a.isFunction(e);var b=a.extend({},c,{example:e});return this.each(function(){var f=a(this);if(a.metadata){var g=a.extend({},a.fn.example.defaults,f.metadata(),b)}else{var g=a.extend({},a.fn.example.defaults,b)}if(!a.fn.example.boundClassNames[g.className]){a(window).unload(function(){a(&quot;.&quot;+g.className).val(&quot;&quot;)});a(&quot;form&quot;).submit(function(){a(this).find(&quot;.&quot;+g.className).val(&quot;&quot;)});a.fn.example.boundClassNames[g.className]=true}if(a.browser.msie&amp;&amp;!f.attr(&quot;defaultValue&quot;)&amp;&amp;(d||f.val()==g.example)){f.val(&quot;&quot;)}if(f.val()==&quot;&quot;&amp;&amp;this!=document.activeElement){f.addClass(g.className);f.val(d?g.example.call(this):g.example)}f.focus(function(){if(a(this).is(&quot;.&quot;+g.className)){a(this).val(&quot;&quot;);a(this).removeClass(g.className)}});f.change(function(){if(a(this).is(&quot;.&quot;+g.className)){a(this).removeClass(g.className)}});f.blur(function(){if(a(this).val()==&quot;&quot;){a(this).addClass(g.className);a(this).val(d?g.example.call(this):g.example)}})})};a.fn.example.defaults={className:&quot;example&quot;};a.fn.example.boundClassNames=[]})(jQuery);</diff>
      <filename>jquery.example.min.js</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@
   
   &lt;script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;&gt;&lt;/script&gt;
   &lt;script type=&quot;text/javascript&quot; src=&quot;metadata.js&quot;&gt;&lt;/script&gt;
-  
+
   &lt;!-- Include the library twice. --&gt;
   &lt;script type=&quot;text/javascript&quot; src=&quot;../jquery.example.js&quot;&gt;&lt;/script&gt;  
   &lt;script type=&quot;text/javascript&quot; src=&quot;../jquery.example.js&quot;&gt;&lt;/script&gt;
@@ -199,6 +199,21 @@
     equals($('#m2').val(), &quot;Precedence&quot;, &quot;The example in the arguments should take precedence&quot;);
     ok($('#m2').hasClass('o1'), &quot;The class should be 'o1'.&quot;);
   });
+  
+  module(&quot;Changing values by Javascript&quot;);
+  test(&quot;should set example&quot;, function() {
+    $('#f1').example('Example');
+
+    equals($('#f1').val(), &quot;Example&quot;, &quot;The example should read 'Example'.&quot;);
+    ok($('#f1').hasClass('example'), &quot;The example class should be set.&quot;);
+  });
+  test(&quot;should remove example class when changed&quot;, function() {
+    $('#f1').val(&quot;New value&quot;);
+    $('#f1').change();
+    
+    equals($('#f1').val(), &quot;New value&quot;, &quot;Value should be changed to 'New value'.&quot;);
+    ok(!$('#f1').hasClass('example'), &quot;The example class should no longer be set.&quot;);
+  });
   &lt;/script&gt;
   &lt;div id=&quot;inputs&quot;&gt;
   &lt;form id=&quot;basicform&quot;&gt;
@@ -222,6 +237,9 @@
   &lt;p&gt;&lt;input type=&quot;text&quot; id=&quot;m1&quot; class=&quot;{example: 'Something', className: 'm1'}&quot;&gt;&lt;/p&gt;
   &lt;p&gt;&lt;input type=&quot;text&quot; id=&quot;m2&quot; class=&quot;{example: 'Override', className: 'm2'}&quot;&gt;&lt;/p&gt;
   &lt;/form&gt;
+  &lt;form id=&quot;no_focus&quot;&gt;
+  &lt;p&gt;&lt;input type=&quot;text&quot; id=&quot;f1&quot;&gt;&lt;/p&gt;
+  &lt;/form&gt;
   &lt;/div&gt;
 &lt;/body&gt;
-&lt;/html&gt;
\ No newline at end of file
+&lt;/html&gt;</diff>
      <filename>test/index.html</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@
  * Dual licensed under the MIT (MIT-LICENSE.txt)
  * and GPL (GPL-LICENSE.txt) licenses.
  *
- * $Id: testrunner.js 6133 2009-01-19 22:38:58Z jeresig $
+ * $Id: testrunner.js 6173 2009-02-02 20:09:32Z jeresig $
  */
 
 (function($) {
@@ -232,7 +232,10 @@ $.extend(window, {
 		push(equiv(a, b), a, b, message);
 	},
 	QUnit: {
-		equiv: equiv
+		equiv: equiv,
+		ok: ok,
+		done: function(failures, total){},
+		log: function(result, message){}
 	},
 	// legacy methods below
 	isSet: isSet,
@@ -254,10 +257,14 @@ $.extend(window, {
 
 $(window).load(function() {
 	$('#userAgent').html(navigator.userAgent);
-	var head = $('&lt;div class=&quot;testrunner-toolbar&quot;&gt;&lt;label for=&quot;filter&quot;&gt;Hide passed tests&lt;/label&gt;&lt;/div&gt;').insertAfter(&quot;#userAgent&quot;);
-	$('&lt;input type=&quot;checkbox&quot; id=&quot;filter&quot; /&gt;').attr(&quot;disabled&quot;, true).prependTo(head).click(function() {
+	var head = $('&lt;div class=&quot;testrunner-toolbar&quot;&gt;&lt;label for=&quot;filter-pass&quot;&gt;Hide passed tests&lt;/label&gt;&lt;/div&gt;').insertAfter(&quot;#userAgent&quot;);
+	$('&lt;input type=&quot;checkbox&quot; id=&quot;filter-pass&quot; /&gt;').attr(&quot;disabled&quot;, true).prependTo(head).click(function() {
 		$('li.pass')[this.checked ? 'hide' : 'show']();
 	});
+	$('&lt;input type=&quot;checkbox&quot; id=&quot;filter-missing&quot;&gt;').attr(&quot;disabled&quot;, true).appendTo(head).click(function() {
+		$(&quot;li.fail:contains('missing test - untested code is broken code')&quot;).parent('ol').parent('li.fail')[this.checked ? 'hide' : 'show']();
+	});
+	$(&quot;#filter-missing&quot;).after('&lt;label for=&quot;filter-missing&quot;&gt;Hide missing tests (untested code is broken code)&lt;/label&gt;');
 	runTest();	
 });
 
@@ -278,7 +285,7 @@ function stop(timeout) {
 	config.blocking = true;
 	if (timeout)
 		config.timeout = setTimeout(function() {
-			ok( false, &quot;Test timed out&quot; );
+			QUnit.ok( false, &quot;Test timed out&quot; );
 			start();
 		}, timeout);
 }
@@ -324,6 +331,7 @@ function runTest() {
 			.join(''))
 			.appendTo(&quot;body&quot;);
 		$(&quot;#banner&quot;).addClass(config.stats.bad ? &quot;fail&quot; : &quot;pass&quot;);
+		QUnit.done( config.stats.bad, config.stats.all );
 	});
 }
 
@@ -371,10 +379,7 @@ function test(name, callback) {
 				saveGlobal();
 			lifecycle.setup();
 		} catch(e) {
-			config.assertions.push( {
-				result: false,
-				message: &quot;Setup failed on &quot; + name + &quot;: &quot; + e.message
-			});
+			QUnit.ok( false, &quot;Setup failed on &quot; + name + &quot;: &quot; + e.message );
 		}
 	})
 	synchronize(function() {
@@ -386,10 +391,7 @@ function test(name, callback) {
 				console.error(e);
 				console.warn(callback.toString());
 			}
-			config.assertions.push( {
-				result: false,
-				message: &quot;Died on test #&quot; + (config.assertions.length + 1) + &quot;: &quot; + e.message
-			});
+			QUnit.ok( false, &quot;Died on test #&quot; + (config.assertions.length + 1) + &quot;: &quot; + e.message );
 			// else next test will carry the responsibility
 			saveGlobal();
 		}
@@ -399,10 +401,7 @@ function test(name, callback) {
 			checkPollution();
 			lifecycle.teardown();
 		} catch(e) {
-			config.assertions.push( {
-				result: false,
-				message: &quot;Teardown failed on &quot; + name + &quot;: &quot; + e.message
-			});
+			QUnit.ok( false, &quot;Teardown failed on &quot; + name + &quot;: &quot; + e.message );
 		}
 	})
 	synchronize(function() {
@@ -417,10 +416,7 @@ function test(name, callback) {
 		}
 		
 		if(config.expected &amp;&amp; config.expected != config.assertions.length) {
-			config.assertions.push({
-				result: false,
-				message: &quot;Expected &quot; + config.expected + &quot; assertions, but &quot; + config.assertions.length + &quot; were run&quot;
-			});
+			QUnit.ok( false, &quot;Expected &quot; + config.expected + &quot; assertions, but &quot; + config.assertions.length + &quot; were run&quot; );
 		}
 		
 		var good = 0, bad = 0;
@@ -448,7 +444,8 @@ function test(name, callback) {
 		$(&quot;&lt;li/&gt;&quot;).addClass(bad ? &quot;fail&quot; : &quot;pass&quot;).append(b).append(ol).appendTo(&quot;#tests&quot;);
 	
 		if(bad) {
-			$(&quot;#filter&quot;).attr(&quot;disabled&quot;, null);
+			$(&quot;#filter-pass&quot;).attr(&quot;disabled&quot;, null);
+			$(&quot;#filter-missing&quot;).attr(&quot;disabled&quot;, null);
 		}
 	});
 }
@@ -480,6 +477,8 @@ function reset() {
  * @example ok( $(&quot;a&quot;).size() &gt; 5, &quot;There must be at least 5 anchors&quot; );
  */
 function ok(a, msg) {
+	QUnit.log(a, msg);
+
 	config.assertions.push({
 		result: !!a,
 		message: msg
@@ -514,10 +513,7 @@ function isSet(a, b, msg) {
 				ret = false;
 	} else
 		ret = false;
-	config.assertions.push({
-		result: ret,
-		message: !ret ? (msg + &quot; expected: &quot; + serialArray(b) + &quot; result: &quot; + serialArray(a)) : msg
-	});
+	QUnit.ok( ret, !ret ? (msg + &quot; expected: &quot; + serialArray(b) + &quot; result: &quot; + serialArray(a)) : msg );
 }
 
 /**
@@ -537,10 +533,7 @@ function isObj(a, b, msg) {
 	} else
 		ret = false;
 
-    config.assertions.push({
-		result: ret,
-		message: msg
-	});
+    QUnit.ok( ret, msg );
 }
 
 /**
@@ -599,10 +592,7 @@ function equals(actual, expected, message) {
 
 function push(result, actual, expected, message) {
 	message = message || (result ? &quot;okay&quot; : &quot;failed&quot;);
-	config.assertions.push({
-		result: result,
-		message: result ? message + &quot;: &quot; + expected : message + &quot;, expected: &quot; + jsDump.parse(expected) + &quot; result: &quot; + jsDump.parse(actual)
-	});
+	QUnit.ok( result, result ? message + &quot;: &quot; + expected : message + &quot;, expected: &quot; + jsDump.parse(expected) + &quot; result: &quot; + jsDump.parse(actual) );
 }
 
 /**</diff>
      <filename>test/testrunner.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>864188d646a09cc8e97a95a453b731cdfa034016</id>
    </parent>
  </parents>
  <author>
    <name>Paul Mucur</name>
    <email>mudge@mudge.name</email>
  </author>
  <url>http://github.com/mudge/jquery_example/commit/5b425087153acfd8e93250ac10743aaf9a09f225</url>
  <id>5b425087153acfd8e93250ac10743aaf9a09f225</id>
  <committed-date>2009-05-17T12:14:23-07:00</committed-date>
  <authored-date>2009-05-17T12:14:23-07:00</authored-date>
  <message>Handle change events (as sent by plugins such as UI Datepicker) as well as using focus/blur.</message>
  <tree>ba34ea9f75fc579fdeb1c1d4f97e6c713e918505</tree>
  <committer>
    <name>Paul Mucur</name>
    <email>mudge@mudge.name</email>
  </committer>
</commit>
