turn off auto-test in messages + minor tweaks
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 8 Apr 2013 15:56:00 +0000 (17:56 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 8 Apr 2013 15:56:00 +0000 (17:56 +0200)
README
plugins/messages/messages.js

diff --git a/README b/README
index a5d09f1..3859fa3 100644 (file)
--- 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.
 
index 9f307ac..eb22aca 100644 (file)
@@ -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');
             });
         },
        /* 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);
     
 })(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()
-
+*/