keppler 2.0.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/Gemfile +6 -0
- data/README.md +43 -0
- data/Rakefile +2 -0
- data/bin/console +15 -0
- data/bin/keppler +5 -0
- data/bin/setup +7 -0
- data/installer/core/Gemfile +113 -0
- data/installer/core/Guardfile +18 -0
- data/installer/core/README.md +87 -0
- data/installer/core/Rakefile +6 -0
- data/installer/core/_config.yml +1 -0
- data/installer/core/app/assets/images/admin/favicon.png +0 -0
- data/installer/core/app/assets/images/admin/logo.png +0 -0
- data/installer/core/app/assets/images/admin/logo2.png +0 -0
- data/installer/core/app/assets/images/admin/profile-menu.jpg +0 -0
- data/installer/core/app/assets/images/admin/search.png +0 -0
- data/installer/core/app/assets/images/admin/slice-icon-orange.png +0 -0
- data/installer/core/app/assets/images/admin/slice-icon.png +0 -0
- data/installer/core/app/assets/images/admin/slice.png +0 -0
- data/installer/core/app/assets/images/admin/slice_white.png +0 -0
- data/installer/core/app/assets/images/admin/space.png +0 -0
- data/installer/core/app/assets/images/app/Home_Keppler.png +0 -0
- data/installer/core/app/assets/images/app/Home_Keppler2.png +0 -0
- data/installer/core/app/assets/images/app/keppler-front.png +0 -0
- data/installer/core/app/assets/images/app/slice-front.png +0 -0
- data/installer/core/app/assets/javascripts/admin/application.coffee +15 -0
- data/installer/core/app/assets/javascripts/admin/dropdown_top.js +7 -0
- data/installer/core/app/assets/javascripts/admin/file_upload.coffee +21 -0
- data/installer/core/app/assets/javascripts/admin/img_preview.js +18 -0
- data/installer/core/app/assets/javascripts/admin/main.coffee +42 -0
- data/installer/core/app/assets/javascripts/admin/notification.js +11 -0
- data/installer/core/app/assets/javascripts/admin/preview_template.js +21 -0
- data/installer/core/app/assets/javascripts/admin/sidebar.js +20 -0
- data/installer/core/app/assets/javascripts/admin/sort.coffee +8 -0
- data/installer/core/app/assets/javascripts/app/application.js.coffee +5 -0
- data/installer/core/app/assets/javascripts/app/front.js +129 -0
- data/installer/core/app/assets/javascripts/app/google_analytics.js.coffee +5 -0
- data/installer/core/app/assets/javascripts/ckeditor/config.js +130 -0
- data/installer/core/app/assets/javascripts/keppler_ga_dashboard/view-selector2.js +196 -0
- data/installer/core/app/assets/javascripts/vue_admin/index.js +87 -0
- data/installer/core/app/assets/stylesheets/admin/application.scss +43 -0
- data/installer/core/app/assets/stylesheets/admin/components/layouts/_footer.scss +5 -0
- data/installer/core/app/assets/stylesheets/admin/components/layouts/_settings.scss +35 -0
- data/installer/core/app/assets/stylesheets/admin/components/module/_show.scss +0 -0
- data/installer/core/app/assets/stylesheets/admin/components/navigation/_navbar.scss +79 -0
- data/installer/core/app/assets/stylesheets/admin/components/navigation/_sidebar.scss +91 -0
- data/installer/core/app/assets/stylesheets/admin/components/paginator/_paginator.scss +53 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_devise.scss +162 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_files.scss +83 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_form.scss +163 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_header.scss +34 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_index.scss +331 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_listing.scss +29 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_navbar.scss +36 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_pageslide.scss +125 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_preloader.scss +283 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_search.scss +220 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_show.scss +17 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_sidebar.scss +64 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_switchs.scss +47 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_themes.scss +74 -0
- data/installer/core/app/assets/stylesheets/admin/utils/_base.scss +66 -0
- data/installer/core/app/assets/stylesheets/admin/utils/_mixins.scss +26 -0
- data/installer/core/app/assets/stylesheets/admin/utils/_theme.scss +94 -0
- data/installer/core/app/assets/stylesheets/admin/utils/_variables.scss +79 -0
- data/installer/core/app/assets/stylesheets/app/application.scss +29 -0
- data/installer/core/app/assets/stylesheets/app/base/_base_project.scss +17 -0
- data/installer/core/app/assets/stylesheets/app/base/_typography.scss +1 -0
- data/installer/core/app/assets/stylesheets/app/components/_buttons.scss +0 -0
- data/installer/core/app/assets/stylesheets/app/components/_inputs.scss +0 -0
- data/installer/core/app/assets/stylesheets/app/components/_navbar.scss +21 -0
- data/installer/core/app/assets/stylesheets/app/layout/_container.scss +0 -0
- data/installer/core/app/assets/stylesheets/app/layout/_footer.scss +15 -0
- data/installer/core/app/assets/stylesheets/app/layout/_header.scss +0 -0
- data/installer/core/app/assets/stylesheets/app/pages/_front.sass +58 -0
- data/installer/core/app/assets/stylesheets/app/plugins/_bootstrap_override.scss +37 -0
- data/installer/core/app/assets/stylesheets/app/plugins/_font_awesome.scss +2 -0
- data/installer/core/app/assets/stylesheets/app/plugins/_keppler.scss +54 -0
- data/installer/core/app/assets/stylesheets/app/plugins/_npogress.scss +2 -0
- data/installer/core/app/assets/stylesheets/app/utils/_mixins.scss +18 -0
- data/installer/core/app/assets/stylesheets/app/utils/_variables.scss +28 -0
- data/installer/core/app/assets/stylesheets/errors/application.scss +3 -0
- data/installer/core/app/assets/stylesheets/errors/errors.scss +120 -0
- data/installer/core/app/assets/stylesheets/vendor/admin-lte/_skin-blue.scss +141 -0
- data/installer/core/app/controllers/admin/admin_controller.rb +72 -0
- data/installer/core/app/controllers/admin/customizes_controller.rb +109 -0
- data/installer/core/app/controllers/admin/meta_tags_controller.rb +124 -0
- data/installer/core/app/controllers/admin/scripts_controller.rb +131 -0
- data/installer/core/app/controllers/admin/settings_controller.rb +111 -0
- data/installer/core/app/controllers/admin/users_controller.rb +119 -0
- data/installer/core/app/controllers/app/app_controller.rb +23 -0
- data/installer/core/app/controllers/app/front_controller.rb +10 -0
- data/installer/core/app/controllers/application_controller.rb +96 -0
- data/installer/core/app/controllers/devise/sessions_controller.rb +104 -0
- data/installer/core/app/controllers/errors_controller.rb +28 -0
- data/installer/core/app/helpers/admin_helper.rb +117 -0
- data/installer/core/app/helpers/application_helper.rb +21 -0
- data/installer/core/app/helpers/customizes_helper.rb +2 -0
- data/installer/core/app/helpers/fronts_helper.rb +2 -0
- data/installer/core/app/helpers/scaffolds_helper.rb +2 -0
- data/installer/core/app/inputs/checkbox_material_input.rb +75 -0
- data/installer/core/app/inputs/file_material_input.rb +33 -0
- data/installer/core/app/mailers/application_mailer.rb +28 -0
- data/installer/core/app/models/appearance.rb +5 -0
- data/installer/core/app/models/application_record.rb +3 -0
- data/installer/core/app/models/concerns/activity_history.rb +9 -0
- data/installer/core/app/models/concerns/clone_record.rb +12 -0
- data/installer/core/app/models/customize.rb +154 -0
- data/installer/core/app/models/front.rb +2 -0
- data/installer/core/app/models/google_analytics_setting.rb +4 -0
- data/installer/core/app/models/meta_tag.rb +41 -0
- data/installer/core/app/models/role.rb +11 -0
- data/installer/core/app/models/script.rb +30 -0
- data/installer/core/app/models/setting.rb +17 -0
- data/installer/core/app/models/smtp_setting.rb +5 -0
- data/installer/core/app/models/social_account.rb +4 -0
- data/installer/core/app/models/user.rb +44 -0
- data/installer/core/app/policies/application_policy.rb +16 -0
- data/installer/core/app/policies/controller_policy.rb +53 -0
- data/installer/core/app/policies/customize_policy.rb +9 -0
- data/installer/core/app/policies/meta_tag_policy.rb +9 -0
- data/installer/core/app/policies/script_policy.rb +9 -0
- data/installer/core/app/policies/setting_policy.rb +9 -0
- data/installer/core/app/policies/user_policy.rb +17 -0
- data/installer/core/app/uploaders/attachment_uploader.rb +44 -0
- data/installer/core/app/uploaders/ckeditor_attachment_file_uploader.rb +36 -0
- data/installer/core/app/uploaders/ckeditor_picture_uploader.rb +47 -0
- data/installer/core/app/uploaders/template_uploader.rb +44 -0
- data/installer/core/app/views/admin/customizes/_description.html.haml +13 -0
- data/installer/core/app/views/admin/customizes/_form.html.haml +33 -0
- data/installer/core/app/views/admin/customizes/_listing.html.haml +15 -0
- data/installer/core/app/views/admin/customizes/_switch_default_template.html.haml +16 -0
- data/installer/core/app/views/admin/customizes/_switch_template.html.haml +22 -0
- data/installer/core/app/views/admin/customizes/index.html.haml +38 -0
- data/installer/core/app/views/admin/customizes/new.html.haml +4 -0
- data/installer/core/app/views/admin/layouts/_footer.html.haml +8 -0
- data/installer/core/app/views/admin/layouts/_head.html.haml +8 -0
- data/installer/core/app/views/admin/layouts/_header.html.haml +7 -0
- data/installer/core/app/views/admin/layouts/_listing_preloader.haml +5 -0
- data/installer/core/app/views/admin/layouts/_messages.html.haml +4 -0
- data/installer/core/app/views/admin/layouts/_navigation.html.haml +46 -0
- data/installer/core/app/views/admin/layouts/_preloader.html.haml +9 -0
- data/installer/core/app/views/admin/layouts/_search.html.haml +8 -0
- data/installer/core/app/views/admin/layouts/_sidebar.html.haml +63 -0
- data/installer/core/app/views/admin/layouts/application.html.haml +23 -0
- data/installer/core/app/views/admin/layouts/index/remote_messages.js.haml +9 -0
- data/installer/core/app/views/admin/meta_tags/_description.html.haml +13 -0
- data/installer/core/app/views/admin/meta_tags/_form.html.haml +57 -0
- data/installer/core/app/views/admin/meta_tags/_index_show.html.haml +26 -0
- data/installer/core/app/views/admin/meta_tags/_listing.html.haml +39 -0
- data/installer/core/app/views/admin/meta_tags/edit.html.haml +2 -0
- data/installer/core/app/views/admin/meta_tags/index.html.haml +80 -0
- data/installer/core/app/views/admin/meta_tags/new.html.haml +2 -0
- data/installer/core/app/views/admin/meta_tags/reload.js.haml +5 -0
- data/installer/core/app/views/admin/meta_tags/show.html.haml +29 -0
- data/installer/core/app/views/admin/meta_tags/show.js.haml +4 -0
- data/installer/core/app/views/admin/scripts/_description.html.haml +13 -0
- data/installer/core/app/views/admin/scripts/_form.html.haml +31 -0
- data/installer/core/app/views/admin/scripts/_index_show.html.haml +26 -0
- data/installer/core/app/views/admin/scripts/_listing.html.haml +42 -0
- data/installer/core/app/views/admin/scripts/edit.html.haml +1 -0
- data/installer/core/app/views/admin/scripts/index.html.haml +82 -0
- data/installer/core/app/views/admin/scripts/new.html.haml +1 -0
- data/installer/core/app/views/admin/scripts/reload.js.haml +5 -0
- data/installer/core/app/views/admin/scripts/show.html.haml +29 -0
- data/installer/core/app/views/admin/scripts/show.js.haml +4 -0
- data/installer/core/app/views/admin/settings/_form.html.haml +9 -0
- data/installer/core/app/views/admin/settings/components/_preview.html.haml +30 -0
- data/installer/core/app/views/admin/settings/edit.html.haml +4 -0
- data/installer/core/app/views/admin/settings/fields/_appearance.html.haml +62 -0
- data/installer/core/app/views/admin/settings/fields/_basic_information.html.haml +48 -0
- data/installer/core/app/views/admin/settings/fields/_email_setting.html.haml +17 -0
- data/installer/core/app/views/admin/settings/fields/_google_analytics_setting.html.haml +28 -0
- data/installer/core/app/views/admin/settings/fields/_social_accounts.html.haml +42 -0
- data/installer/core/app/views/admin/users/_description.html.haml +13 -0
- data/installer/core/app/views/admin/users/_form.html.haml +59 -0
- data/installer/core/app/views/admin/users/_index_show.html.haml +24 -0
- data/installer/core/app/views/admin/users/_listing.html.haml +49 -0
- data/installer/core/app/views/admin/users/edit.html.haml +1 -0
- data/installer/core/app/views/admin/users/index.html.haml +72 -0
- data/installer/core/app/views/admin/users/new.html.haml +1 -0
- data/installer/core/app/views/admin/users/reload.js.haml +5 -0
- data/installer/core/app/views/admin/users/show.html.haml +36 -0
- data/installer/core/app/views/admin/users/show.js.haml +4 -0
- data/installer/core/app/views/app/front/index.html.haml +180 -0
- data/installer/core/app/views/app/layouts/_footer.html.haml +3 -0
- data/installer/core/app/views/app/layouts/_google_analytics.html.haml +14 -0
- data/installer/core/app/views/app/layouts/_head.html.haml +22 -0
- data/installer/core/app/views/app/layouts/_messages.html.haml +6 -0
- data/installer/core/app/views/app/layouts/_meta_tags.html.haml +9 -0
- data/installer/core/app/views/app/layouts/_navigation.html.haml +13 -0
- data/installer/core/app/views/app/layouts/_navigation_links.html.haml +6 -0
- data/installer/core/app/views/app/layouts/application.html.haml +10 -0
- data/installer/core/app/views/application_mailer/testing.html.haml +1 -0
- data/installer/core/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
- data/installer/core/app/views/devise/passwords/edit.html.haml +27 -0
- data/installer/core/app/views/devise/passwords/new.html.haml +22 -0
- data/installer/core/app/views/devise/registrations/edit.html.erb +48 -0
- data/installer/core/app/views/devise/registrations/new.html.erb +19 -0
- data/installer/core/app/views/devise/sessions/new.html.haml +30 -0
- data/installer/core/app/views/errors/internal_server_error.html.haml +7 -0
- data/installer/core/app/views/errors/not_authorized.html.haml +7 -0
- data/installer/core/app/views/errors/not_found.html.haml +7 -0
- data/installer/core/app/views/errors/unprocessable.html.haml +7 -0
- data/installer/core/app/views/kaminari/_first_page.html.haml +11 -0
- data/installer/core/app/views/kaminari/_gap.html.haml +8 -0
- data/installer/core/app/views/kaminari/_last_page.html.haml +11 -0
- data/installer/core/app/views/kaminari/_next_page.html.haml +11 -0
- data/installer/core/app/views/kaminari/_page.html.haml +10 -0
- data/installer/core/app/views/kaminari/_paginator.html.haml +18 -0
- data/installer/core/app/views/kaminari/_prev_page.html.haml +11 -0
- data/installer/core/app/views/keppler_ga_dashboard/dashboard/analytics.html.haml +600 -0
- data/installer/core/app/views/layouts/errors/_head.html.haml +3 -0
- data/installer/core/app/views/layouts/errors/application.html.haml +11 -0
- data/installer/core/app/views/layouts/mailers/mailer.html.haml +3 -0
- data/installer/core/app/views/layouts/mailers/mailer.text.haml +1 -0
- data/installer/core/app/views/layouts/templates/application.html.haml +1 -0
- data/installer/core/app/views/public_activity/layout/_create.html.haml +45 -0
- data/installer/core/app/views/public_activity/layout/_destroy.html.haml +15 -0
- data/installer/core/app/views/public_activity/layout/_update.html.haml +45 -0
- data/installer/core/app/views/public_activity/session/_create.html.haml +13 -0
- data/installer/core/app/views/public_activity/session/_destroy.html.haml +13 -0
- data/installer/core/app/views/templates/kaminari/_first_page.html.haml +9 -0
- data/installer/core/app/views/templates/kaminari/_gap.html.haml +8 -0
- data/installer/core/app/views/templates/kaminari/_last_page.html.haml +9 -0
- data/installer/core/app/views/templates/kaminari/_next_page.html.haml +9 -0
- data/installer/core/app/views/templates/kaminari/_page.html.haml +10 -0
- data/installer/core/app/views/templates/kaminari/_paginator.html.haml +18 -0
- data/installer/core/app/views/templates/kaminari/_prev_page.html.haml +9 -0
- data/installer/core/bin/bundle +3 -0
- data/installer/core/bin/rails +4 -0
- data/installer/core/bin/rake +4 -0
- data/installer/core/bin/setup +29 -0
- data/installer/core/bin/spring +15 -0
- data/installer/core/config.ru +4 -0
- data/installer/core/config/application.rb +46 -0
- data/installer/core/config/boot.rb +7 -0
- data/installer/core/config/database.yml +25 -0
- data/installer/core/config/environment.rb +10 -0
- data/installer/core/config/environments/development.rb +57 -0
- data/installer/core/config/environments/production.rb +105 -0
- data/installer/core/config/environments/test.rb +44 -0
- data/installer/core/config/gaAuth/gauth_key.p12 +0 -0
- data/installer/core/config/initializers/assets.rb +14 -0
- data/installer/core/config/initializers/cookies_serializer.rb +3 -0
- data/installer/core/config/initializers/date_formats.rb +2 -0
- data/installer/core/config/initializers/devise.rb +259 -0
- data/installer/core/config/initializers/filter_parameter_logging.rb +5 -0
- data/installer/core/config/initializers/inflections.rb +16 -0
- data/installer/core/config/initializers/keppler_configuration.rb +9 -0
- data/installer/core/config/initializers/mime_types.rb +6 -0
- data/installer/core/config/initializers/paginate_kaminari_configuration.rb +12 -0
- data/installer/core/config/initializers/rolify.rb +10 -0
- data/installer/core/config/initializers/route_traslator.rb +3 -0
- data/installer/core/config/initializers/session_store.rb +5 -0
- data/installer/core/config/initializers/simple_form.rb +170 -0
- data/installer/core/config/initializers/simple_form_bootstrap.rb +155 -0
- data/installer/core/config/initializers/time_formats.rb +2 -0
- data/installer/core/config/initializers/wrap_parameters.rb +15 -0
- data/installer/core/config/locales/devise.en.yml +61 -0
- data/installer/core/config/locales/devise.es.yml +62 -0
- data/installer/core/config/locales/en.yml +380 -0
- data/installer/core/config/locales/es.yml +420 -0
- data/installer/core/config/locales/routes.en.yml +4 -0
- data/installer/core/config/locales/routes.es.yml +5 -0
- data/installer/core/config/locales/simple_form.en.yml +45 -0
- data/installer/core/config/locales/simple_form.es.yml +95 -0
- data/installer/core/config/locales/social_share_button.es.yml +10 -0
- data/installer/core/config/menu.yml +53 -0
- data/installer/core/config/puma.rb +56 -0
- data/installer/core/config/routes.rb +94 -0
- data/installer/core/config/sitemap.rb +27 -0
- data/installer/core/config/spring.rb +6 -0
- data/installer/core/db/migrate/20140812203549_devise_create_users.rb +50 -0
- data/installer/core/db/migrate/20140812210925_rolify_create_roles.rb +19 -0
- data/installer/core/db/migrate/20151221173228_create_activities.rb +23 -0
- data/installer/core/db/migrate/20160122201215_create_settings.rb +15 -0
- data/installer/core/db/migrate/20160126141856_create_smtp_settings.rb +14 -0
- data/installer/core/db/migrate/20160128131802_create_scripts.rb +11 -0
- data/installer/core/db/migrate/20160128151351_create_google_analytics_settings.rb +12 -0
- data/installer/core/db/migrate/20160128193740_create_social_accounts.rb +25 -0
- data/installer/core/db/migrate/20160201134918_create_meta_tags.rb +13 -0
- data/installer/core/db/migrate/20160201210520_create_appearances.rb +11 -0
- data/installer/core/db/migrate/20170603145521_create_customizes.rb +10 -0
- data/installer/core/db/migrate/20171225023933_create_scaffolds.rb +10 -0
- data/installer/core/db/schema.rb +172 -0
- data/installer/core/db/seeds.rb +45 -0
- data/installer/core/lib/generators/keppler_front/keppler_front_generator.rb +139 -0
- data/installer/core/lib/generators/keppler_front/templates/controllers/controller.rb +17 -0
- data/installer/core/lib/generators/keppler_front/templates/views/template.html.haml +180 -0
- data/installer/core/lib/generators/keppler_relation/keppler_relation_generator.rb +219 -0
- data/installer/core/lib/generators/keppler_scaffold/keppler_scaffold_generator.rb +240 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/controllers/controller.rb +143 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/models/model.rb +41 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/policies/policy.rb +9 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_description.html.haml +13 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_form.html.haml +60 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_index_show.html.haml +24 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_listing.html.haml +64 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/edit.html.haml +1 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/index.html.haml +97 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/new.html.haml +1 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/reload.js.haml +5 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/show.html.haml +65 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/show.js.haml +4 -0
- data/installer/core/lib/keppler_configuration.rb +12 -0
- data/installer/core/lib/templates/haml/scaffold/_form.html.haml +10 -0
- data/installer/core/plugins/keppler_ga_dashboard/Gemfile +15 -0
- data/installer/core/plugins/keppler_ga_dashboard/MIT-LICENSE +20 -0
- data/installer/core/plugins/keppler_ga_dashboard/README.md +51 -0
- data/installer/core/plugins/keppler_ga_dashboard/Rakefile +37 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/active-users.js +64 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/active-users.js.map +1 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/dashboard.coffee +13 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js +2 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js.map +1 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/view-selector2.js +196 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/view-selector2.js.map +1 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/stylesheets/dashboard.scss +83 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/controllers/keppler_ga_dashboard/dashboard_controller.rb +48 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/helpers/keppler_ga_dashboard/application_helper.rb +4 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/helpers/keppler_ga_dashboard/dashboard_helper.rb +14 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/views/keppler_ga_dashboard/dashboard/analytics.html.haml +359 -0
- data/installer/core/plugins/keppler_ga_dashboard/bin/rails +12 -0
- data/installer/core/plugins/keppler_ga_dashboard/config/menu.yml +6 -0
- data/installer/core/plugins/keppler_ga_dashboard/config/routes.rb +3 -0
- data/installer/core/plugins/keppler_ga_dashboard/keppler_ga_dashboard.gemspec +22 -0
- data/installer/core/plugins/keppler_ga_dashboard/lib/keppler_ga_dashboard.rb +10 -0
- data/installer/core/plugins/keppler_ga_dashboard/lib/keppler_ga_dashboard/engine.rb +5 -0
- data/installer/core/plugins/keppler_ga_dashboard/lib/keppler_ga_dashboard/tasks/install.rb +58 -0
- data/installer/core/plugins/keppler_ga_dashboard/lib/keppler_ga_dashboard/version.rb +3 -0
- data/installer/core/plugins/keppler_ga_dashboard/lib/tasks/keppler_ga_dashboard_tasks.rake +13 -0
- data/installer/core/public/favicon.ico +0 -0
- data/installer/core/public/humans.txt +20 -0
- data/installer/core/public/robots.txt +5 -0
- data/installer/core/test/controllers/admin_controller_test.rb +11 -0
- data/installer/core/test/controllers/errors_controller_test.rb +24 -0
- data/installer/core/test/controllers/frontend_controller_test.rb +9 -0
- data/installer/core/test/controllers/fronts_controller_test.rb +49 -0
- data/installer/core/test/controllers/meta_tags_controller_test.rb +49 -0
- data/installer/core/test/controllers/scaffolds_controller_test.rb +49 -0
- data/installer/core/test/controllers/scripts_controller_test.rb +49 -0
- data/installer/core/test/controllers/settings_controller_test.rb +49 -0
- data/installer/core/test/controllers/users_controller_test.rb +18 -0
- data/installer/core/test/fixtures/appearances.yml +11 -0
- data/installer/core/test/fixtures/caches.yml +7 -0
- data/installer/core/test/fixtures/fronts.yml +7 -0
- data/installer/core/test/fixtures/google_adwords.yml +13 -0
- data/installer/core/test/fixtures/google_analytics_settings.yml +13 -0
- data/installer/core/test/fixtures/meta_tags.yml +13 -0
- data/installer/core/test/fixtures/roles.yml +11 -0
- data/installer/core/test/fixtures/scaffolds.yml +9 -0
- data/installer/core/test/fixtures/scripts.yml +11 -0
- data/installer/core/test/fixtures/settings.yml +13 -0
- data/installer/core/test/fixtures/smtp_settings.yml +17 -0
- data/installer/core/test/fixtures/social_accounts.yml +39 -0
- data/installer/core/test/fixtures/users.yml +10 -0
- data/installer/core/test/helpers/admin_helper_test.rb +4 -0
- data/installer/core/test/helpers/frontend_helper_test.rb +4 -0
- data/installer/core/test/mailers/application_mailer_test.rb +7 -0
- data/installer/core/test/mailers/previews/application_mailer_preview.rb +4 -0
- data/installer/core/test/models/apparence_test.rb +7 -0
- data/installer/core/test/models/cache_test.rb +7 -0
- data/installer/core/test/models/front_test.rb +7 -0
- data/installer/core/test/models/google_analytics_setting_test.rb +7 -0
- data/installer/core/test/models/meta_tag_test.rb +7 -0
- data/installer/core/test/models/role_test.rb +7 -0
- data/installer/core/test/models/scaffold_test.rb +7 -0
- data/installer/core/test/models/script_test.rb +7 -0
- data/installer/core/test/models/setting_test.rb +7 -0
- data/installer/core/test/models/smtp_setting_test.rb +7 -0
- data/installer/core/test/models/social_account_test.rb +7 -0
- data/installer/core/test/models/user_test.rb +7 -0
- data/installer/core/test/test_helper.rb +16 -0
- data/installer/core/vendor/assets/javascripts/bounce.min.js +5 -0
- data/installer/db_conf/conf.yml +50 -0
- data/installer/lib/conf.rb +31 -0
- data/installer/lib/scaffold.rb +10 -0
- data/installer/run.sh +19 -0
- data/installer/scripts/bin.sh +61 -0
- data/lib/keppler.rb +7 -0
- data/lib/keppler/cli.rb +12 -0
- data/lib/keppler/cli/generate.rb +19 -0
- data/lib/keppler/version.rb +3 -0
- metadata +497 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
$(document).ready(function() {
|
2
|
+
$('#xs').click(function() {
|
3
|
+
$('#box-body').animate({ 'width': '35%' }, 300)
|
4
|
+
})
|
5
|
+
|
6
|
+
$('#md').click(function() {
|
7
|
+
$('#box-body').animate({ 'width': '70%' }, 300)
|
8
|
+
})
|
9
|
+
|
10
|
+
$('#lg').click(function() {
|
11
|
+
$('#box-body').animate({ 'width': '100%' }, 300)
|
12
|
+
})
|
13
|
+
|
14
|
+
$('#reload').click(function() {
|
15
|
+
$('iframe').attr('src', "/")
|
16
|
+
})
|
17
|
+
|
18
|
+
$('.icon-trash').click(function() {
|
19
|
+
$('#spinner').css('display', 'block')
|
20
|
+
})
|
21
|
+
});
|
@@ -0,0 +1,20 @@
|
|
1
|
+
$(function ($) {
|
2
|
+
var $body = $('body'),
|
3
|
+
$slice = $('#sidebar-footer .brand')
|
4
|
+
|
5
|
+
// On click, capture state and save it in localStorage
|
6
|
+
$($.AdminLTE.options.sidebarToggleSelector).click(function () {
|
7
|
+
localStorage.setItem('sidebar', $body.hasClass('sidebar-collapse') ? 1 : 0);
|
8
|
+
});
|
9
|
+
|
10
|
+
// On ready, read the set state and collapse if needed
|
11
|
+
if (localStorage.getItem('sidebar') === '0') {
|
12
|
+
$body.addClass('disable-animations sidebar-collapse');
|
13
|
+
$slice.toggleClass('hidden')
|
14
|
+
requestAnimationFrame(function () {
|
15
|
+
$body.removeClass('disable-animations');
|
16
|
+
});
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
});
|
@@ -0,0 +1,129 @@
|
|
1
|
+
Keppler = $('#keppler .front-logo')
|
2
|
+
Social = $('#keppler .front-social')
|
3
|
+
Slice = $('#keppler .front-footer')
|
4
|
+
Mouse = $('#keppler .mouse-scroll')
|
5
|
+
function scrollFunction(){
|
6
|
+
scroll = $(window).scrollTop()
|
7
|
+
if (scroll <= 559) {
|
8
|
+
$('.front').css({
|
9
|
+
position: 'relative',
|
10
|
+
top: 0,
|
11
|
+
height: '616px'
|
12
|
+
})
|
13
|
+
// Keppler.css({
|
14
|
+
// transform: 'translate(0%, -186.96px) scale(0.3328)'
|
15
|
+
// })
|
16
|
+
Social.css({
|
17
|
+
display: 'inline',
|
18
|
+
opacity: 1
|
19
|
+
})
|
20
|
+
Slice.css({
|
21
|
+
display: 'inline',
|
22
|
+
opacity: 1
|
23
|
+
})
|
24
|
+
Mouse.css({
|
25
|
+
display: 'block',
|
26
|
+
opacity: 1
|
27
|
+
})
|
28
|
+
// $('#documentation').css({
|
29
|
+
// 'margin-top': '100vh'
|
30
|
+
// })
|
31
|
+
if (scroll <= 10) {
|
32
|
+
Keppler.css({
|
33
|
+
transform: 'scale(1)'
|
34
|
+
})
|
35
|
+
Social.css('opacity', '1')
|
36
|
+
Slice.css({
|
37
|
+
opacity: 1,
|
38
|
+
transform: 'scale(1)'
|
39
|
+
})
|
40
|
+
}
|
41
|
+
if (scroll > 10 && scroll <= 60) {
|
42
|
+
Keppler.css({
|
43
|
+
transform: 'scale('+(1-('0.'+scroll)*0.1)+')'
|
44
|
+
})
|
45
|
+
Social.css('opacity', 1-('0.'+scroll))
|
46
|
+
Mouse.css('opacity', 1-('0.'+scroll))
|
47
|
+
Slice.css({
|
48
|
+
opacity: 1-('0.'+scroll),
|
49
|
+
transform: 'scale('+(1-('0.'+scroll))+')'
|
50
|
+
})
|
51
|
+
}
|
52
|
+
if (scroll > 60 && scroll <= 99) {
|
53
|
+
Keppler.css({
|
54
|
+
transform: 'scale('+(1-('0.'+scroll)*0.1)+')'
|
55
|
+
})
|
56
|
+
Social.css('opacity', 1-('0.'+scroll))
|
57
|
+
Mouse.css('opacity', 1-('0.'+scroll))
|
58
|
+
Slice.css({
|
59
|
+
opacity: 1-('0.'+scroll),
|
60
|
+
transform: 'scale('+(1-('0.'+scroll))+')'
|
61
|
+
})
|
62
|
+
}
|
63
|
+
if (scroll > 99 && scroll <= 559) {
|
64
|
+
Keppler.css({
|
65
|
+
transform: 'translate(0%, -'+(scroll-(100))*0.41+'px) scale('+(1-('0.'+scroll)*1.2)+')'
|
66
|
+
})
|
67
|
+
Social.css({
|
68
|
+
display: 'none',
|
69
|
+
opacity: 0
|
70
|
+
})
|
71
|
+
Mouse.css({
|
72
|
+
display: 'none',
|
73
|
+
opacity: 0
|
74
|
+
})
|
75
|
+
Slice.css({
|
76
|
+
display: 'none',
|
77
|
+
opacity: 0
|
78
|
+
})
|
79
|
+
}
|
80
|
+
$('#documentation').css({
|
81
|
+
'margin-top': '0',
|
82
|
+
position: 'relative'
|
83
|
+
})
|
84
|
+
}
|
85
|
+
else {
|
86
|
+
$('.front').css({
|
87
|
+
position: 'fixed',
|
88
|
+
width: '100%',
|
89
|
+
top: '-554.4px'
|
90
|
+
})
|
91
|
+
Keppler.css({
|
92
|
+
transform: 'translate(0%, -186.96px) scale(0.3328)'
|
93
|
+
})
|
94
|
+
Social.css({
|
95
|
+
display: 'none',
|
96
|
+
opacity: 0
|
97
|
+
})
|
98
|
+
Mouse.css({
|
99
|
+
display: 'none',
|
100
|
+
opacity: 0
|
101
|
+
})
|
102
|
+
Slice.css({
|
103
|
+
display: 'none',
|
104
|
+
opacity: 0
|
105
|
+
})
|
106
|
+
$('#documentation').css({
|
107
|
+
'margin-top': '616px'
|
108
|
+
})
|
109
|
+
}
|
110
|
+
// console.log(scroll)
|
111
|
+
}
|
112
|
+
$(document).ready(function() {
|
113
|
+
$('pre code').each(function(i, block) {
|
114
|
+
// hljs.highlightBlock(block);
|
115
|
+
});
|
116
|
+
scrollFunction()
|
117
|
+
Mouse = $('.mouse-scroll')
|
118
|
+
Mouse.click(function(){
|
119
|
+
for(i=0;i<616;i++) {
|
120
|
+
setTimeout(function(){
|
121
|
+
$('html').scrollTop(i);
|
122
|
+
}, 200)
|
123
|
+
}
|
124
|
+
})
|
125
|
+
});
|
126
|
+
|
127
|
+
$( window ).scroll(function() {
|
128
|
+
scrollFunction()
|
129
|
+
})
|
@@ -0,0 +1,130 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.editorConfig = function( config )
|
7
|
+
{
|
8
|
+
// Define changes to default configuration here. For example:
|
9
|
+
// config.language = 'fr';
|
10
|
+
// config.uiColor = '#AADC6E';
|
11
|
+
|
12
|
+
/* Filebrowser routes */
|
13
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed.
|
14
|
+
config.filebrowserBrowseUrl = "/ckeditor/attachment_files";
|
15
|
+
|
16
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Flash dialog.
|
17
|
+
config.filebrowserFlashBrowseUrl = "/ckeditor/attachment_files";
|
18
|
+
|
19
|
+
// The location of a script that handles file uploads in the Flash dialog.
|
20
|
+
config.filebrowserFlashUploadUrl = "/ckeditor/attachment_files";
|
21
|
+
|
22
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Link tab of Image dialog.
|
23
|
+
config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures";
|
24
|
+
|
25
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Image dialog.
|
26
|
+
config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
|
27
|
+
|
28
|
+
// The location of a script that handles file uploads in the Image dialog.
|
29
|
+
config.filebrowserImageUploadUrl = "/ckeditor/pictures";
|
30
|
+
|
31
|
+
// The location of a script that handles file uploads.
|
32
|
+
config.filebrowserUploadUrl = "/ckeditor/attachment_files";
|
33
|
+
|
34
|
+
config.allowedContent = true;
|
35
|
+
|
36
|
+
// Rails CSRF token
|
37
|
+
config.filebrowserParams = function(){
|
38
|
+
var csrf_token, csrf_param, meta,
|
39
|
+
metas = document.getElementsByTagName('meta'),
|
40
|
+
params = new Object();
|
41
|
+
|
42
|
+
for ( var i = 0 ; i < metas.length ; i++ ){
|
43
|
+
meta = metas[i];
|
44
|
+
|
45
|
+
switch(meta.name) {
|
46
|
+
case "csrf-token":
|
47
|
+
csrf_token = meta.content;
|
48
|
+
break;
|
49
|
+
case "csrf-param":
|
50
|
+
csrf_param = meta.content;
|
51
|
+
break;
|
52
|
+
default:
|
53
|
+
continue;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
if (csrf_param !== undefined && csrf_token !== undefined) {
|
58
|
+
params[csrf_param] = csrf_token;
|
59
|
+
}
|
60
|
+
|
61
|
+
return params;
|
62
|
+
};
|
63
|
+
|
64
|
+
config.addQueryString = function( url, params ){
|
65
|
+
var queryString = [];
|
66
|
+
|
67
|
+
if ( !params ) {
|
68
|
+
return url;
|
69
|
+
} else {
|
70
|
+
for ( var i in params )
|
71
|
+
queryString.push( i + "=" + encodeURIComponent( params[ i ] ) );
|
72
|
+
}
|
73
|
+
|
74
|
+
return url + ( ( url.indexOf( "?" ) != -1 ) ? "&" : "?" ) + queryString.join( "&" );
|
75
|
+
};
|
76
|
+
|
77
|
+
// Integrate Rails CSRF token into file upload dialogs (link, image, attachment and flash)
|
78
|
+
CKEDITOR.on( 'dialogDefinition', function( ev ){
|
79
|
+
// Take the dialog name and its definition from the event data.
|
80
|
+
var dialogName = ev.data.name;
|
81
|
+
var dialogDefinition = ev.data.definition;
|
82
|
+
var content, upload;
|
83
|
+
|
84
|
+
if (CKEDITOR.tools.indexOf(['link', 'image', 'attachment', 'flash'], dialogName) > -1) {
|
85
|
+
content = (dialogDefinition.getContents('Upload') || dialogDefinition.getContents('upload'));
|
86
|
+
upload = (content == null ? null : content.get('upload'));
|
87
|
+
|
88
|
+
if (upload && upload.filebrowser && upload.filebrowser['params'] === undefined) {
|
89
|
+
upload.filebrowser['params'] = config.filebrowserParams();
|
90
|
+
upload.action = config.addQueryString(upload.action, upload.filebrowser['params']);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
});
|
94
|
+
|
95
|
+
// Toolbar groups configuration.
|
96
|
+
config.toolbar = [
|
97
|
+
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source'] },
|
98
|
+
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
|
99
|
+
// { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
|
100
|
+
// { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
|
101
|
+
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
|
102
|
+
{ name: 'insert', items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'SpecialChar' ] },
|
103
|
+
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
|
104
|
+
'/',
|
105
|
+
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
|
106
|
+
{ name: 'colors', items: [ 'TextColor', 'BGColor', "Maximize" ] },
|
107
|
+
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] }
|
108
|
+
];
|
109
|
+
|
110
|
+
config.toolbar_mini = [
|
111
|
+
{ name: 'document', items: [ 'Source', '-', 'Preview' ]},
|
112
|
+
{ name: 'clipboard', groups: [ 'undo' ], items: [ 'Undo', 'Redo' ] },
|
113
|
+
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
|
114
|
+
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
|
115
|
+
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike' ] },
|
116
|
+
{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', "Maximize" ] },
|
117
|
+
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] }
|
118
|
+
];
|
119
|
+
|
120
|
+
config.toolbar_short = [
|
121
|
+
{ name: 'document', items: [ 'Source', '-', 'Preview' ]},
|
122
|
+
{ name: 'clipboard', groups: [ 'undo' ], items: [ 'Undo', 'Redo' ] },
|
123
|
+
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
|
124
|
+
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
|
125
|
+
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike' ] },
|
126
|
+
{ name: 'insert', items: [ 'HorizontalRule', "Maximize" ] },
|
127
|
+
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] }
|
128
|
+
];
|
129
|
+
|
130
|
+
};
|
@@ -0,0 +1,196 @@
|
|
1
|
+
! function(t) {
|
2
|
+
function e(r) {
|
3
|
+
if (i[r]) return i[r].exports;
|
4
|
+
var s = i[r] = {
|
5
|
+
exports: {},
|
6
|
+
id: r,
|
7
|
+
loaded: !1
|
8
|
+
};
|
9
|
+
return t[r].call(s.exports, s, s.exports, e), s.loaded = !0, s.exports
|
10
|
+
}
|
11
|
+
var i = {};
|
12
|
+
return e.m = t, e.c = i, e.p = "", e(0)
|
13
|
+
}([function(t, e, i) {
|
14
|
+
"use strict";
|
15
|
+
|
16
|
+
function r(t) {
|
17
|
+
return t && t.__esModule ? t : {
|
18
|
+
"default": t
|
19
|
+
}
|
20
|
+
}
|
21
|
+
var s = i(1),
|
22
|
+
n = r(s);
|
23
|
+
gapi.analytics.ready(function() {
|
24
|
+
function t(t, e, i) {
|
25
|
+
t.innerHTML = e.map(function(t) {
|
26
|
+
var e = t.id == i ? "selected " : " ";
|
27
|
+
return "<option " + e + 'value="' + t.id + '">' + t.name + "</option>"
|
28
|
+
}).join("")
|
29
|
+
}
|
30
|
+
|
31
|
+
function e(t) {
|
32
|
+
return t.ids || t.viewId ? {
|
33
|
+
prop: "viewId",
|
34
|
+
value: t.viewId || t.ids && t.ids.replace(/^ga:/, "")
|
35
|
+
} : t.propertyId ? {
|
36
|
+
prop: "propertyId",
|
37
|
+
value: t.propertyId
|
38
|
+
} : t.accountId ? {
|
39
|
+
prop: "accountId",
|
40
|
+
value: t.accountId
|
41
|
+
} : void 0
|
42
|
+
}
|
43
|
+
gapi.analytics.createComponent("ViewSelector2", {
|
44
|
+
execute: function() {
|
45
|
+
return this.setup_(function() {
|
46
|
+
this.updateAccounts_(), this.changed_ && (this.render_(), this.onChange_())
|
47
|
+
}.bind(this)), this
|
48
|
+
},
|
49
|
+
set: function(t) {
|
50
|
+
if (!!t.ids + !!t.viewId + !!t.propertyId + !!t.accountId > 1) throw new Error('You cannot specify more than one of the following options: "ids", "viewId", "accountId", "propertyId"');
|
51
|
+
if (t.container && this.container) throw new Error("You cannot change containers once a view selector has been rendered on the page.");
|
52
|
+
var e = this.get();
|
53
|
+
return (e.ids != t.ids || e.viewId != t.viewId || e.propertyId != t.propertyId || e.accountId != t.accountId) && (e.ids = null, e.viewId = null, e.propertyId = null, e.accountId = null), gapi.analytics.Component.prototype.set.call(this, t)
|
54
|
+
},
|
55
|
+
setup_: function(t) {
|
56
|
+
function e() {
|
57
|
+
n["default"].get().then(function(e) {
|
58
|
+
i.summaries = e, i.accounts = i.summaries.all(), t()
|
59
|
+
}, function(t) {
|
60
|
+
i.emit("error", t)
|
61
|
+
})
|
62
|
+
}
|
63
|
+
var i = this;
|
64
|
+
gapi.analytics.auth.isAuthorized() ? e() : gapi.analytics.auth.on("success", e)
|
65
|
+
},
|
66
|
+
updateAccounts_: function() {
|
67
|
+
var t, i, r, s = this.get(),
|
68
|
+
n = e(s);
|
69
|
+
if (n) switch (n.prop) {
|
70
|
+
case "viewId":
|
71
|
+
t = this.summaries.getProfile(n.value), i = this.summaries.getAccountByProfileId(n.value), r = this.summaries.getWebPropertyByProfileId(n.value);
|
72
|
+
break;
|
73
|
+
case "propertyId":
|
74
|
+
r = this.summaries.getWebProperty(n.value), i = this.summaries.getAccountByWebPropertyId(n.value), t = r && r.views && r.views[0];
|
75
|
+
break;
|
76
|
+
case "accountId":
|
77
|
+
i = this.summaries.getAccount(n.value), r = i && i.properties && i.properties[0], t = r && r.views && r.views[0]
|
78
|
+
} else i = this.accounts[0], r = i && i.properties && i.properties[0], t = r && r.views && r.views[0];
|
79
|
+
i || r || t ? (i != this.account || r != this.property || t != this.view) && (this.changed_ = {
|
80
|
+
account: i && i != this.account,
|
81
|
+
property: r && r != this.property,
|
82
|
+
view: t && t != this.view
|
83
|
+
}, this.account = i, this.properties = i.properties, this.property = r, this.views = r && r.views, this.view = t, this.ids = t && "ga:" + t.id) : this.emit("error", new Error("You do not have access to " + n.prop.slice(0, -2) + " : " + n.value))
|
84
|
+
},
|
85
|
+
render_: function() {
|
86
|
+
var e = this.get();
|
87
|
+
this.container = "string" == typeof e.container ? document.getElementById(e.container) : e.container, this.container.innerHTML = e.template || this.template;
|
88
|
+
var i = this.container.querySelectorAll("select"),
|
89
|
+
r = this.accounts,
|
90
|
+
s = this.properties || [{
|
91
|
+
name: "(Empty)",
|
92
|
+
id: ""
|
93
|
+
}],
|
94
|
+
n = this.views || [{
|
95
|
+
name: "(Empty)",
|
96
|
+
id: ""
|
97
|
+
}];
|
98
|
+
t(i[0], r, this.account.id), t(i[1], s, this.property && this.property.id), t(i[2], n, this.view && this.view.id), i[0].onchange = this.onUserSelect_.bind(this, i[0], "accountId"), i[1].onchange = this.onUserSelect_.bind(this, i[1], "propertyId"), i[2].onchange = this.onUserSelect_.bind(this, i[2], "viewId")
|
99
|
+
},
|
100
|
+
onChange_: function() {
|
101
|
+
var t = {
|
102
|
+
account: this.account,
|
103
|
+
property: this.property,
|
104
|
+
view: this.view,
|
105
|
+
ids: this.view && "ga:" + this.view.id
|
106
|
+
};
|
107
|
+
this.changed_ && (this.changed_.account && this.emit("accountChange", t), this.changed_.property && this.emit("propertyChange", t), this.changed_.view && (this.emit("viewChange", t), this.emit("idsChange", t), this.emit("change", t.ids))), this.changed_ = null
|
108
|
+
},
|
109
|
+
onUserSelect_: function(t, e) {
|
110
|
+
var i = {};
|
111
|
+
i[e] = t.value, this.set(i), this.execute()
|
112
|
+
},
|
113
|
+
template: '<div class="ViewSelector2 row"> <div class="ViewSelector2-item col s4" style="display:none;"> <label>Cuenta</label> <select class="form-control"></select> </div> <div class="ViewSelector2-item col-lg-6"> <label>Propiedad</label> <select class="form-control"></select> </div> <div class="ViewSelector2-item col-lg-6"> <label>Vista</label> <select class="form-control"></select> </div></div>'
|
114
|
+
})
|
115
|
+
})
|
116
|
+
}, function(t, e, i) {
|
117
|
+
function r() {
|
118
|
+
var t = gapi.client.request({
|
119
|
+
path: o
|
120
|
+
}).then(function(t) {
|
121
|
+
return t
|
122
|
+
});
|
123
|
+
return new t.constructor(function(e, i) {
|
124
|
+
var r = [];
|
125
|
+
t.then(function s(t) {
|
126
|
+
var a = t.result;
|
127
|
+
a.items ? r = r.concat(a.items) : i(new Error("You do not have any Google Analytics accounts. Go to http://google.com/analytics to sign up.")), a.startIndex + a.itemsPerPage <= a.totalResults ? gapi.client.request({
|
128
|
+
path: o,
|
129
|
+
params: {
|
130
|
+
"start-index": a.startIndex + a.itemsPerPage
|
131
|
+
}
|
132
|
+
}).then(s) : e(new n(r))
|
133
|
+
}).then(null, i)
|
134
|
+
})
|
135
|
+
}
|
136
|
+
var s, n = i(2),
|
137
|
+
o = "/analytics/v3/management/accountSummaries";
|
138
|
+
t.exports = {
|
139
|
+
get: function(t) {
|
140
|
+
return t && (s = null), s || (s = r())
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}, function(t, e, i) {
|
144
|
+
function r(t) {
|
145
|
+
this.accounts_ = t, this.webProperties_ = [], this.profiles_ = [], this.accountsById_ = {}, this.webPropertiesById_ = this.propertiesById_ = {}, this.profilesById_ = this.viewsById_ = {};
|
146
|
+
for (var e, i = 0; e = this.accounts_[i]; i++)
|
147
|
+
if (this.accountsById_[e.id] = {
|
148
|
+
self: e
|
149
|
+
}, e.webProperties) {
|
150
|
+
s(e, "webProperties", "properties");
|
151
|
+
for (var r, n = 0; r = e.webProperties[n]; n++)
|
152
|
+
if (this.webProperties_.push(r), this.webPropertiesById_[r.id] = {
|
153
|
+
self: r,
|
154
|
+
parent: e
|
155
|
+
}, r.profiles) {
|
156
|
+
s(r, "profiles", "views");
|
157
|
+
for (var o, a = 0; o = r.profiles[a]; a++) this.profiles_.push(o), this.profilesById_[o.id] = {
|
158
|
+
self: o,
|
159
|
+
parent: r,
|
160
|
+
grandParent: e
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
function s(t, e, i) {
|
167
|
+
Object.defineProperty ? Object.defineProperty(t, i, {
|
168
|
+
get: function() {
|
169
|
+
return t[e]
|
170
|
+
}
|
171
|
+
}) : t[i] = t[e]
|
172
|
+
}
|
173
|
+
r.prototype.all = function() {
|
174
|
+
return this.accounts_
|
175
|
+
}, s(r.prototype, "all", "allAccounts"), r.prototype.allWebProperties = function() {
|
176
|
+
return this.webProperties_
|
177
|
+
}, s(r.prototype, "allWebProperties", "allProperties"), r.prototype.allProfiles = function() {
|
178
|
+
return this.profiles_
|
179
|
+
}, s(r.prototype, "allProfiles", "allViews"), r.prototype.get = function(t) {
|
180
|
+
if (!!t.accountId + !!t.webPropertyId + !!t.propertyId + !!t.profileId + !!t.viewId > 1) throw new Error('get() only accepts an object with a single property: either "accountId", "webPropertyId", "propertyId", "profileId" or "viewId"');
|
181
|
+
return this.getProfile(t.profileId || t.viewId) || this.getWebProperty(t.webPropertyId || t.propertyId) || this.getAccount(t.accountId)
|
182
|
+
}, r.prototype.getAccount = function(t) {
|
183
|
+
return this.accountsById_[t] && this.accountsById_[t].self
|
184
|
+
}, r.prototype.getWebProperty = function(t) {
|
185
|
+
return this.webPropertiesById_[t] && this.webPropertiesById_[t].self
|
186
|
+
}, s(r.prototype, "getWebProperty", "getProperty"), r.prototype.getProfile = function(t) {
|
187
|
+
return this.profilesById_[t] && this.profilesById_[t].self
|
188
|
+
}, s(r.prototype, "getProfile", "getView"), r.prototype.getAccountByProfileId = function(t) {
|
189
|
+
return this.profilesById_[t] && this.profilesById_[t].grandParent
|
190
|
+
}, s(r.prototype, "getAccountByProfileId", "getAccountByViewId"), r.prototype.getWebPropertyByProfileId = function(t) {
|
191
|
+
return this.profilesById_[t] && this.profilesById_[t].parent
|
192
|
+
}, s(r.prototype, "getWebPropertyByProfileId", "getPropertyByViewId"), r.prototype.getAccountByWebPropertyId = function(t) {
|
193
|
+
return this.webPropertiesById_[t] && this.webPropertiesById_[t].parent
|
194
|
+
}, s(r.prototype, "getAccountByWebPropertyId", "getAccountByPropertyId"), t.exports = r
|
195
|
+
}]);
|
196
|
+
//# sourceMappingURL=view-selector2.js.map
|