integral 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -30
  3. data/Rakefile +1 -1
  4. data/app/assets/images/integral/defaults/no_image_available.jpg +0 -0
  5. data/app/assets/javascripts/integral/backend.js +102 -11
  6. data/app/assets/javascripts/integral/frontend.js +37 -0
  7. data/app/assets/javascripts/integral/support/confirm_modal.coffee +2 -2
  8. data/app/assets/javascripts/integral/support/gallery.coffee +71 -54
  9. data/app/assets/javascripts/integral/support/lib/lazysizes.js +755 -0
  10. data/app/assets/javascripts/integral/support/lib/materialize-tags.js +49 -44
  11. data/app/assets/javascripts/integral/support/ls.instagram.js +57 -0
  12. data/app/assets/javascripts/integral/support/ls.twitter.js +66 -0
  13. data/app/assets/javascripts/integral/support/record_selector.coffee +1 -1
  14. data/app/assets/javascripts/integral/support/remote_form.coffee +5 -2
  15. data/app/assets/stylesheets/integral/backend.sass +2 -1
  16. data/app/assets/stylesheets/integral/backend/_foundation_settings.scss +3 -4
  17. data/app/assets/stylesheets/integral/backend/dashboard-layout.scss +4 -1
  18. data/app/assets/stylesheets/integral/backend/materialize-tags.sass +1 -1
  19. data/app/assets/stylesheets/integral/backend/modules/timeline.scss +214 -0
  20. data/app/assets/stylesheets/integral/backend/shared.sass +80 -11
  21. data/app/assets/stylesheets/integral/frontend.scss +45 -0
  22. data/app/assets/stylesheets/integral/frontend/_foundation_settings.scss +2 -2
  23. data/app/assets/stylesheets/integral/frontend/blog.sass +155 -142
  24. data/app/assets/stylesheets/integral/frontend/layout.sass +3 -3
  25. data/app/assets/stylesheets/integral/frontend/modules/article-footer.scss +55 -0
  26. data/app/assets/stylesheets/integral/frontend/modules/article.scss +34 -0
  27. data/app/assets/stylesheets/integral/frontend/modules/horizontal-post.scss +44 -0
  28. data/app/assets/stylesheets/integral/frontend/modules/inline-articles.scss +23 -0
  29. data/app/assets/stylesheets/integral/frontend/modules/latest-post.scss +37 -0
  30. data/app/assets/stylesheets/integral/frontend/modules/list-widget.scss +50 -0
  31. data/app/assets/stylesheets/integral/frontend/modules/piped-list.scss +33 -0
  32. data/app/assets/stylesheets/integral/frontend/modules/post-tags.scss +19 -0
  33. data/app/assets/stylesheets/integral/frontend/modules/scroll-container.scss +9 -0
  34. data/app/assets/stylesheets/integral/frontend/modules/sidebar-articles.scss +42 -0
  35. data/app/assets/stylesheets/integral/frontend/modules/sidebar-tags.scss +6 -0
  36. data/app/assets/stylesheets/integral/frontend/modules/sidebar-widget.scss +47 -0
  37. data/app/assets/stylesheets/integral/frontend/modules/vertical-post.scss +31 -0
  38. data/app/assets/stylesheets/integral/frontend/share_modal.sass +0 -5
  39. data/app/assets/stylesheets/integral/support/gallery.sass +8 -0
  40. data/app/assets/stylesheets/integral/support/media-query-indicator.sass +6 -0
  41. data/app/controllers/integral/application_controller.rb +7 -1
  42. data/app/controllers/integral/backend/activities_controller.rb +13 -2
  43. data/app/controllers/integral/backend/base_controller.rb +60 -7
  44. data/app/controllers/integral/backend/categories_controller.rb +49 -0
  45. data/app/controllers/integral/backend/pages_controller.rb +7 -2
  46. data/app/controllers/integral/backend/posts_controller.rb +8 -3
  47. data/app/controllers/integral/backend/static_pages_controller.rb +4 -0
  48. data/app/controllers/integral/backend/users_controller.rb +13 -7
  49. data/app/controllers/integral/categories_controller.rb +31 -0
  50. data/app/controllers/integral/pages_controller.rb +1 -1
  51. data/app/controllers/integral/posts_controller.rb +5 -3
  52. data/app/decorators/integral/category_decorator.rb +30 -0
  53. data/app/decorators/integral/category_version_decorator.rb +7 -0
  54. data/app/decorators/integral/image_version_decorator.rb +7 -0
  55. data/app/decorators/integral/list_decorator.rb +1 -1
  56. data/app/decorators/integral/list_version_decorator.rb +7 -0
  57. data/app/decorators/integral/page_version_decorator.rb +7 -0
  58. data/app/decorators/integral/post_decorator.rb +9 -1
  59. data/app/decorators/integral/post_version_decorator.rb +7 -0
  60. data/app/decorators/integral/user_decorator.rb +1 -1
  61. data/app/decorators/integral/user_version_decorator.rb +7 -0
  62. data/app/decorators/integral/version_decorator.rb +51 -12
  63. data/app/helpers/integral/backend/base_helper.rb +56 -2
  64. data/app/helpers/integral/blog_helper.rb +21 -4
  65. data/app/jobs/integral/webhook/delivery_job.rb +37 -0
  66. data/app/mailers/integral/contact_mailer.rb +4 -1
  67. data/app/models/concerns/integral/lazy_contentable.rb +54 -0
  68. data/app/models/concerns/integral/webhook/delivery.rb +30 -0
  69. data/app/models/concerns/integral/webhook/observable.rb +23 -0
  70. data/app/models/integral/category.rb +20 -0
  71. data/app/models/integral/category_version.rb +8 -0
  72. data/app/models/integral/list_item.rb +1 -2
  73. data/app/models/integral/page.rb +18 -3
  74. data/app/models/integral/post.rb +28 -1
  75. data/app/models/integral/version.rb +2 -2
  76. data/app/models/integral/webhook/endpoint.rb +40 -0
  77. data/app/models/integral/webhook/event.rb +20 -0
  78. data/app/policies/integral/base_policy.rb +1 -0
  79. data/app/policies/integral/category_policy.rb +9 -0
  80. data/app/serializers/integral/post_serializer.rb +24 -0
  81. data/app/uploaders/integral/avatar_uploader.rb +1 -1
  82. data/app/views/integral/backend/activities/_activity.haml +21 -0
  83. data/app/views/integral/backend/activities/_grid.haml +1 -2
  84. data/app/views/integral/backend/activities/shared/_grid.haml +3 -2
  85. data/app/views/integral/backend/activities/shared/{_listing.haml → index.haml} +1 -0
  86. data/app/views/integral/backend/activities/shared/{_log.haml → show.haml} +0 -0
  87. data/app/views/integral/backend/categories/_modal.haml +25 -0
  88. data/app/views/integral/backend/lists/_child_fields.haml +1 -1
  89. data/app/views/integral/backend/lists/_item_container.haml +1 -1
  90. data/app/views/integral/backend/lists/_item_modal.haml +1 -1
  91. data/app/views/integral/backend/lists/_list_item_fields.haml +1 -1
  92. data/app/views/integral/backend/pages/_form.haml +1 -4
  93. data/app/views/integral/backend/pages/_grid.haml +34 -9
  94. data/app/views/integral/backend/pages/edit.haml +9 -3
  95. data/app/views/integral/backend/pages/index.haml +11 -21
  96. data/app/views/integral/backend/pages/list.haml +22 -0
  97. data/app/views/integral/backend/pages/show.haml +48 -0
  98. data/app/views/integral/backend/posts/_form.haml +8 -6
  99. data/app/views/integral/backend/posts/_grid.haml +33 -7
  100. data/app/views/integral/backend/posts/index.haml +13 -19
  101. data/app/views/integral/backend/posts/list.haml +20 -0
  102. data/app/views/integral/backend/posts/show.haml +54 -0
  103. data/app/views/integral/backend/shared/_activity_modal.haml +13 -0
  104. data/app/views/integral/backend/shared/cards/_categories.haml +34 -0
  105. data/app/views/integral/backend/{static_pages/_card.haml → shared/cards/_object.haml} +0 -0
  106. data/app/views/integral/backend/shared/cards/_recent_activity.haml +20 -0
  107. data/app/views/integral/backend/shared/cards/_recent_pages.haml +19 -0
  108. data/app/views/integral/backend/shared/cards/_recent_posts.haml +18 -0
  109. data/app/views/integral/backend/shared/cards/_recent_user_activity.haml +1 -0
  110. data/app/views/integral/backend/shared/cards/_recent_users.haml +19 -0
  111. data/app/views/integral/backend/shared/cards/_top_post_authors.haml +19 -0
  112. data/app/views/integral/backend/shared/record_selector/_record.haml +6 -4
  113. data/app/views/integral/backend/static_pages/dashboard.haml +13 -11
  114. data/app/views/integral/backend/users/_grid.haml +24 -7
  115. data/app/views/integral/backend/users/index.haml +11 -17
  116. data/app/views/integral/backend/users/list.haml +18 -0
  117. data/app/views/integral/backend/users/show.haml +5 -11
  118. data/app/views/integral/categories/show.haml +5 -0
  119. data/app/views/integral/posts/_article_footer.haml +17 -0
  120. data/app/views/integral/posts/_card.haml +11 -0
  121. data/app/views/integral/posts/_latest_post.haml +8 -0
  122. data/app/views/integral/posts/_most_read_section.haml +8 -0
  123. data/app/views/integral/posts/_post.haml +11 -0
  124. data/app/views/integral/posts/_similar_posts.haml +5 -0
  125. data/app/views/integral/posts/index.haml +6 -5
  126. data/app/views/integral/posts/templates/default.haml +34 -33
  127. data/app/views/integral/shared/_subscribe_modal.haml +14 -0
  128. data/app/views/integral/shared/blog/_categories.haml +15 -0
  129. data/app/views/integral/shared/blog/_layout.haml +9 -0
  130. data/app/views/integral/shared/blog/_sidebar.haml +10 -0
  131. data/app/views/integral/shared/gallery/_placeholder.haml +1 -1
  132. data/app/views/integral/shared/gallery/_slide.haml +2 -2
  133. data/app/views/integral/shared/gallery/gallery.haml +5 -2
  134. data/app/views/integral/shared/sidebar/_item.haml +8 -0
  135. data/app/views/integral/shared/sidebar/_newsletter_signup.haml +7 -0
  136. data/app/views/integral/shared/sidebar/_popular_posts.haml +7 -0
  137. data/app/views/integral/shared/sidebar/_popular_tags.haml +7 -0
  138. data/app/views/integral/shared/sidebar/_recent_posts.haml +7 -0
  139. data/app/views/integral/tags/index.haml +2 -2
  140. data/app/views/integral/tags/show.haml +3 -6
  141. data/app/views/layouts/integral/backend.html.haml +3 -0
  142. data/app/views/layouts/integral/backend/_main_menu_items.haml +10 -0
  143. data/app/views/layouts/integral/frontend.html.haml +3 -3
  144. data/config/locales/en.yml +52 -49
  145. data/db/migrate/20190414172018_create_webhook_endpoints.rb +10 -0
  146. data/db/migrate/20190929191412_add_integral_post_categories.rb +13 -0
  147. data/db/migrate/20191203090008_add_image_to_integral_categories.rb +6 -0
  148. data/db/migrate/20200401210442_create_category_versions.rb +20 -0
  149. data/db/seeds.rb +3 -1
  150. data/lib/generators/integral/assets_generator.rb +2 -2
  151. data/lib/generators/integral/install_generator.rb +1 -1
  152. data/lib/generators/integral/views_generator.rb +1 -1
  153. data/lib/generators/templates/integral.rb +5 -0
  154. data/lib/integral.rb +3 -30
  155. data/lib/integral/acts_as_listable.rb +2 -2
  156. data/lib/integral/chart_renderer/base.rb +2 -0
  157. data/lib/integral/content_renderer.rb +2 -2
  158. data/lib/integral/engine.rb +2 -2
  159. data/lib/integral/grids/activities_grid.rb +15 -1
  160. data/lib/integral/list_item_renderer.rb +4 -2
  161. data/lib/integral/list_renderer.rb +1 -0
  162. data/lib/integral/middleware/page_router.rb +15 -6
  163. data/lib/integral/router.rb +19 -3
  164. data/lib/integral/version.rb +1 -1
  165. data/lib/integral/widgets/swiper_list.rb +3 -2
  166. data/public/images/integral/demo/continous-integration.png +0 -0
  167. data/public/images/integral/demo/foundation-frontend-framework.jpg +0 -0
  168. data/public/images/integral/demo/heroku.png +0 -0
  169. data/public/images/integral/demo/integral-cms-without-hassle.jpg +0 -0
  170. data/public/images/integral/demo/integral-features-activity-tracking.jpg +0 -0
  171. data/public/images/integral/demo/integral-features-contact-form.png +0 -0
  172. data/public/images/integral/demo/integral-features-design.jpg +0 -0
  173. data/public/images/integral/demo/integral-features-dynamic-pages.jpg +0 -0
  174. data/public/images/integral/demo/integral-features-image-management.jpg +0 -0
  175. data/public/images/integral/demo/integral-features-integrated-blog.jpg +0 -0
  176. data/public/images/integral/demo/integral-features-list-management.jpg +0 -0
  177. data/public/images/integral/demo/integral-features-seo-ready.jpg +0 -0
  178. data/public/images/integral/demo/integral-features-user-management.jpg +0 -0
  179. data/public/images/integral/demo/integral-presentation.png +0 -0
  180. data/spec/factories.rb +15 -7
  181. metadata +110 -98
  182. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/copywidget.png +0 -0
  183. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/editwidget.png +0 -0
  184. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/copywidget.png +0 -0
  185. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/editwidget.png +0 -0
  186. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/removewidget.png +0 -0
  187. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/widget.png +0 -0
  188. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/removewidget.png +0 -0
  189. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/widget.png +0 -0
  190. data/app/assets/javascripts/ckeditor/plugins/integral-card/plugin.js +0 -86
  191. data/app/assets/javascripts/ckeditor/plugins/integralrecentposts/dialogs/integralrecentposts.js +0 -40
  192. data/app/assets/javascripts/ckeditor/plugins/integralrecentposts/plugin.js +0 -32
  193. data/app/assets/javascripts/ckeditor/plugins/numericinput/LICENSE.md +0 -363
  194. data/app/assets/javascripts/ckeditor/plugins/numericinput/README.md +0 -16
  195. data/app/assets/javascripts/ckeditor/plugins/numericinput/plugin.js +0 -354
  196. data/app/assets/stylesheets/integral/frontend.sass +0 -25
  197. data/app/views/integral/backend/pages/activities.haml +0 -2
  198. data/app/views/integral/backend/pages/activity.haml +0 -1
  199. data/app/views/integral/backend/posts/activities.haml +0 -3
  200. data/app/views/integral/backend/posts/activity.haml +0 -1
  201. data/app/views/integral/posts/_collection.haml +0 -4
  202. data/app/views/integral/posts/_item.haml +0 -16
  203. data/app/views/integral/shared/_blog_layout.haml +0 -15
  204. data/app/views/integral/shared/_blog_sidebar.haml +0 -49
  205. data/lib/integral/slack_bot.rb +0 -45
@@ -1,3 +1,4 @@
1
+ /* Modified Version of - https://github.com/henrychavez/materialize-tags/blob/1.0.0/src/materialize-tags.js */
1
2
  (function ($)
2
3
  {
3
4
  "use strict";
@@ -440,50 +441,50 @@
440
441
 
441
442
  switch (event.which)
442
443
  {
443
- // BACKSPACE
444
- case 8:
445
- if (doGetCaretPosition($input[0]) === 0)
446
- {
447
- var prev = $inputWrapper.prev();
448
- if (prev)
449
- {
450
- self.remove(prev.data('item'));
451
- }
452
- }
453
- break;
454
-
455
- // DELETE
456
- case 46:
457
- if (doGetCaretPosition($input[0]) === 0)
458
- {
459
- var next = $inputWrapper.next();
460
- if (next)
461
- {
462
- self.remove(next.data('item'));
463
- }
464
- }
465
- break;
466
-
467
- // LEFT ARROW
468
- case 37:
469
- // Try to move the input before the previous tag
470
- var $prevTag = $inputWrapper.prev();
471
- if ($input.val().length === 0 && $prevTag[0])
472
- {
473
- $prevTag.before($inputWrapper);
474
- $input.focus();
475
- }
476
- break;
477
- // RIGHT ARROW
478
- case 39:
479
- // Try to move the input after the next tag
480
- var $nextTag = $inputWrapper.next();
481
- if ($input.val().length === 0 && $nextTag[0])
482
- {
483
- $nextTag.after($inputWrapper);
484
- $input.focus();
485
- }
486
- break;
444
+ // // BACKSPACE
445
+ // case 8:
446
+ // if (doGetCaretPosition($input[0]) === 0)
447
+ // {
448
+ // var prev = $inputWrapper.prev();
449
+ // if (prev)
450
+ // {
451
+ // self.remove(prev.data('item'));
452
+ // }
453
+ // }
454
+ // break;
455
+ //
456
+ // // DELETE
457
+ // case 46:
458
+ // if (doGetCaretPosition($input[0]) === 0)
459
+ // {
460
+ // var next = $inputWrapper.next();
461
+ // if (next)
462
+ // {
463
+ // self.remove(next.data('item'));
464
+ // }
465
+ // }
466
+ // break;
467
+ //
468
+ // // LEFT ARROW
469
+ // case 37:
470
+ // // Try to move the input before the previous tag
471
+ // var $prevTag = $inputWrapper.prev();
472
+ // if ($input.val().length === 0 && $prevTag[0])
473
+ // {
474
+ // $prevTag.before($inputWrapper);
475
+ // $input.focus();
476
+ // }
477
+ // break;
478
+ // // RIGHT ARROW
479
+ // case 39:
480
+ // // Try to move the input after the next tag
481
+ // var $nextTag = $inputWrapper.next();
482
+ // if ($input.val().length === 0 && $nextTag[0])
483
+ // {
484
+ // $nextTag.after($inputWrapper);
485
+ // $input.focus();
486
+ // }
487
+ // break;
487
488
  default:
488
489
  // ignore
489
490
  }
@@ -515,6 +516,10 @@
515
516
  event.preventDefault();
516
517
  }
517
518
 
519
+ if (!self.options.freeInput && keyCombinationInList(event, self.options.confirmKeys)) {
520
+ event.preventDefault();
521
+ }
522
+
518
523
  // Reset internal input's size
519
524
  var textLength = $input.val().length,
520
525
  wordSpace = Math.ceil(textLength / 5),
@@ -0,0 +1,57 @@
1
+ /* LazySizes Plugin for Instagram created from the Twitter plugin */
2
+ (function(window, factory) {
3
+ if(!window) {return;}
4
+ var globalInstall = function(){
5
+ factory(window.lazySizes);
6
+ window.removeEventListener('lazyunveilread', globalInstall, true);
7
+ };
8
+
9
+ factory = factory.bind(null, window, window.document);
10
+
11
+ if(typeof module == 'object' && module.exports){
12
+ factory(require('lazysizes'));
13
+ } else if(window.lazySizes) {
14
+ globalInstall();
15
+ } else {
16
+ window.addEventListener('lazyunveilread', globalInstall, true);
17
+ }
18
+ }(typeof window != 'undefined' ?
19
+ window : 0, function(window, document, lazySizes) {
20
+ /*
21
+ @example
22
+ <blockquote class="lazyload" data-instagram="instagram" data-lang="en"><p lang="en" dir="ltr">Nothing Twitter is doing is working <a href="https://t.co/s0FppnacwK">https://t.co/s0FppnacwK</a> <a href="https://t.co/GK9MRfQkYO">pic.twitter.com/GK9MRfQkYO</a></p>&mdash; The Verge (@verge) <a href="https://twitter.com/verge/status/725096763972001794">April 26, 2016</a></blockquote>
23
+ */
24
+ 'use strict';
25
+ var instagramScriptAdded;
26
+
27
+ function loadExecuteInstagram(){
28
+ // if(window.twttr && twttr.widgets){
29
+ // twttr.widgets.load();
30
+ // return;
31
+ // }
32
+
33
+ if(instagramScriptAdded){
34
+ return;
35
+ }
36
+
37
+ var elem = document.createElement('script');
38
+ var insertElem = document.getElementsByTagName('script')[0];
39
+
40
+ elem.src = '//www.instagram.com/embed.js';
41
+
42
+ instagramScriptAdded = true;
43
+ insertElem.parentNode.insertBefore(elem, insertElem);
44
+ }
45
+
46
+ document.addEventListener('lazybeforeunveil', function(e){
47
+ if(e.detail.instance != lazySizes){return;}
48
+
49
+ var twttrWidget = e.target.getAttribute('data-instagram');
50
+
51
+ if(twttrWidget){
52
+ lazySizes.aC(e.target, twttrWidget);
53
+ loadExecuteInstagram();
54
+ }
55
+ });
56
+
57
+ }));
@@ -0,0 +1,66 @@
1
+ /* 5.2.0 - https://github.com/aFarkas/lazysizes */
2
+ (function(window, factory) {
3
+ if(!window) {return;}
4
+ var globalInstall = function(){
5
+ factory(window.lazySizes);
6
+ window.removeEventListener('lazyunveilread', globalInstall, true);
7
+ };
8
+
9
+ factory = factory.bind(null, window, window.document);
10
+
11
+ if(typeof module == 'object' && module.exports){
12
+ factory(require('lazysizes'));
13
+ } else if(window.lazySizes) {
14
+ globalInstall();
15
+ } else {
16
+ window.addEventListener('lazyunveilread', globalInstall, true);
17
+ }
18
+ }(typeof window != 'undefined' ?
19
+ window : 0, function(window, document, lazySizes) {
20
+ /*
21
+ @example
22
+ <blockquote class="lazyload" data-twitter="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Nothing Twitter is doing is working <a href="https://t.co/s0FppnacwK">https://t.co/s0FppnacwK</a> <a href="https://t.co/GK9MRfQkYO">pic.twitter.com/GK9MRfQkYO</a></p>&mdash; The Verge (@verge) <a href="https://twitter.com/verge/status/725096763972001794">April 26, 2016</a></blockquote>
23
+
24
+ <a class="lazyload"
25
+ data-twitter="twitter-timeline"
26
+ data-widget-id="600720083413962752"
27
+ href="https://twitter.com/TwitterDev"
28
+ width="300"
29
+ height="300">
30
+ Tweets by @TwitterDev
31
+ </a>
32
+ */
33
+ 'use strict';
34
+ var scriptadded;
35
+
36
+ function loadExecuteTwitter(){
37
+ if(window.twttr && twttr.widgets){
38
+ twttr.widgets.load();
39
+ return;
40
+ }
41
+
42
+ if(scriptadded){
43
+ return;
44
+ }
45
+
46
+ var elem = document.createElement('script');
47
+ var insertElem = document.getElementsByTagName('script')[0];
48
+
49
+ elem.src = '//platform.twitter.com/widgets.js';
50
+
51
+ scriptadded = true;
52
+ insertElem.parentNode.insertBefore(elem, insertElem);
53
+ }
54
+
55
+ document.addEventListener('lazybeforeunveil', function(e){
56
+ if(e.detail.instance != lazySizes){return;}
57
+
58
+ var twttrWidget = e.target.getAttribute('data-twitter');
59
+
60
+ if(twttrWidget){
61
+ lazySizes.aC(e.target, twttrWidget);
62
+ loadExecuteTwitter();
63
+ }
64
+ });
65
+
66
+ }));
@@ -121,7 +121,7 @@ class this.RecordSelector
121
121
 
122
122
  # Update details sidebar panel
123
123
  _updateDetails: ->
124
- @container.find('.sidebar img').attr('src', @selectedData.image)
124
+ @container.find('.sidebar img').attr('src', @selectedData.image || '')
125
125
  @container.find('.sidebar .title').text(@selectedData.title)
126
126
  @container.find('.sidebar .description').text(@selectedData.description)
127
127
 
@@ -52,8 +52,10 @@ class this.RemoteForm
52
52
 
53
53
  @broadcastEvent(target)
54
54
 
55
- # Reset form
56
- target[0].reset()
55
+ # Reset form if configured
56
+ resetOnSuccess = target.data('remote-form-reset-on-success')
57
+ resetOnSuccess = @opts.resetOnSuccess if resetOnSuccess == undefined
58
+ target[0].reset() if resetOnSuccess == true
57
59
 
58
60
  return Turbolinks.visit(data.redirect_url) if data.redirect_url
59
61
  return @successMessage(data.message) if data.message
@@ -87,5 +89,6 @@ class this.RemoteForm
87
89
  handleSuccess: @_handleSuccess
88
90
  handleError: @_handleError
89
91
  handleComplete: @_handleComplete
92
+ resetOnSuccess: true
90
93
 
91
94
  $.extend({}, default_opts, opts)
@@ -4,6 +4,7 @@
4
4
  @import 'integral/backend/foundation_and_overrides'
5
5
  @import "integral/support/media-query-indicator"
6
6
  @import "integral/backend/materialize-tags"
7
+ @import "integral/backend/modules/timeline"
7
8
  @import 'integral/backend/shared'
8
9
  @import 'integral/backend/notifications'
9
10
  @import 'integral/backend/dashboard-layout'
@@ -38,7 +39,7 @@
38
39
  margin-bottom: 1em
39
40
  margin-right: 1em
40
41
  i
41
- width: 2em
42
+ width: 1.5rem
42
43
  text-align: center
43
44
 
44
45
  hr
@@ -81,7 +81,6 @@ $dark-gray: #8a8a8a;
81
81
  $black: #0a0a0a;
82
82
  $white: #fefefe;
83
83
  $twitter: #59A2DA;
84
- $google-plus: #E61610;
85
84
  $pink: #ef86ae;
86
85
  $body-background: #f7f7f7;
87
86
  $body-font-color: #17212b;
@@ -115,7 +114,7 @@ $breakpoints: (
115
114
  xxlarge: 1440px,
116
115
  );
117
116
  $print-breakpoint: large;
118
- $breakpoint-classes: (small medium large);
117
+ $breakpoint-classes: (small medium large xlarge xxlarge);
119
118
 
120
119
  // 3. The Grid
121
120
  // -----------
@@ -829,8 +828,8 @@ $titlebar-icon-spacing: 0.25rem;
829
828
  // -----------
830
829
 
831
830
  $has-tip-cursor: help;
832
- $has-tip-font-weight: $global-weight-bold;
833
- $has-tip-border-bottom: dotted 1px $dark-gray;
831
+ $has-tip-font-weight: initial;
832
+ $has-tip-border-bottom: none;
834
833
  $tooltip-background-color: $black;
835
834
  $tooltip-color: $white;
836
835
  $tooltip-padding: 0.75rem;
@@ -211,7 +211,7 @@
211
211
  .top-bar {
212
212
  .create-dropdown {
213
213
  padding: 1em 0;
214
- width: 10em;
214
+ min-width: 10em;
215
215
  background-color: $white;
216
216
  &:after {
217
217
  content: ' ';
@@ -233,6 +233,9 @@
233
233
  transform: rotate(225deg) skewX(8deg) skewY(8deg);
234
234
  top: -0.1em;
235
235
  }
236
+ li {
237
+ display: block;
238
+ }
236
239
  i {
237
240
  width: 30px;
238
241
  text-align: center;
@@ -3,7 +3,7 @@
3
3
  width: 100%
4
4
  margin-top: 1em
5
5
  input
6
- margin-bottom: 0.5em
6
+ margin-bottom: 1rem
7
7
  .label
8
8
  background: scale-color($primary-color, $lightness: 30%)
9
9
  margin: 0.2em 0
@@ -0,0 +1,214 @@
1
+ $timeline-color: $primary-color;
2
+ $timeline-transition: all 0.25s ease-in;
3
+ $timeline-item-card-bg: $white;
4
+ $timeline-item-font-color: $black;
5
+ $timeline-item-card: false;
6
+ $timeline-item-card-radius: $global-radius;
7
+
8
+ %clearfix {
9
+ &::after,
10
+ &::before {
11
+ clear: both;
12
+ content: '';
13
+ display: block;
14
+ width: 100%;
15
+ }
16
+ }
17
+
18
+ // Timeline
19
+ .timeline {
20
+ margin: 30px auto;
21
+ padding: 0 10px;
22
+ position: relative;
23
+ transition: $timeline-transition;
24
+ width: 100%;
25
+
26
+ &::before {
27
+ background: $timeline-color;
28
+ content: '';
29
+ height: 100%;
30
+ left: 50%;
31
+ position: absolute;
32
+ top: 0;
33
+ width: 2px;
34
+ }
35
+
36
+ &::after {
37
+ clear: both;
38
+ content: '';
39
+ display: table;
40
+ width: 100%;
41
+ }
42
+
43
+ .timeline-item {
44
+ margin-bottom: 50px;
45
+ position: relative;
46
+ @extend %clearfix;
47
+
48
+ .timeline-icon {
49
+ background: $timeline-color;
50
+ border-radius: 50%;
51
+ height: 50px;
52
+ left: 50%;
53
+ margin-left: -23px;
54
+ overflow: hidden;
55
+ position: absolute;
56
+ top: 0;
57
+ width: 50px;
58
+
59
+ i {
60
+ width: 100%;
61
+ font-size: 1.25rem;
62
+ color: $white;
63
+ position: absolute;
64
+ top: 50%;
65
+ transform: translateY(-50%);
66
+ text-align: center;
67
+ }
68
+ }
69
+
70
+ .timeline-content {
71
+ padding: 20px;
72
+ text-align: right;
73
+ transition: $timeline-transition;
74
+ width: 45%;
75
+
76
+ @if $timeline-item-card == true {
77
+ background: $timeline-item-card-bg;
78
+ border-radius: $timeline-item-card-radius;
79
+
80
+ p {
81
+ color: $black;
82
+ }
83
+ } @else {
84
+ background: transparent;
85
+
86
+ p {
87
+ color: $timeline-item-font-color;
88
+ }
89
+ }
90
+
91
+ p {
92
+ font-size: 16px;
93
+ line-height: 1.4;
94
+ margin-bottom: 0;
95
+ }
96
+
97
+ hr {
98
+ display: none;
99
+ }
100
+
101
+ .timeline-content-header {
102
+ display: flex;
103
+ justify-content: space-between;
104
+ }
105
+ .timeline-content-user {
106
+ opacity: 0.75;
107
+ margin-bottom: 10px;
108
+ span {
109
+ font-size: .8rem;
110
+ }
111
+ img {
112
+ border-radius: 50%;
113
+ width: 20px;
114
+ height: 20px;
115
+ }
116
+ &:hover {
117
+ color: $primary-color;
118
+ opacity: 1;
119
+ }
120
+ }
121
+
122
+ .timeline-content-event {
123
+ color: $timeline-color;
124
+ text-transform: uppercase;
125
+ font-size: .75rem;
126
+ }
127
+ .timeline-content-title {
128
+ margin-top: .5rem;
129
+ a {
130
+ font-style: italic;
131
+ border-bottom: 1px dotted #dbdbdb;
132
+ }
133
+ }
134
+
135
+ .timeline-content-date {
136
+ text-transform: uppercase;
137
+ font-weight: normal;
138
+ font-size: .7rem;
139
+ margin-bottom: 0;
140
+ }
141
+
142
+ .timeline-content-month {
143
+ font-size: rem-calc(14);
144
+ text-transform: uppercase;
145
+ font-weight: 400;
146
+ }
147
+
148
+ &.right {
149
+ float: right;
150
+ text-align: left;
151
+ }
152
+ }
153
+
154
+ &:nth-child(even) {
155
+ .timeline-content {
156
+ float: right;
157
+ text-align: left;
158
+
159
+ .timeline-content-header {
160
+ flex-direction: row-reverse;
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
166
+
167
+ @mixin timelinecompressed {
168
+ margin: 30px;
169
+ padding: 0;
170
+ width: 90%;
171
+
172
+ &::before {
173
+ left: 0;
174
+ }
175
+
176
+ .timeline-item {
177
+ margin-bottom: 0px;
178
+ .timeline-content {
179
+ float: right;
180
+ text-align: left;
181
+ width: 90%;
182
+ padding: 0 10px;
183
+
184
+ &::before,
185
+ &.right::before {
186
+ border-left: 0;
187
+ border-right: 7px solid $timeline-color;
188
+ left: 10%;
189
+ margin-left: -6px;
190
+ }
191
+
192
+ hr {
193
+ display: block;
194
+ }
195
+
196
+ .timeline-content-header {
197
+ flex-direction: row-reverse;
198
+ }
199
+ }
200
+
201
+ .timeline-icon {
202
+ left: 0;
203
+ }
204
+ }
205
+ }
206
+
207
+ @include breakpoint(small only) {
208
+ .timeline {
209
+ @include timelinecompressed;
210
+ }
211
+ }
212
+ .timeline--compressed {
213
+ @include timelinecompressed;
214
+ }