summaryrefslogtreecommitdiff
path: root/templates/news/add.html
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-30 13:15:20 -0500
committerDan McGee <dan@archlinux.org>2010-09-30 13:15:20 -0500
commit3682fb285b9f131a56aed2c6cab8d303c6aae5ae (patch)
tree217509085054951d4fdcdb6d9f5c0b5099412e5b /templates/news/add.html
parent0eac9698c6bdebdf5056a97b7c979b526d54ec15 (diff)
Move most inline JS into script filerelease_2010-09-30
We're getting to the point where we are starting to have a good chunk of JS scattered about. Centralize a lot of it for maintenance and performance purposes. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/news/add.html')
-rw-r--r--templates/news/add.html13
1 files changed, 1 insertions, 12 deletions
diff --git a/templates/news/add.html b/templates/news/add.html
index 48b013f0..f580e0d0 100644
--- a/templates/news/add.html
+++ b/templates/news/add.html
@@ -33,19 +33,8 @@
<div id="previewdata" class="article-content"></div>
</div>
{% load cdn %}{% jquery %}
+<script type="text/javascript" src="/media/archweb.js"></script>
<script type="text/javascript">
-function enablePreview() {
- $('#previewbtn').click(function(event) {
- event.preventDefault();
- $.post('/news/preview/',
- { data: $('#id_content').val() },
- function(data) {
- $('#previewdata').html(data);
- $('.news-article').show();
- });
- $('#previewtitle').html($('#id_title').val());
- });
-}
$(document).ready(enablePreview);
</script>
{% endblock %}