diff --git a/bt5/erp5_jquery_plugin_renderjs/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin/renderjs/renderjs.js.xml b/bt5/erp5_jquery_plugin_renderjs/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin/renderjs/renderjs.js.xml
index 61b176d2c10fe237660b7a2de8b96c6f8d1b0d8a..83ae401d119fa60453da9955de23608d598322c5 100644
--- a/bt5/erp5_jquery_plugin_renderjs/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin/renderjs/renderjs.js.xml
+++ b/bt5/erp5_jquery_plugin_renderjs/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin/renderjs/renderjs.js.xml
@@ -12,7 +12,7 @@
         </item>
         <item>
             <key> <string>_EtagSupport__etag</string> </key>
-            <value> <string>ts37323241.04</string> </value>
+            <value> <string>ts37339345.5</string> </value>
         </item>
         <item>
             <key> <string>__name__</string> </key>
@@ -32,55 +32,15 @@ if (typeof console === "undefined" || typeof console.log === "undefined") {\n
   console.log = function() {};\n
 }\n
 \n
-var is_ready;\n
-is_ready = false; // XXX: dirty flag to be removed (indicates if ready event has been handled)\n
-\n
-\n
-/*\n
- * Javascript Gadget representation\n
- */\n
-function Gadget(id, dom) {\n
-  this.id = id;\n
-  this.dom = dom;\n
-  this.is_ready = false;\n
-}\n
-\n
-Gadget.prototype.getId = function() {\n
-  return this.id;\n
-};\n
-\n
-Gadget.prototype.getDom = function() {\n
-  return this.dom;\n
-};\n
-\n
-Gadget.prototype.isReady = function() {\n
-  /*\n
-   * Return True if remote gadget is loaded into DOM.\n
-   */\n
-  return this.is_ready;\n
-};\n
-\n
-Gadget.prototype.setReady = function() {\n
-  /*\n
-   * Return True if remote gadget is loaded into DOM.\n
-   */\n
-  this.is_ready = true;\n
-};\n
-\n
-\n
-Gadget.prototype.getParent = function() {\n
-  /*\n
-   * Get Gadget\'s parent by using DOM\n
-   */\n
-  // XXX:\n
-};\n
-\n
 \n
 /*\n
  * Generic Gadget library renderer\n
  */\n
 \n
 var RenderJs = (function () {\n
+\n
+  // a variable indicating if current gadget loading is over or not\n
+  var is_ready = false;\n
   \n
   return  {\n
    \n
@@ -114,7 +74,7 @@ var RenderJs = (function () {\n
                     gadget_id = gadget.attr("id");\n
 \n
                     // register gadget in javascript namespace\n
-                    gadget_js = new Gadget(gadget_id, gadget);\n
+                    gadget_js = new RenderJs.Gadget(gadget_id, gadget);\n
                     RenderJs.GadgetIndex.registerGadget(gadget_js);\n
 \n
                     if (url!==undefined && url!==""){\n
@@ -172,6 +132,20 @@ var RenderJs = (function () {\n
                     }\n
           },\n
 \n
+          isReady: function (value) {\n
+            /*\n
+            * Get rendering status\n
+            */\n
+            return is_ready;\n
+          },\n
+          \n
+          setReady: function (value) {\n
+            /*\n
+            * Update rendering status\n
+            */\n
+            is_ready = value;            \n
+          },\n
+          \n
           checkAndTriggerReady: function() {\n
             /*\n
             * Trigger "ready" event only if all gadgets were marked as "ready"\n
@@ -179,11 +153,13 @@ var RenderJs = (function () {\n
             var is_gadget_list_loaded;\n
             is_gadget_list_loaded = RenderJs.GadgetIndex.isGadgetListLoaded();\n
             if (is_gadget_list_loaded){\n
-              if (!is_ready) {\n
-                //console.log("trigger");\n
+              //console.log("to trigger ");\n
+              if (!RenderJs.isReady()) {\n
+                //console.log("trigger ", RenderJs.GadgetIndex.getGadgetList());\n
                 RenderJs.GadgetIndex.getRootGadget().getDom().trigger("ready");\n
+                RenderJs.setReady(true);\n
               }\n
-              is_ready = true;\n
+              //is_ready = true;\n
             }\n
             return is_gadget_list_loaded;\n
           },\n
@@ -304,6 +280,37 @@ var RenderJs = (function () {\n
 \n
           }}()),\n
 \n
+          Gadget: ( function (id, dom) {\n
+                  /*\n
+                  * Javascript Gadget representation\n
+                  */\n
+                  this.id = id;\n
+                  this.dom = dom;\n
+                  this.is_ready = false;\n
+\n
+                  this.getId = function() {\n
+                    return this.id;\n
+                  };\n
+\n
+                  this.getDom = function() {\n
+                    return this.dom;\n
+                  };\n
+\n
+                  this.isReady = function() {\n
+                    /*\n
+                    * Return True if remote gadget is loaded into DOM.\n
+                    */\n
+                    return this.is_ready;\n
+                  };\n
+\n
+                  this.setReady = function() {\n
+                    /*\n
+                    * Return True if remote gadget is loaded into DOM.\n
+                    */\n
+                    this.is_ready = true;\n
+                  };\n
+          }),\n
+                \n
           TabbularGadget : (function () {\n
                   /*\n
                   * Generic tabular gadget\n
@@ -337,7 +344,7 @@ var RenderJs = (function () {\n
                           // XXX: we should unregister all gadgets (if any we replace now in DOM)\n
 \n
                           // render new gadget\n
-                          is_ready = false;\n
+                          RenderJs.setReady(false);\n
                           RenderJs.loadGadgetFromUrl(tab_gadget);\n
                           // clear previous events\n
                           RenderJs.GadgetIndex.getRootGadget().getDom().bind("ready", function (){\n
@@ -482,7 +489,7 @@ var RenderJs = (function () {\n
         </item>
         <item>
             <key> <string>size</string> </key>
-            <value> <int>18703</int> </value>
+            <value> <int>19475</int> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_jquery_plugin_renderjs/bt/revision b/bt5/erp5_jquery_plugin_renderjs/bt/revision
index 25bf17fc5aaabd17402e77a2b16f95fbea7310d2..dec2bf5d6199c7cd0d84f3dc1e76a73ccc336302 100644
--- a/bt5/erp5_jquery_plugin_renderjs/bt/revision
+++ b/bt5/erp5_jquery_plugin_renderjs/bt/revision
@@ -1 +1 @@
-18
\ No newline at end of file
+19
\ No newline at end of file