summaryrefslogtreecommitdiff
path: root/media/archweb.js
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-05-12 15:52:08 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-05-12 15:52:08 -0300
commit57804e82978727001fc62e5b1106d69531a9cd97 (patch)
tree770756414046565af864487a0020f2ef7be8df0a /media/archweb.js
parent37075e5f3423a69fec03faf31ce2133c55374dfc (diff)
parentf6464da0e14047e9db803f4b40c18ba644e75f24 (diff)
Merge branch 'master' of git://projects.archlinux.org/archweb
Conflicts: templates/packages/packages_list.html templates/public/index.html
Diffstat (limited to 'media/archweb.js')
-rw-r--r--media/archweb.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/media/archweb.js b/media/archweb.js
index 52e817a4..03358fa9 100644
--- a/media/archweb.js
+++ b/media/archweb.js
@@ -71,16 +71,18 @@ if (typeof $.tablesorter !== 'undefined') {
/* news/add.html */
function enablePreview() {
- $('#previewbtn').click(function(event) {
+ $('#news-preview-button').click(function(event) {
event.preventDefault();
- $.post('/news/preview/',
- { data: $('#id_content').val() },
+ $.post('/news/preview/', {
+ data: $('#id_content').val(),
+ csrfmiddlewaretoken: $('#newsform input[name=csrfmiddlewaretoken]').val()
+ },
function(data) {
- $('#previewdata').html(data);
- $('.news-article').show();
+ $('#news-preview-data').html(data);
+ $('#news-preview').show();
}
);
- $('#previewtitle').html($('#id_title').val());
+ $('#news-preview-title').html($('#id_title').val());
});
}