selectivity-rails 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Backdrop
3
+ */
4
+
5
+ .selectivity-backdrop
6
+ background: transparent
7
+ position: fixed
8
+ z-index: 9998
9
+ top: 0
10
+ right: 0
11
+ bottom: 0
12
+ left: 0
@@ -0,0 +1,23 @@
1
+ /**
2
+ * All CSS that comes with Selectivity.js can be used as is, or tweaked to your heart's content :)
3
+ *
4
+ * Please realize though there is no "API contract" regarding styling of CSS classes, meaning that
5
+ * any customized CSS made may need to be updated without warning if you want to upgrade the
6
+ * Selectivity version you use. You can mitigate this problem by using your own templates instead of
7
+ * those defined in selectivity-templates.js, since templates will at the very least continue
8
+ * working across patch versions and any changes necessary to templates will be documented in the
9
+ * changelog.
10
+ */
11
+
12
+ .selectivity-clearfix
13
+ clear: both
14
+
15
+ .selectivity-input
16
+ display: inline-block
17
+ width: $selectivity-width
18
+
19
+ select
20
+ display: none
21
+
22
+ .selectivity-placeholder
23
+ color: $selectivity-placeholder-color
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Dropdown
3
+ */
4
+
5
+ .selectivity-dropdown
6
+ background: #fff
7
+ border-radius: 4px
8
+ box-shadow: 0 1px 5px 1px rgba(0, 0, 0, .15), 0 10px 16px 0 rgba(0, 0, 0, .2)
9
+ position: absolute
10
+ z-index: 9999
11
+
12
+ .selectivity-search-input-container
13
+ border-bottom: 1px solid #eee
14
+
15
+ .selectivity-search-input
16
+ background: transparent
17
+ border: 0
18
+ outline: 0
19
+ width: 100%
20
+
21
+ .selectivity-results-container
22
+ max-height: 28em
23
+ overflow: auto
24
+
25
+ .selectivity-load-more,
26
+ .selectivity-result-item
27
+ cursor: pointer
28
+ padding: 7px
29
+
30
+ .selectivity-result-children .selectivity-result-item
31
+ padding-left: 17px
32
+
33
+ .selectivity-load-more.highlight,
34
+ .selectivity-result-item.highlight
35
+ background: $selectivity-dropdown-highlight-bg
36
+ color: $selectivity-dropdown-highlight-color
37
+
38
+ .selectivity-result-item:first-child
39
+ border-radius: 4px 4px 0 0
40
+
41
+ .selectivity-dropdown.has-search-input .selectivity-result-item:first-child
42
+ border-radius: 0
43
+
44
+ .selectivity-result-label
45
+ font-weight: bold
46
+
47
+ .selectivity-load-more,
48
+ .selectivity-result-item:last-child,
49
+ .selectivity-result-children:last-child .selectivity-result-item:last-child
50
+ border-radius: 0 0 4px 4px
51
+
52
+ .selectivity-result-children .selectivity-result-item:last-child
53
+ border-radius: 0
54
+
55
+ .selectivity-error,
56
+ .selectivity-loading,
57
+ .selectivity-search-input-container,
58
+ .selectivity-result-label
59
+ padding: 7px
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Multi-selection input
3
+ */
4
+
5
+ .selectivity-multiple-input-container
6
+ background: $selectivity-bg
7
+ border-radius: $selectivity-border-radius
8
+ cursor: text
9
+ max-height: 10em
10
+ min-height: calc(2em + 4px)
11
+ overflow: auto
12
+ padding: $selectivity-padding
13
+
14
+ .selectivity-multiple-input-container .selectivity-placeholder
15
+ height: calc(2em + 4px)
16
+ line-height: calc(2em + 4px)
17
+
18
+ .selectivity-multiple-input,
19
+ input[type='text'].selectivity-multiple-input
20
+ background-color: transparent
21
+ border: none
22
+ float: left
23
+ height: calc(2em + 4px)
24
+ max-width: 100%
25
+ outline: 0
26
+ padding: 0
27
+
28
+ &:focus
29
+ background-color: transparent
30
+ box-shadow: none
31
+ outline: none
32
+
33
+ .selectivity-multiple-input::-ms-clear
34
+ display: none
35
+
36
+ .selectivity-multiple-input.selectivity-width-detector
37
+ position: absolute
38
+ top: -10000px
39
+ left: 0
40
+ white-space: pre
41
+
42
+ .selectivity-multiple-selected-item
43
+ background: $selectivity-multiple-selected-bg
44
+ border-radius: $selectivity-multiple-selected-border-radius
45
+ color: $selectivity-multiple-selected-color
46
+ cursor: default
47
+ float: left
48
+ line-height: 2em
49
+ margin: 2px
50
+ padding-left: 5px
51
+ position: relative
52
+ -moz-user-select: none
53
+ -ms-user-select: none
54
+ -webkit-user-select: none
55
+ user-select: none
56
+ white-space: nowrap
57
+
58
+ &.highlighted
59
+ background-color: $selectivity-multiple-selected-highlight-bg
60
+
61
+ .selectivity-multiple-selected-item-remove
62
+ color: $selectivity-multiple-selected-color
63
+ cursor: pointer
64
+ padding: 5px
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Single-selection input
3
+ */
4
+
5
+ .selectivity-single-select
6
+ background: $selectivity-bg
7
+ border-radius: $selectivity-border-radius
8
+ cursor: pointer
9
+ min-height: 2em
10
+ padding: $selectivity-padding
11
+ position: relative
12
+ -moz-box-sizing: content-box
13
+ -webkit-box-sizing: content-box
14
+ box-sizing: content-box
15
+
16
+ .selectivity-single-select-input
17
+ opacity: 0
18
+
19
+ .selectivity-single-result-container
20
+ position: absolute
21
+ top: 0.8em
22
+ right: 15px
23
+ left: 5px
24
+ overflow: hidden
25
+ text-overflow: ellipsis
26
+ white-space: nowrap
27
+
28
+ .selectivity-single-selected-item
29
+ color: $selectivity-single-selected-color
30
+
31
+ .selectivity-single-selected-item-remove
32
+ color: $selectivity-single-selected-color
33
+ float: right
34
+ padding: 0 5px
35
+
36
+ .selectivity-caret
37
+ position: absolute
38
+ right: 5px
39
+ top: 0.7em
40
+
41
+ @media only screen and (max-device-width: 480px)
42
+ .selectivity-single-select
43
+ background: $selectivity-bg
44
+ border-radius: $selectivity-border-radius
45
+
46
+ .selectivity-single-result-container
47
+ right: 5px
48
+
49
+ .selectivity-caret
50
+ display: none
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Submenu
3
+ */
4
+
5
+ .selectivity-submenu-icon
6
+ position: absolute
7
+ right: 4px
@@ -0,0 +1,16 @@
1
+ $selectivity-width: 250px !default
2
+ $selectivity-padding: 5px !default
3
+ $selectivity-border-radius: 2px !default
4
+ $selectivity-bg: #eee !default
5
+
6
+ $selectivity-placeholder-color: #999 !default
7
+
8
+ $selectivity-single-selected-color: #000 !default
9
+
10
+ $selectivity-multiple-selected-border-radius: 3px !default
11
+ $selectivity-multiple-selected-bg: #4484c7 !default
12
+ $selectivity-multiple-selected-color: #fff !default
13
+ $selectivity-multiple-selected-highlight-bg: #ccc !default
14
+
15
+ $selectivity-dropdown-highlight-bg: #4484c7 !default
16
+ $selectivity-dropdown-highlight-color: #fff !default
@@ -0,0 +1,7 @@
1
+ @import 'selectivity/variables'
2
+ @import 'selectivity/base'
3
+ @import 'selectivity/backdrop'
4
+ @import 'selectivity/dropdown'
5
+ @import 'selectivity/multiple'
6
+ @import 'selectivity/single'
7
+ @import 'selectivity/submenu'
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: selectivity-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Konrad Jurkowski
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description: Selectivity.js is a modular and light-weight selection library for jQuery
56
+ and Zepto.js. This gem integrates Selectivity.js with Ruby on Rails.
57
+ email:
58
+ - konrad@jurkowski.me
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - .gitignore
64
+ - Gemfile
65
+ - LICENSE
66
+ - README.md
67
+ - Rakefile
68
+ - app/assets/javascripts/selectivity.pl_PL.js.coffee
69
+ - app/assets/stylesheets/selectivity_bootstrap.sass
70
+ - lib/selectivity/rails.rb
71
+ - lib/selectivity/rails/version.rb
72
+ - lib/selectivity/rspec.rb
73
+ - selectivity-rails.gemspec
74
+ - vendor/assets/javascripts/selectivity.js
75
+ - vendor/assets/stylesheets/selectivity.sass
76
+ - vendor/assets/stylesheets/selectivity/backdrop.sass
77
+ - vendor/assets/stylesheets/selectivity/base.sass
78
+ - vendor/assets/stylesheets/selectivity/dropdown.sass
79
+ - vendor/assets/stylesheets/selectivity/multiple.sass
80
+ - vendor/assets/stylesheets/selectivity/single.sass
81
+ - vendor/assets/stylesheets/selectivity/submenu.sass
82
+ - vendor/assets/stylesheets/selectivity/variables.sass
83
+ homepage: https://github.com/msx2/selectivity-rails
84
+ licenses:
85
+ - MIT
86
+ metadata: {}
87
+ post_install_message:
88
+ rdoc_options: []
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ requirements: []
102
+ rubyforge_project:
103
+ rubygems_version: 2.1.11
104
+ signing_key:
105
+ specification_version: 4
106
+ summary: Integrate Selectivity.js with Ruby on Rails
107
+ test_files: []