datepicker_508 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/datepicker_508.iml +13 -0
- data/.idea/encodings.xml +6 -0
- data/.idea/misc.xml +72 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +75 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/datepicker_508.gemspec +26 -0
- data/lib/datepicker_508/version.rb +3 -0
- data/lib/datepicker_508.rb +6 -0
- data/vendor/assets/javascripts/datepicker.js +2937 -0
- data/vendor/assets/javascripts/jquery.mask.js +536 -0
- data/vendor/assets/stylesheets/datepicker.css +607 -0
- metadata +91 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: baa77c060d515a21ed163cbd0f6783dd9aaddc98
|
4
|
+
data.tar.gz: 8426b82da69fb89c0ed719315c5c58900a3f12e6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7cde3ae404270fe790f7682158e536cfa34840df0b803112b4a1b376fa64130d5f9434a4fdc4beb39098a602c0f174b3681b5980f59fdcef36774e564bd2e4ee
|
7
|
+
data.tar.gz: 506d72b86641eed4fd93302a117a6b0a397f24a9772adce02c3e9c782b89276e7f6365b4fffb29a1ff2b6c484fd46143efae7c2b80cff7a2bf62fac1423f1e4a
|
data/.gitignore
ADDED
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build datepicker_508-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install datepicker_508-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install datepicker_508-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push datepicker_508-0.1.0.gem to Rubygems" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<shared />
|
5
|
+
<local />
|
6
|
+
</component>
|
7
|
+
<component name="NewModuleRootManager">
|
8
|
+
<content url="file://$MODULE_DIR$" />
|
9
|
+
<orderEntry type="inheritedJdk" />
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
11
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.14.6, RVM: ruby-2.4.0) [gem]" level="application" />
|
12
|
+
</component>
|
13
|
+
</module>
|
data/.idea/encodings.xml
ADDED
data/.idea/misc.xml
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="MarkdownProjectSettings">
|
4
|
+
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true">
|
5
|
+
<PanelProvider>
|
6
|
+
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
|
7
|
+
</PanelProvider>
|
8
|
+
</PreviewSettings>
|
9
|
+
<ParserSettings gitHubSyntaxChange="false">
|
10
|
+
<PegdownExtensions>
|
11
|
+
<option name="ABBREVIATIONS" value="false" />
|
12
|
+
<option name="ANCHORLINKS" value="true" />
|
13
|
+
<option name="ASIDE" value="false" />
|
14
|
+
<option name="ATXHEADERSPACE" value="true" />
|
15
|
+
<option name="AUTOLINKS" value="true" />
|
16
|
+
<option name="DEFINITIONS" value="false" />
|
17
|
+
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
|
18
|
+
<option name="FENCED_CODE_BLOCKS" value="true" />
|
19
|
+
<option name="FOOTNOTES" value="false" />
|
20
|
+
<option name="HARDWRAPS" value="false" />
|
21
|
+
<option name="INSERTED" value="false" />
|
22
|
+
<option name="QUOTES" value="false" />
|
23
|
+
<option name="RELAXEDHRULES" value="true" />
|
24
|
+
<option name="SMARTS" value="false" />
|
25
|
+
<option name="STRIKETHROUGH" value="true" />
|
26
|
+
<option name="SUBSCRIPT" value="false" />
|
27
|
+
<option name="SUPERSCRIPT" value="false" />
|
28
|
+
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
|
29
|
+
<option name="SUPPRESS_INLINE_HTML" value="false" />
|
30
|
+
<option name="TABLES" value="true" />
|
31
|
+
<option name="TASKLISTITEMS" value="true" />
|
32
|
+
<option name="TOC" value="false" />
|
33
|
+
<option name="WIKILINKS" value="true" />
|
34
|
+
</PegdownExtensions>
|
35
|
+
<ParserOptions>
|
36
|
+
<option name="COMMONMARK_LISTS" value="true" />
|
37
|
+
<option name="DUMMY" value="false" />
|
38
|
+
<option name="EMOJI_SHORTCUTS" value="true" />
|
39
|
+
<option name="FLEXMARK_FRONT_MATTER" value="false" />
|
40
|
+
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
|
41
|
+
<option name="GFM_TABLE_RENDERING" value="true" />
|
42
|
+
<option name="GITBOOK_URL_ENCODING" value="false" />
|
43
|
+
<option name="GITHUB_EMOJI_URL" value="false" />
|
44
|
+
<option name="GITHUB_LISTS" value="false" />
|
45
|
+
<option name="GITHUB_WIKI_LINKS" value="true" />
|
46
|
+
<option name="JEKYLL_FRONT_MATTER" value="false" />
|
47
|
+
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
|
48
|
+
</ParserOptions>
|
49
|
+
</ParserSettings>
|
50
|
+
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true">
|
51
|
+
<GeneratorProvider>
|
52
|
+
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
|
53
|
+
</GeneratorProvider>
|
54
|
+
<headerTop />
|
55
|
+
<headerBottom />
|
56
|
+
<bodyTop />
|
57
|
+
<bodyBottom />
|
58
|
+
</HtmlSettings>
|
59
|
+
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true">
|
60
|
+
<StylesheetProvider>
|
61
|
+
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
|
62
|
+
</StylesheetProvider>
|
63
|
+
<ScriptProviders />
|
64
|
+
<cssText />
|
65
|
+
</CssSettings>
|
66
|
+
<HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" />
|
67
|
+
<LinkMapSettings>
|
68
|
+
<textMaps />
|
69
|
+
</LinkMapSettings>
|
70
|
+
</component>
|
71
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.4.0" project-jdk-type="RUBY_SDK" />
|
72
|
+
</project>
|
data/.idea/modules.xml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/datepicker_508.iml" filepath="$PROJECT_DIR$/.idea/datepicker_508.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
data/.idea/vcs.xml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Adam Freemer
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# Datepicker508
|
2
|
+
|
3
|
+
TODO: Description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'datepicker_508'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install datepicker_508
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
### CSS Setup
|
24
|
+
TODO: CSS Setup
|
25
|
+
|
26
|
+
### JS Setup
|
27
|
+
TODO: JS Setup
|
28
|
+
```
|
29
|
+
function onLoadDatePickers() {
|
30
|
+
// This function contains setup parameters for site wide datepickers.
|
31
|
+
// Datepicker text field ID name and button title should be added below. The button title must be unique for 508 requirements.
|
32
|
+
var datePickers = [
|
33
|
+
{ name: '#application_submitted_on_lt', title: 'Your Title Here' },
|
34
|
+
{ name: '#birthdate', title: 'Select Birth Date' }
|
35
|
+
];
|
36
|
+
|
37
|
+
for ( var datePicker = 0; datePicker < datePickers.length; datePicker++ ) {
|
38
|
+
$(datePickers[datePicker]['name']).mask("99-99-9999").datepicker({
|
39
|
+
weekDayFormat: 'narrow',
|
40
|
+
inputFormat: 'MM-DD-YYYY',
|
41
|
+
outputFormat: 'MM-dd-yyyy',
|
42
|
+
buttonTitle: datePickers[datePicker]['title']
|
43
|
+
});
|
44
|
+
};
|
45
|
+
|
46
|
+
clearNilDatePickers();
|
47
|
+
}
|
48
|
+
|
49
|
+
function clearNilDatePickers() {
|
50
|
+
if ( $.inArray( $('input#passport_expires_on_lt').val(), [ '----', '--' ] ) > - 1 ) $('input#passport_expires_on_lt').val('');
|
51
|
+
if ( $.inArray( $('input#passport_expires_on_gt').val(), [ '----', '--' ] ) > - 1 ) $('input#passport_expires_on_gt').val('');
|
52
|
+
if ( $.inArray( $('input#application_submitted_on_lt').val(), [ '----', '--' ] ) > - 1 ) $('input#application_submitted_on_lt').val('');
|
53
|
+
if ( $.inArray( $('input#application_submitted_on_gt').val(), [ '----', '--' ] ) > - 1 ) $('input#application_submitted_on_gt').val('');
|
54
|
+
if ( $.inArray( $('input#movement_date_lt').val(), [ '----', '--' ] ) > - 1 ) $('input#movement_date_lt').val('');
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
```
|
59
|
+
|
60
|
+
|
61
|
+
## Development
|
62
|
+
|
63
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
64
|
+
|
65
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
66
|
+
|
67
|
+
## Contributing
|
68
|
+
|
69
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/datepicker_508. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
70
|
+
|
71
|
+
|
72
|
+
## License
|
73
|
+
|
74
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
75
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "datepicker_508"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'datepicker_508/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "datepicker_508"
|
8
|
+
spec.version = Datepicker508::VERSION
|
9
|
+
spec.authors = ["Adam Freemer"]
|
10
|
+
spec.email = ["adam@freemer.com"]
|
11
|
+
|
12
|
+
spec.summary = "A 508 compliant datepicker"
|
13
|
+
# spec.description = %q{Write a longer description or delete this line.}
|
14
|
+
spec.homepage = 'http://rubygems.org/gems/datepicker_508'
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.14"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
end
|