OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/views/my/add_block.js.erb

12 lines
609 B

// Add partial to the top container.
jQuery("#top").prepend("<%= j (render partial: 'block',
locals: { user: @user,
block_name: @block
}) %>");
// Revert options selection back to the default one.
jQuery('#block-options option[value="--<%= t(:button_add) %>--"]').prop('selected', true);
// Disable the option for this block in the blocks-to-add-to-page dropdown.
jQuery('#block-options option[value="<%= @block %>"]').attr("disabled", "true");