beyond_canvas 0.15.3.pre → 0.18.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -6
  3. data/Rakefile +3 -3
  4. data/app/assets/config/beyond_canvas_manifest.js +1 -0
  5. data/app/assets/images/icons/arrow_right.svg +1 -0
  6. data/app/assets/images/icons/close.svg +1 -0
  7. data/app/assets/images/icons/home.svg +1 -0
  8. data/app/assets/javascripts/beyond_canvas/base.js +120 -246
  9. data/app/assets/stylesheets/beyond_canvas/base.scss +10 -1
  10. data/app/assets/stylesheets/beyond_canvas/components/_action_bar.scss +28 -0
  11. data/app/assets/stylesheets/beyond_canvas/components/_breadcrumbs.scss +29 -0
  12. data/app/assets/stylesheets/beyond_canvas/components/_buttons.scss +1 -1
  13. data/app/assets/stylesheets/beyond_canvas/components/_debug.scss +10 -0
  14. data/app/assets/stylesheets/beyond_canvas/components/_forms.scss +11 -14
  15. data/app/assets/stylesheets/beyond_canvas/components/_grids.scss +12 -0
  16. data/app/assets/stylesheets/beyond_canvas/components/_main.scss +12 -13
  17. data/app/assets/stylesheets/beyond_canvas/components/_margins.scss +8 -0
  18. data/app/assets/stylesheets/beyond_canvas/components/_menu.scss +40 -0
  19. data/app/assets/stylesheets/beyond_canvas/components/_modals.scss +35 -0
  20. data/app/assets/stylesheets/beyond_canvas/components/_scrollbox.scss +35 -0
  21. data/app/assets/stylesheets/beyond_canvas/components/_sidebar.scss +53 -0
  22. data/app/assets/stylesheets/beyond_canvas/components/_titles.scss +7 -0
  23. data/app/assets/stylesheets/beyond_canvas/settings/_breakpoints.scss +6 -6
  24. data/app/assets/stylesheets/beyond_canvas/settings/_variables.scss +77 -22
  25. data/app/controllers/beyond_canvas/application_controller.rb +2 -0
  26. data/app/controllers/beyond_canvas/authentications_controller.rb +69 -0
  27. data/app/controllers/concerns/beyond_canvas/authentication.rb +13 -0
  28. data/app/controllers/concerns/beyond_canvas/locale_management.rb +5 -4
  29. data/app/helpers/beyond_canvas/authentications_helper.rb +28 -0
  30. data/app/helpers/beyond_canvas/cockpit_app_helper.rb +17 -0
  31. data/app/helpers/beyond_canvas/debug_helper.rb +9 -0
  32. data/app/helpers/beyond_canvas/locale_switch_helper.rb +5 -1
  33. data/app/javascript/beyond_canvas/base.js +3 -0
  34. data/app/javascript/beyond_canvas/initializers/buttons.js +65 -19
  35. data/app/javascript/beyond_canvas/initializers/flash.js +9 -2
  36. data/app/javascript/beyond_canvas/initializers/inputs.js +4 -1
  37. data/app/javascript/beyond_canvas/initializers/modals.js +14 -0
  38. data/app/views/beyond_canvas/authentications/new.html.erb +27 -0
  39. data/app/views/beyond_canvas/shared/_action_bar.html.erb +15 -0
  40. data/app/views/beyond_canvas/shared/_breadcrumbs.html.erb +14 -0
  41. data/app/views/beyond_canvas/shared/_flash.html.erb +22 -12
  42. data/app/views/beyond_canvas/shared/_locales.html.erb +8 -0
  43. data/app/views/beyond_canvas/shared/_menu.html.erb +31 -0
  44. data/app/views/beyond_canvas/shared/_modal.html.erb +6 -0
  45. data/app/views/beyond_canvas/shared/_sidebar.html.erb +16 -0
  46. data/app/views/layouts/beyond_canvas/application.html.erb +31 -0
  47. data/app/views/layouts/beyond_canvas/public.html.erb +10 -1
  48. data/config/locales/en.yml +9 -0
  49. data/config/routes.rb +8 -1
  50. data/lib/beyond_canvas.rb +18 -2
  51. data/lib/beyond_canvas/configuration.rb +11 -3
  52. data/lib/beyond_canvas/engine.rb +6 -0
  53. data/lib/beyond_canvas/menu_item_registration.rb +19 -0
  54. data/lib/beyond_canvas/parameter_sanitizer.rb +43 -0
  55. data/lib/beyond_canvas/rails/routes.rb +22 -0
  56. data/lib/beyond_canvas/version.rb +1 -1
  57. data/lib/generators/beyond_canvas/controller/controller_generator.rb +19 -0
  58. data/lib/generators/beyond_canvas/controller/templates/controller.erb +20 -0
  59. data/lib/generators/beyond_canvas/custom_menu/custom_menu_generator.rb +13 -0
  60. data/lib/generators/beyond_canvas/custom_menu/templates/beyond_canvas_custom_menu.html.erb +32 -0
  61. data/lib/generators/beyond_canvas/custom_styles/custom_styles_generator.rb +1 -1
  62. data/lib/generators/beyond_canvas/custom_styles/templates/beyond_canvas_custom_styles.scss +199 -0
  63. data/lib/generators/beyond_canvas/install/install_generator.rb +13 -5
  64. data/lib/generators/beyond_canvas/install/templates/beyond_canvas.rb.erb +55 -6
  65. data/lib/generators/beyond_canvas/model/model_generator.rb +49 -0
  66. data/lib/generators/beyond_canvas/model/templates/migration.erb +18 -0
  67. data/lib/generators/beyond_canvas/model/templates/model.erb +5 -0
  68. data/lib/generators/beyond_canvas/views/views_generator.rb +17 -0
  69. data/lib/models/concerns/authentication.rb +57 -0
  70. data/lib/models/concerns/utils.rb +79 -0
  71. data/lib/models/shop.rb +12 -0
  72. metadata +97 -12
  73. data/app/javascript/beyond_canvas/initializers/functions.js +0 -41
  74. data/app/views/beyond_canvas/locales/_edit.html.erb +0 -8
  75. data/lib/generators/beyond_canvas/custom_styles/templates/beyond_canvas_custom_styles.sass +0 -123
@@ -1,41 +0,0 @@
1
- const SPINNER_ANIMATION_TIMEOUT = 125;
2
-
3
- export function showSpinner(button) {
4
- // Adjust the width of the button
5
- button.width(button.width() + $('.spinner').outerWidth(true));
6
- // Show the spinner
7
- setTimeout(function () {
8
- button.find('.spinner').css('display', 'flex');
9
- }, SPINNER_ANIMATION_TIMEOUT);
10
- }
11
-
12
- export function hideSpinner() {
13
- $('button[class^="button"]').each(function (_, button) {
14
- setTimeout(function () {
15
- // Hide the spinner
16
- $(button).find('.spinner').hide();
17
- // Adjust the width of the button
18
- $(button).width($(button).data('oldWidth'));
19
- }, SPINNER_ANIMATION_TIMEOUT);
20
- });
21
- }
22
-
23
- export function disableActionElements() {
24
- $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function (_, button) {
25
- $(button).addClass('actions--disabled');
26
- });
27
- }
28
- export function enableActionElements() {
29
- $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function (_, button) {
30
- $(button).removeClass('actions--disabled');
31
- });
32
- }
33
-
34
- export function closeAlert() {
35
- $('.flash')
36
- .removeClass('flash--shown')
37
- .delay(700)
38
- .queue(function () {
39
- $(this).remove();
40
- });
41
- }
@@ -1,8 +0,0 @@
1
- <% if defined?(I18n) && I18n.available_locales.count > 1 %>
2
- <%= form_for :system, url: beyond_canvas.update_locale_path, method: :put do |f| %>
3
- <%= f.select :locale, I18n.available_locales.collect { |l| [translate_locale(l), l] },
4
- { selected: cookies[:locale] },
5
- class: 'select--locale',
6
- onchange: 'this.form.submit()' %>
7
- <% end %>
8
- <% end %>
@@ -1,123 +0,0 @@
1
- // ************************************************************
2
- // Colors
3
- // ************************************************************
4
-
5
- // $palette-primary: rgb(78, 183, 168)
6
- // $palette-secondary: rgb(28, 53, 69)
7
- // $palette-cancel: rgb(153, 153, 153)
8
- // $palette-danger: rgb(218, 60, 60)
9
-
10
- // ************************************************************
11
- // General styles
12
- // ************************************************************
13
-
14
- // $main-background: rgb(233, 232, 220)
15
-
16
- // ************************************************************
17
- // Typography
18
- // ************************************************************
19
-
20
- // $main-color: rgb(62, 62, 62)
21
-
22
- // ************************************************************
23
- // Headlines
24
- // ************************************************************
25
-
26
- // $headline-color: rgb(122, 118, 76)
27
-
28
- // ************************************************************
29
- // Links
30
- // ************************************************************
31
-
32
- // $link-primary-color: darken($palette-primary, 10%)
33
- // $link-secondary-color: darken($palette-cancel, 10%)
34
- // $link-danger-color: darken($palette-danger, 10%)
35
-
36
- // ************************************************************
37
- // Buttons
38
- // ************************************************************
39
-
40
- // $button-primary-background: $palette-primary
41
- // $button-primary-color: $white
42
-
43
- // $button-secondary-background: $palette-cancel
44
- // $button-secondary-color: $white
45
-
46
- // $button-danger-background: $palette-danger
47
- // $button-danger-color: $white
48
-
49
- // $button-border-radius: 3px
50
- // $button-box-shadow: true
51
-
52
- // ************************************************************
53
- // Cards
54
- // ************************************************************
55
-
56
- // $card-border-radius: 3px
57
- // $card-box-shadow: 0 2px 7px rgba($black, .2)
58
- // $card-separator-color: rgb(222, 222, 222)
59
- // $card-title-color: rgb(247, 133, 96)
60
-
61
- // ************************************************************
62
- // Labels
63
- // ************************************************************
64
-
65
- // $label-color: rgb(128, 128, 128)
66
-
67
- // ************************************************************
68
- // Inputs
69
- // ************************************************************
70
-
71
- // $input-border-color: rgb(217, 216, 195)
72
- // $input-border-color-focus: $palette-primary
73
- // $input-errors-color: $palette-danger
74
-
75
- // ************************************************************
76
- // Hints
77
- // ************************************************************
78
-
79
- // $hint-color: rgb(158, 158, 158)
80
-
81
- // ************************************************************
82
- // Logo
83
- // ************************************************************
84
-
85
- // $logo-margin-top-public: 0
86
- // $logo-margin-bottom-public: 34px
87
-
88
- // ************************************************************
89
- // Flash
90
- // ************************************************************
91
-
92
- // $flash-success: rgb(123, 170, 81)
93
- // $flash-info: rgb(90, 129, 171)
94
- // $flash-warning: rgb(193, 179, 26)
95
- // $flash-error: rgb(162, 66, 60)
96
- // $flash-border-radius: 4px
97
- // $flash-box-shadow: 0 1px 2px 0 rgba($black, 0.2)
98
- // $flash-color: rgb(128, 128, 128)
99
-
100
- // ************************************************************
101
- // Tables
102
- // ************************************************************
103
-
104
- // $table-header-background: rgb(243, 242, 236)
105
- // $table-border-color: rgb(233, 232, 220)
106
-
107
- // ************************************************************
108
- // Comments
109
- // ************************************************************
110
-
111
- // $comment-background: rgb(246, 246, 243)
112
- // $comment-color: rgb(170, 169, 156)
113
-
114
- // ************************************************************
115
- // Notices
116
- // ************************************************************
117
-
118
- // $notice-success-background: rgb(123, 170, 81)
119
- // $notice-info-background: rgb(90, 129, 171)
120
- // $notice-warning-background: rgb(193, 179, 26)
121
- // $notice-error-background: rgb(162, 66, 60)
122
- // $notice-border-radius: 4px
123
- // $notice-color: rgb(255, 255, 255)