diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/archweb.css | 19 | ||||
-rw-r--r-- | media/archweb.js | 44 | ||||
-rw-r--r-- | media/django-jsi18n.js | 35 |
3 files changed, 47 insertions, 51 deletions
diff --git a/media/archweb.css b/media/archweb.css index 6ae720c1..ee4fd169 100644 --- a/media/archweb.css +++ b/media/archweb.css @@ -242,24 +242,17 @@ 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; } - -/* read only (public) todo lists */ -#public_todo_lists .todo_list { - margin-left: 2em; -} /* dev dashboard: admin actions (add news items, todo list, etc) */ ul.admin-actions { float: right; list-style: none; margin-top: -2.5em; } ul.admin-actions li { display: inline; padding-left: 1.5em; } -/* dev: todo list */ +/* todo lists (public and private) */ .todo-table .complete { color: green; } .todo-table .incomplete { color: red; } +.todo-info { margin: 0; color: #999; } +.todo-list h4 { margin-top: 0; margin-bottom: 0.4em; } /* dev: signoff page */ #dev-signoffs ul { list-style: none; margin: 0; padding: 0; } @@ -267,6 +260,12 @@ ul.admin-actions li { display: inline; padding-left: 1.5em; } #dev-signoffs .signoff-no { color: red; } #dev-signoffs .signed-username { color: #888; margin-left: 0.5em; } +/* iso testing feedback form */ +#releng-feedback label { width: auto; display: inline; font-weight: normal; } +#releng-feedback ul { padding-left: 1em; } +#releng-feedback li { list-style: none; } +#releng-feedback ul+.helptext { position: relative; top: -0.9em; } + /* highlight current website in the navbar */ #archnavbar.anb-home ul li#anb-home a { color: white !important; } #archnavbar.anb-packages ul li#anb-packages a { color: white !important; } diff --git a/media/archweb.js b/media/archweb.js index 52e817a4..49f2a319 100644 --- a/media/archweb.js +++ b/media/archweb.js @@ -67,20 +67,52 @@ if (typeof $.tablesorter !== 'undefined') { }, type: 'numeric' }); + $.tablesorter.addParser({ + id: 'filesize', + re: /^(\d+(?:\.\d+)?) (bytes?|KB|MB|GB|TB|PB)$/, + is: function(s) { + return this.re.test(s); + }, + format: function(s) { + var matches = this.re.exec(s); + if (!matches) return 0; + var size = parseFloat(matches[1]); + var suffix = matches[2]; + + switch(suffix) { + case 'byte': + case 'bytes': + return size; + case 'KB': + return size * 1024; + case 'MB': + return size * 1024 * 1024; + case 'GB': + return size * 1024 * 1024 * 1024; + case 'TB': + return size * 1024 * 1024 * 1024 * 1024; + case 'PB': + return size * 1024 * 1024 * 1024 * 1024 * 1024; + } + }, + type: 'numeric' + }); } /* 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()); }); } diff --git a/media/django-jsi18n.js b/media/django-jsi18n.js deleted file mode 100644 index 83562c1a..00000000 --- a/media/django-jsi18n.js +++ /dev/null @@ -1,35 +0,0 @@ - -/* gettext library */ - -var catalog = new Array(); - -function pluralidx(count) { return (count == 1) ? 0 : 1; } - - -function gettext(msgid) { - var value = catalog[msgid]; - if (typeof(value) == 'undefined') { - return msgid; - } else { - return (typeof(value) == 'string') ? value : value[0]; - } -} - -function ngettext(singular, plural, count) { - value = catalog[singular]; - if (typeof(value) == 'undefined') { - return (count == 1) ? singular : plural; - } else { - return value[pluralidx(count)]; - } -} - -function gettext_noop(msgid) { return msgid; } - -function interpolate(fmt, obj, named) { - if (named) { - return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); - } else { - return fmt.replace(/%s/g, function(match){return String(obj.shift())}); - } -} |