Commits

ben...@pollen  committed 85e3516

more fixes.

  • Participants
  • Parent commits 74cb65c

Comments (0)

Files changed (4)

File friendpaste/views.py

         send_stomp_msg(' ' + message, destination='/paste/%s/%s' % (
                     s.pasteid, s.nb_revision))
 
+    all_reviews = []
     if review.reviews:
-        review.reviews.sort(lambda a,b: cmp(a['created'], b['created']))
-        review.reviews.reverse()
-        for comment in review.reviews:
+        if len(review.reviews) >= last_inserted:
+            all_reviews = review.reviews[last_inserted:]
+        else:
+            all_reviews = []
+    
+        all_reviews.sort(lambda a,b: cmp(a['created'], b['created']))
+        all_reviews.reverse()
+        for comment in all_reviews:
             value = datetimestr_topython(comment['created']) 
             comment['fcreated'] = value.strftime("%a %b %d %Y at %H:%M")
 
-
-
     return send_json({ 
         "ok": True, 
-        "r": review.reviews[last_inserted:],
+        "r": all_reviews,
         "count": len(review.reviews)
     })
 

File static/css/src/ie.css

    
 -------------------------------------------------------------- */
 
-/* Make sure the layout is centered in IE5 */
-body { text-align: center; }
-.container { text-align: left; }
+body  { text-align: left; }
+.fpcontainer { text-align: left; }
 
 /* Fixes IE margin bugs */
 * html .column { overflow-x: hidden; }
 .review-indicator:hover td.line-content {
    filter: alpha(opacity=50); 
 }
+
+.comment-box textarea {
+}

File static/css/src/typography.css

     font-family: Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;
     color: #000;
     line-height: 16px;
+    text-align: left;
 }
 
 html > body {
 #reviews-list li .metadata time {
     font-weight: bold;
 }
-
+#reviews-list li {
+    font-size: 0.9em;
+}
 
 span.reviewflag.new {
     font-weight: bold;
     font-weight: bold;
     font-size: 0.8em;
 }
+
+
+.comment-box h1 {font-size:1.6em;line-height:1;margin-bottom:0.5em;}
+.comment-box h2 {font-size:1.4em;margin-bottom:0.75em;}
+.comment-box h3 {font-size:1.2em;line-height:1;margin-bottom:1em;}
+.comment-box h4 {font-size:1em;line-height:1.25;margin-bottom:1.25em;height:1.25em;}
+.comment-box h5 {font-size:0.9em;font-weight:bold;margin-bottom:1.5em;}
+.comment-box h6 {font-size:0.9em;font-weight:bold;}

File static/js/src/review.js

             // record latest add
             this.latest_add = { 
                 nb_line: lineNumber, 
-                reviews_count: nb_lines + 1 
+                reviews_count: nb_lines 
             }; 
 
             new Ajax.request({
             tag_name=='OPTION' ||
             tag_name=='BUTTON' ||
             tag_name=='TEXTAREA') || 
-            (className = e.target.className && 
-             className == "grippie")) return;
+            (e.target.className && 
+             e.target.className == "grippie")) return;
        
         base2.DOM.bind(e.target);
         var point = pointer(e);