mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-18 13:18:09 +01:00
add ui for changing state of context to closed. This fixes #645
This commit is contained in:
parent
acab98d4c7
commit
4df340bd7b
12 changed files with 114 additions and 86 deletions
|
|
@ -2,18 +2,14 @@
|
|||
hide_empty_message();
|
||||
TracksPages.hide_errors();
|
||||
TracksPages.set_page_badge(<%= @down_count %>);
|
||||
add_context("<%=@context.hidden? ? 'hidden' : 'active'%>");
|
||||
add_context("<%=@context.state%>");
|
||||
clear_form();
|
||||
<% else -%>
|
||||
TracksPages.show_errors(html_for_error_messages());
|
||||
<% end -%>
|
||||
|
||||
function hide_empty_message() {
|
||||
<% if @context.hidden? -%>
|
||||
$('div#hidden-contexts-empty-nd').hide();
|
||||
<% else -%>
|
||||
$('div#active-contexts-empty-nd').hide();
|
||||
<% end -%>
|
||||
$('div#<%=@context.state%>-contexts-empty-nd').hide();
|
||||
}
|
||||
|
||||
function add_context(state) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue