Show More
Commit Description:
change announcement toggle into bootstrap button with processing state
Commit Description:
change announcement toggle into bootstrap button with processing state
File last commit:
Show/Diff file:
Action:
app/views/announcements/toggle.js.haml | 8 lines | 345 B | text/x-haml | HamlLexer |
:plain
var t = $("#published-#{@announcement.id}");
t.removeClass('btn-default');
t.removeClass('btn-success');
t.removeClass('btn-warning');
t.addClass("btn-#{@announcement.published? ? 'success' : 'default'}");
t.attr("data-params","published=#{!@announcement.published?}");
t.text("#{@announcement.published? ? "Yes" : "No"}");