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

Drop legacy dialog user #5864

Merged
merged 3 commits into from
Aug 19, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -607,11 +607,7 @@ def svc_catalog_provision
ra, st, svc_catalog_provision_finish_submit_endpoint
)
@in_a_form = true
if Settings.product.old_dialog_user_ui
dialog_initialize(ra, options)
else
replace_right_cell(:action => "dialog_provision", :dialog_locals => options[:dialog_locals])
end
replace_right_cell(:action => "dialog_provision", :dialog_locals => options[:dialog_locals])
else
# if catalog item has no dialog and provision button was pressed from list view
add_flash(_("No Ordering Dialog is available"), :warning)
Expand Down Expand Up @@ -1925,19 +1921,6 @@ def replace_right_cell(options = {})
presenter.hide(:toolbar)
# incase it was hidden for summary screen, and incase there were no records on show_list
presenter.hide(:form_buttons_div, :paging_div).remove_paging
if Settings.product.old_dialog_user_ui
presenter.show(:form_buttons_div, :buttons_on)
presenter.update(
:form_buttons_div,
r[
:partial => "layouts/x_dialog_buttons",
:locals => {
:action_url => "dialog_form_button_pressed",
:record_id => @edit[:rec_id]
}
]
)
end
else
# Added so buttons can be turned off even tho div is not being displayed it still pops up Abandon changes box when trying to change a node on tree after saving a record
presenter.hide(:buttons_on, :form_buttons_div).show(:toolbar).hide(:paging_div)
Expand Down
16 changes: 0 additions & 16 deletions app/controllers/mixins/custom_button_dialog_form_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,11 @@ def set_custom_button_dialog_presenter(options)
:partial => "shared/dialogs/dialog_provision",
:locals => options[:dialog_locals]
])
unless using_new_dialog_runner?(options)
presenter.update(:form_buttons_div, r[
:partial => 'layouts/x_dialog_buttons',
:locals => {
:action_url => "dialog_form_button_pressed",
:record_id => @edit[:rec_id],
}
])
presenter.show(:form_buttons_div)
end
presenter[:right_cell_text] = @right_cell_text
presenter.set_visibility(false, :toolbar)
presenter.set_visibility(false, :adv_searchbox_div)
presenter[:lock_sidebar] = true
presenter
end

private

def using_new_dialog_runner?(options)
options[:dialog_locals].present? && options[:dialog_locals][:force_old_dialog_use].to_s == "false"
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/vm_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ def replace_right_cell(options = {})
end

def show_old_dialog_submit_and_cancel_buttons?(params)
%w[vm_transform vm_transform_mass].include?(params[:pressed]) || Settings.product.old_dialog_user_ui
%w[vm_transform vm_transform_mass].include?(params[:pressed])
end

# get the host that this vm belongs to
Expand Down
10 changes: 0 additions & 10 deletions app/helpers/application_helper/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,6 @@ def auto_refresh_listening_options(options, trigger_override)
options.merge(:trigger => trigger_override)
end

def force_old_dialogs?(dialog_locals, force_old_dialog_use)
return false if force_old_dialog_use == false

if dialog_locals
return dialog_locals[:force_old_dialog_use].to_s == "true"
else
return true
end
end

private

def auto_refresh_options(field, auto_refresh_options_hash)
Expand Down
2 changes: 0 additions & 2 deletions app/services/dialog_local_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ def determine_dialog_locals_for_svc_catalog_provision(resource_action, target, f
:target_type => target.kind_of?(ServiceTemplate) ? "service_template" : target.class.name.underscore,
:real_target_type => target.class.base_class.name,
:dialog_id => resource_action.dialog_id,
:force_old_dialog_use => false,
:api_submit_endpoint => api_submit_endpoint,
:api_action => "order",
:finish_submit_endpoint => finish_submit_endpoint,
Expand All @@ -26,7 +25,6 @@ def determine_dialog_locals_for_custom_button(obj, button_name, resource_action,
:target_type => determine_target_type(obj),
:real_target_type => obj.class.base_class.name,
:dialog_id => resource_action.dialog_id,
:force_old_dialog_use => false,
:api_submit_endpoint => submit_endpoint,
:api_action => button_name,
:finish_submit_endpoint => cancel_endpoint,
Expand Down
9 changes: 0 additions & 9 deletions app/views/shared/dialogs/_auto_refresh_javascript.html.haml

This file was deleted.

71 changes: 0 additions & 71 deletions app/views/shared/dialogs/_dialog_field.html.haml

This file was deleted.

23 changes: 0 additions & 23 deletions app/views/shared/dialogs/_dialog_field_check_box.html.haml

This file was deleted.

This file was deleted.

40 changes: 0 additions & 40 deletions app/views/shared/dialogs/_dialog_field_drop_down_list.html.haml

This file was deleted.

50 changes: 0 additions & 50 deletions app/views/shared/dialogs/_dialog_field_radio_button.html.haml

This file was deleted.

26 changes: 0 additions & 26 deletions app/views/shared/dialogs/_dialog_field_text_area_box.html.haml

This file was deleted.

Loading