fixes #1164
This commit is contained in:
@@ -15,6 +15,10 @@ $(function() {
|
|||||||
Danbooru.Cookie.put('hide_upgrade_account_notice', '1', 7);
|
Danbooru.Cookie.put('hide_upgrade_account_notice', '1', 7);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#close-notice-link").click(function(e) {
|
||||||
|
$('#notice').fadeOut("fast");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var Danbooru = {};
|
var Danbooru = {};
|
||||||
|
|||||||
@@ -22,11 +22,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.notice = function(msg) {
|
Danbooru.notice = function(msg) {
|
||||||
$('#notice').html(msg).addClass("ui-state-highlight").removeClass("ui-state-error").fadeIn("fast");
|
$('#notice').addClass("ui-state-highlight").removeClass("ui-state-error").fadeIn("fast").children("span").html(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.error = function(msg) {
|
Danbooru.error = function(msg) {
|
||||||
$('#notice').html(msg).removeClass("ui-state-highlight").addClass("ui-state-error").fadeIn("fast");
|
$('#notice').removeClass("ui-state-highlight").addClass("ui-state-error").fadeIn("fast").children("span").html(msg);
|
||||||
Danbooru.scroll_to($("#notice"));
|
Danbooru.scroll_to($("#notice"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,3 +12,7 @@ div#notice {
|
|||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a#close-notice-link {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|||||||
@@ -56,11 +56,10 @@
|
|||||||
<%= render "users/tos" %>
|
<%= render "users/tos" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%- if flash[:notice] -%>
|
<div class="ui-corner-all ui-state-highlight" id="notice" style="<%= "display: none;" unless flash[:notice] %>">
|
||||||
<div class="ui-corner-all ui-state-highlight" id="notice"><%= flash[:notice] %></div>
|
<span><%= flash[:notice] %></span>
|
||||||
<%- else -%>
|
<a href="#" id="close-notice-link">close</a>
|
||||||
<div class="ui-corner-all ui-state-highlight" id="notice" style="display: none;"></div>
|
</div>
|
||||||
<%- end -%>
|
|
||||||
|
|
||||||
<%= yield :layout %>
|
<%= yield :layout %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user