Skip to content

Commit 24a50e9

Browse files
author
System Administrator
committed
Blew through some changes on list
1 parent ed30cfe commit 24a50e9

File tree

5 files changed

+44
-17
lines changed

5 files changed

+44
-17
lines changed

app/controllers/drafts_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ def refresh_review
7575

7676
def feedback
7777
@drft = Draft.find_by_url(params[:id])
78-
@reviews = @drft.reviews
78+
@reviews = @drft.reviews.sort {|a, b| a.updated_at <=> b.updated_at}
7979
end
8080
end

app/views/drafts/feedback.html.erb

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,20 @@ li {
4848
}
4949

5050
li.name {
51-
-moz-border-radius-bottomleft:4px;
52-
-moz-border-radius-topleft:4px;
51+
-moz-border-radius-bottomleft:7px;
52+
-webkit-border-bottom-left-radius:7px;
53+
-moz-border-radius-topleft:7px;
54+
-webkit-border-top-left-radius:7px;
55+
border-bottom-left-radius:7px;
56+
border-top-left-radius:7px;
5357
position: relative;
54-
left: -10px;
58+
left: 30px;
5559
cursor: pointer;
56-
padding-left: 40px;
57-
width: 259px;
60+
padding-left: 20px;
61+
padding-top: 5px;
62+
width: 229px;
5863
float: left;
59-
padding-bottom: 5px;
64+
padding-bottom: 10px;
6065
}
6166

6267
li.name:hover {
@@ -153,15 +158,21 @@ a.sentence.down.has_note .heading {
153158
$("li.name[review_id=" + id + "]").addClass("selected");
154159
$("#comments-header").show();
155160
if ($("#review-" + id).find("#general-comments").html() != "") {
156-
$("#the-general-comments").html($("#review-" + id).find("#general-comments").html())
161+
$("#the-general-comments").html("&raquo; " + $("#review-" + id).find("#general-comments").html())
157162
} else {
158163
$("#the-general-comments").html("");
159164
$("#comments-header").hide();
160165
}
161166
//$("#version").html("reviewed by <span style='color: #d54e21;'>" + $("#review-" + id).attr("signature") + "</span>")
162167
};
163168
$(document).ready(function() {
164-
//select_review(0);
169+
<% if (rev_id = params[:selected_review]) %>
170+
select_review(<%= rev_id %>);
171+
<% else %>
172+
if ($(".name").length > 0) {
173+
select_review(0);
174+
}
175+
<% end %>
165176
$(".name").click(function(ev) {
166177
select_review($(this).attr("review_id"));
167178
});
@@ -202,20 +213,21 @@ a.sentence.down.has_note .heading {
202213
<h2 style="font-weight: normal; color: white">View feedback from:</h2>
203214
<ul style="margin-top: 10px;">
204215
<% @reviews.collect {|r| [r.signature, r.updated_at]}.each_with_index do |rev, i| %>
205-
<li class="name" review_id="<%= i %>"><span style="font-size: 21px; line-height: 1.4em;"><%= rev[0] %></span> <div style="font-size: 11px; line-height: 1em">&raquo; <%= rev[1].strftime('%a %b %d, %I:%M:%S%p').downcase %></div></li>
216+
<li class="name" review_id="<%= i %>"><span style="font-size: 18px; line-height: 1.4em;"><%= (!rev[0].nil? ? rev[0] : "[anonymous]") %></span> <div style="font-size: 11px; line-height: 1em">&raquo; <%= rev[1].strftime('%a %b %d, %I:%M:%S%p').downcase %></div></li>
206217
<% end %>
207218
</ul>
208219
</div>
209220
<textarea id="note" class="note" affect="neutral" style="width: 250px; position: absolute; display: none;"></textarea>
210221
<div id="draft">
211-
<h1 style="font-family: Arial; font-size: 22px; margin-top: 20px;"><%= @drft.title %></h1>
222+
<h1 style="font-family: Arial; font-size: 22px; margin-top: 20px; line-height: 1.2em;"><%= @drft.title %></h1>
212223
<div id="draft_content">
213224
<%= HTMLEntities.new.decode(@drft.content) %>
214225
</div>
215-
</div>
216-
<div class="instructions">
217-
<h2 style="margin: 2px 0px 5px 0px; display: none;" id="comments-header">General Comments</h3>
218-
<span id="the-general-comments"></span>
226+
227+
<div>
228+
<h3 style="margin: 50px 0px 5px 0px; font-family: Helvetica; display: none;" id="comments-header">General Comments</h3>
229+
<span id="the-general-comments"></span>
230+
</div>
219231
</div>
220232

221233
<% @reviews.each_with_index do |rev, i| %>

app/views/drafts/review.html.erb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ a.sentence {
5353
text-decoration: none;
5454
}
5555

56+
a.sentence.has_note {
57+
background-color: #eee;
58+
}
59+
5660
a.sentence:hover {
5761
background-color: #eee;
5862
}
@@ -78,6 +82,10 @@ a.sentence .heading {
7882
text-decoration: none;
7983
}
8084

85+
a.sentence.has_note .heading {
86+
background-color: #eee;
87+
}
88+
8189
a.sentence:hover .heading {
8290
background-color: #eee;
8391
}
@@ -210,6 +218,13 @@ $(document).ready(function() {
210218
clearTimeout(t);
211219
$(".note").each(function(e) {
212220
$(this).hide();
221+
if ($(this).val() != "") {
222+
$("#sent-" + $(this).attr("id").split("-")[1]).addClass("has_note");
223+
$(this).html($(this).val());
224+
} else {
225+
$("#sent-" + $(this).attr("id").split("-")[1]).removeClass("has_note");
226+
$(this).html($(this).val());
227+
}
213228
});
214229
var i = $(this).attr("id").split("-")[1] * 1
215230
if (times[i] == '0') {

app/views/layouts/application.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"http://www.w3.org/TR/html4/strict.dtd">
44
<html>
55
<head>
6-
<title>[draftback]</title>
6+
<title>[draft]back</title>
77
<%= javascript_include_tag "jquery-1.3.2.min.js" %>
88
<%= stylesheet_link_tag "wp" %>
99
<%= stylesheet_link_tag "colors-fresh" %>
@@ -25,7 +25,7 @@
2525
<div id="wpcontent">
2626
<div id="wphead">
2727

28-
<img id="header-logo" src="../wp-includes/images/blank.gif" alt="" width="32" height="32" /> <h1 id="site-heading" ><a href="http://jsomers.net/blog/" title="Visit Site"><span id="site-title" style="font-size: 20px;">[draftback]</span></a></h1>
28+
<img id="header-logo" src="../wp-includes/images/blank.gif" alt="" width="32" height="32" /> <h1 id="site-heading" ><a href="http://jsomers.net/blog/" title="Visit Site"><span id="site-title" style="font-size: 20px;">[draft]back</span></a></h1>
2929

3030
<div id="wphead-info">
3131
<div id="user_info">

db/development.sqlite3

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)