<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitignore</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/autocomplete_widget.css</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/photo_album_widget.css</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/photo_album_widget.html</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/rating_widget.css</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/slideshow_widget.css</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/1.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/10.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/11.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/12.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/13.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/14.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/15.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/2.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/3.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/4.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/5.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/6.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/7.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/8.jpg</filename>
    </added>
    <added>
      <filename>test/unit/fixtures/sunset/9.jpg</filename>
    </added>
    <added>
      <filename>test/unit/photo_album_widget_test.js</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -131,12 +131,12 @@ var FormWidget = Class.create(Widget,
    * @param {String,HTMLElement} id_second The second form element.
    * @message {String} An error message that is shown on failure.
    */
-  validatesConfirmationOf: function(id_first, id_second, message){
+  validatesConfirmationOf: function(id_first, id_second, message) {
     var field_first = $(id_first);
     var field_second = $(id_second);
     this.validators.push(function() {
       if (field_first &amp;&amp; field_second &amp;&amp; $F(id_first) != $F(id_second)) {
-        FormWidget.handleError(field, message);
+        FormWidget.handleError(field_first, message);
         return false;
       }
       return true;</diff>
      <filename>src/widgets/form_widget.js</filename>
    </modified>
    <modified>
      <diff>@@ -24,14 +24,13 @@ var MnemonicForm = Class.create(FormWidget,
   initialize: function(element) {
     FormWidget.prototype.initialize.apply(this, arguments);
     
-    var self = this;
     this.inputs = new Array();
     this.element.getInputs().each(function(element) {
       if (element.type != 'submit')
-        self.inputs.push(element);
+        this.inputs.push(element);
       if (element.type == 'text')
-        element.observe('keyup', self.storeValues.bindAsEventListener(self));
-    });
+        Event.observe(element, 'keyup', this.storeValues.bindAsEventListener(self));
+    }.bind(this));
     this.values = new Hash();
     this.storeValues();
   },
@@ -40,14 +39,16 @@ var MnemonicForm = Class.create(FormWidget,
    * Stores the values of all of the form's fields.
    */
   storeValues: function() {
-    this.values.merge(this.inputs.inject(new Hash(), function(hash, element) {
+    var h = new Hash();
+    this.values = this.values.merge(this.inputs.inject(h, function(hash, element) {
       if (element.value &amp;&amp; element.value != &quot;&quot;) {
-        if(element.type !== 'radio')
-          hash[element.identify()] = element.value;
+        if (element.type != 'radio') {
+          hash.set(element.identify(), element.value);
+        }
       }
       return hash;
     }));
-    this.values.merge(this.radios());
+    this.values = this.values.merge(this.radios());
   },
   
   /**</diff>
      <filename>src/widgets/mnemonic_form.js</filename>
    </modified>
    <modified>
      <diff>@@ -223,21 +223,25 @@ var SlideshowControls = {
   start: function(event) {
     $S('slideshow', 'start')(event);
     this.showStop();
+    event.stop();
   },
   
   stop: function(event) {
     $S('slideshow', 'stop')(event);
     this.showStart();
+    event.stop();
   },
   
   next: function(event) {
     $S('slideshow', 'next')(event);
     this.showStart();
+    event.stop();
   },
   
   previous: function(event) {
     $S('slideshow', 'previous')(event);
     this.showStart();
+    event.stop();
   },
   
   showStart: function() {</diff>
      <filename>src/widgets/slideshow_widget.js</filename>
    </modified>
    <modified>
      <diff>@@ -19,21 +19,20 @@ new Test.Unit.Runner({
     var w = new RemoteLinkWidget($('remote_link'));
     Event.simulateMouse(w.element, 'click');
     
+  }},
+
+  testCallbacks: function() { with(this) {
+    var w = new RemoteLinkWidget($('remote_link'));
+    var numCalled = 0;
+    var callbacks = ['loading', 'loaded', 'interactive', 'success', 'failure', 'complete'];
+    callbacks.each(function(callback) {
+      mockup(w, callback, function() {
+        numCalled++;
+      }.bind(this));
+    }.bind(this));
+    Event.simulateMouse(w.element, 'click');
+    this.wait(1000, function() {
+      this.assertEqual(callbacks.length, numCalled);
+    }.bind(this));
   }}
-  
-  // How to test asynchronous stuff?
-  // testCallbacks: function() { with(this) {
-  //   var w = new RemoteLinkWidget($('remote_link'));
-  //   var numCalled = 0;
-  //   var callbacks = ['loading', 'loaded', 'interactive', 'success', 'failure', 'complete'];
-  //   callbacks.each(function(callback) {
-  //     mockup(w, callback, function() {
-  //       numCalled++;
-  //     }.bind(this));
-  //   }.bind(this));
-  //   Event.simulateMouse(w.element, 'click');
-  //   this.wait(1000, function() {
-  //     this.assertEqual(callbacks.length, numCalled);
-  //   }.bind(this));
-  // }}
 });</diff>
      <filename>test/unit/remote_link_widget_test.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6eba6a14536b57583514be11d35d1f45bf5ddeb9</id>
    </parent>
  </parents>
  <author>
    <name>Hendrik Volkmer</name>
    <email>hvolkmer@gmail.com</email>
  </author>
  <url>http://github.com/imedo/thc2/commit/369a3beb285ad6192bbfbd57560ed32c9afab9a4</url>
  <id>369a3beb285ad6192bbfbd57560ed32c9afab9a4</id>
  <committed-date>2008-06-04T23:48:53-07:00</committed-date>
  <authored-date>2008-06-04T23:48:53-07:00</authored-date>
  <message>Serveral fixes for
 * MnemonicForm
 * RemoteLinkWidget
 * FormWidget

Added test assets and photo album test</message>
  <tree>8fe054f6f5c6d870a2ddcd41646a96a1b5817b63</tree>
  <committer>
    <name>Hendrik Volkmer</name>
    <email>hvolkmer@gmail.com</email>
  </committer>
</commit>
