datepicker_508 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: baa77c060d515a21ed163cbd0f6783dd9aaddc98
4
- data.tar.gz: 8426b82da69fb89c0ed719315c5c58900a3f12e6
3
+ metadata.gz: 198796a199b1e9732fe31da29518cd794d6822bb
4
+ data.tar.gz: a4a79cc242ee2130fba97b3e04defb60ad6f2c28
5
5
  SHA512:
6
- metadata.gz: 7cde3ae404270fe790f7682158e536cfa34840df0b803112b4a1b376fa64130d5f9434a4fdc4beb39098a602c0f174b3681b5980f59fdcef36774e564bd2e4ee
7
- data.tar.gz: 506d72b86641eed4fd93302a117a6b0a397f24a9772adce02c3e9c782b89276e7f6365b4fffb29a1ff2b6c484fd46143efae7c2b80cff7a2bf62fac1423f1e4a
6
+ metadata.gz: 6d4adcf3d5f9ba70e348c6f2a956e7edc5b25547169a90e9678682ee79d8d53d061e5b53581f5fffcbd9e2f9e46370406af7870827bf056d7534604cdf56e1d9
7
+ data.tar.gz: 26702064d6eb369bbad0015e48e74dca8a2ef285525cb01e2829458197e1c7ff3078ec514f41d37afffd3e7308d4032cd2b48b80812b797e5851783910dc2e3f
data/.travis.yml ADDED
File without changes
data/README.md CHANGED
@@ -1,8 +1,14 @@
1
- # Datepicker508
1
+ Datepicker508
2
+ ====
3
+ [gem]: https://rubygems.org/gems/datepicker_508
2
4
 
3
- TODO: Description
4
5
 
5
- ## Installation
6
+ Description
7
+ -----------
8
+ Datepicker_508 is a 508 compliant (accessible for the visually impaired) datepicker. It leverages the AB-Datepicker library by Jacques Archimède. Included is input masking based off jquery.mask.js by Igor Escobar.
9
+
10
+ Installation
11
+ ------------
6
12
 
7
13
  Add this line to your application's Gemfile:
8
14
 
@@ -17,59 +23,50 @@ And then execute:
17
23
  Or install it yourself as:
18
24
 
19
25
  $ gem install datepicker_508
26
+
27
+ If you are using turbolinks and including asset trees, no more installation setup is required. I will be adding a generator as an option to automatically include manifest file libraries.
20
28
 
21
- ## Usage
22
-
23
- ### CSS Setup
24
- TODO: CSS Setup
29
+ In application.js:
25
30
 
26
- ### JS Setup
27
- TODO: JS Setup
28
31
  ```
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
-
32
+ //= require datepicker
33
+ //= require jquery.mask
58
34
  ```
59
35
 
36
+ In application.scss:
60
37
 
61
- ## Development
38
+ ```
39
+ *= require datepicker
40
+ ```
62
41
 
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.
42
+ Usage
43
+ -----
64
44
 
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).
45
+ Basic usage with included mask:
66
46
 
67
- ## Contributing
47
+ ```
48
+ var datePickers = [
49
+ { name: '#datepickerOne', title: 'Example datepicker 1' },
50
+ { name: '#datepickerTwo', title: 'Example datepicker 2' }
51
+ ];
52
+
53
+ for ( var datePicker = 0; datePicker < datePickers.length; datePicker++ ) {
54
+ $(datePickers[datePicker]['name']).mask("99-99-9999").datepicker({
55
+ weekDayFormat: 'narrow',
56
+ inputFormat: 'MM-DD-YYYY',
57
+ outputFormat: 'MM-dd-yyyy',
58
+ buttonTitle: datePickers[datePicker]['title']
59
+ });
60
+ };
61
+ ```
68
62
 
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.
63
+ Contributing
64
+ ------------
70
65
 
66
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/datepicker_508.
71
67
 
72
- ## License
68
+ License
69
+ -------
73
70
 
74
71
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
75
72
 
Binary file
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = "A 508 compliant datepicker"
13
13
  # spec.description = %q{Write a longer description or delete this line.}
14
- spec.homepage = 'http://rubygems.org/gems/datepicker_508'
14
+ spec.homepage = 'https://github.com/AdamFreemer/datepicker_508'
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -1,3 +1,3 @@
1
1
  module Datepicker508
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datepicker_508
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Freemer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-18 00:00:00.000000000 Z
11
+ date: 2017-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -46,25 +46,21 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - ".gitignore"
49
- - ".idea/.rakeTasks"
50
- - ".idea/datepicker_508.iml"
51
- - ".idea/encodings.xml"
52
- - ".idea/misc.xml"
53
- - ".idea/modules.xml"
54
- - ".idea/vcs.xml"
49
+ - ".travis.yml"
55
50
  - Gemfile
56
51
  - LICENSE.txt
57
52
  - README.md
58
53
  - Rakefile
59
54
  - bin/console
60
55
  - bin/setup
56
+ - datepicker_508-0.1.0.gem
61
57
  - datepicker_508.gemspec
62
58
  - lib/datepicker_508.rb
63
59
  - lib/datepicker_508/version.rb
64
60
  - vendor/assets/javascripts/datepicker.js
65
61
  - vendor/assets/javascripts/jquery.mask.js
66
62
  - vendor/assets/stylesheets/datepicker.css
67
- homepage: http://rubygems.org/gems/datepicker_508
63
+ homepage: https://github.com/AdamFreemer/datepicker_508
68
64
  licenses:
69
65
  - MIT
70
66
  metadata: {}
data/.idea/.rakeTasks DELETED
@@ -1,7 +0,0 @@
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>
@@ -1,13 +0,0 @@
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 DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Encoding">
4
- <file url="PROJECT" charset="UTF-8" />
5
- </component>
6
- </project>
data/.idea/misc.xml DELETED
@@ -1,72 +0,0 @@
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 DELETED
@@ -1,8 +0,0 @@
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 DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>