talkie 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -0
  3. data/README.md +25 -0
  4. data/app/assets/javascripts/talkie/application.js +6 -0
  5. data/app/assets/javascripts/talkie/talkie.mentions.js +25 -0
  6. data/app/assets/stylesheets/talkie/_form.scss +7 -1
  7. data/app/assets/stylesheets/talkie/_variables.scss +6 -1
  8. data/app/assets/stylesheets/talkie/application.scss +2 -0
  9. data/app/blueprints/mentionees_blueprint.rb +15 -0
  10. data/app/controllers/talkie/comments_controller.rb +3 -1
  11. data/app/controllers/talkie/mentions_controller.rb +24 -0
  12. data/app/mailers/talkie/notifications_mailer.rb +15 -0
  13. data/app/models/concerns/talkie/mentionable.rb +55 -0
  14. data/app/models/talkie/comment.rb +6 -0
  15. data/app/models/talkie/subscription.rb +11 -0
  16. data/app/views/talkie/comments/_comment.html.erb +7 -3
  17. data/app/views/talkie/comments/_form.html.erb +6 -2
  18. data/app/views/talkie/notifications_mailer/mentioned.html.erb +15 -0
  19. data/app/views/talkie/notifications_mailer/mentioned.text.erb +5 -0
  20. data/config/locales/en.yml +8 -0
  21. data/config/locales/es.yml +8 -0
  22. data/config/routes.rb +4 -0
  23. data/lib/generators/talkie/templates/create_talkie_comments.rb +14 -0
  24. data/lib/generators/talkie/templates/talkie.rb +28 -1
  25. data/lib/generators/talkie/views_generator.rb +15 -0
  26. data/lib/talkie/acts_as_talker.rb +7 -0
  27. data/lib/talkie/blueprinter.rb +5 -0
  28. data/lib/talkie/nil_mention_tokens.rb +18 -0
  29. data/lib/talkie/permission.rb +3 -3
  30. data/lib/talkie/subscription_error.rb +6 -0
  31. data/lib/talkie/version.rb +1 -1
  32. data/lib/talkie.rb +28 -0
  33. data/talkie.gemspec +2 -0
  34. data/vendor/assets/javascripts/jquery.elastic.js +151 -0
  35. data/vendor/assets/javascripts/jquery.mentionsinput.js +543 -0
  36. data/vendor/assets/javascripts/underscore.js +1590 -0
  37. data/vendor/assets/stylesheets/jquery.mentionsinput.css +112 -0
  38. metadata +46 -2
@@ -0,0 +1,112 @@
1
+ .mentions-input-box {
2
+ position: relative;
3
+ background: #fff;
4
+ }
5
+
6
+ .mentions-input-box textarea {
7
+ overflow: hidden;
8
+ position: relative;
9
+ resize: none;
10
+
11
+ -webkit-box-sizing: border-box;
12
+ -moz-box-sizing: border-box;
13
+ box-sizing: border-box;
14
+ }
15
+
16
+ .mentions-input-box .mentions-autocomplete-list {
17
+ display: none;
18
+ background: #fff;
19
+ border: 1px solid #b2b2b2;
20
+ position: absolute;
21
+ left: 0;
22
+ right: 0;
23
+ z-index: 10000;
24
+ margin-top: -2px;
25
+
26
+ border-radius:5px;
27
+ border-top-right-radius:0;
28
+ border-top-left-radius:0;
29
+
30
+ -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.148438);
31
+ -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.148438);
32
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.148438);
33
+ }
34
+
35
+ .mentions-input-box .mentions-autocomplete-list ul {
36
+ margin: 0;
37
+ padding: 0;
38
+ }
39
+
40
+ .mentions-input-box .mentions-autocomplete-list li {
41
+ background-color: #fff;
42
+ padding: 0 5px;
43
+ margin: 0;
44
+ width: auto;
45
+ border-bottom: 1px solid #eee;
46
+ height: 26px;
47
+ line-height: 26px;
48
+ overflow: hidden;
49
+ cursor: pointer;
50
+ list-style: none;
51
+ white-space: nowrap;
52
+ }
53
+
54
+ .mentions-input-box .mentions-autocomplete-list li:last-child {
55
+ border-radius:5px;
56
+ }
57
+
58
+ .mentions-input-box .mentions-autocomplete-list li > img,
59
+ .mentions-input-box .mentions-autocomplete-list li > div.icon {
60
+ width: 16px;
61
+ height: 16px;
62
+ float: left;
63
+ margin-top:5px;
64
+ margin-right: 5px;
65
+ -moz-background-origin:3px;
66
+
67
+ border-radius:3px;
68
+ }
69
+
70
+ .mentions-input-box .mentions-autocomplete-list li em {
71
+ font-weight: bold;
72
+ font-style: none;
73
+ }
74
+
75
+ .mentions-input-box .mentions-autocomplete-list li:hover,
76
+ .mentions-input-box .mentions-autocomplete-list li.active {
77
+ background-color: #f2f2f2;
78
+ }
79
+
80
+ .mentions-input-box .mentions-autocomplete-list li b {
81
+ background: #ffff99;
82
+ font-weight: normal;
83
+ }
84
+
85
+ .mentions-input-box .mentions {
86
+ position: absolute;
87
+ left: 1px;
88
+ right: 0;
89
+ top: 1px;
90
+ bottom: 0;
91
+ padding: 9px;
92
+ color: #fff;
93
+ overflow: hidden;
94
+
95
+ white-space: pre-wrap;
96
+ word-wrap: break-word;
97
+ }
98
+
99
+ .mentions-input-box .mentions > div {
100
+ color: #fff;
101
+ white-space: pre-wrap;
102
+ width: 100%;
103
+ }
104
+
105
+ .mentions-input-box .mentions > div > strong {
106
+ font-weight:normal;
107
+ background: #d8dfea;
108
+ }
109
+
110
+ .mentions-input-box .mentions > div > strong > span {
111
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
112
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: talkie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abraham Kuri
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-01 00:00:00.000000000 Z
11
+ date: 2019-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ammeter
@@ -178,6 +178,34 @@ dependencies:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '3.1'
181
+ - !ruby/object:Gem::Dependency
182
+ name: blueprinter
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: 0.18.0
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: 0.18.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: oj
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '3.17'
202
+ type: :runtime
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '3.17'
181
209
  description: A Rails Engine to easily integrate comments to any model. Provides views
182
210
  and helpful generators
183
211
  email:
@@ -197,17 +225,25 @@ files:
197
225
  - README.md
198
226
  - Rakefile
199
227
  - app/assets/javascripts/talkie/application.js
228
+ - app/assets/javascripts/talkie/talkie.mentions.js
200
229
  - app/assets/stylesheets/talkie/_comment.scss
201
230
  - app/assets/stylesheets/talkie/_form.scss
202
231
  - app/assets/stylesheets/talkie/_variables.scss
203
232
  - app/assets/stylesheets/talkie/application.scss
233
+ - app/blueprints/mentionees_blueprint.rb
204
234
  - app/controllers/talkie/comments_controller.rb
235
+ - app/controllers/talkie/mentions_controller.rb
205
236
  - app/controllers/talkie_controller.rb
206
237
  - app/helpers/talkie/application_helper.rb
238
+ - app/mailers/talkie/notifications_mailer.rb
239
+ - app/models/concerns/talkie/mentionable.rb
207
240
  - app/models/talkie/comment.rb
241
+ - app/models/talkie/subscription.rb
208
242
  - app/views/talkie/comments/_comment.html.erb
209
243
  - app/views/talkie/comments/_form.html.erb
210
244
  - app/views/talkie/comments/_template.html.erb
245
+ - app/views/talkie/notifications_mailer/mentioned.html.erb
246
+ - app/views/talkie/notifications_mailer/mentioned.text.erb
211
247
  - bin/console
212
248
  - bin/setup
213
249
  - config/locales/en.yml
@@ -216,16 +252,24 @@ files:
216
252
  - lib/generators/talkie/install_generator.rb
217
253
  - lib/generators/talkie/templates/create_talkie_comments.rb
218
254
  - lib/generators/talkie/templates/talkie.rb
255
+ - lib/generators/talkie/views_generator.rb
219
256
  - lib/talkie.rb
220
257
  - lib/talkie/acts_as_commentable.rb
221
258
  - lib/talkie/acts_as_talker.rb
259
+ - lib/talkie/blueprinter.rb
222
260
  - lib/talkie/comments_renderer.rb
223
261
  - lib/talkie/controller.rb
224
262
  - lib/talkie/engine.rb
263
+ - lib/talkie/nil_mention_tokens.rb
225
264
  - lib/talkie/permission.rb
226
265
  - lib/talkie/renderer_helper.rb
266
+ - lib/talkie/subscription_error.rb
227
267
  - lib/talkie/version.rb
228
268
  - talkie.gemspec
269
+ - vendor/assets/javascripts/jquery.elastic.js
270
+ - vendor/assets/javascripts/jquery.mentionsinput.js
271
+ - vendor/assets/javascripts/underscore.js
272
+ - vendor/assets/stylesheets/jquery.mentionsinput.css
229
273
  homepage: https://github.com/kurenn/talkie
230
274
  licenses:
231
275
  - MIT