kaui 2.0.4 → 3.0.1

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 (276) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +8 -23
  3. data/Rakefile +4 -2
  4. data/app/assets/config/kaui_manifest.js +45 -0
  5. data/app/assets/javascripts/jquery.spin.js +76 -0
  6. data/app/assets/javascripts/kaui/kaui.js +76 -0
  7. data/app/assets/javascripts/kaui_application.js +25 -0
  8. data/app/assets/javascripts/spin.js +76 -0
  9. data/app/assets/stylesheets/bootstrap_and_overrides.scss +240 -0
  10. data/app/assets/stylesheets/kaui/{account.less → account.scss} +13 -1
  11. data/app/assets/stylesheets/kaui/{audit.less → audit.scss} +5 -1
  12. data/app/assets/stylesheets/kaui/{common.less → common.scss} +19 -17
  13. data/app/assets/stylesheets/kaui/{datatable.less → datatable.scss} +6 -3
  14. data/app/assets/stylesheets/kaui/{header.less → header.scss} +16 -12
  15. data/app/assets/stylesheets/kaui/{home.less → home.scss} +7 -4
  16. data/app/assets/stylesheets/kaui/{invoice.less → invoice.scss} +7 -3
  17. data/app/assets/stylesheets/kaui/kaui.scss +265 -0
  18. data/app/assets/stylesheets/kaui/kaui_bootstrap.scss +3 -0
  19. data/app/assets/stylesheets/kaui/{overdue.less → overdue.scss} +3 -1
  20. data/app/assets/stylesheets/kaui/{payment.less → payment.scss} +3 -0
  21. data/app/assets/stylesheets/kaui/{subscription.less → subscription.scss} +4 -1
  22. data/app/assets/stylesheets/kaui/{tags.less → tags.scss} +9 -5
  23. data/app/assets/stylesheets/kaui/timeline.scss +7 -0
  24. data/app/assets/stylesheets/kaui/tooltip.scss +15 -0
  25. data/app/controllers/kaui/account_children_controller.rb +25 -28
  26. data/app/controllers/kaui/account_custom_fields_controller.rb +16 -15
  27. data/app/controllers/kaui/account_emails_controller.rb +28 -25
  28. data/app/controllers/kaui/account_tags_controller.rb +37 -34
  29. data/app/controllers/kaui/account_timelines_controller.rb +38 -33
  30. data/app/controllers/kaui/accounts_controller.rb +269 -255
  31. data/app/controllers/kaui/admin_allowed_users_controller.rb +105 -99
  32. data/app/controllers/kaui/admin_controller.rb +32 -31
  33. data/app/controllers/kaui/admin_tenants_controller.rb +434 -388
  34. data/app/controllers/kaui/audit_logs_controller.rb +87 -84
  35. data/app/controllers/kaui/bundle_tags_controller.rb +24 -20
  36. data/app/controllers/kaui/bundles_controller.rb +96 -82
  37. data/app/controllers/kaui/chargebacks_controller.rb +36 -33
  38. data/app/controllers/kaui/charges_controller.rb +23 -20
  39. data/app/controllers/kaui/credits_controller.rb +28 -25
  40. data/app/controllers/kaui/custom_fields_controller.rb +172 -38
  41. data/app/controllers/kaui/engine_controller.rb +2 -1
  42. data/app/controllers/kaui/engine_controller_util.rb +132 -114
  43. data/app/controllers/kaui/home_controller.rb +230 -217
  44. data/app/controllers/kaui/invoice_items_controller.rb +43 -39
  45. data/app/controllers/kaui/invoice_tags_controller.rb +32 -0
  46. data/app/controllers/kaui/invoices_controller.rb +134 -88
  47. data/app/controllers/kaui/login_proxy_controller.rb +2 -1
  48. data/app/controllers/kaui/payment_methods_controller.rb +103 -90
  49. data/app/controllers/kaui/payments_controller.rb +95 -92
  50. data/app/controllers/kaui/queues_controller.rb +47 -14
  51. data/app/controllers/kaui/refunds_controller.rb +36 -33
  52. data/app/controllers/kaui/registrations_controller.rb +7 -7
  53. data/app/controllers/kaui/role_definitions_controller.rb +17 -14
  54. data/app/controllers/kaui/sessions_controller.rb +7 -4
  55. data/app/controllers/kaui/subscriptions_controller.rb +197 -187
  56. data/app/controllers/kaui/tag_definitions_controller.rb +28 -27
  57. data/app/controllers/kaui/tags_controller.rb +25 -22
  58. data/app/controllers/kaui/tenants_controller.rb +30 -28
  59. data/app/controllers/kaui/transactions_controller.rb +43 -38
  60. data/app/helpers/kaui/account_helper.rb +22 -12
  61. data/app/helpers/kaui/application_helper.rb +8 -3
  62. data/app/helpers/kaui/date_helper.rb +4 -3
  63. data/app/helpers/kaui/home_helper.rb +2 -0
  64. data/app/helpers/kaui/locale_helper.rb +7 -6
  65. data/app/helpers/kaui/money_helper.rb +2 -1
  66. data/app/helpers/kaui/object_helper.rb +11 -10
  67. data/app/helpers/kaui/payment_helper.rb +7 -6
  68. data/app/helpers/kaui/payment_method_helper.rb +3 -2
  69. data/app/helpers/kaui/permissions_helper.rb +9 -9
  70. data/app/helpers/kaui/plugin_helper.rb +25 -23
  71. data/app/helpers/kaui/subscription_helper.rb +27 -29
  72. data/app/helpers/kaui/us_states_helper.rb +7 -6
  73. data/app/helpers/kaui/uuid_helper.rb +9 -6
  74. data/app/models/kaui/ability.rb +19 -12
  75. data/app/models/kaui/account.rb +45 -28
  76. data/app/models/kaui/account_email.rb +23 -20
  77. data/app/models/kaui/account_timeline.rb +5 -1
  78. data/app/models/kaui/admin.rb +65 -64
  79. data/app/models/kaui/admin_tenant.rb +81 -82
  80. data/app/models/kaui/allowed_user.rb +13 -9
  81. data/app/models/kaui/allowed_user_tenant.rb +4 -2
  82. data/app/models/kaui/application_record.rb +2 -0
  83. data/app/models/kaui/audit_log.rb +6 -3
  84. data/app/models/kaui/base.rb +13 -7
  85. data/app/models/kaui/bundle.rb +41 -24
  86. data/app/models/kaui/catalog.rb +118 -113
  87. data/app/models/kaui/chargeback.rb +5 -1
  88. data/app/models/kaui/credit.rb +4 -1
  89. data/app/models/kaui/custom_field.rb +9 -6
  90. data/app/models/kaui/invoice.rb +25 -22
  91. data/app/models/kaui/invoice_item.rb +9 -6
  92. data/app/models/kaui/invoice_payment.rb +49 -54
  93. data/app/models/kaui/killbill_authenticatable.rb +14 -8
  94. data/app/models/kaui/killbill_registerable.rb +7 -0
  95. data/app/models/kaui/overdue.rb +64 -65
  96. data/app/models/kaui/payment.rb +22 -19
  97. data/app/models/kaui/payment_method.rb +48 -39
  98. data/app/models/kaui/payment_state.rb +41 -38
  99. data/app/models/kaui/rails_methods.rb +9 -9
  100. data/app/models/kaui/refund.rb +7 -1
  101. data/app/models/kaui/role_definition.rb +5 -1
  102. data/app/models/kaui/simple_plan.rb +5 -3
  103. data/app/models/kaui/subscription.rb +10 -7
  104. data/app/models/kaui/tag.rb +25 -22
  105. data/app/models/kaui/tag_definition.rb +50 -45
  106. data/app/models/kaui/tenant.rb +6 -5
  107. data/app/models/kaui/transaction.rb +43 -31
  108. data/app/models/kaui/user.rb +10 -16
  109. data/app/models/kaui/user_role.rb +8 -5
  110. data/app/views/kaui/accounts/_billing_info.html.erb +5 -1
  111. data/app/views/kaui/accounts/_form.html.erb +2 -2
  112. data/app/views/kaui/accounts/_payment_methods.html.erb +3 -0
  113. data/app/views/kaui/accounts/index.html.erb +9 -4
  114. data/app/views/kaui/admin_allowed_users/_form.html.erb +3 -3
  115. data/app/views/kaui/admin_tenants/_form_catalog_translation.erb +1 -1
  116. data/app/views/kaui/admin_tenants/_form_invoice_template.erb +1 -1
  117. data/app/views/kaui/admin_tenants/_form_invoice_translation.erb +1 -1
  118. data/app/views/kaui/admin_tenants/_form_plugin_config.erb +13 -3
  119. data/app/views/kaui/admin_tenants/_show_catalog_simple.erb +11 -5
  120. data/app/views/kaui/admin_tenants/new_catalog.html.erb +2 -2
  121. data/app/views/kaui/admin_tenants/new_overdue_config.html.erb +2 -2
  122. data/app/views/kaui/admin_tenants/new_plan_currency.html.erb +1 -1
  123. data/app/views/kaui/bundles/_bundle_details.html.erb +12 -0
  124. data/app/views/kaui/bundles/index.html.erb +3 -14
  125. data/app/views/kaui/bundles/transfer.html.erb +13 -5
  126. data/app/views/kaui/invoice_tags/_form.html.erb +33 -0
  127. data/app/views/kaui/invoice_tags/_form_bar.html.erb +21 -0
  128. data/app/views/kaui/invoice_tags/edit.html.erb +10 -0
  129. data/app/views/kaui/invoices/_invoice_table.html.erb +29 -8
  130. data/app/views/kaui/invoices/index.html.erb +6 -4
  131. data/app/views/kaui/invoices/show.html.erb +10 -1
  132. data/app/views/kaui/layouts/kaui_flash.html.erb +32 -1
  133. data/app/views/kaui/layouts/kaui_header.html.erb +19 -2
  134. data/app/views/kaui/payment_methods/_payment_methods_details_table.html.erb +13 -4
  135. data/app/views/kaui/payments/_payment_table.html.erb +21 -11
  136. data/app/views/kaui/payments/index.html.erb +12 -10
  137. data/app/views/kaui/queues/index.html.erb +1 -1
  138. data/app/views/kaui/subscriptions/_cancel_by_date_modal.html.erb +1 -4
  139. data/app/views/kaui/subscriptions/_edit_form.html.erb +1 -1
  140. data/app/views/kaui/subscriptions/_form.html.erb +1 -1
  141. data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +3 -3
  142. data/app/views/kaui/subscriptions/edit_bcd.erb +1 -1
  143. data/app/views/kaui/tag_definitions/index.html.erb +2 -2
  144. data/app/views/kaui/tags/index.html.erb +1 -0
  145. data/config/initializers/bootstrap_datepicker_rails.rb +3 -0
  146. data/config/initializers/devise.rb +8 -6
  147. data/config/initializers/js_routes.rb +9 -0
  148. data/config/initializers/kilbill_client_init.rb +13 -0
  149. data/config/initializers/killbill_authenticatable.rb +71 -21
  150. data/config/initializers/killbill_registerable.rb +5 -3
  151. data/config/initializers/time_formats.rb +6 -4
  152. data/config/locales/en.yml +78 -1
  153. data/config/routes.rb +40 -32
  154. data/db/migrate/20130812155313_devise_create_kaui_users.rb +10 -8
  155. data/db/migrate/20150109214021_create_kaui_tenants.rb +10 -8
  156. data/db/migrate/20150112232813_create_kaui_allowed_users.rb +10 -8
  157. data/lib/generators/kaui/install/install_generator.rb +23 -20
  158. data/lib/generators/kaui/install/templates/config/initializers/kaui.rb +3 -1
  159. data/lib/kaui/engine.rb +17 -5
  160. data/lib/kaui/installer/installer.rb +27 -26
  161. data/lib/kaui/version.rb +3 -1
  162. data/lib/kaui.rb +76 -23
  163. data/lib/tasks/kaui_tasks.rake +1 -0
  164. metadata +141 -436
  165. data/app/assets/javascripts/application.js +0 -17
  166. data/app/assets/javascripts/kaui/bootstrap-tweaks.js +0 -172
  167. data/app/assets/stylesheets/bootstrap_and_overrides.css.less +0 -44
  168. data/app/assets/stylesheets/kaui/kaui.less +0 -21
  169. data/app/assets/stylesheets/kaui/timeline.less +0 -4
  170. data/config/initializers/asset.rb +0 -1
  171. data/config/initializers/kilbill-client-init.rb +0 -9
  172. data/db/schema.rb +0 -15
  173. data/test/dummy/README.rdoc +0 -261
  174. data/test/dummy/Rakefile +0 -7
  175. data/test/dummy/app/controllers/application_controller.rb +0 -9
  176. data/test/dummy/app/helpers/application_helper.rb +0 -2
  177. data/test/dummy/bin/bundle +0 -3
  178. data/test/dummy/bin/rails +0 -4
  179. data/test/dummy/bin/rake +0 -4
  180. data/test/dummy/bin/setup +0 -38
  181. data/test/dummy/bin/update +0 -29
  182. data/test/dummy/bin/yarn +0 -11
  183. data/test/dummy/config/application.rb +0 -18
  184. data/test/dummy/config/boot.rb +0 -3
  185. data/test/dummy/config/database.yml +0 -27
  186. data/test/dummy/config/environment.rb +0 -5
  187. data/test/dummy/config/environments/development.rb +0 -58
  188. data/test/dummy/config/environments/production.rb +0 -91
  189. data/test/dummy/config/environments/test.rb +0 -49
  190. data/test/dummy/config/initializers/application_controller_renderer.rb +0 -6
  191. data/test/dummy/config/initializers/assets.rb +0 -14
  192. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  193. data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
  194. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  195. data/test/dummy/config/initializers/inflections.rb +0 -16
  196. data/test/dummy/config/initializers/killbill_client.rb +0 -1
  197. data/test/dummy/config/initializers/mime_types.rb +0 -4
  198. data/test/dummy/config/initializers/new_framework_defaults_5_1.rb +0 -14
  199. data/test/dummy/config/initializers/secret_token.rb +0 -7
  200. data/test/dummy/config/initializers/session_store.rb +0 -8
  201. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  202. data/test/dummy/config/locales/en.yml +0 -33
  203. data/test/dummy/config/routes.rb +0 -3
  204. data/test/dummy/config/secrets.yml +0 -32
  205. data/test/dummy/config/symmetric-encryption.yml +0 -135
  206. data/test/dummy/config.ru +0 -4
  207. data/test/dummy/db/schema.rb +0 -52
  208. data/test/dummy/public/404.html +0 -26
  209. data/test/dummy/public/422.html +0 -26
  210. data/test/dummy/public/500.html +0 -25
  211. data/test/dummy/public/favicon.ico +0 -0
  212. data/test/dummy/script/rails +0 -6
  213. data/test/fixtures/SpyCarAdvanced.xml +0 -824
  214. data/test/fixtures/catalog-v1.xml +0 -73
  215. data/test/fixtures/catalog_translation_fr-v1.properties +0 -1
  216. data/test/fixtures/invoice_template-v1.html +0 -100
  217. data/test/fixtures/invoice_translation_fr-v1.properties +0 -23
  218. data/test/fixtures/overdue-v1.xml +0 -49
  219. data/test/fixtures/stripe.yml +0 -2
  220. data/test/functional/kaui/account_children_controller_test.rb +0 -32
  221. data/test/functional/kaui/account_custom_fields_controller_test.rb +0 -29
  222. data/test/functional/kaui/account_emails_controller_test.rb +0 -55
  223. data/test/functional/kaui/account_tags_controller_test.rb +0 -48
  224. data/test/functional/kaui/account_timelines_controller_test.rb +0 -20
  225. data/test/functional/kaui/accounts_controller_test.rb +0 -297
  226. data/test/functional/kaui/admin_allowed_users_controller_test.rb +0 -234
  227. data/test/functional/kaui/admin_controller_test.rb +0 -45
  228. data/test/functional/kaui/admin_tenants_controller_test.rb +0 -352
  229. data/test/functional/kaui/audit_logs_controller_test.rb +0 -71
  230. data/test/functional/kaui/bundle_tags_controller_test.rb +0 -23
  231. data/test/functional/kaui/bundles_controller_test.rb +0 -130
  232. data/test/functional/kaui/chargebacks_controller_test.rb +0 -42
  233. data/test/functional/kaui/charges_controller_test.rb +0 -60
  234. data/test/functional/kaui/credits_controller_test.rb +0 -54
  235. data/test/functional/kaui/custom_fields_controller_test.rb +0 -52
  236. data/test/functional/kaui/functional_test_helper.rb +0 -13
  237. data/test/functional/kaui/functional_test_helper_nosetup.rb +0 -120
  238. data/test/functional/kaui/home_controller_test.rb +0 -407
  239. data/test/functional/kaui/invoice_items_controller_test.rb +0 -82
  240. data/test/functional/kaui/invoices_controller_test.rb +0 -88
  241. data/test/functional/kaui/login_proxy_controller_test.rb +0 -12
  242. data/test/functional/kaui/payment_methods_controller_test.rb +0 -52
  243. data/test/functional/kaui/payments_controller_test.rb +0 -59
  244. data/test/functional/kaui/queues_controller_test.rb +0 -17
  245. data/test/functional/kaui/refunds_controller_test.rb +0 -63
  246. data/test/functional/kaui/registrations_controller_test.rb +0 -49
  247. data/test/functional/kaui/role_definitions_controller_test.rb +0 -47
  248. data/test/functional/kaui/subscriptions_controller_test.rb +0 -194
  249. data/test/functional/kaui/tag_definitions_controller_test.rb +0 -29
  250. data/test/functional/kaui/tags_controller_test.rb +0 -21
  251. data/test/functional/kaui/tenants_controller_test.rb +0 -60
  252. data/test/functional/kaui/transactions_controller_test.rb +0 -90
  253. data/test/integration/kaui/date_helper_integration_test.rb +0 -16
  254. data/test/integration/kaui/integration_test_helper.rb +0 -32
  255. data/test/integration/kaui/navigation_test.rb +0 -43
  256. data/test/killbill_test_helper.rb +0 -217
  257. data/test/test_helper.rb +0 -22
  258. data/test/unit/helpers/kaui/admin_allowed_users_helper_test.rb +0 -6
  259. data/test/unit/helpers/kaui/admin_tenants_helper_test.rb +0 -6
  260. data/test/unit/helpers/kaui/payment_method_helper_test.rb +0 -17
  261. data/test/unit/helpers/kaui/tenants_helper_test.rb +0 -6
  262. data/test/unit/helpers/kaui/uuid_helper_test.rb +0 -16
  263. data/test/unit/kaui/account_email_test.rb +0 -19
  264. data/test/unit/kaui/account_test.rb +0 -14
  265. data/test/unit/kaui/admin_tenant_test.rb +0 -132
  266. data/test/unit/kaui/allowed_user_test.rb +0 -34
  267. data/test/unit/kaui/base_test.rb +0 -23
  268. data/test/unit/kaui/date_helper_test.rb +0 -26
  269. data/test/unit/kaui/invoice_item_test.rb +0 -11
  270. data/test/unit/kaui/invoice_payment_test.rb +0 -42
  271. data/test/unit/kaui/invoice_test.rb +0 -20
  272. data/test/unit/kaui/money_helper_test.rb +0 -16
  273. data/test/unit/kaui/payment_test.rb +0 -42
  274. data/test/unit/kaui/tag_definition_test.rb +0 -11
  275. data/test/unit/kaui/tenant_test.rb +0 -19
  276. /data/app/assets/stylesheets/{application.css → kaui_application.css} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 062f8cf3943a8a8cae8f80490cac4c2545ed68bd
4
- data.tar.gz: 398c6df309bdd8bf44eaddcac3273e9cfc394d17
2
+ SHA256:
3
+ metadata.gz: 1c270a67aa73b6b9195aae2e4578519dde9bdefab0bdb4fdd1f7a59a8137fb7a
4
+ data.tar.gz: 48791ecdfe32bbb730a447e8e994ab127acabd36fc356bedb023f8e67dc174ef
5
5
  SHA512:
6
- metadata.gz: df121d5c0caa28f819c2678c7abf61a4ed161ee16dc6f047f7e6ca0279348f682de5dd8ce57e6bd31ad70f164892a44d911f22da2eaaa3689c4bf06dd560b302
7
- data.tar.gz: 405d0913456d27232ee1518fb1637efc35423f62f5a948e3312e817c2547fe8f04f38029b5e8d4785522480ef261853640bddf728143e3f84a45408ff26b1219
6
+ metadata.gz: 13e7dc0a95b7a6bd39f3996a50fd32c7216b4eb7e2507b386a5bbe6cd959358e631a6520bafb6bf83f4573b730904bb9058a3475c851c7e3540ecd31e0280987
7
+ data.tar.gz: 402e25c2418833089ab69307de78deaa64597d76e0d40c07daa37dd15d050ba9b3b35e6e9a1485447faf07ee458e364de0d2c7dac02172bbb3c7bdf853e584b4
data/README.md CHANGED
@@ -7,17 +7,18 @@ Kill Bill compatibility
7
7
  -----------------------
8
8
 
9
9
  | Kaui version | Kill Bill version |
10
- | -----------: | ----------------: |
11
- | 0.14.y | 0.16.z |
12
- | 0.15.y | 0.18.z (Rails 4) |
13
- | 0.16.y | 0.18.z (Rails 5) |
14
- | 1.x.y | 0.20.z (Rails 5) |
15
- | 2.x.y | 0.22.z (Rails 5) |
10
+ | -----------: |------------------:|
11
+ | 0.14.y | 0.16.z |
12
+ | 0.15.y | 0.18.z (Rails 4) |
13
+ | 0.16.y | 0.18.z (Rails 5) |
14
+ | 1.x.y | 0.20.z (Rails 5) |
15
+ | 2.x.y | 0.22.z (Rails 5) |
16
+ | 3.x.y | 0.24.z (Rails 7) |
16
17
 
17
18
  Dependencies
18
19
  ------------
19
20
 
20
- Ruby 2.4.2+ or JRuby 9.1.14.0+ required.
21
+ Ruby 3.2.2+ or JRuby 9.4.2.0+ required.
21
22
 
22
23
  Running Kaui locally
23
24
  ---------------------
@@ -91,22 +92,6 @@ Alternatively, you can run the `kaui` script under `bin` by setting your loadpat
91
92
 
92
93
  ruby -Ilib bin/kaui /path/to/rails/app --path=$PWD --skip-bundle
93
94
 
94
- Releases
95
- ========
96
-
97
- To trigger a release, run (update `patch` as needed):
98
-
99
- ```
100
- bundle exec gem bump -c -p -t -v patch
101
- ```
102
-
103
- This will:
104
-
105
- * Update the `version.rb` file
106
- * Commit the changes
107
- * Create the new tag and push the changes
108
-
109
- GitHub Actions will automatically push the new gem to Rubygems.
110
95
 
111
96
  Multi-Tenancy
112
97
  =============
data/Rakefile CHANGED
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env rake
2
+ # frozen_string_literal: true
3
+
2
4
  begin
3
5
  require 'bundler/setup'
4
6
  rescue LoadError
5
7
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
8
  end
7
9
 
8
- APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__)
10
+ APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
9
11
  load 'rails/tasks/engine.rake'
10
12
 
11
13
  Bundler::GemHelper.install_tasks
@@ -29,4 +31,4 @@ namespace :test do
29
31
  end
30
32
  end
31
33
 
32
- task :default => :test
34
+ task default: :test
@@ -0,0 +1,45 @@
1
+
2
+ //= link jquery.js
3
+ //= link jquery-ui.js
4
+ //= link popper.js
5
+ //= require spin
6
+ //= require jquery.spin
7
+ //= link spin.js
8
+ //= link jquery.spin.js
9
+ //= link bootstrap-sprockets.js
10
+ //= link bootstrap-datepicker.js
11
+ //= link_tree ../images/kaui
12
+ //= link_directory ../javascripts .js
13
+ //= link mustache.js
14
+ //= link bootstrap-datepicker3.css
15
+ //= link jquery-ui/widgets/autocomplete.js
16
+ //= link dataTables/jquery.dataTables.js
17
+ //= link dataTables/bootstrap/3/jquery.dataTables.bootstrap.js
18
+ //= link dataTables/extras/dataTables.colVis.js
19
+ //= link d3.js
20
+ //= link dataTables/jquery.dataTables.css
21
+ //= link jquery-ui/autocomplete.css
22
+ //= link dataTables/bootstrap/3/jquery.dataTables.bootstrap.css
23
+ //= link bootstrap_and_overrides.scss
24
+ //= link kaui/kaui.scss
25
+ //= link kaui_application.css
26
+
27
+ // Kanaui
28
+ //= require js-routes
29
+ //= require spin
30
+ //= require jquery.spin
31
+ //= link spin.js
32
+ //= link jquery.spin.js
33
+ // KPM
34
+ // kpm/kpm.js
35
+
36
+ // payment_test
37
+ // payment_test/payment_test.js
38
+
39
+ // Deposit
40
+ // deposit/deposit.js
41
+ //
42
+ // Kaui (needs to be loaded last for overrides)
43
+ //= link kaui/kaui.js
44
+ //
45
+
@@ -0,0 +1,76 @@
1
+ // Generated by CoffeeScript 1.6.3
2
+ /*
3
+ jQuery Spin
4
+ Copyright 2014 Kevin Sylvestre
5
+ 1.1.6
6
+ */
7
+
8
+
9
+ (function() {
10
+ "use strict";
11
+ var $, Spinner;
12
+
13
+ $ = jQuery;
14
+
15
+ Spinner = (function() {
16
+ Spinner.prototype.defaults = {
17
+ petals: 9
18
+ };
19
+
20
+ function Spinner($element, options) {
21
+ this.$element = $element;
22
+ this.options = $.extend({}, this.defaults, options);
23
+ this.configure();
24
+ }
25
+
26
+ Spinner.prototype.show = function() {
27
+ return this.$element.animate({
28
+ opacity: 1.0
29
+ });
30
+ };
31
+
32
+ Spinner.prototype.hide = function() {
33
+ return this.$element.animate({
34
+ opacity: 0.0
35
+ });
36
+ };
37
+
38
+ Spinner.prototype.destroy = function() {
39
+ this.$element.empty();
40
+ return this.$element.data('spin', void 0);
41
+ };
42
+
43
+ Spinner.prototype.configure = function() {
44
+ var $petal, i, _i, _ref, _results;
45
+ this.$element.empty();
46
+ _results = [];
47
+ for (i = _i = 0, _ref = this.options.petals; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
48
+ $petal = $("<div />");
49
+ _results.push(this.$element.append($petal));
50
+ }
51
+ return _results;
52
+ };
53
+
54
+ return Spinner;
55
+
56
+ })();
57
+
58
+ $.fn.spin = function(options) {
59
+ return $(this).each(function() {
60
+ var $this, spinner;
61
+ $this = $(this);
62
+ spinner = $this.data('spinner');
63
+ if (spinner == null) {
64
+ $this.data('spinner', spinner = new Spinner($this, options));
65
+ }
66
+ if (typeof options === 'string') {
67
+ return spinner[options]();
68
+ }
69
+ });
70
+ };
71
+
72
+ $(function() {
73
+ return $('[data-spin]').spin();
74
+ });
75
+
76
+ }).call(this);
@@ -3,6 +3,7 @@ jQuery(document).ready(function ($) {
3
3
  /*
4
4
  * Mobile Data Adjustment
5
5
  */
6
+
6
7
  var running = false;
7
8
  $('table.mobile-data').each(function () {
8
9
  var count = $(this).find($('table.mobile-data tr')).length - 1;
@@ -118,6 +119,7 @@ jQuery(document).ready(function ($) {
118
119
  /*
119
120
  * Calculate first name length
120
121
  */
122
+
121
123
  $('#account_name').on('keyup', function(e){
122
124
  set_first_name_length($(this).val());
123
125
  });
@@ -138,6 +140,77 @@ jQuery(document).ready(function ($) {
138
140
  }
139
141
  }
140
142
 
143
+
144
+ /*
145
+ * Custom Fields Errors
146
+ */
147
+
148
+
149
+ $('#custom_field_object_type').change(function(){
150
+
151
+ ajaxCloseAlert();
152
+
153
+ var uuid = document.getElementById("custom_field_object_id").value;
154
+ var my_url = '/custom_fields/check_object_exist';
155
+ obj_type = document.getElementById("custom_field_object_type").value;
156
+
157
+ if (uuid){
158
+ $.ajax({
159
+ url: my_url,
160
+ type: "GET",
161
+ dataType: "json",
162
+ data: {
163
+ uuid: uuid,
164
+ object_type: obj_type
165
+ },
166
+ success: function(data) {
167
+ if (data.status == 431) {
168
+ var msg = data["message"];
169
+ ajaxErrorAlert(msg);
170
+
171
+ }
172
+ }
173
+ });
174
+ }else{
175
+ var msg = 'Object ID cannot be empty';
176
+ ajaxErrorAlert(msg);
177
+ }
178
+
179
+
180
+
181
+
182
+
183
+
184
+ });
185
+
186
+ $('#custom_field_object_id').on('keyup', function(e) {
187
+
188
+ ajaxCloseAlert();
189
+
190
+ var uuid = $(this).val();
191
+ var my_url = '/custom_fields/check_object_exist';
192
+ obj_type = document.getElementById("custom_field_object_type").value;
193
+
194
+ $.ajax({
195
+ url: my_url,
196
+ type: "GET",
197
+ dataType: "json",
198
+ data: {
199
+ uuid: $(this).val(),
200
+ object_type: obj_type
201
+ },
202
+ success: function(data) {
203
+ if (data.status == 431) {
204
+ var msg = data["message"];
205
+ ajaxErrorAlert(msg);
206
+ }
207
+ }
208
+ });
209
+
210
+
211
+ });
212
+
213
+
141
214
  /*
142
215
  * Validate external key
143
216
  */
@@ -374,3 +447,6 @@ function setObjectIdPopover(){
374
447
  setObjectIdPopover();
375
448
  });
376
449
  }
450
+
451
+
452
+
@@ -0,0 +1,25 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //
8
+ //= link js-routes
9
+ //= link jquery-ui/widgets/autocomplete
10
+ //= link jquery_ujs
11
+ //= link bootstrap-sprockets.js
12
+ //= link dataTables/jquery.dataTables
13
+ //= link dataTables/bootstrap/3/jquery.dataTables.bootstrap
14
+ //= link mustache
15
+ //= link kaui/kaui
16
+ //= link popper
17
+ //= link bootstrap-datepicker3
18
+
19
+ import * as d3 from "d3"
20
+ window.d3 = d3
21
+
22
+ import jquery from 'jquery';
23
+ window.jQuery = jquery;
24
+ window.$ = jquery;
25
+ window.jquery = jquery;
@@ -0,0 +1,76 @@
1
+ // Generated by CoffeeScript 1.6.3
2
+ /*
3
+ jQuery Spin
4
+ Copyright 2014 Kevin Sylvestre
5
+ 1.1.6
6
+ */
7
+
8
+
9
+ (function() {
10
+ "use strict";
11
+ var $, Spinner;
12
+
13
+ $ = jQuery;
14
+
15
+ Spinner = (function() {
16
+ Spinner.prototype.defaults = {
17
+ petals: 9
18
+ };
19
+
20
+ function Spinner($element, options) {
21
+ this.$element = $element;
22
+ this.options = $.extend({}, this.defaults, options);
23
+ this.configure();
24
+ }
25
+
26
+ Spinner.prototype.show = function() {
27
+ return this.$element.animate({
28
+ opacity: 1.0
29
+ });
30
+ };
31
+
32
+ Spinner.prototype.hide = function() {
33
+ return this.$element.animate({
34
+ opacity: 0.0
35
+ });
36
+ };
37
+
38
+ Spinner.prototype.destroy = function() {
39
+ this.$element.empty();
40
+ return this.$element.data('spin', void 0);
41
+ };
42
+
43
+ Spinner.prototype.configure = function() {
44
+ var $petal, i, _i, _ref, _results;
45
+ this.$element.empty();
46
+ _results = [];
47
+ for (i = _i = 0, _ref = this.options.petals; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
48
+ $petal = $("<div />");
49
+ _results.push(this.$element.append($petal));
50
+ }
51
+ return _results;
52
+ };
53
+
54
+ return Spinner;
55
+
56
+ })();
57
+
58
+ $.fn.spin = function(options) {
59
+ return $(this).each(function() {
60
+ var $this, spinner;
61
+ $this = $(this);
62
+ spinner = $this.data('spinner');
63
+ if (spinner == null) {
64
+ $this.data('spinner', spinner = new Spinner($this, options));
65
+ }
66
+ if (typeof options === 'string') {
67
+ return spinner[options]();
68
+ }
69
+ });
70
+ };
71
+
72
+ $(function() {
73
+ return $('[data-spin]').spin();
74
+ });
75
+
76
+ }).call(this);
@@ -0,0 +1,240 @@
1
+
2
+ // popover max width
3
+ .popover {
4
+ max-width: 350px;
5
+ }
6
+
7
+ //@todo: Remove?
8
+ /// Set the correct sprite paths
9
+
10
+
11
+ // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
12
+ $fontAwesomeEotPath: font-url("fontawesome-webfont.eot");
13
+ $fontAwesomeEotPath_iefix: font-url("fontawesome-webfont.eot?#iefix");
14
+ $fontAwesomeWoffPath: font-url("fontawesome-webfont.woff");
15
+ $fontAwesomeTtfPath: font-url("fontawesome-webfont.ttf");
16
+ $fontAwesomeSvgPath: font-url("fontawesome-webfont.svg#fontawesomeregular");
17
+
18
+ //@todo: Remove?
19
+ // Font Awesome
20
+ //@import "font-awesome.css";
21
+
22
+ /* Override Bootstrap 5 font locations */
23
+ @font-face {
24
+ font-family: 'Glyphicons Halflings';
25
+ src: image-url('glyphicons-halflings-regular.eot');
26
+ src: image-url('glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
27
+ image-url('glyphicons-halflings-regular.woff') format('woff'),
28
+ image-url('glyphicons-halflings-regular.ttf') format('truetype'),
29
+ image-url('glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
30
+ }
31
+
32
+
33
+ $smphone: unquote("max-width: 450px");
34
+ $phone: unquote("max-width: 768px");
35
+ $tablet: unquote("max-width: 1024px");
36
+
37
+ .tag-bar {
38
+ border-bottom: 1px solid #ddd;
39
+ margin-bottom: 0;
40
+ position: relative;
41
+
42
+ .tag-select {
43
+ display: inline-block;
44
+ vertical-align: middle;
45
+
46
+ @media ($smphone) {
47
+ width: 35%;
48
+ }
49
+
50
+ span {
51
+ padding: 5px 20px;
52
+ text-align: center;
53
+ display: block;
54
+ border-right: 1px solid #ddd;
55
+
56
+ @media ($phone) {
57
+ border: 0;
58
+ }
59
+
60
+ i {
61
+ margin: 0 5px;
62
+ color: #515151;
63
+ font-size: 16px;
64
+
65
+ &.fa-caret-down {
66
+ color: #999999;
67
+ font-size: 12px;
68
+ }
69
+
70
+ &.fa-tag {
71
+ font-size: 18px;
72
+ }
73
+
74
+ &.fa-money, &.fa-credit-card {
75
+ font-size: 16px;
76
+ }
77
+ }
78
+ }
79
+
80
+ &:hover {
81
+ .tag-select-box {
82
+ max-height: 500px;
83
+ padding: 20px 25px;
84
+ border: 1px solid #ddd;
85
+ box-shadow: 1px 3px 2px rgba(0, 0, 0, 0.11);
86
+ }
87
+ }
88
+
89
+ .tag-select-box {
90
+ position: absolute;
91
+ top: 100%;
92
+ left: -1px;
93
+ max-height: 0;
94
+ background-color: #fff;
95
+ z-index: 100;
96
+ padding: 0 15px;
97
+ font-size: 12px;
98
+ color: #999999;
99
+ overflow: auto;
100
+ width: auto;
101
+ border-bottom: 0;
102
+ display: inline-block;
103
+
104
+ @media ($phone) {
105
+ border: 0;
106
+ }
107
+
108
+ strong {
109
+ display: block;
110
+ font-weight: 400;
111
+ margin: 0 0 10px;
112
+ }
113
+
114
+ form {
115
+ display: inline-block;
116
+ width: 210px;
117
+ }
118
+
119
+ input[type=checkbox] {
120
+ display: inline-block;
121
+ width: 9%;
122
+ margin: 0 1% 0 0;
123
+ line-height: 20px;
124
+ vertical-align: middle;
125
+ }
126
+
127
+ label {
128
+ font-size: 12px;
129
+ display: inline-block;
130
+ width: 85%;
131
+ line-height: 20px;
132
+ vertical-align: middle;
133
+ margin: 0;
134
+ font-weight: 400;
135
+ }
136
+
137
+ textarea {
138
+ resize: none;
139
+ height: 80px;
140
+ margin: 0 0 20px;
141
+ width: 100%;
142
+ }
143
+
144
+ a {
145
+ display: block;
146
+ font-size: 12px;
147
+ line-height: 20px;
148
+ }
149
+ }
150
+ }
151
+
152
+ .tag-selected {
153
+ display: inline-block;
154
+ padding: 2px 5px;
155
+ vertical-align: middle;
156
+
157
+ @media ($phone) {
158
+ width: 64%;
159
+ padding: 2px;
160
+ overflow: hidden;
161
+ border-left: 1px solid #ddd;
162
+ }
163
+
164
+ span {
165
+ display: inline-block;
166
+ font-size: 12px;
167
+ color: #777777;
168
+ background: #e5e5e5;
169
+ padding: 3px 20px;
170
+ margin: 0 5px;
171
+ transition: all 0.5s;
172
+ cursor: pointer;
173
+
174
+ &:hover {
175
+ background-color: #cce9eb;
176
+ }
177
+
178
+ @media ($phone) {
179
+ font-size: 10px;
180
+ padding: 3px 5px;
181
+ display: block;
182
+ margin: 0 0 2px;
183
+ }
184
+ }
185
+ }
186
+ }
187
+
188
+ .tag-bar-breathe {
189
+ margin-bottom: 30px;
190
+ }
191
+
192
+ .tag-bar-no-border {
193
+ border-bottom: 0;
194
+
195
+ .tag-select {
196
+ span {
197
+ border-right: 0;
198
+ }
199
+ }
200
+ }
201
+
202
+ #main-menu {
203
+ .tag-bar {
204
+ .tag-select {
205
+ position: relative;
206
+ }
207
+ .tag-select-box {
208
+ word-break: keep-all;
209
+ white-space: nowrap;
210
+ }
211
+ }
212
+ }
213
+
214
+ .inline-row-tag-bar{
215
+ padding-left: 10px !important;
216
+
217
+ .tag-bar {
218
+
219
+ .tag-select {
220
+ span {
221
+ padding: 5px;
222
+ border-right: none;
223
+
224
+ i {
225
+ margin: 0 3px;
226
+ font-size: 12px;
227
+
228
+ &.fa-tag {
229
+ font-size: 12px;
230
+ }
231
+ }
232
+ }
233
+ }
234
+ .tag-select-box {
235
+ label {
236
+ white-space: nowrap;
237
+ }
238
+ }
239
+ }
240
+ }
@@ -1,3 +1,7 @@
1
+ $smphone: unquote("max-width: 450px");
2
+ $phone: unquote("max-width: 768px");
3
+ $tablet: unquote("max-width: 1024px");
4
+
1
5
  h1 span.account-child-label{
2
6
  float: right;
3
7
  }
@@ -37,4 +41,12 @@ h1 span.account-child-label{
37
41
  margin: 8px;
38
42
  }
39
43
  }
40
- }
44
+ }
45
+
46
+ .form-force-inline {
47
+ display: inline;
48
+ }
49
+
50
+ .form-right {
51
+ float: right;
52
+ }
@@ -1,3 +1,7 @@
1
+ $smphone: unquote("max-width: 450px");
2
+ $phone: unquote("max-width: 768px");
3
+ $tablet: unquote("max-width: 1024px");
4
+
1
5
  #showHistoryModal
2
6
  {
3
7
  #templatesPlaceHolder
@@ -35,4 +39,4 @@
35
39
  }
36
40
 
37
41
  }
38
- }
42
+ }