brightcontent-core 2.0.33 → 2.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.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/app/assets/javascripts/brightcontent/brightcontent.js.erb +8 -0
  4. data/app/assets/javascripts/brightcontent/core.js.coffee +28 -0
  5. data/app/assets/javascripts/brightcontent/wysithtml5-parser-rules.js +519 -0
  6. data/app/assets/stylesheets/brightcontent/brightcontent.css.erb +10 -0
  7. data/app/assets/stylesheets/brightcontent/core.css.sass +61 -0
  8. data/app/assets/stylesheets/brightcontent/signin.css.sass +34 -0
  9. data/app/controllers/brightcontent/admin_users_controller.rb +1 -3
  10. data/app/controllers/brightcontent/application_controller.rb +12 -2
  11. data/app/controllers/brightcontent/base_controller.rb +7 -18
  12. data/app/controllers/brightcontent/sessions_controller.rb +1 -1
  13. data/app/helpers/brightcontent/application_helper.rb +4 -0
  14. data/app/helpers/brightcontent/base_helper.rb +6 -18
  15. data/app/helpers/brightcontent/translation_helper.rb +38 -0
  16. data/app/views/brightcontent/application/_menu.html.erb +9 -2
  17. data/app/views/brightcontent/application/_resource.html.erb +3 -0
  18. data/app/views/brightcontent/application/_show_flash_names.html.erb +2 -1
  19. data/app/views/brightcontent/application/_user_menu.html.erb +4 -0
  20. data/app/views/brightcontent/base/_form.html.erb +16 -11
  21. data/app/views/brightcontent/base/_list_actions.html.erb +2 -2
  22. data/app/views/brightcontent/base/_list_filters.html.erb +12 -0
  23. data/app/views/brightcontent/base/_list_header.html.erb +6 -0
  24. data/app/views/brightcontent/base/_list_item.html.erb +6 -0
  25. data/app/views/brightcontent/base/edit.html.erb +0 -2
  26. data/app/views/brightcontent/{fields → base/form_fields}/_file.html.erb +0 -0
  27. data/app/views/brightcontent/base/index.html.erb +9 -11
  28. data/app/views/brightcontent/base/list_fields/_boolean.html.erb +5 -0
  29. data/app/views/brightcontent/base/new.html.erb +0 -2
  30. data/app/views/brightcontent/sessions/new.html.erb +5 -11
  31. data/app/views/layouts/brightcontent/application.html.erb +34 -29
  32. data/bin/autospec +16 -0
  33. data/bin/rspec +16 -0
  34. data/brightcontent-core.gemspec +11 -6
  35. data/config/initializers/simple_form.rb +18 -15
  36. data/config/initializers/simple_form_bootstrap.rb +46 -30
  37. data/config/locales/brightcontent_core.en.yml +30 -0
  38. data/config/locales/brightcontent_core.nl.yml +30 -0
  39. data/config/routes.rb +1 -1
  40. data/db/migrate/20121206121725_create_brightcontent_admin_users.rb +1 -1
  41. data/lib/brightcontent/base_controller_ext/default_actions.rb +35 -0
  42. data/lib/brightcontent/base_controller_ext/fields.rb +36 -0
  43. data/lib/brightcontent/base_controller_ext/filtering.rb +21 -0
  44. data/lib/brightcontent/base_controller_ext/pagination.rb +29 -0
  45. data/lib/brightcontent/base_controller_ext.rb +8 -0
  46. data/lib/brightcontent/core.rb +24 -10
  47. data/lib/brightcontent/engine.rb +6 -0
  48. data/lib/brightcontent/resource.rb +15 -0
  49. data/lib/brightcontent/resources.rb +25 -0
  50. data/lib/brightcontent/routes_parser.rb +9 -17
  51. data/lib/brightcontent/view_lookup/abstract.rb +49 -0
  52. data/lib/brightcontent/view_lookup/filter_field.rb +57 -0
  53. data/lib/brightcontent/view_lookup/form_field.rb +14 -0
  54. data/lib/brightcontent/view_lookup/list_field.rb +13 -0
  55. data/lib/brightcontent/view_lookup.rb +8 -0
  56. data/lib/generators/brightcontent/templates/brightcontent_controller.rb +1 -1
  57. data/lib/generators/brightcontent/templates/initializer.rb +14 -2
  58. data/spec/dummy/app/controllers/brightcontent/blogs_controller.rb +1 -1
  59. data/spec/dummy/app/models/author.rb +7 -0
  60. data/spec/dummy/app/models/blog.rb +2 -1
  61. data/spec/dummy/config/application.rb +2 -6
  62. data/spec/dummy/config/environments/development.rb +1 -10
  63. data/spec/dummy/config/environments/production.rb +0 -4
  64. data/spec/dummy/config/environments/test.rb +2 -6
  65. data/spec/dummy/config/initializers/secret_token.rb +1 -1
  66. data/spec/dummy/db/migrate/20130720211920_create_comments.rb +0 -1
  67. data/spec/dummy/db/migrate/20140512085432_add_author_id_to_blogs.rb +5 -0
  68. data/spec/dummy/db/migrate/20140512090832_create_authors.rb +9 -0
  69. data/spec/dummy/db/schema.rb +19 -12
  70. data/spec/factories.rb +15 -0
  71. data/spec/features/login_spec.rb +3 -3
  72. data/spec/features/menu_spec.rb +2 -4
  73. data/spec/features/nested_resource_spec.rb +1 -1
  74. data/spec/features/resources_form_spec.rb +1 -3
  75. data/spec/features/resources_index_spec.rb +30 -6
  76. data/spec/helpers/brightcontent/translation_helper_spec.rb +27 -0
  77. data/spec/lib/brightcontent/model_extensions_spec.rb +1 -1
  78. data/spec/lib/brightcontent/resource_spec.rb +16 -0
  79. data/spec/lib/brightcontent/resources_spec.rb +67 -0
  80. data/spec/lib/brightcontent/routes_parser_spec.rb +4 -9
  81. data/spec/lib/brightcontent/view_lookup/abstract_spec.rb +40 -0
  82. metadata +159 -70
  83. data/app/assets/images/brightcontent/.gitkeep +0 -0
  84. data/app/assets/images/brightcontent/glyphicons-halflings-white.png +0 -0
  85. data/app/assets/images/brightcontent/glyphicons-halflings.png +0 -0
  86. data/app/assets/javascripts/brightcontent/attachments.js +0 -0
  87. data/app/assets/javascripts/brightcontent/bootstrap.min.js +0 -6
  88. data/app/assets/javascripts/brightcontent/brightcontent.js +0 -21
  89. data/app/assets/javascripts/brightcontent/main.js +0 -26
  90. data/app/assets/javascripts/brightcontent/pages.js +0 -0
  91. data/app/assets/stylesheets/brightcontent/attachments.css +0 -0
  92. data/app/assets/stylesheets/brightcontent/bootstrap-responsive.min.css +0 -9
  93. data/app/assets/stylesheets/brightcontent/bootstrap.min.css +0 -9
  94. data/app/assets/stylesheets/brightcontent/brightcontent.css +0 -19
  95. data/app/assets/stylesheets/brightcontent/main.css +0 -95
  96. data/app/assets/stylesheets/brightcontent/pages.css +0 -0
  97. data/app/views/brightcontent/base/_index_top.html.erb +0 -0
  98. data/app/views/brightcontent/base/_list.html.erb +0 -8
  99. data/app/views/brightcontent/base/_scope_filters.html.erb +0 -9
  100. data/config/initializers/will_paginate.rb +0 -28
  101. data/config/locales/brightcontent.en.yml +0 -10
  102. data/config/locales/brightcontent.nl.yml +0 -10
  103. data/lib/brightcontent/default_actions.rb +0 -28
  104. data/lib/brightcontent/pagination.rb +0 -28
  105. data/spec/features/scope_spec.rb +0 -27
metadata CHANGED
@@ -1,209 +1,279 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightcontent-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.33
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Developers at Brightin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-07 00:00:00.000000000 Z
11
+ date: 2014-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.13
19
+ version: 4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.2.13
26
+ version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: jquery-rails
28
+ name: bcrypt-ruby
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: bcrypt-ruby
42
+ name: bootstrap-sass
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.0
47
+ version: '3.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.0.0
54
+ version: '3.1'
55
55
  - !ruby/object:Gem::Dependency
56
- name: inherited_resources
56
+ name: bootstrap-wysihtml5-rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: coffee-rails
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - '>='
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
75
  version: '0'
62
76
  type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - '>='
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
- name: has_scope
84
+ name: inherited_resources
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - '>='
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 1.4.1
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 1.4.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: jquery-rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
74
102
  - !ruby/object:Gem::Version
75
103
  version: '0'
76
104
  type: :runtime
77
105
  prerelease: false
78
106
  version_requirements: !ruby/object:Gem::Requirement
79
107
  requirements:
80
- - - '>='
108
+ - - ">="
81
109
  - !ruby/object:Gem::Version
82
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: sass-rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: 4.0.2
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 4.0.2
83
125
  - !ruby/object:Gem::Dependency
84
126
  name: simple_form
85
127
  requirement: !ruby/object:Gem::Requirement
86
128
  requirements:
87
- - - '>='
129
+ - - ">="
88
130
  - !ruby/object:Gem::Version
89
131
  version: '0'
90
132
  type: :runtime
91
133
  prerelease: false
92
134
  version_requirements: !ruby/object:Gem::Requirement
93
135
  requirements:
94
- - - '>='
136
+ - - ">="
95
137
  - !ruby/object:Gem::Version
96
138
  version: '0'
97
139
  - !ruby/object:Gem::Dependency
98
140
  name: will_paginate
99
141
  requirement: !ruby/object:Gem::Requirement
100
142
  requirements:
101
- - - '>='
143
+ - - ">="
102
144
  - !ruby/object:Gem::Version
103
145
  version: '0'
104
146
  type: :runtime
105
147
  prerelease: false
106
148
  version_requirements: !ruby/object:Gem::Requirement
107
149
  requirements:
108
- - - '>='
150
+ - - ">="
109
151
  - !ruby/object:Gem::Version
110
152
  version: '0'
111
153
  - !ruby/object:Gem::Dependency
112
- name: bootstrap-wysihtml5-rails
154
+ name: will_paginate-bootstrap
113
155
  requirement: !ruby/object:Gem::Requirement
114
156
  requirements:
115
- - - '>='
157
+ - - ">="
116
158
  - !ruby/object:Gem::Version
117
159
  version: '0'
118
160
  type: :runtime
119
161
  prerelease: false
120
162
  version_requirements: !ruby/object:Gem::Requirement
121
163
  requirements:
122
- - - '>='
164
+ - - ">="
123
165
  - !ruby/object:Gem::Version
124
166
  version: '0'
125
167
  - !ruby/object:Gem::Dependency
126
- name: strong_parameters
168
+ name: ransack
127
169
  requirement: !ruby/object:Gem::Requirement
128
170
  requirements:
129
- - - '>='
171
+ - - "~>"
130
172
  - !ruby/object:Gem::Version
131
- version: '0'
173
+ version: '1.1'
132
174
  type: :runtime
133
175
  prerelease: false
134
176
  version_requirements: !ruby/object:Gem::Requirement
135
177
  requirements:
136
- - - '>='
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '1.1'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rake
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
137
193
  - !ruby/object:Gem::Version
138
194
  version: '0'
139
195
  - !ruby/object:Gem::Dependency
140
196
  name: sqlite3
141
197
  requirement: !ruby/object:Gem::Requirement
142
198
  requirements:
143
- - - '>='
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: rspec
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
144
214
  - !ruby/object:Gem::Version
145
215
  version: '0'
146
216
  type: :development
147
217
  prerelease: false
148
218
  version_requirements: !ruby/object:Gem::Requirement
149
219
  requirements:
150
- - - '>='
220
+ - - ">="
151
221
  - !ruby/object:Gem::Version
152
222
  version: '0'
153
223
  - !ruby/object:Gem::Dependency
154
224
  name: rspec-rails
155
225
  requirement: !ruby/object:Gem::Requirement
156
226
  requirements:
157
- - - '>='
227
+ - - ">="
158
228
  - !ruby/object:Gem::Version
159
229
  version: '0'
160
230
  type: :development
161
231
  prerelease: false
162
232
  version_requirements: !ruby/object:Gem::Requirement
163
233
  requirements:
164
- - - '>='
234
+ - - ">="
165
235
  - !ruby/object:Gem::Version
166
236
  version: '0'
167
237
  - !ruby/object:Gem::Dependency
168
238
  name: capybara
169
239
  requirement: !ruby/object:Gem::Requirement
170
240
  requirements:
171
- - - '>='
241
+ - - ">="
172
242
  - !ruby/object:Gem::Version
173
243
  version: '0'
174
244
  type: :development
175
245
  prerelease: false
176
246
  version_requirements: !ruby/object:Gem::Requirement
177
247
  requirements:
178
- - - '>='
248
+ - - ">="
179
249
  - !ruby/object:Gem::Version
180
250
  version: '0'
181
251
  - !ruby/object:Gem::Dependency
182
252
  name: launchy
183
253
  requirement: !ruby/object:Gem::Requirement
184
254
  requirements:
185
- - - '>='
255
+ - - ">="
186
256
  - !ruby/object:Gem::Version
187
257
  version: '0'
188
258
  type: :development
189
259
  prerelease: false
190
260
  version_requirements: !ruby/object:Gem::Requirement
191
261
  requirements:
192
- - - '>='
262
+ - - ">="
193
263
  - !ruby/object:Gem::Version
194
264
  version: '0'
195
265
  - !ruby/object:Gem::Dependency
196
266
  name: factory_girl_rails
197
267
  requirement: !ruby/object:Gem::Requirement
198
268
  requirements:
199
- - - '>='
269
+ - - ">="
200
270
  - !ruby/object:Gem::Version
201
271
  version: '0'
202
272
  type: :development
203
273
  prerelease: false
204
274
  version_requirements: !ruby/object:Gem::Requirement
205
275
  requirements:
206
- - - '>='
276
+ - - ">="
207
277
  - !ruby/object:Gem::Version
208
278
  version: '0'
209
279
  description: Brightcontent core
@@ -212,62 +282,69 @@ executables: []
212
282
  extensions: []
213
283
  extra_rdoc_files: []
214
284
  files:
215
- - .gitignore
285
+ - ".gitignore"
216
286
  - Gemfile
217
287
  - Rakefile
218
- - app/assets/images/brightcontent/.gitkeep
219
- - app/assets/images/brightcontent/glyphicons-halflings-white.png
220
- - app/assets/images/brightcontent/glyphicons-halflings.png
221
- - app/assets/javascripts/brightcontent/attachments.js
222
- - app/assets/javascripts/brightcontent/bootstrap.min.js
223
- - app/assets/javascripts/brightcontent/brightcontent.js
288
+ - app/assets/javascripts/brightcontent/brightcontent.js.erb
289
+ - app/assets/javascripts/brightcontent/core.js.coffee
224
290
  - app/assets/javascripts/brightcontent/custom.js
225
- - app/assets/javascripts/brightcontent/main.js
226
- - app/assets/javascripts/brightcontent/pages.js
227
- - app/assets/stylesheets/brightcontent/attachments.css
228
- - app/assets/stylesheets/brightcontent/bootstrap-responsive.min.css
229
- - app/assets/stylesheets/brightcontent/bootstrap.min.css
230
- - app/assets/stylesheets/brightcontent/brightcontent.css
291
+ - app/assets/javascripts/brightcontent/wysithtml5-parser-rules.js
292
+ - app/assets/stylesheets/brightcontent/brightcontent.css.erb
293
+ - app/assets/stylesheets/brightcontent/core.css.sass
231
294
  - app/assets/stylesheets/brightcontent/custom.css
232
- - app/assets/stylesheets/brightcontent/main.css
233
- - app/assets/stylesheets/brightcontent/pages.css
295
+ - app/assets/stylesheets/brightcontent/signin.css.sass
234
296
  - app/controllers/brightcontent/admin_users_controller.rb
235
297
  - app/controllers/brightcontent/application_controller.rb
236
298
  - app/controllers/brightcontent/base_controller.rb
237
299
  - app/controllers/brightcontent/sessions_controller.rb
238
300
  - app/helpers/brightcontent/application_helper.rb
239
301
  - app/helpers/brightcontent/base_helper.rb
302
+ - app/helpers/brightcontent/translation_helper.rb
240
303
  - app/models/brightcontent/admin_user.rb
241
304
  - app/views/brightcontent/application/_menu.html.erb
305
+ - app/views/brightcontent/application/_resource.html.erb
242
306
  - app/views/brightcontent/application/_show_flash_names.html.erb
307
+ - app/views/brightcontent/application/_user_menu.html.erb
243
308
  - app/views/brightcontent/base/_form.html.erb
244
- - app/views/brightcontent/base/_index_top.html.erb
245
- - app/views/brightcontent/base/_list.html.erb
246
309
  - app/views/brightcontent/base/_list_actions.html.erb
247
- - app/views/brightcontent/base/_scope_filters.html.erb
310
+ - app/views/brightcontent/base/_list_filters.html.erb
311
+ - app/views/brightcontent/base/_list_header.html.erb
312
+ - app/views/brightcontent/base/_list_item.html.erb
248
313
  - app/views/brightcontent/base/edit.html.erb
314
+ - app/views/brightcontent/base/form_fields/_file.html.erb
249
315
  - app/views/brightcontent/base/index.csv.erb
250
316
  - app/views/brightcontent/base/index.html.erb
317
+ - app/views/brightcontent/base/list_fields/_boolean.html.erb
251
318
  - app/views/brightcontent/base/new.html.erb
252
- - app/views/brightcontent/fields/_file.html.erb
253
319
  - app/views/brightcontent/sessions/new.html.erb
254
320
  - app/views/layouts/brightcontent/application.html.erb
321
+ - bin/autospec
322
+ - bin/rspec
255
323
  - brightcontent-core.gemspec
256
324
  - config/initializers/simple_form.rb
257
325
  - config/initializers/simple_form_bootstrap.rb
258
- - config/initializers/will_paginate.rb
259
- - config/locales/brightcontent.en.yml
260
- - config/locales/brightcontent.nl.yml
326
+ - config/locales/brightcontent_core.en.yml
327
+ - config/locales/brightcontent_core.nl.yml
261
328
  - config/routes.rb
262
329
  - db/migrate/20121206121725_create_brightcontent_admin_users.rb
263
330
  - lib/brightcontent-core.rb
331
+ - lib/brightcontent/base_controller_ext.rb
332
+ - lib/brightcontent/base_controller_ext/default_actions.rb
333
+ - lib/brightcontent/base_controller_ext/fields.rb
334
+ - lib/brightcontent/base_controller_ext/filtering.rb
335
+ - lib/brightcontent/base_controller_ext/pagination.rb
264
336
  - lib/brightcontent/core.rb
265
- - lib/brightcontent/default_actions.rb
266
337
  - lib/brightcontent/engine.rb
267
338
  - lib/brightcontent/model_extensions.rb
268
- - lib/brightcontent/pagination.rb
269
339
  - lib/brightcontent/rails/routes.rb
340
+ - lib/brightcontent/resource.rb
341
+ - lib/brightcontent/resources.rb
270
342
  - lib/brightcontent/routes_parser.rb
343
+ - lib/brightcontent/view_lookup.rb
344
+ - lib/brightcontent/view_lookup/abstract.rb
345
+ - lib/brightcontent/view_lookup/filter_field.rb
346
+ - lib/brightcontent/view_lookup/form_field.rb
347
+ - lib/brightcontent/view_lookup/list_field.rb
271
348
  - lib/generators/brightcontent/install_generator.rb
272
349
  - lib/generators/brightcontent/resource_generator.rb
273
350
  - lib/generators/brightcontent/templates/brightcontent_controller.rb
@@ -286,6 +363,7 @@ files:
286
363
  - spec/dummy/app/helpers/application_helper.rb
287
364
  - spec/dummy/app/mailers/.gitkeep
288
365
  - spec/dummy/app/models/.gitkeep
366
+ - spec/dummy/app/models/author.rb
289
367
  - spec/dummy/app/models/blog.rb
290
368
  - spec/dummy/app/models/comment.rb
291
369
  - spec/dummy/app/views/layouts/application.html.erb
@@ -311,6 +389,8 @@ files:
311
389
  - spec/dummy/db/migrate/20121206225720_create_blogs.rb
312
390
  - spec/dummy/db/migrate/20121223131824_add_featured_to_blog.rb
313
391
  - spec/dummy/db/migrate/20130720211920_create_comments.rb
392
+ - spec/dummy/db/migrate/20140512085432_add_author_id_to_blogs.rb
393
+ - spec/dummy/db/migrate/20140512090832_create_authors.rb
314
394
  - spec/dummy/db/schema.rb
315
395
  - spec/dummy/lib/assets/.gitkeep
316
396
  - spec/dummy/public/404.html
@@ -327,9 +407,12 @@ files:
327
407
  - spec/features/nested_resource_spec.rb
328
408
  - spec/features/resources_form_spec.rb
329
409
  - spec/features/resources_index_spec.rb
330
- - spec/features/scope_spec.rb
410
+ - spec/helpers/brightcontent/translation_helper_spec.rb
331
411
  - spec/lib/brightcontent/model_extensions_spec.rb
412
+ - spec/lib/brightcontent/resource_spec.rb
413
+ - spec/lib/brightcontent/resources_spec.rb
332
414
  - spec/lib/brightcontent/routes_parser_spec.rb
415
+ - spec/lib/brightcontent/view_lookup/abstract_spec.rb
333
416
  - spec/spec_helper.rb
334
417
  - spec/support/acceptance_helper.rb
335
418
  homepage: http://brightin.nl
@@ -341,17 +424,17 @@ require_paths:
341
424
  - lib
342
425
  required_ruby_version: !ruby/object:Gem::Requirement
343
426
  requirements:
344
- - - '>='
427
+ - - ">="
345
428
  - !ruby/object:Gem::Version
346
429
  version: '0'
347
430
  required_rubygems_version: !ruby/object:Gem::Requirement
348
431
  requirements:
349
- - - '>='
432
+ - - ">="
350
433
  - !ruby/object:Gem::Version
351
434
  version: '0'
352
435
  requirements: []
353
436
  rubyforge_project:
354
- rubygems_version: 2.0.2
437
+ rubygems_version: 2.2.2
355
438
  signing_key:
356
439
  specification_version: 4
357
440
  summary: Brightcontent core
@@ -369,6 +452,7 @@ test_files:
369
452
  - spec/dummy/app/helpers/application_helper.rb
370
453
  - spec/dummy/app/mailers/.gitkeep
371
454
  - spec/dummy/app/models/.gitkeep
455
+ - spec/dummy/app/models/author.rb
372
456
  - spec/dummy/app/models/blog.rb
373
457
  - spec/dummy/app/models/comment.rb
374
458
  - spec/dummy/app/views/layouts/application.html.erb
@@ -394,6 +478,8 @@ test_files:
394
478
  - spec/dummy/db/migrate/20121206225720_create_blogs.rb
395
479
  - spec/dummy/db/migrate/20121223131824_add_featured_to_blog.rb
396
480
  - spec/dummy/db/migrate/20130720211920_create_comments.rb
481
+ - spec/dummy/db/migrate/20140512085432_add_author_id_to_blogs.rb
482
+ - spec/dummy/db/migrate/20140512090832_create_authors.rb
397
483
  - spec/dummy/db/schema.rb
398
484
  - spec/dummy/lib/assets/.gitkeep
399
485
  - spec/dummy/public/404.html
@@ -410,8 +496,11 @@ test_files:
410
496
  - spec/features/nested_resource_spec.rb
411
497
  - spec/features/resources_form_spec.rb
412
498
  - spec/features/resources_index_spec.rb
413
- - spec/features/scope_spec.rb
499
+ - spec/helpers/brightcontent/translation_helper_spec.rb
414
500
  - spec/lib/brightcontent/model_extensions_spec.rb
501
+ - spec/lib/brightcontent/resource_spec.rb
502
+ - spec/lib/brightcontent/resources_spec.rb
415
503
  - spec/lib/brightcontent/routes_parser_spec.rb
504
+ - spec/lib/brightcontent/view_lookup/abstract_spec.rb
416
505
  - spec/spec_helper.rb
417
506
  - spec/support/acceptance_helper.rb
File without changes
File without changes
@@ -1,6 +0,0 @@
1
- /*!
2
- * Bootstrap.js by @fat & @mdo
3
- * Copyright 2012 Twitter, Inc.
4
- * http://www.apache.org/licenses/LICENSE-2.0.txt
5
- */
6
- !function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0]});if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(document).on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<r.length-1&&a++,~a||(a=0),r.eq(a).focus()}},e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e(document).on("click.dropdown.data-api touchstart.dropdown.data-api",r).on("click.dropdown touchstart.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(e){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.offset(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.detach(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);n[n.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!1}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
@@ -1,21 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // the compiled file.
9
- //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
12
- //
13
- //= require jquery
14
- //= require jquery-ui
15
- //= require jquery_ujs
16
- //= require bootstrap-wysihtml5
17
- //= require bootstrap-wysihtml5/locales/nl-NL
18
- //= require brightcontent/attachments
19
- //= require brightcontent/pages
20
- //= require brightcontent/custom
21
- //= require_tree .
@@ -1,26 +0,0 @@
1
- $(document).ready(function(){
2
- $('textarea[name*="content"], textarea[name*="body"], textarea[name*="editor"]').each(function(i, elem) {
3
- $(elem).wysihtml5({
4
- html: true,
5
- locale: "nl-NL",
6
- parserRules: wysihtml5ParserRules,
7
- "events": {
8
- "load": function() {
9
- editor = $('#insertable').data("wysihtml5").editor;
10
- editor.focus();
11
- }
12
- }
13
- });
14
- });
15
-
16
- $("#attachments").on("click", ".insert_image", function(e){
17
- e.preventDefault();
18
- editor.composer.commands.exec("insertImage", { src: $(this).data("insertImage") });
19
- });
20
-
21
- $("#attachments").on("click", ".insert_link", function(e){
22
- e.preventDefault();
23
- editor.composer.commands.exec("createLink", { href: $(this).data("insertUrl"), target: "_blank", rel: "nofollow", text: $(this).data("insertName") });
24
- });
25
-
26
- });
File without changes
File without changes