Remove stray CSS reference; whitespace

Fixes #17
This commit is contained in:
Scot Hacker 2014-08-26 12:45:30 -07:00
parent 305dfc0f93
commit 94b01d868d
8 changed files with 125 additions and 127 deletions

View file

@ -18,11 +18,11 @@
<h2>{{ task }}</h2> <h2>{{ task }}</h2>
<form action="" method="POST"> <form action="" method="POST">
{% csrf_token %} {% csrf_token %}
{% if task.note %} {% if task.note %}
<div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div> <div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div>
{% endif %} {% endif %}
<div id="TaskEdit"> <div id="TaskEdit">
@ -32,7 +32,7 @@ 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 %} {% for error in form.errors %}
<ul class="errorlist"> <ul class="errorlist">
<li><strong>The {{ error|escape }} field is required.</strong></li> <li><strong>The {{ error|escape }} field is required.</strong></li>
</ul> </ul>
@ -46,7 +46,7 @@ Use this form to report the difficulty - we'll get right back to you. </p>
{{ form.management_form }} {{ form.management_form }}
{{ form.id }} {{ form.id }}
<tr> <tr>
<td>Summary:</td> <td>Summary:</td>
<td>{{ form.title }} <br /> <td>{{ form.title }} <br />
@ -56,28 +56,28 @@ Use this form to report the difficulty - we'll get right back to you. </p>
</tr> </tr>
<tr> <tr>
<td valign="top">Note:</td> <td valign="top">Note:</td>
<td valign="top">{{ form.note }}<br /> <td valign="top">{{ form.note }}<br />
Please describe the problem. </td> Please describe the problem. </td>
</tr> </tr>
<tr> <tr>
<td>Priority:</td> <td>Priority:</td>
<td>{{ form.priority }} <br /> <td>{{ form.priority }} <br />
Enter a number between 1 and 5, <br /> Enter a number between 1 and 5, <br />
where 5 is highest ("Computer is on fire = True"). where 5 is highest ("Computer is on fire = True").
</td> </td>
</tr> </tr>
</table> </table>
<p><input type="submit" class="todo-button" name="add_task" value="Submit"></p> <p><input type="submit" class="todo-button" name="add_task" value="Submit"></p>
</div> </div>
</form> </form>
{% endblock %} {% endblock %}

View file

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

View file

@ -1,20 +1,18 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block page_heading %}GTD (Getting Things Done){% endblock %} {% block page_heading %}GTD (Getting Things Done){% endblock %}
{% block extrahead %} {% block extrahead %}
<!-- CSS and JavaScript for django-todo --> <!-- CSS and JavaScript for django-todo -->
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}todo/css/styles.css" /> <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}todo/css/styles.css" />
<script src="{{STATIC_URL}}js/ui.datepicker.js" type="text/javascript"></script> <script src="{{STATIC_URL}}js/ui.datepicker.js" type="text/javascript"></script>
<script src="{{STATIC_URL}}todo/js/jquery.tablednd_0_5.js" type="text/javascript"></script> <script src="{{STATIC_URL}}todo/js/jquery.tablednd_0_5.js" type="text/javascript"></script>
<link type="text/css" href="{{STATIC_URL}}js/jquery-ui-1.7.1.custom.css" rel="Stylesheet" />
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
// thedate.x comes from the edit_task view. If this is a new entry, // thedate.x comes from the edit_task view. If this is a new entry,
// thedate won't be present and datepicker will fall back on the default (today). // thedate won't be present and datepicker will fall back on the default (today).
$(document).ready(function(){ $(document).ready(function(){
$('#id_due_date').datepicker({defaultDate: new Date({{thedate.year}}, {{thedate.month}} - 1, {{thedate.day}}),}); $('#id_due_date').datepicker({defaultDate: new Date({{thedate.year}}, {{thedate.month}} - 1, {{thedate.day}}),});
}); });
</script>
</script>
{% endblock extrahead %} {% endblock extrahead %}

View file

@ -12,8 +12,8 @@
{% if list_killed %} {% if list_killed %}
<p> {{ list.name }} is gone.</p> <p> {{ list.name }} is gone.</p>
<a href="{% url 'todo-lists' %}">Return to lists</a> <a href="{% url 'todo-lists' %}">Return to lists</a>
{% else %} {% else %}
@ -21,17 +21,17 @@
<p>Category tally:</p> <p>Category tally:</p>
<ul> <ul>
<li>Incomplete: {{ item_count_undone }} </li> <li>Incomplete: {{ item_count_undone }} </li>
<li>Complete: {{ item_count_done }} </li> <li>Complete: {{ item_count_done }} </li>
<li><strong>Total: {{ item_count_total }}</strong> </li> <li><strong>Total: {{ item_count_total }}</strong> </li>
</ul> </ul>
<p> ... all of which will be irretrievably <strong>blown away</strong>. Are you sure you want to do that?</p> <p> ... all of which will be irretrievably <strong>blown away</strong>. Are you sure you want to do that?</p>
<form action="" method="post" accept-charset="utf-8"> <form action="" method="post" accept-charset="utf-8">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="list" value="{{ list.id }}" id="some_name"> <input type="hidden" name="list" value="{{ list.id }}" id="some_name">
<p><input type="submit" name="delete-confirm" value="Do it! &rarr;" class="todo-button"> </p> <p><input type="submit" name="delete-confirm" value="Do it! &rarr;" class="todo-button"> </p>
</form> </form>
@ -51,7 +51,7 @@
{% endblock %} {% endblock %}

View file

@ -15,7 +15,7 @@
{% endif %} {% endif %}
<h1>To-do Lists</h1> <h1>To-do Lists</h1>
<p>{{ item_count }} items in {{ list_count }} lists</p> <p>{{ item_count }} items in {{ list_count }} lists</p>
{% regroup list_list by group as section_list %} {% regroup list_list by group as section_list %}
@ -30,12 +30,12 @@
{% endfor %} {% endfor %}
<div class="todo-break"> <div class="todo-break">
&nbsp; &nbsp;
</div> </div>
<p><a href="{% url 'todo-add_list' %}">Create new todo list</a></p> <p><a href="{% url 'todo-add_list' %}">Create new todo list</a></p>
{% endblock %} {% endblock %}

View file

@ -15,24 +15,24 @@
{% if message %} {% if message %}
<p class="message">{{ message }}</p> <p class="message">{{ message }}</p>
{% endif %} {% endif %}
{% if found_items %} {% if found_items %}
<h2>{{found_items.count}} search results for term: "{{ query_string }}"</h2> <h2>{{found_items.count}} search results for term: "{{ query_string }}"</h2>
<div class="post_list"> <div class="post_list">
{% for f in found_items %} {% for f in found_items %}
<p><strong><a href="{% url 'todo-task_detail' f.id %}">{{ f.title }}</a></strong><br /> <p><strong><a href="{% url 'todo-task_detail' f.id %}">{{ f.title }}</a></strong><br />
<span class="minor"> <span class="minor">
On list: <a href="{% url 'todo-incomplete_tasks' f.list.id f.list.slug %}">{{ f.list }}</a><br /> On list: <a href="{% url 'todo-incomplete_tasks' f.list.id f.list.slug %}">{{ f.list }}</a><br />
Assigned to: {{ f.assigned_to }} (created by: {{ f.created_by }})<br /> Assigned to: {{ f.assigned_to }} (created by: {{ f.created_by }})<br />
Complete: {{ f.completed|yesno:"Yes,No" }} Complete: {{ f.completed|yesno:"Yes,No" }}
</span> </span>
</p> </p>
{% endfor %} {% endfor %}
</div> </div>
{% else %} {% else %}
<h2> No results to show, sorry.</h2> <h2> No results to show, sorry.</h2>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -8,8 +8,8 @@
<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 // 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 // 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. // to save the re-ordered data into the database.
$.post("{% url 'todo-reorder_tasks' %}", data, "json"); $.post("{% url 'todo-reorder_tasks' %}", data, "json");
@ -19,16 +19,16 @@ function order_tasks(data) {
$(document).ready(function() { $(document).ready(function() {
// Initialise the task table for drag/drop re-ordering // Initialise the task table for drag/drop re-ordering
$("#tasktable").tableDnD(); $("#tasktable").tableDnD();
$('#tasktable').tableDnD({ $('#tasktable').tableDnD({
onDrop: function(table, row) { onDrop: function(table, row) {
order_tasks($.tableDnD.serialize()); order_tasks($.tableDnD.serialize());
} }
}); });
// Initially hide the Add Task form // Initially hide the Add Task form
$('#AddTask').hide(); $('#AddTask').hide();
// toggle slide to show the Add Task form when link clicked // toggle slide to show the Add Task form when link clicked
$('#slideToggle').click(function(){ $('#slideToggle').click(function(){
$(this).siblings('#AddTask').slideToggle(); $(this).siblings('#AddTask').slideToggle();
@ -39,7 +39,7 @@ $(document).ready(function() {
{% ifequal list_slug "mine" %} {% ifequal list_slug "mine" %}
<h1>Tasks assigned to {{ request.user }}</h1> <h1>Tasks assigned to {{ request.user }}</h1>
{% else %} {% else %}
{% ifequal auth_ok 1 %} {% ifequal auth_ok 1 %}
<h1>Tasks filed under "{{ list.name }}"</h1> <h1>Tasks filed under "{{ list.name }}"</h1>
@ -47,25 +47,25 @@ $(document).ready(function() {
{% endifequal %} {% endifequal %}
{% endifequal %} {% endifequal %}
{% if messages %} {% if messages %}
<ul class="messages"> <ul class="messages">
{% for message in messages %} {% for message in messages %}
<li>{{ message }}</li> <li>{{ message }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
{% ifequal auth_ok 1 %} {% ifequal auth_ok 1 %}
<form action="" method="POST"> <form action="" method="POST">
{% csrf_token %} {% csrf_token %}
{# Only show task adder if viewing a proper list #} {# Only show task adder if viewing a proper list #}
{% ifnotequal list_slug "mine" %} {% ifnotequal list_slug "mine" %}
<h2 style="margin-bottom:0px;" id="slideToggle" >&rarr; Click to add task &larr;</h2> <h2 style="margin-bottom:0px;" id="slideToggle" >&rarr; Click to add task &larr;</h2>
<div id="AddTask"> <div id="AddTask">
<table class="nocolor" border="0" cellspacing="5" cellpadding="5"> <table class="nocolor" border="0" cellspacing="5" cellpadding="5">
<tr> <tr>
<td>{{ form.title.errors }}</td> <td>{{ form.title.errors }}</td>
@ -81,112 +81,112 @@ $(document).ready(function() {
<td colspan="5"><label for="id_note">Note:</label> {{ form.note }} <td colspan="5"><label for="id_note">Note:</label> {{ form.note }}
<p class="minor">*Email notifications will only be sent if task is assigned to someone besides yourself.</p> <p class="minor">*Email notifications will only be sent if task is assigned to someone besides yourself.</p>
</td> </td>
</tr> </tr>
</table> </table>
<input type="hidden" name="priority" value="999" id="id_priority"> <input type="hidden" name="priority" value="999" id="id_priority">
<input type="hidden" name="created_by" value="{{ request.user.id }}" id="id_created_by"> <input type="hidden" name="created_by" value="{{ request.user.id }}" id="id_created_by">
<input type="hidden" name="list" value="{{ listid }}" id="id_list"> <input type="hidden" name="list" value="{{ listid }}" id="id_list">
<input type="hidden" name="created_date" value="{{ created_date }}" id="id_created_date"> <input type="hidden" name="created_date" value="{{ created_date }}" id="id_created_date">
<p><input type="submit" name="add_task" value="Add task" class="todo-button"></p> <p><input type="submit" name="add_task" value="Add task" class="todo-button"></p>
</div> </div>
{% endifnotequal %} {% endifnotequal %}
{% ifequal view_completed 0 %} {% ifequal view_completed 0 %}
<h3>Incomplete tasks :: Drag rows to set priorities</h3> <h3>Incomplete tasks :: Drag rows to set priorities</h3>
<table border="0" id="tasktable"> <table border="0" id="tasktable">
<tr> <tr>
<th>Done</th> <th>Done</th>
<th>Task</th> <th>Task</th>
<th>Created</th> <th>Created</th>
<th>Due on</th> <th>Due on</th>
<th>Owner</th> <th>Owner</th>
<th>Assigned</th> <th>Assigned</th>
<th>Note</th> <th>Note</th>
<th>Comm</th> <th>Comm</th>
{% ifequal list_slug "mine" %} {% ifequal list_slug "mine" %}
<th>List</th> <th>List</th>
{% endifequal %} {% endifequal %}
<th>Del</th> <th>Del</th>
</tr> </tr>
{% for task in task_list %} {% for task in task_list %}
<tr class="{% cycle 'row1' 'row2' %}" id="{{ task.id }}"> <tr class="{% cycle 'row1' 'row2' %}" id="{{ task.id }}">
<td><input type="checkbox" name="mark_done" value="{{ task.id }}" id="mark_done_{{ task.id }}"> </td> <td><input type="checkbox" name="mark_done" value="{{ task.id }}" id="mark_done_{{ task.id }}"> </td>
<td><a href="{% url 'todo-task_detail' task.id %}">{{ task.title|truncatewords:20 }}</a></td> <td><a href="{% url 'todo-task_detail' task.id %}">{{ task.title|truncatewords:20 }}</a></td>
<td>{{ task.created_date|date:"m/d/Y" }}</td> <td>{{ task.created_date|date:"m/d/Y" }}</td>
<td> <td>
{% if task.overdue_status %}<span class="overdue">{% endif %} {% if task.overdue_status %}<span class="overdue">{% endif %}
{{ task.due_date|date:"m/d/Y" }} {{ task.due_date|date:"m/d/Y" }}
{% if task.overdue_status %}</span>{% endif %} {% if task.overdue_status %}</span>{% endif %}
</td> </td>
<td>{{ task.created_by }}</td> <td>{{ task.created_by }}</td>
<td>{{ task.assigned_to }}</td> <td>{{ task.assigned_to }}</td>
<td style="text-align:center;">{% if task.note %}&asymp;{% endif %} </td> <td style="text-align:center;">{% if task.note %}&asymp;{% endif %} </td>
<td style="text-align:center;">{% ifnotequal task.comment_set.all.count 0 %}{{ task.comment_set.all.count }}{% endifnotequal %} <td style="text-align:center;">{% ifnotequal task.comment_set.all.count 0 %}{{ task.comment_set.all.count }}{% endifnotequal %}
</td> </td>
{% ifequal list_slug "mine" %} {% ifequal list_slug "mine" %}
<td><a href="{% url 'todo-incomplete_tasks' task.list.id task.list.slug %}">{{ task.list }}</a></td> <td><a href="{% url 'todo-incomplete_tasks' task.list.id task.list.slug %}">{{ task.list }}</a></td>
{% endifequal %} {% endifequal %}
<td><input type="checkbox" name="del_task" value="{{ task.id }}" id="del_task_{{ task.id }}"> </td> <td><input type="checkbox" name="del_task" value="{{ task.id }}" id="del_task_{{ task.id }}"> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
<p><input type="submit" name="mark_tasks_done" value="Continue..." class="todo-button"></p> <p><input type="submit" name="mark_tasks_done" value="Continue..." class="todo-button"></p>
<p><a class="todo" href="{% url 'todo-completed_tasks' list_id list_slug %}">View completed tasks</a></p> <p><a class="todo" href="{% url 'todo-completed_tasks' list_id list_slug %}">View completed tasks</a></p>
{% endifequal %} {% endifequal %}
{% ifequal view_completed 1 %} {% ifequal view_completed 1 %}
<h3>Completed tasks</h3> <h3>Completed tasks</h3>
<table border="0" id="tasktable"> <table border="0" id="tasktable">
<tr> <tr>
<th>Undo</th> <th>Undo</th>
<th>Task</th> <th>Task</th>
<th>Created</th> <th>Created</th>
<th>Completed on</th> <th>Completed on</th>
<th>Note</th> <th>Note</th>
<th>Comm</th> <th>Comm</th>
{% ifequal list_slug "mine" %} {% ifequal list_slug "mine" %}
<th>List</th> <th>List</th>
{% endifequal %} {% endifequal %}
<th>Del</th> <th>Del</th>
</tr> </tr>
{% for task in completed_list %} {% for task in completed_list %}
<tr class="{% cycle 'row1' 'row2' %}"> <tr class="{% cycle 'row1' 'row2' %}">
<td><input type="checkbox" name="undo_completed_task" value="{{ task.id }}" id="id_undo_completed_task{{ task.id }}"> </td> <td><input type="checkbox" name="undo_completed_task" value="{{ task.id }}" id="id_undo_completed_task{{ task.id }}"> </td>
<td><a href="{% url 'todo-task_detail' task.id %}">{{ task.title|truncatewords:20 }}</a></td> <td><a href="{% url 'todo-task_detail' task.id %}">{{ task.title|truncatewords:20 }}</a></td>
<td>{{ task.created_date|date:"m/d/Y" }}</td> <td>{{ task.created_date|date:"m/d/Y" }}</td>
<td>{{ task.completed_date|date:"m/d/Y" }}</td> <td>{{ task.completed_date|date:"m/d/Y" }}</td>
<td style="text-align:center;">{% if task.note %}&asymp;{% endif %} </td> <td style="text-align:center;">{% if task.note %}&asymp;{% endif %} </td>
<td style="text-align:center;">{% ifnotequal task.comment_set.all.count 0 %}{{ task.comment_set.all.count }}{% endifnotequal %} <td style="text-align:center;">{% ifnotequal task.comment_set.all.count 0 %}{{ task.comment_set.all.count }}{% endifnotequal %}
<td><input type="checkbox" name="del_completed_task" value="{{ task.id }}" id="del_completed_task_{{ task.id }}"> </td> <td><input type="checkbox" name="del_completed_task" value="{{ task.id }}" id="del_completed_task_{{ task.id }}"> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
<p><input type="submit" name="deldonetasks" value="Continue..." class="todo-button"></p> <p><input type="submit" name="deldonetasks" value="Continue..." class="todo-button"></p>
</form> </form>
<p><a class="todo" href="{% url 'todo-incomplete_tasks' list_id list_slug %}">View incomplete tasks</a></p> <p><a class="todo" href="{% url 'todo-incomplete_tasks' list_id list_slug %}">View incomplete tasks</a></p>
{% endifequal %} {% endifequal %}
{% ifequal can_del 1 %} {% ifequal can_del 1 %}
{% ifnotequal list_slug "mine" %} {% ifnotequal list_slug "mine" %}
<p><a class="todo" href="{% url 'todo-del_list' list_id list_slug %}">Delete this list</a></p> <p><a class="todo" href="{% url 'todo-del_list' list_id list_slug %}">Delete this list</a></p>
{% endifnotequal %} {% endifnotequal %}
{% endifequal %} {% endifequal %}
{% endifequal %} {% endifequal %}
{% endblock %} {% endblock %}

View file

@ -10,7 +10,7 @@
$(document).ready(function() { $(document).ready(function() {
// Initially hide the TaskEdit form // Initially hide the TaskEdit form
$('#TaskEdit').hide(); $('#TaskEdit').hide();
// toggle slide to show the Add Task form when link clicked // toggle slide to show the Add Task form when link clicked
$('#slideToggle').click(function(){ $('#slideToggle').click(function(){
$(this).siblings('#TaskEdit').slideToggle(); $(this).siblings('#TaskEdit').slideToggle();
@ -33,7 +33,7 @@ $(document).ready(function() {
<h2>{{ task }}</h2> <h2>{{ task }}</h2>
<form action="" method="POST"> <form action="" method="POST">
{% csrf_token %} {% csrf_token %}
<p id="slideToggle" ><strong>&rarr; Click to edit details &larr;</strong></p> <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 /> <p><strong>In list:</strong> <a href="{% url 'todo-incomplete_tasks' task.list.id task.list.slug %}" class="showlink">{{ task.list }}</a><br />
@ -45,7 +45,7 @@ $(document).ready(function() {
{% if task.note %} {% if task.note %}
<div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div> <div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div>
{% endif %} {% endif %}
<div id="TaskEdit"> <div id="TaskEdit">
@ -54,18 +54,18 @@ $(document).ready(function() {
<table> <table>
{{ form.management_form }} {{ form.management_form }}
{{ form.id }} {{ form.id }}
<tr> <tr>
<td>Title:</td> <td>Title:</td>
<td>{{ form.title }} </td> <td>{{ form.title }} </td>
</tr> </tr>
<tr> <tr>
<td>List:</td> <td>List:</td>
<td>{{ form.list }} </td> <td>{{ form.list }} </td>
</tr> </tr>
<tr> <tr>
<td>Due:</td> <td>Due:</td>
<td>{{ form.due_date }} </td> <td>{{ form.due_date }} </td>
</tr> </tr>
@ -73,22 +73,22 @@ $(document).ready(function() {
<tr> <tr>
<td>Assigned to:</td> <td>Assigned to:</td>
<td>{{ form.assigned_to }} </td> <td>{{ form.assigned_to }} </td>
</tr> </tr>
<tr> <tr>
<td valign="top">Note:</td> <td valign="top">Note:</td>
<td>{{ form.note }} </td> <td>{{ form.note }} </td>
</tr> </tr>
<tr> <tr>
<td>Priority:</td> <td>Priority:</td>
<td>{{ form.priority }} </td> <td>{{ form.priority }} </td>
</tr> </tr>
</table> </table>
<p><input type="submit" class="todo-button" name="edit_task" value="Edit task"></p> <p><input type="submit" class="todo-button" name="edit_task" value="Edit task"></p>
</div> </div>
@ -103,7 +103,7 @@ $(document).ready(function() {
</form> </form>
<h3>Comments on this task</h3> <h3>Comments on this task</h3>
<div class="task_comments"> <div class="task_comments">
{% for comment in comment_list %} {% for comment in comment_list %}
@ -115,5 +115,5 @@ $(document).ready(function() {
</div> </div>
{% endifequal %} {% endifequal %}
{% endblock %} {% endblock %}