mechanize_store 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +60 -0
- data/Rakefile +28 -0
- data/app/assets/javascripts/mechanize_store/application.js +22 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/bootstrap.js +1951 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/custom.js +58 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/flot/excanvas.min.js +1 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/flot/jquery.flot.js +3137 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/flot/jquery.flot.pie.js +817 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/flot/main.js +20 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/canvas-to-blob.min.js +1 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.blueimp-gallery.min.js +1 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-angular.js +429 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-audio.js +106 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-image.js +309 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-jquery-ui.js +152 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-process.js +172 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-ui.js +699 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-validate.js +119 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-video.js +106 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload.js +1426 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.iframe-transport.js +214 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.ui.widget.js +530 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/load-image.min.js +1 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/main.js +14 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/tmpl.min.js +1 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-ui.js +2256 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery.activity-indicator-1.0.0.min.js +223 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/dataTables/dataTables.bootstrap.js +245 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/dataTables/jquery.dataTables.js +14013 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/excanvas.min.js +1 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.js +2599 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.pie.js +750 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.resize.js +60 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.tooltip.min.js +12 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/metisMenu/jquery.metisMenu.js +45 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/morris/morris.js +1888 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/morris/raphael-2.1.0.min.js +10 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/sb-admin.js +18 -0
- data/app/assets/stylesheets/mechanize_store/application.css +197 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/bootstrap.css +5831 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/dataTables/dataTables.bootstrap.css +233 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/morris/morris-0.4.3.min.css +2 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/social-buttons/social-buttons.css +68 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/timeline/timeline.css +144 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/sb-admin.css +307 -0
- data/app/controllers/mechanize_store/application_controller.rb +4 -0
- data/app/controllers/mechanize_store/flags_controller.rb +77 -0
- data/app/controllers/mechanize_store/order_statuses_controller.rb +77 -0
- data/app/controllers/mechanize_store/orders_controller.rb +28 -0
- data/app/controllers/mechanize_store/payment_statuses_controller.rb +77 -0
- data/app/controllers/mechanize_store/payment_types_controller.rb +77 -0
- data/app/controllers/mechanize_store/product_categories_controller.rb +77 -0
- data/app/controllers/mechanize_store/product_photos_controller.rb +49 -0
- data/app/controllers/mechanize_store/products_controller.rb +77 -0
- data/app/helpers/mechanize_store/application_helper.rb +7 -0
- data/app/models/mechanize_store/flag.rb +4 -0
- data/app/models/mechanize_store/freight.rb +5 -0
- data/app/models/mechanize_store/order.rb +47 -0
- data/app/models/mechanize_store/order_item.rb +10 -0
- data/app/models/mechanize_store/order_status.rb +10 -0
- data/app/models/mechanize_store/payment.rb +8 -0
- data/app/models/mechanize_store/payment_status.rb +19 -0
- data/app/models/mechanize_store/payment_type.rb +5 -0
- data/app/models/mechanize_store/product.rb +11 -0
- data/app/models/mechanize_store/product_category.rb +5 -0
- data/app/models/mechanize_store/product_photo.rb +16 -0
- data/app/views/mechanize_store/flags/_form.html.erb +11 -0
- data/app/views/mechanize_store/flags/edit.html.erb +12 -0
- data/app/views/mechanize_store/flags/index.html.erb +46 -0
- data/app/views/mechanize_store/flags/new.html.erb +9 -0
- data/app/views/mechanize_store/flags/show.html.erb +15 -0
- data/app/views/mechanize_store/order_statuses/_form.html.erb +11 -0
- data/app/views/mechanize_store/order_statuses/edit.html.erb +12 -0
- data/app/views/mechanize_store/order_statuses/index.html.erb +46 -0
- data/app/views/mechanize_store/order_statuses/new.html.erb +9 -0
- data/app/views/mechanize_store/order_statuses/show.html.erb +15 -0
- data/app/views/mechanize_store/orders/index.html.erb +84 -0
- data/app/views/mechanize_store/orders/show.html.erb +0 -0
- data/app/views/mechanize_store/payment_statuses/_form.html.erb +11 -0
- data/app/views/mechanize_store/payment_statuses/edit.html.erb +12 -0
- data/app/views/mechanize_store/payment_statuses/index.html.erb +46 -0
- data/app/views/mechanize_store/payment_statuses/new.html.erb +9 -0
- data/app/views/mechanize_store/payment_statuses/show.html.erb +15 -0
- data/app/views/mechanize_store/payment_types/_form.html.erb +11 -0
- data/app/views/mechanize_store/payment_types/edit.html.erb +12 -0
- data/app/views/mechanize_store/payment_types/index.html.erb +46 -0
- data/app/views/mechanize_store/payment_types/new.html.erb +9 -0
- data/app/views/mechanize_store/payment_types/show.html.erb +15 -0
- data/app/views/mechanize_store/product_categories/_form.html.erb +12 -0
- data/app/views/mechanize_store/product_categories/edit.html.erb +12 -0
- data/app/views/mechanize_store/product_categories/index.html.erb +46 -0
- data/app/views/mechanize_store/product_categories/new.html.erb +9 -0
- data/app/views/mechanize_store/product_categories/show.html.erb +19 -0
- data/app/views/mechanize_store/product_photos/create.json.jbuilder +9 -0
- data/app/views/mechanize_store/product_photos/index.json.jbuilder +9 -0
- data/app/views/mechanize_store/products/_form.html.erb +18 -0
- data/app/views/mechanize_store/products/edit.html.erb +12 -0
- data/app/views/mechanize_store/products/index.html.erb +50 -0
- data/app/views/mechanize_store/products/new.html.erb +9 -0
- data/app/views/mechanize_store/products/show.html.erb +197 -0
- data/app/views/shared/_flashes.html.erb +8 -0
- data/config/locales/mechanize_store.pt-BR.yml +65 -0
- data/config/routes.rb +11 -0
- data/db/migrate/20140401203200_create_mechanize_store_freights.rb +12 -0
- data/db/migrate/20140401203246_create_mechanize_store_order_statuses.rb +9 -0
- data/db/migrate/20140402140318_create_mechanize_store_payment_statuses.rb +9 -0
- data/db/migrate/20140402140325_create_mechanize_store_payment_types.rb +9 -0
- data/db/migrate/20140402140539_create_mechanize_store_payments.rb +15 -0
- data/db/migrate/20140402140549_create_mechanize_store_flags.rb +9 -0
- data/db/migrate/20140402140832_create_mechanize_store_products.rb +16 -0
- data/db/migrate/20140402140942_create_mechanize_store_product_photos.rb +10 -0
- data/db/migrate/20140402153139_create_mechanize_store_orders.rb +11 -0
- data/db/migrate/20140402192058_create_mechanize_store_product_categories.rb +10 -0
- data/db/migrate/20140407193412_add_width_to_mechanize_store_product.rb +6 -0
- data/db/migrate/20140409191426_create_mechanize_store_order_items.rb +12 -0
- data/db/migrate/20140416123100_add_payment_type_id_to_payment.rb +6 -0
- data/db/migrate/20140417200520_add_time_to_freight.rb +5 -0
- data/lib/mechanize_store.rb +4 -0
- data/lib/mechanize_store/engine.rb +17 -0
- data/lib/mechanize_store/version.rb +3 -0
- data/lib/tasks/mechanize_store_tasks.rake +4 -0
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/lib/templates/erb/scaffold/edit.html.erb +12 -0
- data/lib/templates/erb/scaffold/index.html.erb +50 -0
- data/lib/templates/erb/scaffold/new.html.erb +9 -0
- data/lib/templates/erb/scaffold/show.html.erb +17 -0
- data/lib/templates/rails/scaffold_controller/controller.rb +79 -0
- data/spec/controllers/mechanize_store/flags_controller_spec.rb +138 -0
- data/spec/controllers/mechanize_store/order_statuses_controller_spec.rb +138 -0
- data/spec/controllers/mechanize_store/orders_controller_spec.rb +29 -0
- data/spec/controllers/mechanize_store/payment_statuses_controller_spec.rb +139 -0
- data/spec/controllers/mechanize_store/payment_types_controller_spec.rb +139 -0
- data/spec/controllers/mechanize_store/product_categories_controller_spec.rb +138 -0
- data/spec/controllers/mechanize_store/product_photos_controller_spec.rb +75 -0
- data/spec/controllers/mechanize_store/products_controller_spec.rb +135 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +25 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +29 -0
- data/spec/dummy/config/environments/production.rb +80 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/simple_form.rb +145 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/locales/pt-BR.yml +23 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20140407144119_create_mechanize_store_freights.mechanize_store.rb +13 -0
- data/spec/dummy/db/migrate/20140407144120_create_mechanize_store_order_statuses.mechanize_store.rb +10 -0
- data/spec/dummy/db/migrate/20140407144121_create_mechanize_store_payment_statuses.mechanize_store.rb +10 -0
- data/spec/dummy/db/migrate/20140407144122_create_mechanize_store_payment_types.mechanize_store.rb +10 -0
- data/spec/dummy/db/migrate/20140407144123_create_mechanize_store_payments.mechanize_store.rb +17 -0
- data/spec/dummy/db/migrate/20140407144124_create_mechanize_store_flags.mechanize_store.rb +10 -0
- data/spec/dummy/db/migrate/20140407144125_create_mechanize_store_products.mechanize_store.rb +17 -0
- data/spec/dummy/db/migrate/20140407144126_create_mechanize_store_product_photos.mechanize_store.rb +11 -0
- data/spec/dummy/db/migrate/20140407144127_create_mechanize_store_orders.mechanize_store.rb +12 -0
- data/spec/dummy/db/migrate/20140407144128_create_mechanize_store_product_categories.mechanize_store.rb +11 -0
- data/spec/dummy/db/migrate/20140407193949_add_width_to_mechanize_store_product.mechanize_store.rb +7 -0
- data/spec/dummy/db/migrate/20140409191457_create_mechanize_store_order_items.mechanize_store.rb +13 -0
- data/spec/dummy/db/schema.rb +125 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +24931 -0
- data/spec/dummy/log/test.log +42225 -0
- data/spec/dummy/public/404.html +58 -0
- data/spec/dummy/public/422.html +58 -0
- data/spec/dummy/public/500.html +57 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/015a50b3ac7ad70aa90ce0a95c99df04 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/020540bcd9f6782692071f17f50f43b0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0378e5799bf84efc4c9b8ac61252a081 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/04032662bf2ebfb00b4218e459ab14bf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/043663643ec7f44e8f7baeb7856605bb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/059883583379e5e373caaa73ac8f18ca +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/05f7ba95ff1ffeab9cb378fcb7b0289f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/069b62a9f82e145a95c6dbcada54860d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/06ce3d4f3b99f90fa0ced1db38c5fb13 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0a70c895b23487214ec56a6cd4bd9552 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0e42ab04670f4d8017b5eeb5ec7f080b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0f2edd5bf10b0d769d20d28769abf705 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/14464296f672d2910982229137d66535 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/19456f04c83f78d9ab6e5d57031015ef +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1a5faaf1e18d5f49d129459ae565f1af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1a78a9c2facea31464f84e54fdc36059 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1da2c163f7f6bbd029786010cd788bce +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/250ad25722c066145272032ad82f4561 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2593c6406f0e0ba8eb5271badc1fbef1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/262f77e6bb6c8e1453f5477c82a17b11 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/27479abec405e7ea5ee309699b19c495 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2b16e3dfbce9d1bb0de91f424f03694a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2b89581781ce2529d6435ae4a831dcb9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2c8d436d977e56045cd16cc55f33e24f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2d8950ff6bb73413e9deb6e196bfffd0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2dc34152e91278da6990e448dccf297a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2e2c50f356deda30cee516e501b1eb70 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2ee1b9592bbe1ba628925e28b31fdc2a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2f378010bb54f8ca9c2a38c7df245b26 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/38aa872dea852cc952801236dfc073fc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3c562eb64c2c0fc045f18356d3ddd84e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3daa6dd7a3804d55f1896a2d40ccea5f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/436e4923cef6508f9572309894ad3afb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/43db98f3f4043e28dd241d4bcf40a382 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4517526bf21c2e0d4475812a0801ff73 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/45e8f86d32c088635371e9d83d481ff0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/46c7525f809be6b9a6da46ec5281b90d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/48710380827190cf4c297aeb8ff8f521 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/48c25b92a4e1841bd519a77588afb5df +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4b3b499b73fde3f086615d203a4cd9ee +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4c1f9a5156d1c8724067d833a65dc486 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4e1d544283e15d5f8e7575f717a440a4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/54843f9a3a2ac75ad7ebde3307ce8606 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/55116814eac2aaa3b60343e4269a18f9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/55d45208b6b824293fd70642ec435749 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/593ece65492f611f990932db9d09f2c7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/59bb66920183998fcca5f2c787d0180e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5c19a1c0836acd88cf90128587c8a9f2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5cbd47d1e56ce6ad12324dc100b18435 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5dd2138848e347d174c374d012420ae3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5e2b19c7c137f093e3a17e2eed13b00e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5f29f414f1d3e6a4c8eacd4974e20369 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5fc8e81b247da7b93af8a2eb06017a5e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/646c6b9465381d825591b427e65cfa6f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6554b2d6606c5f90f91a8a1f01ee5207 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/662f5fc7888fcf74ff719aea443f1e0e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/66c3c3a1daf01d2edc14fb56645814af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/69f57e81929c085cfd164a7b30f9cb5f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6a7af764897e94acc0adc4f6855846ea +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6ddd5e3587977e83d7dc7b7124cc4044 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/70894d30d9a638ae5cb410c1bf51d436 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/746b6834bc4167c8495578a1b7b05cd2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/748419e05355441fbf8b5177841a01ae +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/75b6e2b76634cd778e12a60b8862cc83 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/75e995d7f41c3d87054f39654ee96276 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7a6ffbc3e76322931e50faa267bf2ccd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7dbc97a9be7f04dc0f5cb28337fe9f4c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7e908a7a32793f07298fa2f32f7a1da6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/80137a3a1ee5336154baaea4290aa0fa +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/80a4a7e08ffe3c1b0ad632a9f69dae61 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/875373523edad14b9efdc32d30056b88 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8b2a3bdfdd87982dbcdf9beaa4883771 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8c29fc18ccf7320aa1f9d9fbc277adbc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8c48b01bb6fe5d3f87c3e2d8796bfe57 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8c880b8aef8a9168cf039ff966dde072 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8e1041b3a7abe8f1431f078dd04e52f2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8e1509b014a325c41eb6d6d060697d5b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9295c97f3680de471db1138760883721 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/932ff26d70c7f83db540941e70fbc256 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/95d1184dee9d6ad8efbb18992ef7f3bd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9a57b3781439b98aa17111614be63659 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9a958d65f5d84cf81a860fe6b98f7586 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9ba78083ca4f55d2e3dbb4c16f5108a4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9bf7f52d56b17c5fcacc89e0196ec9ec +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9dcc41c3f740c89aa23972f9f0fb7682 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9dd69825bb5d22668e78fcadbcc384bf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9f7694dc7aa37365dca45aa754f46e75 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a119b32f75ff105e311edc0f31ca67f6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a388745aef9974ea0f378a3b83f6f8e7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a80b32eb0130473db70817a2464be54a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a97cfb7a9ba4204c2c02cb794e0b529e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a9d026eb5dcf44bbad77067be7ccc216 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ac2422a2e7c30bbcf41620f5eadf6c9a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/aca81e68e9477c36988579e16d099f7a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ad821e6998f57556c2bbebeac574bbd3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/adc26899d70ead5b9321d6b6be5cb73a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ae2d91de359a9f7f39d93f379705b07c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b1909373f0eb96fc7eb1a16b13cf9d9c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b2d360ac92a3862e54a81752fac14f04 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b32edcdd838f74e3b0b694bb4fb78135 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b80b1d0da5126d78830d5cc9d33bb939 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b80ff122a6e6cb26a8726574c9ed9843 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b8788a2d9cd7867f9732a0d1218b3be3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c01c09c7af2805825d421efe97369c92 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c096a28eb3fb4f6a5943814c1d83de28 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c1c5e3bf6b463ce593f544553cd61880 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c206d760825f5d60935bc162372aae5f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c276778eb885b31ac5c72899422f687b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c381ab6aead4f08abb9b7da1fd2c5cbe +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c3fae7c3a4d1eb0934a03e3508994894 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c532dcbd254ee5454d453f8dca2ea356 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c5febc1300d6cd4c2f85a5dcc4ccca65 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c6337ac9ac53de67c5e4e0bbd8e0b98f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c63f6f599121de54f10407499bdeb95d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c6ccf7b3128d1693a850e8014129e21b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c884f6ae49a257a9b8218d60cddc22c1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c9053dba65ec180c37b513c1e0a02953 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c9274eaf6338c910a014211f057bb10f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c9b7bfc895f9ef763149e886eed1c12a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ca5d6127a6b6cb20b3137c6ed1b086e4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ca68d3d42cc489b72f5a9caa1bec8a0f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cbb3bbaeb5cbb28714fc2d854e55d759 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cbc8f4f72d68f84e285b14c13c615e94 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cbf5cac128a3b9fd8567cf02d8b5c7f4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cf62df2949741a6dfcbdf6dae39a376e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cfe2122c3660d4bf29e621b13cc1e4c0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d1ebcb314c13703007e0a6e9c5604655 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d4db7fd1c1ad160335e9abc86e49a138 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d5a9b12dc73b0e530314f93a2e7d4270 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d84c8af9dd2dd84ac27282b753d2b33c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d86a26ce11fa0095e076b69ecd98fbf6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/dba3e0db21349797be91d79366b2e6d9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/dcfc0ac1daceac33f1f1d348341a8c75 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/dd149c63c658dcacd022a8bbd0136c9f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/de287cf9a2ea50ebc178bcc7cd8e0f4c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/de35fa3c2360ca5a0479c6ec6c8c0d62 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/dfc074e83f62650815ec91d5e6ae716a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e4806a3aea27283bdce20bcb1cc894a6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e9075a2c21b7e2c0543aceff4975485a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e9c2ccf818891a7575ec2200367bbf52 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/eb3496f8d86eed2469155f90f146a7bd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ec5d87f50983b6156db79eb4c4b0ae6d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f0bb04309f0742e927d269899c6b9a4a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f0fdb965c01e31547d9058c609918712 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f2de92b01852702a49c9e9e5cd3b320f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f478e4dc1bdfe5240e3ca48440488e32 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f51cc05ee2ec6ed667257568e527f522 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f535bdc9ad7f7f6ce6009b846c2fc2d7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f61f3d9d282d0c092d604b8433071c77 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f97dc728e6d15fb7ba9f14ad2b8b6bcb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/faeec0db256cfb91ad104e66a9453bd9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fbbf6a435d522871a2d29d97e370bfce +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ffbf6316da17c85bd6bda4bdb1961baf +0 -0
- data/spec/factories/mechanize_store_order_items.rb +10 -0
- data/spec/factories/mechanize_store_products.rb +14 -0
- data/spec/factories/store_flags.rb +7 -0
- data/spec/factories/store_freights.rb +10 -0
- data/spec/factories/store_order_statuses.rb +7 -0
- data/spec/factories/store_orders.rb +8 -0
- data/spec/factories/store_payment_statuses.rb +7 -0
- data/spec/factories/store_payment_types.rb +7 -0
- data/spec/factories/store_payments.rb +14 -0
- data/spec/factories/store_product_categories.rb +8 -0
- data/spec/factories/store_product_photos.rb +8 -0
- data/spec/factories/store_stores.rb +10 -0
- data/spec/features/orders_flow_spec.rb +0 -0
- data/spec/features/products_flow_test.rb +68 -0
- data/spec/fixtures/rails.png +0 -0
- data/spec/models/mechanize_store/order_item_spec.rb +7 -0
- data/spec/models/store/flag_spec.rb +7 -0
- data/spec/models/store/freight_spec.rb +7 -0
- data/spec/models/store/order_spec.rb +7 -0
- data/spec/models/store/order_status_spec.rb +7 -0
- data/spec/models/store/payment_spec.rb +7 -0
- data/spec/models/store/payment_status_spec.rb +7 -0
- data/spec/models/store/payment_type_spec.rb +7 -0
- data/spec/models/store/product_category_spec.rb +7 -0
- data/spec/models/store/product_photo_spec.rb +7 -0
- data/spec/models/store/product_spec.rb +7 -0
- data/spec/models/store/store_spec.rb +7 -0
- data/spec/routing/store/flags_routing_spec.rb +39 -0
- data/spec/routing/store/order_statuses_routing_spec.rb +39 -0
- data/spec/routing/store/orders_routing_spec.rb +18 -0
- data/spec/routing/store/payment_statuses_routing_spec.rb +38 -0
- data/spec/routing/store/payment_types_routing_spec.rb +38 -0
- data/spec/routing/store/product_categories_routing_spec.rb +39 -0
- data/spec/routing/store/products_photos_routing_spec.rb +19 -0
- data/spec/routing/store/products_routing_spec.rb +39 -0
- data/spec/spec_helper.rb +22 -0
- metadata +876 -0
@@ -0,0 +1,750 @@
|
|
1
|
+
/*
|
2
|
+
Flot plugin for rendering pie charts. The plugin assumes the data is
|
3
|
+
coming is as a single data value for each series, and each of those
|
4
|
+
values is a positive value or zero (negative numbers don't make
|
5
|
+
any sense and will cause strange effects). The data values do
|
6
|
+
NOT need to be passed in as percentage values because it
|
7
|
+
internally calculates the total and percentages.
|
8
|
+
|
9
|
+
* Created by Brian Medendorp, June 2009
|
10
|
+
* Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars
|
11
|
+
|
12
|
+
* Changes:
|
13
|
+
2009-10-22: lineJoin set to round
|
14
|
+
2009-10-23: IE full circle fix, donut
|
15
|
+
2009-11-11: Added basic hover from btburnett3 - does not work in IE, and center is off in Chrome and Opera
|
16
|
+
2009-11-17: Added IE hover capability submitted by Anthony Aragues
|
17
|
+
2009-11-18: Added bug fix submitted by Xavi Ivars (issues with arrays when other JS libraries are included as well)
|
18
|
+
|
19
|
+
|
20
|
+
Available options are:
|
21
|
+
series: {
|
22
|
+
pie: {
|
23
|
+
show: true/false
|
24
|
+
radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'
|
25
|
+
innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect
|
26
|
+
startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result
|
27
|
+
tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)
|
28
|
+
offset: {
|
29
|
+
top: integer value to move the pie up or down
|
30
|
+
left: integer value to move the pie left or right, or 'auto'
|
31
|
+
},
|
32
|
+
stroke: {
|
33
|
+
color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')
|
34
|
+
width: integer pixel width of the stroke
|
35
|
+
},
|
36
|
+
label: {
|
37
|
+
show: true/false, or 'auto'
|
38
|
+
formatter: a user-defined function that modifies the text/style of the label text
|
39
|
+
radius: 0-1 for percentage of fullsize, or a specified pixel length
|
40
|
+
background: {
|
41
|
+
color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')
|
42
|
+
opacity: 0-1
|
43
|
+
},
|
44
|
+
threshold: 0-1 for the percentage value at which to hide labels (if they're too small)
|
45
|
+
},
|
46
|
+
combine: {
|
47
|
+
threshold: 0-1 for the percentage value at which to combine slices (if they're too small)
|
48
|
+
color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined
|
49
|
+
label: any text value of what the combined slice should be labeled
|
50
|
+
}
|
51
|
+
highlight: {
|
52
|
+
opacity: 0-1
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
More detail and specific examples can be found in the included HTML file.
|
58
|
+
|
59
|
+
*/
|
60
|
+
|
61
|
+
(function ($)
|
62
|
+
{
|
63
|
+
function init(plot) // this is the "body" of the plugin
|
64
|
+
{
|
65
|
+
var canvas = null;
|
66
|
+
var target = null;
|
67
|
+
var maxRadius = null;
|
68
|
+
var centerLeft = null;
|
69
|
+
var centerTop = null;
|
70
|
+
var total = 0;
|
71
|
+
var redraw = true;
|
72
|
+
var redrawAttempts = 10;
|
73
|
+
var shrink = 0.95;
|
74
|
+
var legendWidth = 0;
|
75
|
+
var processed = false;
|
76
|
+
var raw = false;
|
77
|
+
|
78
|
+
// interactive variables
|
79
|
+
var highlights = [];
|
80
|
+
|
81
|
+
// add hook to determine if pie plugin in enabled, and then perform necessary operations
|
82
|
+
plot.hooks.processOptions.push(checkPieEnabled);
|
83
|
+
plot.hooks.bindEvents.push(bindEvents);
|
84
|
+
|
85
|
+
// check to see if the pie plugin is enabled
|
86
|
+
function checkPieEnabled(plot, options)
|
87
|
+
{
|
88
|
+
if (options.series.pie.show)
|
89
|
+
{
|
90
|
+
//disable grid
|
91
|
+
options.grid.show = false;
|
92
|
+
|
93
|
+
// set labels.show
|
94
|
+
if (options.series.pie.label.show=='auto')
|
95
|
+
if (options.legend.show)
|
96
|
+
options.series.pie.label.show = false;
|
97
|
+
else
|
98
|
+
options.series.pie.label.show = true;
|
99
|
+
|
100
|
+
// set radius
|
101
|
+
if (options.series.pie.radius=='auto')
|
102
|
+
if (options.series.pie.label.show)
|
103
|
+
options.series.pie.radius = 3/4;
|
104
|
+
else
|
105
|
+
options.series.pie.radius = 1;
|
106
|
+
|
107
|
+
// ensure sane tilt
|
108
|
+
if (options.series.pie.tilt>1)
|
109
|
+
options.series.pie.tilt=1;
|
110
|
+
if (options.series.pie.tilt<0)
|
111
|
+
options.series.pie.tilt=0;
|
112
|
+
|
113
|
+
// add processData hook to do transformations on the data
|
114
|
+
plot.hooks.processDatapoints.push(processDatapoints);
|
115
|
+
plot.hooks.drawOverlay.push(drawOverlay);
|
116
|
+
|
117
|
+
// add draw hook
|
118
|
+
plot.hooks.draw.push(draw);
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
// bind hoverable events
|
123
|
+
function bindEvents(plot, eventHolder)
|
124
|
+
{
|
125
|
+
var options = plot.getOptions();
|
126
|
+
|
127
|
+
if (options.series.pie.show && options.grid.hoverable)
|
128
|
+
eventHolder.unbind('mousemove').mousemove(onMouseMove);
|
129
|
+
|
130
|
+
if (options.series.pie.show && options.grid.clickable)
|
131
|
+
eventHolder.unbind('click').click(onClick);
|
132
|
+
}
|
133
|
+
|
134
|
+
|
135
|
+
// debugging function that prints out an object
|
136
|
+
function alertObject(obj)
|
137
|
+
{
|
138
|
+
var msg = '';
|
139
|
+
function traverse(obj, depth)
|
140
|
+
{
|
141
|
+
if (!depth)
|
142
|
+
depth = 0;
|
143
|
+
for (var i = 0; i < obj.length; ++i)
|
144
|
+
{
|
145
|
+
for (var j=0; j<depth; j++)
|
146
|
+
msg += '\t';
|
147
|
+
|
148
|
+
if( typeof obj[i] == "object")
|
149
|
+
{ // its an object
|
150
|
+
msg += ''+i+':\n';
|
151
|
+
traverse(obj[i], depth+1);
|
152
|
+
}
|
153
|
+
else
|
154
|
+
{ // its a value
|
155
|
+
msg += ''+i+': '+obj[i]+'\n';
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
traverse(obj);
|
160
|
+
alert(msg);
|
161
|
+
}
|
162
|
+
|
163
|
+
function calcTotal(data)
|
164
|
+
{
|
165
|
+
for (var i = 0; i < data.length; ++i)
|
166
|
+
{
|
167
|
+
var item = parseFloat(data[i].data[0][1]);
|
168
|
+
if (item)
|
169
|
+
total += item;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
function processDatapoints(plot, series, data, datapoints)
|
174
|
+
{
|
175
|
+
if (!processed)
|
176
|
+
{
|
177
|
+
processed = true;
|
178
|
+
|
179
|
+
canvas = plot.getCanvas();
|
180
|
+
target = $(canvas).parent();
|
181
|
+
options = plot.getOptions();
|
182
|
+
|
183
|
+
plot.setData(combine(plot.getData()));
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
function setupPie()
|
188
|
+
{
|
189
|
+
legendWidth = target.children().filter('.legend').children().width();
|
190
|
+
|
191
|
+
// calculate maximum radius and center point
|
192
|
+
maxRadius = Math.min(canvas.width,(canvas.height/options.series.pie.tilt))/2;
|
193
|
+
centerTop = (canvas.height/2)+options.series.pie.offset.top;
|
194
|
+
centerLeft = (canvas.width/2);
|
195
|
+
|
196
|
+
if (options.series.pie.offset.left=='auto')
|
197
|
+
if (options.legend.position.match('w'))
|
198
|
+
centerLeft += legendWidth/2;
|
199
|
+
else
|
200
|
+
centerLeft -= legendWidth/2;
|
201
|
+
else
|
202
|
+
centerLeft += options.series.pie.offset.left;
|
203
|
+
|
204
|
+
if (centerLeft<maxRadius)
|
205
|
+
centerLeft = maxRadius;
|
206
|
+
else if (centerLeft>canvas.width-maxRadius)
|
207
|
+
centerLeft = canvas.width-maxRadius;
|
208
|
+
}
|
209
|
+
|
210
|
+
function fixData(data)
|
211
|
+
{
|
212
|
+
for (var i = 0; i < data.length; ++i)
|
213
|
+
{
|
214
|
+
if (typeof(data[i].data)=='number')
|
215
|
+
data[i].data = [[1,data[i].data]];
|
216
|
+
else if (typeof(data[i].data)=='undefined' || typeof(data[i].data[0])=='undefined')
|
217
|
+
{
|
218
|
+
if (typeof(data[i].data)!='undefined' && typeof(data[i].data.label)!='undefined')
|
219
|
+
data[i].label = data[i].data.label; // fix weirdness coming from flot
|
220
|
+
data[i].data = [[1,0]];
|
221
|
+
|
222
|
+
}
|
223
|
+
}
|
224
|
+
return data;
|
225
|
+
}
|
226
|
+
|
227
|
+
function combine(data)
|
228
|
+
{
|
229
|
+
data = fixData(data);
|
230
|
+
calcTotal(data);
|
231
|
+
var combined = 0;
|
232
|
+
var numCombined = 0;
|
233
|
+
var color = options.series.pie.combine.color;
|
234
|
+
|
235
|
+
var newdata = [];
|
236
|
+
for (var i = 0; i < data.length; ++i)
|
237
|
+
{
|
238
|
+
// make sure its a number
|
239
|
+
data[i].data[0][1] = parseFloat(data[i].data[0][1]);
|
240
|
+
if (!data[i].data[0][1])
|
241
|
+
data[i].data[0][1] = 0;
|
242
|
+
|
243
|
+
if (data[i].data[0][1]/total<=options.series.pie.combine.threshold)
|
244
|
+
{
|
245
|
+
combined += data[i].data[0][1];
|
246
|
+
numCombined++;
|
247
|
+
if (!color)
|
248
|
+
color = data[i].color;
|
249
|
+
}
|
250
|
+
else
|
251
|
+
{
|
252
|
+
newdata.push({
|
253
|
+
data: [[1,data[i].data[0][1]]],
|
254
|
+
color: data[i].color,
|
255
|
+
label: data[i].label,
|
256
|
+
angle: (data[i].data[0][1]*(Math.PI*2))/total,
|
257
|
+
percent: (data[i].data[0][1]/total*100)
|
258
|
+
});
|
259
|
+
}
|
260
|
+
}
|
261
|
+
if (numCombined>0)
|
262
|
+
newdata.push({
|
263
|
+
data: [[1,combined]],
|
264
|
+
color: color,
|
265
|
+
label: options.series.pie.combine.label,
|
266
|
+
angle: (combined*(Math.PI*2))/total,
|
267
|
+
percent: (combined/total*100)
|
268
|
+
});
|
269
|
+
return newdata;
|
270
|
+
}
|
271
|
+
|
272
|
+
function draw(plot, newCtx)
|
273
|
+
{
|
274
|
+
if (!target) return; // if no series were passed
|
275
|
+
ctx = newCtx;
|
276
|
+
|
277
|
+
setupPie();
|
278
|
+
var slices = plot.getData();
|
279
|
+
|
280
|
+
var attempts = 0;
|
281
|
+
while (redraw && attempts<redrawAttempts)
|
282
|
+
{
|
283
|
+
redraw = false;
|
284
|
+
if (attempts>0)
|
285
|
+
maxRadius *= shrink;
|
286
|
+
attempts += 1;
|
287
|
+
clear();
|
288
|
+
if (options.series.pie.tilt<=0.8)
|
289
|
+
drawShadow();
|
290
|
+
drawPie();
|
291
|
+
}
|
292
|
+
if (attempts >= redrawAttempts) {
|
293
|
+
clear();
|
294
|
+
target.prepend('<div class="error">Could not draw pie with labels contained inside canvas</div>');
|
295
|
+
}
|
296
|
+
|
297
|
+
if ( plot.setSeries && plot.insertLegend )
|
298
|
+
{
|
299
|
+
plot.setSeries(slices);
|
300
|
+
plot.insertLegend();
|
301
|
+
}
|
302
|
+
|
303
|
+
// we're actually done at this point, just defining internal functions at this point
|
304
|
+
|
305
|
+
function clear()
|
306
|
+
{
|
307
|
+
ctx.clearRect(0,0,canvas.width,canvas.height);
|
308
|
+
target.children().filter('.pieLabel, .pieLabelBackground').remove();
|
309
|
+
}
|
310
|
+
|
311
|
+
function drawShadow()
|
312
|
+
{
|
313
|
+
var shadowLeft = 5;
|
314
|
+
var shadowTop = 15;
|
315
|
+
var edge = 10;
|
316
|
+
var alpha = 0.02;
|
317
|
+
|
318
|
+
// set radius
|
319
|
+
if (options.series.pie.radius>1)
|
320
|
+
var radius = options.series.pie.radius;
|
321
|
+
else
|
322
|
+
var radius = maxRadius * options.series.pie.radius;
|
323
|
+
|
324
|
+
if (radius>=(canvas.width/2)-shadowLeft || radius*options.series.pie.tilt>=(canvas.height/2)-shadowTop || radius<=edge)
|
325
|
+
return; // shadow would be outside canvas, so don't draw it
|
326
|
+
|
327
|
+
ctx.save();
|
328
|
+
ctx.translate(shadowLeft,shadowTop);
|
329
|
+
ctx.globalAlpha = alpha;
|
330
|
+
ctx.fillStyle = '#000';
|
331
|
+
|
332
|
+
// center and rotate to starting position
|
333
|
+
ctx.translate(centerLeft,centerTop);
|
334
|
+
ctx.scale(1, options.series.pie.tilt);
|
335
|
+
|
336
|
+
//radius -= edge;
|
337
|
+
for (var i=1; i<=edge; i++)
|
338
|
+
{
|
339
|
+
ctx.beginPath();
|
340
|
+
ctx.arc(0,0,radius,0,Math.PI*2,false);
|
341
|
+
ctx.fill();
|
342
|
+
radius -= i;
|
343
|
+
}
|
344
|
+
|
345
|
+
ctx.remechanize_store();
|
346
|
+
}
|
347
|
+
|
348
|
+
function drawPie()
|
349
|
+
{
|
350
|
+
startAngle = Math.PI*options.series.pie.startAngle;
|
351
|
+
|
352
|
+
// set radius
|
353
|
+
if (options.series.pie.radius>1)
|
354
|
+
var radius = options.series.pie.radius;
|
355
|
+
else
|
356
|
+
var radius = maxRadius * options.series.pie.radius;
|
357
|
+
|
358
|
+
// center and rotate to starting position
|
359
|
+
ctx.save();
|
360
|
+
ctx.translate(centerLeft,centerTop);
|
361
|
+
ctx.scale(1, options.series.pie.tilt);
|
362
|
+
//ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera
|
363
|
+
|
364
|
+
// draw slices
|
365
|
+
ctx.save();
|
366
|
+
var currentAngle = startAngle;
|
367
|
+
for (var i = 0; i < slices.length; ++i)
|
368
|
+
{
|
369
|
+
slices[i].startAngle = currentAngle;
|
370
|
+
drawSlice(slices[i].angle, slices[i].color, true);
|
371
|
+
}
|
372
|
+
ctx.remechanize_store();
|
373
|
+
|
374
|
+
// draw slice outlines
|
375
|
+
ctx.save();
|
376
|
+
ctx.lineWidth = options.series.pie.stroke.width;
|
377
|
+
currentAngle = startAngle;
|
378
|
+
for (var i = 0; i < slices.length; ++i)
|
379
|
+
drawSlice(slices[i].angle, options.series.pie.stroke.color, false);
|
380
|
+
ctx.remechanize_store();
|
381
|
+
|
382
|
+
// draw donut hole
|
383
|
+
drawDonutHole(ctx);
|
384
|
+
|
385
|
+
// draw labels
|
386
|
+
if (options.series.pie.label.show)
|
387
|
+
drawLabels();
|
388
|
+
|
389
|
+
// remechanize_store to original state
|
390
|
+
ctx.remechanize_store();
|
391
|
+
|
392
|
+
function drawSlice(angle, color, fill)
|
393
|
+
{
|
394
|
+
if (angle<=0)
|
395
|
+
return;
|
396
|
+
|
397
|
+
if (fill)
|
398
|
+
ctx.fillStyle = color;
|
399
|
+
else
|
400
|
+
{
|
401
|
+
ctx.strokeStyle = color;
|
402
|
+
ctx.lineJoin = 'round';
|
403
|
+
}
|
404
|
+
|
405
|
+
ctx.beginPath();
|
406
|
+
if (Math.abs(angle - Math.PI*2) > 0.000000001)
|
407
|
+
ctx.moveTo(0,0); // Center of the pie
|
408
|
+
else if ($.browser.msie)
|
409
|
+
angle -= 0.0001;
|
410
|
+
//ctx.arc(0,0,radius,0,angle,false); // This doesn't work properly in Opera
|
411
|
+
ctx.arc(0,0,radius,currentAngle,currentAngle+angle,false);
|
412
|
+
ctx.closePath();
|
413
|
+
//ctx.rotate(angle); // This doesn't work properly in Opera
|
414
|
+
currentAngle += angle;
|
415
|
+
|
416
|
+
if (fill)
|
417
|
+
ctx.fill();
|
418
|
+
else
|
419
|
+
ctx.stroke();
|
420
|
+
}
|
421
|
+
|
422
|
+
function drawLabels()
|
423
|
+
{
|
424
|
+
var currentAngle = startAngle;
|
425
|
+
|
426
|
+
// set radius
|
427
|
+
if (options.series.pie.label.radius>1)
|
428
|
+
var radius = options.series.pie.label.radius;
|
429
|
+
else
|
430
|
+
var radius = maxRadius * options.series.pie.label.radius;
|
431
|
+
|
432
|
+
for (var i = 0; i < slices.length; ++i)
|
433
|
+
{
|
434
|
+
if (slices[i].percent >= options.series.pie.label.threshold*100)
|
435
|
+
drawLabel(slices[i], currentAngle, i);
|
436
|
+
currentAngle += slices[i].angle;
|
437
|
+
}
|
438
|
+
|
439
|
+
function drawLabel(slice, startAngle, index)
|
440
|
+
{
|
441
|
+
if (slice.data[0][1]==0)
|
442
|
+
return;
|
443
|
+
|
444
|
+
// format label text
|
445
|
+
var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter;
|
446
|
+
if (lf)
|
447
|
+
text = lf(slice.label, slice);
|
448
|
+
else
|
449
|
+
text = slice.label;
|
450
|
+
if (plf)
|
451
|
+
text = plf(text, slice);
|
452
|
+
|
453
|
+
var halfAngle = ((startAngle+slice.angle) + startAngle)/2;
|
454
|
+
var x = centerLeft + Math.round(Math.cos(halfAngle) * radius);
|
455
|
+
var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt;
|
456
|
+
|
457
|
+
var html = '<span class="pieLabel" id="pieLabel'+index+'" style="position:absolute;top:' + y + 'px;left:' + x + 'px;">' + text + "</span>";
|
458
|
+
target.append(html);
|
459
|
+
var label = target.children('#pieLabel'+index);
|
460
|
+
var labelTop = (y - label.height()/2);
|
461
|
+
var labelLeft = (x - label.width()/2);
|
462
|
+
label.css('top', labelTop);
|
463
|
+
label.css('left', labelLeft);
|
464
|
+
|
465
|
+
// check to make sure that the label is not outside the canvas
|
466
|
+
if (0-labelTop>0 || 0-labelLeft>0 || canvas.height-(labelTop+label.height())<0 || canvas.width-(labelLeft+label.width())<0)
|
467
|
+
redraw = true;
|
468
|
+
|
469
|
+
if (options.series.pie.label.background.opacity != 0) {
|
470
|
+
// put in the transparent background separately to avoid blended labels and label boxes
|
471
|
+
var c = options.series.pie.label.background.color;
|
472
|
+
if (c == null) {
|
473
|
+
c = slice.color;
|
474
|
+
}
|
475
|
+
var pos = 'top:'+labelTop+'px;left:'+labelLeft+'px;';
|
476
|
+
$('<div class="pieLabelBackground" style="position:absolute;width:' + label.width() + 'px;height:' + label.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').insertBefore(label).css('opacity', options.series.pie.label.background.opacity);
|
477
|
+
}
|
478
|
+
} // end individual label function
|
479
|
+
} // end drawLabels function
|
480
|
+
} // end drawPie function
|
481
|
+
} // end draw function
|
482
|
+
|
483
|
+
// Placed here because it needs to be accessed from multiple locations
|
484
|
+
function drawDonutHole(layer)
|
485
|
+
{
|
486
|
+
// draw donut hole
|
487
|
+
if(options.series.pie.innerRadius > 0)
|
488
|
+
{
|
489
|
+
// subtract the center
|
490
|
+
layer.save();
|
491
|
+
innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius;
|
492
|
+
layer.globalCompositeOperation = 'destination-out'; // this does not work with excanvas, but it will fall back to using the stroke color
|
493
|
+
layer.beginPath();
|
494
|
+
layer.fillStyle = options.series.pie.stroke.color;
|
495
|
+
layer.arc(0,0,innerRadius,0,Math.PI*2,false);
|
496
|
+
layer.fill();
|
497
|
+
layer.closePath();
|
498
|
+
layer.remechanize_store();
|
499
|
+
|
500
|
+
// add inner stroke
|
501
|
+
layer.save();
|
502
|
+
layer.beginPath();
|
503
|
+
layer.strokeStyle = options.series.pie.stroke.color;
|
504
|
+
layer.arc(0,0,innerRadius,0,Math.PI*2,false);
|
505
|
+
layer.stroke();
|
506
|
+
layer.closePath();
|
507
|
+
layer.remechanize_store();
|
508
|
+
// TODO: add extra shadow inside hole (with a mask) if the pie is tilted.
|
509
|
+
}
|
510
|
+
}
|
511
|
+
|
512
|
+
//-- Additional Interactive related functions --
|
513
|
+
|
514
|
+
function isPointInPoly(poly, pt)
|
515
|
+
{
|
516
|
+
for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i)
|
517
|
+
((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1]))
|
518
|
+
&& (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0])
|
519
|
+
&& (c = !c);
|
520
|
+
return c;
|
521
|
+
}
|
522
|
+
|
523
|
+
function findNearbySlice(mouseX, mouseY)
|
524
|
+
{
|
525
|
+
var slices = plot.getData(),
|
526
|
+
options = plot.getOptions(),
|
527
|
+
radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
|
528
|
+
|
529
|
+
for (var i = 0; i < slices.length; ++i)
|
530
|
+
{
|
531
|
+
var s = slices[i];
|
532
|
+
|
533
|
+
if(s.pie.show)
|
534
|
+
{
|
535
|
+
ctx.save();
|
536
|
+
ctx.beginPath();
|
537
|
+
ctx.moveTo(0,0); // Center of the pie
|
538
|
+
//ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here.
|
539
|
+
ctx.arc(0,0,radius,s.startAngle,s.startAngle+s.angle,false);
|
540
|
+
ctx.closePath();
|
541
|
+
x = mouseX-centerLeft;
|
542
|
+
y = mouseY-centerTop;
|
543
|
+
if(ctx.isPointInPath)
|
544
|
+
{
|
545
|
+
if (ctx.isPointInPath(mouseX-centerLeft, mouseY-centerTop))
|
546
|
+
{
|
547
|
+
//alert('found slice!');
|
548
|
+
ctx.remechanize_store();
|
549
|
+
return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i};
|
550
|
+
}
|
551
|
+
}
|
552
|
+
else
|
553
|
+
{
|
554
|
+
// excanvas for IE doesn;t support isPointInPath, this is a workaround.
|
555
|
+
p1X = (radius * Math.cos(s.startAngle));
|
556
|
+
p1Y = (radius * Math.sin(s.startAngle));
|
557
|
+
p2X = (radius * Math.cos(s.startAngle+(s.angle/4)));
|
558
|
+
p2Y = (radius * Math.sin(s.startAngle+(s.angle/4)));
|
559
|
+
p3X = (radius * Math.cos(s.startAngle+(s.angle/2)));
|
560
|
+
p3Y = (radius * Math.sin(s.startAngle+(s.angle/2)));
|
561
|
+
p4X = (radius * Math.cos(s.startAngle+(s.angle/1.5)));
|
562
|
+
p4Y = (radius * Math.sin(s.startAngle+(s.angle/1.5)));
|
563
|
+
p5X = (radius * Math.cos(s.startAngle+s.angle));
|
564
|
+
p5Y = (radius * Math.sin(s.startAngle+s.angle));
|
565
|
+
arrPoly = [[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]];
|
566
|
+
arrPoint = [x,y];
|
567
|
+
// TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt?
|
568
|
+
if(isPointInPoly(arrPoly, arrPoint))
|
569
|
+
{
|
570
|
+
ctx.remechanize_store();
|
571
|
+
return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i};
|
572
|
+
}
|
573
|
+
}
|
574
|
+
ctx.remechanize_store();
|
575
|
+
}
|
576
|
+
}
|
577
|
+
|
578
|
+
return null;
|
579
|
+
}
|
580
|
+
|
581
|
+
function onMouseMove(e)
|
582
|
+
{
|
583
|
+
triggerClickHoverEvent('plothover', e);
|
584
|
+
}
|
585
|
+
|
586
|
+
function onClick(e)
|
587
|
+
{
|
588
|
+
triggerClickHoverEvent('plotclick', e);
|
589
|
+
}
|
590
|
+
|
591
|
+
// trigger click or hover event (they send the same parameters so we share their code)
|
592
|
+
function triggerClickHoverEvent(eventname, e)
|
593
|
+
{
|
594
|
+
var offset = plot.offset(),
|
595
|
+
canvasX = parseInt(e.pageX - offset.left),
|
596
|
+
canvasY = parseInt(e.pageY - offset.top),
|
597
|
+
item = findNearbySlice(canvasX, canvasY);
|
598
|
+
|
599
|
+
if (options.grid.autoHighlight)
|
600
|
+
{
|
601
|
+
// clear auto-highlights
|
602
|
+
for (var i = 0; i < highlights.length; ++i)
|
603
|
+
{
|
604
|
+
var h = highlights[i];
|
605
|
+
if (h.auto == eventname && !(item && h.series == item.series))
|
606
|
+
unhighlight(h.series);
|
607
|
+
}
|
608
|
+
}
|
609
|
+
|
610
|
+
// highlight the slice
|
611
|
+
if (item)
|
612
|
+
highlight(item.series, eventname);
|
613
|
+
|
614
|
+
// trigger any hover bind events
|
615
|
+
var pos = { pageX: e.pageX, pageY: e.pageY };
|
616
|
+
target.trigger(eventname, [ pos, item ]);
|
617
|
+
}
|
618
|
+
|
619
|
+
function highlight(s, auto)
|
620
|
+
{
|
621
|
+
if (typeof s == "number")
|
622
|
+
s = series[s];
|
623
|
+
|
624
|
+
var i = indexOfHighlight(s);
|
625
|
+
if (i == -1)
|
626
|
+
{
|
627
|
+
highlights.push({ series: s, auto: auto });
|
628
|
+
plot.triggerRedrawOverlay();
|
629
|
+
}
|
630
|
+
else if (!auto)
|
631
|
+
highlights[i].auto = false;
|
632
|
+
}
|
633
|
+
|
634
|
+
function unhighlight(s)
|
635
|
+
{
|
636
|
+
if (s == null)
|
637
|
+
{
|
638
|
+
highlights = [];
|
639
|
+
plot.triggerRedrawOverlay();
|
640
|
+
}
|
641
|
+
|
642
|
+
if (typeof s == "number")
|
643
|
+
s = series[s];
|
644
|
+
|
645
|
+
var i = indexOfHighlight(s);
|
646
|
+
if (i != -1)
|
647
|
+
{
|
648
|
+
highlights.splice(i, 1);
|
649
|
+
plot.triggerRedrawOverlay();
|
650
|
+
}
|
651
|
+
}
|
652
|
+
|
653
|
+
function indexOfHighlight(s)
|
654
|
+
{
|
655
|
+
for (var i = 0; i < highlights.length; ++i)
|
656
|
+
{
|
657
|
+
var h = highlights[i];
|
658
|
+
if (h.series == s)
|
659
|
+
return i;
|
660
|
+
}
|
661
|
+
return -1;
|
662
|
+
}
|
663
|
+
|
664
|
+
function drawOverlay(plot, octx)
|
665
|
+
{
|
666
|
+
//alert(options.series.pie.radius);
|
667
|
+
var options = plot.getOptions();
|
668
|
+
//alert(options.series.pie.radius);
|
669
|
+
|
670
|
+
var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
|
671
|
+
|
672
|
+
octx.save();
|
673
|
+
octx.translate(centerLeft, centerTop);
|
674
|
+
octx.scale(1, options.series.pie.tilt);
|
675
|
+
|
676
|
+
for (i = 0; i < highlights.length; ++i)
|
677
|
+
drawHighlight(highlights[i].series);
|
678
|
+
|
679
|
+
drawDonutHole(octx);
|
680
|
+
|
681
|
+
octx.remechanize_store();
|
682
|
+
|
683
|
+
function drawHighlight(series)
|
684
|
+
{
|
685
|
+
if (series.angle < 0) return;
|
686
|
+
|
687
|
+
//octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString();
|
688
|
+
octx.fillStyle = "rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")"; // this is temporary until we have access to parseColor
|
689
|
+
|
690
|
+
octx.beginPath();
|
691
|
+
if (Math.abs(series.angle - Math.PI*2) > 0.000000001)
|
692
|
+
octx.moveTo(0,0); // Center of the pie
|
693
|
+
octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle,false);
|
694
|
+
octx.closePath();
|
695
|
+
octx.fill();
|
696
|
+
}
|
697
|
+
|
698
|
+
}
|
699
|
+
|
700
|
+
} // end init (plugin body)
|
701
|
+
|
702
|
+
// define pie specific options and their default values
|
703
|
+
var options = {
|
704
|
+
series: {
|
705
|
+
pie: {
|
706
|
+
show: false,
|
707
|
+
radius: 'auto', // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value)
|
708
|
+
innerRadius:0, /* for donut */
|
709
|
+
startAngle: 3/2,
|
710
|
+
tilt: 1,
|
711
|
+
offset: {
|
712
|
+
top: 0,
|
713
|
+
left: 'auto'
|
714
|
+
},
|
715
|
+
stroke: {
|
716
|
+
color: '#FFF',
|
717
|
+
width: 1
|
718
|
+
},
|
719
|
+
label: {
|
720
|
+
show: 'auto',
|
721
|
+
formatter: function(label, slice){
|
722
|
+
return '<div style="font-size:x-small;text-align:center;padding:2px;color:'+slice.color+';">'+label+'<br/>'+Math.round(slice.percent)+'%</div>';
|
723
|
+
}, // formatter function
|
724
|
+
radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value)
|
725
|
+
background: {
|
726
|
+
color: null,
|
727
|
+
opacity: 0
|
728
|
+
},
|
729
|
+
threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow)
|
730
|
+
},
|
731
|
+
combine: {
|
732
|
+
threshold: -1, // percentage at which to combine little slices into one larger slice
|
733
|
+
color: null, // color to give the new slice (auto-generated if null)
|
734
|
+
label: 'Other' // label to give the new slice
|
735
|
+
},
|
736
|
+
highlight: {
|
737
|
+
//color: '#FFF', // will add this functionality once parseColor is available
|
738
|
+
opacity: 0.5
|
739
|
+
}
|
740
|
+
}
|
741
|
+
}
|
742
|
+
};
|
743
|
+
|
744
|
+
$.plot.plugins.push({
|
745
|
+
init: init,
|
746
|
+
options: options,
|
747
|
+
name: "pie",
|
748
|
+
version: "1.0"
|
749
|
+
});
|
750
|
+
})(jQuery);
|