From 2f90346129ae3974be43c09613e7a3506ee31ed0 Mon Sep 17 00:00:00 2001
From: Thierry Parmentelat <thierry.parmentelat@inria.fr>
Date: Mon, 8 Apr 2013 17:56:00 +0200
Subject: [PATCH] turn off auto-test in messages + minor tweaks

---
 README                       |  1 +
 plugins/messages/messages.js | 11 ++++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/README b/README
index a5d09f1a..3859fa3a 100644
--- a/README
+++ b/README
@@ -92,6 +92,7 @@ Third party tools shipped:
 * datatables
 * spin
 * bootstrap
+* and others are added as we build the system when they become needed
 
 I've tried to keep track of the version I picked and to have an easy upgrade path.
 
diff --git a/plugins/messages/messages.js b/plugins/messages/messages.js
index 9f307ac4..eb22aca6 100644
--- a/plugins/messages/messages.js
+++ b/plugins/messages/messages.js
@@ -31,6 +31,8 @@
 			$.subscribe("messages:"+level, function (e, msg){ instance.display_message (msg,level)});
 		    }) (instance,level);
 		}
+		// this happens very early - even before the document is loaded
+		// so it won't show right away; no big deal though
                 $.publish  ("messages:info", 'Subscribed to all 5 message channels');
             });
         },
@@ -92,11 +94,11 @@
 	/* as an event handler toggle_handler will see the DOM <input> as 'this' */
 	this.toggle_handler = function (e) {
 	    var $this=$(this);
-	    var before=$this.attr('checked');
+	    // toggle the state of the checkbox
 	    if ($this.attr('checked')) $this.removeAttr('checked');
 	    else $this.attr('checked',true);
+	    // turn messages on or off
 	    var level=this.name;
-	    var after=$this.attr('checked');
 	    var display = $this.attr('checked') ? "list-item" : "none";
 	    var plugindiv=$this.closest("div.Messages");
 	    plugindiv.find("li."+level).css("display",display);
@@ -106,8 +108,7 @@
     
 })(jQuery);
 
-// temporary
-
+/* turn this on for an auto-test on startup
 var messages_test = {
     // set this to 0 to disable
     counter : 2,
@@ -127,4 +128,4 @@ var messages_test = {
     }
 }
 messages_test.run()
-
+*/
-- 
2.47.0