only update the DOM once
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 5 May 2009 18:34:23 +0000 (14:34 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 5 May 2009 18:34:23 +0000 (14:34 -0400)
kronolith/js/src/kronolith.js

index 890ea72..4f04e78 100644 (file)
@@ -1444,13 +1444,15 @@ KronolithCore = {
 
     _topTags: function(r)
     {
-        $('kronolithEventTopTags').update();
         if (!r.response.tags) {
+            $('kronolithEventTopTags').update();
             return;
         }
+        t = new Element('div', {});
         r.response.tags.each(function(tag) {
-            $('kronolithEventTopTags').insert(new Element('span', { 'class': 'kronolithEventTag' }).update(tag));
+            t.insert(new Element('span', { 'class': 'kronolithEventTag' }).update(tag));
         });
+        $('kronolithEventTopTags').update(t);
         return;
     },