tokenizes 0.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.
@@ -0,0 +1,11 @@
1
+ $(function () {
2
+ $(".token_field").each(function(){
3
+ $(this).tokenInput(
4
+ $(this).data('json-path'), {
5
+ minChars: 0, //doesn't work
6
+ theme: 'facebook',
7
+ preventDuplicates: true,
8
+ prePopulate: $(this).data('pre')});
9
+ });
10
+
11
+ });
@@ -0,0 +1,122 @@
1
+ /* Example tokeninput style #2: Facebook style */
2
+ ul.token-input-list-facebook {
3
+ overflow: hidden;
4
+ height: auto !important;
5
+ height: 1%;
6
+ width: 400px;
7
+ border: 1px solid #8496ba;
8
+ cursor: text;
9
+ font-size: 12px;
10
+ font-family: Verdana;
11
+ min-height: 1px;
12
+ z-index: 999;
13
+ margin: 0;
14
+ padding: 0;
15
+ background-color: #fff;
16
+ list-style-type: none;
17
+ clear: left;
18
+ }
19
+
20
+ ul.token-input-list-facebook li input {
21
+ border: 0;
22
+ width: 100px;
23
+ padding: 3px 8px;
24
+ background-color: white;
25
+ margin: 2px 0;
26
+ -webkit-appearance: caret;
27
+ }
28
+
29
+ li.token-input-token-facebook {
30
+ overflow: hidden;
31
+ height: auto !important;
32
+ height: 15px;
33
+ margin: 3px;
34
+ padding: 1px 3px;
35
+ background-color: #eff2f7;
36
+ color: #000;
37
+ cursor: default;
38
+ border: 1px solid #ccd5e4;
39
+ font-size: 11px;
40
+ border-radius: 5px;
41
+ -moz-border-radius: 5px;
42
+ -webkit-border-radius: 5px;
43
+ float: left;
44
+ white-space: nowrap;
45
+ }
46
+
47
+ li.token-input-token-facebook p {
48
+ display: inline;
49
+ padding: 0;
50
+ margin: 0;
51
+ }
52
+
53
+ li.token-input-token-facebook span {
54
+ color: #a6b3cf;
55
+ margin-left: 5px;
56
+ font-weight: bold;
57
+ cursor: pointer;
58
+ }
59
+
60
+ li.token-input-selected-token-facebook {
61
+ background-color: #5670a6;
62
+ border: 1px solid #3b5998;
63
+ color: #fff;
64
+ }
65
+
66
+ li.token-input-input-token-facebook {
67
+ float: left;
68
+ margin: 0;
69
+ padding: 0;
70
+ list-style-type: none;
71
+ }
72
+
73
+ div.token-input-dropdown-facebook {
74
+ position: absolute;
75
+ width: 400px;
76
+ background-color: #fff;
77
+ overflow: hidden;
78
+ border-left: 1px solid #ccc;
79
+ border-right: 1px solid #ccc;
80
+ border-bottom: 1px solid #ccc;
81
+ cursor: default;
82
+ font-size: 11px;
83
+ font-family: Verdana;
84
+ z-index: 1;
85
+ }
86
+
87
+ div.token-input-dropdown-facebook p {
88
+ margin: 0;
89
+ padding: 5px;
90
+ font-weight: bold;
91
+ color: #777;
92
+ }
93
+
94
+ div.token-input-dropdown-facebook ul {
95
+ margin: 0;
96
+ padding: 0;
97
+ }
98
+
99
+ div.token-input-dropdown-facebook ul li {
100
+ background-color: #fff;
101
+ padding: 3px;
102
+ margin: 0;
103
+ list-style-type: none;
104
+ }
105
+
106
+ div.token-input-dropdown-facebook ul li.token-input-dropdown-item-facebook {
107
+ background-color: #fff;
108
+ }
109
+
110
+ div.token-input-dropdown-facebook ul li.token-input-dropdown-item2-facebook {
111
+ background-color: #fff;
112
+ }
113
+
114
+ div.token-input-dropdown-facebook ul li em {
115
+ font-weight: bold;
116
+ font-style: normal;
117
+ }
118
+
119
+ div.token-input-dropdown-facebook ul li.token-input-selected-dropdown-item-facebook {
120
+ background-color: #3b5998;
121
+ color: #fff;
122
+ }
@@ -0,0 +1,204 @@
1
+ /* Example tokeninput style #2: Mac Style */
2
+ fieldset.token-input-mac {
3
+ position: relative;
4
+ padding: 0;
5
+ margin: 5px 0;
6
+ background: #fff;
7
+ width: 400px;
8
+ border: 1px solid #A4BDEC;
9
+ border-radius: 10px;
10
+ -moz-border-radius: 10px;
11
+ -webkit-border-radius: 10px;
12
+ }
13
+
14
+ fieldset.token-input-mac.token-input-dropdown-mac {
15
+ border-radius: 10px 10px 0 0;
16
+ -moz-border-radius: 10px 10px 0 0;
17
+ -webkit-border-radius: 10px 10px 0 0;
18
+ box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
19
+ -moz-box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
20
+ -webkit-box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
21
+ }
22
+
23
+ ul.token-input-list-mac {
24
+ overflow: hidden;
25
+ height: auto !important;
26
+ height: 1%;
27
+ cursor: text;
28
+ font-size: 12px;
29
+ font-family: Verdana;
30
+ min-height: 1px;
31
+ z-index: 999;
32
+ margin: 0;
33
+ padding: 3px;
34
+ background: transparent;
35
+ }
36
+
37
+ ul.token-input-list-mac.error {
38
+ border: 1px solid #C52020;
39
+ }
40
+
41
+ ul.token-input-list-mac li {
42
+ list-style-type: none;
43
+ }
44
+
45
+ li.token-input-token-mac p {
46
+ display: inline;
47
+ padding: 0;
48
+ margin: 0;
49
+ }
50
+
51
+ li.token-input-token-mac span {
52
+ color: #a6b3cf;
53
+ margin-left: 5px;
54
+ font-weight: bold;
55
+ cursor: pointer;
56
+ }
57
+
58
+ /* TOKENS */
59
+
60
+ li.token-input-token-mac {
61
+ font-family: "Lucida Grande", Arial, serif;
62
+ font-size: 9pt;
63
+ line-height: 12pt;
64
+ overflow: hidden;
65
+ height: 16px;
66
+ margin: 3px;
67
+ padding: 0 10px;
68
+ background: none;
69
+ background-color: #dee7f8;
70
+ color: #000;
71
+ cursor: default;
72
+ border: 1px solid #a4bdec;
73
+ border-radius: 15px;
74
+ -moz-border-radius: 15px;
75
+ -webkit-border-radius: 15px;
76
+ float: left;
77
+ }
78
+
79
+ li.token-input-highlighted-token-mac {
80
+ background-color: #bbcef1;
81
+ border: 1px solid #598bec;
82
+ color: #000;
83
+ }
84
+
85
+ li.token-input-selected-token-mac {
86
+ background-color: #598bec;
87
+ border: 1px solid transparent;
88
+ color: #fff;
89
+ }
90
+
91
+ li.token-input-highlighted-token-mac span.token-input-delete-token-mac {
92
+ color: #000;
93
+ }
94
+
95
+ li.token-input-selected-token-mac span.token-input-delete-token-mac {
96
+ color: #fff;
97
+ }
98
+
99
+ li.token-input-input-token-mac {
100
+ border: none;
101
+ background: transparent;
102
+ float: left;
103
+ padding: 0;
104
+ margin: 0;
105
+ }
106
+
107
+ li.token-input-input-token-mac input {
108
+ border: 0;
109
+ width: 100px;
110
+ padding: 3px;
111
+ background-color: transparent;
112
+ margin: 0;
113
+ }
114
+
115
+ div.token-input-dropdown-mac {
116
+ position: absolute;
117
+ border: 1px solid #A4BDEC;
118
+ border-top: none;
119
+ left: -1px;
120
+ right: -1px;
121
+ background-color: #fff;
122
+ overflow: hidden;
123
+ cursor: default;
124
+ font-size: 10pt;
125
+ font-family: "Lucida Grande", Arial, serif;
126
+ padding: 5px;
127
+ border-radius: 0 0 10px 10px;
128
+ -moz-border-radius: 0 0 10px 10px;
129
+ -webkit-border-radius: 0 0 10px 10px;
130
+ box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
131
+ -moz-box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
132
+ -webkit-box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
133
+ clip:rect(0px, 1000px, 1000px, -10px);
134
+ }
135
+
136
+ div.token-input-dropdown-mac p {
137
+ font-size: 8pt;
138
+ margin: 0;
139
+ padding: 0 5px;
140
+ font-style: italic;
141
+ color: #aaa;
142
+ }
143
+
144
+ div.token-input-dropdown-mac h3.token-input-dropdown-category-mac {
145
+ font-family: "Lucida Grande", Arial, serif;
146
+ font-size: 10pt;
147
+ font-weight: bold;
148
+ border: none;
149
+ padding: 0 5px;
150
+ margin: 0;
151
+ }
152
+
153
+ div.token-input-dropdown-mac ul {
154
+ margin: 0;
155
+ padding: 0;
156
+ }
157
+
158
+ div.token-input-dropdown-mac ul li {
159
+ list-style-type: none;
160
+ cursor: pointer;
161
+ background: none;
162
+ background-color: #fff;
163
+ margin: 0;
164
+ padding: 0 0 0 25px;
165
+ }
166
+
167
+ div.token-input-dropdown-mac ul li.token-input-dropdown-item-mac {
168
+ background-color: #fff;
169
+ }
170
+
171
+ div.token-input-dropdown-mac ul li.token-input-dropdown-item-mac.odd {
172
+ background-color: #ECF4F9;
173
+ border-radius: 15px;
174
+ -moz-border-radius: 15px;
175
+ -webkit-border-radius: 15px;
176
+ }
177
+
178
+ div.token-input-dropdown-mac ul li.token-input-dropdown-item-mac span.token-input-dropdown-item-description-mac {
179
+ float: right;
180
+ font-size: 8pt;
181
+ font-style: italic;
182
+ padding: 0 10px 0 0;
183
+ color: #999;
184
+ }
185
+
186
+ div.token-input-dropdown-mac ul li strong {
187
+ font-weight: bold;
188
+ text-decoration: underline;
189
+ font-style: none;
190
+ }
191
+
192
+ div.token-input-dropdown-mac ul li.token-input-selected-dropdown-item-mac,
193
+ div.token-input-dropdown-mac ul li.token-input-selected-dropdown-item-mac.odd {
194
+ background-color: #598bec;
195
+ color: #fff;
196
+ border-radius: 15px;
197
+ -moz-border-radius: 15px;
198
+ -webkit-border-radius: 15px;
199
+ }
200
+
201
+ div.token-input-dropdown-mac ul li.token-input-selected-dropdown-item-mac span.token-input-dropdown-item-description-mac,
202
+ div.token-input-dropdown-mac ul li.token-input-selected-dropdown-item-mac.odd span.token-input-dropdown-item-description-mac {
203
+ color: #fff;
204
+ }
@@ -0,0 +1,113 @@
1
+ /* Example tokeninput style #1: Token vertical list*/
2
+ ul.token-input-list {
3
+ overflow: hidden;
4
+ height: auto !important;
5
+ height: 1%;
6
+ width: 400px;
7
+ border: 1px solid #999;
8
+ cursor: text;
9
+ font-size: 12px;
10
+ font-family: Verdana;
11
+ z-index: 999;
12
+ margin: 0;
13
+ padding: 0;
14
+ background-color: #fff;
15
+ list-style-type: none;
16
+ clear: left;
17
+ }
18
+
19
+ ul.token-input-list li {
20
+ list-style-type: none;
21
+ }
22
+
23
+ ul.token-input-list li input {
24
+ border: 0;
25
+ width: 350px;
26
+ padding: 3px 8px;
27
+ background-color: white;
28
+ -webkit-appearance: caret;
29
+ }
30
+
31
+ li.token-input-token {
32
+ overflow: hidden;
33
+ height: auto !important;
34
+ height: 1%;
35
+ margin: 3px;
36
+ padding: 3px 5px;
37
+ background-color: #d0efa0;
38
+ color: #000;
39
+ font-weight: bold;
40
+ cursor: default;
41
+ display: block;
42
+ }
43
+
44
+ li.token-input-token p {
45
+ float: left;
46
+ padding: 0;
47
+ margin: 0;
48
+ }
49
+
50
+ li.token-input-token span {
51
+ float: right;
52
+ color: #777;
53
+ cursor: pointer;
54
+ }
55
+
56
+ li.token-input-selected-token {
57
+ background-color: #08844e;
58
+ color: #fff;
59
+ }
60
+
61
+ li.token-input-selected-token span {
62
+ color: #bbb;
63
+ }
64
+
65
+ div.token-input-dropdown {
66
+ position: absolute;
67
+ width: 400px;
68
+ background-color: #fff;
69
+ overflow: hidden;
70
+ border-left: 1px solid #ccc;
71
+ border-right: 1px solid #ccc;
72
+ border-bottom: 1px solid #ccc;
73
+ cursor: default;
74
+ font-size: 12px;
75
+ font-family: Verdana;
76
+ z-index: 1;
77
+ }
78
+
79
+ div.token-input-dropdown p {
80
+ margin: 0;
81
+ padding: 5px;
82
+ font-weight: bold;
83
+ color: #777;
84
+ }
85
+
86
+ div.token-input-dropdown ul {
87
+ margin: 0;
88
+ padding: 0;
89
+ }
90
+
91
+ div.token-input-dropdown ul li {
92
+ background-color: #fff;
93
+ padding: 3px;
94
+ list-style-type: none;
95
+ }
96
+
97
+ div.token-input-dropdown ul li.token-input-dropdown-item {
98
+ background-color: #fafafa;
99
+ }
100
+
101
+ div.token-input-dropdown ul li.token-input-dropdown-item2 {
102
+ background-color: #fff;
103
+ }
104
+
105
+ div.token-input-dropdown ul li em {
106
+ font-weight: bold;
107
+ font-style: normal;
108
+ }
109
+
110
+ div.token-input-dropdown ul li.token-input-selected-dropdown-item {
111
+ background-color: #d0efa0;
112
+ }
113
+
metadata ADDED
@@ -0,0 +1,131 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tokenizes
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Bastian Kruck
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-08-12 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &70312180490780 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70312180490780
25
+ - !ruby/object:Gem::Dependency
26
+ name: jquery-rails
27
+ requirement: &70312180488960 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70312180488960
36
+ - !ruby/object:Gem::Dependency
37
+ name: railties
38
+ requirement: &70312180487220 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '3.0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70312180487220
47
+ - !ruby/object:Gem::Dependency
48
+ name: thor
49
+ requirement: &70312180484580 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '0.14'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *70312180484580
58
+ - !ruby/object:Gem::Dependency
59
+ name: bundler
60
+ requirement: &70312180482440 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: 1.0.0
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *70312180482440
69
+ description: This gem provides the tokenizes(relation) method for Models to specify
70
+ their tokenized resources to create token-fields. It provides further a helper to
71
+ create tokenized tags
72
+ email:
73
+ - ich@bkruck.de
74
+ executables: []
75
+ extensions: []
76
+ extra_rdoc_files: []
77
+ files:
78
+ - .gitignore
79
+ - Gemfile
80
+ - MIT-LICENSE
81
+ - README.md
82
+ - Rakefile
83
+ - init.rb
84
+ - install.rb
85
+ - lib/generators/tokenizes/install/install_generator.rb
86
+ - lib/tokenizes.rb
87
+ - lib/tokenizes/rails/active_record/base.rb
88
+ - lib/tokenizes/rails/application_helper.rb
89
+ - lib/tokenizes/rails/railtie.rb
90
+ - pkg/tokenizes-0.1.gem
91
+ - test/test_helper.rb
92
+ - test/tokenizes_test.rb
93
+ - tokenizes.gemspec
94
+ - uninstall.rb
95
+ - vendor/assets/javascripts/jquery.min.js
96
+ - vendor/assets/javascripts/jquery.tokeninput.js
97
+ - vendor/assets/javascripts/tokenizes-ujs.js
98
+ - vendor/assets/stylesheets/token-input-facebook.css
99
+ - vendor/assets/stylesheets/token-input-mac.css
100
+ - vendor/assets/stylesheets/token-input.css
101
+ homepage: http://rubygems.org/gems/tokenizes
102
+ licenses: []
103
+ post_install_message:
104
+ rdoc_options: []
105
+ require_paths:
106
+ - lib
107
+ required_ruby_version: !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ! '>='
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ segments:
114
+ - 0
115
+ hash: -833309769667622490
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ! '>='
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ segments:
123
+ - 0
124
+ hash: -833309769667622490
125
+ requirements: []
126
+ rubyforge_project:
127
+ rubygems_version: 1.8.7
128
+ signing_key:
129
+ specification_version: 3
130
+ summary: Use jquery.token-input easily
131
+ test_files: []