artfully_ose 1.1.0 → 1.2.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/README.md +28 -0
- data/app/assets/fonts/FontAwesome.otf +0 -0
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +472 -252
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/images/actions/do.png +0 -0
- data/app/assets/images/actions/do.psd +0 -0
- data/app/assets/images/actions/get.png +0 -0
- data/app/assets/images/actions/get.psd +0 -0
- data/app/assets/images/actions/give.png +0 -0
- data/app/assets/images/actions/give.psd +0 -0
- data/app/assets/images/actions/go.png +0 -0
- data/app/assets/images/actions/go.psd +0 -0
- data/app/assets/images/actions/hear.png +0 -0
- data/app/assets/images/actions/hear.psd +0 -0
- data/app/assets/images/actions/join.png +0 -0
- data/app/assets/images/actions/join.psd +0 -0
- data/app/assets/images/actions/say.png +0 -0
- data/app/assets/images/actions/say.psd +0 -0
- data/app/assets/images/business-default-avatar.png +0 -0
- data/app/assets/images/foundation-default-avatar.png +0 -0
- data/app/assets/images/glyphish/people/208-facebook.png +0 -0
- data/app/assets/images/glyphish/people/210-twitterbird.png +0 -0
- data/app/assets/images/glyphish/people/218-trash2-small.png +0 -0
- data/app/assets/images/glyphish/people/291-idcard.png +0 -0
- data/app/assets/images/glyphish/people/email.png +0 -0
- data/app/assets/images/glyphish/people/email.psd +0 -0
- data/app/assets/images/glyphish/people/linkedin.png +0 -0
- data/app/assets/images/glyphish/people/linkedin.psd +0 -0
- data/app/assets/images/glyphish/people/website.png +0 -0
- data/app/assets/images/glyphish/people/website.psd +0 -0
- data/app/assets/images/government-default-avatar.png +0 -0
- data/app/assets/images/household-default-avatar.png +0 -0
- data/app/assets/images/loading.gif +0 -0
- data/app/assets/images/nonprofit-default-avatar.png +0 -0
- data/app/assets/images/other-default-avatar.png +0 -0
- data/app/assets/images/person-default-avatar.png +0 -0
- data/app/assets/images/person-default-avatar.psd +0 -0
- data/app/assets/javascripts/angular-bootstrap-ui.js +1 -0
- data/app/assets/javascripts/angular-resource.js +546 -0
- data/app/assets/javascripts/angular.js +20311 -0
- data/app/assets/javascripts/application.js +340 -24
- data/app/assets/javascripts/bootstrap-wysihtml5.js +511 -0
- data/app/assets/javascripts/bootstrap.js +1005 -455
- data/app/assets/javascripts/boxoffice.js +558 -0
- data/app/assets/javascripts/change-membership.js +152 -0
- data/app/assets/javascripts/custom/door-list.js +14 -0
- data/app/assets/javascripts/custom/endless-scroll.js +25 -0
- data/app/assets/javascripts/custom/inline-people-search.js +51 -49
- data/app/assets/javascripts/custom/kits-config.js +33 -0
- data/app/assets/javascripts/custom/people.js +74 -9
- data/app/assets/javascripts/custom/prices.js +1 -0
- data/app/assets/javascripts/custom/show.js +116 -27
- data/app/assets/javascripts/households.js +59 -0
- data/app/assets/javascripts/jquery-lib/fullcalendar.js +5982 -0
- data/app/assets/javascripts/jquery-lib/jquery-ui-1.10.3.custom.min.js +7 -0
- data/app/assets/javascripts/jquery-lib/jquery-ui-timepicker-addon.js +1992 -949
- data/app/assets/javascripts/jquery-lib/jquery.mask-money.js +305 -294
- data/app/assets/javascripts/jquery-migrate-1.2.1.js +521 -0
- data/app/assets/javascripts/jquery-migrate-1.2.1.min.js +2 -0
- data/app/assets/javascripts/jquery.js +5318 -4987
- data/app/assets/javascripts/locationselector.js +107 -0
- data/app/assets/javascripts/relationships.js +63 -0
- data/app/assets/javascripts/sales-console.js +158 -0
- data/app/assets/javascripts/store/jquery.validate.additional-methods.js +476 -159
- data/app/assets/javascripts/store/jquery.validate.js +449 -406
- data/app/assets/javascripts/store/store.js +107 -349
- data/app/assets/javascripts/storefront.js +1 -0
- data/app/assets/javascripts/wysihtml5-0.3.0.min.js +261 -0
- data/app/assets/stylesheets/application.sass +414 -48
- data/app/assets/stylesheets/bootstrap-overrides.css +100 -26
- data/app/assets/stylesheets/bootstrap-wysihtml5.css +102 -0
- data/app/assets/stylesheets/bootstrap.css +6 -3607
- data/app/assets/stylesheets/boxoffice.css.scss +258 -0
- data/app/assets/stylesheets/font-awesome.css.scss +1566 -0
- data/app/assets/stylesheets/jquery/fullcalendar.css +223 -252
- data/app/assets/stylesheets/pages/bootstrap-responsive.css +1109 -0
- data/app/assets/stylesheets/sass/_event_list.sass +43 -0
- data/app/assets/stylesheets/sass/_tags.sass +24 -2
- data/app/assets/stylesheets/sass/box-office.sass +24 -4
- data/app/assets/stylesheets/sass/cart.sass +0 -6
- data/app/assets/stylesheets/sass/store.sass +274 -55
- data/app/assets/stylesheets/storefront.css +2 -1
- data/app/assets/stylesheets/wysiwyg-color.css +67 -0
- data/app/concerns/cart_finder.rb +50 -0
- data/app/concerns/immutable_action.rb +9 -0
- data/app/concerns/pdf_generation.rb +74 -0
- data/app/{models/orders → concerns}/unrefundable.rb +0 -0
- data/app/controllers/actions_controller.rb +29 -22
- data/app/controllers/addresses_controller.rb +3 -3
- data/app/controllers/artfully_ose_controller.rb +56 -7
- data/app/controllers/assignments_controller.rb +28 -0
- data/app/controllers/charts_controller.rb +1 -1
- data/app/controllers/console_sales_controller.rb +182 -0
- data/app/controllers/contributions_controller.rb +31 -6
- data/app/controllers/discounts_controller.rb +10 -3
- data/app/controllers/events_controller.rb +42 -33
- data/app/controllers/events_pass_types_controller.rb +87 -0
- data/app/controllers/exchanges_controller.rb +16 -8
- data/app/controllers/export_controller.rb +10 -2
- data/app/controllers/households_controller.rb +71 -0
- data/app/controllers/imports_controller.rb +46 -7
- data/app/controllers/index_controller.rb +6 -1
- data/app/controllers/member_cards_controller.rb +45 -0
- data/app/controllers/members/index_controller.rb +4 -0
- data/app/controllers/members/invitations_controller.rb +7 -0
- data/app/controllers/members/members_controller.rb +9 -0
- data/app/controllers/members/passwords_controller.rb +10 -0
- data/app/controllers/members/people_controller.rb +17 -0
- data/app/controllers/members/sessions_controller.rb +14 -0
- data/app/controllers/membership_cancellations_controller.rb +46 -0
- data/app/controllers/membership_changes_controller.rb +39 -0
- data/app/controllers/membership_comps_controller.rb +102 -0
- data/app/controllers/membership_kits_controller.rb +25 -0
- data/app/controllers/membership_types_controller.rb +57 -0
- data/app/controllers/memberships_controller.rb +18 -47
- data/app/controllers/merges_controller.rb +11 -5
- data/app/controllers/mobile/dashboard_controller.rb +17 -0
- data/app/controllers/mobile/events_controller.rb +16 -0
- data/app/controllers/mobile/orders_controller.rb +61 -0
- data/app/controllers/mobile/shows_controller.rb +39 -0
- data/app/controllers/mobile/tickets_controller.rb +114 -0
- data/app/controllers/mobile/users_controller.rb +30 -0
- data/app/controllers/notes_controller.rb +3 -3
- data/app/controllers/orders_controller.rb +87 -8
- data/app/controllers/organizations_controller.rb +3 -2
- data/app/controllers/pass_types_controller.rb +53 -0
- data/app/controllers/passes_controller.rb +52 -0
- data/app/controllers/passes_kits_controller.rb +25 -0
- data/app/controllers/passes_reports_controller.rb +5 -0
- data/app/controllers/people_controller.rb +83 -28
- data/app/controllers/refunds_controller.rb +7 -7
- data/app/controllers/regular_donation_kits_controller.rb +32 -0
- data/app/controllers/relationships_controller.rb +15 -0
- data/app/controllers/sales_controller.rb +95 -31
- data/app/controllers/searches_controller.rb +15 -7
- data/app/controllers/sections_controller.rb +3 -3
- data/app/controllers/segments_controller.rb +4 -4
- data/app/controllers/shows_controller.rb +119 -98
- data/app/controllers/slices_controller.rb +3 -2
- data/app/controllers/statements_controller.rb +1 -1
- data/app/controllers/store/checkouts_controller.rb +27 -8
- data/app/controllers/store/donations_controller.rb +22 -0
- data/app/controllers/store/events_controller.rb +19 -1
- data/app/controllers/store/memberships_controller.rb +16 -0
- data/app/controllers/store/orders_controller.rb +46 -77
- data/app/controllers/store/passes_controller.rb +13 -0
- data/app/controllers/store/retrievals_controller.rb +29 -0
- data/app/controllers/store/shows_controller.rb +6 -0
- data/app/controllers/store/store_controller.rb +21 -23
- data/app/controllers/ticket_types_controller.rb +41 -0
- data/app/controllers/tickets_controller.rb +16 -0
- data/app/controllers/user_memberships_controller.rb +57 -0
- data/app/controllers/users/sessions_controller.rb +3 -0
- data/app/helpers/artfully_ose_helper.rb +88 -37
- data/app/helpers/households_helper.rb +7 -0
- data/app/helpers/link_helper.rb +15 -1
- data/app/helpers/members_helper.rb +9 -0
- data/app/helpers/membership_types_helper.rb +22 -0
- data/app/helpers/people_helper.rb +55 -1
- data/app/helpers/relationships_helper.rb +26 -0
- data/app/helpers/sales_helper.rb +29 -0
- data/app/helpers/searches_helper.rb +13 -0
- data/app/helpers/suggested_households_helper.rb +5 -0
- data/app/mailers/order_mailer.rb +28 -1
- data/app/mailers/pass_mailer.rb +17 -0
- data/app/mailers/producer_mailer.rb +2 -2
- data/app/mailers/reports_mailer.rb +6 -5
- data/app/models/ability.rb +1 -0
- data/app/models/action.rb +48 -24
- data/app/models/actions/change_action.rb +13 -0
- data/app/models/actions/comp_action.rb +15 -0
- data/app/models/actions/do_action.rb +12 -0
- data/app/models/actions/exchange_action.rb +15 -0
- data/app/models/actions/get_action.rb +7 -1
- data/app/models/actions/give_action.rb +20 -4
- data/app/models/actions/go_action.rb +27 -8
- data/app/models/actions/hear_action.rb +14 -2
- data/app/models/actions/join_action.rb +4 -0
- data/app/models/actions/refund_action.rb +2 -1
- data/app/models/actions/say_action.rb +23 -0
- data/app/models/address.rb +39 -9
- data/app/models/cart.rb +254 -0
- data/app/models/chart.rb +30 -23
- data/app/models/checkout.rb +94 -38
- data/app/models/comp.rb +25 -17
- data/app/models/company.rb +18 -0
- data/app/models/console_sale.rb +30 -0
- data/app/models/contribution.rb +11 -9
- data/app/models/daily_donation_report.rb +11 -8
- data/app/models/daily_membership_report.rb +50 -0
- data/app/models/daily_pass_report.rb +48 -0
- data/app/models/daily_ticket_report.rb +34 -14
- data/app/models/database_views/item_view.rb +148 -0
- data/app/models/discount.rb +7 -7
- data/app/models/discounts/buy_one_get_one_free_discount_type.rb +6 -1
- data/app/models/discounts/discount_type.rb +5 -1
- data/app/models/discounts/dollars_off_tickets_discount_type.rb +8 -2
- data/app/models/donation.rb +10 -6
- data/app/models/donation_search.rb +1 -1
- data/app/models/door_list.rb +14 -9
- data/app/models/event.rb +81 -10
- data/app/models/events_pass_type.rb +18 -0
- data/app/models/exchange.rb +23 -15
- data/app/models/{ext/ext.rb → ext.rb} +16 -3
- data/app/models/ext/integrations.rb +47 -32
- data/app/models/ext/preprocessor.rb +7 -0
- data/app/models/extendable.rb +6 -0
- data/app/models/fee_calculator.rb +13 -0
- data/app/models/fee_strategy.rb +5 -0
- data/app/models/gateway_transaction.rb +3 -1
- data/app/models/household.rb +61 -0
- data/app/models/household_suggester.rb +58 -0
- data/app/models/import.rb +48 -15
- data/app/models/import_message.rb +6 -0
- data/app/models/imports/donations_import.rb +3 -22
- data/app/models/imports/events_import.rb +56 -57
- data/app/models/imports/memberships_import.rb +43 -0
- data/app/models/imports/people_import.rb +45 -17
- data/app/models/imports/rollback.rb +7 -2
- data/app/models/imports/status.rb +8 -0
- data/app/models/individual.rb +20 -0
- data/app/models/item.rb +65 -54
- data/app/models/job/checkout_processor.rb +46 -0
- data/app/models/job/cleanup_suggested_households_job.rb +17 -0
- data/app/models/job/daily_email_report_job.rb +28 -7
- data/app/models/job/destroy_show_job.rb +10 -0
- data/app/models/job/expire_ticket_job.rb +9 -0
- data/app/models/job/geocode_address_job.rb +11 -0
- data/app/models/job/mailchimp_sync_job.rb +1 -3
- data/app/models/job/order_mailer_job.rb +8 -0
- data/app/models/job/order_processor.rb +93 -0
- data/app/models/job/person_lifetime_value_job.rb +10 -0
- data/app/models/job/recall_import_job.rb +5 -0
- data/app/models/job/refund_order_processor.rb +16 -0
- data/app/models/job/show_creator.rb +39 -0
- data/app/models/kit.rb +2 -4
- data/app/models/kits/mailchimp_kit.rb +49 -22
- data/app/models/kits/membership_kit.rb +62 -0
- data/app/models/kits/passes_kit.rb +62 -0
- data/app/models/kits/regular_donation_kit.rb +38 -8
- data/app/models/kits/scannable_tickets_kit.rb +23 -0
- data/app/models/member.rb +190 -0
- data/app/models/member_card_generator.rb +63 -0
- data/app/models/member_number_generator.rb +8 -0
- data/app/models/member_walkup.rb +150 -0
- data/app/models/membership.rb +97 -7
- data/app/models/membership_cancellation.rb +80 -0
- data/app/models/membership_change.rb +187 -0
- data/app/models/membership_comp.rb +105 -0
- data/app/models/membership_comp_job.rb +32 -0
- data/app/models/membership_sale_search.rb +36 -0
- data/app/models/membership_type.rb +67 -0
- data/app/models/note.rb +1 -1
- data/app/models/{orders/order.rb → order.rb} +224 -28
- data/app/models/order_handler.rb +154 -0
- data/app/models/orders/comp_order.rb +4 -0
- data/app/models/orders/exchange_order.rb +16 -0
- data/app/models/orders/imported_order.rb +4 -0
- data/app/models/orders/refund_order.rb +8 -0
- data/app/models/organization.rb +68 -17
- data/app/models/organization_ability.rb +1 -0
- data/app/models/parsed_row.rb +103 -20
- data/app/models/pass.rb +196 -0
- data/app/models/pass_summary.rb +18 -0
- data/app/models/pass_type.rb +41 -0
- data/app/models/{payments/payment.rb → payment.rb} +29 -1
- data/app/models/payments/cash_payment.rb +3 -1
- data/app/models/payments/check_payment.rb +33 -0
- data/app/models/payments/comp_payment.rb +3 -1
- data/app/models/payments/credit_card_payment.rb +44 -23
- data/app/models/person.rb +270 -62
- data/app/models/phone.rb +0 -8
- data/app/models/refund.rb +28 -18
- data/app/models/relation.rb +27 -0
- data/app/models/relation_builder.rb +32 -0
- data/app/models/relationship.rb +55 -0
- data/app/models/relationship_builder.rb +12 -0
- data/app/models/relationship_validator.rb +46 -0
- data/app/models/relationships_kit.rb +31 -0
- data/app/models/rolling_membership_type.rb +11 -0
- data/app/models/sale.rb +28 -21
- data/app/models/sale_search.rb +1 -1
- data/app/models/search.rb +334 -45
- data/app/models/seasonal_membership_type.rb +3 -0
- data/app/models/section.rb +49 -17
- data/app/models/segment.rb +1 -1
- data/app/models/show.rb +93 -16
- data/app/models/slices.rb +26 -10
- data/app/models/statement.rb +38 -9
- data/app/models/suggested_household.rb +24 -0
- data/app/models/sundial.rb +12 -0
- data/app/models/ticket.rb +109 -15
- data/app/models/ticket/glance.rb +1 -2
- data/app/models/ticket/locker.rb +51 -0
- data/app/models/ticket/pricing.rb +30 -22
- data/app/models/ticket/qr_code.rb +21 -0
- data/app/models/ticket/reports.rb +16 -10
- data/app/models/ticket/sale_transitions.rb +4 -0
- data/app/models/ticket/template.rb +1 -0
- data/app/models/ticket/transfers.rb +12 -1
- data/app/models/ticket_summary.rb +7 -1
- data/app/models/ticket_type.rb +137 -0
- data/app/models/user.rb +22 -9
- data/app/models/user_membership.rb +28 -0
- data/app/models/valuation/lifetime_donations.rb +2 -2
- data/app/models/valuation/lifetime_fees.rb +40 -0
- data/app/models/valuation/lifetime_memberships.rb +24 -0
- data/app/models/valuation/lifetime_ticket_value.rb +30 -0
- data/app/models/valuation/lifetime_value.rb +3 -8
- data/app/models/venue.rb +25 -7
- data/app/presenters/event_presenter.rb +1 -1
- data/app/serializers/show_serializer.rb +15 -0
- data/app/views/actions/_action.html.haml +21 -0
- data/app/views/actions/_form.html.haml +47 -0
- data/app/views/actions/_inline.html.haml +1 -0
- data/app/views/actions/_modal.html.haml +5 -0
- data/app/views/actions/get/_show.html.haml +3 -0
- data/app/views/actions/give/_show.html.haml +8 -0
- data/app/views/actions/shared/_show.html.haml +5 -0
- data/app/views/addresses/_address.html.haml +7 -6
- data/app/views/assignments/new.html.haml +31 -0
- data/app/views/console_sales/_aloha.html.haml +26 -0
- data/app/views/console_sales/_cart.html.haml +60 -0
- data/app/views/console_sales/_payment.html.haml +111 -0
- data/app/views/console_sales/_shows.html.haml +24 -0
- data/app/views/console_sales/new.html.haml +143 -0
- data/app/views/contributions/_form.html.haml +3 -3
- data/app/views/contributions/find_person.html.haml +1 -1
- data/app/views/contributions/index.html.haml +8 -6
- data/app/views/contributions/new.html.haml +5 -9
- data/app/views/discounts/_discount_section_fields.html.haml +1 -1
- data/app/views/discounts/_form.html.haml +3 -3
- data/app/views/discounts/index.html.haml +1 -1
- data/app/views/events/_day_date_show.html.haml +2 -2
- data/app/views/events/_discount_section_fields.html.haml +1 -1
- data/app/views/events/_glance.html.haml +28 -37
- data/app/views/events/_header.html.haml +1 -0
- data/app/views/events/_list.html.haml +11 -5
- data/app/views/events/_menu.html.haml +25 -20
- data/app/views/events/_section_fields.html.haml +16 -46
- data/app/views/events/_share_and_sell.haml +9 -5
- data/app/views/events/_ticket_type_fields.html.haml +86 -0
- data/app/views/events/edit.html.haml +13 -3
- data/app/views/events/image.html.haml +4 -3
- data/app/views/events/index.html.haml +20 -3
- data/app/views/events/messages.html.haml +2 -2
- data/app/views/events/prices.html.haml +4 -12
- data/app/views/events/show.html.haml +3 -1
- data/app/views/events/storefront_link.html.haml +1 -1
- data/app/views/events/temp_discount_form.html.haml +1 -1
- data/app/views/events/temp_discounts_index.html.haml +1 -1
- data/app/views/events_pass_types/_form.html.haml +42 -0
- data/app/views/events_pass_types/edit.html.haml +22 -0
- data/app/views/events_pass_types/index.html.haml +47 -0
- data/app/views/events_pass_types/new.html.haml +22 -0
- data/app/views/exchanges/new.html.haml +58 -35
- data/app/views/households/_action.html.haml +24 -0
- data/app/views/households/_edit_modal.html.haml +143 -0
- data/app/views/households/_form.html.haml +26 -0
- data/app/views/households/_header.html.haml +25 -0
- data/app/views/households/_individual_fields.html.haml +8 -0
- data/app/views/households/_list.html.haml +10 -0
- data/app/views/households/_note.html.haml +33 -0
- data/app/views/households/edit.html.haml +1 -0
- data/app/views/households/index.html.haml +13 -0
- data/app/views/households/new.html.haml +14 -0
- data/app/views/households/show.html.haml +72 -0
- data/app/views/households/suggested.html.haml +38 -0
- data/app/views/imports/_export_links.html.haml +3 -0
- data/app/views/imports/donations/_new.html.haml +6 -0
- data/app/views/imports/donations/_pending.html.haml +6 -22
- data/app/views/imports/events/_new.html.haml +7 -1
- data/app/views/imports/events/_pending.html.haml +6 -17
- data/app/views/imports/index.html.haml +6 -3
- data/app/views/imports/people/_imported.html.haml +35 -5
- data/app/views/imports/people/_importing.html.haml +8 -0
- data/app/views/imports/people/_new.html.haml +61 -21
- data/app/views/imports/people/_pending.html.haml +26 -20
- data/app/views/imports/people/_recalled.html.haml +25 -0
- data/app/views/imports/people/_recalling.html.haml +15 -0
- data/app/views/imports/shared/_knowledge_base.haml +11 -2
- data/app/views/imports/shared/_sidebar.html.haml +1 -1
- data/app/views/index/_action.html.haml +7 -0
- data/app/views/index/_recent_activity.html.haml +11 -0
- data/app/views/index/_recent_activity.js.haml +5 -0
- data/app/views/index/dashboard.html.haml +40 -36
- data/app/views/index/recent_activity.js.haml +5 -0
- data/app/views/kits/_list.html.haml +9 -0
- data/app/views/layouts/_flash.html.haml +3 -3
- data/app/views/layouts/_google_analytics.html.haml +5 -2
- data/app/views/layouts/_menu.html.haml +10 -6
- data/app/views/layouts/application.html.haml +6 -3
- data/app/views/layouts/devise_layout.html.haml +2 -2
- data/app/views/layouts/mail.html.haml +20 -0
- data/app/views/layouts/members.html.haml +14 -0
- data/app/views/layouts/storefront.html.haml +39 -3
- data/app/views/members/index/index.html.haml +41 -0
- data/app/views/members/invitations/edit.html.haml +17 -0
- data/app/views/members/invitations/new.html.erb +14 -0
- data/app/views/members/mailer/_invitation_body.html.haml +18 -0
- data/app/views/members/mailer/invitation_instructions.html.haml +6 -0
- data/app/views/members/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/members/passwords/edit.html.haml +18 -0
- data/app/views/members/sessions/new.html.haml +19 -0
- data/app/views/membership_cancellations/_form.html.haml +39 -0
- data/app/views/membership_cancellations/_modal.html.haml +2 -0
- data/app/views/membership_cancellations/_processing.html.haml +12 -0
- data/app/views/membership_cancellations/create.js.erb +3 -0
- data/app/views/membership_cancellations/new.js.erb +3 -0
- data/app/views/membership_comps/confirm.html.haml +86 -0
- data/app/views/membership_comps/create.html.haml +20 -0
- data/app/views/membership_comps/new.html.haml +95 -0
- data/app/views/membership_kits/edit.html.haml +52 -0
- data/app/views/membership_mailer/cancellation_confirmation.html.haml +9 -0
- data/app/views/membership_mailer/cancellation_confirmation.text.haml +6 -0
- data/app/views/membership_mailer/refund_problem.html.haml +18 -0
- data/app/views/membership_mailer/refund_problem.text.haml +14 -0
- data/app/views/membership_types/_form.html.haml +89 -0
- data/app/views/membership_types/_membership_type_fees.html.haml +0 -0
- data/app/views/membership_types/_rolling_membership_type_form.html.haml +5 -0
- data/app/views/membership_types/_seasonal_membership_type_form.html.haml +8 -0
- data/app/views/membership_types/edit.html.haml +4 -0
- data/app/views/membership_types/index.html.haml +28 -0
- data/app/views/membership_types/new.html.haml +4 -0
- data/app/views/membership_types/type.html.haml +19 -0
- data/app/views/memberships/_membership_scripts.js.erb +15 -0
- data/app/views/memberships/index.html.haml +160 -0
- data/app/views/merges/_merge_preview_person.html.haml +11 -6
- data/app/views/merges/find_person.html.haml +5 -5
- data/app/views/merges/new.html.haml +7 -6
- data/app/views/notes/_note.html.haml +29 -0
- data/app/views/order_mailer/confirmation_for.html.haml +34 -22
- data/app/views/order_mailer/confirmation_for.text.haml +7 -4
- data/app/views/order_mailer/confirmation_for_exchange.html.haml +34 -0
- data/app/views/order_mailer/confirmation_for_exchange.text.haml +26 -0
- data/app/views/order_mailer/confirmation_for_refund.html.haml +36 -0
- data/app/views/order_mailer/confirmation_for_refund.text.haml +22 -0
- data/app/views/orders/_item_donations_table.html.haml +27 -0
- data/app/views/orders/_item_memberships_table.html.haml +16 -0
- data/app/views/orders/_item_table.haml +31 -13
- data/app/views/orders/_item_tickets_table.html.haml +27 -0
- data/app/views/orders/_order_sidebar.html.haml +40 -18
- data/app/views/orders/index.html.haml +2 -0
- data/app/views/orders/membership.html.haml +104 -0
- data/app/views/orders/sales.html.haml +15 -13
- data/app/views/orders/show.html.haml +3 -3
- data/app/views/organizations/_connection_form.html.haml +1 -1
- data/app/views/organizations/_form.html.haml +25 -20
- data/app/views/organizations/edit.html.haml +2 -2
- data/app/views/organizations/new.html.haml +1 -1
- data/app/views/organizations/show.html.haml +22 -16
- data/app/views/pass_mailer/pass_info_for.html.haml +21 -0
- data/app/views/pass_types/_form.html.haml +76 -0
- data/app/views/pass_types/_pass_type_fees.html.haml +0 -0
- data/app/views/pass_types/edit.html.haml +4 -0
- data/app/views/pass_types/index.html.haml +34 -0
- data/app/views/pass_types/new.html.haml +4 -0
- data/app/views/passes/index.html.haml +108 -0
- data/app/views/passes_kits/edit.html.haml +30 -0
- data/app/views/passes_reports/index.html.haml +2 -0
- data/app/views/pdfs/member.html.haml +66 -0
- data/app/views/pdfs/member_card_generator/blanks_usa_idc6.html.haml +109 -0
- data/app/views/pdfs/order.html.haml +84 -0
- data/app/views/people/_convert_to_company_modal.html.haml +42 -0
- data/app/views/people/_edit_modal.html.haml +186 -0
- data/app/views/people/_form.html.haml +23 -5
- data/app/views/people/_header.html.haml +50 -0
- data/app/views/people/_household_fields.html.haml +5 -0
- data/app/views/people/_phone_fields.html.haml +10 -0
- data/app/views/people/_relationship_fields.html.haml +14 -0
- data/app/views/people/_work_with_menu.html.haml +39 -0
- data/app/views/people/index.html.haml +18 -6
- data/app/views/people/new.html.haml +2 -2
- data/app/views/people/show.html.haml +149 -28
- data/app/views/people/show.js.haml +5 -0
- data/app/views/producer_mailer/donation_kit_notification.html.haml +8 -0
- data/app/views/producer_mailer/donation_kit_notification.text.erb +8 -0
- data/app/views/producer_mailer/mailchimp_kit_initial_sync_notification.html.haml +21 -0
- data/app/views/producer_mailer/ticket_offer_accepted.html.haml +7 -0
- data/app/views/producer_mailer/ticket_offer_accepted.text.erb +7 -0
- data/app/views/producer_mailer/ticket_offer_rejected.html.haml +11 -0
- data/app/views/producer_mailer/ticket_offer_rejected.text.erb +13 -0
- data/app/views/refunds/new.html.haml +45 -27
- data/app/views/regular_donation_kits/edit.html.haml +140 -0
- data/app/views/relationships/index.html.haml +32 -0
- data/app/views/reports_mailer/_fine_print.html.haml +0 -0
- data/app/views/reports_mailer/daily.html.haml +113 -51
- data/app/views/reports_mailer/daily.text.erb +5 -5
- data/app/views/sales/_boxoffice.html.haml +141 -0
- data/app/views/sales/_doorlist.html.haml +79 -0
- data/app/views/sales/new.html.haml +33 -125
- data/app/views/searches/_form.html.haml +180 -34
- data/app/views/searches/_household.html.haml +7 -0
- data/app/views/searches/_person.html.haml +5 -2
- data/app/views/searches/new.html.haml +1 -1
- data/app/views/searches/show.html.haml +29 -21
- data/app/views/sections/edit.html.haml +1 -1
- data/app/views/sections/new.html.haml +1 -1
- data/app/views/segments/show.html.haml +19 -15
- data/app/views/shared/_door_list_table.haml +19 -6
- data/app/views/shared/_error_messages.html.haml +1 -1
- data/app/views/shared/_event_image_icon.html.haml +1 -3
- data/app/views/shared/_save_save_and_next.html.haml +2 -0
- data/app/views/shared/_show_summary.html.haml +0 -6
- data/app/views/shared/_show_time_and_calendar.html.haml +21 -0
- data/app/views/shared/_submit_cancel.haml +1 -1
- data/app/views/shared/_tags.html.haml +5 -3
- data/app/views/shows/_controls.html.haml +5 -23
- data/app/views/shows/_glance.html.haml +3 -11
- data/app/views/shows/_sections_table.html.haml +89 -0
- data/app/views/shows/_ticket_table.html.haml +12 -88
- data/app/views/shows/_work_with.html.haml +23 -0
- data/app/views/shows/calendar.html.haml +18 -0
- data/app/views/shows/door_list.html.haml +2 -2
- data/app/views/shows/door_list.pdf.haml +29 -0
- data/app/views/shows/index.html.haml +88 -19
- data/app/views/shows/new.html.haml +13 -27
- data/app/views/shows/show.html.haml +11 -11
- data/app/views/slices/index.html.haml +2 -1
- data/app/views/statements/_discounts_table.html.haml +1 -1
- data/app/views/statements/_order_location_table.html.haml +1 -1
- data/app/views/statements/_passes_table.html.haml +22 -0
- data/app/views/statements/_payment_method_table.haml +1 -1
- data/app/views/statements/_ticket_type_table.haml +5 -2
- data/app/views/statements/show.html.haml +5 -2
- data/app/views/store/checkouts/_membership_info.html.haml +12 -0
- data/app/views/store/checkouts/thanks.html.haml +134 -0
- data/app/views/store/donations/index.html.haml +19 -0
- data/app/views/store/events/_calendar.html.haml +4 -5
- data/app/views/store/events/_venue.html.haml +9 -0
- data/app/views/store/events/calendar.html.haml +50 -0
- data/app/views/store/events/index.html.haml +23 -0
- data/app/views/store/events/show.html.haml +26 -185
- data/app/views/store/events/single_show.html.haml +45 -0
- data/app/views/store/memberships/index.html.haml +40 -0
- data/app/views/store/orders/show.html.haml +198 -0
- data/app/views/store/passes/index.html.haml +33 -0
- data/app/views/store/retrievals/index.html.haml +11 -0
- data/app/views/store/shared/_donate_form.html.haml +31 -0
- data/app/views/store/shared/_small_donate_form.html.haml +21 -0
- data/app/views/store/shows/_show.html.haml +50 -0
- data/app/views/store/shows/show.html.haml +1 -0
- data/app/views/ticket_types/edit.html.haml +12 -0
- data/app/views/ticket_types/new.html.haml +13 -0
- data/app/views/user_memberships/_list.html.haml +30 -0
- data/app/views/users/invitations/edit.html.haml +19 -9
- data/app/views/users/mailer/invitation_instructions.html.haml +14 -0
- data/app/views/users/passwords/edit.html.haml +2 -2
- data/app/views/users/registrations/edit.html.erb +3 -3
- data/app/views/users/sessions/new.html.haml +2 -2
- data/app/views/venues/edit.html.haml +6 -4
- data/config/initializers/devise.rb +2 -5
- data/config/initializers/paperclip.rb +69 -0
- data/config/locales/devise.en.yml +1 -1
- data/config/locales/devise_invitable.en.yml +1 -1
- data/config/locales/en.yml +16 -3
- data/config/routes.rb +178 -22
- data/db/migrate/20130311184839_rename_memberships.rb +5 -0
- data/db/migrate/20130329201707_clean_geographic_data.rb +230 -0
- data/db/migrate/20130411162346_add_country_zip_state_phone_number_discipline_to_organizations.rb +9 -0
- data/db/migrate/20130412145428_massage_action_subtypes.rb +15 -0
- data/db/migrate/20130412184415_add_first_name_and_last_name_to_users.rb +6 -0
- data/db/migrate/20130420232537_add_starred_to_note.rb +5 -0
- data/db/migrate/20130425153848_add_notes_to_orders.rb +5 -0
- data/db/migrate/20130506173918_add_token_to_cart.rb +6 -0
- data/db/migrate/20130508180421_ticket_types_ahoy.rb +17 -0
- data/db/migrate/20130508194552_add_members_to_section.rb +6 -0
- data/db/migrate/20130514153006_add_import_messages.rb +17 -0
- data/db/migrate/20130520190452_add_ticket_type_to_tickets.rb +6 -0
- data/db/migrate/20130521185848_add_sti_to_cart.rb +12 -0
- data/db/migrate/20130526021126_add_validated_to_ticket.rb +5 -0
- data/db/migrate/20130528193811_add_widget_requests.rb +12 -0
- data/db/migrate/20130530011409_add_ticket_types_to_discounts.rb +5 -0
- data/db/migrate/20130531160800_migrate_to_ticket_types.rb +59 -0
- data/db/migrate/20130531160801_drop_price_from_ticket.rb +5 -0
- data/db/migrate/20130531160802_remove_price_from_section.rb +5 -0
- data/db/migrate/20130531180955_add_defaults_to_people_types.rb +21 -0
- data/db/migrate/20130604161411_add_validated_action_to_ticket.rb +5 -0
- data/db/migrate/20130607180250_change_institution_to_company.rb +9 -0
- data/db/migrate/20130609233536_revenue_applies_at.rb +11 -0
- data/db/migrate/20130611175122_add_more_indexes.rb +8 -0
- data/db/migrate/20130612183117_add_types_to_searches.rb +6 -0
- data/db/migrate/20130712145416_add_middle_name_and_suffix_to_people.rb +6 -0
- data/db/migrate/20130722153731_add_autentication_token_to_users.rb +5 -0
- data/db/migrate/20130722182255_create_membership_types.rb +18 -0
- data/db/migrate/20130723182754_create_slugged_slugs.rb +20 -0
- data/db/migrate/20130723182811_add_cached_slug_to_organizations.rb +16 -0
- data/db/migrate/20130723212712_add_qr_code_to_tickets.rb +9 -0
- data/db/migrate/20130725012338_create_new_memberships.rb +28 -0
- data/db/migrate/20130725013145_devise_create_members.rb +41 -0
- data/db/migrate/20130729140618_convert_to_company.rb +5 -0
- data/db/migrate/20130731145336_last_member_number.rb +5 -0
- data/db/migrate/20130731153806_add_member_number.rb +5 -0
- data/db/migrate/20130801194634_make_events_public.rb +5 -0
- data/db/migrate/20130802235709_add_memberships_to_search.rb +9 -0
- data/db/migrate/20130808002742_add_lifetime_ticket_value_to_person.rb +9 -0
- data/db/migrate/20130808005856_add_members_only_to_events.rb +5 -0
- data/db/migrate/20130820011240_add_uuid_to_tickets.rb +13 -0
- data/db/migrate/20130820025134_make_ticket_uuid_not_null.rb +11 -0
- data/db/migrate/20130823191625_add_pdf_to_orders.rb +5 -0
- data/db/migrate/20130827190839_add_fee_to_tickets_and_donations.rb +8 -0
- data/db/migrate/20130829015011_migrate_fees_to_items.rb +5 -0
- data/db/migrate/20130916194547_add_relationships.rb +21 -0
- data/db/migrate/20130917165559_add_service_fee_to_memberships.rb +5 -0
- data/db/migrate/20131002191646_create_show_stats_view.rb +16 -0
- data/db/migrate/20131003134821_add_relationships_to_search.rb +7 -0
- data/db/migrate/20131003200508_add_starred_to_relationships.rb +5 -0
- data/db/migrate/20131007141421_add_counters_to_member.rb +7 -0
- data/db/migrate/20131007144456_remove_expires_at_from_membership.rb +6 -0
- data/db/migrate/20131011154027_add_purchased_to_searches.rb +5 -0
- data/db/migrate/20131013144010_add_type_to_membership_type.rb +5 -0
- data/db/migrate/20131013150230_add_duration_to_membership_type.rb +6 -0
- data/db/migrate/20131013192807_change_number_of_shows_to_tickets.rb +5 -0
- data/db/migrate/20131015151550_add_households.rb +18 -0
- data/db/migrate/20131022183913_add_search_output_options.rb +24 -0
- data/db/migrate/20131023200559_add_admin_to_user_memberships.rb +14 -0
- data/db/migrate/20131025162155_default_search_filter_values.rb +10 -0
- data/db/migrate/20131025180139_unique_household_names.rb +8 -0
- data/db/migrate/20131029173612_add_sales_start_to_membership_typ.rb +6 -0
- data/db/migrate/20131106191847_add_suggested_households.rb +13 -0
- data/db/migrate/20131127162818_add_buyer_id_index_to_tickets.rb +5 -0
- data/db/migrate/20131127164000_member_tickets.rb +9 -0
- data/db/migrate/20131204162642_add_shared_address.rb +9 -0
- data/db/migrate/20131206153323_add_membership_kit.rb +5 -0
- data/db/migrate/20131206175325_add_marketing_to_membership_type.rb +6 -0
- data/db/migrate/20131210212342_add_show_fee_to_memberhsip_type.rb +5 -0
- data/db/migrate/20131210222814_add_renewal_price_to_membership_type.rb +6 -0
- data/db/migrate/20131212164553_add_copy_to_individuals_option.rb +5 -0
- data/db/migrate/20131223215615_goodbye_order_view.rb +6 -0
- data/db/migrate/20140114011856_add_welcome_message_to_memberships.rb +5 -0
- data/db/migrate/20140114212127_add_send_email_to_memberships.rb +5 -0
- data/db/migrate/20140125183606_index_memberships_and_types.rb +6 -0
- data/db/migrate/20140128213101_add_pdf_to_members.rb +5 -0
- data/db/migrate/20140128223140_add_uuid_to_member.rb +6 -0
- data/db/migrate/20140128223948_add_qr_code_to_member.rb +9 -0
- data/db/migrate/20140207135731_update_items_view.rb +38 -0
- data/db/migrate/20140210154723_add_cached_stats.rb +5 -0
- data/db/migrate/20140218202726_cache_stats.rb +7 -0
- data/db/migrate/20140304171625_passes_ahoy.rb +52 -0
- data/db/migrate/20140304174807_add_passes_kit.rb +5 -0
- data/db/migrate/20140307144454_add_events_pass_types.rb +9 -0
- data/db/migrate/20140307193350_add_pass_id_to_cart.rb +7 -0
- data/db/migrate/20140314162422_add_total_paid_to_membership.rb +13 -0
- data/db/migrate/20140319191237_add_show_dates_to_advanced_search.rb +6 -0
- data/db/migrate/20140328172333_add_cols_to_events_pass_types.rb +6 -0
- data/db/migrate/20140328174217_add_deleted_at_to_ept.rb +9 -0
- data/db/migrate/20140328185432_add_active_to_ept.rb +5 -0
- data/db/migrate/20140328192612_add_pass_type_id_to_search.rb +5 -0
- data/db/migrate/20140415212841_add_min_max_start_dates_to_searches.artfully_ose_engine.rb +6 -0
- data/db/migrate/20140422193345_add_email_copy_to_pass_type.rb +5 -0
- data/db/migrate/20140423181639_add_min_max_end_dates_to_searches.artfully_ose_engine.rb +6 -0
- data/db/migrate/20140423185921_add_cached_stats_to_event.rb +9 -0
- data/db/migrate/20140424174423_add_lifetime_memberships_to_people.artfully_ose_engine.rb +5 -0
- data/db/migrate/20140506155241_add_lpt_to_membership_type.rb +5 -0
- data/db/migrate/20140507184646_add_bday_attributes_to_person.rb +7 -0
- data/db/migrate/20140507201048_add_check_number_to_orders.rb +5 -0
- data/db/migrate/20140515143651_remove_show_stats_view.rb +6 -0
- data/db/migrate/20140521195853_add_deleted_at_to_pass_type.rb +5 -0
- data/db/migrate/20140522205554_add_limit_to_events_pass_types.rb +5 -0
- data/db/migrate/20140523180444_remove_tickets_purchased_from_passes.rb +5 -0
- data/db/migrate/20140603200735_add_subtitle_to_events.rb +5 -0
- data/db/migrate/20140619194127_add_do_not_call_to_people.artfully_ose_engine.rb +5 -0
- data/db/migrate/20140623160543_add_index_to_items.rb +7 -0
- data/lib/artfully_ose.rb +7 -4
- data/lib/artfully_ose/common_abilities.rb +8 -2
- data/lib/artfully_ose/engine.rb +34 -10
- data/lib/artfully_ose/version.rb +1 -1
- data/spec/factories/action_factories.rb +19 -0
- data/spec/factories/address_factories.rb +11 -0
- data/spec/factories/cart_factories.rb +26 -0
- data/spec/factories/chart_factories.rb +52 -0
- data/spec/factories/discount_factories.rb +11 -0
- data/spec/factories/donation_factories.rb +14 -0
- data/spec/factories/event_factories.rb +29 -0
- data/spec/factories/household_factories.rb +8 -0
- data/spec/factories/import_factories.rb +61 -0
- data/spec/factories/item_factories.rb +51 -0
- data/spec/factories/kit_factories.rb +33 -0
- data/spec/factories/member_factories.rb +19 -0
- data/spec/factories/membership_factories.rb +9 -0
- data/spec/factories/membership_type_factories.rb +18 -0
- data/spec/factories/order_factories.rb +40 -0
- data/spec/factories/organization_factories.rb +48 -0
- data/spec/factories/pass_type_factories.rb +11 -0
- data/spec/factories/payments_factories.rb +97 -0
- data/spec/factories/person_factories.rb +47 -0
- data/spec/factories/phone_factories.rb +6 -0
- data/spec/factories/section_factories.rb +21 -0
- data/spec/factories/segment_factories.rb +6 -0
- data/spec/factories/show_factories.rb +33 -0
- data/spec/factories/ticket_factories.rb +57 -0
- data/spec/factories/ticket_offer_factories.rb +16 -0
- data/spec/factories/ticket_type_factories.rb +8 -0
- data/spec/factories/user_factories.rb +24 -0
- metadata +522 -49
- data/app/assets/javascripts/box-office.js +0 -244
- data/app/assets/javascripts/jquery-lib/fullcalendar.min.js +0 -113
- data/app/assets/javascripts/jquery-lib/jquery-ui-1.8.14.custom.min.js +0 -570
- data/app/assets/javascripts/jquery_ujs.js +0 -316
- data/app/assets/stylesheets/font-awesome.sass +0 -759
- data/app/models/adjustments.rb +0 -10
- data/app/models/carts/cart.rb +0 -171
- data/app/models/database_views/order_view.rb +0 -34
- data/app/views/actions/_list.html.haml +0 -25
- data/app/views/actions/edit.html.haml +0 -19
- data/app/views/actions/new.html.haml +0 -19
- data/app/views/memberships/_list.html.haml +0 -31
- data/app/views/notes/_list.html.haml +0 -30
- data/app/views/notes/edit.html.haml +0 -14
- data/app/views/notes/new.html.haml +0 -14
- data/app/views/orders/_grouped_form_help.haml +0 -4
- data/app/views/people/_person_summary_sidebar.html.haml +0 -86
- data/app/views/people/edit.html.haml +0 -10
- data/app/views/shared/_new_person_popup.html.haml +0 -21
- data/app/views/store/events/_show.html.haml +0 -43
- data/app/views/users/mailer/invitation_instructions.html.erb +0 -8
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===================================================
|
2
|
-
* bootstrap-transition.js v2.
|
2
|
+
* bootstrap-transition.js v2.3.1
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
4
4
|
* ===================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -17,39 +17,48 @@
|
|
17
17
|
* limitations under the License.
|
18
18
|
* ========================================================== */
|
19
19
|
|
20
|
-
!function( $ ) {
|
21
20
|
|
22
|
-
|
21
|
+
!function ($) {
|
22
|
+
|
23
|
+
"use strict"; // jshint ;_;
|
23
24
|
|
24
|
-
"use strict"
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
|
27
|
+
* ======================================================= */
|
28
|
+
|
29
|
+
$(function () {
|
28
30
|
|
29
31
|
$.support.transition = (function () {
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
32
|
+
|
33
|
+
var transitionEnd = (function () {
|
34
|
+
|
35
|
+
var el = document.createElement('bootstrap')
|
36
|
+
, transEndEventNames = {
|
37
|
+
'WebkitTransition' : 'webkitTransitionEnd'
|
38
|
+
, 'MozTransition' : 'transitionend'
|
39
|
+
, 'OTransition' : 'oTransitionEnd otransitionend'
|
40
|
+
, 'transition' : 'transitionend'
|
41
|
+
}
|
42
|
+
, name
|
43
|
+
|
44
|
+
for (name in transEndEventNames){
|
45
|
+
if (el.style[name] !== undefined) {
|
46
|
+
return transEndEventNames[name]
|
43
47
|
}
|
44
|
-
|
45
|
-
|
48
|
+
}
|
49
|
+
|
50
|
+
}())
|
51
|
+
|
52
|
+
return transitionEnd && {
|
53
|
+
end: transitionEnd
|
46
54
|
}
|
55
|
+
|
47
56
|
})()
|
48
57
|
|
49
58
|
})
|
50
59
|
|
51
|
-
}(
|
52
|
-
* bootstrap-alert.js v2.
|
60
|
+
}(window.jQuery);/* ==========================================================
|
61
|
+
* bootstrap-alert.js v2.3.1
|
53
62
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
54
63
|
* ==========================================================
|
55
64
|
* Copyright 2012 Twitter, Inc.
|
@@ -68,61 +77,59 @@
|
|
68
77
|
* ========================================================== */
|
69
78
|
|
70
79
|
|
71
|
-
!function(
|
80
|
+
!function ($) {
|
81
|
+
|
82
|
+
"use strict"; // jshint ;_;
|
72
83
|
|
73
|
-
"use strict"
|
74
84
|
|
75
85
|
/* ALERT CLASS DEFINITION
|
76
86
|
* ====================== */
|
77
87
|
|
78
88
|
var dismiss = '[data-dismiss="alert"]'
|
79
|
-
, Alert = function (
|
89
|
+
, Alert = function (el) {
|
80
90
|
$(el).on('click', dismiss, this.close)
|
81
91
|
}
|
82
92
|
|
83
|
-
Alert.prototype = {
|
93
|
+
Alert.prototype.close = function (e) {
|
94
|
+
var $this = $(this)
|
95
|
+
, selector = $this.attr('data-target')
|
96
|
+
, $parent
|
84
97
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
, selector = $this.attr('data-target')
|
90
|
-
, $parent
|
98
|
+
if (!selector) {
|
99
|
+
selector = $this.attr('href')
|
100
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
101
|
+
}
|
91
102
|
|
92
|
-
|
93
|
-
selector = $this.attr('href')
|
94
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
95
|
-
}
|
103
|
+
$parent = $(selector)
|
96
104
|
|
97
|
-
|
98
|
-
$parent.trigger('close')
|
105
|
+
e && e.preventDefault()
|
99
106
|
|
100
|
-
|
107
|
+
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
|
101
108
|
|
102
|
-
|
109
|
+
$parent.trigger(e = $.Event('close'))
|
103
110
|
|
104
|
-
|
105
|
-
.trigger('close')
|
106
|
-
.removeClass('in')
|
111
|
+
if (e.isDefaultPrevented()) return
|
107
112
|
|
108
|
-
|
109
|
-
$parent
|
110
|
-
.trigger('closed')
|
111
|
-
.remove()
|
112
|
-
}
|
113
|
+
$parent.removeClass('in')
|
113
114
|
|
114
|
-
|
115
|
-
|
116
|
-
|
115
|
+
function removeElement() {
|
116
|
+
$parent
|
117
|
+
.trigger('closed')
|
118
|
+
.remove()
|
117
119
|
}
|
118
120
|
|
121
|
+
$.support.transition && $parent.hasClass('fade') ?
|
122
|
+
$parent.on($.support.transition.end, removeElement) :
|
123
|
+
removeElement()
|
119
124
|
}
|
120
125
|
|
121
126
|
|
122
127
|
/* ALERT PLUGIN DEFINITION
|
123
128
|
* ======================= */
|
124
129
|
|
125
|
-
$.fn.alert
|
130
|
+
var old = $.fn.alert
|
131
|
+
|
132
|
+
$.fn.alert = function (option) {
|
126
133
|
return this.each(function () {
|
127
134
|
var $this = $(this)
|
128
135
|
, data = $this.data('alert')
|
@@ -134,15 +141,22 @@
|
|
134
141
|
$.fn.alert.Constructor = Alert
|
135
142
|
|
136
143
|
|
144
|
+
/* ALERT NO CONFLICT
|
145
|
+
* ================= */
|
146
|
+
|
147
|
+
$.fn.alert.noConflict = function () {
|
148
|
+
$.fn.alert = old
|
149
|
+
return this
|
150
|
+
}
|
151
|
+
|
152
|
+
|
137
153
|
/* ALERT DATA-API
|
138
154
|
* ============== */
|
139
155
|
|
140
|
-
$(
|
141
|
-
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
|
142
|
-
})
|
156
|
+
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
|
143
157
|
|
144
|
-
}(
|
145
|
-
* bootstrap-button.js v2.
|
158
|
+
}(window.jQuery);/* ============================================================
|
159
|
+
* bootstrap-button.js v2.3.1
|
146
160
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
147
161
|
* ============================================================
|
148
162
|
* Copyright 2012 Twitter, Inc.
|
@@ -160,58 +174,56 @@
|
|
160
174
|
* limitations under the License.
|
161
175
|
* ============================================================ */
|
162
176
|
|
163
|
-
!function( $ ){
|
164
177
|
|
165
|
-
|
178
|
+
!function ($) {
|
179
|
+
|
180
|
+
"use strict"; // jshint ;_;
|
181
|
+
|
166
182
|
|
167
183
|
/* BUTTON PUBLIC CLASS DEFINITION
|
168
184
|
* ============================== */
|
169
185
|
|
170
|
-
var Button = function (
|
186
|
+
var Button = function (element, options) {
|
171
187
|
this.$element = $(element)
|
172
188
|
this.options = $.extend({}, $.fn.button.defaults, options)
|
173
189
|
}
|
174
190
|
|
175
|
-
Button.prototype = {
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
var d = 'disabled'
|
181
|
-
, $el = this.$element
|
182
|
-
, data = $el.data()
|
183
|
-
, val = $el.is('input') ? 'val' : 'html'
|
191
|
+
Button.prototype.setState = function (state) {
|
192
|
+
var d = 'disabled'
|
193
|
+
, $el = this.$element
|
194
|
+
, data = $el.data()
|
195
|
+
, val = $el.is('input') ? 'val' : 'html'
|
184
196
|
|
185
|
-
|
186
|
-
|
197
|
+
state = state + 'Text'
|
198
|
+
data.resetText || $el.data('resetText', $el[val]())
|
187
199
|
|
188
|
-
|
200
|
+
$el[val](data[state] || this.options[state])
|
189
201
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
202
|
+
// push to event loop to allow forms to submit
|
203
|
+
setTimeout(function () {
|
204
|
+
state == 'loadingText' ?
|
205
|
+
$el.addClass(d).attr(d, d) :
|
206
|
+
$el.removeClass(d).removeAttr(d)
|
207
|
+
}, 0)
|
208
|
+
}
|
197
209
|
|
198
|
-
|
199
|
-
|
210
|
+
Button.prototype.toggle = function () {
|
211
|
+
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
|
200
212
|
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
this.$element.toggleClass('active')
|
206
|
-
}
|
213
|
+
$parent && $parent
|
214
|
+
.find('.active')
|
215
|
+
.removeClass('active')
|
207
216
|
|
217
|
+
this.$element.toggleClass('active')
|
208
218
|
}
|
209
219
|
|
210
220
|
|
211
221
|
/* BUTTON PLUGIN DEFINITION
|
212
222
|
* ======================== */
|
213
223
|
|
214
|
-
$.fn.button
|
224
|
+
var old = $.fn.button
|
225
|
+
|
226
|
+
$.fn.button = function (option) {
|
215
227
|
return this.each(function () {
|
216
228
|
var $this = $(this)
|
217
229
|
, data = $this.data('button')
|
@@ -229,19 +241,26 @@
|
|
229
241
|
$.fn.button.Constructor = Button
|
230
242
|
|
231
243
|
|
244
|
+
/* BUTTON NO CONFLICT
|
245
|
+
* ================== */
|
246
|
+
|
247
|
+
$.fn.button.noConflict = function () {
|
248
|
+
$.fn.button = old
|
249
|
+
return this
|
250
|
+
}
|
251
|
+
|
252
|
+
|
232
253
|
/* BUTTON DATA-API
|
233
254
|
* =============== */
|
234
255
|
|
235
|
-
$(function () {
|
236
|
-
$
|
237
|
-
|
238
|
-
|
239
|
-
$btn.button('toggle')
|
240
|
-
})
|
256
|
+
$(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
|
257
|
+
var $btn = $(e.target)
|
258
|
+
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
259
|
+
$btn.button('toggle')
|
241
260
|
})
|
242
261
|
|
243
|
-
}(
|
244
|
-
* bootstrap-carousel.js v2.
|
262
|
+
}(window.jQuery);/* ==========================================================
|
263
|
+
* bootstrap-carousel.js v2.3.1
|
245
264
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
246
265
|
* ==========================================================
|
247
266
|
* Copyright 2012 Twitter, Inc.
|
@@ -260,17 +279,18 @@
|
|
260
279
|
* ========================================================== */
|
261
280
|
|
262
281
|
|
263
|
-
!function(
|
282
|
+
!function ($) {
|
283
|
+
|
284
|
+
"use strict"; // jshint ;_;
|
264
285
|
|
265
|
-
"use strict"
|
266
286
|
|
267
287
|
/* CAROUSEL CLASS DEFINITION
|
268
288
|
* ========================= */
|
269
289
|
|
270
290
|
var Carousel = function (element, options) {
|
271
291
|
this.$element = $(element)
|
272
|
-
this
|
273
|
-
this.options
|
292
|
+
this.$indicators = this.$element.find('.carousel-indicators')
|
293
|
+
this.options = options
|
274
294
|
this.options.pause == 'hover' && this.$element
|
275
295
|
.on('mouseenter', $.proxy(this.pause, this))
|
276
296
|
.on('mouseleave', $.proxy(this.cycle, this))
|
@@ -278,18 +298,26 @@
|
|
278
298
|
|
279
299
|
Carousel.prototype = {
|
280
300
|
|
281
|
-
cycle: function () {
|
282
|
-
|
301
|
+
cycle: function (e) {
|
302
|
+
if (!e) this.paused = false
|
303
|
+
if (this.interval) clearInterval(this.interval);
|
304
|
+
this.options.interval
|
305
|
+
&& !this.paused
|
306
|
+
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
283
307
|
return this
|
284
308
|
}
|
285
309
|
|
310
|
+
, getActiveIndex: function () {
|
311
|
+
this.$active = this.$element.find('.item.active')
|
312
|
+
this.$items = this.$active.parent().children()
|
313
|
+
return this.$items.index(this.$active)
|
314
|
+
}
|
315
|
+
|
286
316
|
, to: function (pos) {
|
287
|
-
var
|
288
|
-
, children = $active.parent().children()
|
289
|
-
, activePos = children.index($active)
|
317
|
+
var activeIndex = this.getActiveIndex()
|
290
318
|
, that = this
|
291
319
|
|
292
|
-
if (pos > (
|
320
|
+
if (pos > (this.$items.length - 1) || pos < 0) return
|
293
321
|
|
294
322
|
if (this.sliding) {
|
295
323
|
return this.$element.one('slid', function () {
|
@@ -297,14 +325,19 @@
|
|
297
325
|
})
|
298
326
|
}
|
299
327
|
|
300
|
-
if (
|
328
|
+
if (activeIndex == pos) {
|
301
329
|
return this.pause().cycle()
|
302
330
|
}
|
303
331
|
|
304
|
-
return this.slide(pos >
|
332
|
+
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
|
305
333
|
}
|
306
334
|
|
307
|
-
, pause: function () {
|
335
|
+
, pause: function (e) {
|
336
|
+
if (!e) this.paused = true
|
337
|
+
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
|
338
|
+
this.$element.trigger($.support.transition.end)
|
339
|
+
this.cycle(true)
|
340
|
+
}
|
308
341
|
clearInterval(this.interval)
|
309
342
|
this.interval = null
|
310
343
|
return this
|
@@ -321,12 +354,13 @@
|
|
321
354
|
}
|
322
355
|
|
323
356
|
, slide: function (type, next) {
|
324
|
-
var $active = this.$element.find('.active')
|
357
|
+
var $active = this.$element.find('.item.active')
|
325
358
|
, $next = next || $active[type]()
|
326
359
|
, isCycling = this.interval
|
327
360
|
, direction = type == 'next' ? 'left' : 'right'
|
328
361
|
, fallback = type == 'next' ? 'first' : 'last'
|
329
362
|
, that = this
|
363
|
+
, e
|
330
364
|
|
331
365
|
this.sliding = true
|
332
366
|
|
@@ -334,26 +368,41 @@
|
|
334
368
|
|
335
369
|
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
336
370
|
|
371
|
+
e = $.Event('slide', {
|
372
|
+
relatedTarget: $next[0]
|
373
|
+
, direction: direction
|
374
|
+
})
|
375
|
+
|
337
376
|
if ($next.hasClass('active')) return
|
338
377
|
|
339
|
-
if (
|
340
|
-
this.$
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
}
|
378
|
+
if (this.$indicators.length) {
|
379
|
+
this.$indicators.find('.active').removeClass('active')
|
380
|
+
this.$element.one('slid', function () {
|
381
|
+
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
|
382
|
+
$nextIndicator && $nextIndicator.addClass('active')
|
383
|
+
})
|
384
|
+
}
|
385
|
+
|
386
|
+
if ($.support.transition && this.$element.hasClass('slide')) {
|
387
|
+
this.$element.trigger(e)
|
388
|
+
if (e.isDefaultPrevented()) return
|
346
389
|
$next.addClass(type)
|
347
390
|
$next[0].offsetWidth // force reflow
|
348
391
|
$active.addClass(direction)
|
349
392
|
$next.addClass(direction)
|
350
|
-
this.$element.trigger('slide')
|
351
393
|
this.$element.one($.support.transition.end, function () {
|
352
394
|
$next.removeClass([type, direction].join(' ')).addClass('active')
|
353
395
|
$active.removeClass(['active', direction].join(' '))
|
354
396
|
that.sliding = false
|
355
397
|
setTimeout(function () { that.$element.trigger('slid') }, 0)
|
356
398
|
})
|
399
|
+
} else {
|
400
|
+
this.$element.trigger(e)
|
401
|
+
if (e.isDefaultPrevented()) return
|
402
|
+
$active.removeClass('active')
|
403
|
+
$next.addClass('active')
|
404
|
+
this.sliding = false
|
405
|
+
this.$element.trigger('slid')
|
357
406
|
}
|
358
407
|
|
359
408
|
isCycling && this.cycle()
|
@@ -367,15 +416,18 @@
|
|
367
416
|
/* CAROUSEL PLUGIN DEFINITION
|
368
417
|
* ========================== */
|
369
418
|
|
370
|
-
$.fn.carousel
|
419
|
+
var old = $.fn.carousel
|
420
|
+
|
421
|
+
$.fn.carousel = function (option) {
|
371
422
|
return this.each(function () {
|
372
423
|
var $this = $(this)
|
373
424
|
, data = $this.data('carousel')
|
374
|
-
, options = typeof option == 'object' && option
|
425
|
+
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
|
426
|
+
, action = typeof option == 'string' ? option : options.slide
|
375
427
|
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
376
428
|
if (typeof option == 'number') data.to(option)
|
377
|
-
else if (
|
378
|
-
else data.cycle()
|
429
|
+
else if (action) data[action]()
|
430
|
+
else if (options.interval) data.pause().cycle()
|
379
431
|
})
|
380
432
|
}
|
381
433
|
|
@@ -387,21 +439,34 @@
|
|
387
439
|
$.fn.carousel.Constructor = Carousel
|
388
440
|
|
389
441
|
|
442
|
+
/* CAROUSEL NO CONFLICT
|
443
|
+
* ==================== */
|
444
|
+
|
445
|
+
$.fn.carousel.noConflict = function () {
|
446
|
+
$.fn.carousel = old
|
447
|
+
return this
|
448
|
+
}
|
449
|
+
|
390
450
|
/* CAROUSEL DATA-API
|
391
451
|
* ================= */
|
392
452
|
|
393
|
-
$(function () {
|
394
|
-
$
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
453
|
+
$(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
|
454
|
+
var $this = $(this), href
|
455
|
+
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
456
|
+
, options = $.extend({}, $target.data(), $this.data())
|
457
|
+
, slideIndex
|
458
|
+
|
459
|
+
$target.carousel(options)
|
460
|
+
|
461
|
+
if (slideIndex = $this.attr('data-slide-to')) {
|
462
|
+
$target.data('carousel').pause().to(slideIndex).cycle()
|
463
|
+
}
|
464
|
+
|
465
|
+
e.preventDefault()
|
401
466
|
})
|
402
467
|
|
403
|
-
}(
|
404
|
-
* bootstrap-collapse.js v2.
|
468
|
+
}(window.jQuery);/* =============================================================
|
469
|
+
* bootstrap-collapse.js v2.3.1
|
405
470
|
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
406
471
|
* =============================================================
|
407
472
|
* Copyright 2012 Twitter, Inc.
|
@@ -419,16 +484,21 @@
|
|
419
484
|
* limitations under the License.
|
420
485
|
* ============================================================ */
|
421
486
|
|
422
|
-
!function( $ ){
|
423
487
|
|
424
|
-
|
488
|
+
!function ($) {
|
489
|
+
|
490
|
+
"use strict"; // jshint ;_;
|
491
|
+
|
492
|
+
|
493
|
+
/* COLLAPSE PUBLIC CLASS DEFINITION
|
494
|
+
* ================================ */
|
425
495
|
|
426
|
-
var Collapse = function (
|
427
|
-
|
496
|
+
var Collapse = function (element, options) {
|
497
|
+
this.$element = $(element)
|
428
498
|
this.options = $.extend({}, $.fn.collapse.defaults, options)
|
429
499
|
|
430
|
-
if (this.options
|
431
|
-
this.$parent = $(this.options
|
500
|
+
if (this.options.parent) {
|
501
|
+
this.$parent = $(this.options.parent)
|
432
502
|
}
|
433
503
|
|
434
504
|
this.options.toggle && this.toggle()
|
@@ -444,31 +514,39 @@
|
|
444
514
|
}
|
445
515
|
|
446
516
|
, show: function () {
|
447
|
-
var dimension
|
448
|
-
, scroll
|
449
|
-
, actives
|
517
|
+
var dimension
|
518
|
+
, scroll
|
519
|
+
, actives
|
450
520
|
, hasData
|
451
521
|
|
522
|
+
if (this.transitioning || this.$element.hasClass('in')) return
|
523
|
+
|
524
|
+
dimension = this.dimension()
|
525
|
+
scroll = $.camelCase(['scroll', dimension].join('-'))
|
526
|
+
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
|
527
|
+
|
452
528
|
if (actives && actives.length) {
|
453
529
|
hasData = actives.data('collapse')
|
530
|
+
if (hasData && hasData.transitioning) return
|
454
531
|
actives.collapse('hide')
|
455
532
|
hasData || actives.data('collapse', null)
|
456
533
|
}
|
457
534
|
|
458
535
|
this.$element[dimension](0)
|
459
|
-
this.transition('addClass', 'show', 'shown')
|
460
|
-
this.$element[dimension](this.$element[0][scroll])
|
461
|
-
|
536
|
+
this.transition('addClass', $.Event('show'), 'shown')
|
537
|
+
$.support.transition && this.$element[dimension](this.$element[0][scroll])
|
462
538
|
}
|
463
539
|
|
464
540
|
, hide: function () {
|
465
|
-
var dimension
|
541
|
+
var dimension
|
542
|
+
if (this.transitioning || !this.$element.hasClass('in')) return
|
543
|
+
dimension = this.dimension()
|
466
544
|
this.reset(this.$element[dimension]())
|
467
|
-
this.transition('removeClass', 'hide', 'hidden')
|
545
|
+
this.transition('removeClass', $.Event('hide'), 'hidden')
|
468
546
|
this.$element[dimension](0)
|
469
547
|
}
|
470
548
|
|
471
|
-
, reset: function (
|
549
|
+
, reset: function (size) {
|
472
550
|
var dimension = this.dimension()
|
473
551
|
|
474
552
|
this.$element
|
@@ -476,41 +554,49 @@
|
|
476
554
|
[dimension](size || 'auto')
|
477
555
|
[0].offsetWidth
|
478
556
|
|
479
|
-
this.$element[size ? 'addClass' : 'removeClass']('collapse')
|
557
|
+
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
|
480
558
|
|
481
559
|
return this
|
482
560
|
}
|
483
561
|
|
484
|
-
, transition: function (
|
562
|
+
, transition: function (method, startEvent, completeEvent) {
|
485
563
|
var that = this
|
486
564
|
, complete = function () {
|
487
|
-
if (startEvent == 'show') that.reset()
|
565
|
+
if (startEvent.type == 'show') that.reset()
|
566
|
+
that.transitioning = 0
|
488
567
|
that.$element.trigger(completeEvent)
|
489
568
|
}
|
490
569
|
|
491
|
-
this.$element
|
492
|
-
|
493
|
-
|
570
|
+
this.$element.trigger(startEvent)
|
571
|
+
|
572
|
+
if (startEvent.isDefaultPrevented()) return
|
573
|
+
|
574
|
+
this.transitioning = 1
|
575
|
+
|
576
|
+
this.$element[method]('in')
|
494
577
|
|
495
578
|
$.support.transition && this.$element.hasClass('collapse') ?
|
496
579
|
this.$element.one($.support.transition.end, complete) :
|
497
580
|
complete()
|
498
|
-
|
581
|
+
}
|
499
582
|
|
500
583
|
, toggle: function () {
|
501
584
|
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
502
|
-
|
585
|
+
}
|
503
586
|
|
504
587
|
}
|
505
588
|
|
506
|
-
/* COLLAPSIBLE PLUGIN DEFINITION
|
507
|
-
* ============================== */
|
508
589
|
|
509
|
-
|
590
|
+
/* COLLAPSE PLUGIN DEFINITION
|
591
|
+
* ========================== */
|
592
|
+
|
593
|
+
var old = $.fn.collapse
|
594
|
+
|
595
|
+
$.fn.collapse = function (option) {
|
510
596
|
return this.each(function () {
|
511
597
|
var $this = $(this)
|
512
598
|
, data = $this.data('collapse')
|
513
|
-
, options = typeof option == 'object' && option
|
599
|
+
, options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
|
514
600
|
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
|
515
601
|
if (typeof option == 'string') data[option]()
|
516
602
|
})
|
@@ -523,22 +609,30 @@
|
|
523
609
|
$.fn.collapse.Constructor = Collapse
|
524
610
|
|
525
611
|
|
526
|
-
/*
|
612
|
+
/* COLLAPSE NO CONFLICT
|
527
613
|
* ==================== */
|
528
614
|
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
615
|
+
$.fn.collapse.noConflict = function () {
|
616
|
+
$.fn.collapse = old
|
617
|
+
return this
|
618
|
+
}
|
619
|
+
|
620
|
+
|
621
|
+
/* COLLAPSE DATA-API
|
622
|
+
* ================= */
|
623
|
+
|
624
|
+
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
625
|
+
var $this = $(this), href
|
626
|
+
, target = $this.attr('data-target')
|
627
|
+
|| e.preventDefault()
|
628
|
+
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
629
|
+
, option = $(target).data('collapse') ? 'toggle' : $this.data()
|
630
|
+
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
631
|
+
$(target).collapse(option)
|
538
632
|
})
|
539
633
|
|
540
|
-
}(
|
541
|
-
* bootstrap-dropdown.js v2.
|
634
|
+
}(window.jQuery);/* ============================================================
|
635
|
+
* bootstrap-dropdown.js v2.3.1
|
542
636
|
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
543
637
|
* ============================================================
|
544
638
|
* Copyright 2012 Twitter, Inc.
|
@@ -557,15 +651,16 @@
|
|
557
651
|
* ============================================================ */
|
558
652
|
|
559
653
|
|
560
|
-
!function(
|
654
|
+
!function ($) {
|
655
|
+
|
656
|
+
"use strict"; // jshint ;_;
|
561
657
|
|
562
|
-
"use strict"
|
563
658
|
|
564
659
|
/* DROPDOWN CLASS DEFINITION
|
565
660
|
* ========================= */
|
566
661
|
|
567
|
-
var toggle = '[data-toggle=
|
568
|
-
, Dropdown = function (
|
662
|
+
var toggle = '[data-toggle=dropdown]'
|
663
|
+
, Dropdown = function (element) {
|
569
664
|
var $el = $(element).on('click.dropdown.data-api', this.toggle)
|
570
665
|
$('html').on('click.dropdown.data-api', function () {
|
571
666
|
$el.parent().removeClass('open')
|
@@ -576,39 +671,100 @@
|
|
576
671
|
|
577
672
|
constructor: Dropdown
|
578
673
|
|
579
|
-
, toggle: function (
|
674
|
+
, toggle: function (e) {
|
580
675
|
var $this = $(this)
|
581
|
-
, selector = $this.attr('data-target')
|
582
676
|
, $parent
|
583
677
|
, isActive
|
584
678
|
|
585
|
-
if (
|
586
|
-
selector = $this.attr('href')
|
587
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
588
|
-
}
|
679
|
+
if ($this.is('.disabled, :disabled')) return
|
589
680
|
|
590
|
-
$parent = $
|
591
|
-
$parent.length || ($parent = $this.parent())
|
681
|
+
$parent = getParent($this)
|
592
682
|
|
593
683
|
isActive = $parent.hasClass('open')
|
594
684
|
|
595
685
|
clearMenus()
|
596
|
-
|
686
|
+
|
687
|
+
if (!isActive) {
|
688
|
+
$parent.toggleClass('open')
|
689
|
+
}
|
690
|
+
|
691
|
+
$this.focus()
|
597
692
|
|
598
693
|
return false
|
599
694
|
}
|
600
695
|
|
696
|
+
, keydown: function (e) {
|
697
|
+
var $this
|
698
|
+
, $items
|
699
|
+
, $active
|
700
|
+
, $parent
|
701
|
+
, isActive
|
702
|
+
, index
|
703
|
+
|
704
|
+
if (!/(38|40|27)/.test(e.keyCode)) return
|
705
|
+
|
706
|
+
$this = $(this)
|
707
|
+
|
708
|
+
e.preventDefault()
|
709
|
+
e.stopPropagation()
|
710
|
+
|
711
|
+
if ($this.is('.disabled, :disabled')) return
|
712
|
+
|
713
|
+
$parent = getParent($this)
|
714
|
+
|
715
|
+
isActive = $parent.hasClass('open')
|
716
|
+
|
717
|
+
if (!isActive || (isActive && e.keyCode == 27)) {
|
718
|
+
if (e.which == 27) $parent.find(toggle).focus()
|
719
|
+
return $this.click()
|
720
|
+
}
|
721
|
+
|
722
|
+
$items = $('[role=menu] li:not(.divider):visible a', $parent)
|
723
|
+
|
724
|
+
if (!$items.length) return
|
725
|
+
|
726
|
+
index = $items.index($items.filter(':focus'))
|
727
|
+
|
728
|
+
if (e.keyCode == 38 && index > 0) index-- // up
|
729
|
+
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
|
730
|
+
if (!~index) index = 0
|
731
|
+
|
732
|
+
$items
|
733
|
+
.eq(index)
|
734
|
+
.focus()
|
735
|
+
}
|
736
|
+
|
601
737
|
}
|
602
738
|
|
603
739
|
function clearMenus() {
|
604
|
-
$(toggle).
|
740
|
+
$(toggle).each(function () {
|
741
|
+
getParent($(this)).removeClass('open')
|
742
|
+
})
|
743
|
+
}
|
744
|
+
|
745
|
+
function getParent($this) {
|
746
|
+
var selector = $this.attr('data-target')
|
747
|
+
, $parent
|
748
|
+
|
749
|
+
if (!selector) {
|
750
|
+
selector = $this.attr('href')
|
751
|
+
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
752
|
+
}
|
753
|
+
|
754
|
+
$parent = selector && $(selector)
|
755
|
+
|
756
|
+
if (!$parent || !$parent.length) $parent = $this.parent()
|
757
|
+
|
758
|
+
return $parent
|
605
759
|
}
|
606
760
|
|
607
761
|
|
608
762
|
/* DROPDOWN PLUGIN DEFINITION
|
609
763
|
* ========================== */
|
610
764
|
|
611
|
-
$.fn.dropdown
|
765
|
+
var old = $.fn.dropdown
|
766
|
+
|
767
|
+
$.fn.dropdown = function (option) {
|
612
768
|
return this.each(function () {
|
613
769
|
var $this = $(this)
|
614
770
|
, data = $this.data('dropdown')
|
@@ -620,16 +776,28 @@
|
|
620
776
|
$.fn.dropdown.Constructor = Dropdown
|
621
777
|
|
622
778
|
|
779
|
+
/* DROPDOWN NO CONFLICT
|
780
|
+
* ==================== */
|
781
|
+
|
782
|
+
$.fn.dropdown.noConflict = function () {
|
783
|
+
$.fn.dropdown = old
|
784
|
+
return this
|
785
|
+
}
|
786
|
+
|
787
|
+
|
623
788
|
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
624
789
|
* =================================== */
|
625
790
|
|
626
|
-
$(
|
627
|
-
|
628
|
-
|
629
|
-
|
791
|
+
$(document)
|
792
|
+
.on('click.dropdown.data-api', clearMenus)
|
793
|
+
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
794
|
+
.on('click.dropdown-menu', function (e) { e.stopPropagation() })
|
795
|
+
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
796
|
+
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
630
797
|
|
631
|
-
}(
|
632
|
-
|
798
|
+
}(window.jQuery);
|
799
|
+
/* =========================================================
|
800
|
+
* bootstrap-modal.js v2.3.1
|
633
801
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
634
802
|
* =========================================================
|
635
803
|
* Copyright 2012 Twitter, Inc.
|
@@ -648,17 +816,19 @@
|
|
648
816
|
* ========================================================= */
|
649
817
|
|
650
818
|
|
651
|
-
!function(
|
819
|
+
!function ($) {
|
820
|
+
|
821
|
+
"use strict"; // jshint ;_;
|
652
822
|
|
653
|
-
"use strict"
|
654
823
|
|
655
824
|
/* MODAL CLASS DEFINITION
|
656
825
|
* ====================== */
|
657
826
|
|
658
|
-
var Modal = function (
|
827
|
+
var Modal = function (element, options) {
|
659
828
|
this.options = options
|
660
|
-
this.$element = $(
|
829
|
+
this.$element = $(element)
|
661
830
|
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
|
831
|
+
this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
|
662
832
|
}
|
663
833
|
|
664
834
|
Modal.prototype = {
|
@@ -671,139 +841,161 @@
|
|
671
841
|
|
672
842
|
, show: function () {
|
673
843
|
var that = this
|
844
|
+
, e = $.Event('show')
|
674
845
|
|
675
|
-
|
846
|
+
this.$element.trigger(e)
|
676
847
|
|
677
|
-
|
848
|
+
if (this.isShown || e.isDefaultPrevented()) return
|
678
849
|
|
679
850
|
this.isShown = true
|
680
|
-
this.$element.trigger('show')
|
681
851
|
|
682
|
-
escape
|
683
|
-
|
852
|
+
this.escape()
|
853
|
+
|
854
|
+
this.backdrop(function () {
|
684
855
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
685
856
|
|
686
|
-
!that.$element.parent().length
|
857
|
+
if (!that.$element.parent().length) {
|
858
|
+
that.$element.appendTo(document.body) //don't move modals dom position
|
859
|
+
}
|
687
860
|
|
688
|
-
that.$element
|
689
|
-
.show()
|
861
|
+
that.$element.show()
|
690
862
|
|
691
863
|
if (transition) {
|
692
864
|
that.$element[0].offsetWidth // force reflow
|
693
865
|
}
|
694
866
|
|
695
|
-
that.$element
|
867
|
+
that.$element
|
868
|
+
.addClass('in')
|
869
|
+
.attr('aria-hidden', false)
|
870
|
+
|
871
|
+
that.enforceFocus()
|
696
872
|
|
697
873
|
transition ?
|
698
|
-
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
699
|
-
that.$element.trigger('shown')
|
874
|
+
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
875
|
+
that.$element.focus().trigger('shown')
|
700
876
|
|
701
877
|
})
|
702
878
|
}
|
703
879
|
|
704
|
-
, hide: function (
|
880
|
+
, hide: function (e) {
|
705
881
|
e && e.preventDefault()
|
706
882
|
|
707
|
-
if (!this.isShown) return
|
708
|
-
|
709
883
|
var that = this
|
884
|
+
|
885
|
+
e = $.Event('hide')
|
886
|
+
|
887
|
+
this.$element.trigger(e)
|
888
|
+
|
889
|
+
if (!this.isShown || e.isDefaultPrevented()) return
|
890
|
+
|
710
891
|
this.isShown = false
|
711
892
|
|
712
|
-
|
893
|
+
this.escape()
|
713
894
|
|
714
|
-
|
895
|
+
$(document).off('focusin.modal')
|
715
896
|
|
716
897
|
this.$element
|
717
|
-
.trigger('hide')
|
718
898
|
.removeClass('in')
|
899
|
+
.attr('aria-hidden', true)
|
719
900
|
|
720
901
|
$.support.transition && this.$element.hasClass('fade') ?
|
721
|
-
hideWithTransition
|
722
|
-
hideModal
|
902
|
+
this.hideWithTransition() :
|
903
|
+
this.hideModal()
|
723
904
|
}
|
724
905
|
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
906
|
+
, enforceFocus: function () {
|
907
|
+
var that = this
|
908
|
+
$(document).on('focusin.modal', function (e) {
|
909
|
+
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
|
910
|
+
that.$element.focus()
|
911
|
+
}
|
912
|
+
})
|
913
|
+
}
|
730
914
|
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
915
|
+
, escape: function () {
|
916
|
+
var that = this
|
917
|
+
if (this.isShown && this.options.keyboard) {
|
918
|
+
this.$element.on('keyup.dismiss.modal', function ( e ) {
|
919
|
+
e.which == 27 && that.hide()
|
920
|
+
})
|
921
|
+
} else if (!this.isShown) {
|
922
|
+
this.$element.off('keyup.dismiss.modal')
|
923
|
+
}
|
924
|
+
}
|
737
925
|
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
926
|
+
, hideWithTransition: function () {
|
927
|
+
var that = this
|
928
|
+
, timeout = setTimeout(function () {
|
929
|
+
that.$element.off($.support.transition.end)
|
930
|
+
that.hideModal()
|
931
|
+
}, 500)
|
743
932
|
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
933
|
+
this.$element.one($.support.transition.end, function () {
|
934
|
+
clearTimeout(timeout)
|
935
|
+
that.hideModal()
|
936
|
+
})
|
937
|
+
}
|
748
938
|
|
749
|
-
|
750
|
-
|
939
|
+
, hideModal: function () {
|
940
|
+
var that = this
|
941
|
+
this.$element.hide()
|
942
|
+
this.backdrop(function () {
|
943
|
+
that.removeBackdrop()
|
944
|
+
that.$element.trigger('hidden')
|
945
|
+
})
|
946
|
+
}
|
751
947
|
|
752
|
-
|
753
|
-
|
754
|
-
|
948
|
+
, removeBackdrop: function () {
|
949
|
+
this.$backdrop && this.$backdrop.remove()
|
950
|
+
this.$backdrop = null
|
951
|
+
}
|
755
952
|
|
756
|
-
|
757
|
-
|
953
|
+
, backdrop: function (callback) {
|
954
|
+
var that = this
|
955
|
+
, animate = this.$element.hasClass('fade') ? 'fade' : ''
|
758
956
|
|
759
|
-
|
760
|
-
|
957
|
+
if (this.isShown && this.options.backdrop) {
|
958
|
+
var doAnimate = $.support.transition && animate
|
761
959
|
|
762
|
-
|
763
|
-
|
764
|
-
}
|
960
|
+
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
961
|
+
.appendTo(document.body)
|
765
962
|
|
766
|
-
|
963
|
+
this.$backdrop.click(
|
964
|
+
this.options.backdrop == 'static' ?
|
965
|
+
$.proxy(this.$element[0].focus, this.$element[0])
|
966
|
+
: $.proxy(this.hide, this)
|
967
|
+
)
|
767
968
|
|
768
|
-
|
969
|
+
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
769
970
|
|
770
|
-
|
771
|
-
this.$backdrop.one($.support.transition.end, callback) :
|
772
|
-
callback()
|
971
|
+
this.$backdrop.addClass('in')
|
773
972
|
|
774
|
-
|
775
|
-
this.$backdrop.removeClass('in')
|
973
|
+
if (!callback) return
|
776
974
|
|
777
|
-
|
778
|
-
|
779
|
-
|
975
|
+
doAnimate ?
|
976
|
+
this.$backdrop.one($.support.transition.end, callback) :
|
977
|
+
callback()
|
780
978
|
|
781
|
-
|
782
|
-
|
783
|
-
}
|
784
|
-
}
|
979
|
+
} else if (!this.isShown && this.$backdrop) {
|
980
|
+
this.$backdrop.removeClass('in')
|
785
981
|
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
}
|
982
|
+
$.support.transition && this.$element.hasClass('fade')?
|
983
|
+
this.$backdrop.one($.support.transition.end, callback) :
|
984
|
+
callback()
|
790
985
|
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
e.which == 27 && that.hide()
|
796
|
-
})
|
797
|
-
} else if (!this.isShown) {
|
798
|
-
$(document).off('keyup.dismiss.modal')
|
799
|
-
}
|
986
|
+
} else if (callback) {
|
987
|
+
callback()
|
988
|
+
}
|
989
|
+
}
|
800
990
|
}
|
801
991
|
|
802
992
|
|
803
993
|
/* MODAL PLUGIN DEFINITION
|
804
994
|
* ======================= */
|
805
995
|
|
806
|
-
$.fn.modal
|
996
|
+
var old = $.fn.modal
|
997
|
+
|
998
|
+
$.fn.modal = function (option) {
|
807
999
|
return this.each(function () {
|
808
1000
|
var $this = $(this)
|
809
1001
|
, data = $this.data('modal')
|
@@ -823,22 +1015,36 @@
|
|
823
1015
|
$.fn.modal.Constructor = Modal
|
824
1016
|
|
825
1017
|
|
1018
|
+
/* MODAL NO CONFLICT
|
1019
|
+
* ================= */
|
1020
|
+
|
1021
|
+
$.fn.modal.noConflict = function () {
|
1022
|
+
$.fn.modal = old
|
1023
|
+
return this
|
1024
|
+
}
|
1025
|
+
|
1026
|
+
|
826
1027
|
/* MODAL DATA-API
|
827
1028
|
* ============== */
|
828
1029
|
|
829
|
-
$(function () {
|
830
|
-
$
|
831
|
-
|
832
|
-
|
833
|
-
|
1030
|
+
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
|
1031
|
+
var $this = $(this)
|
1032
|
+
, href = $this.attr('href')
|
1033
|
+
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
1034
|
+
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
|
834
1035
|
|
835
|
-
|
836
|
-
|
837
|
-
|
1036
|
+
e.preventDefault()
|
1037
|
+
|
1038
|
+
$target
|
1039
|
+
.modal(option)
|
1040
|
+
.one('hide', function () {
|
1041
|
+
$this.focus()
|
1042
|
+
})
|
838
1043
|
})
|
839
1044
|
|
840
|
-
}(
|
841
|
-
|
1045
|
+
}(window.jQuery);
|
1046
|
+
/* ===========================================================
|
1047
|
+
* bootstrap-tooltip.js v2.3.1
|
842
1048
|
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
843
1049
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
844
1050
|
* ===========================================================
|
@@ -857,14 +1063,16 @@
|
|
857
1063
|
* limitations under the License.
|
858
1064
|
* ========================================================== */
|
859
1065
|
|
860
|
-
!function( $ ) {
|
861
1066
|
|
862
|
-
|
1067
|
+
!function ($) {
|
1068
|
+
|
1069
|
+
"use strict"; // jshint ;_;
|
1070
|
+
|
863
1071
|
|
864
1072
|
/* TOOLTIP PUBLIC CLASS DEFINITION
|
865
1073
|
* =============================== */
|
866
1074
|
|
867
|
-
var Tooltip = function (
|
1075
|
+
var Tooltip = function (element, options) {
|
868
1076
|
this.init('tooltip', element, options)
|
869
1077
|
}
|
870
1078
|
|
@@ -872,20 +1080,30 @@
|
|
872
1080
|
|
873
1081
|
constructor: Tooltip
|
874
1082
|
|
875
|
-
, init: function (
|
1083
|
+
, init: function (type, element, options) {
|
876
1084
|
var eventIn
|
877
1085
|
, eventOut
|
1086
|
+
, triggers
|
1087
|
+
, trigger
|
1088
|
+
, i
|
878
1089
|
|
879
1090
|
this.type = type
|
880
1091
|
this.$element = $(element)
|
881
1092
|
this.options = this.getOptions(options)
|
882
1093
|
this.enabled = true
|
883
1094
|
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
1095
|
+
triggers = this.options.trigger.split(' ')
|
1096
|
+
|
1097
|
+
for (i = triggers.length; i--;) {
|
1098
|
+
trigger = triggers[i]
|
1099
|
+
if (trigger == 'click') {
|
1100
|
+
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
|
1101
|
+
} else if (trigger != 'manual') {
|
1102
|
+
eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
|
1103
|
+
eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
|
1104
|
+
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
1105
|
+
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
1106
|
+
}
|
889
1107
|
}
|
890
1108
|
|
891
1109
|
this.options.selector ?
|
@@ -893,8 +1111,8 @@
|
|
893
1111
|
this.fixTitle()
|
894
1112
|
}
|
895
1113
|
|
896
|
-
, getOptions: function (
|
897
|
-
options = $.extend({}, $.fn[this.type].defaults,
|
1114
|
+
, getOptions: function (options) {
|
1115
|
+
options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
|
898
1116
|
|
899
1117
|
if (options.delay && typeof options.delay == 'number') {
|
900
1118
|
options.delay = {
|
@@ -906,46 +1124,50 @@
|
|
906
1124
|
return options
|
907
1125
|
}
|
908
1126
|
|
909
|
-
, enter: function (
|
910
|
-
var
|
1127
|
+
, enter: function (e) {
|
1128
|
+
var defaults = $.fn[this.type].defaults
|
1129
|
+
, options = {}
|
1130
|
+
, self
|
911
1131
|
|
912
|
-
|
913
|
-
|
914
|
-
}
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
1132
|
+
this._options && $.each(this._options, function (key, value) {
|
1133
|
+
if (defaults[key] != value) options[key] = value
|
1134
|
+
}, this)
|
1135
|
+
|
1136
|
+
self = $(e.currentTarget)[this.type](options).data(this.type)
|
1137
|
+
|
1138
|
+
if (!self.options.delay || !self.options.delay.show) return self.show()
|
1139
|
+
|
1140
|
+
clearTimeout(this.timeout)
|
1141
|
+
self.hoverState = 'in'
|
1142
|
+
this.timeout = setTimeout(function() {
|
1143
|
+
if (self.hoverState == 'in') self.show()
|
1144
|
+
}, self.options.delay.show)
|
922
1145
|
}
|
923
1146
|
|
924
|
-
, leave: function (
|
1147
|
+
, leave: function (e) {
|
925
1148
|
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
926
1149
|
|
927
|
-
if (
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
}
|
935
|
-
}, self.options.delay.hide)
|
936
|
-
}
|
1150
|
+
if (this.timeout) clearTimeout(this.timeout)
|
1151
|
+
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
1152
|
+
|
1153
|
+
self.hoverState = 'out'
|
1154
|
+
this.timeout = setTimeout(function() {
|
1155
|
+
if (self.hoverState == 'out') self.hide()
|
1156
|
+
}, self.options.delay.hide)
|
937
1157
|
}
|
938
1158
|
|
939
1159
|
, show: function () {
|
940
1160
|
var $tip
|
941
|
-
, inside
|
942
1161
|
, pos
|
943
1162
|
, actualWidth
|
944
1163
|
, actualHeight
|
945
1164
|
, placement
|
946
1165
|
, tp
|
1166
|
+
, e = $.Event('show')
|
947
1167
|
|
948
1168
|
if (this.hasContent() && this.enabled) {
|
1169
|
+
this.$element.trigger(e)
|
1170
|
+
if (e.isDefaultPrevented()) return
|
949
1171
|
$tip = this.tip()
|
950
1172
|
this.setContent()
|
951
1173
|
|
@@ -957,19 +1179,18 @@
|
|
957
1179
|
this.options.placement.call(this, $tip[0], this.$element[0]) :
|
958
1180
|
this.options.placement
|
959
1181
|
|
960
|
-
inside = /in/.test(placement)
|
961
|
-
|
962
1182
|
$tip
|
963
|
-
.
|
1183
|
+
.detach()
|
964
1184
|
.css({ top: 0, left: 0, display: 'block' })
|
965
|
-
.appendTo(inside ? this.$element : document.body)
|
966
1185
|
|
967
|
-
|
1186
|
+
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
1187
|
+
|
1188
|
+
pos = this.getPosition()
|
968
1189
|
|
969
1190
|
actualWidth = $tip[0].offsetWidth
|
970
1191
|
actualHeight = $tip[0].offsetHeight
|
971
1192
|
|
972
|
-
switch (
|
1193
|
+
switch (placement) {
|
973
1194
|
case 'bottom':
|
974
1195
|
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
|
975
1196
|
break
|
@@ -984,45 +1205,100 @@
|
|
984
1205
|
break
|
985
1206
|
}
|
986
1207
|
|
987
|
-
|
988
|
-
|
989
|
-
.addClass(placement)
|
990
|
-
.addClass('in')
|
1208
|
+
this.applyPlacement(tp, placement)
|
1209
|
+
this.$element.trigger('shown')
|
991
1210
|
}
|
992
1211
|
}
|
993
1212
|
|
1213
|
+
, applyPlacement: function(offset, placement){
|
1214
|
+
var $tip = this.tip()
|
1215
|
+
, width = $tip[0].offsetWidth
|
1216
|
+
, height = $tip[0].offsetHeight
|
1217
|
+
, actualWidth
|
1218
|
+
, actualHeight
|
1219
|
+
, delta
|
1220
|
+
, replace
|
1221
|
+
|
1222
|
+
$tip
|
1223
|
+
.offset(offset)
|
1224
|
+
.addClass(placement)
|
1225
|
+
.addClass('in')
|
1226
|
+
|
1227
|
+
actualWidth = $tip[0].offsetWidth
|
1228
|
+
actualHeight = $tip[0].offsetHeight
|
1229
|
+
|
1230
|
+
if (placement == 'top' && actualHeight != height) {
|
1231
|
+
offset.top = offset.top + height - actualHeight
|
1232
|
+
replace = true
|
1233
|
+
}
|
1234
|
+
|
1235
|
+
if (placement == 'bottom' || placement == 'top') {
|
1236
|
+
delta = 0
|
1237
|
+
|
1238
|
+
if (offset.left < 0){
|
1239
|
+
delta = offset.left * -2
|
1240
|
+
offset.left = 0
|
1241
|
+
$tip.offset(offset)
|
1242
|
+
actualWidth = $tip[0].offsetWidth
|
1243
|
+
actualHeight = $tip[0].offsetHeight
|
1244
|
+
}
|
1245
|
+
|
1246
|
+
this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
|
1247
|
+
} else {
|
1248
|
+
this.replaceArrow(actualHeight - height, actualHeight, 'top')
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
if (replace) $tip.offset(offset)
|
1252
|
+
}
|
1253
|
+
|
1254
|
+
, replaceArrow: function(delta, dimension, position){
|
1255
|
+
this
|
1256
|
+
.arrow()
|
1257
|
+
.css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
|
1258
|
+
}
|
1259
|
+
|
994
1260
|
, setContent: function () {
|
995
1261
|
var $tip = this.tip()
|
996
|
-
|
1262
|
+
, title = this.getTitle()
|
1263
|
+
|
1264
|
+
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
|
997
1265
|
$tip.removeClass('fade in top bottom left right')
|
998
1266
|
}
|
999
1267
|
|
1000
1268
|
, hide: function () {
|
1001
1269
|
var that = this
|
1002
1270
|
, $tip = this.tip()
|
1271
|
+
, e = $.Event('hide')
|
1272
|
+
|
1273
|
+
this.$element.trigger(e)
|
1274
|
+
if (e.isDefaultPrevented()) return
|
1003
1275
|
|
1004
1276
|
$tip.removeClass('in')
|
1005
1277
|
|
1006
1278
|
function removeWithAnimation() {
|
1007
1279
|
var timeout = setTimeout(function () {
|
1008
|
-
$tip.off($.support.transition.end).
|
1280
|
+
$tip.off($.support.transition.end).detach()
|
1009
1281
|
}, 500)
|
1010
1282
|
|
1011
1283
|
$tip.one($.support.transition.end, function () {
|
1012
1284
|
clearTimeout(timeout)
|
1013
|
-
$tip.
|
1285
|
+
$tip.detach()
|
1014
1286
|
})
|
1015
1287
|
}
|
1016
1288
|
|
1017
1289
|
$.support.transition && this.$tip.hasClass('fade') ?
|
1018
1290
|
removeWithAnimation() :
|
1019
|
-
$tip.
|
1291
|
+
$tip.detach()
|
1292
|
+
|
1293
|
+
this.$element.trigger('hidden')
|
1294
|
+
|
1295
|
+
return this
|
1020
1296
|
}
|
1021
1297
|
|
1022
1298
|
, fixTitle: function () {
|
1023
1299
|
var $e = this.$element
|
1024
1300
|
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
|
1025
|
-
$e.attr('data-original-title', $e.attr('title') || '').
|
1301
|
+
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
1026
1302
|
}
|
1027
1303
|
}
|
1028
1304
|
|
@@ -1030,11 +1306,12 @@
|
|
1030
1306
|
return this.getTitle()
|
1031
1307
|
}
|
1032
1308
|
|
1033
|
-
, getPosition: function (
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1309
|
+
, getPosition: function () {
|
1310
|
+
var el = this.$element[0]
|
1311
|
+
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
|
1312
|
+
width: el.offsetWidth
|
1313
|
+
, height: el.offsetHeight
|
1314
|
+
}, this.$element.offset())
|
1038
1315
|
}
|
1039
1316
|
|
1040
1317
|
, getTitle: function () {
|
@@ -1045,8 +1322,6 @@
|
|
1045
1322
|
title = $e.attr('data-original-title')
|
1046
1323
|
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
|
1047
1324
|
|
1048
|
-
title = (title || '').toString().replace(/(^\s*|\s*$)/, "")
|
1049
|
-
|
1050
1325
|
return title
|
1051
1326
|
}
|
1052
1327
|
|
@@ -1054,6 +1329,10 @@
|
|
1054
1329
|
return this.$tip = this.$tip || $(this.options.template)
|
1055
1330
|
}
|
1056
1331
|
|
1332
|
+
, arrow: function(){
|
1333
|
+
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
|
1334
|
+
}
|
1335
|
+
|
1057
1336
|
, validate: function () {
|
1058
1337
|
if (!this.$element[0].parentNode) {
|
1059
1338
|
this.hide()
|
@@ -1074,8 +1353,13 @@
|
|
1074
1353
|
this.enabled = !this.enabled
|
1075
1354
|
}
|
1076
1355
|
|
1077
|
-
, toggle: function () {
|
1078
|
-
|
1356
|
+
, toggle: function (e) {
|
1357
|
+
var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
|
1358
|
+
self.tip().hasClass('in') ? self.hide() : self.show()
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
, destroy: function () {
|
1362
|
+
this.hide().$element.off('.' + this.type).removeData(this.type)
|
1079
1363
|
}
|
1080
1364
|
|
1081
1365
|
}
|
@@ -1084,6 +1368,8 @@
|
|
1084
1368
|
/* TOOLTIP PLUGIN DEFINITION
|
1085
1369
|
* ========================= */
|
1086
1370
|
|
1371
|
+
var old = $.fn.tooltip
|
1372
|
+
|
1087
1373
|
$.fn.tooltip = function ( option ) {
|
1088
1374
|
return this.each(function () {
|
1089
1375
|
var $this = $(this)
|
@@ -1098,16 +1384,28 @@
|
|
1098
1384
|
|
1099
1385
|
$.fn.tooltip.defaults = {
|
1100
1386
|
animation: true
|
1101
|
-
, delay: 0
|
1102
|
-
, selector: false
|
1103
1387
|
, placement: 'top'
|
1104
|
-
,
|
1105
|
-
, title: ''
|
1388
|
+
, selector: false
|
1106
1389
|
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
1390
|
+
, trigger: 'hover focus'
|
1391
|
+
, title: ''
|
1392
|
+
, delay: 0
|
1393
|
+
, html: false
|
1394
|
+
, container: false
|
1395
|
+
}
|
1396
|
+
|
1397
|
+
|
1398
|
+
/* TOOLTIP NO CONFLICT
|
1399
|
+
* =================== */
|
1400
|
+
|
1401
|
+
$.fn.tooltip.noConflict = function () {
|
1402
|
+
$.fn.tooltip = old
|
1403
|
+
return this
|
1107
1404
|
}
|
1108
1405
|
|
1109
|
-
}(
|
1110
|
-
|
1406
|
+
}(window.jQuery);
|
1407
|
+
/* ===========================================================
|
1408
|
+
* bootstrap-popover.js v2.3.1
|
1111
1409
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
1112
1410
|
* ===========================================================
|
1113
1411
|
* Copyright 2012 Twitter, Inc.
|
@@ -1126,14 +1424,19 @@
|
|
1126
1424
|
* =========================================================== */
|
1127
1425
|
|
1128
1426
|
|
1129
|
-
!function(
|
1427
|
+
!function ($) {
|
1130
1428
|
|
1131
|
-
|
1429
|
+
"use strict"; // jshint ;_;
|
1132
1430
|
|
1133
|
-
|
1431
|
+
|
1432
|
+
/* POPOVER PUBLIC CLASS DEFINITION
|
1433
|
+
* =============================== */
|
1434
|
+
|
1435
|
+
var Popover = function (element, options) {
|
1134
1436
|
this.init('popover', element, options)
|
1135
1437
|
}
|
1136
1438
|
|
1439
|
+
|
1137
1440
|
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
|
1138
1441
|
========================================== */
|
1139
1442
|
|
@@ -1146,8 +1449,8 @@
|
|
1146
1449
|
, title = this.getTitle()
|
1147
1450
|
, content = this.getContent()
|
1148
1451
|
|
1149
|
-
$tip.find('.popover-title')[
|
1150
|
-
$tip.find('.popover-content
|
1452
|
+
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
1453
|
+
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
|
1151
1454
|
|
1152
1455
|
$tip.removeClass('fade top bottom left right in')
|
1153
1456
|
}
|
@@ -1161,28 +1464,32 @@
|
|
1161
1464
|
, $e = this.$element
|
1162
1465
|
, o = this.options
|
1163
1466
|
|
1164
|
-
content = $e.
|
1165
|
-
||
|
1166
|
-
|
1167
|
-
content = content.toString().replace(/(^\s*|\s*$)/, "")
|
1467
|
+
content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|
1468
|
+
|| $e.attr('data-content')
|
1168
1469
|
|
1169
1470
|
return content
|
1170
1471
|
}
|
1171
1472
|
|
1172
|
-
, tip: function() {
|
1473
|
+
, tip: function () {
|
1173
1474
|
if (!this.$tip) {
|
1174
1475
|
this.$tip = $(this.options.template)
|
1175
1476
|
}
|
1176
1477
|
return this.$tip
|
1177
1478
|
}
|
1178
1479
|
|
1480
|
+
, destroy: function () {
|
1481
|
+
this.hide().$element.off('.' + this.type).removeData(this.type)
|
1482
|
+
}
|
1483
|
+
|
1179
1484
|
})
|
1180
1485
|
|
1181
1486
|
|
1182
1487
|
/* POPOVER PLUGIN DEFINITION
|
1183
1488
|
* ======================= */
|
1184
1489
|
|
1185
|
-
$.fn.popover
|
1490
|
+
var old = $.fn.popover
|
1491
|
+
|
1492
|
+
$.fn.popover = function (option) {
|
1186
1493
|
return this.each(function () {
|
1187
1494
|
var $this = $(this)
|
1188
1495
|
, data = $this.data('popover')
|
@@ -1196,12 +1503,23 @@
|
|
1196
1503
|
|
1197
1504
|
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
|
1198
1505
|
placement: 'right'
|
1506
|
+
, trigger: 'click'
|
1199
1507
|
, content: ''
|
1200
|
-
, template: '<div class="popover"><div class="arrow"></div><
|
1508
|
+
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
1201
1509
|
})
|
1202
1510
|
|
1203
|
-
|
1204
|
-
|
1511
|
+
|
1512
|
+
/* POPOVER NO CONFLICT
|
1513
|
+
* =================== */
|
1514
|
+
|
1515
|
+
$.fn.popover.noConflict = function () {
|
1516
|
+
$.fn.popover = old
|
1517
|
+
return this
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
}(window.jQuery);
|
1521
|
+
/* =============================================================
|
1522
|
+
* bootstrap-scrollspy.js v2.3.1
|
1205
1523
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
1206
1524
|
* =============================================================
|
1207
1525
|
* Copyright 2012 Twitter, Inc.
|
@@ -1219,23 +1537,25 @@
|
|
1219
1537
|
* limitations under the License.
|
1220
1538
|
* ============================================================== */
|
1221
1539
|
|
1222
|
-
!function ( $ ) {
|
1223
1540
|
|
1224
|
-
|
1541
|
+
!function ($) {
|
1225
1542
|
|
1226
|
-
|
1227
|
-
* ========================== */
|
1543
|
+
"use strict"; // jshint ;_;
|
1228
1544
|
|
1229
|
-
|
1545
|
+
|
1546
|
+
/* SCROLLSPY CLASS DEFINITION
|
1547
|
+
* ========================== */
|
1548
|
+
|
1549
|
+
function ScrollSpy(element, options) {
|
1230
1550
|
var process = $.proxy(this.process, this)
|
1231
1551
|
, $element = $(element).is('body') ? $(window) : $(element)
|
1232
1552
|
, href
|
1233
1553
|
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
|
1234
|
-
this.$scrollElement = $element.on('scroll.scroll.data-api', process)
|
1554
|
+
this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
|
1235
1555
|
this.selector = (this.options.target
|
1236
1556
|
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
1237
1557
|
|| '') + ' .nav li > a'
|
1238
|
-
this.$body = $('body')
|
1558
|
+
this.$body = $('body')
|
1239
1559
|
this.refresh()
|
1240
1560
|
this.process()
|
1241
1561
|
}
|
@@ -1245,25 +1565,43 @@
|
|
1245
1565
|
constructor: ScrollSpy
|
1246
1566
|
|
1247
1567
|
, refresh: function () {
|
1248
|
-
|
1568
|
+
var self = this
|
1569
|
+
, $targets
|
1570
|
+
|
1571
|
+
this.offsets = $([])
|
1572
|
+
this.targets = $([])
|
1573
|
+
|
1574
|
+
$targets = this.$body
|
1249
1575
|
.find(this.selector)
|
1250
1576
|
.map(function () {
|
1251
|
-
var
|
1252
|
-
|
1577
|
+
var $el = $(this)
|
1578
|
+
, href = $el.data('target') || $el.attr('href')
|
1579
|
+
, $href = /^#\w/.test(href) && $(href)
|
1580
|
+
return ( $href
|
1581
|
+
&& $href.length
|
1582
|
+
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
|
1583
|
+
})
|
1584
|
+
.sort(function (a, b) { return a[0] - b[0] })
|
1585
|
+
.each(function () {
|
1586
|
+
self.offsets.push(this[0])
|
1587
|
+
self.targets.push(this[1])
|
1253
1588
|
})
|
1254
|
-
|
1255
|
-
this.offsets = $.map(this.targets, function (id) {
|
1256
|
-
return $(id).position().top
|
1257
|
-
})
|
1258
1589
|
}
|
1259
1590
|
|
1260
1591
|
, process: function () {
|
1261
1592
|
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
1593
|
+
, scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
|
1594
|
+
, maxScroll = scrollHeight - this.$scrollElement.height()
|
1262
1595
|
, offsets = this.offsets
|
1263
1596
|
, targets = this.targets
|
1264
1597
|
, activeTarget = this.activeTarget
|
1265
1598
|
, i
|
1266
1599
|
|
1600
|
+
if (scrollTop >= maxScroll) {
|
1601
|
+
return activeTarget != (i = targets.last()[0])
|
1602
|
+
&& this.activate ( i )
|
1603
|
+
}
|
1604
|
+
|
1267
1605
|
for (i = offsets.length; i--;) {
|
1268
1606
|
activeTarget != targets[i]
|
1269
1607
|
&& scrollTop >= offsets[i]
|
@@ -1274,21 +1612,27 @@
|
|
1274
1612
|
|
1275
1613
|
, activate: function (target) {
|
1276
1614
|
var active
|
1615
|
+
, selector
|
1277
1616
|
|
1278
1617
|
this.activeTarget = target
|
1279
1618
|
|
1280
|
-
this
|
1281
|
-
.
|
1619
|
+
$(this.selector)
|
1620
|
+
.parent('.active')
|
1282
1621
|
.removeClass('active')
|
1283
1622
|
|
1284
|
-
|
1285
|
-
|
1623
|
+
selector = this.selector
|
1624
|
+
+ '[data-target="' + target + '"],'
|
1625
|
+
+ this.selector + '[href="' + target + '"]'
|
1626
|
+
|
1627
|
+
active = $(selector)
|
1286
1628
|
.parent('li')
|
1287
1629
|
.addClass('active')
|
1288
1630
|
|
1289
|
-
if (
|
1290
|
-
active.closest('li.dropdown').addClass('active')
|
1631
|
+
if (active.parent('.dropdown-menu').length) {
|
1632
|
+
active = active.closest('li.dropdown').addClass('active')
|
1291
1633
|
}
|
1634
|
+
|
1635
|
+
active.trigger('activate')
|
1292
1636
|
}
|
1293
1637
|
|
1294
1638
|
}
|
@@ -1297,7 +1641,9 @@
|
|
1297
1641
|
/* SCROLLSPY PLUGIN DEFINITION
|
1298
1642
|
* =========================== */
|
1299
1643
|
|
1300
|
-
$.fn.scrollspy
|
1644
|
+
var old = $.fn.scrollspy
|
1645
|
+
|
1646
|
+
$.fn.scrollspy = function (option) {
|
1301
1647
|
return this.each(function () {
|
1302
1648
|
var $this = $(this)
|
1303
1649
|
, data = $this.data('scrollspy')
|
@@ -1314,18 +1660,27 @@
|
|
1314
1660
|
}
|
1315
1661
|
|
1316
1662
|
|
1663
|
+
/* SCROLLSPY NO CONFLICT
|
1664
|
+
* ===================== */
|
1665
|
+
|
1666
|
+
$.fn.scrollspy.noConflict = function () {
|
1667
|
+
$.fn.scrollspy = old
|
1668
|
+
return this
|
1669
|
+
}
|
1670
|
+
|
1671
|
+
|
1317
1672
|
/* SCROLLSPY DATA-API
|
1318
1673
|
* ================== */
|
1319
1674
|
|
1320
|
-
$(function () {
|
1675
|
+
$(window).on('load', function () {
|
1321
1676
|
$('[data-spy="scroll"]').each(function () {
|
1322
1677
|
var $spy = $(this)
|
1323
1678
|
$spy.scrollspy($spy.data())
|
1324
1679
|
})
|
1325
1680
|
})
|
1326
1681
|
|
1327
|
-
}(
|
1328
|
-
* bootstrap-tab.js v2.
|
1682
|
+
}(window.jQuery);/* ========================================================
|
1683
|
+
* bootstrap-tab.js v2.3.1
|
1329
1684
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
1330
1685
|
* ========================================================
|
1331
1686
|
* Copyright 2012 Twitter, Inc.
|
@@ -1344,14 +1699,15 @@
|
|
1344
1699
|
* ======================================================== */
|
1345
1700
|
|
1346
1701
|
|
1347
|
-
!function(
|
1702
|
+
!function ($) {
|
1703
|
+
|
1704
|
+
"use strict"; // jshint ;_;
|
1348
1705
|
|
1349
|
-
"use strict"
|
1350
1706
|
|
1351
1707
|
/* TAB CLASS DEFINITION
|
1352
1708
|
* ==================== */
|
1353
1709
|
|
1354
|
-
var Tab = function (
|
1710
|
+
var Tab = function (element) {
|
1355
1711
|
this.element = $(element)
|
1356
1712
|
}
|
1357
1713
|
|
@@ -1365,6 +1721,7 @@
|
|
1365
1721
|
, selector = $this.attr('data-target')
|
1366
1722
|
, previous
|
1367
1723
|
, $target
|
1724
|
+
, e
|
1368
1725
|
|
1369
1726
|
if (!selector) {
|
1370
1727
|
selector = $this.attr('href')
|
@@ -1373,13 +1730,16 @@
|
|
1373
1730
|
|
1374
1731
|
if ( $this.parent('li').hasClass('active') ) return
|
1375
1732
|
|
1376
|
-
previous = $ul.find('.active a')
|
1733
|
+
previous = $ul.find('.active:last a')[0]
|
1377
1734
|
|
1378
|
-
|
1379
|
-
|
1380
|
-
, relatedTarget: previous
|
1735
|
+
e = $.Event('show', {
|
1736
|
+
relatedTarget: previous
|
1381
1737
|
})
|
1382
1738
|
|
1739
|
+
$this.trigger(e)
|
1740
|
+
|
1741
|
+
if (e.isDefaultPrevented()) return
|
1742
|
+
|
1383
1743
|
$target = $(selector)
|
1384
1744
|
|
1385
1745
|
this.activate($this.parent('li'), $ul)
|
@@ -1431,6 +1791,8 @@
|
|
1431
1791
|
/* TAB PLUGIN DEFINITION
|
1432
1792
|
* ===================== */
|
1433
1793
|
|
1794
|
+
var old = $.fn.tab
|
1795
|
+
|
1434
1796
|
$.fn.tab = function ( option ) {
|
1435
1797
|
return this.each(function () {
|
1436
1798
|
var $this = $(this)
|
@@ -1443,18 +1805,25 @@
|
|
1443
1805
|
$.fn.tab.Constructor = Tab
|
1444
1806
|
|
1445
1807
|
|
1808
|
+
/* TAB NO CONFLICT
|
1809
|
+
* =============== */
|
1810
|
+
|
1811
|
+
$.fn.tab.noConflict = function () {
|
1812
|
+
$.fn.tab = old
|
1813
|
+
return this
|
1814
|
+
}
|
1815
|
+
|
1816
|
+
|
1446
1817
|
/* TAB DATA-API
|
1447
1818
|
* ============ */
|
1448
1819
|
|
1449
|
-
$(function () {
|
1450
|
-
|
1451
|
-
|
1452
|
-
$(this).tab('show')
|
1453
|
-
})
|
1820
|
+
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
1821
|
+
e.preventDefault()
|
1822
|
+
$(this).tab('show')
|
1454
1823
|
})
|
1455
1824
|
|
1456
|
-
}(
|
1457
|
-
* bootstrap-typeahead.js v2.
|
1825
|
+
}(window.jQuery);/* =============================================================
|
1826
|
+
* bootstrap-typeahead.js v2.3.1
|
1458
1827
|
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
1459
1828
|
* =============================================================
|
1460
1829
|
* Copyright 2012 Twitter, Inc.
|
@@ -1472,18 +1841,24 @@
|
|
1472
1841
|
* limitations under the License.
|
1473
1842
|
* ============================================================ */
|
1474
1843
|
|
1475
|
-
!function( $ ){
|
1476
1844
|
|
1477
|
-
|
1845
|
+
!function($){
|
1846
|
+
|
1847
|
+
"use strict"; // jshint ;_;
|
1848
|
+
|
1478
1849
|
|
1479
|
-
|
1850
|
+
/* TYPEAHEAD PUBLIC CLASS DEFINITION
|
1851
|
+
* ================================= */
|
1852
|
+
|
1853
|
+
var Typeahead = function (element, options) {
|
1480
1854
|
this.$element = $(element)
|
1481
1855
|
this.options = $.extend({}, $.fn.typeahead.defaults, options)
|
1482
1856
|
this.matcher = this.options.matcher || this.matcher
|
1483
1857
|
this.sorter = this.options.sorter || this.sorter
|
1484
1858
|
this.highlighter = this.options.highlighter || this.highlighter
|
1485
|
-
this
|
1859
|
+
this.updater = this.options.updater || this.updater
|
1486
1860
|
this.source = this.options.source
|
1861
|
+
this.$menu = $(this.options.menu)
|
1487
1862
|
this.shown = false
|
1488
1863
|
this.listen()
|
1489
1864
|
}
|
@@ -1494,22 +1869,29 @@
|
|
1494
1869
|
|
1495
1870
|
, select: function () {
|
1496
1871
|
var val = this.$menu.find('.active').attr('data-value')
|
1497
|
-
this.$element
|
1498
|
-
|
1872
|
+
this.$element
|
1873
|
+
.val(this.updater(val))
|
1874
|
+
.change()
|
1499
1875
|
return this.hide()
|
1500
1876
|
}
|
1501
1877
|
|
1878
|
+
, updater: function (item) {
|
1879
|
+
return item
|
1880
|
+
}
|
1881
|
+
|
1502
1882
|
, show: function () {
|
1503
|
-
var pos = $.extend({}, this.$element.
|
1883
|
+
var pos = $.extend({}, this.$element.position(), {
|
1504
1884
|
height: this.$element[0].offsetHeight
|
1505
1885
|
})
|
1506
1886
|
|
1507
|
-
this.$menu
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1887
|
+
this.$menu
|
1888
|
+
.insertAfter(this.$element)
|
1889
|
+
.css({
|
1890
|
+
top: pos.top + pos.height
|
1891
|
+
, left: pos.left
|
1892
|
+
})
|
1893
|
+
.show()
|
1511
1894
|
|
1512
|
-
this.$menu.show()
|
1513
1895
|
this.shown = true
|
1514
1896
|
return this
|
1515
1897
|
}
|
@@ -1521,18 +1903,24 @@
|
|
1521
1903
|
}
|
1522
1904
|
|
1523
1905
|
, lookup: function (event) {
|
1524
|
-
var
|
1525
|
-
, items
|
1526
|
-
, q
|
1906
|
+
var items
|
1527
1907
|
|
1528
1908
|
this.query = this.$element.val()
|
1529
1909
|
|
1530
|
-
if (!this.query) {
|
1910
|
+
if (!this.query || this.query.length < this.options.minLength) {
|
1531
1911
|
return this.shown ? this.hide() : this
|
1532
1912
|
}
|
1533
1913
|
|
1534
|
-
items = $.
|
1535
|
-
|
1914
|
+
items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
|
1915
|
+
|
1916
|
+
return items ? this.process(items) : this
|
1917
|
+
}
|
1918
|
+
|
1919
|
+
, process: function (items) {
|
1920
|
+
var that = this
|
1921
|
+
|
1922
|
+
items = $.grep(items, function (item) {
|
1923
|
+
return that.matcher(item)
|
1536
1924
|
})
|
1537
1925
|
|
1538
1926
|
items = this.sorter(items)
|
@@ -1564,7 +1952,8 @@
|
|
1564
1952
|
}
|
1565
1953
|
|
1566
1954
|
, highlighter: function (item) {
|
1567
|
-
|
1955
|
+
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
|
1956
|
+
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
|
1568
1957
|
return '<strong>' + match + '</strong>'
|
1569
1958
|
})
|
1570
1959
|
}
|
@@ -1607,23 +1996,71 @@
|
|
1607
1996
|
|
1608
1997
|
, listen: function () {
|
1609
1998
|
this.$element
|
1999
|
+
.on('focus', $.proxy(this.focus, this))
|
1610
2000
|
.on('blur', $.proxy(this.blur, this))
|
1611
2001
|
.on('keypress', $.proxy(this.keypress, this))
|
1612
2002
|
.on('keyup', $.proxy(this.keyup, this))
|
1613
2003
|
|
1614
|
-
if (
|
1615
|
-
this.$element.on('keydown', $.proxy(this.
|
2004
|
+
if (this.eventSupported('keydown')) {
|
2005
|
+
this.$element.on('keydown', $.proxy(this.keydown, this))
|
1616
2006
|
}
|
1617
2007
|
|
1618
2008
|
this.$menu
|
1619
2009
|
.on('click', $.proxy(this.click, this))
|
1620
2010
|
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
|
2011
|
+
.on('mouseleave', 'li', $.proxy(this.mouseleave, this))
|
2012
|
+
}
|
2013
|
+
|
2014
|
+
, eventSupported: function(eventName) {
|
2015
|
+
var isSupported = eventName in this.$element
|
2016
|
+
if (!isSupported) {
|
2017
|
+
this.$element.setAttribute(eventName, 'return;')
|
2018
|
+
isSupported = typeof this.$element[eventName] === 'function'
|
2019
|
+
}
|
2020
|
+
return isSupported
|
2021
|
+
}
|
2022
|
+
|
2023
|
+
, move: function (e) {
|
2024
|
+
if (!this.shown) return
|
2025
|
+
|
2026
|
+
switch(e.keyCode) {
|
2027
|
+
case 9: // tab
|
2028
|
+
case 13: // enter
|
2029
|
+
case 27: // escape
|
2030
|
+
e.preventDefault()
|
2031
|
+
break
|
2032
|
+
|
2033
|
+
case 38: // up arrow
|
2034
|
+
e.preventDefault()
|
2035
|
+
this.prev()
|
2036
|
+
break
|
2037
|
+
|
2038
|
+
case 40: // down arrow
|
2039
|
+
e.preventDefault()
|
2040
|
+
this.next()
|
2041
|
+
break
|
2042
|
+
}
|
2043
|
+
|
2044
|
+
e.stopPropagation()
|
2045
|
+
}
|
2046
|
+
|
2047
|
+
, keydown: function (e) {
|
2048
|
+
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
|
2049
|
+
this.move(e)
|
2050
|
+
}
|
2051
|
+
|
2052
|
+
, keypress: function (e) {
|
2053
|
+
if (this.suppressKeyPressRepeat) return
|
2054
|
+
this.move(e)
|
1621
2055
|
}
|
1622
2056
|
|
1623
2057
|
, keyup: function (e) {
|
1624
2058
|
switch(e.keyCode) {
|
1625
2059
|
case 40: // down arrow
|
1626
2060
|
case 38: // up arrow
|
2061
|
+
case 16: // shift
|
2062
|
+
case 17: // ctrl
|
2063
|
+
case 18: // alt
|
1627
2064
|
break
|
1628
2065
|
|
1629
2066
|
case 9: // tab
|
@@ -1645,53 +2082,42 @@
|
|
1645
2082
|
e.preventDefault()
|
1646
2083
|
}
|
1647
2084
|
|
1648
|
-
,
|
1649
|
-
|
1650
|
-
|
1651
|
-
switch(e.keyCode) {
|
1652
|
-
case 9: // tab
|
1653
|
-
case 13: // enter
|
1654
|
-
case 27: // escape
|
1655
|
-
e.preventDefault()
|
1656
|
-
break
|
1657
|
-
|
1658
|
-
case 38: // up arrow
|
1659
|
-
e.preventDefault()
|
1660
|
-
this.prev()
|
1661
|
-
break
|
1662
|
-
|
1663
|
-
case 40: // down arrow
|
1664
|
-
e.preventDefault()
|
1665
|
-
this.next()
|
1666
|
-
break
|
1667
|
-
}
|
1668
|
-
|
1669
|
-
e.stopPropagation()
|
2085
|
+
, focus: function (e) {
|
2086
|
+
this.focused = true
|
1670
2087
|
}
|
1671
2088
|
|
1672
2089
|
, blur: function (e) {
|
1673
|
-
|
1674
|
-
|
2090
|
+
this.focused = false
|
2091
|
+
if (!this.mousedover && this.shown) this.hide()
|
1675
2092
|
}
|
1676
2093
|
|
1677
2094
|
, click: function (e) {
|
1678
2095
|
e.stopPropagation()
|
1679
2096
|
e.preventDefault()
|
1680
2097
|
this.select()
|
2098
|
+
this.$element.focus()
|
1681
2099
|
}
|
1682
2100
|
|
1683
2101
|
, mouseenter: function (e) {
|
2102
|
+
this.mousedover = true
|
1684
2103
|
this.$menu.find('.active').removeClass('active')
|
1685
2104
|
$(e.currentTarget).addClass('active')
|
1686
2105
|
}
|
1687
2106
|
|
2107
|
+
, mouseleave: function (e) {
|
2108
|
+
this.mousedover = false
|
2109
|
+
if (!this.focused && this.shown) this.hide()
|
2110
|
+
}
|
2111
|
+
|
1688
2112
|
}
|
1689
2113
|
|
1690
2114
|
|
1691
2115
|
/* TYPEAHEAD PLUGIN DEFINITION
|
1692
2116
|
* =========================== */
|
1693
2117
|
|
1694
|
-
$.fn.typeahead
|
2118
|
+
var old = $.fn.typeahead
|
2119
|
+
|
2120
|
+
$.fn.typeahead = function (option) {
|
1695
2121
|
return this.each(function () {
|
1696
2122
|
var $this = $(this)
|
1697
2123
|
, data = $this.data('typeahead')
|
@@ -1706,21 +2132,145 @@
|
|
1706
2132
|
, items: 8
|
1707
2133
|
, menu: '<ul class="typeahead dropdown-menu"></ul>'
|
1708
2134
|
, item: '<li><a href="#"></a></li>'
|
2135
|
+
, minLength: 1
|
1709
2136
|
}
|
1710
2137
|
|
1711
2138
|
$.fn.typeahead.Constructor = Typeahead
|
1712
2139
|
|
1713
2140
|
|
2141
|
+
/* TYPEAHEAD NO CONFLICT
|
2142
|
+
* =================== */
|
2143
|
+
|
2144
|
+
$.fn.typeahead.noConflict = function () {
|
2145
|
+
$.fn.typeahead = old
|
2146
|
+
return this
|
2147
|
+
}
|
2148
|
+
|
2149
|
+
|
1714
2150
|
/* TYPEAHEAD DATA-API
|
1715
2151
|
* ================== */
|
1716
2152
|
|
1717
|
-
$(function () {
|
1718
|
-
$
|
2153
|
+
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
2154
|
+
var $this = $(this)
|
2155
|
+
if ($this.data('typeahead')) return
|
2156
|
+
$this.typeahead($this.data())
|
2157
|
+
})
|
2158
|
+
|
2159
|
+
}(window.jQuery);
|
2160
|
+
/* ==========================================================
|
2161
|
+
* bootstrap-affix.js v2.3.1
|
2162
|
+
* http://twitter.github.com/bootstrap/javascript.html#affix
|
2163
|
+
* ==========================================================
|
2164
|
+
* Copyright 2012 Twitter, Inc.
|
2165
|
+
*
|
2166
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
2167
|
+
* you may not use this file except in compliance with the License.
|
2168
|
+
* You may obtain a copy of the License at
|
2169
|
+
*
|
2170
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
2171
|
+
*
|
2172
|
+
* Unless required by applicable law or agreed to in writing, software
|
2173
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
2174
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2175
|
+
* See the License for the specific language governing permissions and
|
2176
|
+
* limitations under the License.
|
2177
|
+
* ========================================================== */
|
2178
|
+
|
2179
|
+
|
2180
|
+
!function ($) {
|
2181
|
+
|
2182
|
+
"use strict"; // jshint ;_;
|
2183
|
+
|
2184
|
+
|
2185
|
+
/* AFFIX CLASS DEFINITION
|
2186
|
+
* ====================== */
|
2187
|
+
|
2188
|
+
var Affix = function (element, options) {
|
2189
|
+
this.options = $.extend({}, $.fn.affix.defaults, options)
|
2190
|
+
this.$window = $(window)
|
2191
|
+
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
|
2192
|
+
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
|
2193
|
+
this.$element = $(element)
|
2194
|
+
this.checkPosition()
|
2195
|
+
}
|
2196
|
+
|
2197
|
+
Affix.prototype.checkPosition = function () {
|
2198
|
+
if (!this.$element.is(':visible')) return
|
2199
|
+
|
2200
|
+
var scrollHeight = $(document).height()
|
2201
|
+
, scrollTop = this.$window.scrollTop()
|
2202
|
+
, position = this.$element.offset()
|
2203
|
+
, offset = this.options.offset
|
2204
|
+
, offsetBottom = offset.bottom
|
2205
|
+
, offsetTop = offset.top
|
2206
|
+
, reset = 'affix affix-top affix-bottom'
|
2207
|
+
, affix
|
2208
|
+
|
2209
|
+
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
2210
|
+
if (typeof offsetTop == 'function') offsetTop = offset.top()
|
2211
|
+
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
|
2212
|
+
|
2213
|
+
affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
|
2214
|
+
false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
|
2215
|
+
'bottom' : offsetTop != null && scrollTop <= offsetTop ?
|
2216
|
+
'top' : false
|
2217
|
+
|
2218
|
+
if (this.affixed === affix) return
|
2219
|
+
|
2220
|
+
this.affixed = affix
|
2221
|
+
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
|
2222
|
+
|
2223
|
+
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
|
2224
|
+
}
|
2225
|
+
|
2226
|
+
|
2227
|
+
/* AFFIX PLUGIN DEFINITION
|
2228
|
+
* ======================= */
|
2229
|
+
|
2230
|
+
var old = $.fn.affix
|
2231
|
+
|
2232
|
+
$.fn.affix = function (option) {
|
2233
|
+
return this.each(function () {
|
1719
2234
|
var $this = $(this)
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
2235
|
+
, data = $this.data('affix')
|
2236
|
+
, options = typeof option == 'object' && option
|
2237
|
+
if (!data) $this.data('affix', (data = new Affix(this, options)))
|
2238
|
+
if (typeof option == 'string') data[option]()
|
2239
|
+
})
|
2240
|
+
}
|
2241
|
+
|
2242
|
+
$.fn.affix.Constructor = Affix
|
2243
|
+
|
2244
|
+
$.fn.affix.defaults = {
|
2245
|
+
offset: 0
|
2246
|
+
}
|
2247
|
+
|
2248
|
+
|
2249
|
+
/* AFFIX NO CONFLICT
|
2250
|
+
* ================= */
|
2251
|
+
|
2252
|
+
$.fn.affix.noConflict = function () {
|
2253
|
+
$.fn.affix = old
|
2254
|
+
return this
|
2255
|
+
}
|
2256
|
+
|
2257
|
+
|
2258
|
+
/* AFFIX DATA-API
|
2259
|
+
* ============== */
|
2260
|
+
|
2261
|
+
$(window).on('load', function () {
|
2262
|
+
$('[data-spy="affix"]').each(function () {
|
2263
|
+
var $spy = $(this)
|
2264
|
+
, data = $spy.data()
|
2265
|
+
|
2266
|
+
data.offset = data.offset || {}
|
2267
|
+
|
2268
|
+
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
|
2269
|
+
data.offsetTop && (data.offset.top = data.offsetTop)
|
2270
|
+
|
2271
|
+
$spy.affix(data)
|
1723
2272
|
})
|
1724
2273
|
})
|
1725
2274
|
|
1726
|
-
|
2275
|
+
|
2276
|
+
}(window.jQuery);
|