Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jl procedure group saving bug (2.2.0) #154

Merged
merged 5 commits into from
May 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/assets/javascripts/appointments.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ $ ->
pg = new ProcedureGrouper(core)
group = $(this).parents('.procedure-group')
group_id = $(group).data('group-id')
groups = $('.procedure-group')

if $(group).find('span.glyphicon').hasClass('glyphicon-chevron-right')
pg.show_group(group_id)
close_open_procedure_groups(groups, group_id)
else
pg.hide_group(group_id)

Expand Down Expand Up @@ -349,6 +351,12 @@ $ ->

return procedure_ids

close_open_procedure_groups = (groups, group_id) ->
groups.each ->
if $(this).find('span.glyphicon').hasClass('glyphicon-chevron-down') && ($(this).data('group-id') != group_id)
pg = new ProcedureGrouper($(this).closest('tr.core'))
pg.hide_group($(this).data('group-id'))

# Display a helpful message when user clicks on a disabled UI element
$(document).on 'click', '.pre_start_disabled, .complete-all-container.contains_disabled, .incomplete-all-container.contains_disabled', ->
alert(I18n["appointment"]["warning"])
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/procedure_grouper.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ $ ->
row_count = rows.length
procedures_table = $(rows).first().parents('.procedures tbody')

$(procedures_table).prepend("<tr class='procedure-group' data-group-id='#{group_id}'><td colspan='8'><button type='button' class='btn btn-xs btn-primary'><span class='count'>#{row_count}</span><span class='glyphicon glyphicon-chevron-right'></span></button>#{title} #{service_billing_type}</td></tr>")
$(procedures_table).prepend("<tr class='procedure-group' id='group-#{group_id}' data-group-id='#{group_id}'><td colspan='8'><button type='button' class='btn btn-xs btn-primary'><span class='count'>#{row_count}</span><span class='glyphicon glyphicon-chevron-right'></span></button>#{title} #{service_billing_type}</td></tr>")

return this.find_group(group_id)

Expand Down
1 change: 1 addition & 0 deletions app/views/procedures/update.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ $(".completed_date_field").datetimepicker(format: 'MM-DD-YYYY')

$('.row.appointment [data-toggle="tooltip"]').tooltip()

$("#group-<%= @procedure.group_id %> button").trigger('click')
$("#modal_place").modal 'hide'
<% end %>