uploadbox 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/_image_uploader.coffee +44 -0
- data/app/assets/javascripts/file_uploader.coffee +4 -0
- data/app/assets/javascripts/jquery.fileupload.js +1315 -0
- data/app/assets/javascripts/jquery.iframe-transport.js +205 -0
- data/app/assets/javascripts/jquery.ui.widget.js +521 -0
- data/app/assets/stylesheets/bootstrap/_buttons.css +93 -0
- data/app/assets/stylesheets/bootstrap/_progress.css +207 -0
- data/app/assets/stylesheets/file_uploader.sass +134 -0
- data/app/controllers/file_uploader/application_controller.rb +4 -0
- data/app/controllers/file_uploader/images_controller.rb +20 -0
- data/app/helpers/file_uploader/application_helper.rb +4 -0
- data/app/models/concerns/image_uploadable.rb +11 -0
- data/app/models/concerns/uploadable.rb +9 -0
- data/app/uploaders/concerns/image_processing.rb +33 -0
- data/app/views/file_uploader/images/_uploader.html.slim +16 -0
- data/app/views/file_uploader/images/create.json.jbuilder +6 -0
- data/app/views/layouts/file_uploader/application.html.erb +14 -0
- data/config/routes.rb +3 -0
- data/lib/file_uploader/engine.rb +23 -0
- data/lib/file_uploader/version.rb +3 -0
- data/lib/file_uploader.rb +4 -0
- data/lib/generators/file_uploader/image/USAGE +8 -0
- data/lib/generators/file_uploader/image/image_generator.rb +34 -0
- data/lib/generators/file_uploader/image/templates/initializers/carrierwave.rb +22 -0
- data/lib/generators/file_uploader/image/templates/migrate/create_images.rb +10 -0
- data/lib/generators/file_uploader/image/templates/models/image.rb +3 -0
- data/lib/generators/file_uploader/image/templates/uploaders/image_uploader.rb +3 -0
- data/lib/tasks/file_uploader_tasks.rake +4 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.coffee +3 -0
- data/test/dummy/app/assets/stylesheets/application.sass +2 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/posts_controller.rb +61 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/home_helper.rb +2 -0
- data/test/dummy/app/helpers/posts_helper.rb +2 -0
- data/test/dummy/app/models/post.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/posts/_form.slim +26 -0
- data/test/dummy/app/views/posts/edit.html.erb +6 -0
- data/test/dummy/app/views/posts/index.html.erb +32 -0
- data/test/dummy/app/views/posts/new.html.erb +5 -0
- data/test/dummy/app/views/posts/show.html.erb +19 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +11 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +6 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130624130249_create_posts.rb +10 -0
- data/test/dummy/db/schema.rb +33 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +20837 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/uploads/image/file/10/regular_tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/10/tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/11/regular_sports2.jpg +0 -0
- data/test/dummy/public/uploads/image/file/11/sports2.jpg +0 -0
- data/test/dummy/public/uploads/image/file/12/city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/12/regular_city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/13/regular_tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/13/tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/14/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/14/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/15/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/15/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/16/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/16/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/17/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/17/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/18/regular_sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/18/sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/19/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/19/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/2/city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/2/regular_city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/20/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/20/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/21/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/21/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/22/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/22/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/23/regular_sports2.jpg +0 -0
- data/test/dummy/public/uploads/image/file/23/sports2.jpg +0 -0
- data/test/dummy/public/uploads/image/file/27/monument1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/27/regular_monument1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/28/regular_sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/28/sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/3/city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/3/regular_city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/33/regular_tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/33/tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/34/city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/34/regular_city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/37/regular_sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/37/sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/38/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/38/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/4/food1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/4/regular_food1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/40/regular_tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/40/tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/5/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/5/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/50/city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/50/regular_city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/51/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/51/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/56/city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/56/regular_city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/57/monument1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/57/regular_monument1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/58/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/58/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/6/city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/6/regular_city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/60/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/60/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/61/city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/61/regular_city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/62/regular_sports2.jpg +0 -0
- data/test/dummy/public/uploads/image/file/62/sports2.jpg +0 -0
- data/test/dummy/public/uploads/image/file/63/food1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/63/regular_food1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/64/food1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/64/regular_food1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/65/city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/65/regular_city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/66/regular_sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/66/sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/67/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/67/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/68/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/68/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/69/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/69/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/7/regular_sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/7/sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/71/regular_sports2.jpg +0 -0
- data/test/dummy/public/uploads/image/file/71/sports2.jpg +0 -0
- data/test/dummy/public/uploads/image/file/73/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/73/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/75/regular_sports2.jpg +0 -0
- data/test/dummy/public/uploads/image/file/75/sports2.jpg +0 -0
- data/test/dummy/public/uploads/image/file/76/city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/76/regular_city1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/77/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/77/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/78/regular_tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/78/tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/79/regular_sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/79/sports3.jpg +0 -0
- data/test/dummy/public/uploads/image/file/8/regular_sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/8/sports1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/80/regular_tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/80/tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/81/food1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/81/regular_food1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/84/regular_tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/84/tree1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/9/monument1.jpg +0 -0
- data/test/dummy/public/uploads/image/file/9/regular_monument1.jpg +0 -0
- data/test/dummy/public/uploads/tmp/20130627-0910-4782-4339/regular_sports2.jpg +0 -0
- data/test/dummy/public/uploads/tmp/20130627-0910-4782-4339/sports2.jpg +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/5b407eb4aa13436bd984a25ae192ac2652db5759/_buttons.cssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/5b407eb4aa13436bd984a25ae192ac2652db5759/_progress.cssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/7662e69738309f2449b5f34a623416e02bd31561/_buttons.cssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/7662e69738309f2449b5f34a623416e02bd31561/_progress.cssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/8160dfcd3114403b4930d081794c16af3ebe3ba6/file_uploader.sassc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/b3df06ca649a689a4fd2f92938f644fb80a0b76c/_bootstrap_btn.cssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/b3df06ca649a689a4fd2f92938f644fb80a0b76c/_fileupload.sassc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/b3df06ca649a689a4fd2f92938f644fb80a0b76c/application.sassc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/b3df06ca649a689a4fd2f92938f644fb80a0b76c/bootstrap.cssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/b3df06ca649a689a4fd2f92938f644fb80a0b76c/scaffold.cssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/036b77eb9437a0b942e844f0664f2f4d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/17aca7a5440d34b72f7519ffa1ab8379 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1a2ba42bd8d58781c7bf0e3d7a33c3c8 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1a6ee5f7be55d7f22c31aef2af1aaad7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1c9faaf28d05409b88ad3113374d613c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1e8f75a6b5b33970fb8e397347caa0a1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/21252e0c63eb196e8181b7754194d61a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/22a20eb270b5f0f317e13738bcb73925 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/24204f742af588c8166d3160b500d20f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2822de3b22c28bd5e718c9bf500457b2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/40fc2f3d2a468a00e463f1d313cb1683 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/416150dc3ac35079c94273cc46e90aa6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4726dfba577c185e9355be4a832efb8e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/47b830f344f953bcd6328a49ab616646 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4968b24dd091b0fd0e209d67b392be52 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4de2e83f99a4262aa0c8cc6035da959a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4fc9258d221c999ba0aa1d80dbf04e5f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/50afae431e200795f9adc76e38e6130d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/510da110ae528e2d22533be39ff696c5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5384ad85f52d3272dbc64d46ef3876a4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/54016e9e60301e29500bab9b9815de1e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5608eba5a4ac26d717d876734486c3f5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5b6cfeddfda27d92843b8dac8d034ed3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/60f1e97d7008b3ed41f72855a4228bb9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/734b52a3ac29f5ddc9f0cb98046c2315 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/80edcfeb723573fc6499580e5771bb17 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/851e2975dd2977ad620f690b923f3253 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/87cf3e4938b1fefe951ae62b201d8874 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9199b64aec237a59d258f4f149262be1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9742c38f2d32a6142740215f517a73f5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9bccb521761b095f6c0255ab7fc9b3fb +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a4b8f7dbc861343715de9ec929b0e4ca +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a6ec7a5f259e52c790fb0f84b69a696e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a7ab4e7b3ec8c08a267319920b433fda +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a88d9c609d05fcc4670c8742b41816c0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a9eb7874ccfec01c26d50fdc46d50639 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a9f028f7a492b5907ed80268be8f50f4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/abbcfa48059290465d8e74aa4fd0d4de +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/add025ab0eb13a6d4180af43d5df39df +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b878faf942403e313a5b103e5d80488e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/bd0405b0fbaa0e8a1924bd19f9d52570 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c2a831ed79df487d6485a5c9c52766c2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c85016e7bbd4f3adbb7635d01f85d39b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d066c004d1fd26ae76a61303a7a18145 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d080d25d00bbfe7b19138cf7a648dd8c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d247dc85ce71f977c809c8b94d0223ed +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d2a1c642980b0a48bd71e7021eea73a1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d4c6a4b4d2ce87da7c22742887071603 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d795fd4f9a32e134a5dd37f973a17176 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d87810c66e05721ba749c5901c1af296 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ebe08f689f659c024f467b77f32a1c49 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/edbef6e0d0a4742346cf479f2c522eb0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/file_uploader_test.rb +7 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- metadata +717 -0
@@ -0,0 +1,521 @@
|
|
1
|
+
/*!
|
2
|
+
* jQuery UI Widget 1.10.3
|
3
|
+
* http://jqueryui.com
|
4
|
+
*
|
5
|
+
* Copyright 2013 jQuery Foundation and other contributors
|
6
|
+
* Released under the MIT license.
|
7
|
+
* http://jquery.org/license
|
8
|
+
*
|
9
|
+
* http://api.jqueryui.com/jQuery.widget/
|
10
|
+
*/
|
11
|
+
(function( $, undefined ) {
|
12
|
+
|
13
|
+
var uuid = 0,
|
14
|
+
slice = Array.prototype.slice,
|
15
|
+
_cleanData = $.cleanData;
|
16
|
+
$.cleanData = function( elems ) {
|
17
|
+
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
18
|
+
try {
|
19
|
+
$( elem ).triggerHandler( "remove" );
|
20
|
+
// http://bugs.jquery.com/ticket/8235
|
21
|
+
} catch( e ) {}
|
22
|
+
}
|
23
|
+
_cleanData( elems );
|
24
|
+
};
|
25
|
+
|
26
|
+
$.widget = function( name, base, prototype ) {
|
27
|
+
var fullName, existingConstructor, constructor, basePrototype,
|
28
|
+
// proxiedPrototype allows the provided prototype to remain unmodified
|
29
|
+
// so that it can be used as a mixin for multiple widgets (#8876)
|
30
|
+
proxiedPrototype = {},
|
31
|
+
namespace = name.split( "." )[ 0 ];
|
32
|
+
|
33
|
+
name = name.split( "." )[ 1 ];
|
34
|
+
fullName = namespace + "-" + name;
|
35
|
+
|
36
|
+
if ( !prototype ) {
|
37
|
+
prototype = base;
|
38
|
+
base = $.Widget;
|
39
|
+
}
|
40
|
+
|
41
|
+
// create selector for plugin
|
42
|
+
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
|
43
|
+
return !!$.data( elem, fullName );
|
44
|
+
};
|
45
|
+
|
46
|
+
$[ namespace ] = $[ namespace ] || {};
|
47
|
+
existingConstructor = $[ namespace ][ name ];
|
48
|
+
constructor = $[ namespace ][ name ] = function( options, element ) {
|
49
|
+
// allow instantiation without "new" keyword
|
50
|
+
if ( !this._createWidget ) {
|
51
|
+
return new constructor( options, element );
|
52
|
+
}
|
53
|
+
|
54
|
+
// allow instantiation without initializing for simple inheritance
|
55
|
+
// must use "new" keyword (the code above always passes args)
|
56
|
+
if ( arguments.length ) {
|
57
|
+
this._createWidget( options, element );
|
58
|
+
}
|
59
|
+
};
|
60
|
+
// extend with the existing constructor to carry over any static properties
|
61
|
+
$.extend( constructor, existingConstructor, {
|
62
|
+
version: prototype.version,
|
63
|
+
// copy the object used to create the prototype in case we need to
|
64
|
+
// redefine the widget later
|
65
|
+
_proto: $.extend( {}, prototype ),
|
66
|
+
// track widgets that inherit from this widget in case this widget is
|
67
|
+
// redefined after a widget inherits from it
|
68
|
+
_childConstructors: []
|
69
|
+
});
|
70
|
+
|
71
|
+
basePrototype = new base();
|
72
|
+
// we need to make the options hash a property directly on the new instance
|
73
|
+
// otherwise we'll modify the options hash on the prototype that we're
|
74
|
+
// inheriting from
|
75
|
+
basePrototype.options = $.widget.extend( {}, basePrototype.options );
|
76
|
+
$.each( prototype, function( prop, value ) {
|
77
|
+
if ( !$.isFunction( value ) ) {
|
78
|
+
proxiedPrototype[ prop ] = value;
|
79
|
+
return;
|
80
|
+
}
|
81
|
+
proxiedPrototype[ prop ] = (function() {
|
82
|
+
var _super = function() {
|
83
|
+
return base.prototype[ prop ].apply( this, arguments );
|
84
|
+
},
|
85
|
+
_superApply = function( args ) {
|
86
|
+
return base.prototype[ prop ].apply( this, args );
|
87
|
+
};
|
88
|
+
return function() {
|
89
|
+
var __super = this._super,
|
90
|
+
__superApply = this._superApply,
|
91
|
+
returnValue;
|
92
|
+
|
93
|
+
this._super = _super;
|
94
|
+
this._superApply = _superApply;
|
95
|
+
|
96
|
+
returnValue = value.apply( this, arguments );
|
97
|
+
|
98
|
+
this._super = __super;
|
99
|
+
this._superApply = __superApply;
|
100
|
+
|
101
|
+
return returnValue;
|
102
|
+
};
|
103
|
+
})();
|
104
|
+
});
|
105
|
+
constructor.prototype = $.widget.extend( basePrototype, {
|
106
|
+
// TODO: remove support for widgetEventPrefix
|
107
|
+
// always use the name + a colon as the prefix, e.g., draggable:start
|
108
|
+
// don't prefix for widgets that aren't DOM-based
|
109
|
+
widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
|
110
|
+
}, proxiedPrototype, {
|
111
|
+
constructor: constructor,
|
112
|
+
namespace: namespace,
|
113
|
+
widgetName: name,
|
114
|
+
widgetFullName: fullName
|
115
|
+
});
|
116
|
+
|
117
|
+
// If this widget is being redefined then we need to find all widgets that
|
118
|
+
// are inheriting from it and redefine all of them so that they inherit from
|
119
|
+
// the new version of this widget. We're essentially trying to replace one
|
120
|
+
// level in the prototype chain.
|
121
|
+
if ( existingConstructor ) {
|
122
|
+
$.each( existingConstructor._childConstructors, function( i, child ) {
|
123
|
+
var childPrototype = child.prototype;
|
124
|
+
|
125
|
+
// redefine the child widget using the same prototype that was
|
126
|
+
// originally used, but inherit from the new version of the base
|
127
|
+
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
|
128
|
+
});
|
129
|
+
// remove the list of existing child constructors from the old constructor
|
130
|
+
// so the old child constructors can be garbage collected
|
131
|
+
delete existingConstructor._childConstructors;
|
132
|
+
} else {
|
133
|
+
base._childConstructors.push( constructor );
|
134
|
+
}
|
135
|
+
|
136
|
+
$.widget.bridge( name, constructor );
|
137
|
+
};
|
138
|
+
|
139
|
+
$.widget.extend = function( target ) {
|
140
|
+
var input = slice.call( arguments, 1 ),
|
141
|
+
inputIndex = 0,
|
142
|
+
inputLength = input.length,
|
143
|
+
key,
|
144
|
+
value;
|
145
|
+
for ( ; inputIndex < inputLength; inputIndex++ ) {
|
146
|
+
for ( key in input[ inputIndex ] ) {
|
147
|
+
value = input[ inputIndex ][ key ];
|
148
|
+
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
|
149
|
+
// Clone objects
|
150
|
+
if ( $.isPlainObject( value ) ) {
|
151
|
+
target[ key ] = $.isPlainObject( target[ key ] ) ?
|
152
|
+
$.widget.extend( {}, target[ key ], value ) :
|
153
|
+
// Don't extend strings, arrays, etc. with objects
|
154
|
+
$.widget.extend( {}, value );
|
155
|
+
// Copy everything else by reference
|
156
|
+
} else {
|
157
|
+
target[ key ] = value;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
162
|
+
return target;
|
163
|
+
};
|
164
|
+
|
165
|
+
$.widget.bridge = function( name, object ) {
|
166
|
+
var fullName = object.prototype.widgetFullName || name;
|
167
|
+
$.fn[ name ] = function( options ) {
|
168
|
+
var isMethodCall = typeof options === "string",
|
169
|
+
args = slice.call( arguments, 1 ),
|
170
|
+
returnValue = this;
|
171
|
+
|
172
|
+
// allow multiple hashes to be passed on init
|
173
|
+
options = !isMethodCall && args.length ?
|
174
|
+
$.widget.extend.apply( null, [ options ].concat(args) ) :
|
175
|
+
options;
|
176
|
+
|
177
|
+
if ( isMethodCall ) {
|
178
|
+
this.each(function() {
|
179
|
+
var methodValue,
|
180
|
+
instance = $.data( this, fullName );
|
181
|
+
if ( !instance ) {
|
182
|
+
return $.error( "cannot call methods on " + name + " prior to initialization; " +
|
183
|
+
"attempted to call method '" + options + "'" );
|
184
|
+
}
|
185
|
+
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
|
186
|
+
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
|
187
|
+
}
|
188
|
+
methodValue = instance[ options ].apply( instance, args );
|
189
|
+
if ( methodValue !== instance && methodValue !== undefined ) {
|
190
|
+
returnValue = methodValue && methodValue.jquery ?
|
191
|
+
returnValue.pushStack( methodValue.get() ) :
|
192
|
+
methodValue;
|
193
|
+
return false;
|
194
|
+
}
|
195
|
+
});
|
196
|
+
} else {
|
197
|
+
this.each(function() {
|
198
|
+
var instance = $.data( this, fullName );
|
199
|
+
if ( instance ) {
|
200
|
+
instance.option( options || {} )._init();
|
201
|
+
} else {
|
202
|
+
$.data( this, fullName, new object( options, this ) );
|
203
|
+
}
|
204
|
+
});
|
205
|
+
}
|
206
|
+
|
207
|
+
return returnValue;
|
208
|
+
};
|
209
|
+
};
|
210
|
+
|
211
|
+
$.Widget = function( /* options, element */ ) {};
|
212
|
+
$.Widget._childConstructors = [];
|
213
|
+
|
214
|
+
$.Widget.prototype = {
|
215
|
+
widgetName: "widget",
|
216
|
+
widgetEventPrefix: "",
|
217
|
+
defaultElement: "<div>",
|
218
|
+
options: {
|
219
|
+
disabled: false,
|
220
|
+
|
221
|
+
// callbacks
|
222
|
+
create: null
|
223
|
+
},
|
224
|
+
_createWidget: function( options, element ) {
|
225
|
+
element = $( element || this.defaultElement || this )[ 0 ];
|
226
|
+
this.element = $( element );
|
227
|
+
this.uuid = uuid++;
|
228
|
+
this.eventNamespace = "." + this.widgetName + this.uuid;
|
229
|
+
this.options = $.widget.extend( {},
|
230
|
+
this.options,
|
231
|
+
this._getCreateOptions(),
|
232
|
+
options );
|
233
|
+
|
234
|
+
this.bindings = $();
|
235
|
+
this.hoverable = $();
|
236
|
+
this.focusable = $();
|
237
|
+
|
238
|
+
if ( element !== this ) {
|
239
|
+
$.data( element, this.widgetFullName, this );
|
240
|
+
this._on( true, this.element, {
|
241
|
+
remove: function( event ) {
|
242
|
+
if ( event.target === element ) {
|
243
|
+
this.destroy();
|
244
|
+
}
|
245
|
+
}
|
246
|
+
});
|
247
|
+
this.document = $( element.style ?
|
248
|
+
// element within the document
|
249
|
+
element.ownerDocument :
|
250
|
+
// element is window or document
|
251
|
+
element.document || element );
|
252
|
+
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
|
253
|
+
}
|
254
|
+
|
255
|
+
this._create();
|
256
|
+
this._trigger( "create", null, this._getCreateEventData() );
|
257
|
+
this._init();
|
258
|
+
},
|
259
|
+
_getCreateOptions: $.noop,
|
260
|
+
_getCreateEventData: $.noop,
|
261
|
+
_create: $.noop,
|
262
|
+
_init: $.noop,
|
263
|
+
|
264
|
+
destroy: function() {
|
265
|
+
this._destroy();
|
266
|
+
// we can probably remove the unbind calls in 2.0
|
267
|
+
// all event bindings should go through this._on()
|
268
|
+
this.element
|
269
|
+
.unbind( this.eventNamespace )
|
270
|
+
// 1.9 BC for #7810
|
271
|
+
// TODO remove dual storage
|
272
|
+
.removeData( this.widgetName )
|
273
|
+
.removeData( this.widgetFullName )
|
274
|
+
// support: jquery <1.6.3
|
275
|
+
// http://bugs.jquery.com/ticket/9413
|
276
|
+
.removeData( $.camelCase( this.widgetFullName ) );
|
277
|
+
this.widget()
|
278
|
+
.unbind( this.eventNamespace )
|
279
|
+
.removeAttr( "aria-disabled" )
|
280
|
+
.removeClass(
|
281
|
+
this.widgetFullName + "-disabled " +
|
282
|
+
"ui-state-disabled" );
|
283
|
+
|
284
|
+
// clean up events and states
|
285
|
+
this.bindings.unbind( this.eventNamespace );
|
286
|
+
this.hoverable.removeClass( "ui-state-hover" );
|
287
|
+
this.focusable.removeClass( "ui-state-focus" );
|
288
|
+
},
|
289
|
+
_destroy: $.noop,
|
290
|
+
|
291
|
+
widget: function() {
|
292
|
+
return this.element;
|
293
|
+
},
|
294
|
+
|
295
|
+
option: function( key, value ) {
|
296
|
+
var options = key,
|
297
|
+
parts,
|
298
|
+
curOption,
|
299
|
+
i;
|
300
|
+
|
301
|
+
if ( arguments.length === 0 ) {
|
302
|
+
// don't return a reference to the internal hash
|
303
|
+
return $.widget.extend( {}, this.options );
|
304
|
+
}
|
305
|
+
|
306
|
+
if ( typeof key === "string" ) {
|
307
|
+
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
|
308
|
+
options = {};
|
309
|
+
parts = key.split( "." );
|
310
|
+
key = parts.shift();
|
311
|
+
if ( parts.length ) {
|
312
|
+
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
|
313
|
+
for ( i = 0; i < parts.length - 1; i++ ) {
|
314
|
+
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
|
315
|
+
curOption = curOption[ parts[ i ] ];
|
316
|
+
}
|
317
|
+
key = parts.pop();
|
318
|
+
if ( value === undefined ) {
|
319
|
+
return curOption[ key ] === undefined ? null : curOption[ key ];
|
320
|
+
}
|
321
|
+
curOption[ key ] = value;
|
322
|
+
} else {
|
323
|
+
if ( value === undefined ) {
|
324
|
+
return this.options[ key ] === undefined ? null : this.options[ key ];
|
325
|
+
}
|
326
|
+
options[ key ] = value;
|
327
|
+
}
|
328
|
+
}
|
329
|
+
|
330
|
+
this._setOptions( options );
|
331
|
+
|
332
|
+
return this;
|
333
|
+
},
|
334
|
+
_setOptions: function( options ) {
|
335
|
+
var key;
|
336
|
+
|
337
|
+
for ( key in options ) {
|
338
|
+
this._setOption( key, options[ key ] );
|
339
|
+
}
|
340
|
+
|
341
|
+
return this;
|
342
|
+
},
|
343
|
+
_setOption: function( key, value ) {
|
344
|
+
this.options[ key ] = value;
|
345
|
+
|
346
|
+
if ( key === "disabled" ) {
|
347
|
+
this.widget()
|
348
|
+
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
|
349
|
+
.attr( "aria-disabled", value );
|
350
|
+
this.hoverable.removeClass( "ui-state-hover" );
|
351
|
+
this.focusable.removeClass( "ui-state-focus" );
|
352
|
+
}
|
353
|
+
|
354
|
+
return this;
|
355
|
+
},
|
356
|
+
|
357
|
+
enable: function() {
|
358
|
+
return this._setOption( "disabled", false );
|
359
|
+
},
|
360
|
+
disable: function() {
|
361
|
+
return this._setOption( "disabled", true );
|
362
|
+
},
|
363
|
+
|
364
|
+
_on: function( suppressDisabledCheck, element, handlers ) {
|
365
|
+
var delegateElement,
|
366
|
+
instance = this;
|
367
|
+
|
368
|
+
// no suppressDisabledCheck flag, shuffle arguments
|
369
|
+
if ( typeof suppressDisabledCheck !== "boolean" ) {
|
370
|
+
handlers = element;
|
371
|
+
element = suppressDisabledCheck;
|
372
|
+
suppressDisabledCheck = false;
|
373
|
+
}
|
374
|
+
|
375
|
+
// no element argument, shuffle and use this.element
|
376
|
+
if ( !handlers ) {
|
377
|
+
handlers = element;
|
378
|
+
element = this.element;
|
379
|
+
delegateElement = this.widget();
|
380
|
+
} else {
|
381
|
+
// accept selectors, DOM elements
|
382
|
+
element = delegateElement = $( element );
|
383
|
+
this.bindings = this.bindings.add( element );
|
384
|
+
}
|
385
|
+
|
386
|
+
$.each( handlers, function( event, handler ) {
|
387
|
+
function handlerProxy() {
|
388
|
+
// allow widgets to customize the disabled handling
|
389
|
+
// - disabled as an array instead of boolean
|
390
|
+
// - disabled class as method for disabling individual parts
|
391
|
+
if ( !suppressDisabledCheck &&
|
392
|
+
( instance.options.disabled === true ||
|
393
|
+
$( this ).hasClass( "ui-state-disabled" ) ) ) {
|
394
|
+
return;
|
395
|
+
}
|
396
|
+
return ( typeof handler === "string" ? instance[ handler ] : handler )
|
397
|
+
.apply( instance, arguments );
|
398
|
+
}
|
399
|
+
|
400
|
+
// copy the guid so direct unbinding works
|
401
|
+
if ( typeof handler !== "string" ) {
|
402
|
+
handlerProxy.guid = handler.guid =
|
403
|
+
handler.guid || handlerProxy.guid || $.guid++;
|
404
|
+
}
|
405
|
+
|
406
|
+
var match = event.match( /^(\w+)\s*(.*)$/ ),
|
407
|
+
eventName = match[1] + instance.eventNamespace,
|
408
|
+
selector = match[2];
|
409
|
+
if ( selector ) {
|
410
|
+
delegateElement.delegate( selector, eventName, handlerProxy );
|
411
|
+
} else {
|
412
|
+
element.bind( eventName, handlerProxy );
|
413
|
+
}
|
414
|
+
});
|
415
|
+
},
|
416
|
+
|
417
|
+
_off: function( element, eventName ) {
|
418
|
+
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
|
419
|
+
element.unbind( eventName ).undelegate( eventName );
|
420
|
+
},
|
421
|
+
|
422
|
+
_delay: function( handler, delay ) {
|
423
|
+
function handlerProxy() {
|
424
|
+
return ( typeof handler === "string" ? instance[ handler ] : handler )
|
425
|
+
.apply( instance, arguments );
|
426
|
+
}
|
427
|
+
var instance = this;
|
428
|
+
return setTimeout( handlerProxy, delay || 0 );
|
429
|
+
},
|
430
|
+
|
431
|
+
_hoverable: function( element ) {
|
432
|
+
this.hoverable = this.hoverable.add( element );
|
433
|
+
this._on( element, {
|
434
|
+
mouseenter: function( event ) {
|
435
|
+
$( event.currentTarget ).addClass( "ui-state-hover" );
|
436
|
+
},
|
437
|
+
mouseleave: function( event ) {
|
438
|
+
$( event.currentTarget ).removeClass( "ui-state-hover" );
|
439
|
+
}
|
440
|
+
});
|
441
|
+
},
|
442
|
+
|
443
|
+
_focusable: function( element ) {
|
444
|
+
this.focusable = this.focusable.add( element );
|
445
|
+
this._on( element, {
|
446
|
+
focusin: function( event ) {
|
447
|
+
$( event.currentTarget ).addClass( "ui-state-focus" );
|
448
|
+
},
|
449
|
+
focusout: function( event ) {
|
450
|
+
$( event.currentTarget ).removeClass( "ui-state-focus" );
|
451
|
+
}
|
452
|
+
});
|
453
|
+
},
|
454
|
+
|
455
|
+
_trigger: function( type, event, data ) {
|
456
|
+
var prop, orig,
|
457
|
+
callback = this.options[ type ];
|
458
|
+
|
459
|
+
data = data || {};
|
460
|
+
event = $.Event( event );
|
461
|
+
event.type = ( type === this.widgetEventPrefix ?
|
462
|
+
type :
|
463
|
+
this.widgetEventPrefix + type ).toLowerCase();
|
464
|
+
// the original event may come from any element
|
465
|
+
// so we need to reset the target on the new event
|
466
|
+
event.target = this.element[ 0 ];
|
467
|
+
|
468
|
+
// copy original event properties over to the new event
|
469
|
+
orig = event.originalEvent;
|
470
|
+
if ( orig ) {
|
471
|
+
for ( prop in orig ) {
|
472
|
+
if ( !( prop in event ) ) {
|
473
|
+
event[ prop ] = orig[ prop ];
|
474
|
+
}
|
475
|
+
}
|
476
|
+
}
|
477
|
+
|
478
|
+
this.element.trigger( event, data );
|
479
|
+
return !( $.isFunction( callback ) &&
|
480
|
+
callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
|
481
|
+
event.isDefaultPrevented() );
|
482
|
+
}
|
483
|
+
};
|
484
|
+
|
485
|
+
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
|
486
|
+
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
|
487
|
+
if ( typeof options === "string" ) {
|
488
|
+
options = { effect: options };
|
489
|
+
}
|
490
|
+
var hasOptions,
|
491
|
+
effectName = !options ?
|
492
|
+
method :
|
493
|
+
options === true || typeof options === "number" ?
|
494
|
+
defaultEffect :
|
495
|
+
options.effect || defaultEffect;
|
496
|
+
options = options || {};
|
497
|
+
if ( typeof options === "number" ) {
|
498
|
+
options = { duration: options };
|
499
|
+
}
|
500
|
+
hasOptions = !$.isEmptyObject( options );
|
501
|
+
options.complete = callback;
|
502
|
+
if ( options.delay ) {
|
503
|
+
element.delay( options.delay );
|
504
|
+
}
|
505
|
+
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
|
506
|
+
element[ method ]( options );
|
507
|
+
} else if ( effectName !== method && element[ effectName ] ) {
|
508
|
+
element[ effectName ]( options.duration, options.easing, callback );
|
509
|
+
} else {
|
510
|
+
element.queue(function( next ) {
|
511
|
+
$( this )[ method ]();
|
512
|
+
if ( callback ) {
|
513
|
+
callback.call( element[ 0 ] );
|
514
|
+
}
|
515
|
+
next();
|
516
|
+
});
|
517
|
+
}
|
518
|
+
};
|
519
|
+
});
|
520
|
+
|
521
|
+
})( jQuery );
|
@@ -0,0 +1,93 @@
|
|
1
|
+
.btn {
|
2
|
+
display: inline-block;
|
3
|
+
*display: inline;
|
4
|
+
padding: 4px 12px;
|
5
|
+
margin-bottom: 0;
|
6
|
+
*margin-left: .3em;
|
7
|
+
font-size: 14px;
|
8
|
+
line-height: 20px;
|
9
|
+
color: #333333;
|
10
|
+
text-align: center;
|
11
|
+
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
12
|
+
vertical-align: middle;
|
13
|
+
cursor: pointer;
|
14
|
+
background-color: #f5f5f5;
|
15
|
+
*background-color: #e6e6e6;
|
16
|
+
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|
17
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
|
18
|
+
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
|
19
|
+
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
|
20
|
+
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
|
21
|
+
background-repeat: repeat-x;
|
22
|
+
border: 1px solid #cccccc;
|
23
|
+
*border: 0;
|
24
|
+
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
25
|
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
26
|
+
border-bottom-color: #b3b3b3;
|
27
|
+
-webkit-border-radius: 4px;
|
28
|
+
-moz-border-radius: 4px;
|
29
|
+
border-radius: 4px;
|
30
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
|
31
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
32
|
+
*zoom: 1;
|
33
|
+
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
34
|
+
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
35
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
36
|
+
}
|
37
|
+
|
38
|
+
.btn:hover,
|
39
|
+
.btn:focus,
|
40
|
+
.btn:active,
|
41
|
+
.btn.active,
|
42
|
+
.btn.disabled,
|
43
|
+
.btn[disabled] {
|
44
|
+
color: #333333;
|
45
|
+
background-color: #e6e6e6;
|
46
|
+
*background-color: #d9d9d9;
|
47
|
+
}
|
48
|
+
|
49
|
+
.btn:active,
|
50
|
+
.btn.active {
|
51
|
+
background-color: #cccccc \9;
|
52
|
+
}
|
53
|
+
|
54
|
+
.btn:first-child {
|
55
|
+
*margin-left: 0;
|
56
|
+
}
|
57
|
+
|
58
|
+
.btn:hover,
|
59
|
+
.btn:focus {
|
60
|
+
color: #333333;
|
61
|
+
text-decoration: none;
|
62
|
+
background-position: 0 -15px;
|
63
|
+
-webkit-transition: background-position 0.1s linear;
|
64
|
+
-moz-transition: background-position 0.1s linear;
|
65
|
+
-o-transition: background-position 0.1s linear;
|
66
|
+
transition: background-position 0.1s linear;
|
67
|
+
}
|
68
|
+
|
69
|
+
.btn:focus {
|
70
|
+
outline: thin dotted #333;
|
71
|
+
outline: 5px auto -webkit-focus-ring-color;
|
72
|
+
outline-offset: -2px;
|
73
|
+
}
|
74
|
+
|
75
|
+
.btn.active,
|
76
|
+
.btn:active {
|
77
|
+
background-image: none;
|
78
|
+
outline: 0;
|
79
|
+
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
80
|
+
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
81
|
+
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
82
|
+
}
|
83
|
+
|
84
|
+
.btn.disabled,
|
85
|
+
.btn[disabled] {
|
86
|
+
cursor: default;
|
87
|
+
background-image: none;
|
88
|
+
opacity: 0.65;
|
89
|
+
filter: alpha(opacity=65);
|
90
|
+
-webkit-box-shadow: none;
|
91
|
+
-moz-box-shadow: none;
|
92
|
+
box-shadow: none;
|
93
|
+
}
|