# HG changeset patch # User Sverre Rabbelier # Date 1238960276 0 # Node ID 2f04b8ec3b96a7c6d69a005a6bc0d6233ff55db0 # Parent 93c8a683dc12b37c6452b7ab27ba1b2f79de6115 Use different colors for public/private comment widget Patch by: Dmitri Gaskin diff -r 93c8a683dc12 -r 2f04b8ec3b96 app/soc/content/css/soc-090418.css --- a/app/soc/content/css/soc-090418.css Sun Apr 05 18:18:07 2009 +0000 +++ b/app/soc/content/css/soc-090418.css Sun Apr 05 19:37:56 2009 +0000 @@ -499,10 +499,16 @@ background: #d0f5a9; } -.studentproposalreview .other { +.studentproposalcomment-public, +.studentproposalreview-public .other { background: #f5f6ce; } +.studentproposalcomment-private, +.studentproposalreview-private .other { + background: #D2EDF6; +} + /* * CUSTOM CLASSES */ diff -r 93c8a683dc12 -r 2f04b8ec3b96 app/soc/templates/soc/student_proposal/review.html --- a/app/soc/templates/soc/student_proposal/review.html Sun Apr 05 18:18:07 2009 +0000 +++ b/app/soc/templates/soc/student_proposal/review.html Sun Apr 05 19:37:56 2009 +0000 @@ -63,7 +63,7 @@
Score and Review -
+
@@ -158,6 +158,8 @@ var commentAdmin = document.getElementById("commentadmin"); var publicCheckbox = document.getElementById("id_public"); + var cssString = "studentproposalcomment-"; + var cssRemoveString = "studentproposalcomment-"; switch (type) { case "Public": @@ -165,24 +167,31 @@ commentPrivate.style.display = "none"; commentAdmin.style.display = "none"; publicCheckbox.value = true; + cssString += "public"; + cssRemoveString += "private"; break; case "Private": commentPublic.style.display = ""; commentPrivate.style.display = ""; commentAdmin.style.display = "none"; publicCheckbox.value = false; + cssString += "private"; + cssRemoveString += "public"; break; case "Admin": commentPublic.style.display = ""; commentPrivate.style.display = ""; commentAdmin.style.display = ""; publicCheckbox.value = false; + cssString += "private"; + cssRemoveString += "public"; break; default: alert("Unknown value"); alert(type); break; } + $($('#commenttypeselector').parents('.box').get(0)).removeClass(cssRemoveString).addClass(cssString); } // Set the comment type selector to be displayed diff -r 93c8a683dc12 -r 2f04b8ec3b96 app/soc/templates/soc/templatetags/_as_student_proposal_review.html --- a/app/soc/templates/soc/templatetags/_as_student_proposal_review.html Sun Apr 05 18:18:07 2009 +0000 +++ b/app/soc/templates/soc/templatetags/_as_student_proposal_review.html Sun Apr 05 19:37:56 2009 +0000 @@ -12,7 +12,7 @@ limitations under the License. {% endcomment %} -
+
On {{ created|date:"jS F Y H:i" }} {% if is_public %}