barkest_core 1.5.3.0
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.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/Gemfile +22 -0
- data/Gemfile.lock +254 -0
- data/MIT-LICENSE +20 -0
- data/README.md +364 -0
- data/Rakefile +37 -0
- data/app/assets/fonts/barkest_core/ArchivoNarrow-Bold.ttf +0 -0
- data/app/assets/fonts/barkest_core/ArchivoNarrow-BoldItalic.ttf +0 -0
- data/app/assets/fonts/barkest_core/ArchivoNarrow-Italic.ttf +0 -0
- data/app/assets/fonts/barkest_core/ArchivoNarrow-Regular.ttf +0 -0
- data/app/assets/images/barkest_core/.keep +0 -0
- data/app/assets/images/barkest_core/barcode-B.svg +181 -0
- data/app/assets/javascripts/barkest_core/.keep +0 -0
- data/app/assets/javascripts/barkest_core/application.js +22 -0
- data/app/assets/javascripts/barkest_core/bootstrap-datepicker.js +1800 -0
- data/app/assets/javascripts/barkest_core/field_init.js +7 -0
- data/app/assets/javascripts/barkest_core/jquery.doubleScroll.js +112 -0
- data/app/assets/javascripts/barkest_core/masked_edit.js +25 -0
- data/app/assets/javascripts/barkest_core/system_status.js.erb +201 -0
- data/app/assets/stylesheets/barkest_core/.keep +0 -0
- data/app/assets/stylesheets/barkest_core/application.css +17 -0
- data/app/assets/stylesheets/barkest_core/custom.css.scss +264 -0
- data/app/assets/stylesheets/barkest_core/datepicker3.css +790 -0
- data/app/controllers/.keep +0 -0
- data/app/controllers/access_groups_controller.rb +74 -0
- data/app/controllers/account_activations_controller.rb +29 -0
- data/app/controllers/application_controller.rb +5 -0
- data/app/controllers/barkest_core/application_controller_base.rb +113 -0
- data/app/controllers/barkest_core/engine_controller_base.rb +15 -0
- data/app/controllers/barkest_core/testsub_controller.rb +21 -0
- data/app/controllers/contact_controller.rb +32 -0
- data/app/controllers/log_view_controller.rb +31 -0
- data/app/controllers/password_resets_controller.rb +126 -0
- data/app/controllers/sessions_controller.rb +64 -0
- data/app/controllers/status_controller.rb +150 -0
- data/app/controllers/system_config_controller.rb +238 -0
- data/app/controllers/system_update_controller.rb +164 -0
- data/app/controllers/test_access_controller.rb +44 -0
- data/app/controllers/test_report_controller.rb +75 -0
- data/app/controllers/users_controller.rb +218 -0
- data/app/helpers/.keep +0 -0
- data/app/helpers/barkest_core/application_helper.rb +134 -0
- data/app/helpers/barkest_core/form_helper.rb +469 -0
- data/app/helpers/barkest_core/html_helper.rb +70 -0
- data/app/helpers/barkest_core/misc_helper.rb +68 -0
- data/app/helpers/barkest_core/pdf_helper.rb +180 -0
- data/app/helpers/barkest_core/recaptcha_helper.rb +115 -0
- data/app/helpers/barkest_core/sessions_helper.rb +94 -0
- data/app/helpers/barkest_core/status_helper.rb +118 -0
- data/app/helpers/barkest_core/users_helper.rb +32 -0
- data/app/mailers/.keep +0 -0
- data/app/mailers/application_mailer.rb +5 -0
- data/app/mailers/barkest_core/application_mailer_base.rb +30 -0
- data/app/mailers/barkest_core/contact_form.rb +20 -0
- data/app/mailers/barkest_core/user_mailer.rb +44 -0
- data/app/models/.keep +0 -0
- data/app/models/access_group.rb +121 -0
- data/app/models/access_group_group_member.rb +13 -0
- data/app/models/access_group_user_member.rb +11 -0
- data/app/models/barkest_core/auth_config.rb +95 -0
- data/app/models/barkest_core/authorize_failure.rb +7 -0
- data/app/models/barkest_core/contact_message.rb +37 -0
- data/app/models/barkest_core/database_config.rb +223 -0
- data/app/models/barkest_core/db_table.rb +21 -0
- data/app/models/barkest_core/email_config.rb +132 -0
- data/app/models/barkest_core/global_status.rb +267 -0
- data/app/models/barkest_core/log_entry.rb +101 -0
- data/app/models/barkest_core/log_view_options.rb +51 -0
- data/app/models/barkest_core/ms_sql_db_definition.rb +441 -0
- data/app/models/barkest_core/ms_sql_definition.rb +221 -0
- data/app/models/barkest_core/ms_sql_function.rb +423 -0
- data/app/models/barkest_core/not_logged_in.rb +7 -0
- data/app/models/barkest_core/pdf_table_builder.rb +407 -0
- data/app/models/barkest_core/self_update_config.rb +37 -0
- data/app/models/barkest_core/user_alert.rb +29 -0
- data/app/models/barkest_core/user_alert_generators.rb +58 -0
- data/app/models/barkest_core/user_manager.rb +404 -0
- data/app/models/barkest_core/work_path.rb +74 -0
- data/app/models/disable_user.rb +18 -0
- data/app/models/ldap_access_group.rb +15 -0
- data/app/models/system_config.rb +99 -0
- data/app/models/user.rb +405 -0
- data/app/models/user_login_history.rb +11 -0
- data/app/views/.keep +0 -0
- data/app/views/access_groups/_form.html.erb +19 -0
- data/app/views/access_groups/edit.html.erb +2 -0
- data/app/views/access_groups/index.html.erb +32 -0
- data/app/views/access_groups/new.html.erb +2 -0
- data/app/views/access_groups/show.html.erb +4 -0
- data/app/views/barkest_core/contact_form/contact.html.erb +16 -0
- data/app/views/barkest_core/contact_form/contact.text.erb +13 -0
- data/app/views/barkest_core/testsub/_links.html.erb +5 -0
- data/app/views/barkest_core/testsub/page1.html.erb +3 -0
- data/app/views/barkest_core/testsub/page2.html.erb +2 -0
- data/app/views/barkest_core/testsub/page3.html.erb +2 -0
- data/app/views/barkest_core/user_mailer/account_activation.html.erb +7 -0
- data/app/views/barkest_core/user_mailer/account_activation.text.erb +6 -0
- data/app/views/barkest_core/user_mailer/invalid_password_reset.html.erb +3 -0
- data/app/views/barkest_core/user_mailer/invalid_password_reset.text.erb +5 -0
- data/app/views/barkest_core/user_mailer/password_reset.html.erb +8 -0
- data/app/views/barkest_core/user_mailer/password_reset.text.erb +7 -0
- data/app/views/contact/index.html.erb +24 -0
- data/app/views/layouts/_footer_copyright.html.erb +1 -0
- data/app/views/layouts/_menu_admin.html.erb +5 -0
- data/app/views/layouts/_menu_anon.html.erb +0 -0
- data/app/views/layouts/_menu_auth.html.erb +3 -0
- data/app/views/layouts/_menu_footer.html.erb +1 -0
- data/app/views/layouts/_nav_logo.html.erb +1 -0
- data/app/views/layouts/application.html.erb +2 -0
- data/app/views/layouts/barkest_core/_application.html.erb +24 -0
- data/app/views/layouts/barkest_core/_footer.html.erb +18 -0
- data/app/views/layouts/barkest_core/_header.html.erb +38 -0
- data/app/views/layouts/barkest_core/_html_mailer.html.erb +11 -0
- data/app/views/layouts/barkest_core/_menu_account.html.erb +14 -0
- data/app/views/layouts/barkest_core/_menu_sample.html.erb +1 -0
- data/app/views/layouts/barkest_core/_messages.html.erb +4 -0
- data/app/views/layouts/barkest_core/_shim.html.erb +4 -0
- data/app/views/layouts/barkest_core/_subheader.html.erb +1 -0
- data/app/views/layouts/barkest_core/_text_mailer.text.erb +4 -0
- data/app/views/layouts/mailer.html.erb +1 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/log_view/index.html.erb +100 -0
- data/app/views/password_resets/edit.html.erb +20 -0
- data/app/views/password_resets/new.html.erb +14 -0
- data/app/views/sessions/new.html.erb +27 -0
- data/app/views/shared/_error_messages.html.erb +29 -0
- data/app/views/shared/_generic_user_alert.html.erb +4 -0
- data/app/views/status/current.html.erb +34 -0
- data/app/views/status/test.html.erb +50 -0
- data/app/views/system_config/index.html.erb +25 -0
- data/app/views/system_config/show_auth.html.erb +28 -0
- data/app/views/system_config/show_database.html.erb +36 -0
- data/app/views/system_config/show_email.html.erb +21 -0
- data/app/views/system_config/show_self_update.html.erb +13 -0
- data/app/views/system_update/index.html.erb +31 -0
- data/app/views/system_update/new.html.erb +2 -0
- data/app/views/test_access/allow_anon.html.erb +2 -0
- data/app/views/test_access/require_admin.html.erb +2 -0
- data/app/views/test_access/require_group_x.html.erb +2 -0
- data/app/views/test_access/require_user.html.erb +2 -0
- data/app/views/test_report/index.csv.csvrb +23 -0
- data/app/views/test_report/index.html.erb +6 -0
- data/app/views/test_report/index.pdf.prawn +50 -0
- data/app/views/test_report/index.xlsx.axlsx +28 -0
- data/app/views/users/_user.html.erb +57 -0
- data/app/views/users/_user_details.html.erb +15 -0
- data/app/views/users/_user_details_for_list.html.erb +1 -0
- data/app/views/users/_user_form.html.erb +13 -0
- data/app/views/users/disable_confirm.html.erb +19 -0
- data/app/views/users/edit.html.erb +15 -0
- data/app/views/users/index.html.erb +9 -0
- data/app/views/users/new.html.erb +10 -0
- data/app/views/users/show.html.erb +46 -0
- data/bin/rails +12 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20160617172539_create_access_groups.rb +10 -0
- data/db/migrate/20160617172725_create_users.rb +26 -0
- data/db/migrate/20160617172833_create_user_login_histories.rb +12 -0
- data/db/migrate/20160622151720_create_access_group_user_members.rb +9 -0
- data/db/migrate/20160622151925_create_access_group_group_members.rb +9 -0
- data/db/migrate/20160701005706_create_ldap_access_groups.rb +11 -0
- data/db/migrate/20161108155029_create_system_configs.rb +11 -0
- data/db/seeds/barkest_core_01_create_users.rb +42 -0
- data/db/seeds.rb +53 -0
- data/lib/barkest_core/concerns/association_with_defaults.rb +55 -0
- data/lib/barkest_core/concerns/boolean_parser.rb +88 -0
- data/lib/barkest_core/concerns/date_parser.rb +181 -0
- data/lib/barkest_core/concerns/email_tester.rb +55 -0
- data/lib/barkest_core/concerns/encrypted_fields.rb +156 -0
- data/lib/barkest_core/concerns/named_model.rb +73 -0
- data/lib/barkest_core/concerns/number_parser.rb +145 -0
- data/lib/barkest_core/concerns/utc_conversion.rb +60 -0
- data/lib/barkest_core/engine.rb +105 -0
- data/lib/barkest_core/extensions/active_record_extensions.rb +120 -0
- data/lib/barkest_core/extensions/application_configuration_extensions.rb +38 -0
- data/lib/barkest_core/extensions/application_extensions.rb +50 -0
- data/lib/barkest_core/extensions/axlsx_extenstions.rb +157 -0
- data/lib/barkest_core/extensions/fixture_set_extensions.rb +107 -0
- data/lib/barkest_core/extensions/generator_extensions.rb +271 -0
- data/lib/barkest_core/extensions/main_app_extensions.rb +35 -0
- data/lib/barkest_core/extensions/prawn_document_extensions.rb +367 -0
- data/lib/barkest_core/extensions/prawn_table_extensions.rb +131 -0
- data/lib/barkest_core/extensions/router_extensions.rb +106 -0
- data/lib/barkest_core/extensions/simple_formatter_extensions.rb +66 -0
- data/lib/barkest_core/extensions/test_case_extensions.rb +348 -0
- data/lib/barkest_core/extensions/time_extensions.rb +164 -0
- data/lib/barkest_core/handlers/csv_handler.rb +30 -0
- data/lib/barkest_core/version.rb +3 -0
- data/lib/barkest_core.rb +324 -0
- data/lib/generators/barkest/install_generator.rb +102 -0
- data/lib/generators/barkest_core/actions/01_patch_application_controller.rb +55 -0
- data/lib/generators/barkest_core/actions/02_patch_application_mailer.rb +56 -0
- data/lib/generators/barkest_core/actions/03_patch_assets.rb +62 -0
- data/lib/generators/barkest_core/actions/04_patch_layouts.rb +36 -0
- data/lib/generators/barkest_core/actions/05_patch_routes.rb +93 -0
- data/lib/generators/barkest_core/actions/06_patch_seeds.rb +60 -0
- data/lib/generators/barkest_core/actions/07_copy_migrations.rb +51 -0
- data/lib/generators/barkest_core/actions/08_configure_database.rb +52 -0
- data/lib/generators/barkest_core/actions/09_configure_secrets.rb +29 -0
- data/lib/generators/barkest_core/actions/99_patch_gitignore.rb +57 -0
- data/lib/generators/barkest_core/install_generator.rb +17 -0
- data/test/barkest_core_test.rb +83 -0
- data/test/controllers/access_groups_controller_test.rb +53 -0
- data/test/controllers/contact_controller_test.rb +10 -0
- data/test/controllers/sessions_controller_test.rb +10 -0
- data/test/controllers/users_controller_test.rb +10 -0
- data/test/dummy/.gitignore +10 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +14 -0
- data/test/dummy/app/assets/stylesheets/application.css +16 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/mailers/.keep +0 -0
- data/test/dummy/app/mailers/application_mailer.rb +3 -0
- data/test/dummy/app/models/.keep +0 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +1 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +1 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/app/views/system_config/show_fake.html.erb +3 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config/application.rb +27 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +47 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +44 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/db_updater_ext.rb +33 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/sys_config_ext.rb +12 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +60 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/schema.rb +95 -0
- data/test/dummy/db/seeds/barkest_core_01_create_users.rb +42 -0
- data/test/dummy/db/seeds.rb +51 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/sql/my_test_view.sql +3 -0
- data/test/fixtures/access_groups.yml +21 -0
- data/test/fixtures/users.yml +71 -0
- data/test/helpers/barkest_core/sessions_helper_test.rb +22 -0
- data/test/integration/access_group_mgmt_test.rb +33 -0
- data/test/integration/access_test.rb +24 -0
- data/test/integration/account_activations_access_test.rb +12 -0
- data/test/integration/contact_test.rb +98 -0
- data/test/integration/extra_partial_test.rb +41 -0
- data/test/integration/log_view_access_test.rb +12 -0
- data/test/integration/password_resets_test.rb +101 -0
- data/test/integration/reports_test.rb +53 -0
- data/test/integration/status_access_test.rb +27 -0
- data/test/integration/system_config_access_test.rb +24 -0
- data/test/integration/system_update_access_test.rb +19 -0
- data/test/integration/users_access_test.rb +34 -0
- data/test/integration/users_edit_test.rb +178 -0
- data/test/integration/users_index_test.rb +62 -0
- data/test/integration/users_login_test.rb +67 -0
- data/test/integration/users_signup_test.rb +54 -0
- data/test/mailers/.keep +0 -0
- data/test/mailers/barkest_core/contact_form_test.rb +28 -0
- data/test/mailers/barkest_core/user_mailer_test.rb +43 -0
- data/test/mailers/previews/barkest_core/contact_form_preview.rb +17 -0
- data/test/mailers/previews/barkest_core/user_mailer_preview.rb +26 -0
- data/test/models/access_group_group_member_test.rb +28 -0
- data/test/models/access_group_test.rb +114 -0
- data/test/models/access_group_user_member_test.rb +28 -0
- data/test/models/barkest_core/auth_config_test.rb +57 -0
- data/test/models/barkest_core/bool_parser_test.rb +28 -0
- data/test/models/barkest_core/contact_message_test.rb +61 -0
- data/test/models/barkest_core/database_config_test.rb +33 -0
- data/test/models/barkest_core/date_parser_test.rb +110 -0
- data/test/models/barkest_core/email_config_test.rb +57 -0
- data/test/models/barkest_core/global_status_test.rb +50 -0
- data/test/models/barkest_core/ms_sql_db_updater_test.rb +115 -0
- data/test/models/barkest_core/ms_sql_definition_test.rb +102 -0
- data/test/models/barkest_core/ms_sql_function_test.rb +131 -0
- data/test/models/barkest_core/number_parser_test.rb +29 -0
- data/test/models/barkest_core/self_update_config_test.rb +29 -0
- data/test/models/barkest_core/user_alert_test.rb +19 -0
- data/test/models/barkest_core/user_manager_test.rb +34 -0
- data/test/models/barkest_core/work_path_test.rb +26 -0
- data/test/models/disable_user_test.rb +27 -0
- data/test/models/generic_time_test.rb +66 -0
- data/test/models/ldap_access_group_test.rb +31 -0
- data/test/models/pdf_table_builder_test.rb +6 -0
- data/test/models/system_config_test.rb +78 -0
- data/test/models/user_login_history_test.rb +37 -0
- data/test/models/user_test.rb +130 -0
- data/test/test_helper.rb +63 -0
- metadata +798 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
$(function() {
|
|
2
|
+
$('div.date').datepicker({ format: "mm/dd/yyyy", todayBtn: "linked", todayHighlight: true, clearBtn: true });
|
|
3
|
+
$('input.float').regexMask('float');
|
|
4
|
+
$('input.integer').regexMask('integer');
|
|
5
|
+
$('.double-scroll').doubleScroll({ onlyIfScroll: true, resetOnWindowResize: true });
|
|
6
|
+
});
|
|
7
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @name DoubleScroll
|
|
3
|
+
* @desc displays scroll bar on top and on the bottom of the div
|
|
4
|
+
* @requires jQuery
|
|
5
|
+
*
|
|
6
|
+
* @author Pawel Suwala - http://suwala.eu/
|
|
7
|
+
* @author Antoine Vianey - http://www.astek.fr/
|
|
8
|
+
* @version 0.4 (18-06-2014)
|
|
9
|
+
*
|
|
10
|
+
* Dual licensed under the MIT and GPL licenses:
|
|
11
|
+
* http://www.opensource.org/licenses/mit-license.php
|
|
12
|
+
* http://www.gnu.org/licenses/gpl.html
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* https://github.com/avianey/jqDoubleScroll
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
jQuery.fn.doubleScroll = function(userOptions) {
|
|
19
|
+
var $ = jQuery;
|
|
20
|
+
// Default options
|
|
21
|
+
var options = {
|
|
22
|
+
contentElement: undefined, // Widest element, if not specified first child element will be used
|
|
23
|
+
scrollCss: {
|
|
24
|
+
'overflow-x': 'auto',
|
|
25
|
+
'overflow-y': 'hidden'
|
|
26
|
+
},
|
|
27
|
+
contentCss: {
|
|
28
|
+
'overflow-x': 'auto',
|
|
29
|
+
'overflow-y': 'hidden'
|
|
30
|
+
},
|
|
31
|
+
onlyIfScroll: true, // top scrollbar is not shown if the bottom one is not present
|
|
32
|
+
resetOnWindowResize: false, // recompute the top ScrollBar requirements when the window is resized
|
|
33
|
+
timeToWaitForResize: 30 // wait for the last update event (usefull when browser fire resize event constantly during ressing)
|
|
34
|
+
};
|
|
35
|
+
$.extend(true, options, userOptions);
|
|
36
|
+
// do not modify
|
|
37
|
+
// internal stuff
|
|
38
|
+
$.extend(options, {
|
|
39
|
+
topScrollBarMarkup: '<div class="doubleScroll-scroll-wrapper" style="height: 20px;"><div class="doubleScroll-scroll" style="height: 20px;"></div></div>',
|
|
40
|
+
topScrollBarWrapperSelector: '.doubleScroll-scroll-wrapper',
|
|
41
|
+
topScrollBarInnerSelector: '.doubleScroll-scroll'
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
var _showScrollBar = function($self, options) {
|
|
45
|
+
|
|
46
|
+
if (options.onlyIfScroll && $self.get(0).scrollWidth <= $self.width()) {
|
|
47
|
+
// content doesn't scroll
|
|
48
|
+
// remove any existing occurrence...
|
|
49
|
+
$self.prev(options.topScrollBarWrapperSelector).remove();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// add div that will act as an upper scroll only if not already added to the DOM
|
|
54
|
+
var $topScrollBar = $self.prev(options.topScrollBarWrapperSelector);
|
|
55
|
+
if ($topScrollBar.length == 0) {
|
|
56
|
+
|
|
57
|
+
// creating the scrollbar
|
|
58
|
+
// added before in the DOM
|
|
59
|
+
$topScrollBar = $(options.topScrollBarMarkup);
|
|
60
|
+
$self.before($topScrollBar);
|
|
61
|
+
|
|
62
|
+
// apply the css
|
|
63
|
+
$topScrollBar.css(options.scrollCss);
|
|
64
|
+
$self.css(options.contentCss);
|
|
65
|
+
|
|
66
|
+
// bind upper scroll to bottom scroll
|
|
67
|
+
$topScrollBar.bind('scroll.doubleScroll', function() {
|
|
68
|
+
$self.scrollLeft($topScrollBar.scrollLeft());
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// bind bottom scroll to upper scroll
|
|
72
|
+
var selfScrollHandler = function() {
|
|
73
|
+
$topScrollBar.scrollLeft($self.scrollLeft());
|
|
74
|
+
};
|
|
75
|
+
$self.bind('scroll.doubleScroll', selfScrollHandler);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// find the content element (should be the widest one)
|
|
79
|
+
var $contentElement;
|
|
80
|
+
if (options.contentElement !== undefined && $self.find(options.contentElement).length !== 0) {
|
|
81
|
+
$contentElement = $self.find(options.contentElement);
|
|
82
|
+
} else {
|
|
83
|
+
$contentElement = $self.find('>:first-child');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// set the width of the wrappers
|
|
87
|
+
$(options.topScrollBarInnerSelector, $topScrollBar).width($contentElement.outerWidth());
|
|
88
|
+
$topScrollBar.width($self.width());
|
|
89
|
+
$topScrollBar.scrollLeft($self.scrollLeft());
|
|
90
|
+
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
return this.each(function() {
|
|
94
|
+
var $self = $(this);
|
|
95
|
+
_showScrollBar($self, options);
|
|
96
|
+
|
|
97
|
+
// bind the resize handler
|
|
98
|
+
// do it once
|
|
99
|
+
if (options.resetOnWindowResize) {
|
|
100
|
+
var id;
|
|
101
|
+
var handler = function(e) {
|
|
102
|
+
_showScrollBar($self, options);
|
|
103
|
+
};
|
|
104
|
+
$(window).bind('resize.doubleScroll', function() {
|
|
105
|
+
// adding/removing/replacing the scrollbar might resize the window
|
|
106
|
+
// so the resizing flag will avoid the infinite loop here...
|
|
107
|
+
clearTimeout(id);
|
|
108
|
+
id = setTimeout(handler, options.timeToWaitForResize);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
(function ($){
|
|
2
|
+
$.fn.regexMask = function (mask) {
|
|
3
|
+
if (!mask) {
|
|
4
|
+
throw 'mask is missing';
|
|
5
|
+
} else if (mask == 'float') {
|
|
6
|
+
mask = /^-?(\d,)*\d*(\.\d*)?$/;
|
|
7
|
+
} else if (mask == 'integer') {
|
|
8
|
+
mask = /^-?\d*$/;
|
|
9
|
+
} else {
|
|
10
|
+
try {
|
|
11
|
+
mask.test("");
|
|
12
|
+
} catch(e) {
|
|
13
|
+
throw 'mask does not support test method';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
$(this).keypress(function (event) {
|
|
17
|
+
if (!event.charCode) return true;
|
|
18
|
+
var part1 = this.value.substring(0,this.selectionStart);
|
|
19
|
+
var part2 = this.value.substring(this.selectionEnd,this.value.length);
|
|
20
|
+
if (!mask.test(part1 + String.fromCharCode(event.charCode) + part2))
|
|
21
|
+
return false;
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})(jQuery);
|
|
25
|
+
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
var systemStatus = {
|
|
2
|
+
|
|
3
|
+
// method to use for the submission
|
|
4
|
+
method: 'POST',
|
|
5
|
+
|
|
6
|
+
// URL to submit against unless submitForm is specified.
|
|
7
|
+
submitUrl: window.location.href,
|
|
8
|
+
|
|
9
|
+
// Data to submit to submitUrl unless submitForm is specified.
|
|
10
|
+
submitData: null,
|
|
11
|
+
|
|
12
|
+
// If specified, this form will be submitted and the submitUrl and submitData variables will be ignored.
|
|
13
|
+
submitForm: null,
|
|
14
|
+
|
|
15
|
+
// The URL to link to when the status completes.
|
|
16
|
+
completionUrl: window.location.href,
|
|
17
|
+
|
|
18
|
+
// The label for the status completion button.
|
|
19
|
+
completionLabel: 'Continue',
|
|
20
|
+
|
|
21
|
+
// If true, then display a modal dialog over the current page, otherwise redirect to /status/current.
|
|
22
|
+
inline: true,
|
|
23
|
+
|
|
24
|
+
// If we are inline, do we want to remove the log?
|
|
25
|
+
inlineNoLog: false,
|
|
26
|
+
|
|
27
|
+
// The status urls.
|
|
28
|
+
_curStatusUrl: application_root_offset + '/status/current',
|
|
29
|
+
_firstStatusUrl: application_root_offset + '/status/first',
|
|
30
|
+
_moreStatusUrl: application_root_offset + '/status/more',
|
|
31
|
+
|
|
32
|
+
// IDs for the elements to manage.
|
|
33
|
+
idStatusLog: 'status_log',
|
|
34
|
+
idStatusTitle: 'status_title',
|
|
35
|
+
idProgressContainer: 'status_progress_cont',
|
|
36
|
+
idProgress: 'status_progress',
|
|
37
|
+
idCompletButton: 'status_complete',
|
|
38
|
+
|
|
39
|
+
// Creates the modal dialog.
|
|
40
|
+
_showDialog: function () {
|
|
41
|
+
$('body')
|
|
42
|
+
.append(
|
|
43
|
+
$('<div id="status_dialog" class="modal fade" tabindex="-1" role="dialog"></div>')
|
|
44
|
+
.append(
|
|
45
|
+
$('<div class="modal-dialog"></div>')
|
|
46
|
+
.append(
|
|
47
|
+
$('<div class="modal-content"></div>')
|
|
48
|
+
.append(
|
|
49
|
+
$('<div class="modal-header"></div>')
|
|
50
|
+
.append(
|
|
51
|
+
$('<h4 class="modal-title"></h4>')
|
|
52
|
+
.attr('id', this.idStatusTitle)
|
|
53
|
+
.text('Please wait...')
|
|
54
|
+
)
|
|
55
|
+
)
|
|
56
|
+
.append(
|
|
57
|
+
$('<div class="modal-body"></div>')
|
|
58
|
+
.append(
|
|
59
|
+
$('<pre></pre>')
|
|
60
|
+
.attr('id', this.idStatusLog)
|
|
61
|
+
.css('height', '350px')
|
|
62
|
+
)
|
|
63
|
+
.append(
|
|
64
|
+
$('<div class="progress"></div>')
|
|
65
|
+
.attr('id', this.idProgressContainer)
|
|
66
|
+
.append(
|
|
67
|
+
$('<div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>')
|
|
68
|
+
.attr('id', this.idProgress)
|
|
69
|
+
.css('min-width', '2em')
|
|
70
|
+
.text('0%')
|
|
71
|
+
)
|
|
72
|
+
)
|
|
73
|
+
)
|
|
74
|
+
.append(
|
|
75
|
+
$('<div class="modal-footer"></div>')
|
|
76
|
+
.append(
|
|
77
|
+
$('<a class="btn btn-primary"></a>')
|
|
78
|
+
.attr('id', this.idCompletButton)
|
|
79
|
+
.attr('href', this.completionUrl)
|
|
80
|
+
.text(this.completionLabel)
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
)
|
|
84
|
+
)
|
|
85
|
+
)
|
|
86
|
+
);
|
|
87
|
+
if (this.inlineNoLog)
|
|
88
|
+
{
|
|
89
|
+
$('#' + this.idStatusLog).remove();
|
|
90
|
+
}
|
|
91
|
+
$('#status_dialog').modal();
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
// Destroys the modal dialog.
|
|
95
|
+
hideDialog: function () {
|
|
96
|
+
$('#status_dialog').remove();
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
// Submits the data.
|
|
100
|
+
_submit: function () {
|
|
101
|
+
if (this.submitForm) {
|
|
102
|
+
var frm = $(this.submitForm);
|
|
103
|
+
if (frm.length > 0) {
|
|
104
|
+
this.submitUrl = frm.attr('action');
|
|
105
|
+
this.submitData = frm.serialize();
|
|
106
|
+
this.method = (frm.attr('method') || 'POST').toUpperCase();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (this.inline) {
|
|
111
|
+
this._showDialog();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// submit the data and immediately move on.
|
|
115
|
+
$.ajax({
|
|
116
|
+
url: this.submitUrl,
|
|
117
|
+
data: this.submitData,
|
|
118
|
+
method: this.method
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
if (this.inline) {
|
|
122
|
+
window.setTimeout('systemStatus.updateStatus(true)', 100);
|
|
123
|
+
}
|
|
124
|
+
else
|
|
125
|
+
{
|
|
126
|
+
// and redirect to the status url.
|
|
127
|
+
window.location.href = this._curStatusUrl + '?u=' + encodeURIComponent(this.completionUrl).replace(' ', '+') + '&l=' + encodeURIComponent(this.completionLabel).replace(' ', '+');
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
updateStatus: function (initial) {
|
|
132
|
+
if (initial) {
|
|
133
|
+
$('#' + this.idCompletButton).text(this.completionLabel).attr('href', this.completionUrl).hide();
|
|
134
|
+
$('#' + this.idProgressContainer).hide();
|
|
135
|
+
$('#' + this.idProgress).text('0%').attr('aria-valuenow', 0);
|
|
136
|
+
}
|
|
137
|
+
$.ajax({
|
|
138
|
+
url: ((initial) ? this._firstStatusUrl : this._moreStatusUrl),
|
|
139
|
+
method: 'GET',
|
|
140
|
+
dataType: 'json',
|
|
141
|
+
error: function(xhr, status, message) {
|
|
142
|
+
alert('Failed to query status.\n' + message);
|
|
143
|
+
$('#' + systemStatus.idCompleteButton).show();
|
|
144
|
+
},
|
|
145
|
+
success: function(data, status, xhr) {
|
|
146
|
+
if (data.status) {
|
|
147
|
+
$('#' + systemStatus.idStatusTitle).text(data.status);
|
|
148
|
+
}
|
|
149
|
+
if (data.error) {
|
|
150
|
+
alert('An internal error occurred.\n' + data.contents);
|
|
151
|
+
$('#' + systemStatus.idCompletButton).show();
|
|
152
|
+
} else {
|
|
153
|
+
if (data.contents)
|
|
154
|
+
{
|
|
155
|
+
log = $('#' + systemStatus.idStatusLog);
|
|
156
|
+
log.text(log.text() + data.contents);
|
|
157
|
+
}
|
|
158
|
+
if (data.percentage == '-') {
|
|
159
|
+
if ($('#' + systemStatus.idProgressContainer).is(':visible'))
|
|
160
|
+
{
|
|
161
|
+
data.percentage = '100'
|
|
162
|
+
} else {
|
|
163
|
+
data.percentage = ''
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (data.percentage) {
|
|
167
|
+
pct = parseInt(data.percentage).toString();
|
|
168
|
+
$('#' + systemStatus.idProgress).text(pct + '%').css('width', pct + '%').attr('aria-valuenow', pct);
|
|
169
|
+
$('#' + systemStatus.idProgressContainer).show();
|
|
170
|
+
} else {
|
|
171
|
+
$('#' + systemStatus.idProgressContainer).hide();
|
|
172
|
+
}
|
|
173
|
+
if (!data.locked) {
|
|
174
|
+
$('#' + systemStatus.idCompletButton).show();
|
|
175
|
+
} else {
|
|
176
|
+
window.setTimeout('systemStatus.updateStatus(false)', 500);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
run: function (options) {
|
|
184
|
+
if (options === undefined) {
|
|
185
|
+
options = {};
|
|
186
|
+
}
|
|
187
|
+
for (var attrName in options) {
|
|
188
|
+
if (options.hasOwnProperty(attrName)) {
|
|
189
|
+
if (this.hasOwnProperty(attrName))
|
|
190
|
+
{
|
|
191
|
+
this[attrName] = options[attrName];
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (options.update_only) {
|
|
196
|
+
this.updateStatus(true);
|
|
197
|
+
} else {
|
|
198
|
+
this._submit();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
+
* listed below.
|
|
4
|
+
*
|
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
|
+
*
|
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
|
11
|
+
* file per style scope.
|
|
12
|
+
*
|
|
13
|
+
*= require barkest_core/custom
|
|
14
|
+
*= require barkest_core/datepicker3
|
|
15
|
+
*= require_tree .
|
|
16
|
+
*= require_self
|
|
17
|
+
*/
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/* variables */
|
|
2
|
+
|
|
3
|
+
$gray-medium-light: #eaeaea;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/* imports */
|
|
7
|
+
|
|
8
|
+
@import "bootstrap-sprockets";
|
|
9
|
+
@import "bootstrap";
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
/* mixins */
|
|
13
|
+
|
|
14
|
+
@mixin box_sizing {
|
|
15
|
+
-moz-box-sizing: border-box;
|
|
16
|
+
-webkit-box-sizing: border-box;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/* universal */
|
|
22
|
+
|
|
23
|
+
body {
|
|
24
|
+
padding-top: 60px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
textarea {
|
|
28
|
+
resize: vertical;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.center {
|
|
32
|
+
text-align: center;
|
|
33
|
+
h1 {
|
|
34
|
+
margin-bottom: 10px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.rjust {
|
|
39
|
+
text-align: right;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ljust {
|
|
43
|
+
text-align: left;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.gravatar {
|
|
47
|
+
float: left;
|
|
48
|
+
margin-right: 10px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.gravatar_edit {
|
|
52
|
+
margin-top: 15px;
|
|
53
|
+
.gravatar {
|
|
54
|
+
clear: both;
|
|
55
|
+
float: none;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.glyph-bigger {
|
|
60
|
+
font-size: 175%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.glyph-big {
|
|
64
|
+
font-size: 133%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.glyph-small {
|
|
68
|
+
font-size: 75%;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.glyph-smaller {
|
|
72
|
+
font-size: 50%;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.info {
|
|
76
|
+
background-color: $state-info-bg;
|
|
77
|
+
color: $state-info-text;
|
|
78
|
+
}
|
|
79
|
+
.warning {
|
|
80
|
+
background-color: $state-warning-bg;
|
|
81
|
+
color: $state-warning-text;
|
|
82
|
+
}
|
|
83
|
+
.danger {
|
|
84
|
+
background-color: $state-danger-bg;
|
|
85
|
+
color: $state-danger-text;
|
|
86
|
+
}
|
|
87
|
+
.success {
|
|
88
|
+
background-color: $state-success-bg;
|
|
89
|
+
color: $state-success-text;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
/* typography */
|
|
94
|
+
|
|
95
|
+
h1, h2, h3, h4, h5, h6 {
|
|
96
|
+
line-height: 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
h1 {
|
|
100
|
+
text-align: center;
|
|
101
|
+
font-size: 3em;
|
|
102
|
+
letter-spacing: -2px;
|
|
103
|
+
margin-bottom: 30px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
h2 {
|
|
107
|
+
font-size: 1.2em;
|
|
108
|
+
letter-spacing: -1px;
|
|
109
|
+
margin-bottom: 30px;
|
|
110
|
+
font-weight: normal;
|
|
111
|
+
color: $gray-light;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
p {
|
|
115
|
+
font-size: 1.1em;
|
|
116
|
+
line-height: 1.7em;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
/* header */
|
|
121
|
+
|
|
122
|
+
#logo {
|
|
123
|
+
float: left;
|
|
124
|
+
margin-right: 10px;
|
|
125
|
+
color: white;
|
|
126
|
+
border-style: none;
|
|
127
|
+
&:hover {
|
|
128
|
+
color: white;
|
|
129
|
+
border-style: none;
|
|
130
|
+
}
|
|
131
|
+
img {
|
|
132
|
+
width: 44px;
|
|
133
|
+
height: 44px;
|
|
134
|
+
padding: 0;
|
|
135
|
+
border-style: none;
|
|
136
|
+
margin: 3px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
/* footer */
|
|
142
|
+
|
|
143
|
+
footer {
|
|
144
|
+
margin-top: 45px;
|
|
145
|
+
padding-top: 5px;
|
|
146
|
+
border-top: solid 1px $gray-medium-light;
|
|
147
|
+
color: $gray-light;
|
|
148
|
+
a {
|
|
149
|
+
color: $gray;
|
|
150
|
+
&:hover {
|
|
151
|
+
color: $gray-darker;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
small {
|
|
155
|
+
float: left;
|
|
156
|
+
}
|
|
157
|
+
ul {
|
|
158
|
+
float: right;
|
|
159
|
+
list-style: none;
|
|
160
|
+
li {
|
|
161
|
+
float: left;
|
|
162
|
+
margin-left: 15px;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.debug_dump {
|
|
168
|
+
clear: both;
|
|
169
|
+
float: left;
|
|
170
|
+
width: 100%;
|
|
171
|
+
margin-top: 45px;
|
|
172
|
+
@include box_sizing;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
/* forms */
|
|
177
|
+
|
|
178
|
+
label.checkbox {
|
|
179
|
+
margin-top: -10px;
|
|
180
|
+
margin-bottom: 10px;
|
|
181
|
+
span {
|
|
182
|
+
margin-left: 20px;
|
|
183
|
+
font-weight: normal;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.form-group div.checkbox {
|
|
188
|
+
margin-left: 20px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.row div.checkbox {
|
|
192
|
+
margin-bottom: 10px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
label.plain, div.plain-label label {
|
|
196
|
+
font-weight: normal;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
#session_remember_me {
|
|
200
|
+
width: auto;
|
|
201
|
+
margin-left: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.form-control.disabled {
|
|
205
|
+
background-color: $gray-lighter;
|
|
206
|
+
cursor: not-allowed;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.input-symbol {
|
|
210
|
+
position: relative;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.input-symbol span {
|
|
214
|
+
position: absolute;
|
|
215
|
+
transform: translate(0, -50%);
|
|
216
|
+
top: 50%;
|
|
217
|
+
pointer-events: none;
|
|
218
|
+
margin-left: 0.5em;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.input-symbol input {
|
|
222
|
+
text-indent: 1em;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.field_with_errors {
|
|
226
|
+
@extend .has-error;
|
|
227
|
+
.form-control {
|
|
228
|
+
color: $state-danger-text;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* Users Index */
|
|
233
|
+
.users {
|
|
234
|
+
list-style: none;
|
|
235
|
+
margin: 0;
|
|
236
|
+
li {
|
|
237
|
+
overflow: auto;
|
|
238
|
+
padding: 10px;
|
|
239
|
+
border-bottom: 1px solid $gray-lighter;
|
|
240
|
+
ul {
|
|
241
|
+
list-style: none;
|
|
242
|
+
float: right;
|
|
243
|
+
padding: 0;
|
|
244
|
+
li {
|
|
245
|
+
float: left;
|
|
246
|
+
margin-left: 5px;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
p, div {
|
|
250
|
+
float: right;
|
|
251
|
+
max-width: 50%;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* lists */
|
|
257
|
+
ul.fixed_label {
|
|
258
|
+
li {
|
|
259
|
+
strong {
|
|
260
|
+
width: 126pt;
|
|
261
|
+
display: inline-block;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|