![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.
Add the ZeroClipboard libary to your Rails app
Add this line to your application's Gemfile
:
gem 'zeroclipboard-rails'
Then execute:
$ bundle
Add this line to your app/assets/javascripts/application.js
file:
//= require zeroclipboard
For usage information, browser support see the ZeroClipboard documentation. The 'Setup' section can be skipped as this is covered by the Rails-specific instructions provided above.
Place the following in a plain HTML or ERB view file:
<div class='demo-area'>
<button class='my_clip_button' data-clipboard-target='fe_text' data-clipboard-text='Default clipboard text from attribute' id='d_clip_button' title='Click me to copy to clipboard.'>
<b>Copy To Clipboard...</b>
</button>
<h4>
<label for='fe_text'>Change Copy Text Here</label>
</h4>
<textarea cols='50' id='fe_text' rows='3'>Copy me!</textarea>
<h4>
<label for='testarea'>Paste Text Here</label>
</h4>
<textarea cols='50' id='testarea' rows='3'></textarea>
<p>
<button id='clear-test'>Clear Test Area</button>
</p>
</div>
<script>
$(document).ready(function() {
var clip = new ZeroClipboard($("#d_clip_button"))
});
$("#clear-test").on("click", function(){
$("#fe_text").val("Copy me!");
$("#testarea").val("");
});
</script>
Place the following in a Haml view file:
.demo-area
%button#d_clip_button.my_clip_button{"data-clipboard-target" => "fe_text", "data-clipboard-text" => "Default clipboard text from attribute", :title => "Click me to copy to clipboard."}
%b Copy To Clipboard...
%h4
%label{:for => "fe_text"} Change Copy Text Here
%textarea#fe_text{:cols => "50", :rows => "3"} Copy me!
%h4
%label{:for => "testarea"} Paste Text Here
%textarea#testarea{:cols => "50", :rows => "3"}
%p
%button#clear-test Clear Test Area
:javascript
$(document).ready(function() {
var clip = new ZeroClipboard($("#d_clip_button"))
});
$("#clear-test").on("click", function(){
$("#fe_text").val("Copy me!");
$("#testarea").val("");
});
This gem is merely a wrapper around ZeroClipboard. The mapping between the gem version and the version of the underlying ZeroClipboard code is as follows:
zeroclipboard-rails gem version | ZeroClipboard version | Notes |
---|---|---|
0.0.3 | 1.1.7 | Includes workaround for CSS zoom bug |
0.0.4 | 1.1.7 | Includes workaround for CSS zoom bug |
0.0.5 | 1.1.7 | Includes workaround for CSS zoom bug |
0.0.6 | 1.1.7 | Includes workaround for CSS zoom bug |
0.0.7 | 1.1.7 | Includes workaround for CSS zoom bug |
0.0.8 | 1.2.2 | |
0.0.9 | 1.2.3 | |
0.0.10 | 1.2.3 | |
0.0.11 | 1.3.1 | |
0.0.12 | 1.3.1 | Fix deprecation warning - @markrickert |
0.0.13 | 1.3.5 | |
0.1.0 | 2.1.2 | Switch to new zeroclipboard.js major version, see their releases |
0.1.1 | 2.2.0 |
Credits entirely to the team behind ZeroClipboard
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that zeroclipboard-rails demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.