gridforms-rails 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 +9 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/gridforms-rails.gemspec +27 -0
- data/lib/gridform-rails.rb +8 -0
- data/lib/gridforms-rails/engine.rb +6 -0
- data/lib/gridforms-rails/version.rb +5 -0
- data/vendor/assets/javascripts/gridforms.js +106 -0
- data/vendor/assets/stylesheets/gridforms.css +107 -0
- data/vendor/assets/stylesheets/gridforms.css.map +7 -0
- data/vendor/assets/stylesheets/gridforms.sass +161 -0
- metadata +103 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 101a14d5e3457266bbdecccd204c240e833264c6
|
4
|
+
data.tar.gz: 9c674a71f9e406e51fde70ce72c05369e90bb73e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5a5a7beec2441223d50a3ef0916ae824229111b576cbec1e8ead2054e9941099b43cf0d93c8b1a34de9aa760f4df1341d4123965635d5a77778489e1656b7092
|
7
|
+
data.tar.gz: 020027157b63012e4fc273b1797e2cd9f3bdb77315c4b43255001ac4a7a45b9b574908194f3943a838bb4c50dbed240956ca05afbf68438416f52eb083db7b9e
|
data/.gitignore
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at scmyers11@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Stephen Myers
|
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,43 @@
|
|
1
|
+
# Gridforms::Rails
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/gridforms/rails`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'gridforms-rails'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install gridforms-rails
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
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.
|
30
|
+
|
31
|
+
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).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gridforms-rails. 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.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the Gridforms::Rails project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/gridforms-rails/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "gridforms/rails"
|
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,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "gridforms-rails/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "gridforms-rails"
|
8
|
+
spec.version = Gridforms::Rails::VERSION
|
9
|
+
spec.authors = ["Stephen Myers"]
|
10
|
+
spec.email = ["scmyers11@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = "Rails wrapper for the gridforms jquery library"
|
13
|
+
spec.description = "Rails wrapper for the gridforms jquery library. Original library found https://github.com/kumailht/gridforms"
|
14
|
+
spec.homepage = "https://github.com/scmyers11/gridforms-rails"
|
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
|
+
spec.add_dependency "railties", "~> 4.0"
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
//
|
2
|
+
// Grid Forms
|
3
|
+
// Copyright (c) 2013 Kumail Hunaid
|
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.
|
22
|
+
//
|
23
|
+
|
24
|
+
jQuery(function($) {
|
25
|
+
var GridForms = {
|
26
|
+
el: {
|
27
|
+
fieldsRows: $('[data-row-span]'),
|
28
|
+
fieldsContainers: $('[data-field-span]'),
|
29
|
+
focusableFields: $('input, textarea, select', '[data-field-span]'),
|
30
|
+
window: $(window)
|
31
|
+
},
|
32
|
+
init: function() {
|
33
|
+
this.focusField(this.el.focusableFields.filter(':focus'));
|
34
|
+
this.equalizeFieldHeights();
|
35
|
+
this.events();
|
36
|
+
},
|
37
|
+
focusField: function(currentField) {
|
38
|
+
currentField.closest('[data-field-span]').addClass('focus');
|
39
|
+
},
|
40
|
+
removeFieldFocus: function() {
|
41
|
+
this.el.fieldsContainers.removeClass('focus');
|
42
|
+
},
|
43
|
+
events: function() {
|
44
|
+
var that = this;
|
45
|
+
that.el.fieldsContainers.click(function(event) {
|
46
|
+
var focusableFields = that.el.focusableFields;
|
47
|
+
|
48
|
+
if (!$(event.target).is(focusableFields)) {
|
49
|
+
$(this).find('input[type="text"],input[type="number"],input[type="tel"],input[type="email"], textarea, select').first().focus();
|
50
|
+
}
|
51
|
+
});
|
52
|
+
that.el.focusableFields.focus(function() {
|
53
|
+
that.focusField($(this));
|
54
|
+
});
|
55
|
+
that.el.focusableFields.blur(function() {
|
56
|
+
that.removeFieldFocus();
|
57
|
+
});
|
58
|
+
that.el.window.resize(function() {
|
59
|
+
that.equalizeFieldHeights();
|
60
|
+
});
|
61
|
+
|
62
|
+
},
|
63
|
+
equalizeFieldHeights: function() {
|
64
|
+
this.el.fieldsContainers.css("height", "auto");
|
65
|
+
|
66
|
+
var fieldsRows = this.el.fieldsRows;
|
67
|
+
var fieldsContainers = this.el.fieldsContainers;
|
68
|
+
|
69
|
+
// Make sure that the fields aren't stacked and window width is more than 700px
|
70
|
+
if (!this.areFieldsStacked() && $(window).width() > 700) {
|
71
|
+
fieldsRows.filter(":visible").each(function() {
|
72
|
+
var fieldRow = $(this);
|
73
|
+
|
74
|
+
// Singleton textarea rows should determine their row height
|
75
|
+
var rowInputs = fieldRow.children();
|
76
|
+
if (rowInputs.length === 1 && rowInputs.children("textarea").length === 1) return;
|
77
|
+
|
78
|
+
// Get the height of the row (thus the tallest element's height)
|
79
|
+
var rowHeight = fieldRow.css('height');
|
80
|
+
|
81
|
+
// Set the height for each field in the row...
|
82
|
+
fieldRow.find(fieldsContainers).css('height', rowHeight);
|
83
|
+
});
|
84
|
+
}
|
85
|
+
},
|
86
|
+
areFieldsStacked: function() {
|
87
|
+
// Get the first row
|
88
|
+
// which does not only contain one field
|
89
|
+
var firstRow = this.el.fieldsRows
|
90
|
+
.not('[data-row-span="1"]')
|
91
|
+
.first();
|
92
|
+
|
93
|
+
// Get to the total width
|
94
|
+
// of each field witin the row
|
95
|
+
var totalWidth = 0;
|
96
|
+
firstRow.children().each(function() {
|
97
|
+
totalWidth += $(this).width();
|
98
|
+
});
|
99
|
+
|
100
|
+
// Determine whether fields are stacked or not
|
101
|
+
return firstRow.width() <= totalWidth;
|
102
|
+
}
|
103
|
+
};
|
104
|
+
GridForms.init();
|
105
|
+
window.GridForms = GridForms;
|
106
|
+
});
|
@@ -0,0 +1,107 @@
|
|
1
|
+
.grid-form *, .grid-form *:before, .grid-form *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
|
2
|
+
.grid-form input[type="text"], .grid-form input[type="email"], .grid-form input[type="number"], .grid-form input[type="password"], .grid-form input[type="search"], .grid-form input[type="tel"], .grid-form input[type="url"], .grid-form input[type="color"], .grid-form input[type="date"], .grid-form input[type="datetime"], .grid-form input[type="datetime-local"], .grid-form input[type="month"], .grid-form input[type="time"], .grid-form input[type="week"], .grid-form textarea, .grid-form select { font-size: 18px; padding: 0; margin: 0; width: 100%; }
|
3
|
+
.grid-form input[type="text"], .grid-form input[type="email"], .grid-form input[type="number"], .grid-form input[type="password"], .grid-form input[type="search"], .grid-form input[type="tel"], .grid-form input[type="url"], .grid-form input[type="color"], .grid-form input[type="date"], .grid-form input[type="datetime"], .grid-form input[type="datetime-local"], .grid-form input[type="month"], .grid-form input[type="time"], .grid-form input[type="week"], .grid-form textarea { border: 0; background: transparent; }
|
4
|
+
.grid-form input[type="text"]::-webkit-input-placeholder, .grid-form input[type="email"]::-webkit-input-placeholder, .grid-form input[type="number"]::-webkit-input-placeholder, .grid-form input[type="password"]::-webkit-input-placeholder, .grid-form input[type="search"]::-webkit-input-placeholder, .grid-form input[type="tel"]::-webkit-input-placeholder, .grid-form input[type="url"]::-webkit-input-placeholder, .grid-form input[type="color"]::-webkit-input-placeholder, .grid-form input[type="date"]::-webkit-input-placeholder, .grid-form input[type="datetime"]::-webkit-input-placeholder, .grid-form input[type="datetime-local"]::-webkit-input-placeholder, .grid-form input[type="month"]::-webkit-input-placeholder, .grid-form input[type="time"]::-webkit-input-placeholder, .grid-form input[type="week"]::-webkit-input-placeholder, .grid-form textarea::-webkit-input-placeholder { font-weight: 100; color: #595959; }
|
5
|
+
.grid-form input[type="text"]:-moz-placeholder, .grid-form input[type="email"]:-moz-placeholder, .grid-form input[type="number"]:-moz-placeholder, .grid-form input[type="password"]:-moz-placeholder, .grid-form input[type="search"]:-moz-placeholder, .grid-form input[type="tel"]:-moz-placeholder, .grid-form input[type="url"]:-moz-placeholder, .grid-form input[type="color"]:-moz-placeholder, .grid-form input[type="date"]:-moz-placeholder, .grid-form input[type="datetime"]:-moz-placeholder, .grid-form input[type="datetime-local"]:-moz-placeholder, .grid-form input[type="month"]:-moz-placeholder, .grid-form input[type="time"]:-moz-placeholder, .grid-form input[type="week"]:-moz-placeholder, .grid-form textarea:-moz-placeholder { font-weight: 100; color: #595959; }
|
6
|
+
.grid-form input[type="text"]:focus, .grid-form input[type="email"]:focus, .grid-form input[type="number"]:focus, .grid-form input[type="password"]:focus, .grid-form input[type="search"]:focus, .grid-form input[type="tel"]:focus, .grid-form input[type="url"]:focus, .grid-form input[type="color"]:focus, .grid-form input[type="date"]:focus, .grid-form input[type="datetime"]:focus, .grid-form input[type="datetime-local"]:focus, .grid-form input[type="month"]:focus, .grid-form input[type="time"]:focus, .grid-form input[type="week"]:focus, .grid-form textarea:focus { outline: none; }
|
7
|
+
.grid-form fieldset { border: none; padding: 0; margin: 0; }
|
8
|
+
.grid-form fieldset legend { border: none; border-bottom: 4px solid #404040; color: #404040; font-size: 18px; font-weight: bold; padding-bottom: 5px; position: static; width: 100%; }
|
9
|
+
.grid-form fieldset fieldset legend { border-bottom: 2px solid #404040; font-weight: normal; }
|
10
|
+
.grid-form fieldset fieldset fieldset legend { border-bottom: 1px solid #404040; font-weight: normal; font-size: 15px; }
|
11
|
+
.grid-form [data-row-span] { border-bottom: 1px solid #333; width: 100%; zoom: 1; }
|
12
|
+
.grid-form [data-row-span]:before, .grid-form [data-row-span]:after { content: ""; display: table; }
|
13
|
+
.grid-form [data-row-span]:after { clear: both; }
|
14
|
+
@media only screen and (min-width: 0) and (max-width: 700px) { .grid-form [data-row-span] { border-bottom: none; } }
|
15
|
+
.grid-form [data-row-span] [data-field-span] { padding: 8px; float: left; }
|
16
|
+
@media only screen and (min-width: 0) and (max-width: 700px) { .grid-form [data-row-span] [data-field-span] { border-bottom: 1px solid #333; width: 100% !important; } }
|
17
|
+
@media only screen and (min-width: 700px) { .grid-form [data-row-span] [data-field-span] { border-right: 1px solid #333; display: block; } }
|
18
|
+
.grid-form [data-row-span] [data-field-span] label:first-child { margin-top: 0; text-transform: uppercase; letter-spacing: 1px; font-size: 10px; color: #333; display: block; margin-bottom: 4px; }
|
19
|
+
.grid-form [data-row-span] [data-field-span] label:first-child:hover { cursor: text; }
|
20
|
+
.grid-form [data-row-span] [data-field-span]:last-child { border-right: none; }
|
21
|
+
.grid-form [data-row-span] [data-field-span]:hover { background: #fffded; cursor: text; }
|
22
|
+
.grid-form [data-row-span] [data-field-span].focus { background: #fffad4; }
|
23
|
+
.grid-form [data-row-span] [data-field-span].focus label { color: #262626; }
|
24
|
+
@media print { .grid-form [data-row-span] { display: table; height: 56px; page-break-inside: avoid; }
|
25
|
+
.grid-form [data-row-span] [data-field-span] { border-right: 1px solid #333333; display: table-cell; float: none; }
|
26
|
+
.grid-form [data-row-span] [data-field-span].focus, .grid-form [data-row-span] [data-field-span]:hover { background: none; }
|
27
|
+
.grid-form [data-row-span] [data-field-span] label:first-child { letter-spacing: 0; } }
|
28
|
+
.grid-form [data-row-span="1"] > [data-field-span="1"] { width: 100%; }
|
29
|
+
.grid-form [data-row-span="2"] > [data-field-span="1"] { width: 50%; }
|
30
|
+
.grid-form [data-row-span="2"] > [data-field-span="2"] { width: 100%; }
|
31
|
+
.grid-form [data-row-span="3"] > [data-field-span="1"] { width: 33.33333%; }
|
32
|
+
.grid-form [data-row-span="3"] > [data-field-span="2"] { width: 66.66667%; }
|
33
|
+
.grid-form [data-row-span="3"] > [data-field-span="3"] { width: 100%; }
|
34
|
+
.grid-form [data-row-span="4"] > [data-field-span="1"] { width: 25%; }
|
35
|
+
.grid-form [data-row-span="4"] > [data-field-span="2"] { width: 50%; }
|
36
|
+
.grid-form [data-row-span="4"] > [data-field-span="3"] { width: 75%; }
|
37
|
+
.grid-form [data-row-span="4"] > [data-field-span="4"] { width: 100%; }
|
38
|
+
.grid-form [data-row-span="5"] > [data-field-span="1"] { width: 20%; }
|
39
|
+
.grid-form [data-row-span="5"] > [data-field-span="2"] { width: 40%; }
|
40
|
+
.grid-form [data-row-span="5"] > [data-field-span="3"] { width: 60%; }
|
41
|
+
.grid-form [data-row-span="5"] > [data-field-span="4"] { width: 80%; }
|
42
|
+
.grid-form [data-row-span="5"] > [data-field-span="5"] { width: 100%; }
|
43
|
+
.grid-form [data-row-span="6"] > [data-field-span="1"] { width: 16.66667%; }
|
44
|
+
.grid-form [data-row-span="6"] > [data-field-span="2"] { width: 33.33333%; }
|
45
|
+
.grid-form [data-row-span="6"] > [data-field-span="3"] { width: 50%; }
|
46
|
+
.grid-form [data-row-span="6"] > [data-field-span="4"] { width: 66.66667%; }
|
47
|
+
.grid-form [data-row-span="6"] > [data-field-span="5"] { width: 83.33333%; }
|
48
|
+
.grid-form [data-row-span="6"] > [data-field-span="6"] { width: 100%; }
|
49
|
+
.grid-form [data-row-span="7"] > [data-field-span="1"] { width: 14.28571%; }
|
50
|
+
.grid-form [data-row-span="7"] > [data-field-span="2"] { width: 28.57143%; }
|
51
|
+
.grid-form [data-row-span="7"] > [data-field-span="3"] { width: 42.85714%; }
|
52
|
+
.grid-form [data-row-span="7"] > [data-field-span="4"] { width: 57.14286%; }
|
53
|
+
.grid-form [data-row-span="7"] > [data-field-span="5"] { width: 71.42857%; }
|
54
|
+
.grid-form [data-row-span="7"] > [data-field-span="6"] { width: 85.71429%; }
|
55
|
+
.grid-form [data-row-span="7"] > [data-field-span="7"] { width: 100%; }
|
56
|
+
.grid-form [data-row-span="8"] > [data-field-span="1"] { width: 12.5%; }
|
57
|
+
.grid-form [data-row-span="8"] > [data-field-span="2"] { width: 25%; }
|
58
|
+
.grid-form [data-row-span="8"] > [data-field-span="3"] { width: 37.5%; }
|
59
|
+
.grid-form [data-row-span="8"] > [data-field-span="4"] { width: 50%; }
|
60
|
+
.grid-form [data-row-span="8"] > [data-field-span="5"] { width: 62.5%; }
|
61
|
+
.grid-form [data-row-span="8"] > [data-field-span="6"] { width: 75%; }
|
62
|
+
.grid-form [data-row-span="8"] > [data-field-span="7"] { width: 87.5%; }
|
63
|
+
.grid-form [data-row-span="8"] > [data-field-span="8"] { width: 100%; }
|
64
|
+
.grid-form [data-row-span="9"] > [data-field-span="1"] { width: 11.11111%; }
|
65
|
+
.grid-form [data-row-span="9"] > [data-field-span="2"] { width: 22.22222%; }
|
66
|
+
.grid-form [data-row-span="9"] > [data-field-span="3"] { width: 33.33333%; }
|
67
|
+
.grid-form [data-row-span="9"] > [data-field-span="4"] { width: 44.44444%; }
|
68
|
+
.grid-form [data-row-span="9"] > [data-field-span="5"] { width: 55.55556%; }
|
69
|
+
.grid-form [data-row-span="9"] > [data-field-span="6"] { width: 66.66667%; }
|
70
|
+
.grid-form [data-row-span="9"] > [data-field-span="7"] { width: 77.77778%; }
|
71
|
+
.grid-form [data-row-span="9"] > [data-field-span="8"] { width: 88.88889%; }
|
72
|
+
.grid-form [data-row-span="9"] > [data-field-span="9"] { width: 100%; }
|
73
|
+
.grid-form [data-row-span="10"] > [data-field-span="1"] { width: 10%; }
|
74
|
+
.grid-form [data-row-span="10"] > [data-field-span="2"] { width: 20%; }
|
75
|
+
.grid-form [data-row-span="10"] > [data-field-span="3"] { width: 30%; }
|
76
|
+
.grid-form [data-row-span="10"] > [data-field-span="4"] { width: 40%; }
|
77
|
+
.grid-form [data-row-span="10"] > [data-field-span="5"] { width: 50%; }
|
78
|
+
.grid-form [data-row-span="10"] > [data-field-span="6"] { width: 60%; }
|
79
|
+
.grid-form [data-row-span="10"] > [data-field-span="7"] { width: 70%; }
|
80
|
+
.grid-form [data-row-span="10"] > [data-field-span="8"] { width: 80%; }
|
81
|
+
.grid-form [data-row-span="10"] > [data-field-span="9"] { width: 90%; }
|
82
|
+
.grid-form [data-row-span="10"] > [data-field-span="10"] { width: 100%; }
|
83
|
+
.grid-form [data-row-span="11"] > [data-field-span="1"] { width: 9.09091%; }
|
84
|
+
.grid-form [data-row-span="11"] > [data-field-span="2"] { width: 18.18182%; }
|
85
|
+
.grid-form [data-row-span="11"] > [data-field-span="3"] { width: 27.27273%; }
|
86
|
+
.grid-form [data-row-span="11"] > [data-field-span="4"] { width: 36.36364%; }
|
87
|
+
.grid-form [data-row-span="11"] > [data-field-span="5"] { width: 45.45455%; }
|
88
|
+
.grid-form [data-row-span="11"] > [data-field-span="6"] { width: 54.54545%; }
|
89
|
+
.grid-form [data-row-span="11"] > [data-field-span="7"] { width: 63.63636%; }
|
90
|
+
.grid-form [data-row-span="11"] > [data-field-span="8"] { width: 72.72727%; }
|
91
|
+
.grid-form [data-row-span="11"] > [data-field-span="9"] { width: 81.81818%; }
|
92
|
+
.grid-form [data-row-span="11"] > [data-field-span="10"] { width: 90.90909%; }
|
93
|
+
.grid-form [data-row-span="11"] > [data-field-span="11"] { width: 100%; }
|
94
|
+
.grid-form [data-row-span="12"] > [data-field-span="1"] { width: 8.33333%; }
|
95
|
+
.grid-form [data-row-span="12"] > [data-field-span="2"] { width: 16.66667%; }
|
96
|
+
.grid-form [data-row-span="12"] > [data-field-span="3"] { width: 25%; }
|
97
|
+
.grid-form [data-row-span="12"] > [data-field-span="4"] { width: 33.33333%; }
|
98
|
+
.grid-form [data-row-span="12"] > [data-field-span="5"] { width: 41.66667%; }
|
99
|
+
.grid-form [data-row-span="12"] > [data-field-span="6"] { width: 50%; }
|
100
|
+
.grid-form [data-row-span="12"] > [data-field-span="7"] { width: 58.33333%; }
|
101
|
+
.grid-form [data-row-span="12"] > [data-field-span="8"] { width: 66.66667%; }
|
102
|
+
.grid-form [data-row-span="12"] > [data-field-span="9"] { width: 75%; }
|
103
|
+
.grid-form [data-row-span="12"] > [data-field-span="10"] { width: 83.33333%; }
|
104
|
+
.grid-form [data-row-span="12"] > [data-field-span="11"] { width: 91.66667%; }
|
105
|
+
.grid-form [data-row-span="12"] > [data-field-span="12"] { width: 100%; }
|
106
|
+
|
107
|
+
/*# sourceMappingURL=gridforms.css.map */
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"mappings": "AAkDI,qDAAoB,GAChB,kBAAkB,EAAE,UAAU,EAC9B,eAAe,EAAE,UAAU,EAC3B,UAAU,EAAE,UAAU;AAI1B,+eAA+T,GAC3T,SAAS,EAX8B,IAAI,EAY3C,OAAO,EAAE,CAAC,EACV,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,IAAI;AAEf,4dAAuT,GACnT,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,WAAW;AAzC3B,i3BAA4B,GA2CpB,WAAW,EAAE,GAAG,EAChB,KAAK,EAAE,OAA0B;AA1CzC,2tBAAkB,GAyCV,WAAW,EAAE,GAAG,EAChB,KAAK,EAAE,OAA0B;AACrC,sjBAAO,GACH,OAAO,EAAE,IAAI;AACrB,mBAAQ,GACJ,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,CAAC,EACV,MAAM,EAAE,CAAC;AACT,0BAAM,GACF,MAAM,EAAE,IAAI,EACZ,aAAa,EAAE,iBAAuB,EACtC,KAAK,EAAE,OAAa,EACpB,SAAS,EAhC0B,IAAI,EAiCvC,WAAW,EAAE,IAAI,EACjB,cAAc,EAAE,GAAG,EACnB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE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,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,wDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,wDAAkC,GAG9B,KAAK,EAAE,IAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,QAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,GAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,GAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,uDAAkC,GAG9B,KAAK,EAAE,GAA2B;AAHtC,wDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,wDAAkC,GAG9B,KAAK,EAAE,SAA2B;AAHtC,wDAAkC,GAG9B,KAAK,EAAE,IAA2B",
|
4
|
+
"sources": ["gridforms.sass"],
|
5
|
+
"names": [],
|
6
|
+
"file": "gridforms.css"
|
7
|
+
}
|
@@ -0,0 +1,161 @@
|
|
1
|
+
//
|
2
|
+
// Grid Forms
|
3
|
+
// Copyright (c) 2013 Kumail Hunaid
|
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.
|
22
|
+
//
|
23
|
+
|
24
|
+
=_placeholder
|
25
|
+
&::-webkit-input-placeholder
|
26
|
+
@content
|
27
|
+
&:-moz-placeholder
|
28
|
+
@content
|
29
|
+
|
30
|
+
|
31
|
+
=_breakpoints($min, $max: false)
|
32
|
+
@if $max == false
|
33
|
+
@media only screen and (min-width: $min)
|
34
|
+
@content
|
35
|
+
@else
|
36
|
+
@media only screen and (min-width: $min) and (max-width: $max)
|
37
|
+
@content
|
38
|
+
|
39
|
+
=_clear
|
40
|
+
zoom: 1
|
41
|
+
&:before, &:after
|
42
|
+
content: ""
|
43
|
+
display: table
|
44
|
+
&:after
|
45
|
+
clear: both
|
46
|
+
|
47
|
+
|
48
|
+
=grid-form($max-columns: 12, $font-size-large: 18px, $legend-color: lighten(#333, 5%), $field-padding: 8px, $label-font-size: 10px, $grid-border-color: #333, $label-color: #333, $field-focus-color: darken(#FFFDED, 5%))
|
49
|
+
|
50
|
+
// Sacrifice compatibility with IE7 and below to use the border-box model
|
51
|
+
*, *:before, *:after
|
52
|
+
-webkit-box-sizing: border-box
|
53
|
+
-moz-box-sizing: border-box
|
54
|
+
box-sizing: border-box
|
55
|
+
|
56
|
+
// Fields cannot be spaced away from the grid (clear out margins/padding)
|
57
|
+
// Field font sizes need to be applied here
|
58
|
+
input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="url"], input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], textarea, select
|
59
|
+
font-size: $font-size-large
|
60
|
+
padding: 0
|
61
|
+
margin: 0
|
62
|
+
width: 100%
|
63
|
+
// Remove backgrounds and borders from fields
|
64
|
+
input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="url"], input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], textarea
|
65
|
+
border: 0
|
66
|
+
background: transparent
|
67
|
+
+_placeholder
|
68
|
+
font-weight: 100
|
69
|
+
color: lighten($label-color, 15%)
|
70
|
+
&:focus
|
71
|
+
outline: none
|
72
|
+
fieldset
|
73
|
+
border: none
|
74
|
+
padding: 0
|
75
|
+
margin: 0
|
76
|
+
legend
|
77
|
+
border: none
|
78
|
+
border-bottom: 4px solid $legend-color
|
79
|
+
color: $legend-color
|
80
|
+
font-size: $font-size-large
|
81
|
+
font-weight: bold
|
82
|
+
padding-bottom: 5px
|
83
|
+
position: static
|
84
|
+
width: 100%
|
85
|
+
fieldset
|
86
|
+
legend
|
87
|
+
border-bottom: 2px solid $legend-color
|
88
|
+
font-weight: normal
|
89
|
+
fieldset legend
|
90
|
+
border-bottom: 1px solid $legend-color
|
91
|
+
font-weight: normal
|
92
|
+
font-size: $font-size-large - 3px
|
93
|
+
[data-row-span]
|
94
|
+
border-bottom: 1px solid $grid-border-color
|
95
|
+
width: 100%
|
96
|
+
+_clear
|
97
|
+
+_breakpoints(0, 700px)
|
98
|
+
border-bottom: none
|
99
|
+
[data-field-span]
|
100
|
+
padding: $field-padding
|
101
|
+
float: left
|
102
|
+
+_breakpoints(0, 700px)
|
103
|
+
border-bottom: 1px solid $grid-border-color
|
104
|
+
width: 100% !important
|
105
|
+
+_breakpoints(700px)
|
106
|
+
border-right: 1px solid $grid-border-color
|
107
|
+
display: block
|
108
|
+
label:first-child
|
109
|
+
margin-top: 0
|
110
|
+
text-transform: uppercase
|
111
|
+
letter-spacing: 1px
|
112
|
+
font-size: $label-font-size
|
113
|
+
color: $label-color
|
114
|
+
display: block
|
115
|
+
margin-bottom: 4px
|
116
|
+
&:hover
|
117
|
+
cursor: text
|
118
|
+
&:last-child
|
119
|
+
border-right: none
|
120
|
+
&:hover
|
121
|
+
background: lighten($field-focus-color, 5%)
|
122
|
+
cursor: text
|
123
|
+
&.focus
|
124
|
+
background: $field-focus-color
|
125
|
+
label
|
126
|
+
color: darken($label-color, 5%)
|
127
|
+
|
128
|
+
|
129
|
+
// Overide styles when printing to ensure good looking output.
|
130
|
+
@media print
|
131
|
+
[data-row-span]
|
132
|
+
display: table
|
133
|
+
height: 56px
|
134
|
+
page-break-inside: avoid
|
135
|
+
|
136
|
+
[data-field-span]
|
137
|
+
border-right: 1px solid #333333
|
138
|
+
display: table-cell
|
139
|
+
float: none
|
140
|
+
|
141
|
+
&.focus,
|
142
|
+
&:hover
|
143
|
+
background: none
|
144
|
+
|
145
|
+
label:first-child
|
146
|
+
letter-spacing: 0
|
147
|
+
|
148
|
+
// Create row spans for n columns in the grid
|
149
|
+
@for $grid_i from 1 through $max-columns
|
150
|
+
[data-row-span="#{$grid_i}"]
|
151
|
+
// Each field can only span to the maximum row span
|
152
|
+
// For each possible field span
|
153
|
+
@for $span_i from 1 through $grid_i
|
154
|
+
& > [data-field-span="#{$span_i}"]
|
155
|
+
// Divide the grid by $grid_i columns
|
156
|
+
// Set the width for this particular field span
|
157
|
+
width: percentage($span_i/$grid_i)
|
158
|
+
|
159
|
+
// Create Grid Form
|
160
|
+
.grid-form
|
161
|
+
+grid-form
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gridforms-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Stephen Myers
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-08-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: railties
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.15'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.15'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description: Rails wrapper for the gridforms jquery library. Original library found
|
56
|
+
https://github.com/kumailht/gridforms
|
57
|
+
email:
|
58
|
+
- scmyers11@gmail.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- CODE_OF_CONDUCT.md
|
65
|
+
- Gemfile
|
66
|
+
- LICENSE.txt
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- bin/console
|
70
|
+
- bin/setup
|
71
|
+
- gridforms-rails.gemspec
|
72
|
+
- lib/gridform-rails.rb
|
73
|
+
- lib/gridforms-rails/engine.rb
|
74
|
+
- lib/gridforms-rails/version.rb
|
75
|
+
- vendor/assets/javascripts/gridforms.js
|
76
|
+
- vendor/assets/stylesheets/gridforms.css
|
77
|
+
- vendor/assets/stylesheets/gridforms.css.map
|
78
|
+
- vendor/assets/stylesheets/gridforms.sass
|
79
|
+
homepage: https://github.com/scmyers11/gridforms-rails
|
80
|
+
licenses:
|
81
|
+
- MIT
|
82
|
+
metadata: {}
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
requirements: []
|
98
|
+
rubyforge_project:
|
99
|
+
rubygems_version: 2.4.8
|
100
|
+
signing_key:
|
101
|
+
specification_version: 4
|
102
|
+
summary: Rails wrapper for the gridforms jquery library
|
103
|
+
test_files: []
|