Sha256: 31b4ac3c752626f9161c128fec7b6569195c2c47ad8919cdd3917def3c1c7ee9

Contents?: true

Size: 1.36 KB

Versions: 20

Compression:

Stored size: 1.36 KB

Contents

<% if @questions.any? %>
if ($('#question_modal')[0] == null) {
	$('body').append('<div id="question_modal"></div>');
}
$('#question_modal').html('<%= link_to("Add \"#{params[:human_type]}\"", fe_admin_question_sheet_page_elements_path(question_sheet_id: @page.question_sheet_id, page_id: @page.id,
                                            element_type: params[:element_type], "element[style]" => @style, format: :js),
                                            remote: true,
                                            method: :post,
                                            class: "add_type",
                                            data: { disable_with: "Add \"#{params[:human_type]}\"" }) %><p>Or you can also copy an existing <%= params[:human_type] %> element. If you are unsure, just <strong>Add <%= params[:human_type] %>.</strong></p><div id="questions_div" title=""></div>');
$('#questions_div').html("<%= escape_javascript(render("fe/questions/fe/questions", questions: @questions)) %>")
$('#question_modal').dialog({width: 500, height: 400});
<% else %>
  $.post('<%= fe_admin_question_sheet_page_elements_path(question_sheet_id: @page.question_sheet_id, 
                                                    page_id: @page.id,
                                                    element_type: params[:element_type], "element[style]" => @style, format: :js) %>');
<% end %>

Version data entries

20 entries across 15 versions & 1 rubygems

Version Path
fe-2.1.6.1 app/views/fe/admin/elements/new.js.erb
fe-2.1.6 app/views/fe/admin/elements/new.js.erb
fe-2.1.5 app/views/fe/admin/elements/new.js.erb
fe-2.1.4 app/views/fe/admin/elements/new.js.erb
fe-2.1.3 app/views/fe/admin/elements/new.js.erb
fe-2.1.2 app/views/fe/admin/elements/new.js.erb
fe-2.1.1 app/views/fe/admin/elements/new.js.erb
fe-2.0.8 app/views/fe/admin/elements/new.js.erb
fe-2.0.6 app/views/fe/admin/elements/new.js.erb
fe-2.0.5 app/views/fe/admin/elements/new.js.erb
fe-2.0.4 app/views.current/fe/admin/elements/new.js.erb
fe-2.0.4 app/views/fe/admin/elements/new.js.erb
fe-2.0.3 app/views/fe/admin/elements/new.js.erb
fe-2.0.3 app/views.current/fe/admin/elements/new.js.erb
fe-2.0.2 app/views.current/fe/admin/elements/new.js.erb
fe-2.0.2 app/views/fe/admin/elements/new.js.erb
fe-2.0.1 app/views.current/fe/admin/elements/new.js.erb
fe-2.0.1 app/views/fe/admin/elements/new.js.erb
fe-2.0.0 app/views.current/fe/admin/elements/new.js.erb
fe-2.0.0 app/views/fe/admin/elements/new.js.erb