diff options
author | Dan McGee <dan@archlinux.org> | 2010-09-30 20:15:20 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-09-30 20:15:20 +0200 |
commit | 3682fb285b9f131a56aed2c6cab8d303c6aae5ae (patch) | |
tree | 217509085054951d4fdcdb6d9f5c0b5099412e5b /templates/news | |
parent | 0eac9698c6bdebdf5056a97b7c979b526d54ec15 (diff) | |
download | archweb-3682fb285b9f131a56aed2c6cab8d303c6aae5ae.tar.gz archweb-3682fb285b9f131a56aed2c6cab8d303c6aae5ae.tar.xz |
Move most inline JS into script file
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')
-rw-r--r-- | templates/news/add.html | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/templates/news/add.html b/templates/news/add.html index 48b013f..f580e0d 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 %} |