Tweak.
authorJan Schneider <jan@horde.org>
Wed, 25 Mar 2009 00:08:03 +0000 (01:08 +0100)
committerJan Schneider <jan@horde.org>
Wed, 25 Mar 2009 00:08:03 +0000 (01:08 +0100)
kronolith/js/src/kronolith.js
kronolith/templates/index/index.inc
kronolith/themes/screen.css

index 3ad051f..51729a5 100644 (file)
@@ -909,8 +909,8 @@ KronolithCore = {
                 return;
             }
 
-            if (elt.hasClassName('eventTopTag')) {
-                etags = $F('kronolithEventTags');
+            if (elt.hasClassName('kronolithEventTag')) {
+                var etags = $F('kronolithEventTags');
                 $('kronolithEventTags').value = (etags ? etags + ', ' :  '') + elt.getText();
                 return;
             }
@@ -963,12 +963,11 @@ KronolithCore = {
             RedBox.onDisplay = null;
         };
 
+        this.doAction('ListTopTags', {}, this._topTags);
         if (id) {
             RedBox.loading();
-            this.doAction('ListTopTags', {}, this._topTags.bind(this));
             this.doAction('GetEvent', { 'cal': calendar, 'id': id }, this._editEvent.bind(this));
         } else {
-            this.doAction('ListTopTags', {}, this._topTags.bind(this));
             var d = new Date();
             $('kronolithEventForm').enable();
             $('kronolithEventForm').reset();
@@ -987,12 +986,12 @@ KronolithCore = {
     
     _topTags: function(r)
     {
+        $('kronolithEventTopTags').update();
         if (!r.response.tags) {
             return;
         }
-        $('eventTopTags').update();
         r.response.tags.each(function(tag) {
-            $('eventTopTags').insert(new Element('span', {'class': 'eventTopTag'}).update(tag));
+            $('kronolithEventTopTags').insert(new Element('span', { 'class': 'kronolithEventTag' }).update(tag));
         });
         return;
     },
index b7417c0..dd78e4f 100644 (file)
   <textarea name="tags" id="kronolithEventTags" rows="2" class="kronolithLongField"></textarea>
 </div>
 
-<div id="eventTopTags" class="kronolithTags"></div>
+<div id="kronolithEventTopTags"></div>
 
 <div id="kronolithEventActions">
   <input id="kronolithEventSave" type="button" value="<?php echo _("Save") ?>" class="button ok" />
index a5fdcfb..8dc8e5b 100644 (file)
@@ -730,12 +730,12 @@ div#kronolithEventActions #kronolithEventAdvancedLink a {
     color: inherit;
 }
 
-div.kronolithTags {
+div#kronolithEventTopTags {
     max-height: 75px;
     overflow: auto;
     line-height: 20px;
 }
-div.kronolithTags span {
+div#kronolithEventTopTags span {
     padding: 2px 4px;
     background-color: #fff;
     border: 1px #c0c0c0 solid;
@@ -743,7 +743,7 @@ div.kronolithTags span {
     -webkit-border-radius: 4px;
     font-size: 90%;
 }
-div.kronolithTags span:hover {
+div#kronolithEventTopTags span:hover {
     background-color: #ffc;
     cursor: pointer;
 }