mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-13 13:21:29 +00:00
Fixes repeated shout box submissions. Added delay of 2s between shouts
Fixes admin links Fixes issue solution formatting
This commit is contained in:
parent
ad907c5933
commit
b6956c89c0
4 changed files with 26 additions and 18 deletions
|
@ -220,12 +220,14 @@ $( function() {
|
|||
$('input[type=submit]', this).attr('disabled', 'disabled');
|
||||
});
|
||||
|
||||
$('form.new_shoutmsg').submit(function(){
|
||||
$('input[type=submit]', this).attr('disabled', 'disabled');
|
||||
});
|
||||
$('form.new_shoutmsg').on("ajax:complete", function(event, xhr, status){
|
||||
var self = this;
|
||||
|
||||
$('form.new_shoutmsg').live("ajax:complete", function(event,xhr,status){
|
||||
$(this)[0].reset();
|
||||
|
||||
setTimeout(function() {
|
||||
$('input[type=submit]', self).removeAttr('disabled');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
// User page
|
||||
|
|
|
@ -85,6 +85,10 @@ class Issue < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def solution_formatted
|
||||
bbcode_to_html(solution)
|
||||
end
|
||||
|
||||
def remove_readings
|
||||
if status_changed? and status == STATUS_SOLVED
|
||||
Reading.delete_all ["readable_type = 'Issue' AND readable_id = ?", self.id]
|
||||
|
|
|
@ -4,17 +4,19 @@
|
|||
</h1>
|
||||
<ul>
|
||||
<li><%= link_to 'New Article', new_article_path %></li>
|
||||
<li><%= link_to "Article Admin", :controller => "articles", :action => "admin" %></li>
|
||||
<li><%= link_to "File Admin", :controller => "files", :action => "admin" %></li>
|
||||
<li><%= link_to issues_path do %>
|
||||
Issues (<%= Issue.with_status(0).count %>)
|
||||
<% end %></li>
|
||||
<li><%= link_to "Bans", bans_path %></li>
|
||||
<li><%= link_to "Groups", groups_path %></li>
|
||||
<li><%= link_to "Categories", categories_path %></li>
|
||||
<li><%= link_to "Polls", polls_path %></li>
|
||||
<li><%= link_to "Contests", contests_path %></li>
|
||||
<li><%= link_to "Challenges", challenges_path %></li>
|
||||
<li><%= link_to "Maps", maps_path %></li>
|
||||
</ul>
|
||||
<li><%= link_to "Article Admin", controller: "articles", action: "admin" %></li>
|
||||
<li><%= link_to "Files Admin", controller: "directories", action: "show", id: Directory.first %></li>
|
||||
<li>
|
||||
<%= link_to issues_path do %>
|
||||
Issues (<%= Issue.with_status(0).count %>)
|
||||
<% end %>
|
||||
</li>
|
||||
<li><%= link_to "Bans", bans_path %></li>
|
||||
<li><%= link_to "Groups", groups_path %></li>
|
||||
<li><%= link_to "Categories", categories_path %></li>
|
||||
<li><%= link_to "Polls", polls_path %></li>
|
||||
<li><%= link_to "Contests", contests_path %></li>
|
||||
<li><%= link_to "Challenges", challenges_path %></li>
|
||||
<li><%= link_to "Maps", maps_path %></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<h3>
|
||||
Solution:
|
||||
</h3>
|
||||
<%= raw RbbCode::Parser.new.parse(@issue.solution) %>
|
||||
<%= raw @issue.solution_formatted %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue