* Remove dependency on markdown

* Use nicEditor in 'create ticket' screens to allow HTML entry.
This commit is contained in:
Ross Poulton 2008-01-16 03:23:43 +00:00
parent 2e2176547d
commit eff97073fb
5 changed files with 21 additions and 7 deletions

5
README
View File

@ -47,9 +47,7 @@ See the file 'LICENSE' for licensing terms and conditions.
2. Django (post-0.96, eg SVN checkout) 2. Django (post-0.96, eg SVN checkout)
3. Markdown / pymarkdown 3. An existing WORKING Django project with database etc. If you
4. An existing WORKING Django project with database etc. If you
cannot log into the Admin, you won't get this product working. cannot log into the Admin, you won't get this product working.
@ -63,7 +61,6 @@ See the file 'LICENSE' for licensing terms and conditions.
setting: setting:
'helpdesk', 'helpdesk',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.markup'
3. In your projects' urls.py file, add this line: 3. In your projects' urls.py file, add this line:
(r'helpdesk/', include('helpdesk.urls')), (r'helpdesk/', include('helpdesk.urls')),

View File

@ -1,5 +1,13 @@
{% extends "helpdesk/base.html" %} {% extends "helpdesk/base.html" %}
{% block helpdesk_title %}Helpdesk{% endblock %} {% block helpdesk_title %}Helpdesk{% endblock %}
{% block helpdesk_head %}
<script src="http://media.jutda.com.au/helpdesk/nicEdit.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
nic = new nicEditor({buttonList: ['bold','italic','underline','strikeThrough','undo','redo','subscript','superscript','html']}).panelInstance('id_body');
});
</script>
{% endblock %}
{% block helpdesk_body %} {% block helpdesk_body %}
<h2>Submit a Ticket</h2> <h2>Submit a Ticket</h2>

View File

@ -1,6 +1,15 @@
{% extends "helpdesk/public_base.html" %} {% extends "helpdesk/public_base.html" %}
{% block helpdesk_title %}Helpdesk{% endblock %} {% block helpdesk_title %}Helpdesk{% endblock %}
{% block helpdesk_head %}
<script src="http://media.jutda.com.au/helpdesk/nicEdit.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
nic = new nicEditor({buttonList: ['bold','italic','underline','strikeThrough','undo','redo','subscript','superscript','html']}).panelInstance('id_body');
});
</script>
{% endblock %}
{% block helpdesk_body %} {% block helpdesk_body %}
<h2>View a Ticket</h2> <h2>View a Ticket</h2>

View File

@ -1,6 +1,6 @@
{% extends "helpdesk/public_base.html" %} {% extends "helpdesk/public_base.html" %}
{% block helpdesk_title %}Helpdesk{% endblock %} {% block helpdesk_title %}Helpdesk{% endblock %}
{% block helpdesk_head %}{% load markup %} {% block helpdesk_head %}
<script src="http://media.jutda.com.au/helpdesk/nicEdit.js" type="text/javascript"></script> <script src="http://media.jutda.com.au/helpdesk/nicEdit.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {

View File

@ -1,6 +1,6 @@
{% extends "helpdesk/base.html" %} {% extends "helpdesk/base.html" %}
{% block helpdesk_title %}Helpdesk{% endblock %} {% block helpdesk_title %}Helpdesk{% endblock %}
{% block helpdesk_head %}{% load markup %} {% block helpdesk_head %}
<script src="http://media.jutda.com.au/helpdesk/nicEdit.js" type="text/javascript"></script> <script src="http://media.jutda.com.au/helpdesk/nicEdit.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
@ -70,7 +70,7 @@
{% for followup in ticket.followup_set.all %} {% for followup in ticket.followup_set.all %}
<div class='followup'> <div class='followup'>
<div class='title'>{{ followup.title }} <span class='byline'>by {{ followup.user }} <span title='{{ followup.date|date:"r" }}'>{{ followup.date|timesince }} ago</span>{% if not followup.public %} <span class='private'>(Private)</span>{% endif %}</span></div> <div class='title'>{{ followup.title }} <span class='byline'>by {{ followup.user }} <span title='{{ followup.date|date:"r" }}'>{{ followup.date|timesince }} ago</span>{% if not followup.public %} <span class='private'>(Private)</span>{% endif %}</span></div>
{{ followup.comment|markdown|num_to_link }} {{ followup.comment|num_to_link }}
{% if followup.ticketchange_set.all %}<div class='changes'> {% if followup.ticketchange_set.all %}<div class='changes'>
{% for change in followup.ticketchange_set.all %} {% for change in followup.ticketchange_set.all %}
Changed {{ change.field }} from {{ change.old_value }} to {{ change.new_value }}.<br /> Changed {{ change.field }} from {{ change.old_value }} to {{ change.new_value }}.<br />