Adding tasks (UI, not functional yet.).
authorJan Schneider <jan@horde.org>
Mon, 23 Nov 2009 10:22:06 +0000 (11:22 +0100)
committerJan Schneider <jan@horde.org>
Mon, 23 Nov 2009 10:22:27 +0000 (11:22 +0100)
kronolith/js/kronolith.js
kronolith/templates/index/edit.inc
kronolith/templates/index/tasks.inc
kronolith/themes/graphics/new_task.png [new file with mode: 0644]
kronolith/themes/screen.css

index 226b7e6..6a35444 100644 (file)
@@ -1720,8 +1720,8 @@ KronolithCore = {
     _insertTaskPosition: function(newRow, newTask)
     {
         var rows = $('kronolithViewTasksBody').select('tr');
-        // The first row is a template one, so must be ignored
-        for (var i = 1; i < rows.length; i++) {
+        // The first row is the add task row, the second a template, ignoring.
+        for (var i = 2; i < rows.length; i++) {
             var rowTasklist = rows[i].retrieve('tasklist');
             var rowTaskId = rows[i].retrieve('taskid');
             var rowTask = this.tcache.inject(null, function(acc, list) {
index 2198d83..8556e5b 100644 (file)
@@ -8,6 +8,7 @@
   <input type="text" name="title" id="kronolithEventTitle" class="kronolithLongField" />
 </div>
 
+<div>
 <table cellspacing="0" cellpadding="0" border="0"><tbody><tr>
   <td>
     <label for="kronolithEventCalendar"><?php echo _("Calendar") ?>:</label><br />
@@ -20,7 +21,9 @@
     &middot; <span class="kronolithEventGeo"><a href="#"><?php echo _("Find in Maps") ?></a></span>
   </td>
 </tr></tbody></table>
+</div>
 
+<div>
 <table cellspacing="0" cellpadding="0" border="0"><tbody>
   <tr>
     <td><label for="kronolithEventStartDate"><?php echo _("From") ?>:</label></td>
@@ -39,6 +42,7 @@
     <td><label><input type="checkbox" name="whole_day" id="kronolithEventAllday"  /> <?php echo _("all-day event") ?></label></td>
   </tr>
 </tbody></table>
+</div>
 
 <div class="tabset">
   <ul>
index 8ac21c8..38344a5 100644 (file)
     </ul>
   </caption>
   <tbody id="kronolithViewTasksBody">
+     <tr class="kronolithTaskRow">
+       <td class="kronolithTaskCol kronolithAddTask">
+         <div class="kronolithAddTaskIcon"></div><?php echo _("Add Task") ?>
+       </td>
+    </tr>
     <tr id="kronolithTasksTemplate" class="kronolithTaskRow" style="display:none">
       <td class="kronolithTaskCol">
-      <div class="kronolithTaskCheckbox"/>
+        <div class="kronolithTaskCheckbox"/>
       </td>
     </tr>
   </tbody>
diff --git a/kronolith/themes/graphics/new_task.png b/kronolith/themes/graphics/new_task.png
new file mode 100644 (file)
index 0000000..0d23667
Binary files /dev/null and b/kronolith/themes/graphics/new_task.png differ
index 070a287..421454c 100644 (file)
@@ -391,6 +391,7 @@ body.kronolithAjax {
 }
 #kronolithNotifications {
     padding: 3px 5px;
+    color: #fff;
 }
 
 /* Main area */
@@ -687,6 +688,7 @@ div#kronolithEventTabTags {
 }
 #kronolithEventDialog .tabset ul, #kronolithTaskDialog .tabset ul {
     padding-left: 0;
+    margin: 0;
 }
 
 .kronolithTabsOption {
@@ -1041,6 +1043,17 @@ table.kronolithView td.kronolithFirstCol {
 #kronolithViewTasks .kronolithInfo {
     color: #ccc;
 }
+#kronolithViewTasks .kronolithAddTask {
+    font-weight: bold;
+}
+.kronolithAddTask .kronolithAddTaskIcon {
+    float: left;
+    margin-right: 7px;
+    margin-left: 2px;
+    width: 16px;
+    height: 16px;
+    background-image: url('graphics/new_task.png');
+}
 
 /* More main view */
 .kronolithFirstCol {