keppler 2.1.6 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/installer/core/app/views/admin/layouts/_sidebar.html.haml +2 -2
  4. data/installer/core/rockets/keppler_frontend/app/assets/javascripts/keppler_frontend/app/application.js +0 -6
  5. data/installer/core/rockets/keppler_frontend/app/assets/stylesheets/keppler_frontend/app/application.scss +2 -6
  6. data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/admin/views_controller.rb +4 -3
  7. data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/app/app_controller.rb +0 -8
  8. data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/concerns/services.rb +14 -0
  9. data/installer/core/rockets/keppler_frontend/app/models/keppler_frontend/view.rb +0 -1
  10. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/editor/file_format.rb +29 -0
  11. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/editor/resources.rb +70 -0
  12. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/editor/resources_format.rb +63 -0
  13. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/utils/file_format.rb +44 -0
  14. data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/multimedia/index.html.haml +5 -5
  15. data/installer/core/rockets/keppler_frontend/app/views/layouts/keppler_frontend/app/layouts/_head.html.haml +0 -2
  16. data/installer/core/rockets/keppler_frontend/app/views/layouts/keppler_frontend/app/layouts/application.html.erb +2 -2
  17. data/installer/core/rockets/keppler_frontend/app/views/layouts/themes/keppler_default/application.html.erb +1 -1
  18. data/installer/core/spec/controllers/keppler_frontend/admin/views_controller/editor_spec.rb +20 -0
  19. data/installer/core/spec/controllers/keppler_frontend/admin/views_controller/live_editor_save_spec.rb +10 -10
  20. data/installer/core/spec/fixtures/keppler_frontend/editor/test.html +16 -0
  21. data/installer/core/spec/fixtures/keppler_frontend/editor/test.png +0 -0
  22. data/installer/core/spec/models/keppler_frontend/view/live_editor_spec.rb +54 -54
  23. data/installer/core/spec/routing/keppler_frontend/views_spec.rb +15 -7
  24. data/installer/core/spec/services/keppler_frontend/editor/file_format_spec.rb +35 -0
  25. data/installer/core/spec/services/keppler_frontend/editor/resources_format_spec.rb +45 -0
  26. data/installer/core/spec/services/keppler_frontend/editor/resources_spec.rb +44 -0
  27. data/installer/core/spec/services/keppler_frontend/utils/code_search_spec.rb +4 -5
  28. data/installer/core/spec/services/keppler_frontend/utils/file_format_spec.rb +52 -0
  29. data/installer/core/spec/services/keppler_frontend/utils/yml_handle_spec.rb +15 -12
  30. data/installer/core/spec/spec_helper.rb +2 -0
  31. data/installer/core/test/run.sh +1 -1
  32. data/lib/keppler/version.rb +1 -1
  33. metadata +14 -7400
  34. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-accordion.html +0 -56
  35. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-alert.html +0 -18
  36. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-button-group.html +0 -15
  37. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-button.html +0 -15
  38. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-checks.html +0 -23
  39. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-collapse.html +0 -23
  40. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-columns-12.html +0 -59
  41. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-columns-2.html +0 -29
  42. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-columns-3.html +0 -32
  43. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-columns-4.html +0 -35
  44. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-columns-6.html +0 -41
  45. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-container.html +0 -15
  46. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-dropdown-btn.html +0 -22
  47. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-form.html +0 -33
  48. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-jumbotron.html +0 -25
  49. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-label.html +0 -13
  50. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-list-group.html +0 -22
  51. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-modal.html +0 -32
  52. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-navbar.html +0 -71
  53. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-pagination.html +0 -31
  54. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-panel-table.html +0 -48
  55. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-panel.html +0 -19
  56. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-progress-bar.html +0 -17
  57. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-radio.html +0 -23
  58. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-table.html +0 -42
  59. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-tabs.html +0 -34
  60. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-textarea.html +0 -13
  61. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-thumbnail.html +0 -23
  62. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/bstp-well.html +0 -13
  63. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/bootstrap/btsp-input.html +0 -13
  64. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-banner-blur-parallax.html +0 -59
  65. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-banner-blur.html +0 -58
  66. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-banner-parallax.html +0 -49
  67. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-banner-static.html +0 -48
  68. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-banner-video.html +0 -54
  69. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-block.html +0 -15
  70. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-h1.html +0 -13
  71. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-h2.html +0 -13
  72. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-h3.html +0 -13
  73. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-h4.html +0 -13
  74. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/keppler/kppl-small.html +0 -13
  75. data/installer/core/rockets/keppler_frontend/app/assets/html/keppler_frontend/app/slick/slick-basic.html +0 -43
  76. data/installer/core/rockets/keppler_frontend/app/assets/javascripts/keppler_frontend/app/grapes/grapes-custom-code.js +0 -3
  77. data/installer/core/rockets/keppler_frontend/app/assets/javascripts/keppler_frontend/app/grapes/grapes-editor.js +0 -1174
  78. data/installer/core/rockets/keppler_frontend/app/assets/javascripts/keppler_frontend/app/grapes/grapes-format.js +0 -498
  79. data/installer/core/rockets/keppler_frontend/app/assets/javascripts/keppler_frontend/app/grapes/grapes-gradient.js +0 -2
  80. data/installer/core/rockets/keppler_frontend/app/assets/javascripts/keppler_frontend/app/grapes/grapes.js +0 -53138
  81. data/installer/core/rockets/keppler_frontend/app/assets/javascripts/keppler_frontend/app/grapes/grapesjs-custom-code.min.js.map +0 -1
  82. data/installer/core/rockets/keppler_frontend/app/assets/javascripts/keppler_frontend/app/grapes/grapick.js +0 -2
  83. data/installer/core/rockets/keppler_frontend/app/assets/stylesheets/keppler_frontend/app/grapes/font-awesome.css +0 -4
  84. data/installer/core/rockets/keppler_frontend/app/assets/stylesheets/keppler_frontend/app/grapes/grapes-custom.scss +0 -610
  85. data/installer/core/rockets/keppler_frontend/app/assets/stylesheets/keppler_frontend/app/grapes/grapes.scss +0 -2
  86. data/installer/core/rockets/keppler_frontend/app/assets/stylesheets/keppler_frontend/app/grapes/grapick.scss +0 -1
  87. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/live_editor/components_handler.rb +0 -41
  88. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/live_editor/css/convert.rb +0 -28
  89. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/live_editor/css_handler.rb +0 -44
  90. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/live_editor/editor.rb +0 -48
  91. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/live_editor/html_handler.rb +0 -73
  92. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/live_editor/html_save_utils.rb +0 -43
  93. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/live_editor/images_handler.rb +0 -31
  94. data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/live_editor/no_edit_area.rb +0 -67
  95. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000020e7930>.yml +0 -1
  96. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000004f35968>.yml +0 -1
  97. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000005dff430>.yml +0 -1
  98. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000062d44b0>.yml +0 -1
  99. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006306690>.yml +0 -1
  100. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000064d22f8>.yml +0 -1
  101. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006501580>.yml +0 -1
  102. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000067c5d70>.yml +0 -1
  103. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000691b760>.yml +0 -1
  104. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006998918>.yml +0 -1
  105. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000069bf068>.yml +0 -1
  106. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006a4fd48>.yml +0 -1
  107. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006b36bd0>.yml +0 -1
  108. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006ba2bc8>.yml +0 -1
  109. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006d9e530>.yml +0 -1
  110. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006e43d50>.yml +0 -1
  111. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006e7e180>.yml +0 -1
  112. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006f765d8>.yml +0 -1
  113. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006fa5590>.yml +0 -1
  114. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006fa6e40>.yml +0 -1
  115. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000006fca958>.yml +0 -1
  116. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007019788>.yml +0 -1
  117. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007071230>.yml +0 -1
  118. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000070bef58>.yml +0 -1
  119. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000718e730>.yml +0 -1
  120. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000728c4e8>.yml +0 -1
  121. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000072e1948>.yml +0 -1
  122. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000073fd200>.yml +0 -1
  123. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000074220f0>.yml +0 -1
  124. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000074762e0>.yml +0 -1
  125. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000750b548>.yml +0 -1
  126. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000750de10>.yml +0 -1
  127. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007553460>.yml +0 -1
  128. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000075a58a0>.yml +0 -1
  129. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000075e0400>.yml +0 -1
  130. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000075f3b18>.yml +0 -1
  131. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000767c828>.yml +0 -1
  132. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000076825e8>.yml +0 -1
  133. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000076c1310>.yml +0 -1
  134. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000077bc080>.yml +0 -1
  135. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000078595b0>.yml +0 -1
  136. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007a274a0>.yml +0 -1
  137. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007a3be78>.yml +0 -1
  138. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007acc4f0>.yml +0 -1
  139. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007b669d8>.yml +0 -1
  140. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007bcd1d8>.yml +0 -1
  141. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007cb0398>.yml +0 -1
  142. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007cea548>.yml +0 -1
  143. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007d60a68>.yml +0 -1
  144. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007d89490>.yml +0 -1
  145. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007e4bdb0>.yml +0 -1
  146. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007eb3c58>.yml +0 -1
  147. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007ef6198>.yml +0 -1
  148. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007f728b0>.yml +0 -1
  149. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007f7e228>.yml +0 -1
  150. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007f820d0>.yml +0 -1
  151. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000007fca8f8>.yml +0 -1
  152. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000800b5d8>.yml +0 -1
  153. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008048730>.yml +0 -1
  154. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000080a5bd8>.yml +0 -1
  155. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000080bc360>.yml +0 -1
  156. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000080c6c20>.yml +0 -1
  157. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000080ece98>.yml +0 -1
  158. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008102090>.yml +0 -1
  159. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000811d1b0>.yml +0 -1
  160. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000081773e0>.yml +0 -1
  161. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008182a60>.yml +0 -1
  162. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000081bd7f0>.yml +0 -1
  163. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000082311a0>.yml +0 -1
  164. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000828de00>.yml +0 -1
  165. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008396e00>.yml +0 -1
  166. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008452a88>.yml +0 -1
  167. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000085ab218>.yml +0 -1
  168. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008628970>.yml +0 -1
  169. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000867d2e0>.yml +0 -1
  170. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008681430>.yml +0 -1
  171. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000086c38f8>.yml +0 -1
  172. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000878ed50>.yml +0 -1
  173. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000087d1150>.yml +0 -1
  174. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000880e000>.yml +0 -1
  175. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x000000000881dca8>.yml +0 -1
  176. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008841d60>.yml +0 -1
  177. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008846450>.yml +0 -1
  178. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008894510>.yml +0 -1
  179. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000089c1a50>.yml +0 -1
  180. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000008b38b18>.yml +0 -1
  181. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000090a0650>.yml +0 -1
  182. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000090e9418>.yml +0 -1
  183. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000091dae30>.yml +0 -1
  184. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000092907f8>.yml +0 -1
  185. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000092ba170>.yml +0 -1
  186. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000093bfd40>.yml +0 -1
  187. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000009449180>.yml +0 -1
  188. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000094656a0>.yml +0 -1
  189. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000009527f48>.yml +0 -1
  190. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000095d4e78>.yml +0 -1
  191. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000095e0b60>.yml +0 -1
  192. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x0000000009661710>.yml +0 -1
  193. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000096c0350>.yml +0 -1
  194. data/installer/core/rockets/keppler_frontend/config/data/#<KepplerFrontend::View::ActiveRecord_Relation:0x00000000097c1f88>.yml +0 -1
  195. data/installer/core/rockets/keppler_frontend/config/views.yml +0 -18
  196. data/installer/core/spec/services/keppler_frontend/live_editor/components_output_spec.rb +0 -20
  197. data/installer/core/spec/services/keppler_frontend/live_editor/css/convert_spec.rb +0 -39
  198. data/installer/core/spec/services/keppler_frontend/live_editor/css_handler_spec.rb +0 -31
  199. data/installer/core/spec/services/keppler_frontend/live_editor/html_save_spec.rb +0 -75
  200. data/installer/core/spec/services/keppler_frontend/live_editor/html_save_utils_spec.rb +0 -49
  201. data/installer/core/spec/services/keppler_frontend/live_editor/image_output_spec.rb +0 -19
  202. data/installer/core/spec/services/keppler_frontend/live_editor/no_edit_area_spec.rb +0 -44
  203. data/installer/core/spec/services/keppler_frontend/live_editor/render_spec.rb +0 -47
  204. data/installer/core/spec/services/keppler_frontend/live_editor/save_spec.rb +0 -36
@@ -1,58 +0,0 @@
1
- <keppler-component>
2
- <div class="kppl-blur">
3
- <div class="kppl-blur-img"></div>
4
- <div class="kppl-blur-mask">
5
- <div class="kppl-container">
6
- <h1>Banner Blur</h1>
7
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ornare turpis eu elit ultricies mollis. Nulla sollicitudin orci mauris, nec fermentum tortor venenatis vel</p>
8
- </div>
9
- </div>
10
- </div>
11
-
12
- <style>
13
- .kppl-blur {
14
- width: auto;
15
- height: 400px;
16
- position: relative;
17
- overflow: hidden;
18
- }
19
-
20
- .kppl-blur .kppl-blur-img {
21
- background-image: url(https://images.pexels.com/photos/907142/pexels-photo-907142.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260);
22
- background-size: cover;
23
- background-position: center;
24
- height: 100%;
25
- width: 100%;
26
- position: absolute;
27
- filter: blur(4px);
28
- transform: scale(1.1);
29
- }
30
-
31
- .kppl-blur .kppl-blur-mask {
32
- background: #00000075;
33
- position: relative;
34
- height: 100%;
35
- width: 100%;
36
- display: flex;
37
- align-items: center;
38
- justify-content: center;
39
- font-family: Arial, Helvetica, sans-serif;
40
- text-align: center;
41
- color: #fff;
42
- }
43
-
44
- .kppl-blur .kppl-container {
45
- max-width: 40%;
46
- }
47
- </style>
48
- </keppler-component>
49
- <script>
50
- 'kppl-banner-blur', {
51
- label: 'Banner Blur',
52
- category: 'Banners',
53
- attributes: { class:'fa fa-picture-o' },
54
- content: {
55
- script: function(){}
56
- }
57
- }
58
- </script>
@@ -1,49 +0,0 @@
1
- <keppler-component>
2
- <div class="kppl-parallax">
3
- <div class="kppl-parallax-mask">
4
- <div class="kppl-container">
5
- <h1>Banner Parallax</h1>
6
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ornare turpis eu elit ultricies mollis. Nulla sollicitudin orci mauris, nec fermentum tortor venenatis vel</p>
7
- </div>
8
- </div>
9
- </div>
10
-
11
- <style>
12
- .kppl-parallax {
13
- background-image: url(https://images.pexels.com/photos/67386/pexels-photo-67386.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260);
14
- background-size: cover;
15
- background-position: center;
16
- background-attachment: fixed;
17
- width: auto;
18
- height: 400px;
19
- position: relative;
20
- }
21
-
22
- .kppl-parallax > .kppl-parallax-mask {
23
- background: #00000075;
24
- position: relative;
25
- height: 100%;
26
- width: 100%;
27
- display: flex;
28
- align-items: center;
29
- justify-content: center;
30
- font-family: Arial, Helvetica, sans-serif;
31
- text-align: center;
32
- color: #fff;
33
- }
34
-
35
- .kppl-parallax .kppl-container {
36
- max-width: 40%;
37
- }
38
- </style>
39
- </keppler-component>
40
- <script>
41
- 'kppl-banner-parallax', {
42
- label: 'Banner Parallax',
43
- category: 'Banners',
44
- attributes: { class:'fa fa-picture-o' },
45
- content: {
46
- script: function(){}
47
- }
48
- }
49
- </script>
@@ -1,48 +0,0 @@
1
- <keppler-component>
2
- <div class="kppl-static">
3
- <div class="kppl-static-mask">
4
- <div class="kppl-container">
5
- <h1>Banner Static</h1>
6
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ornare turpis eu elit ultricies mollis. Nulla sollicitudin orci mauris, nec fermentum tortor venenatis vel</p>
7
- </div>
8
- </div>
9
- </div>
10
-
11
- <style>
12
- .kppl-static {
13
- background-image: url(https://images.pexels.com/photos/125532/pexels-photo-125532.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260);
14
- background-size: cover;
15
- background-position: center;
16
- width: auto;
17
- height: 400px;
18
- position: relative;
19
- }
20
-
21
- .kppl-static > .kppl-static-mask {
22
- background: #00000075;
23
- position: relative;
24
- height: 100%;
25
- width: 100%;
26
- display: flex;
27
- align-items: center;
28
- justify-content: center;
29
- font-family: Arial, Helvetica, sans-serif;
30
- text-align: center;
31
- color: #fff;
32
- }
33
-
34
- .kppl-static .kppl-container {
35
- max-width: 40%;
36
- }
37
- </style>
38
- </keppler-component>
39
- <script>
40
- 'kppl-banner-static', {
41
- label: 'Banner Static',
42
- category: 'Banners',
43
- attributes: { class:'fa fa-picture-o' },
44
- content: {
45
- script: function(){}
46
- }
47
- }
48
- </script>
@@ -1,54 +0,0 @@
1
- <keppler-component>
2
- <div class="kppl-youtube">
3
- <iframe class="kppl-youtube-video" width="560" height="315" src="https://www.youtube.com/embed/SpaqUrNPb-4?rel=0&amp;controls=0&amp;showinfo=0&amp;mute=1&amp;autoplay=1&amp;loop=1" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
4
- <div class="kppl-youtube-mask">
5
- <div class="kppl-container">
6
- <h1>Banner Youtube</h1>
7
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ornare turpis eu elit ultricies mollis. Nulla sollicitudin orci mauris, nec fermentum tortor venenatis vel</p>
8
- </div>
9
- </div>
10
- </div>
11
-
12
- <style>
13
- .kppl-youtube {
14
- width: auto;
15
- height: 400px;
16
- position: relative;
17
- overflow: hidden;
18
- }
19
-
20
- .kppl-youtube .kppl-youtube-video {
21
- height: 100%;
22
- width: 100%;
23
- position: absolute;
24
- transform: scale(2);
25
- }
26
-
27
- .kppl-youtube .kppl-youtube-mask {
28
- background: #00000075;
29
- position: relative;
30
- height: 100%;
31
- width: 100%;
32
- display: flex;
33
- align-items: center;
34
- justify-content: center;
35
- font-family: Arial, Helvetica, sans-serif;
36
- text-align: center;
37
- color: #fff;
38
- }
39
-
40
- .kppl-youtube .kppl-container {
41
- max-width: 40%;
42
- }
43
- </style>
44
- </keppler-component>
45
- <script>
46
- 'kppl-banner-youtube', {
47
- label: 'Banner Video',
48
- category: 'Banners',
49
- attributes: { class:'fa fa-youtube-play' },
50
- content: {
51
- script: function(){}
52
- }
53
- }
54
- </script>
@@ -1,15 +0,0 @@
1
- <keppler-component>
2
- <div style="padding:10px">
3
- <h1>Block</h1>
4
- </div>
5
- </keppler-component>
6
- <script>
7
- 'kppl-block', {
8
- label: 'Block',
9
- category: 'Layouts',
10
- attributes: { class:'fa fa-code' },
11
- content: {
12
- script: function(){}
13
- }
14
- }
15
- </script>
@@ -1,13 +0,0 @@
1
- <keppler-component>
2
- <h1>Header 1</h1>
3
- </keppler-component>
4
- <script>
5
- 'kppl-h1', {
6
- label: 'Header 1',
7
- category: 'Typography',
8
- attributes: { class:'fa fa-header' },
9
- content: {
10
- script: function(){}
11
- }
12
- }
13
- </script>
@@ -1,13 +0,0 @@
1
- <keppler-component>
2
- <h2>Header 2</h2>
3
- </keppler-component>
4
- <script>
5
- 'kppl-h2', {
6
- label: 'Header 2',
7
- category: 'Typography',
8
- attributes: { class:'fa fa-header' },
9
- content: {
10
- script: function(){}
11
- }
12
- }
13
- </script>
@@ -1,13 +0,0 @@
1
- <keppler-component>
2
- <h3>Header 3</h3>
3
- </keppler-component>
4
- <script>
5
- 'kppl-h3', {
6
- label: 'Header 3',
7
- category: 'Typography',
8
- attributes: { class:'fa fa-header' },
9
- content: {
10
- script: function(){}
11
- }
12
- }
13
- </script>
@@ -1,13 +0,0 @@
1
- <keppler-component>
2
- <h4>Header 4</h4>
3
- </keppler-component>
4
- <script>
5
- 'kppl-h4', {
6
- label: 'Header 4',
7
- category: 'Typography',
8
- attributes: { class:'fa fa-header' },
9
- content: {
10
- script: function(){}
11
- }
12
- }
13
- </script>
@@ -1,13 +0,0 @@
1
- <keppler-component>
2
- <small>Text small</small>
3
- </keppler-component>
4
- <script>
5
- 'kppl-small', {
6
- label: 'Small',
7
- category: 'Typography',
8
- attributes: { class:'fa fa-text-height' },
9
- content: {
10
- script: function(){}
11
- }
12
- }
13
- </script>
@@ -1,43 +0,0 @@
1
- <keppler-component>
2
- <div class="slick-caroucel">
3
- <div class="slick-item slick-item-1">
4
- <img src="https://dummyimage.com/1440x500/c0c0c0/000000.jpg" alt="...">
5
- </div>
6
- <div class="slick-item slick-item-2">
7
- <img src="https://dummyimage.com/1440x500/c0c0c0/000000.jpg" alt="...">
8
- </div>
9
- <div class="slick-item slick-item-3">
10
- <img src="https://dummyimage.com/1440x500/c0c0c0/000000.jpg" alt="...">
11
- </div>
12
- </div>
13
- <script>
14
- function guid() {
15
- return Math.floor((1 + Math.random()) * 0x10000)
16
- .toString(16)
17
- .substring(1);
18
- }
19
- var id = "slick-"+guid();
20
- document.getElementsByClassName('slick-caroucel')[0].id = id;
21
- console.log(document.getElementsByClassName('slick-caroucel')[0])
22
- $("#"+id).slick();
23
- </script>
24
- <style>
25
- .slick-caroucel {
26
- height: 500px;
27
- }
28
- img {
29
- width: 100%;
30
- height: 100%;
31
- }
32
- </style>
33
- </keppler-component>
34
- <script>
35
- // 'slick-basic', {
36
- // label: 'Slick Basic (1440x500)',
37
- // category: 'Sliders',
38
- // attributes: { class:'fa fa-sliders' },
39
- // content: {
40
- // script: function(){}
41
- // }
42
- // }
43
- </script>
@@ -1,3 +0,0 @@
1
- /*! grapesjs-custom-code - 0.1.1 */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("grapesjs")):"function"==typeof define&&define.amd?define(["grapesjs"],t):"object"==typeof exports?exports["grapesjs-custom-code"]=t(require("grapesjs")):e["grapesjs-custom-code"]=t(e.grapesjs)}(window,function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.keyCustomCode="custom-code-plugin__code",t.typeCustomCode="custom-code",t.commandNameCustomCode="custom-code:open-modal"},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r=d(o(2)),i=d(o(3)),s=d(o(4)),a=d(o(5));function d(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.plugins.add("grapesjs-custom-code",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n({blockLabel:"Custom Code",blockCustomCode:{},propsCustomCode:{},placeholderContent:"<span>Insert here your custom code</span>",toolbarBtnCustomCode:{},placeholderScript:'<div style="pointer-events: none; padding: 10px;">\n <svg viewBox="0 0 24 24" style="height: 30px; vertical-align: middle;">\n <path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"></path>\n </svg>\n Custom code with <i>&lt;script&gt;</i> can\'t be rendered on the canvas\n </div>',modalTitle:"Insert your code",codeViewOptions:{},buttonLabel:"Save",commandCustomCode:{}},t);(0,i.default)(e,o),(0,s.default)(e,o),(0,a.default)(e,o)})},function(t,o){t.exports=e},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r=o(0);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.DomComponents,i=o.getType("default"),s=i.model,a=t.toolbarBtnCustomCode,d=void 0;o.addType(r.typeCustomCode,{model:s.extend({defaults:n({},s.prototype.defaults,{name:"Custom Code",editable:!0},t.propsCustomCode),init:function(){this.listenTo(this,"change:"+r.keyCustomCode,this.onCustomCodeChange);var e=this.get(r.keyCustomCode)||t.placeholderContent;!this.components().length&&this.components(e);var o=this.get("toolbar"),i="custom-code";a&&!o.filter(function(e){return e.id===i}).length&&o.unshift(n({id:i,command:r.commandNameCustomCode,label:'<svg viewBox="0 0 24 24">\n <path d="M14.6 16.6l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4m-5.2 0L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4z"></path>\n </svg>'},a))},onCustomCodeChange:function(){this.components(this.get(r.keyCustomCode))}},{isComponent:function(){return!1}}),view:i.view.extend({events:{dblclick:"onActive"},init:function(){this.listenTo(this.model.components(),"add remove reset",this.onComponentsChange),this.onComponentsChange()},onComponentsChange:function(){var e=this;d&&clearInterval(d),d=setTimeout(function(){var o=e.model,n=1;(o.get(r.keyCustomCode)||"").indexOf("<script")>=0&&(e.el.innerHTML=t.placeholderScript,n=0),o.set({droppable:n})},0)},onActive:function(){var e=this.model;this.em.get("Commands").run(r.commandNameCustomCode,{target:e})}})})}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r=o(0);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.BlockManager,i=t.blockCustomCode,s=t.blockLabel;i&&o.add(r.typeCustomCode,n({label:'<svg viewBox="0 0 24 24">\n <path d="M14.6 16.6l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4m-5.2 0L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4z"></path>\n </svg>\n <div class="gjs-block-label">'+s+"</div>",category:"Extra",activate:!0,select:!0,content:{type:r.typeCustomCode}},i))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r=o(0);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.Commands,i=t.modalTitle,s=t.codeViewOptions,a=t.commandCustomCode,d=function(e,t){t instanceof HTMLElement?e.appendChild(t):t&&e.insertAdjacentHTML("beforeend",t)};o.add(r.commandNameCustomCode,n({keyCustomCode:r.keyCustomCode,run:function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.editor=e,this.options=o,this.target=o.target||e.getSelected();var n=this.target;n&&n.get("editable")&&this.showCustomCode(n)},stop:function(e){e.Modal.close()},showCustomCode:function(e){var t=this.editor,o=this.options.title||i,n=this.getContent(),s=e.get(r.keyCustomCode)||"";t.Modal.open({title:o,content:n}),this.getCodeViewer().setContent(s)},getPreContent:function(){},getPostContent:function(){},getContent:function(){var e=this.editor,t=(this.options,this.target,document.createElement("div")),o=this.getCodeViewer(),n=e.getConfig("stylePrefix");return t.className=n+"custom-code",d(t,this.getPreContent()),t.appendChild(o.getElement()),d(t,this.getPostContent()),d(t,this.getContentActions()),o.refresh(),setTimeout(function(){return o.focus()},0),t},getContentActions:function(){var e=this,o=this.editor,n=document.createElement("button"),r=o.getConfig("stylePrefix");return n.innerHTML=t.buttonLabel,n.className=r+"btn-prim "+r+"btn-import__custom-code",n.onclick=function(){return e.handleSave()},n},handleSave:function(){var e=this.editor,t=this.target,o=this.getCodeViewer().getContent();t.set(r.keyCustomCode,o),e.Modal.close()},getCodeViewer:function(){var e=this.editor;return this.codeViewer||(this.codeViewer=e.CodeManager.createViewer(n({codeName:"htmlmixed",theme:"hopscotch",readOnly:0},s))),this.codeViewer}},a))}}])});
3
- //# sourceMappingURL=grapesjs-custom-code.min.js.map
@@ -1,1174 +0,0 @@
1
- var extrasEditor = {
2
- buildHtml: function(html) {
3
- var sections = ""
4
- var sectionsPermit = ['keppler-header', 'keppler-view', 'keppler-footer']
5
- for(var i=0; i < html.length; i++) {
6
- if(sectionsPermit.includes(html[i].localName)) {
7
- var noEditIds = this.getNoEditIdsEditor(html[i]);
8
- for(var j=0; j < noEditIds.length; j++) {
9
- $(html[i]).find('#'+noEditIds[j]).replaceWith(function () {
10
- return $('<keppler-no-edit/>', {
11
- id: noEditIds[j],
12
- html: this.innerHTML
13
- });
14
- });
15
- }
16
- sections = sections+processHtml(html[i].outerHTML)
17
- }
18
- }
19
- return sections
20
- },
21
-
22
- getNoEditIdsEditor : function(section) {
23
- var nodes = section.querySelectorAll(".no-edit-area");
24
- var noEditIds = [];
25
- for(var i=0; i < nodes.length; i++) {
26
- noEditIds.push(nodes[i].id)
27
- }
28
- return noEditIds
29
- },
30
-
31
- getNoEditIds: function(){
32
- var nodes = document.querySelectorAll(".no-edit-area");
33
- var noEditIds = [];
34
- for(var i=0; i < nodes.length; i++) {
35
- noEditIds.push(nodes[i].id)
36
- }
37
- return noEditIds
38
- },
39
-
40
- createNoEditAreaEditor: function(){
41
- $('keppler-no-edit').addClass('no-edit-area');
42
- noEditIds = this.getNoEditIds();
43
- var $kepplerNoEdit = $("keppler-no-edit");
44
- $kepplerNoEdit.replaceWith(function () {
45
- return $('<div/>', {
46
- class: 'no-edit-area',
47
- html: this.innerHTML
48
- });
49
- });
50
- var nodes = document.querySelectorAll(".no-edit-area");
51
- for(var i=0; i < nodes.length; i++) {
52
- nodes[i].id = noEditIds[i];
53
- }
54
- },
55
-
56
- getIfNotArea: function(some) {
57
- var sections = ["keppler-header", "keppler-view", "keppler-footer"]
58
- var includeKepplerLabel = false;
59
- for(var i=0; i < some.path.length; i++) {
60
- var label = $(some.path[i])[0].id;
61
- if(sections.includes(label)) {
62
- includeKepplerLabel = true
63
- }
64
- }
65
- return includeKepplerLabel;
66
- },
67
-
68
- createAreas: function() {
69
- var sections = ['keppler-header', 'keppler-view', 'keppler-footer']
70
-
71
- for(var i=0; i < sections.length; i++) {
72
- $(sections[i]).replaceWith(function () {
73
- return $('<div/>', {
74
- id: sections[i],
75
- html: this.innerHTML
76
- });
77
- });
78
- }
79
- },
80
-
81
- deleteAreas: function(html, view_name) {
82
- var html = $(html);
83
- var sections = ['keppler-header', 'keppler-view', 'keppler-footer']
84
- var result = [];
85
- for(var i=0; i < html.length; i++) {
86
- if(sections.includes(html[i].id)) {
87
- var el = document.createElement(html[i].id)
88
- el.innerHTML = html[i].innerHTML
89
- if (html[i].id==="keppler-view") {
90
- el.id = view_name;
91
- }
92
- result.push(el)
93
- }
94
- }
95
- return result;
96
- },
97
-
98
- }
99
-
100
-
101
- $(document).ready(function(){
102
- //grapesjs.plugins.add('testplug', (editor, config) => {});
103
- var blkStyle = '.blk-row::after{ content: ""; clear: both; display: block;} .blk-row{padding: 10px;}';
104
- var sectors = [{
105
- name: 'General',
106
- open: false,
107
- buildProps: ['float', 'display', 'z-index', 'position', 'top', 'right', 'left', 'bottom'],
108
- properties: [{
109
- id: 'z-index',
110
- type: 'integer',
111
- name: 'Position index',
112
- property: 'z-index',
113
- defaults: 0
114
- },{
115
- type: 'select',
116
- property: 'list-style-type',
117
- default: 'none',
118
- list : [
119
- {value: 'none', name: 'None'},
120
- {value: 'circle', name: 'Circle'},
121
- {value: 'disc', name: 'Disc'},
122
- {value: 'square', name: 'Square'},
123
- {value: 'decimal', name: 'Decimal'},
124
- {value: 'decimal-leading-zero ', name: 'Decimal leading zero '},
125
- {value: 'lower-alpha', name: 'Lower alpha'},
126
- {value: 'upper-alpha', name: 'Upper alpha'},
127
- {value: 'lower-greek', name: 'Lower greek'},
128
- {value: 'lower-latin', name: 'Lower latin'},
129
- {value: 'upper-latin', name: 'Upper latin'},
130
- {value: 'lower-roman', name: 'Lower roman'},
131
- {value: 'upper-roman', name: 'Upper roman'},
132
- {value: 'armenian', name: 'Armenian'},
133
- {value: 'georgian', name: 'Georgian'},
134
- {value: 'cjk-ideographic', name: 'Cjk ideographic'},
135
- {value: 'hiragana', name: 'Hiragana'},
136
- {value: 'katakana', name: 'Katakana'},
137
- {value: 'hiragana-iroha', name: 'Hiragana iroha'},
138
- {value: 'katakana-iroha', name: 'Katakana iroha'},
139
- ],
140
- }, {
141
- property: 'list-style-position',
142
- type: 'radio',
143
- list : [
144
- {value: 'inside', name: 'Inside'},
145
- {value: 'outside', name: 'Outside'}
146
- ],
147
- }, {
148
- property: 'cursor',
149
- type: 'select',
150
- defaults: 'auto',
151
- list : [
152
- {value: 'auto', name: 'Auto'},
153
- {value: 'crosshair', name: 'Crosshair'},
154
- {value: 'default', name: 'Default'},
155
- {value: 'help', name: 'Help'},
156
- {value: 'move', name: 'Move'},
157
- {value: 'progress', name: 'Progress'},
158
- {value: 'pointer', name: 'Pointer'},
159
- {value: 'n-resize', name: 'N-resize'},
160
- {value: 'ne-resize ', name: 'Ne-resize '},
161
- {value: 'e-resize', name: 'E-resize'},
162
- {value: 'se-resize', name: 'Se-resize'},
163
- {value: 's-resize', name: 'S-resize'},
164
- {value: 'sw-resize', name: 'Sw-resize'},
165
- {value: 'w-resize', name: 'W-resize'},
166
- {value: 'nw-resize', name: 'Nw-resize'},
167
- {value: 'text', name: 'Text'},
168
- {value: 'wait', name: 'Wait'},
169
- ],
170
- }, {
171
- property: 'overflow',
172
- type: 'select',
173
- defaults: 'auto',
174
- list : [
175
- {value: 'auto', name: 'Auto'},
176
- {value: 'hidden', name: 'Hidden'},
177
- {value: 'visible', name: 'Visible'},
178
- {value: 'scroll', name: 'Scroll'},
179
- {value: 'initial', name: 'Initial'},
180
- {value: 'inherit', name: 'Inherit'},
181
-
182
- ],
183
- }, {
184
- property: 'overflow-x',
185
- type: 'select',
186
- defaults: 'auto',
187
- list : [
188
- {value: 'auto', name: 'Auto'},
189
- {value: 'hidden', name: 'Hidden'},
190
- {value: 'visible', name: 'Visible'},
191
- {value: 'scroll', name: 'Scroll'},
192
- {value: 'initial', name: 'Initial'},
193
- {value: 'inherit', name: 'Inherit'},
194
-
195
- ],
196
- }, {
197
- property: 'overflow-y',
198
- type: 'select',
199
- defaults: 'auto',
200
- list : [
201
- {value: 'auto', name: 'Auto'},
202
- {value: 'hidden', name: 'Hidden'},
203
- {value: 'visible', name: 'Visible'},
204
- {value: 'scroll', name: 'Scroll'},
205
- {value: 'initial', name: 'Initial'},
206
- {value: 'inherit', name: 'Inherit'},
207
-
208
- ],
209
- }]
210
- },{
211
- name: 'Dimension',
212
- open: false,
213
- buildProps: [ 'width', 'flex-width', 'height', 'min-width', 'max-width', 'min-height', 'max-height',
214
- 'padding','margin'],
215
- properties: [{
216
- id: 'flex-width',
217
- type: 'integer',
218
- name: 'Width',
219
- units: ['px', '%', 'rem', 'em'],
220
- property: 'flex-basis',
221
- toRequire: 1,
222
- },
223
- {
224
- id: 'width',
225
- type: 'integer',
226
- name: 'Width',
227
- units: ['px', '%', 'rem', 'em'],
228
- property: 'width'
229
- },
230
- {
231
- id: 'height',
232
- type: 'integer',
233
- name: 'Height',
234
- units: ['px', '%', 'rem', 'em'],
235
- property: 'height'
236
- },
237
- {
238
- id: 'min-width',
239
- type: 'integer',
240
- name: 'Min width',
241
- units: ['px', '%', 'rem', 'em'],
242
- property: 'min-width'
243
- },
244
- {
245
- id: 'max-width',
246
- type: 'integer',
247
- name: 'Max width',
248
- units: ['px', '%', 'rem', 'em'],
249
- property: 'max-width'
250
- },
251
- {
252
- id: 'min-height',
253
- type: 'integer',
254
- name: 'Min height',
255
- units: ['px', '%', 'rem', 'em'],
256
- property: 'min-height'
257
- },
258
- {
259
- id: 'max-height',
260
- type: 'integer',
261
- name: 'Max height',
262
- units: ['px', '%', 'rem', 'em'],
263
- property: 'max-height'
264
- },
265
- {
266
- name : 'Padding',
267
- property : 'padding',
268
- type : 'composite',
269
- properties : [
270
- {
271
- id: 'padding-top',
272
- type: 'integer',
273
- name: 'Top',
274
- units: ['px', '%', 'rem', 'em'],
275
- property: 'padding-top',
276
- defaults: 0
277
- },
278
- {
279
- id: 'padding-right',
280
- type: 'integer',
281
- name: 'Right',
282
- units: ['px', '%', 'rem', 'em'],
283
- property: 'padding-right',
284
- defaults: 0
285
- },
286
- {
287
- id: 'padding-left',
288
- type: 'integer',
289
- name: 'Left',
290
- units: ['px', '%', 'rem', 'em'],
291
- property: 'padding-left',
292
- defaults: 0
293
- },
294
- {
295
- id: 'padding-bottom',
296
- type: 'integer',
297
- name: 'Bottom',
298
- units: ['px', '%', 'rem', 'em'],
299
- property: 'padding-bottom',
300
- defaults: 0
301
- }
302
- ]
303
- },
304
- {
305
- name : 'Margin',
306
- property : 'margin',
307
- type : 'composite',
308
- properties : [
309
- {
310
- id: 'margin-top',
311
- type: 'integer',
312
- name: 'Top',
313
- units: ['px', '%', 'rem', 'em'],
314
- property: 'margin-top',
315
- defaults: 0
316
- },
317
- {
318
- id: 'margin-right',
319
- type: 'integer',
320
- name: 'Right',
321
- units: ['px', '%', 'rem', 'em'],
322
- property: 'margin-right',
323
- defaults: 0
324
- },
325
- {
326
- id: 'margin-left',
327
- type: 'integer',
328
- name: 'Left',
329
- units: ['px', '%', 'rem', 'em'],
330
- property: 'margin-left',
331
- defaults: 0
332
- },
333
- {
334
- id: 'margin-bottom',
335
- type: 'integer',
336
- name: 'Bottom',
337
- units: ['px', '%', 'rem', 'em'],
338
- property: 'margin-bottom',
339
- defaults: 0
340
- }
341
- ]
342
- },
343
-
344
- ]
345
- },{
346
- name: 'Typography',
347
- open: false,
348
- buildProps: ['font-family', 'font-size', 'font-weight', 'letter-spacing', 'color', 'line-height',
349
- 'text-indent', 'font-style', 'text-align', 'text-transform', 'text-decoration', 'text-shadow'],
350
- properties: [{
351
- property: 'text-align',
352
- list : [
353
- {value: 'left', className: 'fa fa-align-left'},
354
- {value: 'center', className: 'fa fa-align-center' },
355
- {value: 'right', className: 'fa fa-align-right'},
356
- {value: 'justify', className: 'fa fa-align-justify'}
357
- ],
358
- },
359
- {
360
- id: 'text-indent',
361
- type: 'integer',
362
- name: 'Text indent',
363
- units: ['px', '%', 'rem', 'em'],
364
- property: 'text-indent',
365
- defaults: 0
366
- },
367
- {
368
- property: 'font-style',
369
- type: 'radio',
370
- list : [
371
- {value: 'normal', name: 'Normal'},
372
- {value: 'italic', name: 'Italic'},
373
- {value: 'oblique', name: 'Oblique'},
374
- ],
375
- },
376
- {
377
- property: 'text-transform',
378
- type: 'radio',
379
- list : [
380
- {value: 'lowercase', name: 'a'},
381
- {value: 'uppercase', name: 'A'},
382
- {value: 'capitalize', name: 'Aa'}
383
- ],
384
- },
385
- {
386
- property: 'text-decoration',
387
- type: 'radio',
388
- list : [
389
- {value: 'underline', className: 'fa fa-underline'},
390
- {value: 'line-through', className: 'fa fa-strikethrough'}
391
- ],
392
- },
393
- {
394
- property: 'font-family',
395
- type: 'text',
396
- // list : [
397
- // { name: 'Arial', value: 'Arial, Helvetica, sans-serif' },
398
-
399
- // ],
400
- }
401
- ]
402
- },
403
- {
404
- name: 'Background',
405
- open: false,
406
- buildProps: ['background-color', 'box-shadow', 'background'],
407
- },{
408
- name: 'Border',
409
- open: false,
410
- buildProps: ['border-radius-c', 'border-radius', 'border'],
411
- properties: [
412
- {
413
- name : 'Border width',
414
- property : 'border-width',
415
- type : 'composite',
416
- properties : [
417
- {
418
- id: 'border-top-width',
419
- type: 'integer',
420
- name: 'Border top',
421
- units: ['px', '%', 'rem', 'em'],
422
- property: 'border-top-width',
423
- defaults: 0
424
- },
425
- {
426
- id: 'border-right-width',
427
- type: 'integer',
428
- name: 'Border right',
429
- units: ['px', '%', 'rem', 'em'],
430
- property: 'border-right-width',
431
- defaults: 0
432
- },
433
- {
434
- id: 'border-bottom-width',
435
- type: 'integer',
436
- name: 'Border bottom',
437
- units: ['px', '%', 'rem', 'em'],
438
- property: 'border-bottom-width',
439
- defaults: 0
440
- },
441
- {
442
- id: 'border-left-width',
443
- type: 'integer',
444
- name: 'Border left',
445
- units: ['px', '%', 'rem', 'em'],
446
- property: 'border-left-width',
447
- defaults: 0
448
- }
449
- ]
450
- },
451
- ]
452
- },{
453
- name: 'Extra',
454
- open: false,
455
- buildProps: ['opacity', 'filter', 'transition', 'perspective', 'transform'],
456
- properties: [{
457
- type: 'slider',
458
- property: 'opacity',
459
- defaults: 1,
460
- step: 0.01,
461
- max: 1,
462
- min:0,
463
- }]
464
- },{
465
- name: 'Flex',
466
- open: false,
467
- properties: [{
468
- name : 'Flex Container',
469
- property : 'display',
470
- type : 'select',
471
- defaults : 'block',
472
- list : [{
473
- value : 'block',
474
- name : 'Disable',
475
- },{
476
- value : 'flex',
477
- name : 'Enable',
478
- }],
479
- },{
480
- name: 'Flex Parent',
481
- property: 'label-parent-flex',
482
- },{
483
- name : 'Direction',
484
- property : 'flex-direction',
485
- type : 'radio',
486
- defaults : 'row',
487
- list : [{
488
- value : 'row',
489
- name : 'Row',
490
- className : 'icons-flex icon-dir-row',
491
- title : 'Row',
492
- },{
493
- value : 'row-reverse',
494
- name : 'Row reverse',
495
- className : 'icons-flex icon-dir-row-rev',
496
- title : 'Row reverse',
497
- },{
498
- value : 'column',
499
- name : 'Column',
500
- title : 'Column',
501
- className : 'icons-flex icon-dir-col',
502
- },{
503
- value : 'column-reverse',
504
- name : 'Column reverse',
505
- title : 'Column reverse',
506
- className : 'icons-flex icon-dir-col-rev',
507
- }],
508
- },{
509
- name : 'Wrap',
510
- property : 'flex-wrap',
511
- type : 'radio',
512
- defaults : 'nowrap',
513
- list : [{
514
- value : 'nowrap',
515
- title : 'Single line',
516
- },{
517
- value : 'wrap',
518
- title : 'Multiple lines',
519
- },{
520
- value : 'wrap-reverse',
521
- title : 'Multiple lines reverse',
522
- }],
523
- },{
524
- name : 'Justify',
525
- property : 'justify-content',
526
- type : 'radio',
527
- defaults : 'flex-start',
528
- list : [{
529
- value : 'flex-start',
530
- className : 'icons-flex icon-just-start',
531
- title : 'Start',
532
- },{
533
- value : 'flex-end',
534
- title : 'End',
535
- className : 'icons-flex icon-just-end',
536
- },{
537
- value : 'space-between',
538
- title : 'Space between',
539
- className : 'icons-flex icon-just-sp-bet',
540
- },{
541
- value : 'space-around',
542
- title : 'Space around',
543
- className : 'icons-flex icon-just-sp-ar',
544
- },{
545
- value : 'center',
546
- title : 'Center',
547
- className : 'icons-flex icon-just-sp-cent',
548
- }],
549
- },{
550
- name : 'Align',
551
- property : 'align-items',
552
- type : 'radio',
553
- defaults : 'center',
554
- list : [{
555
- value : 'flex-start',
556
- title : 'Start',
557
- className : 'icons-flex icon-al-start',
558
- },{
559
- value : 'flex-end',
560
- title : 'End',
561
- className : 'icons-flex icon-al-end',
562
- },{
563
- value : 'stretch',
564
- title : 'Stretch',
565
- className : 'icons-flex icon-al-str',
566
- },{
567
- value : 'center',
568
- title : 'Center',
569
- className : 'icons-flex icon-al-center',
570
- }],
571
- },{
572
- name: 'Flex Children',
573
- property: 'label-parent-flex',
574
- },{
575
- name: 'Order',
576
- property: 'order',
577
- type: 'integer',
578
- defaults : 0,
579
- min: 0
580
- },{
581
- name : 'Flex',
582
- property : 'flex',
583
- type : 'composite',
584
- properties : [{
585
- name: 'Grow',
586
- property: 'flex-grow',
587
- type: 'integer',
588
- defaults : 0,
589
- min: 0
590
- },{
591
- name: 'Shrink',
592
- property: 'flex-shrink',
593
- type: 'integer',
594
- defaults : 0,
595
- min: 0
596
- },{
597
- name: 'Basis',
598
- property: 'flex-basis',
599
- type: 'integer',
600
- units: ['px','%',''],
601
- unit: '',
602
- defaults : 'auto',
603
- }],
604
- },{
605
- name : 'Align',
606
- property : 'align-self',
607
- type : 'radio',
608
- defaults : 'auto',
609
- list : [{
610
- value : 'auto',
611
- name : 'Auto',
612
- },{
613
- value : 'flex-start',
614
- title : 'Start',
615
- label: 'Start',
616
- className : 'icons-flex icon-al-start',
617
- },{
618
- value : 'flex-end',
619
- title : 'End',
620
- className : 'icons-flex icon-al-end',
621
- },{
622
- value : 'stretch',
623
- title : 'Stretch',
624
- className : 'icons-flex icon-al-str',
625
- },{
626
- value : 'center',
627
- title : 'Center',
628
- className : 'icons-flex icon-al-center',
629
- }],
630
- }]
631
- }
632
-
633
- ];
634
-
635
-
636
- var links = document.getElementsByTagName('link')
637
- var styles = [];
638
- for(var i=1; i < links.length; i++) {
639
- styles.push(links[i].href)
640
- }
641
-
642
- var links = document.getElementsByTagName('script')
643
- var scripts = [];
644
- for(var i=0; i < links.length; i++) {
645
- scripts.push(links[i].src)
646
- }
647
-
648
- try {
649
- var css_style = gon.editor.css_style;
650
- var images_assets = gon.editor.images_assets;
651
- var view_id = gon.editor.view_id;
652
- var view_name = gon.editor.view_name;
653
- } catch (e) {
654
- if (e instanceof SyntaxError) {
655
- console.log(e.message);
656
- }
657
- }
658
-
659
- var editor = grapesjs.init(
660
- {
661
- container: document.getElementById("keppler-editor"),
662
- protectedCss: '',
663
- style: css_style,
664
- scripts: "function abr(){}",
665
- canvas: {
666
- styles: styles,
667
- scripts: scripts
668
- },
669
- width: 'auto',
670
- fromElement: true,
671
- //
672
- plugins: ['testplug', 'gjs-blocks-basic', 'grapesjs-custom-code', 'gjs-plugin-forms', 'grapesjs-lory-slider', 'gjs-component-countdown', 'gjs-style-gradient'],
673
- pluginsOpts: {
674
- 'gjs-style-gradient': {
675
- colorPicker: 'default',
676
- grapickOpts: {
677
- min: 1,
678
- max: 99,
679
- }
680
- }
681
- },
682
- autorender: 0,
683
- allowScripts: 1,
684
- showOffsets: 1,
685
- noticeOnUnload: 0,
686
- avoidInlineStyle: 1,
687
- avoidDefaults: 1,
688
- // forceClass: 0,
689
- storageManager: { autoload: 0 },
690
- // storageManager: { type: 'firebase-firestore' },
691
- layerManager: {
692
- showWrapper: 0,
693
- },
694
- assetManager: {
695
- upload: '/admin/frontend/assets/upload',
696
- autoAdd: true,
697
- assets: images_assets
698
- },
699
-
700
- styleManager : {
701
- clearProperties: 1,
702
- sectors: sectors,
703
- },
704
-
705
- });
706
-
707
-
708
- window.editor = editor;
709
-
710
- function saveCode() {
711
- try {
712
- var html = extrasEditor.deleteAreas(editor.getHtml(), view_name);
713
- var html = extrasEditor.buildHtml(html);
714
- var css = editor.getCss();
715
- var css = cssbeautify(css, {
716
- indent: ' ',
717
- openbrace: 'separate-line',
718
- autosemicolon: true
719
- });
720
-
721
- $.post("/admin/frontend/views/"+view_id+"/live_editor/save", {html: html, css: css}, function(data){
722
- if(data.result) {
723
- alert('Your code has been saved')
724
- } else {
725
- alert('Error when saving: Check that all is well')
726
- }
727
- })
728
- } catch (e) {
729
- alert('Error when saving: Check that all is well')
730
- }
731
- }
732
-
733
-
734
- var toogleTools = false;
735
- var pnm = editor.Panels;
736
-
737
- pnm.addButton('commands', [
738
- {
739
- id: 'keppler-logo',
740
- className: 'gjs-keppler-logo',
741
- command: function(e) {},
742
- }
743
- ]);
744
-
745
- pnm.addButton('options', [{
746
- id: 'undo',
747
- className: 'fa fa-undo icon-undo',
748
- title: 'Undo',
749
- command: function(e) { return e.runCommand('core:undo') },
750
- },{
751
- id: 'redo',
752
- title: 'Redo',
753
- className: 'fa fa-repeat icon-redo',
754
- command: function(e) { return e.runCommand('core:redo') },
755
- },
756
- {
757
- id: 'refresh',
758
- title: 'Refresh',
759
- className: 'fa fa-refresh',
760
- command(editor, sender) {
761
- window.location.reload();
762
- },
763
- },
764
- // {
765
- // id: 'clear-all',
766
- // className: 'fa fa-trash icon-blank',
767
- // command: function(e) { return e.runCommand('core:canvas-clear') },
768
- // },
769
- {
770
- id: 'save-code',
771
- title: 'Save',
772
- className: 'fa fa-save',
773
- command(editor, sender) {
774
- saveCode(editor, view_id);
775
- },
776
- }, {
777
- id: 'exit',
778
- title: 'Exit',
779
- className: 'fa fa-sign-out',
780
- command(editor, sender) {
781
- var confirmation = confirm("Are you sure?");
782
- if (confirmation===true) {
783
- window.location.href = window.location.pathname
784
- }
785
- },
786
- },
787
- {
788
- id: 'show-tools',
789
- title: 'Open tools',
790
- className: 'fa fa-bars',
791
- command(editor, sender) {
792
- if(toogleTools===false) {
793
- $(".gjs-pn-views").removeClass('gsj-hide-tools').addClass('gsj-show-tools')
794
- $(".gjs-pn-views-container").removeClass('gsj-hide-tools').addClass('gsj-show-tools')
795
- $(".gjs-pn-options > .gjs-pn-buttons > .gjs-pn-btn.fa-bars ").removeClass('fa-bars').addClass('fa-times')
796
- $('.gjs-cv-canvas').addClass('gjs-cv-canvas-width')
797
- toogleTools=true
798
- } else {
799
- $(".gjs-pn-views").removeClass('gsj-show-tools').addClass('gsj-hide-tools')
800
- $(".gjs-pn-views-container").removeClass('gsj-show-tools').addClass('gsj-hide-tools')
801
- $(".gjs-pn-options > .gjs-pn-buttons > .gjs-pn-btn.fa-times ").removeClass('fa-times').addClass('fa-bars')
802
- $('.gjs-cv-canvas').removeClass('gjs-cv-canvas-width')
803
- toogleTools=false
804
- }
805
- },
806
- }]);
807
-
808
-
809
- editor.StyleManager.addProperty('Background', {
810
- id: 'gradient',
811
- name: 'Gradient',
812
- property: 'background-image',
813
- type: 'gradient',
814
- defaults: 'none'
815
- });
816
-
817
- var codeButton = pnm.getButton("options", "fullscreen");
818
- codeButton.collection.remove(codeButton);
819
- // var codeButton = editor.Panels.getButton("options", "export-template");
820
- // codeButton.collection.remove(codeButton);
821
-
822
- var bm = editor.BlockManager;
823
- var noArea = false;
824
-
825
-
826
-
827
- editor.on('canvas:dragenter', (some, argument) => {
828
- // do something
829
- $(".gjs-pn-views").removeClass('gsj-show-tools').addClass('gsj-hide-tools')
830
- $('.gjs-cv-canvas').removeClass('gjs-cv-canvas-width')
831
- $(".gjs-pn-views-container").removeClass('gsj-show-tools').addClass('gsj-hide-tools')
832
- $(".gjs-pn-options > .gjs-pn-buttons > .gjs-pn-btn.fa-bars ").removeClass('fa-times').addClass('fa-bars')
833
- })
834
-
835
- editor.on('canvas:dragend', (some, argument) => {
836
- // do something
837
- noArea = extrasEditor.getIfNotArea(some);
838
- $('.gjs-cv-canvas').addClass('gjs-cv-canvas-width')
839
- $(".gjs-pn-views").removeClass('gsj-hide-tools').addClass('gsj-show-tools')
840
- $(".gjs-pn-views-container").removeClass('gsj-hide-tools').addClass('gsj-show-tools')
841
- $(".gjs-pn-options > .gjs-pn-buttons > .gjs-pn-btn.fa-times ").removeClass('fa-bars').addClass('fa-times')
842
- })
843
-
844
- editor.on("block:drag:start", (some, argument) => {
845
- var section = ['header', 'view', 'footer']
846
-
847
- for(var i=0; i < section.length; i++) {
848
- var el = $(".gjs-frame").contents().find("#keppler-"+section[i]);
849
- $(el).addClass("keppler-"+section[i]+"-area")
850
- }
851
- })
852
-
853
-
854
- editor.on("block:drag:stop", (some, argument) => {
855
- var section = ['header', 'view', 'footer']
856
-
857
- for(var i=0; i < section.length; i++) {
858
- var el = $(".gjs-frame").contents().find("#keppler-"+section[i]);
859
- $(el).removeClass("keppler-"+section[i]+"-area")
860
- }
861
- var el = $(some.view.$el[0]);
862
- if (!noArea) {
863
- el.remove();
864
- }
865
- })
866
-
867
-
868
- bm.add('link', {
869
- label: 'Link',
870
- category: 'Basic',
871
- attributes: {class:'fa fa-link'},
872
- content: {
873
- type:'link',
874
- content:'Link',
875
- style:{color: '#d983a6'}
876
- }
877
- });
878
-
879
- bm.add('link-block', {
880
- label: 'Link Block',
881
- attributes: {class:'fa fa-link'},
882
- category: 'Basic',
883
- content: {
884
- type:'link',
885
- editable: false,
886
- draggable: '#wrapper',
887
- style:{
888
- display: 'inline-block',
889
- padding: '5px',
890
- 'min-height': '50px',
891
- 'min-width': '50px'
892
- }
893
- },
894
- });
895
-
896
- bm.add('image', {
897
- label: 'Image',
898
- category: 'Basic',
899
- attributes: {class:'gjs-fonts gjs-f-image'},
900
- content: {
901
- style: {color: 'black'},
902
- type:'image',
903
- activeOnRender: 1
904
- }
905
- });
906
-
907
- bm.add('video', {
908
- label: 'Video',
909
- category: 'Basic',
910
- attributes: {class:'fa fa-youtube-play'},
911
- content: {
912
- type: 'video',
913
- src: 'img/video2.webm',
914
- style: {
915
- height: '350px',
916
- width: '615px',
917
- }
918
- }
919
- });
920
-
921
- bm.add('b1-2', {
922
- label: 'Flex Columns',
923
- category: 'Layouts',
924
- attributes: { class:'gjs-fonts gjs-f-b1' },
925
- content: `
926
- <div class="row-flex" data-columns="1" style="text-align: center" data-gjs-droppable="[data-column]" data-gjs-highlightable="false" data-gjs-resizable='{"tl":0,"tc":0,"tr":0,"cl":0,"cr":0,"bl":0,"br":0}' data-gjs-custom-name="Row">
927
- <div class="cell-flex" data-column="1" style="letter-spacing: normal; flex-basis: 100%" data-gjs-draggable="[data-columns]" data-gjs-resizable='{"tl":0,"tc":0,"tr":0,"cl":0,"bl":0,"br":0,"bc": 0, "keyWidth": "flex-basis", "currentUnit": 1, "minDim": 1, "maxDim": 100, "step": 0.2}' data-gjs-unstylable='["width"]' data-gjs-stylable-require='["flex-basis"]'></div>
928
- <div class="cell-flex" data-column="1" style="letter-spacing: normal; flex-basis: 100%" data-gjs-draggable="[data-columns]" data-gjs-resizable='{"tl":0,"tc":0,"tr":0,"cl":0,"bl":0,"br":0,"bc": 0, "keyWidth": "flex-basis", "currentUnit": 1, "minDim": 1, "maxDim": 100, "step": 0.2}' data-gjs-unstylable='["width"]' data-gjs-stylable-require='["flex-basis"]'></div>
929
- </div>
930
- <style>
931
- .row-flex {
932
- display: flex;
933
- justify-content: flex-start;
934
- align-items: stretch;
935
- flex-wrap: nowrap;
936
- padding: 10px;
937
- }
938
-
939
- .cell-flex {
940
- min-height: 75px;
941
- flex-grow: 1;
942
- flex-basis: 100%;
943
- }
944
- </style>
945
- `
946
- });
947
-
948
- try {
949
- for(var i=0; i < gon.editor.components.length; i++) {
950
- var component = eval(gon.editor.components[i][0]);
951
- if (component.length === 2) {
952
- component[1].content.components = gon.editor.components[i][1]
953
- bm.add(component[0], component[1]);
954
- }
955
- }
956
- } catch (e) {
957
- if (e instanceof SyntaxError) {
958
- console.log(e.message);
959
- }
960
- }
961
-
962
- bm.add('section', {
963
- id: 'section',
964
- label: 'Section',
965
- attributes: {class:'fa fa-code'},
966
- category: 'Layouts',
967
- content: {
968
- content:'<section>Section content</section>',
969
- style: {padding: '10px' },
970
- activeOnRender: 1
971
- }
972
- });
973
-
974
- bm.add('text', {
975
- id: 'text',
976
- label: 'Text',
977
- attributes: {class:'gjs-fonts gjs-f-text'},
978
- category: 'Typography',
979
- content: {
980
- type:'text',
981
- content:'Insert your text here',
982
- style: {padding: '10px' },
983
- activeOnRender: 1
984
- },
985
- });
986
-
987
- bm.add('h1p', {
988
- label: 'Text section',
989
- category: 'Typography',
990
- content: `<div>
991
- <h1 class="heading">Insert title here</h1>
992
- <p class="paragraph">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</p>
993
- </div>`,
994
- attributes: {class:'gjs-fonts gjs-f-h1p'}
995
- });
996
-
997
- bm.add('quo', {
998
- label: 'Quote',
999
- category: 'Typography',
1000
- content: '<blockquote class="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit</blockquote>',
1001
- attributes: {class:'fa fa-quote-right'}
1002
- });
1003
-
1004
- bm.add('map', {
1005
- label: 'Map',
1006
- category: 'Extra',
1007
- attributes: {class:'fa fa-map-o'},
1008
- content: {
1009
- type: 'map',
1010
- style: {height: '350px'}
1011
- },
1012
- });
1013
-
1014
- // Store and load events
1015
- editor.on('storage:load', function(e) {
1016
- // console.log('LOAD ', e);
1017
- });
1018
- editor.on('storage:store', function(e) {
1019
- // console.log('STORE ', e);
1020
- });
1021
-
1022
- var domComps = editor.DomComponents;
1023
- var dType = domComps.getType('default');
1024
- var dModel = dType.model;
1025
- var dView = dType.view;
1026
-
1027
- domComps.addType('input', {
1028
- model: dModel.extend({
1029
- defaults: Object.assign({}, dModel.prototype.defaults, {
1030
- traits: [
1031
- // strings are automatically converted to text types
1032
- 'name',
1033
- 'placeholder',
1034
- {
1035
- type: 'select',
1036
- label: 'Type',
1037
- name: 'type',
1038
- options: [
1039
- {value: 'text', name: 'Text'},
1040
- {value: 'email', name: 'Email'},
1041
- {value: 'password', name: 'Password'},
1042
- {value: 'number', name: 'Number'},
1043
- ]
1044
- }, {
1045
- type: 'checkbox',
1046
- label: 'Required',
1047
- name: 'required',
1048
- }],
1049
- }),
1050
- }, {
1051
- isComponent: function(el) {
1052
- if(el.tagName == 'INPUT'){
1053
- return {type: 'input'};
1054
- }
1055
- },
1056
- }),
1057
-
1058
- view: dView,
1059
- });
1060
-
1061
-
1062
- editor.on('traverse:html', function (node, resultNode) {
1063
-
1064
- });
1065
- editor.on('load', () => {
1066
- });
1067
- editor.render();
1068
-
1069
- editor.on('styleable:change', (model, property) => {
1070
- const value = model.getStyle()[property];
1071
- if (value!=undefined && value.indexOf('!important') === -1) {
1072
- // if (property.includes("background")) {
1073
- model.addStyle({ [property]: value + ' !important' });
1074
- // }
1075
- }
1076
- });
1077
-
1078
- // Commands
1079
- editor.Commands.add('set-device-desktop', {
1080
- run: editor => editor.setDevice('Desktop')
1081
- });
1082
- editor.Commands.add('set-device-mobile', {
1083
- run: editor => editor.setDevice('Mobile')
1084
- });
1085
-
1086
- var devices = editor.DeviceManager;
1087
-
1088
- devices.add('Desktop Extra Large (1900px)', '1900px');
1089
-
1090
- devices.add('Desktop Large (1600px)', '1600px');
1091
-
1092
- devices.add('Desktop Medium (1440px)', '1440px');
1093
-
1094
- devices.add('iPad Portrait (768px)', '768px');
1095
-
1096
- devices.add('iPad Landscape (1024px x 768px)', '1024px', {
1097
- height: '768px'
1098
- });
1099
-
1100
- devices.add('Galaxy S5 Portrait (360px x 640px)', '360px', {
1101
- height: '640px'
1102
- });
1103
-
1104
- devices.add('Galaxy S5 Landscape (640px x 360px)', '640px', {
1105
- height: '360px'
1106
- });
1107
-
1108
- devices.add('Pixel 2 Portrait (411px x 731px)', '411px', {
1109
- height: '731px'
1110
- });
1111
-
1112
- devices.add('Pixel 2 Landscape (731px x 411px)', '731px', {
1113
- height: '411px'
1114
- });
1115
-
1116
- devices.add('Pixel 2 XL Portrait (411px x 823px)', '411px', {
1117
- height: '823px'
1118
- });
1119
-
1120
- devices.add('Pixel 2 XL Landscape (823px x 411px)', '823px', {
1121
- height: '411px'
1122
- });
1123
-
1124
- devices.add('iPhone 5/SE Portrait (320px x 568px)', '320px', {
1125
- height: '568px'
1126
- });
1127
-
1128
- devices.add('iPhone 5/SE Landscape (568px x 320px)', '568px', {
1129
- height: '320px'
1130
- });
1131
-
1132
- devices.add('iPhone 6/7/8 Portrait (375px x 667px)', '375px', {
1133
- height: '667px'
1134
- });
1135
-
1136
- devices.add('iPhone 6/7/8 Landscape (667px x 375px)', '667px', {
1137
- height: '375px'
1138
- });
1139
-
1140
- devices.add('iPhone 6/7/8 Plus Portrait (414px x 736px)', '414px', {
1141
- height: '736px'
1142
- });
1143
-
1144
- devices.add('iPhone 6/7/8 Plus Landscape (736px x 414px)', '736px', {
1145
- height: '414px'
1146
- });
1147
-
1148
- devices.add('iPhone X Portrait (375px x 812px)', '375px');
1149
-
1150
- devices.add('iPhone X Landscape (812px x 375px)', '812px', {
1151
- height: '375px'
1152
- });
1153
-
1154
- })
1155
-
1156
-
1157
-
1158
- extrasEditor.createNoEditAreaEditor();
1159
- extrasEditor.createAreas();
1160
-
1161
- // Quitar el keppler-style link de layers
1162
- $(document).ready(function(){
1163
- $('.gjs-pn-buttons > .gjs-pn-btn').click(function() {
1164
- var layers = $('.gjs-layer');
1165
- if(layers.length > 0) {
1166
- for(var i=0; i < layers.length; i++) {
1167
- // console.log(layers[i])
1168
- if(layers[i].outerText==="Keppler-style\n1") {
1169
- $(layers[i]).remove();
1170
- }
1171
- }
1172
- }
1173
- });
1174
- })