Remove most CSS, clean up templates

- Assume the existing site has its own styles
This commit is contained in:
Scot Hacker 2014-11-07 22:26:53 -08:00
parent 30127a23de
commit b388aece1b
7 changed files with 201 additions and 281 deletions

View file

@ -24,12 +24,6 @@ a.showlink {
text-decoration: underline;
}
#tasktable a {
font-weight: bold;
font-family: "Arial";
text-decoration: none;
color: #474747;
}
label {
display: block;
@ -50,20 +44,6 @@ input#id_priority {
width: 30px;
}
.todo-button {
border: 1px solid #9B9B9B;
background: #E0E0E0;
padding-bottom: 2px;
font-weight: bold;
}
hr {
color: #E5E5E5;
}
#slideToggle {
color: #4A8251;
}
.todo-break {
margin-top: 30px;
@ -74,25 +54,6 @@ table.nocolor, table.nocolor tr, table.nocolor td {
background-color: transparent;
}
table#tasktable td, table#tasktable th {
padding: 5px;
/* font-size:0.9em;*/
}
table#tasktable th {
text-align: left;
/* background-color: #9BCAE4; */
background-color: #046380;
color: #fff;
}
table#tasktable tr.row1 {
background-color: #AEF0BB;
}
table#tasktable tr.row2 {
background-color: #B6F3D5;
}
.minor {
font-style: italic;

View file

@ -5,79 +5,69 @@
{% block content %}
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
<h2>{{ task }}</h2>
<form action="" method="POST">
{% csrf_token %}
{% if task.note %}
<div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div>
{% endif %}
<h2>{{ task }}</h2>
<div id="TaskEdit">
<h3>File Trouble Ticket</h3>
<p>Trouble with a computer or other technical system at the J-School? <br />
Use this form to report the difficulty - we'll get right back to you. </p>
<form action="" method="POST">
{% csrf_token %}
{% if task.note %}
<div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div>
{% endif %}
<div id="TaskEdit">
<h3>File Trouble Ticket</h3>
<p>Trouble with a computer or other technical system at the J-School? <br />
Use this form to report the difficulty - we'll get right back to you. </p>
{% if form.errors %}
{% if form.errors %}
{% for error in form.errors %}
<ul class="errorlist">
<li><strong>The {{ error|escape }} field is required.</strong></li>
</ul>
{% endfor %}
<br />
<br />
{% endif %}
{% endif %}
<table>
<table>
{{ form.management_form }}
{{ form.id }}
<tr>
<tr>
<td>Summary:</td>
<td>{{ form.title }} <br />
Include the workstation number in your summary, e.g. <br />
"Radio Lab # 4: Purple smoke pouring out the back."
</td>
</tr>
</tr>
<tr>
<tr>
<td valign="top">Note:</td>
<td valign="top">{{ form.note }}<br />
Please describe the problem. </td>
</tr>
</tr>
<tr>
<tr>
<td>Priority:</td>
<td>{{ form.priority }} <br />
Enter a number between 1 and 5, <br />
where 5 is highest ("Computer is on fire = True").
</td>
</tr>
</tr>
</table>
<p><input type="submit" class="todo-button" name="add_task" value="Submit"></p>
</div>
</table>
<p><input type="submit" class="todo-button" name="add_task" value="Submit"></p>
</div>
</form>
</form>
{% endblock %}

View file

@ -4,12 +4,12 @@
{% block content %}
<h2>Add a list:</h2>
<h2>Add a list:</h2>
<form action="" method="post">
<form action="" method="post">
{% csrf_token %}
<table>{{ form }}</table>
<p><input type="submit" value="Submit" class="todo-button"></p>
</form>
<table>{{ form }}</table>
<p><input type="submit" value="Submit" class="todo-button"></p>
</form>
{% endblock %}

View file

@ -5,8 +5,8 @@
{% block content %}
{# Only admins can delete lists. #}
{% ifequal can_del 1 %}
{# Only admins can delete lists. #}
{% ifequal can_del 1 %}
{% if list_killed %}
@ -42,16 +42,11 @@
{% endif %}
{% else %}
{% else %}
<p>Sorry, you don't have permission to delete lists. Please contact your group administrator.</p>
{% endifequal %}
{% endifequal %}
{% endblock %}

View file

@ -12,10 +12,6 @@
{% block content %}
{% if message %}
<p class="message">{{ message }}</p>
{% endif %}
{% if found_items %}
<h2>{{found_items.count}} search results for term: "{{ query_string }}"</h2>
<div class="post_list">

View file

@ -5,18 +5,18 @@
{% block content %}
<script type="text/javascript">
<script type="text/javascript">
function order_tasks(data) {
function order_tasks(data) {
// The JQuery plugin tableDnD provides a serialize() function which provides the re-ordered
// data in a list. We pass that list as an object called "data" to a Django view
// to save the re-ordered data into the database.
$.post("{% url 'todo-reorder_tasks' %}", data, "json");
return false;
};
};
$(document).ready(function() {
$(document).ready(function() {
// Initialise the task table for drag/drop re-ordering
$("#tasktable").tableDnD();
@ -33,9 +33,9 @@ $(document).ready(function() {
$('#slideToggle').click(function(){
$(this).siblings('#AddTask').slideToggle();
});
});
});
</script>
</script>
{% ifequal list_slug "mine" %}
@ -48,15 +48,6 @@ $(document).ready(function() {
{% endifequal %}
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% ifequal auth_ok 1 %}
<form action="" method="POST">
{% csrf_token %}

View file

@ -5,9 +5,9 @@
{% block content %}
<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {
// Initially hide the TaskEdit form
$('#TaskEdit').hide();
@ -15,105 +15,92 @@ $(document).ready(function() {
$('#slideToggle').click(function(){
$(this).siblings('#TaskEdit').slideToggle();
});
});
</script>
});
</script>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% ifequal auth_ok 1 %}
<h2>{{ task }}</h2>
<form action="" method="POST">
{% csrf_token %}
<p id="slideToggle" ><strong>&rarr; Click to edit details &larr;</strong></p>
<p><strong>In list:</strong> <a href="{% url 'todo-incomplete_tasks' task.list.id task.list.slug %}" class="showlink">{{ task.list }}</a><br />
<strong>Assigned to:</strong> {{ task.assigned_to.first_name }} {{ task.assigned_to.last_name }}<br />
<strong>Created by:</strong> {{ task.created_by.first_name }} {{ task.created_by.last_name }}<br />
<strong>Due date:</strong> {{ task.due_date }}<br />
<strong>Completed:</strong> {{ form.completed }}<br />
</p>
{% ifequal auth_ok 1 %}
{% if task.note %}
<div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div>
{% endif %}
<h2>{{ task }}</h2>
<div id="TaskEdit">
<h3>Edit Task</h3>
<form action="" method="POST">
{% csrf_token %}
<p id="slideToggle" ><strong>&rarr; Click to edit details &larr;</strong></p>
<p><strong>In list:</strong> <a href="{% url 'todo-incomplete_tasks' task.list.id task.list.slug %}" class="showlink">{{ task.list }}</a><br />
<strong>Assigned to:</strong> {{ task.assigned_to.first_name }} {{ task.assigned_to.last_name }}<br />
<strong>Created by:</strong> {{ task.created_by.first_name }} {{ task.created_by.last_name }}<br />
<strong>Due date:</strong> {{ task.due_date }}<br />
<strong>Completed:</strong> {{ form.completed }}<br />
</p>
{% if task.note %}
<div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div>
{% endif %}
<div id="TaskEdit">
<h3>Edit Task</h3>
<table>
<table>
{{ form.management_form }}
{{ form.id }}
<tr>
<tr>
<td>Title:</td>
<td>{{ form.title }} </td>
</tr>
</tr>
<tr>
<tr>
<td>List:</td>
<td>{{ form.list }} </td>
</tr>
</tr>
<tr>
<tr>
<td>Due:</td>
<td>{{ form.due_date }} </td>
</tr>
</tr>
<tr>
<tr>
<td>Assigned to:</td>
<td>{{ form.assigned_to }} </td>
</tr>
</tr>
<tr>
<tr>
<td valign="top">Note:</td>
<td>{{ form.note }} </td>
</tr>
</tr>
<tr>
<tr>
<td>Priority:</td>
<td>{{ form.priority }} </td>
</tr>
</tr>
</table>
<p><input type="submit" class="todo-button" name="edit_task" value="Edit task"></p>
</div>
</table>
<p><input type="submit" class="todo-button" name="edit_task" value="Edit task"></p>
</div>
<hr />
<hr />
<h3>Add comment</h3>
<h3>Add comment</h3>
<textarea name="comment-body"></textarea>
<p><input class="todo-button"type="submit" value="Submit"></p>
</form>
</form>
<h3>Comments on this task</h3>
<h3>Comments on this task</h3>
<div class="task_comments">
{% for comment in comment_list %}
<div class="task_comments">
{% for comment in comment_list %}
<p><strong>{{ comment.author.first_name }} {{ comment.author.last_name }}, {{ comment.date|date:"F d Y P" }}</strong> </p>
{{ comment.body|safe|urlize|linebreaks }}
{% empty %}
<p>No Comments</p>
{% endfor %}
</div>
{% empty %}
<p>No Comments</p>
{% endfor %}
</div>
{% endifequal %}
{% endifequal %}
{% endblock %}