locomotivecms 3.0.0.rc2 → 3.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/README.md +2 -1
- data/app/api/locomotive/api/entities/site_entity.rb +8 -0
- data/app/api/locomotive/api/exception_rescuers.rb +1 -1
- data/app/api/locomotive/api/forms/content_entry_form.rb +4 -3
- data/app/api/locomotive/api/helpers/params_helper.rb +21 -3
- data/app/api/locomotive/api/resources/current_site_resource.rb +1 -1
- data/app/api/locomotive/api/resources/site_resource.rb +2 -2
- data/app/assets/images/locomotive/deadend.png +0 -0
- data/app/assets/javascripts/locomotive/not_logged_in.js.coffee +1 -1
- data/app/assets/javascripts/locomotive/utils/core_ext.js +1 -1
- data/app/assets/javascripts/locomotive/utils/wysihtml5.js.coffee +43 -17
- data/app/assets/javascripts/locomotive/views/application_view.js.coffee +5 -1
- data/app/assets/javascripts/locomotive/views/editable_elements/edit_view.js.coffee +47 -0
- data/app/assets/javascripts/locomotive/views/editable_elements/iframe_view.js.coffee +59 -0
- data/app/assets/javascripts/locomotive/views/editable_elements/index_view.js.coffee +19 -92
- data/app/assets/javascripts/locomotive/views/editable_elements/page_view.js.coffee +81 -0
- data/app/assets/javascripts/locomotive/views/editable_elements/text_highlighter_view.js.coffee +76 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte/edit_table_view.js.coffee +35 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte/file_view.js.coffee +14 -10
- data/app/assets/javascripts/locomotive/views/inputs/rte/link_view.js.coffee +25 -15
- data/app/assets/javascripts/locomotive/views/inputs/rte/table_view.js.coffee +82 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte_view.js.coffee.erb +64 -23
- data/app/assets/javascripts/locomotive/views/inputs/text_view.js.coffee +11 -6
- data/app/assets/javascripts/locomotive.js +2 -2
- data/app/assets/stylesheets/locomotive/application.scss +1 -3
- data/app/assets/stylesheets/locomotive/base/_form.scss +2 -1
- data/app/assets/stylesheets/locomotive/base/_typography.scss +3 -2
- data/app/assets/stylesheets/locomotive/base/form/_base.scss +5 -0
- data/app/assets/stylesheets/locomotive/base/form/_rte.scss +42 -0
- data/app/assets/stylesheets/locomotive/error.scss +1 -1
- data/app/assets/stylesheets/locomotive/globals/_mixins.scss +41 -48
- data/app/assets/stylesheets/locomotive/globals/_variables.scss +202 -121
- data/app/assets/stylesheets/locomotive/layouts/_not_logged_in.scss +8 -9
- data/app/assets/stylesheets/locomotive/live_editing_error.scss +19 -0
- data/app/assets/stylesheets/locomotive/live_editing_iframe.scss +84 -0
- data/app/assets/stylesheets/locomotive/unauthorized/_forms.scss +63 -0
- data/app/assets/stylesheets/locomotive/unauthorized/_keyframes.scss +31 -0
- data/app/assets/stylesheets/locomotive/unauthorized/_notify.scss +85 -0
- data/app/assets/stylesheets/locomotive/unauthorized/_public.scss +129 -0
- data/app/assets/stylesheets/locomotive/unauthorized/_type.scss +14 -0
- data/app/assets/stylesheets/locomotive/unauthorized/_variables.scss +54 -0
- data/app/assets/stylesheets/locomotive/unauthorized.scss +34 -0
- data/app/helpers/locomotive/dashboard_helper.rb +1 -1
- data/app/inputs/locomotive/rte_input.rb +12 -0
- data/app/models/locomotive/concerns/page/editable_elements.rb +0 -2
- data/app/models/locomotive/editable_element.rb +1 -1
- data/app/services/locomotive/content_asset_service.rb +1 -1
- data/app/services/locomotive/page_parsing_service.rb +4 -2
- data/app/views/locomotive/editable_elements/index.html.slim +1 -1
- data/app/views/locomotive/layouts/not_logged_in.html.slim +13 -9
- data/app/views/locomotive/passwords/edit.html.slim +13 -13
- data/app/views/locomotive/passwords/new.html.slim +14 -11
- data/app/views/locomotive/registrations/new.html.slim +14 -13
- data/app/views/locomotive/sessions/new.html.slim +14 -13
- data/app/views/locomotive/shared/rte/_markdown_toolbar.html.slim +0 -30
- data/app/views/locomotive/shared/rte/_table_popover.html.slim +17 -0
- data/app/views/locomotive/shared/rte/_toolbar.html.slim +48 -11
- data/config/initializers/simple_form.rb +2 -0
- data/config/locales/carrierwave.lt.yml +4 -0
- data/config/locales/carrierwave.nl.yml +4 -0
- data/config/locales/carrierwave.ru.yml +4 -0
- data/config/locales/default.nl.yml +13 -0
- data/config/locales/devise.nl.yml +61 -0
- data/config/locales/en.yml +28 -10
- data/config/locales/flash.nl.yml +79 -0
- data/config/locales/inputs.lt.yml +18 -0
- data/config/locales/inputs.nl.yml +18 -0
- data/config/locales/mongoid.nl.yml +47 -0
- data/config/locales/nl.yml +316 -0
- data/config/locales/simple_form.en.yml +6 -0
- data/config/locales/simple_form.nl.yml +148 -0
- data/lib/locomotive/carrierwave/asset.rb +5 -1
- data/lib/locomotive/dependencies.rb +0 -1
- data/lib/locomotive/engine.rb +7 -1
- data/lib/locomotive/middlewares/site.rb +14 -2
- data/lib/locomotive/mongoid/patches.rb +29 -0
- data/lib/locomotive/steam/middlewares/catch_error.rb +78 -0
- data/lib/locomotive/steam/middlewares/wysihtml_css.rb +32 -0
- data/lib/locomotive/steam_adaptor.rb +4 -7
- data/lib/locomotive/version.rb +1 -1
- data/spec/requests/locomotive/steam/cache_spec.rb +3 -3
- data/spec/requests/locomotive/steam/wysihtml_css_spec.rb +42 -0
- data/spec/requests/site_spec.rb +13 -2
- data/spec/support/features/session_helpers.rb +3 -3
- data/vendor/assets/components/locomotive/backbone/backbone.js +1894 -0
- data/vendor/assets/components/locomotive/underscore/underscore.js +1548 -0
- data/vendor/assets/components/locomotive_sources/backbone/LICENSE +22 -0
- data/vendor/assets/components/locomotive_sources/backbone/backbone-min.js +2 -0
- data/vendor/assets/components/locomotive_sources/backbone/backbone-min.map +1 -0
- data/vendor/assets/components/locomotive_sources/backbone/backbone.js +1894 -0
- data/vendor/assets/components/locomotive_sources/backbone/bower.json +8 -0
- data/vendor/assets/components/locomotive_sources/underscore/LICENSE +23 -0
- data/vendor/assets/components/locomotive_sources/underscore/README.md +22 -0
- data/vendor/assets/components/locomotive_sources/underscore/bower.json +7 -0
- data/vendor/assets/components/locomotive_sources/underscore/underscore-min.js +6 -0
- data/vendor/assets/components/locomotive_sources/underscore/underscore-min.map +1 -0
- data/vendor/assets/components/locomotive_sources/underscore/underscore.js +1548 -0
- data/vendor/assets/javascripts/locomotive/wysihtml5/parser_rules/advanced.js +22 -48
- data/vendor/assets/javascripts/locomotive/wysihtml5/parser_rules/advanced_unwrap.js +13 -12
- data/vendor/assets/javascripts/locomotive/wysihtml5x-toolbar.js +7324 -3862
- data/vendor/assets/stylesheets/locomotive/wysihtml5_editor.css +27 -1
- metadata +53 -28
- data/app/assets/stylesheets/locomotive/globals/_all.scss +0 -3
- data/app/assets/stylesheets/locomotive/globals/_bootstrap.scss +0 -841
- data/app/assets/stylesheets/locomotive/globals/_colors.scss +0 -1
- data/app/assets/stylesheets/locomotive/globals/_nprogress.scss +0 -3
- data/app/assets/stylesheets/locomotive/not_logged_in.scss +0 -15
@@ -115,19 +115,13 @@ var wysihtml5ParserRules = {
|
|
115
115
|
"align": "align_text"
|
116
116
|
}
|
117
117
|
},
|
118
|
-
"strike": {
|
119
|
-
|
120
|
-
},
|
121
|
-
"form": {
|
122
|
-
"rename_tag": "div"
|
123
|
-
},
|
118
|
+
"strike": {},
|
119
|
+
"form": {},
|
124
120
|
"rt": {
|
125
121
|
"rename_tag": "span"
|
126
122
|
},
|
127
123
|
"code": {},
|
128
|
-
"acronym": {
|
129
|
-
"rename_tag": "span"
|
130
|
-
},
|
124
|
+
"acronym": {},
|
131
125
|
"br": {
|
132
126
|
"add_class": {
|
133
127
|
"clear": "clear_br"
|
@@ -148,9 +142,7 @@ var wysihtml5ParserRules = {
|
|
148
142
|
"multicol": {
|
149
143
|
"rename_tag": "div"
|
150
144
|
},
|
151
|
-
"figure": {
|
152
|
-
"rename_tag": "div"
|
153
|
-
},
|
145
|
+
"figure": {},
|
154
146
|
"xmp": {
|
155
147
|
"rename_tag": "span"
|
156
148
|
},
|
@@ -180,9 +172,7 @@ var wysihtml5ParserRules = {
|
|
180
172
|
"dfn": {
|
181
173
|
"rename_tag": "span"
|
182
174
|
},
|
183
|
-
"iframe": {
|
184
|
-
"remove": 1
|
185
|
-
},
|
175
|
+
"iframe": { "check_attributes": { "class": "any" } },
|
186
176
|
"figcaption": {
|
187
177
|
"rename_tag": "div"
|
188
178
|
},
|
@@ -190,7 +180,8 @@ var wysihtml5ParserRules = {
|
|
190
180
|
"check_attributes": {
|
191
181
|
"target": "any",
|
192
182
|
"href": "any", // if you compiled master manually then change this from 'url' to 'href'
|
193
|
-
"title": "any"
|
183
|
+
"title": "any",
|
184
|
+
"class": "any"
|
194
185
|
},
|
195
186
|
"set_attributes": {
|
196
187
|
"rel": "nofollow"
|
@@ -201,7 +192,8 @@ var wysihtml5ParserRules = {
|
|
201
192
|
"width": "numbers",
|
202
193
|
"alt": "alt",
|
203
194
|
"src": "any", // if you compiled master manually then change this from 'url' to 'src'
|
204
|
-
"height": "numbers"
|
195
|
+
"height": "numbers",
|
196
|
+
"class": "any"
|
205
197
|
},
|
206
198
|
"add_class": {
|
207
199
|
"align": "align_img"
|
@@ -226,9 +218,7 @@ var wysihtml5ParserRules = {
|
|
226
218
|
"sup": {
|
227
219
|
"rename_tag": "span"
|
228
220
|
},
|
229
|
-
"address": {
|
230
|
-
"rename_tag": "div"
|
231
|
-
},
|
221
|
+
"address": { "check_attributes": { "class": "any" } },
|
232
222
|
"basefont": {
|
233
223
|
"remove": 1
|
234
224
|
},
|
@@ -272,12 +262,8 @@ var wysihtml5ParserRules = {
|
|
272
262
|
"align": "align_text"
|
273
263
|
}
|
274
264
|
},
|
275
|
-
"option": {
|
276
|
-
|
277
|
-
},
|
278
|
-
"select": {
|
279
|
-
"rename_tag": "span"
|
280
|
-
},
|
265
|
+
"option": {},
|
266
|
+
"select": {},
|
281
267
|
"i": {},
|
282
268
|
"track": {
|
283
269
|
"remove": 1
|
@@ -292,19 +278,15 @@ var wysihtml5ParserRules = {
|
|
292
278
|
"rename_tag": "span",
|
293
279
|
"set_class": "wysiwyg-font-size-larger"
|
294
280
|
},
|
295
|
-
"button": {
|
296
|
-
"rename_tag": "span"
|
297
|
-
},
|
281
|
+
"button": {},
|
298
282
|
"noscript": {
|
299
283
|
"remove": 1
|
300
284
|
},
|
301
285
|
"svg": {
|
302
286
|
"remove": 1
|
303
287
|
},
|
304
|
-
"input": {
|
305
|
-
|
306
|
-
},
|
307
|
-
"table": {},
|
288
|
+
"input": {},
|
289
|
+
"table": { "check_attributes": { "class": "alt" } },
|
308
290
|
"keygen": {
|
309
291
|
"remove": 1
|
310
292
|
},
|
@@ -338,13 +320,9 @@ var wysihtml5ParserRules = {
|
|
338
320
|
"base": {
|
339
321
|
"remove": 1
|
340
322
|
},
|
341
|
-
"video": {
|
342
|
-
"remove": 1
|
343
|
-
},
|
323
|
+
"video": {},
|
344
324
|
"strong": {},
|
345
|
-
"canvas": {
|
346
|
-
"remove": 1
|
347
|
-
},
|
325
|
+
"canvas": {},
|
348
326
|
"output": {
|
349
327
|
"rename_tag": "span"
|
350
328
|
},
|
@@ -395,9 +373,9 @@ var wysihtml5ParserRules = {
|
|
395
373
|
"var": {
|
396
374
|
"rename_tag": "span"
|
397
375
|
},
|
398
|
-
"del": {
|
399
|
-
|
400
|
-
},
|
376
|
+
// "del": {
|
377
|
+
// "remove": 1
|
378
|
+
// },
|
401
379
|
"blockquote": {
|
402
380
|
"check_attributes": {
|
403
381
|
"cite": "url"
|
@@ -417,9 +395,7 @@ var wysihtml5ParserRules = {
|
|
417
395
|
"align": "align_text"
|
418
396
|
}
|
419
397
|
},
|
420
|
-
"textarea": {
|
421
|
-
"rename_tag": "span"
|
422
|
-
},
|
398
|
+
"textarea": {},
|
423
399
|
"embed": {
|
424
400
|
"remove": 1
|
425
401
|
},
|
@@ -552,9 +528,7 @@ var wysihtml5ParserRules = {
|
|
552
528
|
"frameset": {
|
553
529
|
"remove": 1
|
554
530
|
},
|
555
|
-
"optgroup": {
|
556
|
-
"rename_tag": "span"
|
557
|
-
},
|
531
|
+
"optgroup": {},
|
558
532
|
"header": {
|
559
533
|
"rename_tag": "div"
|
560
534
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
console.log('[ADVANCED UNWRAP] wysihtml5ParserRules');
|
1
2
|
/**
|
2
3
|
* Full HTML5 compatibility rule set
|
3
4
|
* These rules define which tags and CSS classes are supported and which tags should be specially treated.
|
@@ -74,8 +75,8 @@ var wysihtml5ParserRules = {
|
|
74
75
|
"wysiwyg-text-align-left": 1,
|
75
76
|
"wysiwyg-text-align-right": 1
|
76
77
|
},
|
77
|
-
|
78
|
-
|
78
|
+
|
79
|
+
|
79
80
|
"type_definitions": {
|
80
81
|
|
81
82
|
"visible_content_object": {
|
@@ -83,7 +84,7 @@ var wysihtml5ParserRules = {
|
|
83
84
|
"has_visible_contet": 1
|
84
85
|
}
|
85
86
|
},
|
86
|
-
|
87
|
+
|
87
88
|
"alignment_object": {
|
88
89
|
"classes": {
|
89
90
|
"wysiwyg-text-align-center": 1,
|
@@ -98,26 +99,26 @@ var wysihtml5ParserRules = {
|
|
98
99
|
"text-align": ["left", "right", "center"]
|
99
100
|
}
|
100
101
|
},
|
101
|
-
|
102
|
+
|
102
103
|
"valid_image_src": {
|
103
104
|
"attrs": {
|
104
105
|
"src": /^[^data\:]/i
|
105
106
|
}
|
106
107
|
},
|
107
|
-
|
108
|
+
|
108
109
|
"text_color_object": {
|
109
110
|
"styles": {
|
110
111
|
"color": true,
|
111
112
|
"background-color": true
|
112
113
|
}
|
113
114
|
},
|
114
|
-
|
115
|
+
|
115
116
|
"text_fontsize_object": {
|
116
117
|
"styles": {
|
117
118
|
"font-size": true
|
118
119
|
}
|
119
120
|
},
|
120
|
-
|
121
|
+
|
121
122
|
"text_formatting_object": {
|
122
123
|
"classes": {
|
123
124
|
"wysiwyg-color-aqua": 1,
|
@@ -150,7 +151,7 @@ var wysihtml5ParserRules = {
|
|
150
151
|
},
|
151
152
|
|
152
153
|
"comments": 1, // if set allows comments to pass
|
153
|
-
|
154
|
+
|
154
155
|
/**
|
155
156
|
* Tag list
|
156
157
|
*
|
@@ -185,7 +186,7 @@ var wysihtml5ParserRules = {
|
|
185
186
|
* - href: allows something like "mailto:bert@foo.com", "http://google.com", "/foobar.jpg"
|
186
187
|
* - alt: strips unwanted characters. if the attribute is not set, then it gets set (to ensure valid and compatible HTML)
|
187
188
|
* - numbers: ensures that the attribute only contains numeric characters
|
188
|
-
* - any: allows anything to pass
|
189
|
+
* - any: allows anything to pass
|
189
190
|
*/
|
190
191
|
"tags": {
|
191
192
|
"tr": {
|
@@ -349,7 +350,7 @@ var wysihtml5ParserRules = {
|
|
349
350
|
"object": {
|
350
351
|
"remove": 1
|
351
352
|
},
|
352
|
-
|
353
|
+
|
353
354
|
"div": {
|
354
355
|
"one_of_type": {
|
355
356
|
"visible_content_object": 1
|
@@ -363,7 +364,7 @@ var wysihtml5ParserRules = {
|
|
363
364
|
"align": "align_text"
|
364
365
|
}
|
365
366
|
},
|
366
|
-
|
367
|
+
|
367
368
|
"option": {
|
368
369
|
"remove":1
|
369
370
|
},
|
@@ -663,4 +664,4 @@ var wysihtml5ParserRules = {
|
|
663
664
|
"rename_tag": "div"
|
664
665
|
}
|
665
666
|
}
|
666
|
-
};
|
667
|
+
};
|