Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
This is a rewrite of Tim Harper's "Calendar Date Select" gem (https://github.com/timcharper/calendar_date_select) using the jQuery UI date picker. This project is still in development and still far from working.
The projects intent is to simulate the ease of use of the original while:
Jquids stands for JQuery UI Date Select
Add the following some where in your page (preferablly in the head of your layout file):
<%= jquids_includes %>
Change a field to so it uses the jquids_tag
:
<%= jquids_tag "some_date" %>
and you should be good to go!
CalendarDateSelect allow for the use of many different formats and css styles, and Jquids was made to allow for that same kind of flexibility, with out all of the weight of an full library of javascript and css files in your public folder.
To specify a different version of jQuery, just include :jQuery => "X.X.X" to your 'jquids_includes' method:
<%= jquids_includes :jQuery => "1.6.0" %>
A list of supported versions numbers can be found at the bottom of the page.
Because it is entirely possible that you are already using jQuery in your application, the option is given to you to not include jQuery using Jquids. To do that, just add :jQuery => :none to your 'jquids_includes' method:
<%= jquids_includes :jQuery => :none %>
and now jQuery will not be included into your plugin.
Just like you can specify a specific version of jQuery, you can also specify a version of jQuery UI that you would prefer to use:
<%= jquids_includes :jQueryUI => "1.8.0" %>
A list of supported version numbers can be found at the bottom of the page.
You are also able tell the Jquids not to load jQuery UI in the same way that you did with jQuery:
<%= jquids_includes :jQueryUI => :none %>
You may also use nil
or false
.
To change the style, just add :style => :new_style
to the
jquids_includes
declaration:
<%= jquids_includes :style => :vader %>
And the new style will be applied. All styles come from the Google CDN
(http://code.google.com/apis/libraries/devguide.html), so they are not hosted
in your application. If you wish to theme roll your own style
(http://jqueryui.com/themeroller/), just set :style
to :none
, nil
, or
false
, and include your style sheet in your project.
All styles that are available via the Google CDN for jQueryUI can be found below.
To set the format the same way that was done with CalendarDateSelect, just set
the Jquids format variable using the format=
function somewhere in
your code:
<% Jquids.format= :american %>
or you can set it in jquids_includes
method by setting the
:format
variable in the options hash:
<%= jquids_includes :format => :american %>
All the formats used mimic what was used in the original CalendarDateSelect gem. The formats available are listed below.
The jQuery datepicker has many options that you can implement through
Jquids via the :datepicker_options
hash. To add an option to a
single datepicker element, simply add the hash as an argument to
jquids_tag
call:
<%= jquids_tag "some_date", nil, :datepicker_options => {:showButtonPanel => true} %>
and now the datepicker will use the jQueryUI's button panel at the bottom of
the datepicker for that instance. But if you have multiple instances that all
should have the showButtonPanel
equal to true, add the :datepicker_options
to the jquids_includes
:
<%= jquids_includes :datepicker_options => {:showButtonPanel => true} %>
and the change will be applied to all instances of the datepicker. You can
overide that change by setting the setting to false on the desired
jquids_tag
instances.
A full list of all of the jQueryUI functions can be found here: http://jqueryui.com/demos/datepicker/#options
"1.2.3, 1.2.6, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1"
"1.5.2, 1.5.3, 1.6.0, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.8.0, 1.8.1, 1.8.2, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.8.10, 1.8.11, 1.8.12, 1.8.13"
The default style is :base
. The following can be implemented via the
jquids_includes
function:
:base
:black_tie
:blitzer
:cupertino
:dark_hive
:dot_luv
:eggplant
:excite_bike
:flick
:hot_sneaks
:humanity
:le_frog
:mint_choc
:overcast
:pepper_grinder
:redmond
:smoothness
:south_street
:start
:sunny
:swanky_purse
:trontastic
:ui_darkness
:ui_lightness
:vader
The default format is :natural
. Other formats include:
:natural
= "%B %d, %Y":hyphen_ampm
= "%Y-%m-%d":iso_date
= "%Y-%m-%d":finnish
= "%d.%m.%Y":danish
= "%d/%m/%Y":american
= "%m/%d/%Y":euro_24hr
= "%d %B %Y":euro_24hr_ymd
= "%Y.%m.%d":italian
= "%d/%m/%Y":db
= "%Y-%m-%d"The only two formats currently with time
in am-pm is :natural
, :hyphen_ampm
, and :american
.
jquids_includes
method and
the ability to set it on a case by case basis (implemented, but has a bug)Suggestions and contributions to the project are welcome.
FAQs
Unknown package
We found that jquids 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.