mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-14 05:41:00 +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');
|
$('input[type=submit]', this).attr('disabled', 'disabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('form.new_shoutmsg').submit(function(){
|
$('form.new_shoutmsg').on("ajax:complete", function(event, xhr, status){
|
||||||
$('input[type=submit]', this).attr('disabled', 'disabled');
|
var self = this;
|
||||||
});
|
|
||||||
|
|
||||||
$('form.new_shoutmsg').live("ajax:complete", function(event,xhr,status){
|
|
||||||
$(this)[0].reset();
|
$(this)[0].reset();
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
$('input[type=submit]', self).removeAttr('disabled');
|
||||||
|
}, 2000);
|
||||||
});
|
});
|
||||||
|
|
||||||
// User page
|
// User page
|
||||||
|
|
|
@ -85,6 +85,10 @@ class Issue < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def solution_formatted
|
||||||
|
bbcode_to_html(solution)
|
||||||
|
end
|
||||||
|
|
||||||
def remove_readings
|
def remove_readings
|
||||||
if status_changed? and status == STATUS_SOLVED
|
if status_changed? and status == STATUS_SOLVED
|
||||||
Reading.delete_all ["readable_type = 'Issue' AND readable_id = ?", self.id]
|
Reading.delete_all ["readable_type = 'Issue' AND readable_id = ?", self.id]
|
||||||
|
|
|
@ -4,11 +4,13 @@
|
||||||
</h1>
|
</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li><%= link_to 'New Article', new_article_path %></li>
|
<li><%= link_to 'New Article', new_article_path %></li>
|
||||||
<li><%= link_to "Article Admin", :controller => "articles", :action => "admin" %></li>
|
<li><%= link_to "Article Admin", controller: "articles", action: "admin" %></li>
|
||||||
<li><%= link_to "File Admin", :controller => "files", :action => "admin" %></li>
|
<li><%= link_to "Files Admin", controller: "directories", action: "show", id: Directory.first %></li>
|
||||||
<li><%= link_to issues_path do %>
|
<li>
|
||||||
|
<%= link_to issues_path do %>
|
||||||
Issues (<%= Issue.with_status(0).count %>)
|
Issues (<%= Issue.with_status(0).count %>)
|
||||||
<% end %></li>
|
<% end %>
|
||||||
|
</li>
|
||||||
<li><%= link_to "Bans", bans_path %></li>
|
<li><%= link_to "Bans", bans_path %></li>
|
||||||
<li><%= link_to "Groups", groups_path %></li>
|
<li><%= link_to "Groups", groups_path %></li>
|
||||||
<li><%= link_to "Categories", categories_path %></li>
|
<li><%= link_to "Categories", categories_path %></li>
|
||||||
|
@ -16,5 +18,5 @@
|
||||||
<li><%= link_to "Contests", contests_path %></li>
|
<li><%= link_to "Contests", contests_path %></li>
|
||||||
<li><%= link_to "Challenges", challenges_path %></li>
|
<li><%= link_to "Challenges", challenges_path %></li>
|
||||||
<li><%= link_to "Maps", maps_path %></li>
|
<li><%= link_to "Maps", maps_path %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<h3>
|
<h3>
|
||||||
Solution:
|
Solution:
|
||||||
</h3>
|
</h3>
|
||||||
<%= raw RbbCode::Parser.new.parse(@issue.solution) %>
|
<%= raw @issue.solution_formatted %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue