card 1.96.8 → 1.97.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (488) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/config/initializers/01_core_extensions/hash.rb +7 -7
  4. data/config/initializers/01_core_extensions/object.rb +8 -4
  5. data/config/initializers/02_patches/kaminari.rb +0 -6
  6. data/config/locales/de.yml +7 -4
  7. data/config/locales/en.yml +46 -39
  8. data/db/migrate/20110511221913_require_earlier_migrations.rb +1 -0
  9. data/db/migrate/20120105203350_require_1_8_migrations.rb +1 -0
  10. data/db/migrate/20190116170824_add_left_key_to_card_virtuals.rb +11 -0
  11. data/db/migrate/20190131223248_add_codename_index.rb +9 -0
  12. data/db/migrate_core_cards/20120611203506_rails_inflection_updates.rb +8 -2
  13. data/db/migrate_core_cards/20180712042655_head_rule.rb +14 -0
  14. data/db/migrate_core_cards/20180905061536_migrate_layouts.rb +64 -0
  15. data/db/migrate_core_cards/20190125125150_add_script_rules_card.rb +9 -0
  16. data/db/migrate_core_cards/20190204195039_add_rule_card.rb +7 -0
  17. data/db/migrate_core_cards/data/decko_logo.svg +59 -0
  18. data/db/schema.rb +3 -2
  19. data/db/seed/new/card_actions.yml +1506 -1458
  20. data/db/seed/new/card_acts.yml +2 -2
  21. data/db/seed/new/card_references.yml +633 -633
  22. data/db/seed/new/cards.yml +1802 -1634
  23. data/db/seed/new/schema_migrations.yml +4 -0
  24. data/db/seed/new/schema_migrations_core_cards.yml +28 -2
  25. data/db/seed/test/fixtures/card_actions.yml +2485 -2533
  26. data/db/seed/test/fixtures/card_acts.yml +520 -460
  27. data/db/seed/test/fixtures/card_changes.yml +66 -66
  28. data/db/seed/test/fixtures/card_references.yml +1533 -1407
  29. data/db/seed/test/fixtures/cards.yml +3392 -2945
  30. data/db/seed/test/fixtures/schema_migrations.yml +4 -0
  31. data/db/seed/test/fixtures/schema_migrations_core_cards.yml +28 -2
  32. data/db/seed/test/seed.rb +33 -1
  33. data/db/version.txt +1 -1
  34. data/db/version_core_cards.txt +1 -1
  35. data/lib/card.rb +1 -0
  36. data/lib/card/act_manager.rb +6 -2
  37. data/lib/card/act_manager/stage.rb +5 -5
  38. data/lib/card/act_manager/stage_director.rb +11 -7
  39. data/lib/card/act_manager/stage_director/phases.rb +4 -8
  40. data/lib/card/auth.rb +1 -0
  41. data/lib/card/auth/current.rb +1 -1
  42. data/lib/card/auth/permissions.rb +1 -0
  43. data/lib/card/auth/proxy.rb +1 -0
  44. data/lib/card/cache.rb +10 -9
  45. data/lib/card/cache/persistent.rb +2 -1
  46. data/lib/card/cache/prepopulate.rb +1 -0
  47. data/lib/card/cache/temporary.rb +1 -0
  48. data/lib/card/codename.rb +11 -6
  49. data/lib/card/content/chunk.rb +24 -9
  50. data/lib/card/content/clean.rb +4 -2
  51. data/lib/card/content/diff.rb +4 -4
  52. data/lib/card/content/diff/lcs.rb +1 -3
  53. data/lib/card/content/diff/processor.rb +2 -0
  54. data/lib/card/content/diff/result.rb +3 -0
  55. data/lib/card/content/parser.rb +2 -1
  56. data/lib/card/content/truncate.rb +4 -1
  57. data/lib/card/dirty.rb +3 -2
  58. data/lib/card/env.rb +11 -2
  59. data/lib/card/env/location_history.rb +3 -1
  60. data/lib/card/env/success.rb +3 -1
  61. data/lib/card/error.rb +42 -8
  62. data/lib/card/format.rb +22 -9
  63. data/lib/card/format/content.rb +10 -2
  64. data/lib/card/format/context_names.rb +4 -2
  65. data/lib/card/format/error.rb +1 -1
  66. data/lib/card/format/nest.rb +4 -3
  67. data/lib/card/format/nesting.rb +2 -0
  68. data/lib/card/format/nesting/main.rb +11 -5
  69. data/lib/card/format/nesting/mode.rb +1 -0
  70. data/lib/card/format/nesting/subformat.rb +12 -0
  71. data/lib/card/format/permission.rb +3 -0
  72. data/lib/card/format/registration.rb +7 -3
  73. data/lib/card/format/render.rb +73 -17
  74. data/lib/card/mailer.rb +2 -1
  75. data/lib/card/mark.rb +2 -2
  76. data/lib/card/migration.rb +115 -113
  77. data/lib/card/migration/core.rb +1 -0
  78. data/lib/card/migration/deck_structure.rb +1 -0
  79. data/lib/card/migration/import.rb +1 -1
  80. data/lib/card/migration/import/import_data.rb +6 -3
  81. data/lib/card/migration/import/import_data/card_attributes.rb +56 -54
  82. data/lib/card/migration/import/import_data/card_content.rb +0 -1
  83. data/lib/card/mod.rb +4 -1
  84. data/lib/card/mod/dirs.rb +11 -2
  85. data/lib/card/mod/load_strategy.rb +4 -4
  86. data/lib/card/mod/load_strategy/set_binding_magic.rb +9 -5
  87. data/lib/card/mod/load_strategy/set_tmp_files.rb +1 -1
  88. data/lib/card/mod/load_strategy/tmp_files.rb +1 -0
  89. data/lib/card/mod/loader.rb +8 -9
  90. data/lib/card/mod/loader/set_loader.rb +4 -4
  91. data/lib/card/mod/loader/set_pattern_loader.rb +2 -2
  92. data/lib/card/mod/module_template.rb +12 -12
  93. data/lib/card/model/save_helper.rb +13 -4
  94. data/lib/card/name.rb +3 -2
  95. data/lib/card/name/name_variants.rb +3 -3
  96. data/lib/card/query.rb +19 -12
  97. data/lib/card/query/abstract_query/query_helper.rb +2 -0
  98. data/lib/card/query/card_query.rb +1 -0
  99. data/lib/card/query/card_query/conjunctions.rb +2 -0
  100. data/lib/card/query/card_query/interpretation.rb +2 -7
  101. data/lib/card/query/card_query/match_attributes.rb +1 -0
  102. data/lib/card/query/card_query/reference_attributes.rb +4 -4
  103. data/lib/card/query/card_query/run.rb +1 -0
  104. data/lib/card/query/card_query/sorting.rb +1 -0
  105. data/lib/card/query/clause.rb +14 -12
  106. data/lib/card/query/join.rb +4 -2
  107. data/lib/card/query/reference_query.rb +1 -0
  108. data/lib/card/query/sql_statement.rb +4 -8
  109. data/lib/card/query/sql_statement/joins.rb +1 -0
  110. data/lib/card/query/sql_statement/order.rb +7 -6
  111. data/lib/card/query/sql_statement/where.rb +3 -1
  112. data/lib/card/query/value.rb +1 -0
  113. data/lib/card/reference.rb +1 -0
  114. data/lib/card/set/advanced_api.rb +2 -2
  115. data/lib/card/set/code_nest.rb +15 -0
  116. data/lib/card/set/event.rb +4 -3
  117. data/lib/card/set/event/callbacks.rb +1 -0
  118. data/lib/card/set/event/delayed_event.rb +7 -6
  119. data/lib/card/set/event/options.rb +5 -1
  120. data/lib/card/set/format.rb +21 -0
  121. data/lib/card/set/format/abstract_format.rb +15 -6
  122. data/lib/card/set/format/haml_views.rb +1 -1
  123. data/lib/card/set/format/wrapper.rb +89 -0
  124. data/lib/card/set/helpers.rb +5 -0
  125. data/lib/card/set/i18n_scanner.rb +5 -4
  126. data/lib/card/set/i18n_scope.rb +10 -10
  127. data/lib/card/set/inheritance.rb +3 -0
  128. data/lib/card/set/loader.rb +1 -0
  129. data/lib/card/set/required_field.rb +74 -0
  130. data/lib/card/set/trait.rb +6 -0
  131. data/lib/card/set_pattern.rb +8 -4
  132. data/lib/card/subcards.rb +9 -1
  133. data/lib/card/subcards/add.rb +1 -3
  134. data/lib/card/subcards/remove.rb +2 -0
  135. data/lib/card/tasks/card.rake +2 -0
  136. data/lib/card/tasks/card/create.rake +2 -1
  137. data/lib/card/tasks/card/file_card_creator.rb +1 -1
  138. data/lib/card/tasks/card/file_card_creator/abstract_file_card/migration_file.rb +1 -0
  139. data/lib/card/tasks/card/migrate.rake +3 -3
  140. data/lib/card/version.rb +6 -4
  141. data/lib/card/view.rb +15 -2
  142. data/lib/card/view/cache.rb +12 -12
  143. data/lib/card/view/cache_action.rb +11 -14
  144. data/lib/card/view/classy.rb +168 -0
  145. data/lib/card/view/layout.rb +14 -0
  146. data/lib/card/view/options.rb +12 -8
  147. data/lib/card/view/options/key_lists.rb +4 -4
  148. data/lib/card/view/options/voo_api.rb +46 -9
  149. data/lib/card/view/stub.rb +2 -2
  150. data/lib/card/view/visibility.rb +4 -5
  151. data/lib/card/view/wrapper.rb +28 -0
  152. data/lib/cardio.rb +2 -1
  153. data/mod/Modfile +2 -0
  154. data/mod/account/set/right/account.rb +4 -6
  155. data/mod/account/set/right/password.rb +2 -2
  156. data/mod/account/set/self/signin.rb +16 -9
  157. data/mod/account/set/type/signup.rb +1 -1
  158. data/mod/account/spec/set/right/password_spec.rb +26 -19
  159. data/mod/account/spec/set/type/signup_spec.rb +1 -1
  160. data/mod/basic_formats/set/self/head.rb +4 -0
  161. data/mod/bootstrap/lib/javascript/script_load_select2.js.coffee +2 -0
  162. data/mod/bootstrap/lib/stylesheets/style_bootstrap_cards.scss +76 -21
  163. data/mod/bootstrap/lib/stylesheets/style_select2_bootstrap.scss +24 -6
  164. data/mod/bootstrap/set/abstract/bootswatch_theme/html_views.rb +2 -1
  165. data/mod/bootstrap/set/type/customized_bootswatch_skin/core.haml +2 -2
  166. data/mod/bootstrap/set/type/customized_bootswatch_skin/html_views.rb +14 -14
  167. data/mod/bootstrap/set/type_plus_right/customized_bootswatch_skin/colors.rb +4 -0
  168. data/mod/bootstrap/set/type_plus_right/customized_bootswatch_skin/colors/core.haml +10 -0
  169. data/mod/carrierwave/lib/carrier_wave/file_card_uploader.rb +2 -2
  170. data/mod/carrierwave/set/abstract/attachment.rb +1 -1
  171. data/mod/carrierwave/set/type/file.rb +4 -0
  172. data/mod/carrierwave/set/type/image.rb +13 -0
  173. data/mod/carrierwave/spec/lib/carrier_wave/file_card_uploader_spec.rb +2 -2
  174. data/mod/carrierwave/spec/set/type/file_spec.rb +4 -4
  175. data/mod/carrierwave/spec/set/type/image_spec.rb +6 -6
  176. data/mod/core/chunk/nest.rb +9 -1
  177. data/mod/core/format/html_format.rb +9 -45
  178. data/mod/core/layout/blank.html +5 -5
  179. data/mod/core/layout/default.html +10 -8
  180. data/mod/core/layout/noside.html +6 -9
  181. data/mod/core/layout/pre.html +1 -2
  182. data/mod/core/layout/simple.html +1 -5
  183. data/mod/core/set/abstract/code_file.rb +1 -1
  184. data/mod/core/set/all/cache.rb +0 -2
  185. data/mod/core/set/all/codename.rb +2 -0
  186. data/mod/core/set/all/collection.rb +3 -1
  187. data/mod/core/set/all/event_conditions.rb +36 -4
  188. data/mod/core/set/all/export.rb +1 -10
  189. data/mod/core/set/all/haml.rb +3 -2
  190. data/mod/core/set/all/layouts.rb +34 -0
  191. data/mod/core/set/all/name_events.rb +1 -1
  192. data/mod/core/set/all/pattern.rb +6 -11
  193. data/mod/core/set/all/subcards.rb +4 -0
  194. data/mod/core/set/all/utils.rb +21 -1
  195. data/mod/core/set_pattern/07_type_plus_right.rb +1 -1
  196. data/mod/core/set_pattern/08_rule.rb +17 -0
  197. data/mod/core/set_pattern/{08_self.rb → 09_self.rb} +0 -0
  198. data/mod/core/spec/format/html_format_spec.rb +6 -99
  199. data/mod/core/spec/set/all/codename_spec.rb +1 -1
  200. data/mod/core/spec/set/all/collection_spec.rb +9 -5
  201. data/mod/core/spec/set/all/event_conditions_spec.rb +91 -0
  202. data/mod/core/spec/set/all/pattern_spec.rb +17 -10
  203. data/mod/developer/spec/set/right/debug_spec.rb +1 -1
  204. data/mod/edit/set/all/bridge.rb +61 -0
  205. data/mod/edit/set/all/bridge/bridge.haml +6 -0
  206. data/mod/edit/set/all/bridge/follow_section.rb +37 -0
  207. data/mod/edit/set/all/bridge/tab_views.rb +75 -0
  208. data/mod/edit/set/all/bridge/tab_visibility.rb +51 -0
  209. data/mod/edit/set/all/edit_content.rb +58 -0
  210. data/mod/edit/set/all/edit_in_place.rb +58 -0
  211. data/mod/edit/set/all/edit_name.rb +87 -0
  212. data/mod/edit/set/all/edit_type.rb +28 -0
  213. data/mod/edit/set/all/editing.rb +79 -0
  214. data/mod/{standard/set/all/rich_html → edit/set/all}/editor.rb +1 -0
  215. data/mod/{standard/set/all/rich_html → edit/set/all}/form.rb +17 -10
  216. data/mod/edit/set/all/form_buttons.rb +52 -0
  217. data/mod/{standard/set/all/rich_html → edit/set/all}/form_elements.rb +2 -1
  218. data/mod/{standard/set/all/rich_html → edit/set/all}/formgroup.rb +3 -1
  219. data/mod/{standard/set/all/rich_html → edit/set/all}/new.rb +0 -2
  220. data/mod/edit/set/all/toolbar.rb +8 -0
  221. data/mod/edit/spec/set/all/bridge/tab_views_spec.rb +14 -0
  222. data/mod/{standard/spec/set/all/rich_html/editing_spec.rb → edit/spec/set/all/bridge_spec.rb} +1 -1
  223. data/mod/edit/spec/set/all/editing_spec.rb +15 -0
  224. data/mod/{standard/spec/set/all/rich_html → edit/spec/set/all}/form_elements_spec.rb +10 -8
  225. data/mod/edit/spec/set/all/form_spec.rb +50 -0
  226. data/mod/follow/lib/card/follower_stash.rb +5 -0
  227. data/mod/follow/set/abstract/follow_option.rb +0 -1
  228. data/mod/follow/set/all/follow/follow_link.rb +42 -54
  229. data/mod/follow/set/all/follow/follow_link_views.rb +29 -0
  230. data/mod/follow/set/all/follow/followed_by.rb +3 -0
  231. data/mod/follow/set/all/follow/follower_ids.rb +5 -0
  232. data/mod/follow/set/all/follow/start_follow_link.rb +11 -0
  233. data/mod/follow/set/all/follow/stop_follow_link.rb +12 -0
  234. data/mod/follow/set/all/notify.rb +4 -0
  235. data/mod/follow/set/all/notify/base_views.rb +11 -0
  236. data/mod/follow/set/right/account.rb +2 -1
  237. data/mod/follow/set/right/follow.rb +4 -0
  238. data/mod/follow/set/right/follow/follow_status.haml +2 -2
  239. data/mod/follow/set/right/followers.rb +1 -0
  240. data/mod/follow/set/right/following.rb +2 -3
  241. data/mod/follow/set/self/follow_defaults.rb +17 -16
  242. data/mod/follow/set/type/set.rb +2 -0
  243. data/mod/follow/set/type/user.rb +1 -0
  244. data/mod/follow/set/type_plus_right/user/follow.rb +1 -0
  245. data/mod/follow/set/type_plus_right/user/follow/follow_editor.haml +4 -1
  246. data/mod/follow/set/type_plus_right/user/follow/follow_editor_helper.rb +6 -0
  247. data/mod/follow/spec/set/all/follow/follow_link_views_spec.rb +27 -0
  248. data/mod/follow/spec/set/all/follow/start_follow_link_spec.rb +11 -0
  249. data/mod/follow/spec/set/all/follow/stop_follow_link_spec.rb +13 -0
  250. data/mod/follow/spec/set/all/follow_spec.rb +13 -9
  251. data/mod/follow/spec/set/all/notify_spec.rb +4 -3
  252. data/mod/follow/spec/set/right/account_spec.rb +29 -31
  253. data/mod/follow/spec/set/right/following_spec.rb +2 -8
  254. data/mod/history/lib/card/act.rb +9 -7
  255. data/mod/history/lib/card/act/act_renderer.rb +12 -9
  256. data/mod/history/lib/card/act/act_renderer/absolute_act_renderer.rb +2 -2
  257. data/mod/history/lib/card/act/act_renderer/bridge_act_renderer.rb +53 -0
  258. data/mod/history/lib/card/act/act_renderer/relative_act_renderer.rb +3 -0
  259. data/mod/history/lib/card/action.rb +9 -4
  260. data/mod/history/lib/card/action/action_renderer.rb +5 -3
  261. data/mod/history/lib/card/action/differ.rb +3 -0
  262. data/mod/history/set/all/history.rb +2 -1
  263. data/mod/history/set/all/history/act_listing.rb +11 -8
  264. data/mod/history/set/all/history/actions.rb +11 -2
  265. data/mod/history/set/all/history/events.rb +0 -1
  266. data/mod/history/set/all/history/last.rb +2 -1
  267. data/mod/history/set/all/history/revision.rb +1 -0
  268. data/mod/history/set/all/history/selected.rb +1 -1
  269. data/mod/history/set/all/history/views.rb +0 -1
  270. data/mod/history/set/all/history_bridge.rb +66 -0
  271. data/mod/item/set/all/bar.haml +1 -3
  272. data/mod/item/set/all/bar.rb +39 -21
  273. data/mod/item/set/all/box.haml +1 -0
  274. data/mod/item/set/all/box.rb +13 -3
  275. data/mod/item/set/all/expanded_bar.haml +4 -6
  276. data/mod/machines/file/all_script_machine_output/file.js +37380 -65
  277. data/mod/machines/file/all_style_machine_output/file.css +2 -2
  278. data/mod/machines/file/script_html5shiv_printshiv_machine_output/file.js +1 -1
  279. data/mod/machines/lib/javascript/decko.js.coffee +2 -17
  280. data/mod/machines/lib/javascript/decko_bridge.js.coffee +28 -0
  281. data/mod/machines/lib/javascript/decko_components.js.coffee +21 -0
  282. data/mod/machines/lib/javascript/decko_filter.js.coffee +3 -1
  283. data/mod/machines/lib/javascript/decko_mod.js.coffee +7 -64
  284. data/mod/machines/lib/javascript/decko_modal.js.coffee +108 -0
  285. data/mod/machines/lib/javascript/decko_navbox.js.coffee +2 -0
  286. data/mod/machines/lib/javascript/decko_overlay.js.coffee +42 -0
  287. data/mod/machines/lib/javascript/decko_recaptcha.js.coffee +9 -1
  288. data/mod/machines/lib/javascript/decko_slot.js.coffee +46 -50
  289. data/mod/machines/lib/javascript/decko_slotter.js.coffee +204 -63
  290. data/mod/machines/lib/javascript/script_card_menu.js.coffee +3 -3
  291. data/mod/machines/lib/stylesheets/style_cards.scss +234 -107
  292. data/mod/machines/set/abstract/machine.rb +4 -3
  293. data/mod/machines/set/self/script_slot.rb +2 -2
  294. data/mod/machines/set/type/css.rb +8 -1
  295. data/mod/machines/set/type/skin.rb +1 -1
  296. data/mod/machines/spec/set/type/coffeescript_spec.rb +3 -3
  297. data/mod/pointer/set/abstract/00_paging_params.rb +2 -0
  298. data/mod/pointer/set/abstract/01_paging.rb +12 -6
  299. data/mod/pointer/set/abstract/02_pointer/html_views.rb +25 -0
  300. data/mod/pointer/set/abstract/02_pointer/html_views/filter.rb +20 -4
  301. data/mod/pointer/set/abstract/02_pointer/html_views/filter/filter_items.haml +1 -6
  302. data/mod/pointer/set/abstract/02_pointer/html_views/filter/filtered_list_input.haml +4 -13
  303. data/mod/pointer/set/type/pointer.rb +9 -0
  304. data/mod/pointer/spec/set/abstract/pointer/events_spec.rb +6 -0
  305. data/mod/rules/lib/javascript/script_rules.js.coffee +23 -0
  306. data/mod/rules/set/rstar/rule_user.rb +8 -0
  307. data/mod/rules/set/rule/bridge_rules_editor.rb +32 -0
  308. data/mod/rules/set/rule/editor.rb +144 -0
  309. data/mod/rules/set/rule/rule_form.rb +57 -0
  310. data/mod/rules/set/rule/rule_form/buttons.rb +44 -0
  311. data/mod/rules/set/rule/rule_form/form_elements.rb +52 -0
  312. data/mod/rules/set/rule/rule_form/rule_form.haml +20 -0
  313. data/mod/rules/set/rule/rule_form/rule_set_radio.rb +86 -0
  314. data/mod/rules/set/rule/rule_form/set_selection.rb +46 -0
  315. data/mod/{standard/set/rstar → rules/set/rule}/rules.rb +5 -9
  316. data/mod/rules/set/rule/table.rb +27 -0
  317. data/mod/rules/set/rule/table_row.rb +62 -0
  318. data/mod/rules/set/self/script_rules.rb +3 -0
  319. data/mod/{standard → rules}/set/type/set.rb +8 -10
  320. data/mod/rules/set/type/set/html_views.rb +72 -0
  321. data/mod/{standard → rules}/set/type/set/html_views/group_panel.haml +0 -0
  322. data/mod/rules/set/type/set/html_views/rules_bridge.rb +129 -0
  323. data/mod/rules/set/type/set/html_views/rules_table.haml +11 -0
  324. data/mod/{standard → rules}/set/type/set/html_views/template.rb +3 -7
  325. data/mod/{standard → rules}/set/type/set/html_views/template/template_editor.haml +0 -0
  326. data/mod/rules/spec/set/rule/editor_spec.rb +9 -0
  327. data/mod/rules/spec/set/rule/table_row_spec.rb +9 -0
  328. data/mod/rules/spec/set/rule/table_spec.rb +15 -0
  329. data/mod/rules/spec/set/type/set/html_views_spec.rb +22 -0
  330. data/mod/{standard → rules}/spec/set/type/set_spec.rb +18 -18
  331. data/mod/search/set/abstract/00_filter_helper.rb +15 -7
  332. data/mod/search/set/abstract/01_filter_form_helper.rb +1 -0
  333. data/mod/search/set/abstract/02_search_params.rb +7 -5
  334. data/mod/search/set/abstract/03_filter.rb +3 -2
  335. data/mod/search/set/abstract/04_right_filter_form.rb +1 -2
  336. data/mod/search/set/abstract/search.rb +1 -1
  337. data/mod/search/set/abstract/search/views.rb +2 -0
  338. data/mod/search/set/abstract/wql_search.rb +6 -0
  339. data/mod/search/set/self/navbox.rb +1 -1
  340. data/mod/search/set/self/search.rb +2 -2
  341. data/mod/settings/lib/card/setting.rb +6 -1
  342. data/mod/settings/set/right/help.rb +4 -0
  343. data/mod/settings/set/right/read.rb +14 -4
  344. data/mod/settings/set/right/structure.rb +3 -0
  345. data/mod/settings/set/right/style.rb +2 -1
  346. data/mod/settings/set/self/create.rb +2 -1
  347. data/mod/settings/set/self/default.rb +2 -1
  348. data/mod/settings/set/self/delete.rb +2 -1
  349. data/mod/settings/set/self/head.rb +2 -0
  350. data/mod/settings/set/self/help.rb +2 -1
  351. data/mod/settings/set/self/input.rb +1 -1
  352. data/mod/settings/set/self/read.rb +2 -1
  353. data/mod/settings/set/self/structure.rb +2 -1
  354. data/mod/settings/set/self/thanks.rb +2 -1
  355. data/mod/settings/set/self/update.rb +2 -1
  356. data/mod/settings/set/type/setting.rb +1 -1
  357. data/mod/solid_cache/set/abstract/solid_cache.rb +2 -2
  358. data/mod/standard/file/logo/image-original.svg +59 -0
  359. data/mod/standard/lib/card/layout.rb +79 -0
  360. data/mod/standard/lib/card/layout/card_layout.rb +44 -0
  361. data/mod/standard/lib/card/layout/code_layout.rb +9 -0
  362. data/mod/standard/lib/card/layout/proc_layout.rb +9 -0
  363. data/mod/standard/lib/card/layout/unknown_layout.rb +20 -0
  364. data/mod/standard/set/all/links.rb +5 -20
  365. data/mod/standard/set/all/rich_html.rb +4 -0
  366. data/mod/standard/set/all/rich_html/alert.rb +23 -0
  367. data/mod/standard/set/all/rich_html/content.rb +26 -100
  368. data/mod/standard/set/all/rich_html/error.rb +27 -3
  369. data/mod/standard/set/all/rich_html/error/debug_server_error.haml +1015 -0
  370. data/mod/standard/set/all/rich_html/frame.rb +10 -54
  371. data/mod/standard/set/all/rich_html/header.rb +25 -15
  372. data/mod/standard/set/all/rich_html/header/header_wrap.haml +2 -1
  373. data/mod/standard/set/all/rich_html/html_views/help.rb +18 -0
  374. data/mod/standard/set/all/rich_html/html_views/info.rb +59 -0
  375. data/mod/standard/set/all/rich_html/html_views/size.rb +17 -0
  376. data/mod/standard/set/all/rich_html/menu.rb +44 -146
  377. data/mod/standard/set/all/rich_html/modal.rb +99 -24
  378. data/mod/standard/set/all/rich_html/modal/modal_dialog.haml +12 -0
  379. data/mod/standard/set/all/rich_html/overlay.rb +57 -13
  380. data/mod/standard/set/all/rich_html/process_layout.rb +91 -0
  381. data/mod/standard/set/all/rich_html/show.rb +37 -0
  382. data/mod/standard/set/all/rich_html/wrapper.rb +47 -10
  383. data/mod/standard/set/right/head.rb +11 -0
  384. data/mod/standard/set/type/cardtype.rb +1 -1
  385. data/mod/standard/set/type/listed_by.rb +3 -3
  386. data/mod/standard/spec/set/all/email_html_format_spec.rb +17 -0
  387. data/mod/standard/spec/set/all/links_spec.rb +1 -22
  388. data/mod/standard/spec/set/all/rich_html/overlay_spec.rb +18 -0
  389. data/mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb +29 -0
  390. data/mod/standard/spec/set/all/rich_html/process_layout_spec.rb +110 -0
  391. data/mod/standard/spec/set/all/rich_html/show_spec.rb +9 -0
  392. data/mod/standard/spec/set/all/rich_html/wrapper_spec.rb +17 -24
  393. data/mod/standard/spec/set/type/email_template/email_config_spec.rb +9 -5
  394. data/mod/standard/spec/set/type/layout_type_spec.rb +6 -0
  395. data/mod/standard/spec/set/type/search_type_spec.rb +1 -1
  396. data/mod/tinymce_editor/db/migrate_core_cards/20190306172623_update_tinymce_config_to_v5.rb +23 -0
  397. data/mod/tinymce_editor/lib/javascript/script_tinymce.js +9 -2
  398. data/mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee +3 -2
  399. data/mod/tinymce_editor/public/assets/tinymce/jquery.tinymce.min.js +92 -1
  400. data/mod/tinymce_editor/public/assets/tinymce/plugins/advlist/plugin.min.js +9 -1
  401. data/mod/tinymce_editor/public/assets/tinymce/plugins/anchor/plugin.min.js +9 -1
  402. data/mod/tinymce_editor/public/assets/tinymce/plugins/autolink/plugin.min.js +9 -1
  403. data/mod/tinymce_editor/public/assets/tinymce/plugins/autoresize/plugin.min.js +9 -1
  404. data/mod/tinymce_editor/public/assets/tinymce/plugins/autosave/plugin.min.js +9 -1
  405. data/mod/tinymce_editor/public/assets/tinymce/plugins/bbcode/plugin.min.js +9 -1
  406. data/mod/tinymce_editor/public/assets/tinymce/plugins/charmap/plugin.min.js +9 -1
  407. data/mod/tinymce_editor/public/assets/tinymce/plugins/code/plugin.min.js +9 -1
  408. data/mod/tinymce_editor/public/assets/tinymce/plugins/codesample/plugin.min.js +9 -1
  409. data/mod/tinymce_editor/public/assets/tinymce/plugins/colorpicker/plugin.min.js +9 -1
  410. data/mod/tinymce_editor/public/assets/tinymce/plugins/contextmenu/plugin.min.js +9 -1
  411. data/mod/tinymce_editor/public/assets/tinymce/plugins/directionality/plugin.min.js +9 -1
  412. data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/js/emojis.js +9015 -0
  413. data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
  414. data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/plugin.min.js +9 -1
  415. data/mod/tinymce_editor/public/assets/tinymce/plugins/fullpage/plugin.min.js +9 -1
  416. data/mod/tinymce_editor/public/assets/tinymce/plugins/fullscreen/plugin.min.js +9 -1
  417. data/mod/tinymce_editor/public/assets/tinymce/plugins/help/plugin.min.js +9 -1
  418. data/mod/tinymce_editor/public/assets/tinymce/plugins/hr/plugin.min.js +9 -1
  419. data/mod/tinymce_editor/public/assets/tinymce/plugins/image/plugin.min.js +9 -1
  420. data/mod/tinymce_editor/public/assets/tinymce/plugins/imagetools/plugin.min.js +9 -1
  421. data/mod/tinymce_editor/public/assets/tinymce/plugins/importcss/plugin.min.js +9 -1
  422. data/mod/tinymce_editor/public/assets/tinymce/plugins/insertdatetime/plugin.min.js +9 -1
  423. data/mod/tinymce_editor/public/assets/tinymce/plugins/legacyoutput/plugin.min.js +9 -1
  424. data/mod/tinymce_editor/public/assets/tinymce/plugins/link/plugin.min.js +9 -1
  425. data/mod/tinymce_editor/public/assets/tinymce/plugins/lists/plugin.min.js +9 -1
  426. data/mod/tinymce_editor/public/assets/tinymce/plugins/media/plugin.min.js +9 -1
  427. data/mod/tinymce_editor/public/assets/tinymce/plugins/nonbreaking/plugin.min.js +9 -1
  428. data/mod/tinymce_editor/public/assets/tinymce/plugins/noneditable/plugin.min.js +9 -1
  429. data/mod/tinymce_editor/public/assets/tinymce/plugins/pagebreak/plugin.min.js +9 -1
  430. data/mod/tinymce_editor/public/assets/tinymce/plugins/paste/plugin.min.js +9 -1
  431. data/mod/tinymce_editor/public/assets/tinymce/plugins/preview/plugin.min.js +9 -1
  432. data/mod/tinymce_editor/public/assets/tinymce/plugins/print/plugin.min.js +9 -1
  433. data/mod/tinymce_editor/public/assets/tinymce/plugins/quickbars/plugin.min.js +9 -0
  434. data/mod/tinymce_editor/public/assets/tinymce/plugins/save/plugin.min.js +9 -1
  435. data/mod/tinymce_editor/public/assets/tinymce/plugins/searchreplace/plugin.min.js +9 -1
  436. data/mod/tinymce_editor/public/assets/tinymce/plugins/spellchecker/plugin.min.js +9 -1
  437. data/mod/tinymce_editor/public/assets/tinymce/plugins/tabfocus/plugin.min.js +9 -1
  438. data/mod/tinymce_editor/public/assets/tinymce/plugins/table/plugin.min.js +9 -1
  439. data/mod/tinymce_editor/public/assets/tinymce/plugins/template/plugin.min.js +9 -1
  440. data/mod/tinymce_editor/public/assets/tinymce/plugins/textcolor/plugin.min.js +9 -1
  441. data/mod/tinymce_editor/public/assets/tinymce/plugins/textpattern/plugin.min.js +9 -1
  442. data/mod/tinymce_editor/public/assets/tinymce/plugins/toc/plugin.min.js +9 -1
  443. data/mod/tinymce_editor/public/assets/tinymce/plugins/visualblocks/plugin.min.js +9 -1
  444. data/mod/tinymce_editor/public/assets/tinymce/plugins/visualchars/plugin.min.js +9 -1
  445. data/mod/tinymce_editor/public/assets/tinymce/plugins/wordcount/plugin.min.js +9 -1
  446. data/mod/tinymce_editor/public/assets/tinymce/skins/content/default/content.min.css +7 -0
  447. data/mod/tinymce_editor/public/assets/tinymce/skins/content/document/content.min.css +7 -0
  448. data/mod/tinymce_editor/public/assets/tinymce/skins/content/writer/content.min.css +7 -0
  449. data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -0
  450. data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/content.min.css +7 -0
  451. data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/skin.min.css +7 -0
  452. data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.inline.min.css +7 -0
  453. data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.min.css +7 -0
  454. data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.mobile.min.css +1 -0
  455. data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  456. data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/skin.min.css +7 -0
  457. data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/skin.mobile.min.css +1 -0
  458. data/mod/tinymce_editor/public/assets/tinymce/themes/mobile/theme.min.js +9 -1
  459. data/mod/tinymce_editor/public/assets/tinymce/themes/silver/theme.min.js +9 -0
  460. data/mod/tinymce_editor/public/assets/tinymce/tinymce.min.js +9 -2
  461. data/mod/utility/spec/set/abstract/media_spec.rb +6 -6
  462. data/mod/virtual/lib/card/virtual.rb +17 -2
  463. data/mod/virtual/set/abstract/virtual_cache.rb +1 -1
  464. data/mod/virtual/spec/set/lib/card/virtual_spec.rb +1 -1
  465. metadata +121 -42
  466. data/mod/core/layout/modal.html +0 -9
  467. data/mod/core/layout/simple_modal.html +0 -3
  468. data/mod/follow/spec/set/all/follow/follow_link_spec.rb +0 -7
  469. data/mod/standard/file/logo/image-icon.png +0 -0
  470. data/mod/standard/file/logo/image-large.png +0 -0
  471. data/mod/standard/file/logo/image-medium.png +0 -0
  472. data/mod/standard/file/logo/image-original.png +0 -0
  473. data/mod/standard/file/logo/image-small.png +0 -0
  474. data/mod/standard/set/abstract/toolbar_split_button.rb +0 -22
  475. data/mod/standard/set/all/rich_html/classy.rb +0 -37
  476. data/mod/standard/set/all/rich_html/editing.rb +0 -176
  477. data/mod/standard/set/all/rich_html/related.rb +0 -30
  478. data/mod/standard/set/all/rich_html/toolbar.rb +0 -264
  479. data/mod/standard/set/rstar/rules_editor.rb +0 -371
  480. data/mod/standard/set/self/activity_toolbar_button.rb +0 -14
  481. data/mod/standard/set/self/rules_toolbar_button.rb +0 -44
  482. data/mod/standard/set/type/set/html_views.rb +0 -155
  483. data/mod/standard/set/type/set/html_views/rules_table.haml +0 -9
  484. data/mod/standard/spec/set/all/rich_html/form_spec.rb +0 -47
  485. data/mod/standard/spec/set/all/rich_html/toolbar_spec.rb +0 -25
  486. data/mod/standard/spec/set/rstar/rules_spec.rb +0 -26
  487. data/mod/standard/spec/set/self/activity_toolbar_button_spec.rb +0 -22
  488. data/mod/standard/spec/set/type/set/html_views_spec.rb +0 -10
@@ -1,82 +1,90 @@
1
+ # There are three places that can control what happens after an ajax request
2
+ # 1. the element that triggered the request (eg. a link or a button)
3
+ # 2. the closest ".slotter" element
4
+ # (if the trigger itself isn't a slotter,
5
+ # a common example is that a form is a slotter but the form buttons aren't)
6
+ # 3. the slot returned by the request
7
+ #
8
+ # A slot is an element marked with "card-slot" class, a slotter has a "slotter" class.
9
+ # By the default, the closest slot of the slotter is replaced with the new slot that the
10
+ # request returned. The behavior can be changed with css classes and data attributes.
11
+ #
12
+ # To 1. The trigger element has only a few options to override the slotter.
13
+ # classes:
14
+ # "_close-modal-on-success"
15
+ # "_close-overlay-on-success"
16
+ # "_update-origin"
17
+ #
18
+ # To 2. The slotter is the standard way to define what happens with request result
19
+ # data:
20
+ # slot-selector
21
+ # a css selector that defines which slot will be replaced
22
+ # slot-success-selector/slot-error-selector
23
+ # the same as slot-selector but only used
24
+ # for success case or error case, respectively
25
+ # update-foreign-slot
26
+ # a css selector to specify an additional slot that will be
27
+ # updated after the request
28
+ # update-foreign-slot-url
29
+ # a url to fetch the new content for the additional slot
30
+ # if not given the slot is updated with the same card and view that used before
31
+ # slotter-mode
32
+ # possible values are
33
+ # replace (default)
34
+ # replace the closest slot with new slot
35
+ # modal
36
+ # show new slot in modal; if there is already a modal then put it on top
37
+ # modal-replace
38
+ # replace existing modal
39
+ # overlay
40
+ # show new slot in overlay
41
+ # update-origin
42
+ # update closest slot of the slotter that opened the modal or overlay
43
+ # (assumes that the request was triggered from a modal or overlay)
44
+ # If you need the update origin together with another mode then use
45
+ # update-foreign-slot=".card-slot._modal-origin".
46
+ # silent-success
47
+ # do nothing
48
+ #
49
+ # classes:
50
+ # _close-overlay
51
+ # _close-modal
52
+ #
53
+ # To 3. Similar as 1, the slot has only overlay and modal options.
54
+ # classes:
55
+ # _modal
56
+ # show slot in modal
57
+ # _overlay
58
+ # show slot in overlay
59
+ #
60
+ #
1
61
  $(window).ready ->
2
62
  $('body').on 'ajax:success', '.slotter', (event, data, c, d) ->
3
- unless event.slotSuccessful
4
- $this = $(this)
5
- $this.slotSuccess data, $this.hasClass("_slotter-overlay")
6
- if $this.hasClass "close-modal"
7
- $this.closest('.modal').modal('hide')
8
- # should scroll to top after clicking on new page
9
- if $this.hasClass "card-paging-link"
10
- slot_top_pos = $this.slot().offset().top
11
- $("body").scrollTop slot_top_pos
12
- if $this.data("update-foreign-slot")
13
- $slot = $this.find_slot $this.data("update-foreign-slot")
14
- $slot.updateSlot $this.data("update-foreign-slot-url")
15
-
16
- event.slotSuccessful = true
63
+ $(this).slotterSuccess event, data
17
64
 
18
65
  $('body').on 'ajax:error', '.slotter', (event, xhr) ->
19
- $(this).slotError xhr.status, xhr.responseText
66
+ $(this).showErrorResponse xhr.status, xhr.responseText
20
67
 
21
68
  $('body').on 'click', 'button.slotter', (event)->
22
69
  return false if !$.rails.allowAction $(this)
23
70
  $.rails.handleRemote $(this)
24
71
 
25
72
  $('body').on 'click', '._clickable.slotter', (event)->
73
+ $(this)[0].href = $(this).attr("href") # that's where rails.handleRemote
74
+ # expects the url
26
75
  $.rails.handleRemote $(this)
27
76
 
28
77
  $('body').on 'click', '[data-dismiss="overlay"]', (event) ->
29
- $(this).slot().remove()
78
+ $(this).findSlot(".card-slot._overlay").removeOverlay()
30
79
 
31
- $('body').on 'ajax:beforeSend', '.slotter', (event, xhr, opt)->
32
- return if opt.skip_before_send
80
+ $('body').on 'click', '._close-overlay-on-success', (event) ->
81
+ $(this).closeOnSuccess("overlay")
33
82
 
34
- # avoiding duplication. could be better test?
35
- unless opt.url.match /home_view/
36
- opt.url = decko.slotPath opt.url, $(this).slot()
37
-
38
- if $(this).is('form')
39
- if decko.recaptchaKey and $(this).attr('recaptcha')=='on' and
40
- !($(this).find('.g-recaptcha')[0])
41
- # if there is already a recaptcha on the page then we don't have to
42
- # load the recaptcha script
43
- if $('.g-recaptcha')[0]
44
- addCaptcha(this)
45
- else
46
- initCaptcha(this)
47
- return false
83
+ $('body').on 'click', '._close-modal-on-success', (event) ->
84
+ $(this).closeOnSuccess("modal")
48
85
 
49
- if data = $(this).data 'file-data'
50
- # NOTE - this entire solution is temporary.
51
- input = $(this).find '.file-upload'
52
- if input[1]
53
- $(this).notify(
54
- "Decko does not yet support multiple files in a single form.",
55
- "error"
56
- )
57
- return false
58
-
59
- widget = input.data 'blueimpFileupload' #jQuery UI widget
60
-
61
- # browsers that can't do ajax uploads use iframe
62
- unless widget._isXHRUpload(widget.options)
63
- # can't do normal redirects.
64
- $(this).find('[name=success]').val('_self')
65
- # iframe response not passed back;
66
- # all responses treated as success. boo
67
- opt.url += '&simulate_xhr=true'
68
- # iframe is not xhr request,
69
- # so would otherwise get full response with layout
70
- iframeUploadFilter = (data)-> data.find('body').html()
71
- opt.dataFilter = iframeUploadFilter
72
- # gets rid of default html and body tags
73
-
74
- args = $.extend opt, (widget._getAJAXSettings data), url: opt.url
75
- # combines settings from decko's slotter and jQuery UI's upload widget
76
- args.skip_before_send = true #avoid looping through this method again
77
-
78
- $.ajax( args )
79
- false
86
+ $('body').on 'click', '._update-origin', (event) ->
87
+ $(this).closest('.slotter').data("slotter-mode", "update-origin")
80
88
 
81
89
  $('body').on 'submit', 'form.slotter', (event)->
82
90
  if (target = $(this).attr 'main-success') and $(this).isMain()
@@ -85,3 +93,136 @@ $(window).ready ->
85
93
  input.val(
86
94
  (if target == 'REDIRECT' then target + ': ' + input.val() else target)
87
95
  )
96
+
97
+ $('body').on 'ajax:beforeSend', '.slotter', (event, xhr, opt)->
98
+ $(this).slotterBeforeSend(opt)
99
+
100
+ jQuery.fn.extend
101
+ slotterSuccess: (event, data) ->
102
+ unless @hasClass("slotter")
103
+ console.log "warning: slotterSuccess called on non-slotter element #{this}"
104
+ return
105
+
106
+ return if event.slotSuccessful
107
+
108
+ mode = @data("slotter-mode")
109
+ @showSuccessResponse data, mode
110
+
111
+ if @hasClass "_close-overlay"
112
+ @removeOverlay()
113
+ if @hasClass "_close-modal"
114
+ @closest('.modal').modal('hide')
115
+
116
+ # should scroll to top after clicking on new page
117
+ if @hasClass "card-paging-link"
118
+ slot_top_pos = @slot().offset().top
119
+ $("body").scrollTop slot_top_pos
120
+ if @data("update-foreign-slot")
121
+ $slot = @findSlot @data("update-foreign-slot")
122
+ reload_url = @data("update-foreign-slot-url")
123
+ $slot.reloadSlot reload_url
124
+ #if $slot.length > 0
125
+ #$.each $slot, (sl) ->
126
+ #$(sl).reloadSlot reload_url
127
+
128
+ event.slotSuccessful = true
129
+
130
+ showSuccessResponse: (data, mode) ->
131
+ if mode == "silent-success"
132
+ return
133
+ else if mode == "update-origin"
134
+ @updateOrigin()
135
+ else if data.redirect
136
+ window.location = data.redirect
137
+ else
138
+ @updateSlot data, mode
139
+
140
+ showErrorResponse: (status, result) ->
141
+ if status == 403 #permission denied
142
+ @setSlotContent result
143
+ else if status == 900
144
+ $(result).showAsModal $(this)
145
+ else
146
+ @notify result, "error"
147
+ if status == 409 #edit conflict
148
+ @slot().find('.current_revision_id').val(
149
+ @slot().find('.new-current-revision-id').text()
150
+ )
151
+ else if status == 449
152
+ @slot().find('g-recaptcha').reloadCaptcha()
153
+
154
+ updateOrigin: () ->
155
+ if @overlaySlot()[0]
156
+ $("._overlay-origin").reloadSlot()
157
+ else if @closest("#modal-container")[0]
158
+ $("._modal-origin").reloadSlot()
159
+
160
+ markOrigin: (type) ->
161
+ @closest(".card-slot").addClass("_#{type}-origin")
162
+
163
+ updateSlot: (data, mode) ->
164
+ notice = @attr('notify-success')
165
+ mode ||= "replace"
166
+ newslot = @setSlotContent data, mode, $(this)
167
+
168
+ if newslot.jquery # sometimes response is plaintext
169
+ decko.initializeEditors newslot
170
+ if notice?
171
+ newslot.notify notice, "success"
172
+
173
+ # close modal or overlay
174
+ closeOnSuccess: (type) ->
175
+ slotter = @closest('.slotter')
176
+ slotter.addClass "_close-#{type}"
177
+ # unless trigger.hasClass("_update-origin") or slotter.data("slotter-mode") == "update-origin"
178
+ # slotter.data("slotter-mode", "replace")
179
+
180
+
181
+ slotterBeforeSend: (opt) ->
182
+ return if opt.skip_before_send
183
+
184
+ # avoiding duplication. could be better test?
185
+ unless opt.url.match /home_view/
186
+ opt.url = decko.slotPath opt.url, @slot()
187
+
188
+ if @is('form')
189
+ if decko.recaptchaKey and @attr('recaptcha')=='on' and
190
+ !(@find('.g-recaptcha')[0])
191
+ loadCaptcha(this)
192
+ return false
193
+
194
+ if data = @data 'file-data'
195
+ # NOTE - this entire solution is temporary.
196
+ @uploadWithBlueimp(data, opt)
197
+ false
198
+
199
+
200
+ uploadWithBlueimp: (data, opt) ->
201
+ input = @find '.file-upload'
202
+ if input[1]
203
+ @notify(
204
+ "Decko does not yet support multiple files in a single form.",
205
+ "error"
206
+ )
207
+ return false
208
+
209
+ widget = input.data 'blueimpFileupload' #jQuery UI widget
210
+
211
+ # browsers that can't do ajax uploads use iframe
212
+ unless widget._isXHRUpload(widget.options)
213
+ # can't do normal redirects.
214
+ @find('[name=success]').val('_self')
215
+ # iframe response not passed back;
216
+ # all responses treated as success. boo
217
+ opt.url += '&simulate_xhr=true'
218
+ # iframe is not xhr request,
219
+ # so would otherwise get full response with layout
220
+ iframeUploadFilter = (data)-> data.find('body').html()
221
+ opt.dataFilter = iframeUploadFilter
222
+ # gets rid of default html and body tags
223
+
224
+ args = $.extend opt, (widget._getAJAXSettings data), url: opt.url
225
+ # combines settings from decko's slotter and jQuery UI's upload widget
226
+ args.skip_before_send = true #avoid looping through this method again
227
+
228
+ $.ajax( args )
@@ -3,9 +3,9 @@ decko.slotReady (slot) ->
3
3
  if menu?
4
4
  $(menu).dropdown('toggle')
5
5
 
6
+ if decko.isTouchDevice()
7
+ slot.find('._show-on-hover').removeClass('_show-on-hover')
8
+
6
9
  $(window).ready ->
7
10
  $('body').on 'click', '.toolbar .nav-pills > li', ->
8
11
  $(this).tab('show')
9
-
10
- if decko.isTouchDevice()
11
- $('._show-on-hover').removeClass('_show-on-hover')
@@ -19,7 +19,6 @@ Choosing (b) will mean your CSS will not be affected by automated updates.
19
19
 
20
20
  /*-- yellows --*/
21
21
  $d-yellow-1: #ffd;
22
- $d-yellow-2: #ffa;
23
22
 
24
23
  /* -- resets -- */
25
24
 
@@ -40,20 +39,59 @@ $d-yellow-2: #ffa;
40
39
  .new-current-revision-id,
41
40
  .editor .revision-navigation,
42
41
  .editor .autosave-alert,
43
- .edit_name-view .alert,
42
+ .hidden-alert,
44
43
  .btn.renamer-updater,
45
44
  .confirm_update_all-view,
46
45
  .follow-updater,
47
- .admin-error-message,
48
- .labeled-view .card-menu-link {
46
+ .admin-error-message {
49
47
  display: none
50
48
  }
51
49
 
50
+ /* Help text */
51
+ .help-text {
52
+ color: $text-muted
53
+ }
54
+
55
+ .guide-line-number {
56
+ display: inline-block;
57
+ background: #000;
58
+ color: $white;
59
+ border-radius: 100%;
60
+ width: 21px;
61
+ height: 21px;
62
+ font-size: 61%;
63
+ text-align: center;
64
+ padding-top: 3px;
65
+ font-weight: bold;
66
+ margin-left: -1.7rem;
67
+ position: relative;
68
+ top: -5px;
69
+ left: -4px;
70
+ }
71
+
72
+ .guide-line {
73
+ border-left: 1px solid $border-color;
74
+ }
75
+
76
+ .rule-section {
77
+ padding-left: 20px;
78
+ margin-left: 12px;
79
+ margin-right: 5px;
80
+ h4 {
81
+ position: relative;
82
+ top: -4px;
83
+ }
84
+ }
52
85
 
53
86
  /* -- d0-card-frames and menus--*/
87
+
88
+ .card-slot {
89
+ position: relative;
90
+ }
91
+
54
92
  .d0-card-frame {
55
93
  .d0-card-frame-title {
56
- display: inline-block;
94
+ // display: inline-block;
57
95
  overflow: hidden;
58
96
  span.header-icon {
59
97
  margin: 0px 5px;
@@ -73,67 +111,20 @@ $d-yellow-2: #ffa;
73
111
  width: 100%;
74
112
  }
75
113
 
76
- .d0-card-frame > .menu-slot > .card-menu {
77
- padding: 0.75rem 0;
114
+ .card-menu {
115
+ position: absolute;
116
+ right: 8px;
117
+ top: 5px;
78
118
  }
79
119
 
80
- .menu-slot {
81
- width: 100%;
82
- //position: relative;
83
-
84
- span.menu-item-label {
85
- margin-left: 5px;
86
- }
87
-
88
- .card-menu {
89
- position: absolute;
90
- right: 8px;
91
- > .btn-group {
92
- z-index: 1;
93
-
94
- &.show {
95
- z-index: 2;
96
- }
97
- }
98
-
99
- li {
100
- white-space: nowrap;
101
- text-align: left;
102
- }
103
- .dropdown-menu {
104
- right: -2px;
105
- top: 18px;
106
- min-width: 110px;
107
- .dropdown-item{
108
- padding-left: 0.8rem;
109
- }
110
- }
111
- .dropdown-menu:before {
112
- content: "";
113
- width: 0;
114
- height: 0;
115
- border-left: 5px solid transparent;
116
- border-right: 5px solid transparent;
117
- border-bottom: 5px solid white;
118
- position: absolute;
119
- top: -5px;
120
- right: 2px;
121
- }
122
- }
123
-
124
- .vertical-card-menu .dropdown-menu {
125
- //z-index: 2;
120
+ .d0-card-content, .titled-view > .d0-card-header {
121
+ > .card-menu {
122
+ top: 0px;
126
123
  }
124
+ }
127
125
 
128
- .horizontal-card-menu {
129
- z-index: 100;
130
- li {
131
- height: 30px;
132
- }
133
- .btn {
134
- padding: 6px 12px;
135
- }
136
- }
126
+ .with-menu {
127
+ padding-right: 12px;
137
128
  }
138
129
 
139
130
  .d0-card-frame-title {
@@ -144,16 +135,8 @@ $d-yellow-2: #ffa;
144
135
  z-index: 1005;
145
136
  }
146
137
 
147
- .navbar.toolbar {
148
- margin-bottom: 0;
149
- .collapse > .navbar-form.navbar-left {
150
- //padding-left: 0px;
151
- }
152
- }
153
-
154
- .navbar .btn.btn-toolbar-control {
155
- padding: 5px;
156
- border: none;
138
+ .ui-front {
139
+ z-index: 2000!important;
157
140
  }
158
141
 
159
142
  .navbar-divide {
@@ -171,6 +154,11 @@ $d-yellow-2: #ffa;
171
154
  }
172
155
  }
173
156
 
157
+ .nav-logo {
158
+ max-width: 75px;
159
+ max-height: 75px;
160
+ }
161
+
174
162
  /*-- closed and labeled views --*/
175
163
 
176
164
  .closed-view {
@@ -183,12 +171,10 @@ $d-yellow-2: #ffa;
183
171
  position: static;
184
172
  width:100%;
185
173
  > .d0-card-header{
186
- float: left;
174
+ // float: left;
187
175
  }
188
176
  }
189
- .card-menu.btn-group {
190
- display: none;
191
- }
177
+
192
178
  .d0-card-frame {
193
179
  display: inline-block;
194
180
  }
@@ -327,13 +313,6 @@ in your skin. Choosing (b) will mean your CSS will not be affected by automated
327
313
  /*- DYNAMIC ELEMENTS - */
328
314
  /*-------------------- */
329
315
 
330
-
331
- /* related view (used by many menu items, such as "referred to by") */
332
-
333
- .ALL.related-view > .d0-card-frame > .d0-card-body {
334
- padding: 0;
335
- }
336
-
337
316
  /* navboxes */
338
317
 
339
318
  .navbox-item-label {
@@ -377,6 +356,7 @@ in your skin. Choosing (b) will mean your CSS will not be affected by automated
377
356
 
378
357
  .labeled-view {
379
358
  padding: 5px 0;
359
+ max-width: 100%;
380
360
  .labeled-content {
381
361
  font-weight: bold;
382
362
  .pointer-list,
@@ -427,8 +407,6 @@ textarea {
427
407
  white-space: nowrap;
428
408
  }
429
409
 
430
-
431
-
432
410
  .pointer-list-editor {
433
411
  margin: 0px;
434
412
  padding: 0px;
@@ -499,7 +477,7 @@ a.missing-link {
499
477
  /*- Lists - */
500
478
  /*-------------------- */
501
479
 
502
- .pointer-radio-list {
480
+ .pointer-radio-list, .filtered-list-review {
503
481
  list-style-type: none;
504
482
  }
505
483
 
@@ -544,6 +522,8 @@ ul.pointer {
544
522
 
545
523
  $diff-green: #41ad41;
546
524
  $diff-red: #ff5050;
525
+ $diff-red-bg: lighten($diff-red, 30%);
526
+ $diff-green-bg: lighten($diff-green, 50%);
547
527
 
548
528
  .history-slot {
549
529
  overflow: hidden;
@@ -561,12 +541,15 @@ $diff-red: #ff5050;
561
541
  .diff-deleted {
562
542
  text-decoration: line-through;
563
543
  color: $diff-red;
544
+ background: $diff-red-bg;
564
545
  img {
565
546
  border: 2px solid $diff-red;
566
547
  }
567
548
  }
568
549
  .diff-added {
569
550
  color: $diff-green;
551
+ background: $diff-green-bg;
552
+ text-decoration: none;
570
553
  img {
571
554
  margin: 0px 4px 0px 4px;
572
555
  border: 2px solid $diff-green;
@@ -576,27 +559,37 @@ $diff-red: #ff5050;
576
559
  ul.action-list {
577
560
  list-style-type: none;
578
561
  padding-left: 15px;
562
+ li {
563
+ border: 1px solid $border-color;
564
+ }
579
565
  li:before {
580
566
  font-family: 'Material Icons';
581
567
  float: left;
582
- margin-top: 4px;
583
- margin-left: -17px;
568
+ margin-top: 8px;
569
+ margin-left: -2rem;
570
+ font-size: 120%;
571
+ padding-left: 4px;
584
572
  }
585
573
 
586
574
  li.update:before {
587
575
  content: "edit";
576
+ color: $gray-600;
588
577
  }
589
578
 
590
579
  li.create:before {
591
- content: "add";
580
+ content: "add_circle";
581
+ color: $diff-green;
582
+
592
583
  }
593
584
 
594
585
  li.delete:before {
595
- content: "delete";
586
+ content: "remove_circle";
587
+ color: $diff-red;
596
588
  }
597
589
 
598
590
  li.draft:before {
599
591
  content: "build";
592
+ color: $gray-600;
600
593
  }
601
594
  }
602
595
 
@@ -610,18 +603,6 @@ ul.action-list {
610
603
  .exception p {
611
604
  margin: 15px;
612
605
  }
613
- .errors-view {
614
- margin: 10px;
615
- padding: 10px;
616
- border: 3px solid $red; /* NOTGREY - red for error */
617
- background: $d-yellow-2; /* NOTGREY - yellow for highlighting */
618
- border-radius: 8px;
619
- -moz-border-radius: 8px;
620
- border: 1px solid #777;
621
- border-bottom: 2px solid $gray-600;
622
- border-right: 2px solid $gray-600;
623
- color: #333;
624
- }
625
606
 
626
607
  .card-notice {
627
608
  background: $white;
@@ -629,8 +610,11 @@ ul.action-list {
629
610
  font-style: italic;
630
611
  text-align: center;
631
612
  margin: 0 0 4px 0;
632
- }
633
613
 
614
+ .card-error-msg {
615
+ text-align: left;
616
+ }
617
+ }
634
618
 
635
619
  #credit, /* these are both deprecated */
636
620
  .flash-notice {
@@ -643,7 +627,6 @@ ul.action-list {
643
627
  text-align: center;
644
628
  }
645
629
 
646
-
647
630
  .conflict-view {
648
631
  text-align: left;
649
632
  border: 1px solid $gray-400;
@@ -706,7 +689,6 @@ ul.action-list {
706
689
  /*- SETS, SETTINGS, RULES - */
707
690
  /*-------------------------- */
708
691
 
709
-
710
692
  .setting-rules,
711
693
  .set-rules {
712
694
  width: 100%;
@@ -855,7 +837,7 @@ h2.set-label {
855
837
  /*-------------------------- */
856
838
 
857
839
  .ui-menu-icons .ui-menu-item a {
858
- padding-left: 0;
840
+ padding-left: 0;
859
841
  }
860
842
 
861
843
  .ui-icon {
@@ -929,7 +911,10 @@ a.external-link,
929
911
 
930
912
  > .d0-card-header {
931
913
  padding: 0.25rem 0.25rem 0.25rem 1.25rem;
932
-
914
+ .title {
915
+ font-weight: bold;
916
+ text-transform: capitalize;
917
+ }
933
918
  .card-title {
934
919
  margin-bottom: 0;
935
920
  }
@@ -944,3 +929,145 @@ a.external-link,
944
929
  ._filter_container .input-group-btn .btn {
945
930
  height: 100%;
946
931
  }
932
+
933
+
934
+ // Editor
935
+ .w-50px {
936
+ width: 50px;
937
+ }
938
+
939
+ .edit-link {
940
+ color: inherit;
941
+ }
942
+
943
+ // Bridge
944
+ ._modal-stack {
945
+ z-index: 1010;
946
+ }
947
+
948
+ .modal-header .card-title {
949
+ margin-bottom: 0;
950
+ }
951
+
952
+ .modal-dialog.no-gaps > .modal-content {
953
+ > .modal-body {
954
+ padding: 0;
955
+ }
956
+ > .modal-header > nav > ol.breadcrumb {
957
+ margin-bottom: 0;
958
+ padding: 0.2rem 0.3rem;
959
+ }
960
+ }
961
+
962
+ $bridge-line-color: $gray-300;
963
+
964
+ .bridge-main {
965
+ border-right: 1px solid $bridge-line-color;
966
+ }
967
+
968
+ .bridge-sidebar {
969
+ background-color: $gray-100;
970
+ padding-left: 0;
971
+ padding-right: 0;
972
+ min-height: calc(100vh - 90px);
973
+ }
974
+
975
+ .bridge-main {
976
+ padding-left: 0;
977
+ padding-right: 0;
978
+ > .bridge-view {
979
+ padding-top: 10px;
980
+ }
981
+ > .bridge-view, > .overlay-container > .bridge-view {
982
+ padding-left: 15px;
983
+ padding-right: 15px;
984
+ }
985
+ }
986
+
987
+ .overlay-container {
988
+ .card-slot.overlay_rule-view {
989
+ border-left: 5px solid $primary;
990
+ }
991
+
992
+ .d0-card-overlay
993
+ > .d0-card-frame
994
+ > .d0-card-content {
995
+ overflow-y: scroll;
996
+ height: 100%;
997
+ padding: 0 1.5rem; // px-4
998
+ }
999
+ }
1000
+
1001
+
1002
+ .d0-card-overlay > .d0-card-frame > .d0-card-header {
1003
+ border-bottom: 1px solid $bridge-line-color;
1004
+ padding-left: -15px!important;
1005
+ padding-right: -15px!important;
1006
+ }
1007
+
1008
+ .bridge-pills > .nav-item > a {
1009
+ background-color: $list-group-bg;
1010
+ border: 1px solid $list-group-border-color;
1011
+ border-left: 3px solid $list-group-border-color;
1012
+ margin-bottom: -1px;
1013
+ &:hover, &.active {
1014
+ border-left-color: $list-group-active-bg;
1015
+ }
1016
+ }
1017
+
1018
+ .nav-pills .nav-link.active .help-text {
1019
+ color: lighten($primary, 40%);
1020
+ }
1021
+
1022
+ .overlay-container {
1023
+ height: 100%;
1024
+ overflow: hidden;
1025
+ }
1026
+
1027
+ .help-text.rule-instruction > div p:last-child {
1028
+ margin-bottom: 0;
1029
+ }
1030
+
1031
+ .bridge {
1032
+ .perm-editor {
1033
+ margin-left: 0;
1034
+ }
1035
+
1036
+ .set-editor {
1037
+ ul {
1038
+ background: $white;
1039
+ padding-left: 0;
1040
+ margin-left: 15px;
1041
+
1042
+ &:first-child {
1043
+ margin-left: 0;
1044
+ }
1045
+ }
1046
+ li.radio {
1047
+ padding: 10px 0px 0px 15px;
1048
+ border-left: 1px solid $bridge-line-color;
1049
+ border-top: 1px solid $bridge-line-color;
1050
+ margin-top: 10px;
1051
+ }
1052
+ }
1053
+
1054
+ .bridge-sidebar {
1055
+ .d0-card-header-title > .card-title {
1056
+ font-size: 1rem;
1057
+ }
1058
+ }
1059
+ }
1060
+
1061
+ .text-muted-link {
1062
+ color: $text-muted;
1063
+ }
1064
+
1065
+ // decko logo
1066
+
1067
+ [id^='svg-card-'] use{ // all cards
1068
+ fill: $primary;
1069
+ }
1070
+
1071
+ [id^='svg-card-']:nth-child(even) use { // even cards
1072
+ fill: $secondary;
1073
+ }