guara 0.0.1.rc
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.
- data/.gitignore +23 -0
- data/.rspec +2 -0
- data/.travis.yml +33 -0
- data/Gemfile +82 -0
- data/Gemfile.lock +323 -0
- data/Guardfile +32 -0
- data/MIT-LICENSE +20 -0
- data/README.md +8 -0
- data/Rakefile +7 -0
- data/app/admin/business_activities.rb +3 -0
- data/app/admin/business_departments.rb +3 -0
- data/app/admin/business_segments.rb +13 -0
- data/app/admin/cities.rb +3 -0
- data/app/admin/company_businesses.rb +3 -0
- data/app/admin/dashboard.rb +39 -0
- data/app/admin/districts.rb +3 -0
- data/app/admin/states.rb +3 -0
- data/app/admin/task_types.rb +3 -0
- data/app/admin/user_groups.rb +3 -0
- data/app/admin/users.rb +3 -0
- data/app/assets/images/close.gif +0 -0
- data/app/assets/images/custom/logo.png +0 -0
- data/app/assets/images/custom/nav_logo.png +0 -0
- data/app/assets/images/custom/nav_logo.psd +0 -0
- data/app/assets/images/rails.png +0 -0
- data/app/assets/javascripts/active_admin.js +5 -0
- data/app/assets/javascripts/application.js +97 -0
- data/app/assets/javascripts/business_departments.js.coffee +3 -0
- data/app/assets/javascripts/company_businesses.js.coffee +3 -0
- data/app/assets/javascripts/crm.js.coffee +14 -0
- data/app/assets/javascripts/fcbk.js +556 -0
- data/app/assets/javascripts/jquery-ui-timepicker-addon.js +1326 -0
- data/app/assets/javascripts/jquery.mask.1.3.js +7 -0
- data/app/assets/javascripts/jquery.multiselect.filter.xjs +173 -0
- data/app/assets/javascripts/jquery.multiselect.xjs +668 -0
- data/app/assets/javascripts/system_task_status.js.coffee +3 -0
- data/app/assets/javascripts/tests/ajaxes.js.coffee +3 -0
- data/app/assets/stylesheets/abilities.css.scss +6 -0
- data/app/assets/stylesheets/active_admin.css.scss +65 -0
- data/app/assets/stylesheets/application.css +19 -0
- data/app/assets/stylesheets/business_departments.css.scss +3 -0
- data/app/assets/stylesheets/company_businesses.css.scss +3 -0
- data/app/assets/stylesheets/custom.css.scss +322 -0
- data/app/assets/stylesheets/customer.scss +7 -0
- data/app/assets/stylesheets/fcbk.css +165 -0
- data/app/assets/stylesheets/guara.css.scss +159 -0
- data/app/assets/stylesheets/jquery-ui.css +567 -0
- data/app/assets/stylesheets/jquery_bootstrap.css.scss +92 -0
- data/app/assets/stylesheets/jquery_multiselect_filter.xcss +3 -0
- data/app/assets/stylesheets/scaffolds.css.scss +42 -0
- data/app/assets/stylesheets/users.css.scss +10 -0
- data/app/controllers/abilities_controller.rb +37 -0
- data/app/controllers/application_controller.rb +12 -0
- data/app/controllers/business_activities_controller.rb +87 -0
- data/app/controllers/business_departments_controller.rb +90 -0
- data/app/controllers/business_segments_controller.rb +88 -0
- data/app/controllers/company_businesses_controller.rb +46 -0
- data/app/controllers/contacts_controller.rb +105 -0
- data/app/controllers/customers_controller.rb +117 -0
- data/app/controllers/microposts_controller.rb +31 -0
- data/app/controllers/sessions_controller.rb +32 -0
- data/app/controllers/static_pages_controller.rb +23 -0
- data/app/controllers/system_task_status_controller.rb +84 -0
- data/app/controllers/task_feedbacks_controller.rb +6 -0
- data/app/controllers/task_types_controller.rb +85 -0
- data/app/controllers/tasks_controller.rb +107 -0
- data/app/controllers/tests/ajaxes_controller.rb +115 -0
- data/app/controllers/tests/lab_ajax_controller.rb +27 -0
- data/app/controllers/users_controller.rb +62 -0
- data/app/helpers/ability_helper.rb +15 -0
- data/app/helpers/application_helper.rb +32 -0
- data/app/helpers/business_activities_helper.rb +2 -0
- data/app/helpers/business_departments_helper.rb +2 -0
- data/app/helpers/business_segments_helper.rb +2 -0
- data/app/helpers/company_businesses_helper.rb +2 -0
- data/app/helpers/contacts_helper.rb +2 -0
- data/app/helpers/customers_helper.rb +23 -0
- data/app/helpers/email_helper.rb +8 -0
- data/app/helpers/form_ajax_helper.rb +8 -0
- data/app/helpers/guara_views_helper.rb +38 -0
- data/app/helpers/locale_helper.rb +24 -0
- data/app/helpers/menu_helper.rb +55 -0
- data/app/helpers/sessions_helper.rb +56 -0
- data/app/helpers/tasks_helper.rb +20 -0
- data/app/helpers/tests/ajaxes_helper.rb +2 -0
- data/app/helpers/user_abilities_helper.rb +12 -0
- data/app/helpers/users_helper.rb +29 -0
- data/app/mailers/.gitkeep +0 -0
- data/app/models/.gitkeep +0 -0
- data/app/models/ability.rb +52 -0
- data/app/models/address.rb +7 -0
- data/app/models/business_activity.rb +5 -0
- data/app/models/business_department.rb +3 -0
- data/app/models/business_segment.rb +5 -0
- data/app/models/city.rb +7 -0
- data/app/models/company_business.rb +6 -0
- data/app/models/contact.rb +69 -0
- data/app/models/customer.rb +117 -0
- data/app/models/customer_activity.rb +9 -0
- data/app/models/customer_financial.rb +10 -0
- data/app/models/customer_has_customers.rb +7 -0
- data/app/models/customer_pf.rb +13 -0
- data/app/models/customer_pj.rb +71 -0
- data/app/models/customer_pj_has_customers_pj.rb +7 -0
- data/app/models/customer_product.rb +3 -0
- data/app/models/customer_segment.rb +9 -0
- data/app/models/district.rb +6 -0
- data/app/models/email.rb +7 -0
- data/app/models/micropost.rb +10 -0
- data/app/models/relationship.rb +9 -0
- data/app/models/search.rb +17 -0
- data/app/models/state.rb +3 -0
- data/app/models/system_ability.rb +16 -0
- data/app/models/system_module.rb +16 -0
- data/app/models/system_task_resolution.rb +26 -0
- data/app/models/system_task_status.rb +19 -0
- data/app/models/task.rb +76 -0
- data/app/models/task_feedback.rb +11 -0
- data/app/models/task_type.rb +12 -0
- data/app/models/tests.rb +5 -0
- data/app/models/tests/ajax.rb +3 -0
- data/app/models/user.rb +126 -0
- data/app/models/user_ability.rb +23 -0
- data/app/models/user_group.rb +9 -0
- data/app/models/user_type.rb +9 -0
- data/app/models/users_has_groups.rb +9 -0
- data/app/validators/customer_cnpj_validator.rb +14 -0
- data/app/validators/email_validator.rb +21 -0
- data/app/views/abilities/index.html.erb +25 -0
- data/app/views/active_extend/_one_to_many_inputs.html.erb +7 -0
- data/app/views/active_extend/_one_to_many_inputs_fields.html.erb +10 -0
- data/app/views/active_extend/_one_to_many_inputs_with_glyph.html.erb +21 -0
- data/app/views/business_activities/_business_activity.html.erb +0 -0
- data/app/views/business_activities/_form.html.erb +25 -0
- data/app/views/business_activities/edit.html.erb +6 -0
- data/app/views/business_activities/index.html.erb +33 -0
- data/app/views/business_activities/new.html.erb +5 -0
- data/app/views/business_activities/show.html.erb +15 -0
- data/app/views/business_departments/_form.html.erb +10 -0
- data/app/views/business_departments/edit.html.erb +6 -0
- data/app/views/business_departments/index.html.erb +33 -0
- data/app/views/business_departments/new.html.erb +5 -0
- data/app/views/business_departments/show.html.erb +15 -0
- data/app/views/business_segments/_business_segment.html.erb +8 -0
- data/app/views/business_segments/_form.html.erb +25 -0
- data/app/views/business_segments/edit.html.erb +6 -0
- data/app/views/business_segments/index.html.erb +33 -0
- data/app/views/business_segments/new.html.erb +5 -0
- data/app/views/business_segments/show.html.erb +15 -0
- data/app/views/company_businesses/_form.html.erb +10 -0
- data/app/views/company_businesses/edit.html.erb +6 -0
- data/app/views/company_businesses/index.html.erb +25 -0
- data/app/views/company_businesses/new.html.erb +5 -0
- data/app/views/company_businesses/show.html.erb +15 -0
- data/app/views/contacts/_form.html.erb +53 -0
- data/app/views/contacts/_header.html.erb +3 -0
- data/app/views/contacts/_list.html.erb +46 -0
- data/app/views/contacts/_side_panel.html.erb +61 -0
- data/app/views/contacts/edit.html.erb +6 -0
- data/app/views/contacts/index.html.erb +72 -0
- data/app/views/contacts/new.html.erb +5 -0
- data/app/views/contacts/show.html.erb +52 -0
- data/app/views/customers/_businesses_done.html.erb +18 -0
- data/app/views/customers/_customer_segment.html.erb +9 -0
- data/app/views/customers/_form.html.erb +177 -0
- data/app/views/customers/_form_search.html.erb +119 -0
- data/app/views/customers/_modules.html.erb +6 -0
- data/app/views/customers/_navbar.html.erb +23 -0
- data/app/views/customers/_segment.html.erb +10 -0
- data/app/views/customers/edit.html.erb +8 -0
- data/app/views/customers/index.html.erb +46 -0
- data/app/views/customers/new.pj.html.erb +4 -0
- data/app/views/customers/show.pj.html.erb +200 -0
- data/app/views/devise/confirmations/new.html.erb +12 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +16 -0
- data/app/views/devise/passwords/new.html.erb +12 -0
- data/app/views/devise/registrations/edit.html.erb +25 -0
- data/app/views/devise/registrations/new.html.erb +18 -0
- data/app/views/devise/sessions/new.html.erb +24 -0
- data/app/views/devise/shared/_links.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +12 -0
- data/app/views/emails/_email_fields.html.erb +1 -0
- data/app/views/layouts/_active_admin_footer.html.erb +4 -0
- data/app/views/layouts/_active_admin_header.html.erb +5 -0
- data/app/views/layouts/_footer.html.erb +12 -0
- data/app/views/layouts/_header.html.erb +51 -0
- data/app/views/layouts/_shim.html.erb +3 -0
- data/app/views/layouts/active_admin.html.arb +1 -0
- data/app/views/layouts/application.html.erb +24 -0
- data/app/views/microposts/_micropost.html.erb +11 -0
- data/app/views/sessions/new.html.erb +18 -0
- data/app/views/shared/_calendar.html.erb +17 -0
- data/app/views/shared/_error_messages.html.erb +13 -0
- data/app/views/shared/_feed.html.erb +10 -0
- data/app/views/shared/_feed_item.html.erb +15 -0
- data/app/views/shared/_micropost_form.html.erb +7 -0
- data/app/views/shared/_multi_selection.html.erb +16 -0
- data/app/views/shared/_multi_selection.html_checkbox.erb +11 -0
- data/app/views/shared/_multi_selection_autocomple.html.erb +5 -0
- data/app/views/shared/_notifies.html.erb +17 -0
- data/app/views/shared/_user_info.html.erb +14 -0
- data/app/views/static_pages/about.html.erb +5 -0
- data/app/views/static_pages/contact.html.erb +5 -0
- data/app/views/static_pages/help.html.erb +5 -0
- data/app/views/static_pages/home.html.erb +37 -0
- data/app/views/static_pages/news.html.erb +2 -0
- data/app/views/system_task_status/_form.html.erb +9 -0
- data/app/views/system_task_status/edit.html.erb +6 -0
- data/app/views/system_task_status/index.html.erb +23 -0
- data/app/views/system_task_status/new.html.erb +5 -0
- data/app/views/system_task_status/show.html.erb +10 -0
- data/app/views/task_feedbacks/_list.html.erb +51 -0
- data/app/views/task_feedbacks/_side_form.html.erb +56 -0
- data/app/views/task_feedbacks/_side_panel.html.erb +64 -0
- data/app/views/task_types/_form.html.erb +10 -0
- data/app/views/task_types/edit.html.erb +6 -0
- data/app/views/task_types/index.html.erb +23 -0
- data/app/views/task_types/new.html.erb +5 -0
- data/app/views/task_types/show.html.erb +10 -0
- data/app/views/tasks/_form.html.erb +52 -0
- data/app/views/tasks/_header.html.erb +3 -0
- data/app/views/tasks/_list.html.erb +50 -0
- data/app/views/tasks/_side_panel.html.erb +64 -0
- data/app/views/tasks/create.js.erb +1 -0
- data/app/views/tasks/edit.html.erb +6 -0
- data/app/views/tasks/index.html.erb +61 -0
- data/app/views/tasks/new.html.erb +5 -0
- data/app/views/tasks/show.html.erb +46 -0
- data/app/views/tests/ajaxes/_form.html.erb +10 -0
- data/app/views/tests/ajaxes/_list.html.erb +6 -0
- data/app/views/tests/ajaxes/add_and_update.html.erb +22 -0
- data/app/views/tests/ajaxes/all.js.erb +2 -0
- data/app/views/tests/ajaxes/edit.html.erb +6 -0
- data/app/views/tests/ajaxes/index.html.erb +25 -0
- data/app/views/tests/ajaxes/new.html.erb +5 -0
- data/app/views/tests/ajaxes/show.html.erb +15 -0
- data/app/views/tests/js.js +51 -0
- data/app/views/tests/lab_ajax/multiselection.html.erb +84 -0
- data/app/views/users/_user.html.erb +8 -0
- data/app/views/users/edit.html.erb +27 -0
- data/app/views/users/index.html.erb +9 -0
- data/app/views/users/new.html.erb +24 -0
- data/app/views/users/show.html.erb +26 -0
- data/bundle +0 -0
- data/config.ru +4 -0
- data/config/application.rb +73 -0
- data/config/boot.rb +6 -0
- data/config/database.yml +38 -0
- data/config/environment.rb +31 -0
- data/config/environments/development.rb +42 -0
- data/config/environments/production.rb +68 -0
- data/config/environments/test.rb +39 -0
- data/config/guara/menus.rb +34 -0
- data/config/initializers/active_admin.rb +210 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/cmgb_rules.rb +2 -0
- data/config/initializers/devise.rb +216 -0
- data/config/initializers/formtastic.rb +77 -0
- data/config/initializers/inflections.rb +19 -0
- data/config/initializers/json_paches_utf8.rb +13 -0
- data/config/initializers/kaminari.rb +21 -0
- data/config/initializers/locale.rb +7 -0
- data/config/initializers/meta_search.rb +10 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/secret_token.rb +7 -0
- data/config/initializers/session_store.rb +8 -0
- data/config/initializers/string.rb +9 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/devise.en.yml +57 -0
- data/config/locales/devise.pt-BR.yml +62 -0
- data/config/locales/pt-BR.yml +404 -0
- data/config/routes.rb +129 -0
- data/db/migrate/20120610142404_create_users.rb +10 -0
- data/db/migrate/20120610183820_add_index_to_users_email.rb +5 -0
- data/db/migrate/20120610185217_add_password_digest_to_users.rb +5 -0
- data/db/migrate/20120612000411_add_remember_token_to_users.rb +6 -0
- data/db/migrate/20120616162515_add_admin_to_users.rb +5 -0
- data/db/migrate/20120616215835_create_microposts.rb +11 -0
- data/db/migrate/20120617224530_create_relationships.rb +14 -0
- data/db/migrate/20120621095918_create_customers.rb +36 -0
- data/db/migrate/20120621100528_create_customer_pfs.rb +14 -0
- data/db/migrate/20120621100534_create_customer_pjs.rb +13 -0
- data/db/migrate/20120621100557_create_emails.rb +13 -0
- data/db/migrate/20120621100618_create_tasks.rb +26 -0
- data/db/migrate/20120621100639_create_customer_products.rb +14 -0
- data/db/migrate/20120621100705_create_districts.rb +11 -0
- data/db/migrate/20120621100720_create_cities.rb +11 -0
- data/db/migrate/20120624192444_create_business_segments.rb +10 -0
- data/db/migrate/20120624224245_create_business_activities.rb +13 -0
- data/db/migrate/20120628092744_create_customer_activities.rb +9 -0
- data/db/migrate/20120628092754_create_customer_segments.rb +9 -0
- data/db/migrate/20120703102859_create_states.rb +10 -0
- data/db/migrate/20120705121011_create_contacts.rb +18 -0
- data/db/migrate/20120711233943_add_devise_to_users.rb +56 -0
- data/db/migrate/20120723102847_create_user_abilities.rb +10 -0
- data/db/migrate/20120723104500_create_system_modules.rb +9 -0
- data/db/migrate/20120723104639_create_system_abilities.rb +9 -0
- data/db/migrate/20120728181903_create_user_groups.rb +10 -0
- data/db/migrate/20120729112600_create_users_has_groups.rb +14 -0
- data/db/migrate/20120729121922_add_groups_to_users.rb +6 -0
- data/db/migrate/20120910002835_create_system_task_status.rb +7 -0
- data/db/migrate/20120910010153_create_system_task_resolutions.rb +7 -0
- data/db/migrate/20120911021535_create_task_types.rb +10 -0
- data/db/migrate/20120911070836_create_task_feedbacks.rb +14 -0
- data/db/migrate/20120924022719_create_tests_ajaxes.rb +10 -0
- data/db/migrate/20121007131035_create_business_departments.rb +10 -0
- data/db/migrate/20121013120849_add_notes_and_other_contacts_to_customer.rb +5 -0
- data/db/migrate/20121014201255_create_company_businesses.rb +10 -0
- data/db/migrate/20121014202449_add_company_business_to_task_type.rb +6 -0
- data/db/migrate/20121014212430_add_primary_company_business_to_user.rb +5 -0
- data/db/migrate/20121015101844_add_parent_id_to_system_task_resolution.rb +5 -0
- data/db/migrate/20121026231241_create_customer_has_customers.rb +10 -0
- data/db/migrate/20121026232755_create_customer_pj_has_customers_pjs.rb +10 -0
- data/db/migrate/20121029094047_create_admin_notes.rb +17 -0
- data/db/migrate/20121029094048_move_admin_notes_to_comments.rb +25 -0
- data/db/migrate/20121103183646_add_enabled_to_cities.rb +5 -0
- data/db/migrate/20121104135014_create_customer_financials.rb +17 -0
- data/db/migrate/20121104141751_create_addresses.rb +19 -0
- data/db/migrate/20121205150619_add_type_id_to_users.rb +5 -0
- data/db/schema.rb~ +378 -0
- data/db/seeds.rb +99 -0
- data/gemfiles/Gemfile.rails.3.2.x +82 -0
- data/guara.gemspec +31 -0
- data/lib/active_extend/README.md +19 -0
- data/lib/active_extend/active_disablable.rb +59 -0
- data/lib/active_extend/string_helper.rb +9 -0
- data/lib/active_migration.rb +4 -0
- data/lib/active_migration/converters/rtf_to_html.rb +123 -0
- data/lib/active_migration/dictionary.rb +19 -0
- data/lib/active_migration/migration.rb +211 -0
- data/lib/active_migration/schemas.rb +143 -0
- data/lib/active_migration/spelling_fix.rb +20 -0
- data/lib/active_migration/transformer/grouped_field_fixed_spelling.rb +110 -0
- data/lib/assets/.gitkeep +0 -0
- data/lib/cmgb_rules/app/models/task.rb +19 -0
- data/lib/guara/version.rb +3 -0
- data/lib/spec/asserts/sheet1.xls +0 -0
- data/lib/spec/lib/active_migration_schemas_spec.rb +40 -0
- data/lib/spec/lib/active_migration_spec.rb +78 -0
- data/lib/spec/spec_helper.rb +121 -0
- data/lib/spec/support/active_migration_helper.rb +109 -0
- data/lib/spec/support/utilities.rb +7 -0
- data/lib/tasks/.gitkeep +0 -0
- data/lib/tasks/add_privilegies.rake +6 -0
- data/lib/tasks/external_migration.rake +22 -0
- data/lib/tasks/sample_data.rake +77 -0
- data/lib/tasks/smaple_data_test.rake +13 -0
- data/lib/templates/erb/scaffold/_form.html.erb +11 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +25 -0
- data/public/data.txt +1 -0
- data/public/favicon.ico +0 -0
- data/public/javascripts/autocomplete-rails.js +16 -0
- data/public/robots.txt +5 -0
- data/script/create_db +5 -0
- data/script/rails +6 -0
- data/script/recreate_db +5 -0
- data/script/recreate_db.bat +9 -0
- data/script/recreate_db_test +5 -0
- data/script/recreate_development_db +10 -0
- data/spec/controllers/business_activities_controller_spec.disabled +167 -0
- data/spec/controllers/business_departments_controller_spec.disabled +164 -0
- data/spec/controllers/business_segments_controller_spec.disabled +165 -0
- data/spec/controllers/company_businesses_controller_spec.disabled +164 -0
- data/spec/controllers/system_task_status_controller_spec.disabled +164 -0
- data/spec/controllers/system_task_status_spec.disabled +11 -0
- data/spec/controllers/task_types_controller_spec.disabled +164 -0
- data/spec/controllers/tasks_controller_spec.disabled +23 -0
- data/spec/controllers/tests/ajaxes_controller_spec.disabled +164 -0
- data/spec/factories.rb +101 -0
- data/spec/factories/addresses.rb +13 -0
- data/spec/factories/business_departments.rb +8 -0
- data/spec/factories/company_businesses.rb +8 -0
- data/spec/factories/customer_financials.rb +11 -0
- data/spec/factories/customer_has_customers.rb +8 -0
- data/spec/factories/customer_pj_has_customers_pjs.rb +8 -0
- data/spec/factories/system_task_resolutions.rb +7 -0
- data/spec/factories/system_task_status.rb +7 -0
- data/spec/factories/task.rb +17 -0
- data/spec/factories/task_feedbacks.rb +19 -0
- data/spec/factories/task_types.rb +8 -0
- data/spec/factories/tests_ajaxes.rb +8 -0
- data/spec/helpers/business_activities_helper_spec.rb +15 -0
- data/spec/helpers/business_departments_helper_spec.rb +15 -0
- data/spec/helpers/business_segments_helper_spec.rb +15 -0
- data/spec/helpers/company_businesses_helper_spec.rb +15 -0
- data/spec/helpers/customers/contacts_helper_spec.rb +15 -0
- data/spec/helpers/menu_helper_spec.rb +25 -0
- data/spec/helpers/tests/ajaxes_helper_spec.rb +15 -0
- data/spec/helpers/users_helpers_spec.rb +32 -0
- data/spec/models/address_spec.rb +5 -0
- data/spec/models/business_activity_spec.rb +5 -0
- data/spec/models/business_department_spec.rb +5 -0
- data/spec/models/business_segment_spec.rb +5 -0
- data/spec/models/city_spec.rb +5 -0
- data/spec/models/company_business_spec.rb +19 -0
- data/spec/models/contact_spec.rb +60 -0
- data/spec/models/customer_activity_spec.rb +5 -0
- data/spec/models/customer_financial_spec.rb +48 -0
- data/spec/models/customer_has_customers_spec.rb +18 -0
- data/spec/models/customer_pf_spec.rb +24 -0
- data/spec/models/customer_pj_has_customers_pj_spec.rb +34 -0
- data/spec/models/customer_pj_spec.rb +72 -0
- data/spec/models/customer_product_spec.rb +5 -0
- data/spec/models/customer_segment_spec.rb +5 -0
- data/spec/models/customer_spec.rb +135 -0
- data/spec/models/district_spec.rb +5 -0
- data/spec/models/emails_spec.rb +24 -0
- data/spec/models/micropost_spec.rb +49 -0
- data/spec/models/relationship_spec.rb +38 -0
- data/spec/models/state_spec.rb +5 -0
- data/spec/models/system_ability_spec.rb +5 -0
- data/spec/models/system_module_spec.rb +5 -0
- data/spec/models/system_task_resolution_spec.rb +17 -0
- data/spec/models/system_task_status_spec.rb +17 -0
- data/spec/models/task_feedback_spec.rb +46 -0
- data/spec/models/task_spec.rb +176 -0
- data/spec/models/task_type_spec.rb +27 -0
- data/spec/models/tests/ajax_spec.rb +5 -0
- data/spec/models/user_ability_spec.rb +35 -0
- data/spec/models/user_group_spec.rb +26 -0
- data/spec/models/user_spec.rb +274 -0
- data/spec/models/users_has_groups_spec.rb +29 -0
- data/spec/requests/authentication_pages_spec.rb +157 -0
- data/spec/requests/business_activities_spec.rb +7 -0
- data/spec/requests/business_departments_spec.rb +7 -0
- data/spec/requests/business_segments_spec.rb +7 -0
- data/spec/requests/company_businesses_spec.rb +11 -0
- data/spec/requests/customer_contacts_pages_spec.rb +96 -0
- data/spec/requests/customer_pages_spec.rb +60 -0
- data/spec/requests/micropost_pages_spec.rb +58 -0
- data/spec/requests/static_pages_spec.rb +57 -0
- data/spec/requests/task_pages_spec.rb +124 -0
- data/spec/requests/tests/tests_ajaxes_spec.rb +11 -0
- data/spec/requests/user_abilities_pages_spec.rb +73 -0
- data/spec/requests/user_pages_spec.rb +116 -0
- data/spec/routing/business_activities_routing_spec.rb +35 -0
- data/spec/routing/business_departments_routing_spec.rb +35 -0
- data/spec/routing/business_segments_routing_spec.rb +35 -0
- data/spec/routing/company_businesses_routing_spec.rb +35 -0
- data/spec/routing/system_task_status_routing_spec.rb +35 -0
- data/spec/routing/task_types_routing_spec.rb +35 -0
- data/spec/routing/tests/ajaxes_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +123 -0
- data/spec/support/custom_matchers.rb +9 -0
- data/spec/support/utilities.rb +120 -0
- data/spec/views/business_departments/edit.html.erb_spec.rb +20 -0
- data/spec/views/business_departments/index.html.erb_spec.disabled +23 -0
- data/spec/views/business_departments/new.html.erb_spec.rb +20 -0
- data/spec/views/business_departments/show.html.erb_spec.rb +17 -0
- data/spec/views/company_businesses/edit.html.erb_spec.rb +20 -0
- data/spec/views/company_businesses/index.html.erb_spec.rb +23 -0
- data/spec/views/company_businesses/new.html.erb_spec.rb +20 -0
- data/spec/views/company_businesses/show.html.erb_spec.rb +17 -0
- data/spec/views/task_types/edit.html.erb_spec.rb +18 -0
- data/spec/views/task_types/index.html.erb_spec.rb +20 -0
- data/spec/views/task_types/new.html.erb_spec.rb +18 -0
- data/spec/views/task_types/show.html.erb_spec.rb +15 -0
- data/test/fixtures/.gitkeep +0 -0
- data/test/functional/.gitkeep +0 -0
- data/test/integration/.gitkeep +0 -0
- data/test/performance/browsing_test.rb +12 -0
- data/test/test_helper.rb +13 -0
- data/test/unit/.gitkeep +0 -0
- data/vendor/assets/javascripts/.gitkeep +0 -0
- data/vendor/assets/stylesheets/.gitkeep +0 -0
- data/vendor/assets/stylesheets/active_admin/_base.css.scss +45 -0
- data/vendor/assets/stylesheets/active_admin/_forms.css.scss +270 -0
- data/vendor/assets/stylesheets/active_admin/_header.css.scss +137 -0
- data/vendor/assets/stylesheets/active_admin/_mixins.css.scss +1 -0
- data/vendor/assets/stylesheets/active_admin/_typography.css.scss +100 -0
- data/vendor/assets/stylesheets/active_admin/components/_batch_actions.css.scss +11 -0
- data/vendor/assets/stylesheets/active_admin/components/_blank_slates.scss +31 -0
- data/vendor/assets/stylesheets/active_admin/components/_breadcrumbs.scss +20 -0
- data/vendor/assets/stylesheets/active_admin/components/_buttons.scss +11 -0
- data/vendor/assets/stylesheets/active_admin/components/_columns.scss +3 -0
- data/vendor/assets/stylesheets/active_admin/components/_comments.css.scss +40 -0
- data/vendor/assets/stylesheets/active_admin/components/_date_picker.css.scss +123 -0
- data/vendor/assets/stylesheets/active_admin/components/_dropdown_menu.scss +151 -0
- data/vendor/assets/stylesheets/active_admin/components/_flash_messages.css.scss +39 -0
- data/vendor/assets/stylesheets/active_admin/components/_grid.scss +9 -0
- data/vendor/assets/stylesheets/active_admin/components/_links.scss +5 -0
- data/vendor/assets/stylesheets/active_admin/components/_pagination.scss +34 -0
- data/vendor/assets/stylesheets/active_admin/components/_panels.scss +6 -0
- data/vendor/assets/stylesheets/active_admin/components/_popovers.css.scss +123 -0
- data/vendor/assets/stylesheets/active_admin/components/_scopes.scss +10 -0
- data/vendor/assets/stylesheets/active_admin/components/_status_tags.scss +12 -0
- data/vendor/assets/stylesheets/active_admin/components/_table_tools.css.scss +94 -0
- data/vendor/assets/stylesheets/active_admin/components/_tables.css.scss +108 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_all.css.scss +11 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_buttons.css.scss +66 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_gradients.css.scss +37 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_icons.css.scss +24 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_reset.css.scss +165 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_rounded.css.scss +43 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_sections.css.scss +36 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_shadows.css.scss +22 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_typography.scss +3 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_utilities.scss +26 -0
- data/vendor/assets/stylesheets/active_admin/mixins/_variables.css.scss +24 -0
- data/vendor/assets/stylesheets/active_admin/pages/_dashboard.scss +5 -0
- data/vendor/assets/stylesheets/active_admin/pages/_logged_out.scss +44 -0
- data/vendor/assets/stylesheets/active_admin/print.css.scss +290 -0
- data/vendor/assets/stylesheets/active_admin/structure/_footer.scss +14 -0
- data/vendor/assets/stylesheets/active_admin/structure/_main_structure.scss +26 -0
- data/vendor/assets/stylesheets/active_admin/structure/_title_bar.scss +44 -0
- data/vendor/plugins/.gitkeep +0 -0
- metadata +731 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// ----------------------------------- Tables
|
|
2
|
+
|
|
3
|
+
table tr {
|
|
4
|
+
td {
|
|
5
|
+
vertical-align: top;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// --------- Index Tables
|
|
10
|
+
|
|
11
|
+
table.index_table {
|
|
12
|
+
width: 100%;
|
|
13
|
+
margin-bottom: 10px;
|
|
14
|
+
border: 0;
|
|
15
|
+
border-spacing: 0;
|
|
16
|
+
|
|
17
|
+
th {
|
|
18
|
+
@include section-header;
|
|
19
|
+
border-right: none;
|
|
20
|
+
text-align: left;
|
|
21
|
+
padding-left: $cell-horizontal-padding;
|
|
22
|
+
padding-right: $cell-horizontal-padding;
|
|
23
|
+
|
|
24
|
+
a, a:link, a:visited {
|
|
25
|
+
color: $section-header-text-color;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
display: block;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
-webkit-font-smoothing: antialiased;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.sortable a {
|
|
33
|
+
background: url(active_admin_image_path('orderable.png')) no-repeat 0 4px; padding-left: 13px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.sorted-asc a { background-position: 0 -27px; }
|
|
37
|
+
&.sorted-desc a { background-position: 0 -56px;}
|
|
38
|
+
|
|
39
|
+
&.sorted-asc, &.sorted-desc {
|
|
40
|
+
@include gradient(darken($secondary-gradient-start, 5%), darken($secondary-gradient-stop, 5%));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:last-child {
|
|
44
|
+
border-right: solid 1px #d4d4d4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
tr.even td { background: $table-stripe-color; }
|
|
50
|
+
|
|
51
|
+
tr.selected td {
|
|
52
|
+
background: $table-selected-color;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
td {
|
|
56
|
+
padding: 10px $cell-horizontal-padding 8px $cell-horizontal-padding;
|
|
57
|
+
border-bottom: 1px solid #e8e8e8;
|
|
58
|
+
vertical-align: top;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// --------- Tables inside Panels
|
|
63
|
+
|
|
64
|
+
.panel_contents table {
|
|
65
|
+
margin-top: 5px;
|
|
66
|
+
th {
|
|
67
|
+
padding-top: 10px;
|
|
68
|
+
background: none;
|
|
69
|
+
color: $primary-color;
|
|
70
|
+
@include no-shadow;
|
|
71
|
+
@include text-shadow;
|
|
72
|
+
text-transform: uppercase;
|
|
73
|
+
border-bottom: 1px solid #ccc;
|
|
74
|
+
}
|
|
75
|
+
tr.odd td { background: darken($table-stripe-color, 3%); }
|
|
76
|
+
tr.even td { background: $table-stripe-color; }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// -------------------------------------- Resource Attributes Table
|
|
80
|
+
.attributes_table { overflow: hidden; }
|
|
81
|
+
|
|
82
|
+
.attributes_table table {
|
|
83
|
+
th, td {
|
|
84
|
+
padding: 8px $cell-horizontal-padding 6px $cell-horizontal-padding;
|
|
85
|
+
vertical-align: top;
|
|
86
|
+
border-bottom: 1px solid #e8e8e8;
|
|
87
|
+
}
|
|
88
|
+
th {
|
|
89
|
+
@include no-shadow;
|
|
90
|
+
@include no-gradient;
|
|
91
|
+
width: 150px;
|
|
92
|
+
font-size: 0.9em;
|
|
93
|
+
padding-left: 0;
|
|
94
|
+
text-transform: uppercase;
|
|
95
|
+
color: $primary-color;
|
|
96
|
+
@include text-shadow;
|
|
97
|
+
}
|
|
98
|
+
td {
|
|
99
|
+
.empty {
|
|
100
|
+
color: #bbb;
|
|
101
|
+
font-size: 0.8em;
|
|
102
|
+
text-transform: uppercase;
|
|
103
|
+
letter-spacing: 0.2em;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.sidebar_section .attributes_table th { width: 50px; }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@import "active_admin/mixins/variables";
|
|
2
|
+
@import "active_admin/mixins/reset";
|
|
3
|
+
@import "active_admin/mixins/gradients";
|
|
4
|
+
@import "active_admin/mixins/shadows";
|
|
5
|
+
@import "active_admin/mixins/icons";
|
|
6
|
+
@import "active_admin/mixins/rounded";
|
|
7
|
+
@import "active_admin/mixins/buttons";
|
|
8
|
+
@import "active_admin/mixins/sections";
|
|
9
|
+
@import "active_admin/mixins/utilities";
|
|
10
|
+
@import "active_admin/mixins/typography";
|
|
11
|
+
@import "bourbon";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@mixin basic-button {
|
|
2
|
+
@include rounded(200px);
|
|
3
|
+
display: inline-block;
|
|
4
|
+
font-weight: bold;
|
|
5
|
+
font-size: 1.0em;
|
|
6
|
+
@include sans-family;
|
|
7
|
+
line-height: 12px;
|
|
8
|
+
margin-right: 3px;
|
|
9
|
+
padding: 7px 16px 6px;
|
|
10
|
+
text-decoration: none;
|
|
11
|
+
-webkit-font-smoothing: antialiased;
|
|
12
|
+
|
|
13
|
+
&.disabled {
|
|
14
|
+
opacity: 0.5;
|
|
15
|
+
cursor: default;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin default-button {
|
|
21
|
+
@include basic-button;
|
|
22
|
+
@include gradient(lighten($primary-color, 15%), darken($primary-color, 12%));
|
|
23
|
+
@include text-shadow(#000);
|
|
24
|
+
@include box-shadow(0 1px 1px rgba(0,0,0,0.10), 0 1px 0 0px rgba(255,255,255, 0.2) inset);
|
|
25
|
+
border: solid 1px #484e53;
|
|
26
|
+
@include border-colors(#616a71, #484e53, #363b3f);
|
|
27
|
+
color: #efefef;
|
|
28
|
+
|
|
29
|
+
&:not(.disabled) {
|
|
30
|
+
&:hover{
|
|
31
|
+
@include gradient(lighten($primary-color, 18%), darken($primary-color, 9%));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:active {
|
|
35
|
+
@include box-shadow(0 1px 3px rgba(0,0,0,0.40) inset, 0 1px 0 0px #FFF);
|
|
36
|
+
@include gradient(lighten($primary-color, 8%), darken($primary-color, 17%));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@mixin light-button {
|
|
42
|
+
@include basic-button;
|
|
43
|
+
@include gradient(#FFFFFF, #E7E7E7);
|
|
44
|
+
@include box-shadow(0 1px 1px rgba(0,0,0,0.10), 0 1px 0 0 rgba(255,255,255, 0.8) inset);
|
|
45
|
+
border: solid 1px #c7c7c7;
|
|
46
|
+
@include border-colors(#d3d3d3, #c7c7c7, #c2c2c2);
|
|
47
|
+
@include text-shadow;
|
|
48
|
+
color: $primary-color;
|
|
49
|
+
|
|
50
|
+
&:not(.disabled) {
|
|
51
|
+
&:hover {
|
|
52
|
+
@include gradient(#FFFFFF, #F1F1F1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:active {
|
|
56
|
+
@include box-shadow(0 1px 2px rgba(0,0,0,0.22) inset, 0 1px 0 0px #EEE);
|
|
57
|
+
@include border-colors(#c2c2c2, #b9b9b9, #b7b7b7);
|
|
58
|
+
@include gradient(#F3F3F3, #D8D8D8);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@mixin dark-button {
|
|
65
|
+
@include default-button;
|
|
66
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
$secondary-gradient-start: #efefef !default;
|
|
2
|
+
$secondary-gradient-stop: #dfe1e2 !default;
|
|
3
|
+
|
|
4
|
+
@mixin gradient($start, $end){
|
|
5
|
+
background: $start;
|
|
6
|
+
background: -webkit-gradient(linear, left top, left bottom, from($start), to($end));
|
|
7
|
+
background: -moz-linear-gradient(-90deg, $start, $end);
|
|
8
|
+
// IE 6 & 7
|
|
9
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start}', endColorstr='#{$end}');
|
|
10
|
+
// IE 8
|
|
11
|
+
-ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start}', endColorstr='#{$end}');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin primary-gradient {
|
|
15
|
+
@include gradient(lighten($primary-color, 5%), darken($primary-color, 7%));
|
|
16
|
+
border-bottom: 1px solid darken($primary-color, 11%);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@mixin secondary-gradient {
|
|
20
|
+
@include gradient($secondary-gradient-start, $secondary-gradient-stop);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@mixin highlight-gradient {
|
|
24
|
+
@include gradient(#75a1c2, #608cb4);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin reverse-highlight-gradient {
|
|
28
|
+
@include gradient(#608cb4, #75a1c2);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin no-gradient {
|
|
32
|
+
background: none;
|
|
33
|
+
// IE 6 & 7
|
|
34
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
|
35
|
+
// IE 8
|
|
36
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";
|
|
37
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#active_admin {
|
|
2
|
+
span.icon { vertical-align: middle; display: inline-block; }
|
|
3
|
+
span.icon svg { vertical-align: baseline; }
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
@mixin icon-color ($color) {
|
|
7
|
+
span.icon svg {
|
|
8
|
+
path, polygon, rect, circle { fill: $color !important; }
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@mixin icon-size ($size) {
|
|
13
|
+
span.icon { width: $size; height: $size; }
|
|
14
|
+
span.icon svg { width: $size; height: $size; }
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin icon($color, $size) {
|
|
18
|
+
@include icon-color($color);
|
|
19
|
+
@include icon-size($size);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
#active_admin {
|
|
23
|
+
@include icon-size(0.8em);
|
|
24
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// FROM The Compass Framework (compass-style.org)
|
|
2
|
+
//
|
|
3
|
+
// Copyright (c) 2009 Christopher M. Eppstein
|
|
4
|
+
//
|
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
// this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
// the Software without restriction, including without limitation the rights to
|
|
8
|
+
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
// the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
// subject to the following conditions:
|
|
11
|
+
//
|
|
12
|
+
// The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
// copies or substantial portions of the Software. No attribution is required by
|
|
14
|
+
// products that make use of this software.
|
|
15
|
+
//
|
|
16
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
18
|
+
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
19
|
+
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
20
|
+
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
21
|
+
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
+
//
|
|
23
|
+
// Except as contained in this notice, the name(s) of the above copyright holders
|
|
24
|
+
// shall not be used in advertising or otherwise to promote the sale, use or other
|
|
25
|
+
// dealings in this Software without prior written authorization.
|
|
26
|
+
//
|
|
27
|
+
// Contributors to this project agree to grant all rights to the copyright holder
|
|
28
|
+
// of the primary product. Attribution is maintained in the source control history
|
|
29
|
+
// of the product.
|
|
30
|
+
//
|
|
31
|
+
// Based on [Eric Meyer's reset](http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/)
|
|
32
|
+
// Global reset rules.
|
|
33
|
+
// For more specific resets, use the reset mixins provided below
|
|
34
|
+
//
|
|
35
|
+
// *Please Note*: tables still need `cellspacing="0"` in the markup.
|
|
36
|
+
@mixin global-reset {
|
|
37
|
+
html, body, div, span, applet, object, iframe,
|
|
38
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
39
|
+
a, abbr, acronym, address, big, cite, code,
|
|
40
|
+
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
|
41
|
+
small, strike, strong, sub, sup, tt, var,
|
|
42
|
+
dl, dt, dd, ol, ul, li,
|
|
43
|
+
fieldset, form, label, legend,
|
|
44
|
+
table, caption, tbody, tfoot, thead, tr, th, td {
|
|
45
|
+
@include reset-box-model;
|
|
46
|
+
@include reset-font; }
|
|
47
|
+
body {
|
|
48
|
+
@include reset-body; }
|
|
49
|
+
ol, ul {
|
|
50
|
+
@include reset-list-style; }
|
|
51
|
+
table {
|
|
52
|
+
@include reset-table; }
|
|
53
|
+
caption, th, td {
|
|
54
|
+
@include reset-table-cell; }
|
|
55
|
+
q, blockquote {
|
|
56
|
+
@include reset-quotation; }
|
|
57
|
+
a img {
|
|
58
|
+
@include reset-image-anchor-border; } }
|
|
59
|
+
|
|
60
|
+
// Reset all elements within some selector scope. To reset the selector itself,
|
|
61
|
+
// mixin the appropriate reset mixin for that element type as well. This could be
|
|
62
|
+
// useful if you want to style a part of your page in a dramatically different way.
|
|
63
|
+
//
|
|
64
|
+
// *Please Note*: tables still need `cellspacing="0"` in the markup.
|
|
65
|
+
@mixin nested-reset {
|
|
66
|
+
div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
|
|
67
|
+
pre, a, abbr, acronym, address, code, del, dfn, em, img,
|
|
68
|
+
dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr {
|
|
69
|
+
@include reset-box-model;
|
|
70
|
+
@include reset-font; }
|
|
71
|
+
table {
|
|
72
|
+
@include reset-table; }
|
|
73
|
+
caption, th, td {
|
|
74
|
+
@include reset-table-cell; }
|
|
75
|
+
q, blockquote {
|
|
76
|
+
@include reset-quotation; }
|
|
77
|
+
a img {
|
|
78
|
+
@include reset-image-anchor-border; } }
|
|
79
|
+
|
|
80
|
+
// Reset the box model measurements.
|
|
81
|
+
@mixin reset-box-model {
|
|
82
|
+
margin: 0;
|
|
83
|
+
padding: 0;
|
|
84
|
+
border: 0;
|
|
85
|
+
outline: 0; }
|
|
86
|
+
|
|
87
|
+
// Reset the font and vertical alignment.
|
|
88
|
+
@mixin reset-font {
|
|
89
|
+
font: {
|
|
90
|
+
weight: inherit;
|
|
91
|
+
style: inherit;
|
|
92
|
+
size: 100%;
|
|
93
|
+
family: inherit; };
|
|
94
|
+
vertical-align: baseline; }
|
|
95
|
+
|
|
96
|
+
// Resets the outline when focus.
|
|
97
|
+
// For accessibility you need to apply some styling in its place.
|
|
98
|
+
@mixin reset-focus {
|
|
99
|
+
outline: 0; }
|
|
100
|
+
|
|
101
|
+
// Reset a body element.
|
|
102
|
+
@mixin reset-body {
|
|
103
|
+
line-height: 1;
|
|
104
|
+
color: black;
|
|
105
|
+
background: white; }
|
|
106
|
+
|
|
107
|
+
// Reset the list style of an element.
|
|
108
|
+
@mixin reset-list-style {
|
|
109
|
+
list-style: none; }
|
|
110
|
+
|
|
111
|
+
// Reset a table
|
|
112
|
+
@mixin reset-table {
|
|
113
|
+
border-collapse: separate;
|
|
114
|
+
border-spacing: 0;
|
|
115
|
+
vertical-align: middle; }
|
|
116
|
+
|
|
117
|
+
// Reset a table cell (`th`, `td`)
|
|
118
|
+
@mixin reset-table-cell {
|
|
119
|
+
text-align: left;
|
|
120
|
+
font-weight: normal;
|
|
121
|
+
vertical-align: middle; }
|
|
122
|
+
|
|
123
|
+
// Reset a quotation (`q`, `blockquote`)
|
|
124
|
+
@mixin reset-quotation {
|
|
125
|
+
quotes: "" "";
|
|
126
|
+
&:before, &:after {
|
|
127
|
+
content: ""; } }
|
|
128
|
+
|
|
129
|
+
// Resets the border.
|
|
130
|
+
@mixin reset-image-anchor-border {
|
|
131
|
+
border: none; }
|
|
132
|
+
|
|
133
|
+
// Unrecognized elements are displayed inline.
|
|
134
|
+
// This reset provides a basic reset for html5 elements
|
|
135
|
+
// so they are rendered correctly in browsers that don't recognize them
|
|
136
|
+
// and reset in browsers that have default styles for them.
|
|
137
|
+
@mixin reset-html5 {
|
|
138
|
+
article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
|
|
139
|
+
@include reset-box-model;
|
|
140
|
+
display: block; } }
|
|
141
|
+
|
|
142
|
+
// Resets the display of inline and block elements to their default display
|
|
143
|
+
// according to their tag type. Elements that have a default display that varies across
|
|
144
|
+
// versions of html or browser are not handled here, but this covers the 90% use case.
|
|
145
|
+
// Usage Example:
|
|
146
|
+
//
|
|
147
|
+
// // Turn off the display for both of these classes
|
|
148
|
+
// .unregistered-only, .registered-only
|
|
149
|
+
// display: none
|
|
150
|
+
// // Now turn only one of them back on depending on some other context.
|
|
151
|
+
// body.registered
|
|
152
|
+
// +reset-display(".registered-only")
|
|
153
|
+
// body.unregistered
|
|
154
|
+
// +reset-display(".unregistered-only")
|
|
155
|
+
@mixin reset-display($selector: "", $important: false) {
|
|
156
|
+
#{append-selector(elements-of-type("inline"), $selector)} {
|
|
157
|
+
@if $important {
|
|
158
|
+
display: inline !important; }
|
|
159
|
+
@else {
|
|
160
|
+
display: inline; } }
|
|
161
|
+
#{append-selector(elements-of-type("block"), $selector)} {
|
|
162
|
+
@if $important {
|
|
163
|
+
display: block !important; }
|
|
164
|
+
@else {
|
|
165
|
+
display: block; } } }
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@mixin rounded($radius: 3px) {
|
|
2
|
+
-webkit-border-radius: $radius;
|
|
3
|
+
-moz-border-radius: $radius;
|
|
4
|
+
border-radius: $radius;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@mixin rounded-all($top-left:3px, $top-right:3px, $bottom-right:3px, $bottom-left:3px) {
|
|
8
|
+
border-top-right-radius: $top-right;
|
|
9
|
+
-moz-border-radius-topright: $top-right;
|
|
10
|
+
-webkit-border-top-right-radius: $top-right;
|
|
11
|
+
|
|
12
|
+
border-top-left-radius: $top-left;
|
|
13
|
+
-moz-border-radius-topleft: $top-left;
|
|
14
|
+
-webkit-border-top-left-radius: $top-left;
|
|
15
|
+
|
|
16
|
+
border-bottom-right-radius: $bottom-right;
|
|
17
|
+
-moz-border-radius-bottomright: $bottom-right;
|
|
18
|
+
-webkit-border-bottom-right-radius: $bottom-right;
|
|
19
|
+
|
|
20
|
+
border-bottom-left-radius: $bottom-left;
|
|
21
|
+
-moz-border-radius-bottomleft: $bottom-left;
|
|
22
|
+
-webkit-border-bottom-left-radius: $bottom-left;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@mixin rounded-top($radius: 3px) {
|
|
26
|
+
@include rounded(0);
|
|
27
|
+
border-top-right-radius: $radius;
|
|
28
|
+
border-top-left-radius: $radius;
|
|
29
|
+
-moz-border-radius-topright: $radius;
|
|
30
|
+
-moz-border-radius-topleft: $radius;
|
|
31
|
+
-webkit-border-top-right-radius: $radius;
|
|
32
|
+
-webkit-border-top-left-radius: $radius;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@mixin rounded-bottom($radius: 3px) {
|
|
36
|
+
@include rounded(0);
|
|
37
|
+
border-bottom-right-radius: $radius;
|
|
38
|
+
border-bottom-left-radius: $radius;
|
|
39
|
+
-moz-border-radius-bottomright: $radius;
|
|
40
|
+
-moz-border-radius-bottomleft: $radius;
|
|
41
|
+
-webkit-border-bottom-right-radius: $radius;
|
|
42
|
+
-webkit-border-bottom-left-radius: $radius;
|
|
43
|
+
}
|