summaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/archweb.css4
-rw-r--r--media/archweb.js14
2 files changed, 8 insertions, 10 deletions
diff --git a/media/archweb.css b/media/archweb.css
index c6f612ca..f1edebe6 100644
--- a/media/archweb.css
+++ b/media/archweb.css
@@ -242,11 +242,7 @@ form#dash-pkg-notify input { vertical-align: middle; margin: 0 0.25em; }
form#dash-pkg-notify input[type=submit] { margin-top: -0.25em; }
form#dash-pkg-notify p { margin: 0; }
-/* dev dashboard: collapse stat tables by default */
-table#stats-by-maintainer, table#stats-by-repo, table#stats-by-arch { display: none; }
table.dash-stats .key { width: 50%; }
-span.dash-click { font-weight: normal; font-size: 0.8em; color: #888; }
-div.dash-stats h3 { color: #07b; }
/* dev dashboard: admin actions (add news items, todo list, etc) */
ul.admin-actions { float: right; list-style: none; margin-top: -2.5em; }
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());
});
}