Try centering the events a bit.
authorJan Schneider <jan@horde.org>
Tue, 20 Apr 2010 16:20:03 +0000 (18:20 +0200)
committerJan Schneider <jan@horde.org>
Tue, 20 Apr 2010 16:20:03 +0000 (18:20 +0200)
kronolith/js/kronolith.js
kronolith/themes/screen.css

index 09806c3..d4775ff 100644 (file)
@@ -1558,7 +1558,7 @@ KronolithCore = {
         case 'week':
             var storage = view + 'Sizes',
                 div = _createElement(event),
-                margin = view == 'day' ? 5 : 10,
+                margin = view == 'day' ? 2.5 : 5,
                 style = { backgroundColor: Kronolith.conf.calendars[calendar[0]][calendar[1]].bg,
                           color: Kronolith.conf.calendars[calendar[0]][calendar[1]].fg };
 
@@ -1596,7 +1596,8 @@ KronolithCore = {
 
             div.setStyle({
                 top: (Math.round(midnight.getElapsed(event.value.start) / 60000) * this[storage].height / 60 | 0) + 'px',
-                width: 100 - margin + '%'
+                width: 100 - margin * 2 + '%',
+                left: margin + '%'
             })
                 .insert(innerDiv.setStyle(style));
             if (draggerTop) {
@@ -1795,7 +1796,7 @@ KronolithCore = {
             width = 100 / columns;
             this.dayGroups[pos].each(function(ev) {
                 ev.columns = columns;
-                $(ev.nodeId).setStyle({ width: width - margin + '%', left: (width * (ev.column - 1)) + '%' });
+                $(ev.nodeId).setStyle({ width: width - margin * 2 + '%', left: (width * (ev.column - 1)) + margin + '%' });
             });
             this.dayEvents.push(event.value);
 
index c53955b..038ce14 100644 (file)
@@ -1171,6 +1171,9 @@ table.kronolithView td.kronolithFirstCol {
 .kronolithMore:hover {
     text-decoration: underline;
 }
+#kronolithViewWeek .kronolithAllDay .kronolithMore {
+    margin-left: 5%;
+}
 
 /* Main view agenda. */
 #kronolithViewAgenda td.kronolithFirstCol {
@@ -1379,7 +1382,8 @@ div.kronolithEvent {
     float: left;
 }
 #kronolithViewWeek .kronolithAllDay div.kronolithEvent {
-    margin-right: 10%;
+    margin-left: 5%;
+    margin-right: 5%;
 }
 div.kronolithEvent .kronolithDragger {
     position: absolute;