[Bps-public-commit] SD - A distributed issue tracker branch, master, updated. 47df532668c107e909890e95b5b94532cd051747

jesse jesse at bestpractical.com
Mon Jan 26 18:53:26 EST 2009


The branch, master has been updated
       via  47df532668c107e909890e95b5b94532cd051747 (commit)
      from  e988a91a5b8d81345f94abcf54b7ec3502299e11 (commit)

Summary of changes:
 lib/App/SD/Server/View.pm |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 47df532668c107e909890e95b5b94532cd051747
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Jan 26 18:51:57 2009 -0500

    Started to show relative dates in the web ui

diff --git a/lib/App/SD/Server/View.pm b/lib/App/SD/Server/View.pm
index 51d95b6..a63ede9 100644
--- a/lib/App/SD/Server/View.pm
+++ b/lib/App/SD/Server/View.pm
@@ -28,7 +28,8 @@ body {
 
 div.page {
     align: center;
-    max-width: 700px;
+    max-width: 800px;
+    min-width: 400px;
     background: #fff;
     margin: 0;
     padding: 0;
@@ -680,8 +681,14 @@ private template 'ticket_list' => sub {
     };
          script {outs_raw(qq{
             \$(document).ready(function() { \$("#@{[$id]}").tablesorter(); } ); 
-        });
         }
+
+    );
+
+#     outs_raw('$("td.created,td.due").prettyDateTag();
+# setInterval(function(){ $("td.created,td.due").prettyDateTag(); }, 5000);')
+ };
+
         
         };
 
@@ -777,6 +784,10 @@ private template 'ticket_basics' => sub {
 
         }
         };
+
+    script { outs_raw('$("div.created,div.due").prettyDateTag();
+setInterval(function(){ $("div.created,div.due").prettyDateTag(); }, 5000);') };
+
 };
 template ticket_attachments => sub {
     my $self = shift;
@@ -794,7 +805,8 @@ template ticket_history => sub {
     dl { { class is 'history'};
     for my $changeset  (sort {$a->created cmp $b->created}  $ticket->changesets) {
         dt {
-                span { { class is 'created'};  $changeset->created};
+            my $d  = $changeset->created;
+                span { { class is 'created'};  $d};
                 span { { class is 'creator'};  $changeset->creator || i { 'Missing author'};  };
                 span { { class is 'original_sequence_no'};  $changeset->original_sequence_no};
                 span { { class is 'original_source_uuid'}; $changeset->original_source_uuid };
@@ -811,6 +823,8 @@ template ticket_history => sub {
         }
     }
 
+    script { outs_raw('$("span.created").prettyDateTag();
+setInterval(function(){ $("span.created").prettyDateTag(); }, 5000);') };
 };
 
 template ticket_comments => sub {
@@ -822,13 +836,15 @@ template ticket_comments => sub {
         ul { { class is 'comments'}; 
             for my $comment (@comments) {
                 li {
-                    span { {class is 'metadata'};  $comment->prop('created') . " " . $comment->prop('creator'); }
+                    span { {class is 'metadata'};  span{class is 'created'; $comment->prop('created')} . " " . $comment->prop('creator'); }
                     div { class is 'content'; 
                         $comment->prop('content') || i { 'No body was entered for this comment'} };
                 }
             }
         }
     }
+    script { outs_raw('$("span.created").prettyDateTag();
+setInterval(function(){ $("span.created").prettyDateTag(); }, 5000);') };
 
 };
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list