added news updates ui

This commit is contained in:
albert
2011-11-01 17:51:15 -04:00
parent b06857f8bd
commit 461fe9a6dc
21 changed files with 287 additions and 20 deletions

View File

@@ -1,14 +1,14 @@
(function() {
Danbooru.News = {};
Danbooru.NewsUpdate = {};
Danbooru.News.initialize = function() {
var key = $("#news-ticker").data("updated-at");
Danbooru.NewsUpdate.initialize = function() {
var key = $("#news-updates").data("updated-at");
if (Danbooru.Cookie.get("news-ticker") === key) {
$("#news-ticker").hide();
$("#news-updates").hide();
} else {
$("#close-news-ticker-link").click(function(e) {
$("#news-ticker").hide();
$("#news-updates").hide();
Danbooru.Cookie.put("news-ticker", key);
// need to reset the more link
@@ -20,6 +20,6 @@
}
$(function() {
Danbooru.News.initialize();
Danbooru.NewsUpdate.initialize();
});
})();

View File

@@ -1,4 +1,4 @@
div#news-ticker {
div#news-updates {
padding: 5px;
background: #EEE;
border-bottom: 2px solid #666;

View File

@@ -0,0 +1,4 @@
/*
Place all the styles related to the matching controller here.
They will automatically be included in application.css.
*/