kaui 2.1.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +8 -7
- data/Rakefile +4 -2
- data/app/assets/config/kaui_manifest.js +45 -0
- data/app/assets/javascripts/jquery.spin.js +76 -0
- data/app/assets/javascripts/kaui/kaui.js +76 -0
- data/app/assets/javascripts/kaui_application.js +25 -0
- data/app/assets/javascripts/spin.js +76 -0
- data/app/assets/stylesheets/bootstrap_and_overrides.scss +240 -0
- data/app/assets/stylesheets/kaui/{account.less → account.scss} +4 -0
- data/app/assets/stylesheets/kaui/{audit.less → audit.scss} +5 -1
- data/app/assets/stylesheets/kaui/{common.less → common.scss} +17 -15
- data/app/assets/stylesheets/kaui/{datatable.less → datatable.scss} +6 -3
- data/app/assets/stylesheets/kaui/{header.less → header.scss} +16 -12
- data/app/assets/stylesheets/kaui/{home.less → home.scss} +7 -4
- data/app/assets/stylesheets/kaui/{invoice.less → invoice.scss} +7 -3
- data/app/assets/stylesheets/kaui/kaui.scss +265 -0
- data/app/assets/stylesheets/kaui/kaui_bootstrap.scss +3 -0
- data/app/assets/stylesheets/kaui/{overdue.less → overdue.scss} +3 -1
- data/app/assets/stylesheets/kaui/{payment.less → payment.scss} +3 -0
- data/app/assets/stylesheets/kaui/{subscription.less → subscription.scss} +4 -1
- data/app/assets/stylesheets/kaui/{tags.less → tags.scss} +9 -5
- data/app/assets/stylesheets/kaui/timeline.scss +7 -0
- data/app/assets/stylesheets/kaui/tooltip.scss +15 -0
- data/app/controllers/kaui/account_children_controller.rb +25 -28
- data/app/controllers/kaui/account_custom_fields_controller.rb +16 -15
- data/app/controllers/kaui/account_emails_controller.rb +28 -25
- data/app/controllers/kaui/account_tags_controller.rb +37 -34
- data/app/controllers/kaui/account_timelines_controller.rb +38 -33
- data/app/controllers/kaui/accounts_controller.rb +268 -250
- data/app/controllers/kaui/admin_allowed_users_controller.rb +105 -99
- data/app/controllers/kaui/admin_controller.rb +32 -31
- data/app/controllers/kaui/admin_tenants_controller.rb +434 -388
- data/app/controllers/kaui/audit_logs_controller.rb +86 -83
- data/app/controllers/kaui/bundle_tags_controller.rb +24 -20
- data/app/controllers/kaui/bundles_controller.rb +96 -82
- data/app/controllers/kaui/chargebacks_controller.rb +36 -33
- data/app/controllers/kaui/charges_controller.rb +23 -20
- data/app/controllers/kaui/credits_controller.rb +28 -25
- data/app/controllers/kaui/custom_fields_controller.rb +172 -38
- data/app/controllers/kaui/engine_controller.rb +2 -1
- data/app/controllers/kaui/engine_controller_util.rb +130 -117
- data/app/controllers/kaui/home_controller.rb +230 -217
- data/app/controllers/kaui/invoice_items_controller.rb +43 -39
- data/app/controllers/kaui/invoice_tags_controller.rb +24 -20
- data/app/controllers/kaui/invoices_controller.rb +132 -117
- data/app/controllers/kaui/login_proxy_controller.rb +2 -1
- data/app/controllers/kaui/payment_methods_controller.rb +102 -94
- data/app/controllers/kaui/payments_controller.rb +95 -92
- data/app/controllers/kaui/queues_controller.rb +47 -14
- data/app/controllers/kaui/refunds_controller.rb +36 -33
- data/app/controllers/kaui/registrations_controller.rb +7 -7
- data/app/controllers/kaui/role_definitions_controller.rb +17 -14
- data/app/controllers/kaui/sessions_controller.rb +7 -4
- data/app/controllers/kaui/subscriptions_controller.rb +197 -187
- data/app/controllers/kaui/tag_definitions_controller.rb +28 -27
- data/app/controllers/kaui/tags_controller.rb +25 -22
- data/app/controllers/kaui/tenants_controller.rb +30 -28
- data/app/controllers/kaui/transactions_controller.rb +43 -38
- data/app/helpers/kaui/account_helper.rb +16 -14
- data/app/helpers/kaui/application_helper.rb +8 -3
- data/app/helpers/kaui/date_helper.rb +3 -2
- data/app/helpers/kaui/home_helper.rb +2 -0
- data/app/helpers/kaui/locale_helper.rb +7 -6
- data/app/helpers/kaui/money_helper.rb +2 -1
- data/app/helpers/kaui/object_helper.rb +11 -10
- data/app/helpers/kaui/payment_helper.rb +7 -6
- data/app/helpers/kaui/payment_method_helper.rb +3 -2
- data/app/helpers/kaui/permissions_helper.rb +9 -9
- data/app/helpers/kaui/plugin_helper.rb +25 -23
- data/app/helpers/kaui/subscription_helper.rb +27 -29
- data/app/helpers/kaui/us_states_helper.rb +7 -6
- data/app/helpers/kaui/uuid_helper.rb +7 -5
- data/app/models/kaui/ability.rb +19 -12
- data/app/models/kaui/account.rb +45 -28
- data/app/models/kaui/account_email.rb +23 -20
- data/app/models/kaui/account_timeline.rb +5 -1
- data/app/models/kaui/admin.rb +65 -64
- data/app/models/kaui/admin_tenant.rb +81 -82
- data/app/models/kaui/allowed_user.rb +13 -9
- data/app/models/kaui/allowed_user_tenant.rb +4 -2
- data/app/models/kaui/application_record.rb +2 -0
- data/app/models/kaui/audit_log.rb +6 -3
- data/app/models/kaui/base.rb +13 -7
- data/app/models/kaui/bundle.rb +41 -24
- data/app/models/kaui/catalog.rb +118 -113
- data/app/models/kaui/chargeback.rb +5 -1
- data/app/models/kaui/credit.rb +4 -1
- data/app/models/kaui/custom_field.rb +9 -6
- data/app/models/kaui/invoice.rb +25 -22
- data/app/models/kaui/invoice_item.rb +9 -6
- data/app/models/kaui/invoice_payment.rb +49 -54
- data/app/models/kaui/killbill_authenticatable.rb +14 -8
- data/app/models/kaui/killbill_registerable.rb +7 -0
- data/app/models/kaui/overdue.rb +64 -65
- data/app/models/kaui/payment.rb +22 -19
- data/app/models/kaui/payment_method.rb +48 -39
- data/app/models/kaui/payment_state.rb +41 -38
- data/app/models/kaui/rails_methods.rb +9 -9
- data/app/models/kaui/refund.rb +7 -1
- data/app/models/kaui/role_definition.rb +5 -1
- data/app/models/kaui/simple_plan.rb +5 -3
- data/app/models/kaui/subscription.rb +10 -7
- data/app/models/kaui/tag.rb +25 -22
- data/app/models/kaui/tag_definition.rb +50 -45
- data/app/models/kaui/tenant.rb +6 -5
- data/app/models/kaui/transaction.rb +43 -31
- data/app/models/kaui/user.rb +10 -16
- data/app/models/kaui/user_role.rb +8 -5
- data/app/views/kaui/accounts/_billing_info.html.erb +1 -1
- data/app/views/kaui/accounts/_form.html.erb +2 -2
- data/app/views/kaui/accounts/index.html.erb +2 -0
- data/app/views/kaui/admin_allowed_users/_form.html.erb +3 -3
- data/app/views/kaui/admin_tenants/_form_catalog_translation.erb +1 -1
- data/app/views/kaui/admin_tenants/_form_invoice_template.erb +1 -1
- data/app/views/kaui/admin_tenants/_form_invoice_translation.erb +1 -1
- data/app/views/kaui/admin_tenants/_show_catalog_simple.erb +11 -5
- data/app/views/kaui/admin_tenants/new_catalog.html.erb +2 -2
- data/app/views/kaui/admin_tenants/new_overdue_config.html.erb +2 -2
- data/app/views/kaui/admin_tenants/new_plan_currency.html.erb +1 -1
- data/app/views/kaui/bundles/index.html.erb +1 -1
- data/app/views/kaui/bundles/transfer.html.erb +13 -5
- data/app/views/kaui/invoices/_invoice_table.html.erb +1 -1
- data/app/views/kaui/layouts/kaui_flash.html.erb +24 -0
- data/app/views/kaui/layouts/kaui_header.html.erb +19 -2
- data/app/views/kaui/payment_methods/_payment_methods_details_table.html.erb +13 -4
- data/app/views/kaui/payments/_payment_table.html.erb +21 -11
- data/app/views/kaui/payments/index.html.erb +9 -9
- data/app/views/kaui/queues/index.html.erb +1 -1
- data/app/views/kaui/subscriptions/_cancel_by_date_modal.html.erb +1 -4
- data/app/views/kaui/subscriptions/_edit_form.html.erb +1 -1
- data/app/views/kaui/subscriptions/_form.html.erb +1 -1
- data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +3 -3
- data/app/views/kaui/subscriptions/edit_bcd.erb +1 -1
- data/app/views/kaui/tag_definitions/index.html.erb +2 -2
- data/app/views/kaui/tags/index.html.erb +1 -0
- data/config/initializers/bootstrap_datepicker_rails.rb +3 -0
- data/config/initializers/devise.rb +8 -6
- data/config/initializers/js_routes.rb +9 -0
- data/config/initializers/kilbill_client_init.rb +13 -0
- data/config/initializers/killbill_authenticatable.rb +71 -21
- data/config/initializers/killbill_registerable.rb +5 -3
- data/config/initializers/time_formats.rb +6 -4
- data/config/locales/en.yml +78 -1
- data/config/routes.rb +34 -32
- data/db/migrate/20130812155313_devise_create_kaui_users.rb +10 -8
- data/db/migrate/20150109214021_create_kaui_tenants.rb +10 -8
- data/db/migrate/20150112232813_create_kaui_allowed_users.rb +10 -8
- data/lib/generators/kaui/install/install_generator.rb +23 -20
- data/lib/generators/kaui/install/templates/config/initializers/kaui.rb +3 -1
- data/lib/kaui/engine.rb +17 -5
- data/lib/kaui/installer/installer.rb +27 -26
- data/lib/kaui/version.rb +3 -1
- data/lib/kaui.rb +26 -37
- data/lib/tasks/kaui_tasks.rake +1 -0
- metadata +140 -442
- data/app/assets/javascripts/application.js +0 -17
- data/app/assets/javascripts/kaui/bootstrap-tweaks.js +0 -172
- data/app/assets/stylesheets/bootstrap_and_overrides.css.less +0 -44
- data/app/assets/stylesheets/kaui/kaui.less +0 -21
- data/app/assets/stylesheets/kaui/timeline.less +0 -4
- data/config/initializers/asset.rb +0 -1
- data/config/initializers/kilbill-client-init.rb +0 -9
- data/db/schema.rb +0 -15
- data/test/dummy/README.rdoc +0 -261
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/controllers/application_controller.rb +0 -9
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -38
- data/test/dummy/bin/update +0 -29
- data/test/dummy/bin/yarn +0 -11
- data/test/dummy/config/application.rb +0 -18
- data/test/dummy/config/boot.rb +0 -3
- data/test/dummy/config/database.yml +0 -27
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -58
- data/test/dummy/config/environments/production.rb +0 -91
- data/test/dummy/config/environments/test.rb +0 -49
- data/test/dummy/config/initializers/application_controller_renderer.rb +0 -6
- data/test/dummy/config/initializers/assets.rb +0 -14
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/killbill_client.rb +0 -1
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/money.rb +0 -2
- data/test/dummy/config/initializers/new_framework_defaults_5_1.rb +0 -14
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -33
- data/test/dummy/config/routes.rb +0 -3
- data/test/dummy/config/secrets.yml +0 -32
- data/test/dummy/config/symmetric-encryption.yml +0 -135
- data/test/dummy/config.ru +0 -4
- data/test/dummy/db/schema.rb +0 -52
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -25
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +0 -6
- data/test/fixtures/SpyCarAdvanced.xml +0 -824
- data/test/fixtures/catalog-v1.xml +0 -73
- data/test/fixtures/catalog_translation_fr-v1.properties +0 -1
- data/test/fixtures/invoice_template-v1.html +0 -100
- data/test/fixtures/invoice_translation_fr-v1.properties +0 -23
- data/test/fixtures/overdue-v1.xml +0 -49
- data/test/fixtures/stripe.yml +0 -2
- data/test/functional/kaui/account_children_controller_test.rb +0 -32
- data/test/functional/kaui/account_custom_fields_controller_test.rb +0 -29
- data/test/functional/kaui/account_emails_controller_test.rb +0 -55
- data/test/functional/kaui/account_tags_controller_test.rb +0 -48
- data/test/functional/kaui/account_timelines_controller_test.rb +0 -20
- data/test/functional/kaui/accounts_controller_test.rb +0 -297
- data/test/functional/kaui/admin_allowed_users_controller_test.rb +0 -234
- data/test/functional/kaui/admin_controller_test.rb +0 -45
- data/test/functional/kaui/admin_tenants_controller_test.rb +0 -352
- data/test/functional/kaui/audit_logs_controller_test.rb +0 -71
- data/test/functional/kaui/bundle_tags_controller_test.rb +0 -23
- data/test/functional/kaui/bundles_controller_test.rb +0 -130
- data/test/functional/kaui/chargebacks_controller_test.rb +0 -42
- data/test/functional/kaui/charges_controller_test.rb +0 -60
- data/test/functional/kaui/credits_controller_test.rb +0 -54
- data/test/functional/kaui/custom_fields_controller_test.rb +0 -52
- data/test/functional/kaui/functional_test_helper.rb +0 -13
- data/test/functional/kaui/functional_test_helper_nosetup.rb +0 -120
- data/test/functional/kaui/home_controller_test.rb +0 -407
- data/test/functional/kaui/invoice_items_controller_test.rb +0 -82
- data/test/functional/kaui/invoices_controller_test.rb +0 -88
- data/test/functional/kaui/login_proxy_controller_test.rb +0 -12
- data/test/functional/kaui/payment_methods_controller_test.rb +0 -52
- data/test/functional/kaui/payments_controller_test.rb +0 -59
- data/test/functional/kaui/queues_controller_test.rb +0 -17
- data/test/functional/kaui/refunds_controller_test.rb +0 -63
- data/test/functional/kaui/registrations_controller_test.rb +0 -49
- data/test/functional/kaui/role_definitions_controller_test.rb +0 -47
- data/test/functional/kaui/subscriptions_controller_test.rb +0 -194
- data/test/functional/kaui/tag_definitions_controller_test.rb +0 -29
- data/test/functional/kaui/tags_controller_test.rb +0 -21
- data/test/functional/kaui/tenants_controller_test.rb +0 -60
- data/test/functional/kaui/transactions_controller_test.rb +0 -90
- data/test/integration/kaui/date_helper_integration_test.rb +0 -16
- data/test/integration/kaui/integration_test_helper.rb +0 -32
- data/test/integration/kaui/navigation_test.rb +0 -43
- data/test/killbill_test_helper.rb +0 -219
- data/test/test_helper.rb +0 -22
- data/test/unit/helpers/kaui/admin_allowed_users_helper_test.rb +0 -6
- data/test/unit/helpers/kaui/admin_tenants_helper_test.rb +0 -6
- data/test/unit/helpers/kaui/payment_method_helper_test.rb +0 -17
- data/test/unit/helpers/kaui/tenants_helper_test.rb +0 -6
- data/test/unit/helpers/kaui/uuid_helper_test.rb +0 -16
- data/test/unit/kaui/account_email_test.rb +0 -19
- data/test/unit/kaui/account_test.rb +0 -14
- data/test/unit/kaui/admin_tenant_test.rb +0 -132
- data/test/unit/kaui/allowed_user_test.rb +0 -34
- data/test/unit/kaui/base_test.rb +0 -23
- data/test/unit/kaui/date_helper_test.rb +0 -26
- data/test/unit/kaui/invoice_item_test.rb +0 -11
- data/test/unit/kaui/invoice_payment_test.rb +0 -42
- data/test/unit/kaui/invoice_test.rb +0 -20
- data/test/unit/kaui/money_helper_test.rb +0 -16
- data/test/unit/kaui/payment_test.rb +0 -42
- data/test/unit/kaui/tag_definition_test.rb +0 -11
- data/test/unit/kaui/tenant_test.rb +0 -19
- /data/app/assets/stylesheets/{application.css → kaui_application.css} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9a7e38ad91853cdb328e503ee3491a6aad1bf07aea22bc7729413f486791cd0e
|
4
|
+
data.tar.gz: abd976c47fdaeb002ba0bbd3da8e177af0f8671701f947707ee5ec9967ccae8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b811ab8ac402143c03beabb85775f543bfb8c15e574247657dc2d04677a4bc1f577592744d59161b714713cf109715f1c6521a01615c8b8fc1a628f1008f1820
|
7
|
+
data.tar.gz: f62aedf1ddc89fbad6dcd755f69706b9ad5234e57b8c4567b1cf9333716496249bd6a8badf4e91af392e6484103c28f0a3795259c0aaf6fb32c27a249e7c04a6
|
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 |
|
12
|
-
| 0.15.y |
|
13
|
-
| 0.16.y |
|
14
|
-
| 1.x.y |
|
15
|
-
| 2.x.y |
|
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.
|
21
|
+
Ruby 3.2.2+ or JRuby 9.4.2.0+ required.
|
21
22
|
|
22
23
|
Running Kaui locally
|
23
24
|
---------------------
|
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('
|
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 :
|
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
|
+
}
|