![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
foundation-rails-confirm
Advanced tools
This gem adds some javascript to change the default behaviour of data-confirm processing.
The normal confirm dialog shows a text with buttons 'ok' and 'cancel'. More information is needed here for a user to make the right decision. This gem therefore also adds:
This behaviour is similar to that of a "regular" confirm box in ways that it uses the same title and button labels. Defaults can be changed in two ways:
Changing all default values:
$.fn.foundation_confirmbox.defaults = {
fade: false,
title: null, // if title equals null window.top.location.origin is used
cancel: "Cancel",
cancel_class: "btn cancel",
proceed: "OK",
proceed_class: "btn proceed btn-primary"
};
Only changing one default value:
$.fn.foundation_confirmbox.defaults.proceed_class = "btn proceed btn-success";
Add this line to your application's Gemfile:
gem 'foundation-rails-confirm'
And then execute:
$ bundle
Add it to your application.js, anywhere after you require jquery_ujs:
//= require foundation/rails/confirm
Next... nothing. There is nothing you need to do to get this working. A helper could be useful for handling large amount of destroy buttons:
def destroy_link_to(path, options)
link_to t('.destroy'), path,
"method" => :delete,
"class" => "btn",
"confirm" => t('.destroy_confirm.body', item: options[:item]),
"data-confirm-title" => t('.destroy_confirm.title', item: options[:item]),
"data-confirm-cancel" => t('.destroy_confirm.cancel', item: options[:item]),
"data-confirm-cancel-class" => "button secondary"),
"data-confirm-proceed" => t('.destroy_confirm.proceed', item: options[:item]),
"data-confirm-proceed-class" => "button "
end
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)This gem is based to amazing gem by Rene van Lieshout, twitter-bootstrap-rails-confirm. All thanks goes to all conributors and authors of that gem.
FAQs
Unknown package
We found that foundation-rails-confirm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.