diff --git a/.gitignore b/.gitignore index fcd2664e1..ecb8b8624 100644 --- a/.gitignore +++ b/.gitignore @@ -7,10 +7,10 @@ tmp/ config/database.yml .idea config/application.yml -public/stylesheets/compiled/* public/assets/* config/initializers/local.rb public/system/* public/downloads/* *.swp *.tmproj +.sass-cache/ diff --git a/Capfile b/Capfile index 4b185225f..ae1f8735e 100644 --- a/Capfile +++ b/Capfile @@ -1,4 +1,8 @@ load 'deploy' if respond_to?(:namespace) # cap2 differentiator + +# Uncomment if you are using Rails' asset pipeline +load 'deploy/assets' + Dir['vendor/gems/*/recipes/*.rb', 'vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } -load 'config/deploy' # remove this line to skip loading any of the default tasks \ No newline at end of file +load 'config/deploy' # remove this line to skip loading any of the default tasks diff --git a/Gemfile b/Gemfile index dd9ed33ea..ca599a431 100644 --- a/Gemfile +++ b/Gemfile @@ -1,88 +1,74 @@ source 'http://rubygems.org' -gem 'rails', '3.0.11' #, :git => 'git://github.com/rails/rails.git' -gem 'shotgun' +gem 'rails', '3.2.1' #, :git => 'git://github.com/rails/rails.git' -gem 'pg', '~> 0.11.0' -gem 'silent-postgres', '~> 0.1.1' -gem 'redhillonrails_core', '~> 1.2.0' # deprecated +gem 'pg', '~> 0.12.2' +# gem 'silent-postgres', :git => 'git://github.com/dolzenko/silent-postgres.git' #'~> 0.1.1' +gem 'redhillonrails_core', :git => 'git://github.com/chipiga/redhillonrails_core.git', :branch => 'rails31' # '~> 2.0.0.pre' # deprecated # gem 'schema_plus', '~> 0.2.1' # buggy shit! -gem 'devise', '~> 1.5.2' -gem 'omniauth', '~> 1.0.1' +gem 'devise', '~> 2.0.0' +gem 'omniauth', '~> 1.0.2' gem 'omniauth-openid', '~> 1.0.1' gem 'cancan', '~> 1.6.7' -gem "haml-rails", '~> 0.3.4' -# gem "compass", '~> 0.11.5' # update when it will be needed -gem 'jammit' -gem "yui-compressor", "0.9.5" # Higher versions depends on Platform gem which conflicts with Platform model -gem 'rails3-jquery-autocomplete' - gem 'ancestry', '~> 1.2.4' -gem 'paperclip', "~> 2.5" -gem "will_paginate", "~> 3.0.2" -gem 'meta-tags', '~> 1.2.4', :require => 'meta_tags' -gem "russian" +gem 'paperclip', '~> 2.5.2' +gem 'delayed_job_active_record', '~> 0.3.2' +gem 'russian', '~> 0.6.0' +gem 'highline', '~> 1.6.11' +gem 'rails-xmlrpc', '~> 0.3.6' # :git => 'git://github.com/chipiga/rails-xmlrpc.git' gem 'grack', :git => 'git://github.com/rdblue/grack.git', :require => 'git_http' gem "grit", :git => 'git://github.com/mojombo/grit.git', :branch => 'master' -gem 'whenever', :require => false -gem 'delayed_job', '2.1.4' -gem 'highline', '~> 1.6.8' - # Wiki gem "gollum", "1.3.1" gem "redcarpet", "1.17.2" gem 'creole' gem 'rdiscount' -#gem 'org-ruby' +# gem 'org-ruby' gem 'RedCloth' gem 'wikicloth' -# XML-RPC support -gem "rails-xmlrpc", '~> 0.3.6' # :git => 'git://github.com/chipiga/rails-xmlrpc.git' +gem 'unicorn', '~> 4.2.0' +gem 'newrelic_rpm', '~> 3.3.1' -gem 'unicorn', '~> 4.1.1' +gem 'rails3-jquery-autocomplete', '~> 1.0.6' +gem 'will_paginate', '~> 3.0.3' +gem 'meta-tags', '~> 1.2.4', :require => 'meta_tags' +gem "haml-rails", '~> 0.3.4' +gem 'jquery-rails', '~> 2.0.0' -group :production do - gem "airbrake", '~> 3.0.5' - gem 'bluepill', :require => false +group :assets do + gem 'sass-rails', '~> 3.2.4' + gem 'coffee-rails', '~> 3.2.2' + gem 'uglifier', '~> 1.2.1' + gem 'compass', '~> 0.12.rc.1' # :git => 'git://github.com/chriseppstein/compass.git', :branch => 'rails31' + gem 'therubyracer', '~> 0.9.9' end -gem 'newrelic_rpm' +group :production do + gem "airbrake", '~> 3.0.9' + gem 'bluepill', '~> 0.0.55', :require => false + gem 'daemons', '~> 1.1.8' # for DJ +end group :development do + gem 'shotgun' # gem 'letter_opener' gem 'rails3-generators' - gem 'web-app-theme' - gem 'hpricot' - gem 'ruby_parser' - gem 'hirb' - # deploy + gem 'whenever', :require => false gem 'capistrano', :require => false gem 'capistrano-ext', :require => false gem 'cape', :require => false gem 'capistrano_colors', :require => false end -group :development, :test do - gem 'rspec-rails', '~> 2.7.0' - gem 'factory_girl_rails', '~> 1.4.0' - gem 'rr' +group :test do + gem 'rspec-rails', '~> 2.8.1' + gem 'factory_girl_rails', '~> 1.6.0' + gem 'rr', '~> 1.0.4' end - -# group :test do -# gem 'spork', '>= 0.9.0.rc9' -# gem 'guard-spork', '~> 0.3.1' -# gem 'guard-rspec', '~> 0.5.0' -# gem 'guard-bundler', '~> 0.1.3' -# -# gem 'rb-fsevent', '>= 0.4.3', :require => false -# gem 'growl', '~> 1.0.3', :require => false -# gem 'rb-inotify', '>= 0.8.6', :require => false -# gem 'libnotify', '~> 0.5.7', :require => false -# end diff --git a/Gemfile.lock b/Gemfile.lock index d71c4ed97..871d3cf5b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,11 @@ +GIT + remote: git://github.com/chipiga/redhillonrails_core.git + revision: 5f58167c41882890c223168b0a5521d99e8d92aa + branch: rails31 + specs: + redhillonrails_core (2.0.0.pre) + activerecord (>= 3.1.0.rc) + GIT remote: git://github.com/mojombo/grit.git revision: 3fc864f3c637e06e2fa7a81f6b48a5df58a9bc5b @@ -18,33 +26,33 @@ GEM remote: http://rubygems.org/ specs: RedCloth (4.2.9) - abstract (1.0.0) - actionmailer (3.0.11) - actionpack (= 3.0.11) - mail (~> 2.2.19) - actionpack (3.0.11) - activemodel (= 3.0.11) - activesupport (= 3.0.11) - builder (~> 2.1.2) - erubis (~> 2.6.6) - i18n (~> 0.5.0) - rack (~> 1.2.1) - rack-mount (~> 0.6.14) - rack-test (~> 0.5.7) - tzinfo (~> 0.3.23) - activemodel (3.0.11) - activesupport (= 3.0.11) - builder (~> 2.1.2) - i18n (~> 0.5.0) - activerecord (3.0.11) - activemodel (= 3.0.11) - activesupport (= 3.0.11) - arel (~> 2.0.10) - tzinfo (~> 0.3.23) - activeresource (3.0.11) - activemodel (= 3.0.11) - activesupport (= 3.0.11) - activesupport (3.0.11) + actionmailer (3.2.1) + actionpack (= 3.2.1) + mail (~> 2.4.0) + actionpack (3.2.1) + activemodel (= 3.2.1) + activesupport (= 3.2.1) + builder (~> 3.0.0) + erubis (~> 2.7.0) + journey (~> 1.0.1) + rack (~> 1.4.0) + rack-cache (~> 1.1) + rack-test (~> 0.6.1) + sprockets (~> 2.1.2) + activemodel (3.2.1) + activesupport (= 3.2.1) + builder (~> 3.0.0) + activerecord (3.2.1) + activemodel (= 3.2.1) + activesupport (= 3.2.1) + arel (~> 3.0.0) + tzinfo (~> 0.3.29) + activeresource (3.2.1) + activemodel (= 3.2.1) + activesupport (= 3.2.1) + activesupport (3.2.1) + i18n (~> 0.6) + multi_json (~> 1.0) airbrake (3.0.9) activesupport builder @@ -52,16 +60,16 @@ GEM posix-spawn (>= 0.3.6) ancestry (1.2.4) activerecord (>= 2.2.2) - arel (2.0.10) + arel (3.0.0) bcrypt-ruby (3.0.1) - bluepill (0.0.52) + bluepill (0.0.55) activesupport (>= 3.0.0) - daemons (~> 1.1.0) + daemons (~> 1.1.4) i18n (>= 0.5.0) state_machine (~> 1.1.0) - builder (2.1.2) + builder (3.0.0) cancan (1.6.7) - cape (1.2.0) + cape (1.4.0) capistrano (2.9.0) highline net-scp (>= 1.0.0) @@ -72,25 +80,42 @@ GEM capistrano (>= 1.0.0) capistrano_colors (0.5.5) chronic (0.6.7) + chunky_png (1.2.5) cocaine (0.2.1) + coffee-rails (3.2.2) + coffee-script (>= 2.2.0) + railties (~> 3.2.0) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.2.0) + compass (0.12.rc.1) + chunky_png (~> 1.2) + fssm (>= 0.2.7) + sass (~> 3.1) creole (0.4.2) - daemons (1.1.6) - delayed_job (2.1.4) + daemons (1.1.8) + delayed_job (3.0.1) activesupport (~> 3.0) - daemons - devise (1.5.3) + delayed_job_active_record (0.3.2) + activerecord (> 2.1.0) + delayed_job (~> 3.0.0) + devise (2.0.0) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.0.3) + railties (~> 3.1) warden (~> 1.1) diff-lcs (1.1.3) - erubis (2.6.6) - abstract (>= 1.0.0) + erubis (2.7.0) + execjs (1.3.0) + multi_json (~> 1.0) expression_parser (0.9.0) - factory_girl (2.3.2) + factory_girl (2.5.1) activesupport - factory_girl_rails (1.4.0) - factory_girl (~> 2.3.0) + factory_girl_rails (1.6.0) + factory_girl (~> 2.5.0) railties (>= 3.0.0) + fssm (0.2.8.1) github-markup (0.7.0) gollum (1.3.1) albino (~> 1.3.2) @@ -109,21 +134,24 @@ GEM railties (~> 3.0) hashie (1.2.0) highline (1.6.11) + hike (1.2.1) hirb (0.6.0) - hpricot (0.8.6) - i18n (0.5.0) - jammit (0.6.5) - yui-compressor (>= 0.9.3) + i18n (0.6.0) + journey (1.0.1) + jquery-rails (2.0.0) + railties (>= 3.2.0.beta, < 5.0) + thor (~> 0.14) json (1.6.5) kgio (2.7.2) - mail (2.2.19) - activesupport (>= 2.3.6) + libv8 (3.3.10.4) + mail (2.4.1) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) meta-tags (1.2.4) actionpack mime-types (1.17.2) + multi_json (1.0.4) mustache (0.99.4) net-scp (1.0.4) net-ssh (>= 1.99.1) @@ -146,86 +174,99 @@ GEM activesupport (>= 2.3.2) cocaine (>= 0.0.2) mime-types - pg (0.11.0) + pg (0.12.2) polyglot (0.3.3) posix-spawn (0.3.6) - rack (1.2.5) - rack-mount (0.6.14) - rack (>= 1.0.0) + rack (1.4.1) + rack-cache (1.1) + rack (>= 0.4) rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8) - rack-test (0.5.7) + rack-protection (1.2.0) + rack + rack-ssl (1.3.2) + rack + rack-test (0.6.1) rack (>= 1.0) - rails (3.0.11) - actionmailer (= 3.0.11) - actionpack (= 3.0.11) - activerecord (= 3.0.11) - activeresource (= 3.0.11) - activesupport (= 3.0.11) + rails (3.2.1) + actionmailer (= 3.2.1) + actionpack (= 3.2.1) + activerecord (= 3.2.1) + activeresource (= 3.2.1) + activesupport (= 3.2.1) bundler (~> 1.0) - railties (= 3.0.11) + railties (= 3.2.1) rails-xmlrpc (0.3.6) rails3-generators (0.17.4) railties (>= 3.0.0) - rails3-jquery-autocomplete (1.0.5) + rails3-jquery-autocomplete (1.0.6) rails (~> 3.0) - railties (3.0.11) - actionpack (= 3.0.11) - activesupport (= 3.0.11) + railties (3.2.1) + actionpack (= 3.2.1) + activesupport (= 3.2.1) + rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) - thor (~> 0.14.4) + thor (~> 0.14.6) raindrops (0.8.0) rake (0.9.2.2) rdiscount (1.6.8) rdoc (3.12) json (~> 1.4) redcarpet (1.17.2) - redhillonrails_core (1.2.0) - activerecord (>= 2) rr (1.0.4) - rspec (2.7.0) - rspec-core (~> 2.7.0) - rspec-expectations (~> 2.7.0) - rspec-mocks (~> 2.7.0) - rspec-core (2.7.1) - rspec-expectations (2.7.0) + rspec (2.8.0) + rspec-core (~> 2.8.0) + rspec-expectations (~> 2.8.0) + rspec-mocks (~> 2.8.0) + rspec-core (2.8.0) + rspec-expectations (2.8.0) diff-lcs (~> 1.1.2) - rspec-mocks (2.7.0) - rspec-rails (2.7.0) - actionpack (~> 3.0) - activesupport (~> 3.0) - railties (~> 3.0) - rspec (~> 2.7.0) + rspec-mocks (2.8.0) + rspec-rails (2.8.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec (~> 2.8.0) ruby-openid (2.1.8) - ruby_parser (2.3.1) - sexp_processor (~> 3.0) russian (0.6.0) i18n (>= 0.5.0) sanitize (2.0.3) nokogiri (>= 1.4.4, < 1.6) - sexp_processor (3.0.10) + sass (3.1.14) + sass-rails (3.2.4) + railties (~> 3.2.0) + sass (>= 3.1.10) + tilt (~> 1.3) shotgun (0.9) rack (>= 1.0) - silent-postgres (0.1.1) - sinatra (1.2.8) - rack (~> 1.1) - tilt (>= 1.2.2, < 2.0) + sinatra (1.3.2) + rack (~> 1.3, >= 1.3.6) + rack-protection (~> 1.2) + tilt (~> 1.3, >= 1.3.3) + sprockets (2.1.2) + hike (~> 1.2) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) state_machine (1.1.2) + therubyracer (0.9.9) + libv8 (~> 3.3.10) thor (0.14.6) tilt (1.3.3) treetop (1.4.10) polyglot polyglot (>= 0.3.1) tzinfo (0.3.31) - unicorn (4.1.1) - kgio (~> 2.4) + uglifier (1.2.3) + execjs (>= 0.3.0) + multi_json (>= 1.0.2) + unicorn (4.2.0) + kgio (~> 2.6) rack - raindrops (~> 0.6) + raindrops (~> 0.7) warden (1.1.0) rack (>= 1.0) - web-app-theme (0.7.0) whenever (0.7.2) activesupport (>= 2.3.4) chronic (~> 0.6.3) @@ -233,55 +274,55 @@ GEM builder expression_parser will_paginate (3.0.3) - yui-compressor (0.9.5) PLATFORMS ruby DEPENDENCIES RedCloth - airbrake (~> 3.0.5) + airbrake (~> 3.0.9) ancestry (~> 1.2.4) - bluepill + bluepill (~> 0.0.55) cancan (~> 1.6.7) cape capistrano capistrano-ext capistrano_colors + coffee-rails (~> 3.2.2) + compass (~> 0.12.rc.1) creole - delayed_job (= 2.1.4) - devise (~> 1.5.2) - factory_girl_rails (~> 1.4.0) + daemons (~> 1.1.8) + delayed_job_active_record (~> 0.3.2) + devise (~> 2.0.0) + factory_girl_rails (~> 1.6.0) gollum (= 1.3.1) grack! grit! haml-rails (~> 0.3.4) - highline (~> 1.6.8) + highline (~> 1.6.11) hirb - hpricot - jammit + jquery-rails (~> 2.0.0) meta-tags (~> 1.2.4) - newrelic_rpm - omniauth (~> 1.0.1) + newrelic_rpm (~> 3.3.1) + omniauth (~> 1.0.2) omniauth-openid (~> 1.0.1) - paperclip (~> 2.5) - pg (~> 0.11.0) - rails (= 3.0.11) + paperclip (~> 2.5.2) + pg (~> 0.12.2) + rails (= 3.2.1) rails-xmlrpc (~> 0.3.6) rails3-generators - rails3-jquery-autocomplete + rails3-jquery-autocomplete (~> 1.0.6) rdiscount redcarpet (= 1.17.2) - redhillonrails_core (~> 1.2.0) - rr - rspec-rails (~> 2.7.0) - ruby_parser - russian + redhillonrails_core! + rr (~> 1.0.4) + rspec-rails (~> 2.8.1) + russian (~> 0.6.0) + sass-rails (~> 3.2.4) shotgun - silent-postgres (~> 0.1.1) - unicorn (~> 4.1.1) - web-app-theme + therubyracer (~> 0.9.9) + uglifier (~> 1.2.1) + unicorn (~> 4.2.0) whenever wikicloth - will_paginate (~> 3.0.2) - yui-compressor (= 0.9.5) + will_paginate (~> 3.0.3) diff --git a/app/assets/images/ava-admin.png b/app/assets/images/ava-admin.png new file mode 100644 index 000000000..b5927a3fd Binary files /dev/null and b/app/assets/images/ava-admin.png differ diff --git a/app/assets/images/ava.png b/app/assets/images/ava.png new file mode 100644 index 000000000..3c2371473 Binary files /dev/null and b/app/assets/images/ava.png differ diff --git a/app/assets/images/bg-droplist.png b/app/assets/images/bg-droplist.png new file mode 100644 index 000000000..2c5a4309b Binary files /dev/null and b/app/assets/images/bg-droplist.png differ diff --git a/app/assets/images/bg.png b/app/assets/images/bg.png new file mode 100644 index 000000000..62e74e049 Binary files /dev/null and b/app/assets/images/bg.png differ diff --git a/app/assets/images/checkbox-main.png b/app/assets/images/checkbox-main.png new file mode 100644 index 000000000..44aa8b14b Binary files /dev/null and b/app/assets/images/checkbox-main.png differ diff --git a/app/assets/images/code.png b/app/assets/images/code.png new file mode 100644 index 000000000..c348e8d7c Binary files /dev/null and b/app/assets/images/code.png differ diff --git a/app/assets/images/expand-gray.png b/app/assets/images/expand-gray.png new file mode 100644 index 000000000..cb8bbd46f Binary files /dev/null and b/app/assets/images/expand-gray.png differ diff --git a/app/assets/images/expand-gray2.png b/app/assets/images/expand-gray2.png new file mode 100644 index 000000000..c49b0b21b Binary files /dev/null and b/app/assets/images/expand-gray2.png differ diff --git a/app/assets/images/expand-white.png b/app/assets/images/expand-white.png new file mode 100644 index 000000000..78dc7c9fe Binary files /dev/null and b/app/assets/images/expand-white.png differ diff --git a/app/assets/images/expand.png b/app/assets/images/expand.png new file mode 100644 index 000000000..700e9957a Binary files /dev/null and b/app/assets/images/expand.png differ diff --git a/app/assets/images/flag.png b/app/assets/images/flag.png new file mode 100644 index 000000000..85b84ce4f Binary files /dev/null and b/app/assets/images/flag.png differ diff --git a/app/assets/images/folder.png b/app/assets/images/folder.png new file mode 100644 index 000000000..2df35409f Binary files /dev/null and b/app/assets/images/folder.png differ diff --git a/app/assets/images/lock.png b/app/assets/images/lock.png new file mode 100644 index 000000000..ddf7e233e Binary files /dev/null and b/app/assets/images/lock.png differ diff --git a/app/assets/images/logo-mini.png b/app/assets/images/logo-mini.png new file mode 100644 index 000000000..3175f3b21 Binary files /dev/null and b/app/assets/images/logo-mini.png differ diff --git a/app/assets/images/menu-hover.png b/app/assets/images/menu-hover.png new file mode 100644 index 000000000..8883a2116 Binary files /dev/null and b/app/assets/images/menu-hover.png differ diff --git a/app/assets/images/page-bg.png b/app/assets/images/page-bg.png new file mode 100644 index 000000000..f81678dec Binary files /dev/null and b/app/assets/images/page-bg.png differ diff --git a/app/assets/images/radio.png b/app/assets/images/radio.png new file mode 100644 index 000000000..28f16dfae Binary files /dev/null and b/app/assets/images/radio.png differ diff --git a/app/assets/images/search-button.png b/app/assets/images/search-button.png new file mode 100644 index 000000000..7a9e40bc4 Binary files /dev/null and b/app/assets/images/search-button.png differ diff --git a/app/assets/images/selects-2.png b/app/assets/images/selects-2.png new file mode 100644 index 000000000..150f7045b Binary files /dev/null and b/app/assets/images/selects-2.png differ diff --git a/app/assets/images/selects-focus.png b/app/assets/images/selects-focus.png new file mode 100644 index 000000000..e6fbaf8b5 Binary files /dev/null and b/app/assets/images/selects-focus.png differ diff --git a/app/assets/images/square.png b/app/assets/images/square.png new file mode 100644 index 000000000..a6f4b5f9b Binary files /dev/null and b/app/assets/images/square.png differ diff --git a/app/assets/images/submenu-hover.png b/app/assets/images/submenu-hover.png new file mode 100644 index 000000000..eda9a1a1a Binary files /dev/null and b/app/assets/images/submenu-hover.png differ diff --git a/app/assets/images/switch-off.png b/app/assets/images/switch-off.png new file mode 100644 index 000000000..e119baf8e Binary files /dev/null and b/app/assets/images/switch-off.png differ diff --git a/app/assets/images/switch-on.png b/app/assets/images/switch-on.png new file mode 100644 index 000000000..cdfa3e37e Binary files /dev/null and b/app/assets/images/switch-on.png differ diff --git a/app/assets/images/table-down.png b/app/assets/images/table-down.png new file mode 100644 index 000000000..0a6e66179 Binary files /dev/null and b/app/assets/images/table-down.png differ diff --git a/app/assets/images/table-header.png b/app/assets/images/table-header.png new file mode 100644 index 000000000..ff7181431 Binary files /dev/null and b/app/assets/images/table-header.png differ diff --git a/app/assets/images/table-sort.png b/app/assets/images/table-sort.png new file mode 100644 index 000000000..765c685e2 Binary files /dev/null and b/app/assets/images/table-sort.png differ diff --git a/app/assets/images/table-up.png b/app/assets/images/table-up.png new file mode 100644 index 000000000..53b1671cb Binary files /dev/null and b/app/assets/images/table-up.png differ diff --git a/app/assets/images/top-left.png b/app/assets/images/top-left.png new file mode 100644 index 000000000..3590e4141 Binary files /dev/null and b/app/assets/images/top-left.png differ diff --git a/app/assets/images/top-middle.png b/app/assets/images/top-middle.png new file mode 100644 index 000000000..2d01d9206 Binary files /dev/null and b/app/assets/images/top-middle.png differ diff --git a/app/assets/images/top-right.png b/app/assets/images/top-right.png new file mode 100644 index 000000000..8f6e2ac4c Binary files /dev/null and b/app/assets/images/top-right.png differ diff --git a/app/assets/images/unlock.png b/app/assets/images/unlock.png new file mode 100644 index 000000000..ca5ae11f2 Binary files /dev/null and b/app/assets/images/unlock.png differ diff --git a/app/assets/images/unlock2.png b/app/assets/images/unlock2.png new file mode 100644 index 000000000..97e9fe8be Binary files /dev/null and b/app/assets/images/unlock2.png differ diff --git a/app/assets/images/x.png b/app/assets/images/x.png new file mode 100644 index 000000000..ffd4e813e Binary files /dev/null and b/app/assets/images/x.png differ diff --git a/app/assets/javascripts/admin-members.js b/app/assets/javascripts/admin-members.js new file mode 100644 index 000000000..cef30a9e3 --- /dev/null +++ b/app/assets/javascripts/admin-members.js @@ -0,0 +1,14 @@ +function deleteAdminMember() { + if (document.getElementById("niceCheckbox1-1").checked == true) { + $("#admin-table-members-row1").fadeOut("slow"); + } + if (document.getElementById("niceCheckbox2-1").checked == true) { + $("#admin-table-members-row2").fadeOut("slow"); + } + if (document.getElementById("niceCheckbox3-1").checked == true) { + $("#admin-table-members-row3").fadeOut("slow"); + } + if (document.getElementById("niceCheckbox4-1").checked == true) { + $("#admin-table-members-row4").fadeOut("slow"); + } +} \ No newline at end of file diff --git a/app/assets/javascripts/all.js b/app/assets/javascripts/all.js new file mode 100644 index 000000000..706de086e --- /dev/null +++ b/app/assets/javascripts/all.js @@ -0,0 +1,42 @@ +var state = 0; + +function droplist() { + if (state == 0) { + $("#droplist").slideToggle("slow"); + //borderDown(); + state = 1; + } +} + +function loadMessages() { + $("#messages-new").fadeOut("slow"); + $("#new-messages").delay(700).fadeIn("slow"); + //setTimeout(border1, 700) +} +function loadOldMessages() { + $("#old-messages").fadeIn("slow"); + //setTimeout(border1, 700) +} + + +$(document).click(function() { + var dl = $("#droplist").css("height"); + var dl2 = $("#droplist").css("display"); + if ((dl2 == "block")&&(dl == "91px")) { + state = 0; + droplist(); + state = 0; + } +}); + +function showActivity(elem) { + //borderDown(); + $("#activity-bottom"+elem).slideToggle("slow"); + var img = $("#expand" + elem).attr("src"); + if (img == "design/expand-gray.png") { + $("#expand" + elem).attr("src","design/expand-gray2.png"); + } else { + $("#expand" + elem).attr("src","design/expand-gray.png"); + } + //setTimeout(border1, 700) +} \ No newline at end of file diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js new file mode 100644 index 000000000..37a1a2883 --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,54 @@ +//= require jquery +//= require jquery_ujs +//= require jquery-ui +//= require autocomplete-rails +//= require vendor +//= require_tree . +//= require_self + +// function disableNotifierCbx(global_cbx) { +// if ($(global_cbx).attr('checked')) { +// $('.notify_cbx').removeAttr('disabled'); +// $('.notify_cbx').each(function(i,el) { $(el).prev().removeAttr('disabled'); }) +// } else { +// $('.notify_cbx').attr('disabled', 'disabled'); +// $('.notify_cbx').each(function(i,el) { $(el).prev().attr('disabled', 'disabled'); }) +// } +// } +// +// $(document).ready(function() { +// $('select#build_list_pl_id').change(function() { +// var platform_id = $(this).val(); +// var base_platforms = $('.base_platforms input[type=checkbox]'); +// +// $('#include_repos').html($('.preloaded_include_repos .include_repos_' + platform_id).html()); +// +// base_platforms.each(function(){ +// if ($.inArray(platform_id, base_platforms.map(function(){ return $(this).val() }).get()) >= 0) { +// if ($(this).val() == platform_id) { +// $(this).attr('checked', 'checked'); +// $(this).removeAttr('disabled'); +// } else { +// $(this).removeAttr('checked'); +// $(this).attr('disabled', 'disabled'); +// } +// } else { +// $(this).removeAttr('disabled'); +// } +// }); +// }); +// $('select#build_list_pl_id').trigger('change'); +// +// $('input.user_role_chbx').click(function() { +// var current = $(this); +// current.parent().find('input.user_role_chbx').each(function(i,el) { +// if ($(el).attr('id') != current.attr('id')) { +// $(el).removeAttr('checked'); +// } +// }); +// }); +// +// $('#settings_notifier_can_notify').click(function() { +// disableNotifierCbx($(this)); +// }); +// }); diff --git a/app/assets/javascripts/checkbox-main.js b/app/assets/javascripts/checkbox-main.js new file mode 100644 index 000000000..17253ffb0 --- /dev/null +++ b/app/assets/javascripts/checkbox-main.js @@ -0,0 +1,47 @@ +function changeCheck(el) +/* + Russsian comments deleted + el - span + input +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + + if(input.checked) + { + el.style.backgroundPosition="0 0"; + input.checked=false; + } + else + { + el.style.backgroundPosition="0 -18px"; + input.checked=true; + } + return true; +} +function startChangeCheck(el) +/* + Russsian comments deleted +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + if(input.checked) + { + el.style.backgroundPosition="0 -18px"; + } + return true; +} + +function startCheck() +{ + /* + Russsian comments deleted + Russsian comments deleted + */ + startChangeCheck(document.getElementById("niceCheckbox1")); + startChangeCheck(document.getElementById("niceCheckbox2")); + startChangeCheck(document.getElementById("niceCheckbox3")); + startChangeCheck(document.getElementById("niceCheckbox4")); +} \ No newline at end of file diff --git a/app/assets/javascripts/checkbox.js b/app/assets/javascripts/checkbox.js new file mode 100644 index 000000000..14072600c --- /dev/null +++ b/app/assets/javascripts/checkbox.js @@ -0,0 +1,44 @@ +function changeCheck(el) +/* + Russsian comments deleted + el - span + input +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + + if(input.checked) + { + el.style.backgroundPosition="0 0"; + input.checked=false; + } + else + { + el.style.backgroundPosition="0 -17px"; + input.checked=true; + } + return true; +} +function startChangeCheck(el) +/* + Russsian comments deleted +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + if(input.checked) + { + el.style.backgroundPosition="0 -17px"; + } + return true; +} + +function startCheck() +{ + /* + Russsian comments deleted + Russsian comments deleted + */ + startChangeCheck(document.getElementById("niceCheckbox1")); +} \ No newline at end of file diff --git a/app/assets/javascripts/cusel-init.js b/app/assets/javascripts/cusel-init.js new file mode 100644 index 000000000..04a7f7093 --- /dev/null +++ b/app/assets/javascripts/cusel-init.js @@ -0,0 +1,11 @@ +jQuery(document).ready(function(){ + +var params = { + changedEl: ".lineForm select", + visRows: 999999, + scrollArrows: false + } + + cuSel(params); + +}); \ No newline at end of file diff --git a/app/assets/javascripts/myprojects.js b/app/assets/javascripts/myprojects.js new file mode 100644 index 000000000..f0d45cf96 --- /dev/null +++ b/app/assets/javascripts/myprojects.js @@ -0,0 +1,16 @@ +$(document).ready(function() { + $("#myTable").tablesorter({ + headers: { + 1: { + sorter: false + }, + 3: { + sorter: false + } + } + }); +}); + +function deleteRow(num) { + $("#Row"+num).fadeOut("slow"); +} \ No newline at end of file diff --git a/app/assets/javascripts/radio.js b/app/assets/javascripts/radio.js new file mode 100644 index 000000000..4c30ceea0 --- /dev/null +++ b/app/assets/javascripts/radio.js @@ -0,0 +1,124 @@ +jQuery(document).ready(function(){ + +jQuery(".niceRadio").each( +/* Russsian comments deleted */ +function() { + + changeRadioStart(jQuery(this)); + +}); + + +}); + + +function changeRadio(el) +/* + Russsian comments deleted +*/ +{ + + var el = el, + input = el.find("input").eq(0); + var nm=input.attr("name"); + + jQuery(".niceRadio input").each( + + function() { + + if(jQuery(this).attr("name")==nm) + { + jQuery(this).parent().removeClass("radioChecked"); + } + + + }); + + + if(el.attr("class").indexOf("niceRadioDisabled")==-1) + { + el.addClass("radioChecked"); + input.attr("checked", true); + } + + return true; +} + +function changeVisualRadio(input) +{ +/* + Russsian comments deleted +*/ + var wrapInput = input.parent(); + var nm=input.attr("name"); + + jQuery(".niceRadio input").each( + + function() { + + if(jQuery(this).attr("name")==nm) + { + jQuery(this).parent().removeClass("radioChecked"); + } + + + }); + + if(input.attr("checked")) + { + wrapInput.addClass("radioChecked"); + } +} + +function changeRadioStart(el) +/* + Russsian comments deleted + Russsian comments deleted +*/ +{ + +try +{ +var el = el, + radioName = el.attr("name"), + radioId = el.attr("id"), + radioChecked = el.attr("checked"), + radioDisabled = el.attr("disabled"), + radioTab = el.attr("tabindex"), + radioValue = el.attr("value"); + if(radioChecked) + el.after(""+ + ""); + else + el.after(""+ + ""); + + /* Russsian comments deleted */ + if(radioDisabled) + { + el.next().addClass("niceRadioDisabled"); + el.next().find("input").eq(0).attr("disabled","disabled"); + } + + /* Russsian comments deleted */ + el.next().bind("mousedown", function(e) { changeRadio(jQuery(this)) }); + if(jQuery.browser.msie) el.next().find("input").eq(0).bind("click", function(e) { changeVisualRadio(jQuery(this)) }); + else el.next().find("input").eq(0).bind("change", function(e) { changeVisualRadio(jQuery(this)) }); + el.remove(); +} +catch(e) +{ + // Russsian comments deleted +} + + return true; +} diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss new file mode 100644 index 000000000..63daa576a --- /dev/null +++ b/app/assets/stylesheets/application.scss @@ -0,0 +1,3 @@ +@import "main"; +@import "tablesorter"; +@import "cusel"; diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss new file mode 100644 index 000000000..33159941a --- /dev/null +++ b/app/assets/stylesheets/main.scss @@ -0,0 +1,944 @@ +html, body { + margin: 0; + padding: 0; + font-family: Tahoma, Arial; + color: #565667; + background: #1f60a1 image-url("bg.png") repeat-x; + min-width: 940px; + min-height: 600px; + text-align: center; + height: 100%; +} + +header, section, footer, aside, nav, article, menu { + display: block; +} + +input[type="text"]:focus { outline: none; } + +input[type="password"]:focus { outline: none; } + +input:focus { outline: none; } + +select:focus { outline: none; } + +a img { border: none; } + +.wrap { + width: 940px; + margin: 0 auto; + text-align: center; + border: 1px solid #3f668c; + -webkit-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5); + box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5); + background: #FFF; + min-height: 92%; +} + +.wrap.columns { + background: #FFF image-url("page-bg.png") repeat-y; +} + +.both { + clear: both; +} + +/* Top menu */ + +header { + -webkit-box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.4); + -moz-box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.4); + box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.4); + position: relative; + z-index: 1000; +} + +header div.left { + background: image-url("top-left.png"); + height: 46px; + width: 14px; + float: left; +} + +header div.middle { + background: image-url("top-middle.png"); + float: left; + height: 46px; + width: 912px; +} + +header div.right { + background: image-url("top-right.png"); + height: 46px; + width: 14px; + float: right; +} + +/* Left part of top menu*/ + +header menu { + float: left; + margin: 0; + padding: 0; +} + +header menu ul { + list-style: none; + margin: 0; + padding: 10px 0px 0px 0px; +} + +header menu ul li { + display: inline; +} + +header menu ul li a { + font-size: 12px; + color: #FFF; + text-decoration: none; + height: 43px; + padding: 15px 15px 15px 15px; +} + +header menu ul li a:hover { + color: #cee7ff; +} + +header menu ul li a.first { + padding-left: 45px; +} + +header menu ul li a.active { + background: image-url("menu-hover.png") repeat-x; +} + +header div.logo { + float: left; + margin-top: -25px; + padding-left: 10px; + position: absolute; +} + +/* Right part of top menu */ + +header div.information { + float: right; +} + +header div.search { + float: left; + margin: 10px 0px 0px 0px; + -moz-border-radius-topleft: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; + -moz-border-radius-bottomleft: 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; + background: #FFF; + border: 1px solid #7691aa; +} + +header div.search div.pic { + background: image-url("search-button.png"); + height: 22px; + width: 24px; + float: left; +} + +header div.search div.field { + float: left; + margin: -1px 0px 0px 0px; +} + +header div.search div.field input { + border: none; + height: 18px; + background: none; + width: 132px; + font-size: 12px; + font-family: Arial; + padding: 2px 0px 0px 0px; +} + +header div.search div.field input.gray { + color: #cfcfcf; +} + +header div.search div.field input.black { + color: #333333; +} + +header div.avatar { + float:left; + padding-top: 6px; + padding-right: 10px; + padding-bottom: 10px; + padding: 6px 10px 10px 24px; +} + +header div.profile { + float: left; + text-align: right; + color: #FFF; + font-size: 12px; + padding-top: 12px; +} + +header div.profile a { + color: #FFF; + text-decoration: none; +} + +header div.profile a:hover { + text-decoration: underline; +} + + +header div.droplist-wrap { + margin: -4px 0px 0px 0px; +} + +header div.droplist { + background: image-url("bg-droplist.png") repeat-x; + height: 91px; + width: 151px; + -webkit-box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5); + box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5); + position: absolute; + margin-top: 0px; + margin-left: 138px; + border-radius: 0px 0px 4px 4px; + display: none; + text-align: right; + z-index: 9999; +} + +header div.droplist-wrap div.a { + margin-top: 5px; +} + +header div.droplist a{ + position: relative; + padding-left: 15px; + font-size: 12px; + color: #7eb7ed; + text-decoration: none; + padding-right: 15px; + margin-top: 10px; +} + +header div.droplist a:hover{ + text-decoration: underline; +} + + +/* Submenu */ + +.sub-menu { + height: 38px; + margin: -7px 0px 0px 0px; + padding: 0px 0px 0px 15px; + background: #ededed; + position: relative; + z-index: 100; + border-bottom: 1px solid #FFF; + -webkit-box-shadow: 0px 5px 3px -3px rgba(18, 86, 135, 0.2); + -moz-box-shadow: 0px 5px 3px -3px rgba(18, 86, 135, 0.2); + box-shadow: 0px 5px 3px -3px rgba(18, 86, 135, 0.2); +} + +.sub-menu div.left { + float: left; + width: 200px; + border-right: 1px solid #dcdcdc; + font-size: 12px; + text-align: left; + font-weight: 700; + padding: 10px 0px 0px 0px; + height: 21px; +} + +.sub-menu div.right { + float: left; +} + + +.sub-menu nav { + float: left; + margin: 0px 0px 0px 0px; +} + +.sub-menu nav ul { + list-style: none; + text-align: left; + padding: 0; + margin: 0; + padding-top: 5px; +} + +.sub-menu nav ul li { + display: inline; +} + +.sub-menu nav ul li a { + font-size: 12px; + color: #575756; + text-decoration: none; + height: 34px; + padding: 0px 20px 6px 20px; +} + +.sub-menu nav ul li a.active { + background: image-url("submenu-hover.png") repeat-x; +} + +.sub-menu nav ul li a:hover { + color: #2b6daf; +} + +/* Page markup */ + +article { + font-size: 12px; +} + +aside { + float: left; + width: 215px; +} + +article div.right { + float: right; + width: 645px; + padding: 20px 40px 40px 40px; + text-align: left; +} + +article div.right.bigpadding { + width: 445px; + padding: 20px 140px 40px 140px; +} + +article div.all { + width: 855px; + padding: 20px 40px 20px 40px; + text-align: left; +} + + +/* Left part of page markup */ + +aside div.bordered { + border-bottom: 1px solid #dee5eb; + text-align: left; + padding: 20px 0px 0px 15px; +} + +aside div.block { + text-align: left; + padding-top: 10px; + padding-left: 15px; +} + +/* Common page parts markups */ + +article a.button { + display: inline-block; + white-space: nowrap; + background-color: #125687; + background-image: -webkit-gradient(linear, left top, left bottom, from(#68a3d8), to(#125687)); + background-image: -webkit-linear-gradient(top, #68a3d8, #125687); + background-image: -moz-linear-gradient(top, #68a3d8, #125687); + background-image: -ms-linear-gradient(top, #68a3d8, #125687); + background-image: -o-linear-gradient(top, #68a3d8, #125687); + background-image: linear-gradient(top, #68a3d8, #125687); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#68a3d8', EndColorStr='#125687'); + border: 1px solid #5084b4; + padding: 4px 20px; + margin: 0; + font-size: 12px; + text-decoration: none; + color: #FFF; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +article a.button:hover{ + background-color: #34719d; + background-image: -webkit-gradient(linear, left top, left bottom, from(#7fb3e1), to(#34719d)); + background-image: -webkit-linear-gradient(top, #7fb3e1, #34719d); + background-image: -moz-linear-gradient(top, #7fb3e1, #34719d); + background-image: -ms-linear-gradient(top, #7fb3e1, #34719d); + background-image: -o-linear-gradient(top, #7fb3e1, #34719d); + background-image: linear-gradient(top, #7fb3e1, #34719d); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#7fb3e1', EndColorStr='#34719d'); + text-decoration: none; +} + + + +article a.button:active{ + background-color: #125687; + background-image: -webkit-gradient(linear, left top, left bottom, from(#68a3d8), to(#125687)); + background-image: -webkit-linear-gradient(top, #68a3d8, #125687); + background-image: -moz-linear-gradient(top, #68a3d8, #125687); + background-image: -ms-linear-gradient(top, #68a3d8, #125687); + background-image: -o-linear-gradient(top, #68a3d8, #125687); + background-image: linear-gradient(top, #68a3d8, #125687); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#68a3d8', EndColorStr='#125687'); +} + +article a.disabled { + background-color: #888888; + background-image: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), to(#888888)); + background-image: -webkit-linear-gradient(top, #aaaaaa, #888888); + background-image: -moz-linear-gradient(top, #aaaaaa, #888888); + background-image: -ms-linear-gradient(top, #aaaaaa, #888888); + background-image: -o-linear-gradient(top, #aaaaaa, #888888); + background-image: linear-gradient(top, #aaaaaa, #888888); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#aaaaaa', EndColorStr='#888888'); + cursor: default; + color: #d8d8d8; + border: 1px solid #aaaaaa; + cursor: default; +} + +article h3{ + font-size: 14px; + color: #575756; + margin-bottom: 0; + padding-bottom: 2px; +} + +article h3.fix { + margin-top: 0px; + padding-top: 0px; +} + +article a{ + color: #7eb7ed; + font-size: 12px; + text-decoration: none; + padding: 0px 0px; +} + +article a:hover{ + text-decoration: underline; +} + +/* Right part of page markup */ + +article div.right div.hr { + border-bottom: 1px solid #dedede; + width: 100%; + padding-top: 30px; + margin-bottom: 40px; +} + +article div.right div.hr.bottom { + margin-bottom: 10px; + padding-top: 20px; +} + +article div.right div.hr.top { + padding-top: 7px; + margin-bottom: 20px; +} + +article div.right div.leftside { + float: left; +} + +article div.right div.rightside { + float: right; +} + + +.w25 { + width: 25px; +} + +.w420 { + width: 420px; + padding-bottom: 20px; +} + +.padd25 { + padding-left: 25px; +} + + +/* Footer */ + +footer { + height: 32px; + /*background: image-url("footer-bg.png");*/ + padding-left: 15px; + width: 900px; + margin: 0 auto; + text-align: center; +} + +footer ul { + margin: 0; + padding: 0; + list-style: none; + font-size: 12px; + color: #FFF; + padding-top: 10px; + text-align: left; +} + +footer ul li { + display: inline; +} + +footer ul li a { + font-size: 12px; + color: #FFF; + text-decoration: none; +} + +footer ul li a:hover { + text-decoration: underline; +} + +/* Main page */ + +aside div.bordered table{ + padding: 0; + margin: 0; + padding-bottom: 30px; + margin-left: -10px; +} + +aside div.bordered table td{ + font-size: 12px; + padding: 1px 0px 0px 0px; +} + +aside div.block table td { + text-align: right; + padding: 2px 0px 1px 0px; +} + + +aside div.block table td.first{ + width: 150px; + text-align: left; +} + +article div.right div.messages { + background: #e9f4fb; + border: 1px solid #dfeefa; + border-radius: 5px; + width: 100%; + color: #477cae; + text-align: center; + font-size: 12px; + padding: 4px 0px 4px 0px; + cursor: pointer; + margin: 15px 0px 15px 0px; +} + +article div.right div.messages:hover { + background: #dceffa; +} + +article div.right div.messages p{ + margin: 0; + padding: 0; +} + +article div.right div.activity { + border: 1px solid #d6d6d6; + width: 614px; + border-radius: 5px; + padding: 6px; + margin-top: 15px; + color: #333; +} + +article div.right div.activity div.top div.image { + float: left; +} + +article div.right div.activity div.top div.text { + float: left; + padding-left: 10px; + font-size: 12px; +} + +article div.right div.activity div.top div.text span.name { + font-weight: 700; +} + +article div.right div.activity div.top div.text span.date { + font-size: 11px; +} + +article div.right div.activity div.top div.text span.subject img { + cursor: pointer; +} + +article div.right div.activity div.fulltext { + font-size: 12px; + padding-top: 10px; + display: none; +} + +/* Admin page */ + +.admin-preferences ul { + list-style: none; + margin: 0; + padding: 0; + margin-top: 20px; + width: 215px; + text-align: left; +} + +.admin-preferences ul li{ + padding-top: 5px; + padding-bottom: 5px; + width: 215px; +} + +.admin-preferences ul li.active, .admin-preferences ul li:hover { + background: #dcecfa; +} + +.admin-preferences ul li a{ + color: #575756; + text-decoration: none; + padding-top: 5px; + padding-bottom: 5px; + padding-left: 15px; +} + +.right div.leftlist { + float: left; + width: 200px; + margin: 0px 0px 10px 0px; +} + +.right div.rightlist { + float: left; + width: 400px; + font-size: 12px; + color: #575756; + margin: 0px 0px 10px 0px; +} + +.right div.rightlist div.check { + float: left; +} + +.right div.rightlist div.forcheck { + float: left; + margin: 1px 0px 0px 5px; +} +.right div.rightlist textarea { + height: 110px; + width: 340px; + border: 1px solid #dedede; + border-radius: 4px; + padding: 5px; + font-family: Tahoma, Arial; + font-size: 12px; +} + +/* Admin-members page */ + +.right table div.img { + float: left; +} + +.right table div.radio { + float: left; + margin: 5px 0px 0px 0px; +} + +.right table div.forimg { + float: left; + margin: 5px 0px 0px 5px; +} + +.right table div.forradio { + float: left; + margin: 5px 0px 0px 5px; +} + +.right table span.niceCheck-main { + margin-top: 3px; +} + +.right div.admin-search { + float: left; +} + +.right div.admin-role { + float: left; +} + +.right div.admin-search input { + width: 300px; + margin-right: 5px; + height: 23px; + border: 1px solid #dedede; + border-radius: 3px; + margin-top: 1px; + font-size: 12px; + font-family: Tahoma, Arial; + padding-left: 5px; +} + +.right div.admin-search input.gray { + color: #cfcfcf; +} + +.right div.admin-search input.black { + color: #333333; +} + +.right div.admin-add { + float: left; + padding-top: 1px; + margin-left: 5px; +} + +.right div.admin-add a { + width: 86px; + text-align: center; + padding-bottom: 5px; +} + +/* Input elements */ + +.niceRadio { + width: 17px; + height: 17px; + display: inline-block; + cursor: pointer; + background: image-url("radio.png"); + overflow: hidden; +} +.radioChecked { + background-position: 0 -17px; +} +.niceRadio input { + margin-left: -18px; +} + +.sel80 { + width: 200px; + padding-bottom: 4px; + text-align: left; +} +.lineForm, +.lineForm3 { + margin-bottom: 0px; +} + +.niceCheck { + width: 17px; + height: 17px; + display: inline-block; + cursor: pointer; + background: image-url("checkbox.png"); +} +.niceCheck input { + display: none; +} + +.niceCheck-main { + width: 18px; + height: 18px; + display: inline-block; + cursor: pointer; + background: image-url("checkbox-main.png"); +} +.niceCheck-main input { + display: none; +} + +/* Admin build project */ + +section.left { + float: left; + text-align: left; + width: 230px; + margin-left: 250px; +} + +section.right { + float: right; + text-align: left; + width: 200px; + margin-right: 250px; +} + +section .left { + float: left; + margin-right: 4px; +} + +/* Commits history */ + +article .fright { + float: right; +} + +article .fright p{ + margin: 0; + padding: 5px 5px 0px 0px; +} + +article .date-block { + width: 100%; + margin-top: 17px; +} + +article .date-block div.date { + float: left; + background: #bedbf6; + color: #477cae; + border: 1px solid #98bede; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 0px; + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-radius: 4px 0px 0px 4px; + border-radius: 4px 0px 0px 4px; + width: 65px; + height: 55px; + padding: 10px; + padding-top: 20px; + -webkit-box-shadow: -1px 0px 0px 1px rgba(0, 0, 0, 0.1); + -moz-box-shadow: -1px 0px 0px 1px rgba(0, 0, 0, 0.1); + box-shadow: -1px 0px 0px 1px rgba(0, 0, 0, 0.1); + font-size: 14px; + text-align: center; +} + +article .date-block div.messages { + float: left; + border: 1px solid #cfdde7; + -moz-border-radius-topleft: 0px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-radius: 0px 4px 4px 4px; + border-radius: 0px 4px 4px 4px; + padding: 10px; + padding-bottom: 0px; + width: 746px; +} + +article .date-block div.message { + border: 1px solid #d6d6d6; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-radius: 4px 4px 4px 4px; + border-radius: 4px 4px 4px 4px; + padding: 6px; + margin-bottom: 10px; +} + +article .date-block div.message div.body { + float: left; + text-align: left; +} + +article .date-block div.message div.code { + float: right; + margin: -7px 0px 0px 640px; + position: absolute; +} + +article .date-block div.code div.top { + width: 90px; + height: 22px; + border: 1px solid #9dbcd5; + background: #cbdeef; +} + +article .date-block div.code div.bottom { + width: 90px; + text-align: right; +} + +article .date-block div.code div.left { + float: left; + width: 13px; + height: 13px; + padding-left: 2px; + padding-top: 4px; +} + +article .date-block div.code div.right { + float: right; + border: 1px solid #bcd5ea; + background: #FFF; + font-size: 12px; + width: 65px; + height: 14px; + margin: 2px; + padding: 0px 2px 2px 0px; + text-align: center; +} + +article .date-block div.image { + float: left; +} + +article .date-block div.text { + float: left; + padding-left: 10px; + font-size: 12px; +} + +article .date-block div.text span.name { + font-weight: 700; +} + +article .date-block div.text span.date { + font-size: 11px; +} + +article .date-block div.text span.subject img { + cursor: pointer; +} + +article .date-block div.fulltext { + font-size: 12px; + padding-top: 10px; + display: none; + /*width: 640px;*/ +} + + +article div.year { + background: #e9f4fb; + border: 1px solid #dfeefa; + border-radius: 5px; + width: 760px; + color: 477cae; + text-align: center; + font-size: 12px; + padding: 4px; + margin-left: 87px; + margin-top: 30px; + margin-bottom: 30px; +} + +article div.year p{ + margin: 0; + padding: 0; + color: #477CAE; +} \ No newline at end of file diff --git a/app/controllers/collaborators_controller.rb b/app/controllers/collaborators_controller.rb index f05ab25ac..c033a75b4 100644 --- a/app/controllers/collaborators_controller.rb +++ b/app/controllers/collaborators_controller.rb @@ -109,10 +109,9 @@ class CollaboratorsController < ApplicationController if flash[k].size > 0 flash[k] = flash[k].map{|i| (i.is_a? Array) ? sprintf(i.first, i.last) : i}.join('; ') else - flash[k] = nil + flash.delete k end end - flash.delete_if{|k, v| v.nil?} redirect_to(edit_project_collaborators_path(@project)) end diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 690695126..d802e9a0d 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -14,7 +14,7 @@ class CommentsController < ApplicationController def create @comment = @commentable.comments.build(params[:comment]) if @commentable.class == Issue - @comment = Comment.new(params[:comment].merge(:commentable_id => @commentable.id, :commentable_type => @commentable.class.name, :project => @project)) if @commentable.class == Grit::Commit + @comment = Comment.new(params[:comment].merge(:commentable_id => @commentable.id.hex, :commentable_type => @commentable.class.name, :project => @project)) if @commentable.class == Grit::Commit @comment.user = current_user if @comment.save flash[:notice] = I18n.t("flash.comment.saved") diff --git a/app/models/group.rb b/app/models/group.rb index bc89373d4..d74161e25 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -19,10 +19,9 @@ class Group < ActiveRecord::Base attr_readonly :uname, :own_projects_count - delegate :ssh_key, :to => :owner + delegate :ssh_key, :email, :to => :owner after_create :add_owner_to_members - after_initialize lambda {|r| r.name ||= r.uname } # default include Modules::Models::PersonalRepository # include Modules::Models::Owner diff --git a/app/models/private_user.rb b/app/models/private_user.rb index c21e6f97d..d68d5e423 100644 --- a/app/models/private_user.rb +++ b/app/models/private_user.rb @@ -1,7 +1,6 @@ # -*- encoding : utf-8 -*- class PrivateUser < ActiveRecord::Base require 'digest/sha2' - require 'active_support/secure_random' belongs_to :platform belongs_to :user diff --git a/app/models/project.rb b/app/models/project.rb index c15332d5e..68bdc9f62 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -153,7 +153,7 @@ class Project < ActiveRecord::Base class << self def commit_comments(commit, project) - comments = Comment.where(:commentable_id => commit.id, :commentable_type => 'Grit::Commit').order(:created_at) + comments = Comment.where(:commentable_id => commit.id.hex, :commentable_type => 'Grit::Commit').order(:created_at) comments.each {|x| x.project = project; x.helper} end end diff --git a/app/stylesheets/ie.scss b/app/stylesheets/ie.scss deleted file mode 100644 index 5cd5b6c5b..000000000 --- a/app/stylesheets/ie.scss +++ /dev/null @@ -1,5 +0,0 @@ -/* Welcome to Compass. Use this file to write IE specific override styles. - * Import this file using the following HTML or equivalent: - * */ diff --git a/app/stylesheets/print.scss b/app/stylesheets/print.scss deleted file mode 100644 index b0e9e456f..000000000 --- a/app/stylesheets/print.scss +++ /dev/null @@ -1,3 +0,0 @@ -/* Welcome to Compass. Use this file to define print styles. - * Import this file using the following HTML or equivalent: - * */ diff --git a/app/stylesheets/screen.scss b/app/stylesheets/screen.scss deleted file mode 100644 index 81de84703..000000000 --- a/app/stylesheets/screen.scss +++ /dev/null @@ -1,6 +0,0 @@ -/* Welcome to Compass. - * In this file you should write your main styles. (or centralize your imports) - * Import this file using the following HTML or equivalent: - * */ - -@import "compass/reset"; diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml index 64e59130c..8cba70c29 100644 --- a/app/views/devise/confirmations/new.html.haml +++ b/app/views/devise/confirmations/new.html.haml @@ -16,7 +16,8 @@ = f.text_field :email, :class => "text_field" .group.navform.wat-cf - %button.button{ :tyle => "submit" } - #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.confirmations.send"))} #{t("devise.confirmations.send")} + %button.button{:tyle => "submit"} + = image_tag("web-app-theme/icons/tick.png", :alt => t("devise.confirmations.send")) + = t("devise.confirmations.send") %span.text_button_padding - = render :partial => "devise/shared/links" \ No newline at end of file + = render :partial => "devise/shared/links" \ No newline at end of file diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml index 324238cf4..457c8c943 100644 --- a/app/views/devise/passwords/edit.html.haml +++ b/app/views/devise/passwords/edit.html.haml @@ -21,7 +21,8 @@ = f.text_field :password_confirmation, :class => "text_field" .group.navform.wat-cf - %button.button{ :tyle => "submit" } - #{image_tag("web-app-theme/icons/application_edit.png", :alt => t("devise.passwords.edit_button"))} #{t("devise.passwords.edit_button")} + %button.button{:tyle => "submit"} + = image_tag("web-app-theme/icons/application_edit.png", :alt => t("devise.passwords.edit_button")) + = t("devise.passwords.edit_button") %span.text_button_padding = render :partial => "devise/shared/links" diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml index a4ac16821..27dc033d0 100644 --- a/app/views/devise/passwords/new.html.haml +++ b/app/views/devise/passwords/new.html.haml @@ -15,7 +15,8 @@ = f.text_field :email, :class => "text_field" .group.navform.wat-cf - %button.button{ :tyle => "submit" } - #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.passwords.button"))} #{t("devise.passwords.button")} + %button.button{:tyle => "submit"} + = image_tag "web-app-theme/icons/tick.png", :alt => t("devise.passwords.button") + = t("devise.passwords.button") %span.text_button_padding = render :partial => "devise/shared/links" \ No newline at end of file diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml index b983f1836..942173870 100644 --- a/app/views/devise/registrations/edit.html.haml +++ b/app/views/devise/registrations/edit.html.haml @@ -66,8 +66,9 @@ = f.password_field :password_confirmation, :class => "text_field" .group.navform.wat-cf - %button.button{ :type => "submit" } - #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.signed_up"))} #{t("layout.save")} + %button.button{:type => "submit"} + = image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.signed_up")) + = t("layout.save") = link_to image_tag("web-app-theme/icons/cross.png", :alt => t("devise.registrations.cancel")) + " " + t("devise.registrations.cancel"), registration_path(resource_name), :method => :delete, :class => "button", :confirm => t("devise.registrations.cancel_confirmation") diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index 5c9d0de5d..12b39d4a3 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -44,7 +44,8 @@ = f.select :language, User::LANGUAGES_FOR_SELECT .group.navform.wat-cf - %button.button{ :type => "submit" } - #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.sign_up_header"))} #{t("devise.registrations.sign_up_header")} + %button.button{:type => "submit"} + = image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.sign_up_header")) + = t("devise.registrations.sign_up_header") %span.text_button_padding = render :partial => "devise/shared/links" diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index ef74f8b0b..eecab035d 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -6,20 +6,17 @@ - flash.each do |key, value| .message{ :title => key.to_s.humanize, :class => (key == :alert ? "error" : key) } %p= value - - form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form login" }) do |f| + = form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form login" }) do |f| .group.wat-cf - .left - = f.label :login, :class => "label right" - .right - = f.text_field :login, :class => "text_field" + .left= f.label :login, :class => "label right" + .right= f.text_field :login, :class => "text_field" .group.wat-cf - .left - = f.label :password, :class => "label right" - .right - = f.password_field :password, :class => "text_field" + .left= f.label :password, :class => "label right" + .right= f.password_field :password, :class => "text_field" .group.navform.wat-cf .right - %button.button{ :type => "submit" } - %img{ :src => "/images/web-app-theme/icons/key.png", :alt => "Save" }= t("layout.login") + %button.button{:type => "submit"} + = image_tag 'web-app-theme/icons/key.png', :alt => "Save" + = t("layout.login") %span.text_button_padding = render :partial => "devise/shared/links" diff --git a/app/views/layouts/_javascripts.html.haml b/app/views/layouts/_javascripts.html.haml deleted file mode 100644 index d128dbf35..000000000 --- a/app/views/layouts/_javascripts.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -= javascript_include_tag(Rails.env.production? ? 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js' : 'jquery.min.js') -= javascript_include_tag 'jquery-ui-1.8.16.custom.min.js' - --# fall back to local jQuery if necessary -:javascript - !window.jQuery && document.write(unescape('%3Cscript src="/javascripts/jquery.min.js"%3E%3C/script%3E')) - --#= include_javascripts :application - -= javascript_include_tag "rails", "application", "drop_down_menu" - --# Append your own using content_for :javascripts -= yield :javascripts diff --git a/app/views/layouts/_stylesheets.html.haml b/app/views/layouts/_stylesheets.html.haml deleted file mode 100644 index 101eb8857..000000000 --- a/app/views/layouts/_stylesheets.html.haml +++ /dev/null @@ -1,6 +0,0 @@ --#= include_stylesheets :application - -= stylesheet_link_tag "web-app-theme/base.css", "web-app-theme/themes/default/style.css", "web-app-theme/override.css", "git/style.css" -= stylesheet_link_tag "jquery-ui-1.8.16.custom.css", "datatable.css", "patches.css" - -= yield :stylesheets diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 1e72aff63..ba51619c2 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,59 +1,49 @@ !!! %html %head + %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"} %title= choose_title - = render :partial => "layouts/stylesheets" - = render :partial => "layouts/javascripts" + = stylesheet_link_tag 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/base/jquery-ui.css', :media => 'screen, projection' + = stylesheet_link_tag "application" + = javascript_include_tag "application" = csrf_meta_tag + %body - #container - #header - %h1 - %a{:href => "/"}= choose_title - #user-navigation - %ul.wat-cf - %li= link_to current_user.uname, edit_user_registration_path - %li= link_to t('layout.logout'), destroy_user_session_path, :method => :delete, :class => "logout" - #main-navigation - %ul.wat-cf - -if can? :index, User - %li{:class => controller.controller_path == 'users' ? 'active' : '' } - %a{:href => users_path}= t("layout.menu.users") - -if can? :index, Platform - %li{:class => controller.controller_path == 'platforms' ? 'active' : '' } - %a{:href => platforms_path}= t("layout.menu.platforms") - -if can? :index, Project - %li{:class => controller.controller_path == 'projects' ? 'active' : '' } - %a{:href => projects_path}= t("layout.menu.projects") - -if can? :index, Group - %li{:class => controller.controller_path == 'groups' ? 'active' : '' } - %a{:href => groups_path}= t("layout.menu.groups") - -if can? :index, Download - %li{:class => controller.controller_path == 'downloads' ? 'active' : '' } - %a{:href => downloads_path}= t("layout.menu.downloads") - -if can? :index, EventLog - %li{:class => controller.controller_path == 'event_logs' ? 'active' : '' } - %a{:href => event_logs_path}= t("layout.menu.event_logs") - -if can? :index, BuildList - %li{:class => controller.controller_path == 'build_lists' ? 'active' : '' } - %a{:href => build_lists_path}= t("layout.menu.build_lists") - -if can? :platforms, Category - %li{:class => controller.controller_path == 'categories' ? 'active' : '' } - %a{:href => catalogs_path}= t("layout.menu.categories") - -if can? :read, current_user.personal_repository - %li{:class => controller.controller_path == 'personal_repositories' ? 'active' : '' } - %a{:href => personal_repository_path( current_user.personal_repository.id )}= t("layout.menu.personal_repository") - - if can? :index, AutoBuildList - %li{:class => controller.controller_path == 'auto_build_lists' ? 'active' : '' } - %a{:href => auto_build_lists_path}= t("layout.menu.auto_build_lists") - #wrapper.wat-cf - = render :partial => "layouts/flashes" - #main - = yield - #footer - .block - = yield :footer - - #sidebar - = yield :sidebar + .wrap + %header + .left + .middle + %menu + = render 'layouts/menu/top' + .logo= image_tag 'logo-mini.png', :alt => 'logo' + .information + .search + .pic + .field + %input.gray{:onclick => "if(this.value=='#{t "layout.search"}'){this.value='';this.className='black';}", :onblur => "if(this.value==''){this.value='#{t "layout.search"}';this.className='gray';}", :type => "text", :value => "#{t "layout.search"}"} + .avatar{:onclick => "droplist();"}= image_tag 'ava.png', :alt => 'avatar', :height => "30" + .profile{:onclick => "droplist();"} + %a{:href => "#", :onclick => "droplist();"} + = current_user.uname + = image_tag 'expand-white.png', :alt => 'ex' + .both + .droplist-wrap + #droplist.droplist + .a= link_to current_user.uname, current_user + .a= link_to t('layout.settings.label'), edit_user_registration_path + .a= link_to t('layout.logout'), destroy_user_session_path, :method => :delete + .right + .both + - if content_for?(:sub_menu) + .sub-menu= yield :sub_menu + .both + = render "layouts/flashes" + %article + - if content_for?(:sidebar) + %aside= yield :sidebar + .right= yield + - else + .all= yield + .both + %footer= render "layouts/menu/bottom" diff --git a/app/views/layouts/menu/_bottom.html.haml b/app/views/layouts/menu/_bottom.html.haml new file mode 100644 index 000000000..5f9aa9cdc --- /dev/null +++ b/app/views/layouts/menu/_bottom.html.haml @@ -0,0 +1,19 @@ +%ul + %li + = image_tag 'square.png' + = t('bottom_menu.copyright') + %li + = image_tag 'square.png' + = image_tag 'flag.png', :alt => 'flag' + %li + = image_tag 'square.png' + = link_to t('bottom_menu.about'), '#' + %li + = image_tag 'square.png' + = link_to t('bottom_menu.contacts'), '#' + %li + = image_tag 'square.png' + = link_to t('bottom_menu.tos'), '#' + %li + = image_tag 'square.png' + = link_to t('bottom_menu.security'), '#' \ No newline at end of file diff --git a/app/views/layouts/menu/_top.html.haml b/app/views/layouts/menu/_top.html.haml new file mode 100644 index 000000000..e3c7bbc15 --- /dev/null +++ b/app/views/layouts/menu/_top.html.haml @@ -0,0 +1,4 @@ +%ul + - (collection = t 'top_menu').each do |base, title| + - if can? :index, base.to_s.classify.constantize + %li= link_to title, send(:"#{base}_path"), :class => [].tap{|c| c << 'first' if collection.first.first == base; c << 'active' if params[:controller] == base.to_s}.join(' ') \ No newline at end of file diff --git a/app/views/layouts/sessions.html.haml b/app/views/layouts/sessions.html.haml index 055710952..f56fa2d68 100644 --- a/app/views/layouts/sessions.html.haml +++ b/app/views/layouts/sessions.html.haml @@ -1,11 +1,10 @@ !!! %html %head + %meta{:content => "text/html; charset=utf-8", "http-equiv" => "content-type"} = display_meta_tags :site => APP_CONFIG['project_name'] - = render :partial => "layouts/javascripts" - -#= include_stylesheets :sessions - = stylesheet_link_tag "web-app-theme/base.css", "web-app-theme/themes/default/style.css", "web-app-theme/override.css" - + = stylesheet_link_tag "application" + = javascript_include_tag "application" = csrf_meta_tag %body #container diff --git a/app/views/products/_crontab.html.haml b/app/views/products/_crontab.html.haml index 0982d7099..6e3074904 100644 --- a/app/views/products/_crontab.html.haml +++ b/app/views/products/_crontab.html.haml @@ -1,68 +1,67 @@ -- content_for :javascripts do - :javascript - $(function(){ - $(".chooser").click(function() { - var for_element = this.name.replace(/_chooser/,""); - $("#" + for_element).attr("disabled", (this.value !== "1")); - }); - - $(".cron").change(function() { - var minute, hour, day, month, weekday; - - minute = getSelected('minute'); - hour = getSelected('hour'); - day = getSelected('day'); - month = getSelected('month'); - weekday = getSelected('weekday'); - - $("#cron").attr("value", minute + " " + hour + " " + day + " " + month + " " + weekday); - - return false; - }); - - $("#product_use_cron").change(function(){ - if ($("#product_use_cron:checked").length > 0) { - $("#cron").attr("disabled", false); - } else { - $("#cron").attr("disabled", true); - } - }); - - $("#genereator_btn a").click(function(){ - $("#crontab_generator").slideToggle(function(){ - - if ($("#crontab_generator").css("display") == "none") { - $("#genereator_btn a").text("#{t("layout.products.cron_tab_generator.show")}"); - } else { - $("#genereator_btn a").text("#{t("layout.products.cron_tab_generator.hide")}"); - } - - }); - - return false; - }); +:javascript + $(function(){ + $(".chooser").click(function() { + var for_element = this.name.replace(/_chooser/,""); + $("#" + for_element).attr("disabled", (this.value !== "1")); }); - function getSelected(name) { - var chosen; + $(".cron").change(function() { + var minute, hour, day, month, weekday; - if ($("#" + name + "_chooser_every").attr("checked")) { - chosen = '*'; + minute = getSelected('minute'); + hour = getSelected('hour'); + day = getSelected('day'); + month = getSelected('month'); + weekday = getSelected('weekday'); + + $("#cron").attr("value", minute + " " + hour + " " + day + " " + month + " " + weekday); + + return false; + }); + + $("#product_use_cron").change(function(){ + if ($("#product_use_cron:checked").length > 0) { + $("#cron").attr("disabled", false); } else { - var all_selected = []; - - $("#" + name + " option:selected").each(function(i, ele) { all_selected.push($(ele).attr("value")); }); - - if (all_selected.length) { - chosen = all_selected.join(","); - } else { - chosen = '*'; - } + $("#cron").attr("disabled", true); } + }); - return chosen; + $("#genereator_btn a").click(function(){ + $("#crontab_generator").slideToggle(function(){ + + if ($("#crontab_generator").css("display") == "none") { + $("#genereator_btn a").text("#{t("layout.products.cron_tab_generator.show")}"); + } else { + $("#genereator_btn a").text("#{t("layout.products.cron_tab_generator.hide")}"); + } + + }); + + return false; + }); + }); + + function getSelected(name) { + var chosen; + + if ($("#" + name + "_chooser_every").attr("checked")) { + chosen = '*'; + } else { + var all_selected = []; + + $("#" + name + " option:selected").each(function(i, ele) { all_selected.push($(ele).attr("value")); }); + + if (all_selected.length) { + chosen = all_selected.join(","); + } else { + chosen = '*'; + } } + return chosen; + } + .group = form.check_box :use_cron diff --git a/app/views/repositories/_proj_list.html.haml b/app/views/repositories/_proj_list.html.haml index 64d8a5da8..1635b5a0c 100644 --- a/app/views/repositories/_proj_list.html.haml +++ b/app/views/repositories/_proj_list.html.haml @@ -16,6 +16,3 @@ %th.last   %tbody %br - -= content_for :javascripts do - = javascript_include_tag 'jquery.dataTables.min.js' diff --git a/app/views/wiki/_editor.html.haml b/app/views/wiki/_editor.html.haml index 1be8c1735..cf060ad30 100644 --- a/app/views/wiki/_editor.html.haml +++ b/app/views/wiki/_editor.html.haml @@ -39,8 +39,8 @@ = link_to t("layout.wiki.preview"), "javascript:void(0)", :id => "gollum-editor-preview", :class => "minibutton", :title => t("layout.wiki.preview_title"), :'data-url' => preview_project_wiki_index_path(@project) -- content_for :javascripts do - = javascript_include_tag 'gollum/editor/gollum.editor.js' - -- content_for :stylesheets do - = stylesheet_link_tag 'gollum/editor.css' +/ - content_for :javascripts do +/ = javascript_include_tag 'gollum/editor/gollum.editor.js' +/ +/ - content_for :stylesheets do +/ = stylesheet_link_tag 'gollum/editor.css' diff --git a/app/views/wiki/_gollum_includes.html.haml b/app/views/wiki/_gollum_includes.html.haml index 1e42e6d96..c3b2db1b7 100644 --- a/app/views/wiki/_gollum_includes.html.haml +++ b/app/views/wiki/_gollum_includes.html.haml @@ -1,5 +1,5 @@ -- content_for :javascripts do - = javascript_include_tag 'gollum/gollum.js', 'gollum/gollum.dialog.js', 'gollum/gollum.placeholder.js' - -- content_for :stylesheets do - = stylesheet_link_tag 'gollum/gollum.css', 'gollum/dialog.css', 'gollum/ie7.css', 'gollum/template.css' +/ - content_for :javascripts do +/ = javascript_include_tag 'gollum/gollum.js', 'gollum/gollum.dialog.js', 'gollum/gollum.placeholder.js' +/ +/ - content_for :stylesheets do +/ = stylesheet_link_tag 'gollum/gollum.css', 'gollum/dialog.css', 'gollum/ie7.css', 'gollum/template.css' diff --git a/config/application.rb b/config/application.rb index 22fd70342..7729c9f09 100644 --- a/config/application.rb +++ b/config/application.rb @@ -5,7 +5,12 @@ require 'rails/all' # If you have a Gemfile, require the gems listed there, including any gems # you've limited to :test, :development, or :production. -Bundler.require(:default, Rails.env) if defined?(Bundler) +if defined?(Bundler) + # If you precompile assets before deploying to production, use this line + Bundler.require *Rails.groups(:assets => %w(development test)) + # If you want your assets lazily compiled in production, use this line + # Bundler.require(:default, :assets, Rails.env) +end module Rosa class Application < Rails::Application @@ -42,5 +47,11 @@ module Rosa # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] + + # Enable the asset pipeline + config.assets.enabled = true + + # Version of your assets, change this if you want to expire all your assets + config.assets.version = '1.0' end end diff --git a/config/assets.yml b/config/assets.yml deleted file mode 100644 index 999046ee8..000000000 --- a/config/assets.yml +++ /dev/null @@ -1,16 +0,0 @@ -javascripts: - application: - - public/javascripts/application.js - - public/javascripts/drop_down_menu.js - -stylesheets: - application: - - public/stylesheets/web-app-theme/base.css - - public/stylesheets/web-app-theme/themes/default/style.css - - public/stylesheets/web-app-theme/override.css - - public/stylesheets/git/style.css - - sessions: - - public/stylesheets/web-app-theme/base.css - - public/stylesheets/web-app-theme/themes/default/style.css - - public/stylesheets/web-app-theme/override.css diff --git a/config/compass.rb b/config/compass.rb deleted file mode 100644 index d3fe0bb92..000000000 --- a/config/compass.rb +++ /dev/null @@ -1,16 +0,0 @@ -# -*- encoding : utf-8 -*- -# This configuration file works with both the Compass command line tool and within Rails. -# Require any additional compass plugins here. - -project_type = :rails -project_path = Compass::AppIntegration::Rails.root -environment = Compass::AppIntegration::Rails.env - -# Set this to the root of your project when deployed: -http_path = "/" -css_dir = "public/stylesheets/compiled" -sass_dir = "app/stylesheets" -javascripts_dir = "public/javascripts" - -http_stylesheets_path = "/stylesheets" -http_javascripts_path = "/javascripts" diff --git a/config/deploy.rb b/config/deploy.rb index c67c374a3..589fdc7dd 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,4 +1,5 @@ # -*- encoding : utf-8 -*- +$:.unshift File.expand_path('.') $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) set :rvm_type, :user @@ -28,9 +29,9 @@ set :scm, :git set :repository, "git@github.com:warpc/rosa-build.git" set :deploy_via, :remote_cache -require './lib/recipes/nginx' -require './lib/recipes/unicorn' -require './lib/recipes/bluepill' +require 'lib/recipes/nginx' +require 'lib/recipes/unicorn' +require 'lib/recipes/bluepill' namespace :deploy do task :stub_xml_rpc do diff --git a/config/environments/development.rb b/config/environments/development.rb index 3e4c691ae..66526d53c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -23,6 +23,18 @@ Rosa::Application.configure do # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin + + # Do not compress assets + config.assets.compress = false + + # Expands the lines which load the assets + config.assets.debug = true + + # Raise exception on mass assignment protection for Active Record models + config.active_record.mass_assignment_sanitizer = :strict + + # Log the query plan for queries taking more than this (works with SQLite, MySQL, and PostgreSQL) + config.active_record.auto_explain_threshold_in_seconds = 0.5 end require 'stub_xml_rpc' diff --git a/config/environments/production.rb b/config/environments/production.rb index fe08b9089..ae3430fbf 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -48,6 +48,15 @@ Rosa::Application.configure do # Send deprecation notices to registered listeners config.active_support.deprecation = :notify + + # Compress JavaScripts and CSS + config.assets.compress = true + + # Don't fallback to assets pipeline if a precompiled asset is missed + config.assets.compile = false + + # Generate digests for assets URLs + config.assets.digest = true end # require 'stub_xml_rpc' diff --git a/config/environments/test.rb b/config/environments/test.rb index 44f17a243..fac0c5e29 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -34,6 +34,13 @@ Rosa::Application.configure do # Print deprecation notices to the stderr config.active_support.deprecation = :stderr + + # Configure static asset server for tests with Cache-Control for performance + config.serve_static_assets = true + config.static_cache_control = "public, max-age=3600" + + # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets + config.assets.allow_debugging = true end require 'stub_xml_rpc' # TODO stub XML calls through stubbers diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 7f0e522af..8babbd620 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -1,12 +1,17 @@ en: errors: messages: + expired: "has expired, please request a new one" not_found: "not found" - already_confirmed: "was already confirmed" + already_confirmed: "was already confirmed, please try signing in" not_locked: "was not locked" + not_saved: + one: "1 error prohibited this %{resource} from being saved:" + other: "%{count} errors prohibited this %{resource} from being saved:" devise: failure: + already_authenticated: 'You are already signed in.' unauthenticated: 'You need to sign in or sign up before continuing.' unconfirmed: 'You have to confirm your account before continuing.' locked: 'Your account is locked.' @@ -20,23 +25,27 @@ en: passwords: send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.' updated: 'Your password was changed successfully. You are now signed in.' - button: 'Submit' - edit_button: 'Change my password' + updated_not_active: 'Your password was changed successfully.' + send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail" confirmations: send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.' + send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.' confirmed: 'Your account was successfully confirmed. You are now signed in.' registrations: - signed_up: 'You have signed up successfully. If enabled, a confirmation was sent to your e-mail.' + signed_up: 'Welcome! You have signed up successfully.' + signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.' + signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.' + signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.' updated: 'You updated your account successfully.' + update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address." destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.' - sign_up_header: 'Signup' - edit_password_description: Leave blank if you don't want to change it - current_password_description: 'We need your current password to confirm your changes' - cancel: 'Cancel my account' - cancel_confirmation: 'Are you sure?' unlocks: send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.' - unlocked: 'Your account was successfully unlocked. You are now signed in.' + unlocked: 'Your account has been unlocked successfully. Please sign in to continue.' + send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.' + omniauth_callbacks: + success: 'Successfully authorized from %{kind} account.' + failure: 'Could not authorize you from %{kind} because "%{reason}".' mailer: confirmation_instructions: subject: 'Confirmation instructions' diff --git a/config/locales/devise.ru.yml b/config/locales/devise.ru.yml index 154572a8d..3c6762372 100644 --- a/config/locales/devise.ru.yml +++ b/config/locales/devise.ru.yml @@ -1,7 +1,7 @@ ru: errors: messages: - expired: "устарела. Пожалуйста, запросите новую" + expired: "истекла, пожалуйста запросите новую" not_found: "не найдена" already_confirmed: "уже подтверждена. Пожалуйста, попробуйте войти в систему" not_locked: "не заблокирована" @@ -13,54 +13,42 @@ ru: devise: failure: - already_authenticated: "Вы уже вошли в систему." - unauthenticated: 'Вы должны войти или зарегистрироваться, прежде чем сможете продолжить.' - unconfirmed: 'Вы должны подтвердить вашу учетную запись, прежде чем сможете продолжить.' - locked: 'Ваша учетная запись заблокирована.' - invalid: 'Неверный пароль или адрес электронной почты.' - invalid_token: 'Неверный ключ аутентификации.' - timeout: 'Ваша сессия закончена. Пожалуйста, войдите еще раз, чтобы продолжить.' - inactive: 'Ваша учетная запись еще не активирована.' + already_authenticated: 'Вы уже вошли в систему.' + unauthenticated: "Вам необходимо войти в систему или зарегистрироваться." + unconfirmed: "Вы должны подтвердить вашу учётную запись." + locked: "Ваша учётная запись заблокирована." + invalid: "Неверный адрес e-mail или пароль." + invalid_token: "Неверный ключ аутентификации." + timeout: "Ваш сеанс закончился. Пожалуйста, войдите в систему снова." + inactive: "Ваша учётная запись ещё не активирована." sessions: - link: 'Войти' - signed_in: 'Вы вошли.' - signed_out: 'Вы вышли.' + signed_in: "Вход в систему выполнен." + signed_out: "Выход из системы выполнен." passwords: - link: 'Забыли пароль?' - button: 'Восстановить' - send_instructions: 'Вы получите письмо с инструкциями о том, как сбросить ваш пароль, через несколько минут.' - send_paranoid_instructions: "Если ваш адрес e-mail есть в нашей базе данных, то в течение нескольких минут вы получите письмо с инструкциями по восстановлению вашего пароля." - updated: 'Ваш пароль изменен. Теперь вы можете войти.' - edit: 'Изменение пароля' - edit_button: 'Изменить пароль' + send_instructions: "В течение нескольких минут вы получите e-mail с инструкциями по восстановлению вашего пароля." + updated: "Ваш пароль изменён. Теперь вы вошли в систему." + updated_not_active: 'Ваш пароль успешно изменён.' + send_paranoid_instructions: "Если Ваш e-mail существует, в течение нескольких минут вы получите e-mail с инструкциями по восстановлению вашего пароля." confirmations: - link: "Не получили инструкции для подтверждения учетной записи?" - send_instructions: 'Вы получите письмо с инструкциями о том, как подтвердить вашу учетную запись.' - send_paranoid_instructions: "Если ваш адрес e-mail есть в нашей базе данных, то в течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи." - confirmed: 'Ваша учетная запись успешно подтверждена. Добро пожаловать.' - resend_header: 'Повторная отправка инструкций для подтверждения учетной записи' - send: "Отправить" + send_instructions: "В течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи." + send_paranoid_instructions: 'Если Ваш e-mail существует, то в течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи.' + confirmed: "Ваша учётная запись подтверждена. Теперь вы вошли в систему." + error: "Неверный код подтверждения." registrations: - link: 'Регистрация' - signed_up: 'Вы успешно зарегистрировались.' - inactive_signed_up: "Добро пожаловать! Вы успешно зарегистрировались. Но пока вы не можете войти в систему, т.к. ваша учётная запись %{reason}." - updated: 'Ваша учетная запись изменена.' - destroyed: 'До свидания! Ваша учетная запись удалена. Надеемся вскоре снова вас увидеть.' - sign_up_header: 'Регистрация' - edit: 'Редактировать' - edit_password_description: 'Оставьте пароль пустым, если не хотите его менять' - current_password_description: 'Нам нужен ваш текущий пароль для подтверждения изменения' - cancel: 'Удалить' - cancel_confirmation: 'Вы уверены, что хотите удалить учетную запись?' + signed_up: "Добро пожаловать! Вы успешно зарегистрировались." + signed_up_but_unconfirmed: 'Сообщение для подтверждения учетной записи было отправлено на Ваш email. Пожалуйста откройте ссылку из письма для активации.' + signed_up_but_inactive: "Добро пожаловать! Вы успешно зарегистрировались. Но пока вы не можете войти в систему, т.к. ваша учётная запись не активированна." + signed_up_but_locked: 'Добро пожаловать! Вы успешно зарегистрировались. Но пока вы не можете войти в систему, т.к. ваша учётная запись заблокированна.' + updated: "Ваша учётная запись изменена." + update_needs_confirmation: "Вы успешно обновили свой аккаунт, но нам необходимо проверить Ваш новый email адрес. Пожалуйста проверьте Ваш email и кликните по ссылке чтобы подтвердить Ваш новый email адрес." + destroyed: "До свидания! Ваша учётная запись удалена. Надеемся снова увидеть вас." unlocks: - link: "Не получили инструкции для разблокировки учетной записи?" - send_instructions: 'Вы получите письмо с инструкциями о том, как разблокировать вашу учетную запись, через несколько минут.' - send_paranoid_instructions: "Если ваша учётная запись существует, то в течение нескольких минут вы получите письмо с инструкциями по её разблокировке." - unlocked: 'Ваша учетная запись разблокирована. Вы вошли.' + send_instructions: "В течение нескольких минут вы получите письмо с инструкциями по разблокировке вашей учётной записи." + unlocked: "Ваша учётная запись разблокирована. Теперь вы вошли в систему." + send_paranoid_instructions: 'Если ваша учетная запись существует, в течение нескольких минут вы получите письмо с инструкциями по разблокировке вашей учётной записи.' omniauth_callbacks: - register: "Аутентификация прошла успешно, но необходимо уточнить дополнительные данные" - success: "Вход в систему выполнен с учётной записью из %{kind}." - failure: "Вы не можете войти в систему с учётной записью из %{kind}, т.к. \"%{reason}\"." + success: 'Успешная авторизация через %{kind}.' + failure: 'Не возможно авторизоваться через %{kind}, т.к. "%{reason}".' mailer: confirmation_instructions: subject: "Инструкции по подтверждению учётной записи" diff --git a/config/locales/en.yml b/config/locales/en.yml index d864d5797..cbb84b4c2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -15,6 +15,7 @@ en: filtered_label: (filtered from _MAX_) layout: + search: Search logged_in_as: You logged as logout: Logout user_list: User list @@ -42,6 +43,7 @@ en: confirm: Sure? back: Back settings: + label: Settings notifier: Notifier setting notifiers: edit_header: Notifier setting @@ -84,23 +86,6 @@ en: time: ago: ago - menu: - categories: Catalogue - containers: Containers - downloads: Statistics - event_logs: Event log - build_lists: Task monitoring - groups: Groups - platforms: Platforms - products: Products - projects: Projects - repositories: Repositories - rights: Rights - roles: Roles - users: Users - personal_repository: My repository - auto_build_lists: Automated build - sessions: sign_in_header: Sign in @@ -366,6 +351,7 @@ en: confirm: Sure? back: Back settings: + label: Settings notifier: Notifier setting notifiers: edit_header: Notifier setting @@ -405,23 +391,6 @@ en: Saturday: Saturday Sunday: Sunday - menu: - categories: Catalogue - containers: Containers - downloads: Statistics - event_logs: Event log - build_lists: Task monitoring - groups: Groups - platforms: Platforms - products: Products - projects: Projects - repositories: Repositories - rights: Rights - roles: Roles - users: Users - personal_repository: My repository - auto_build_lists: Automated build - sessions: sign_in_header: Sign in @@ -506,7 +475,7 @@ en: clone: To clone event_logs: - list:List + list: List list_header: Event log repositories: diff --git a/config/locales/menu.en.yml b/config/locales/menu.en.yml new file mode 100644 index 000000000..4ebf69581 --- /dev/null +++ b/config/locales/menu.en.yml @@ -0,0 +1,21 @@ +en: + menu: + repositories: Repositories + personal_repository: My repository + products: Products + categories: Catalogue + auto_build_lists: Automated build + downloads: Statistics + top_menu: + platforms: Platforms + projects: Projects + build_lists: Task monitoring + users: Users + groups: Groups + event_logs: Event log + bottom_menu: + copyright: ROSA Lab © 2012 + about: About company + contacts: Contacts + tos: Terms Of Service + security: Security diff --git a/config/locales/menu.ru.yml b/config/locales/menu.ru.yml new file mode 100644 index 000000000..54933bdcb --- /dev/null +++ b/config/locales/menu.ru.yml @@ -0,0 +1,21 @@ +ru: + menu: + categories: Каталог + products: Продукты + repositories: Репозитории + personal_repository: Мой репозиторий + auto_build_lists: Авто. сборки + downloads: Статистика + top_menu: + platforms: Платформы + projects: Проекты + build_lists: Мониторинг задач + users: Пользователи + groups: Группы + event_logs: Лог событий + bottom_menu: + copyright: ROSA Лаб. © 2012 + about: О компании + contacts: Контакты + tos: Условия использования + security: Безопасность diff --git a/config/locales/ru.yml b/config/locales/ru.yml index c165f173a..f7702f2d7 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1,5 +1,4 @@ ru: - will_paginate: previous_label: ‹ Предыдущая next_label: Следующая › @@ -16,6 +15,7 @@ ru: filtered_label: (отфильтровано из _MAX_) layout: + search: Поиск logged_in_as: Вы вошли как logout: Выйти user_list: Список пользователей @@ -43,12 +43,13 @@ ru: confirm: Уверены? back: Назад settings: + label: 'Настройки' notifier: Настройки оповещений notifiers: edit_header: Настройки оповещений processing: Обрабатывается... invalid_content_type: имеет неверный тип - + devise: shared_links: sign_in: Войти @@ -85,23 +86,6 @@ ru: time: ago: назад - menu: - categories: Каталог - containers: Контейнеры - downloads: Статистика - event_logs: Лог событий - build_lists: Мониторинг задач - groups: Группы - platforms: Платформы - products: Продукты - projects: Проекты - repositories: Репозитории - rights: Права - roles: Роли - users: Пользователи - personal_repository: Мой репозиторий - auto_build_lists: Авто. сборки - sessions: sign_in_header: Вход в систему diff --git a/config/routes.rb b/config/routes.rb index c26020d1e..f03dcbf0c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,9 +3,10 @@ Rosa::Application.routes.draw do # XML RPC match 'api/xmlrpc' => 'rpc#xe_index' - devise_for :users, :controllers => {:omniauth_callbacks => 'users/omniauth_callbacks'} do + devise_scope :user do get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru' end + devise_for :users, :controllers => {:omniauth_callbacks => 'users/omniauth_callbacks'} resources :users do resources :groups, :only => [:new, :create, :index] diff --git a/db/migrate/20110309144736_devise_create_users.rb b/db/migrate/20110309144736_devise_create_users.rb index f4b2997e5..baee7dd05 100644 --- a/db/migrate/20110309144736_devise_create_users.rb +++ b/db/migrate/20110309144736_devise_create_users.rb @@ -3,12 +3,18 @@ class DeviseCreateUsers < ActiveRecord::Migration def self.up create_table(:users) do |t| t.string :name - t.database_authenticatable :null => false - t.recoverable - t.rememberable + + ## Database authenticatable + t.string :email, :null => false, :default => "" + t.string :encrypted_password, :null => false, :default => "" + ## Recoverable + t.string :reset_password_token + t.datetime :reset_password_sent_at + ## Rememberable + t.datetime :remember_created_at + t.timestamps end - add_index :users, :email, :unique => true add_index :users, :reset_password_token, :unique => true end diff --git a/db/migrate/20120201181421_add_queue_to_delayed_jobs.rb b/db/migrate/20120201181421_add_queue_to_delayed_jobs.rb new file mode 100644 index 000000000..072c8d40c --- /dev/null +++ b/db/migrate/20120201181421_add_queue_to_delayed_jobs.rb @@ -0,0 +1,9 @@ +class AddQueueToDelayedJobs < ActiveRecord::Migration + def self.up + add_column :delayed_jobs, :queue, :string + end + + def self.down + remove_column :delayed_jobs, :queue + end +end diff --git a/db/migrate/20120202154114_upgrade_devise.rb b/db/migrate/20120202154114_upgrade_devise.rb new file mode 100644 index 000000000..225d601e4 --- /dev/null +++ b/db/migrate/20120202154114_upgrade_devise.rb @@ -0,0 +1,12 @@ +# -*- encoding : utf-8 -*- +class UpgradeDevise < ActiveRecord::Migration + def up + remove_column :users, :remember_token if User.column_names.include?('remember_token') + add_column :users, :reset_password_sent_at, :datetime unless User.column_names.include?('reset_password_sent_at') + end + + def down + remove_column :users, :reset_password_sent_at if User.column_names.include?('reset_password_sent_at') + add_column :users, :remember_token, :string unless User.column_names.include?('remember_token') + end +end diff --git a/db/migrate/20120206225130_change_commentable_id_to_decimal.rb b/db/migrate/20120206225130_change_commentable_id_to_decimal.rb new file mode 100644 index 000000000..799e1f8d9 --- /dev/null +++ b/db/migrate/20120206225130_change_commentable_id_to_decimal.rb @@ -0,0 +1,17 @@ +class ChangeCommentableIdToDecimal < ActiveRecord::Migration + def up + add_column :comments, :commentable_id_tmp, :decimal, :precision => 50, :scale => 0 + Comment.reset_column_information + Comment.all.each {|c| c.update_column :commentable_id_tmp, (c.commentable_type == 'Grit::Commit' ? c.commentable_id.hex : c.commentable_id.to_i)} + remove_column :comments, :commentable_id + rename_column :comments, :commentable_id_tmp, :commentable_id + end + + def down + add_column :comments, :commentable_id_tmp, :string + Comment.reset_column_information + Comment.all.each {|c| c.update_column :commentable_id_tmp, (c.commentable_type == 'Grit::Commit' ? c.commentable_id.to_s(16) : c.commentable_id.to_s)} + remove_column :comments, :commentable_id + rename_column :comments, :commentable_id_tmp, :commentable_id + end +end diff --git a/db/schema.rb b/db/schema.rb index ad2ca6d65..77c34afd6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,12 +11,12 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120131124517) do +ActiveRecord::Schema.define(:version => 20120206225130) do create_table "arches", :force => true do |t| t.string "name", :null => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "arches", ["name"], :name => "index_arches_on_name", :unique => true @@ -25,8 +25,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "user_id" t.string "provider" t.string "uid" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "authentications", ["provider", "uid"], :name => "index_authentications_on_provider_and_uid", :unique => true @@ -37,8 +37,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "arch_id" t.integer "pl_id" t.integer "bpl_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "build_list_items", :force => true do |t| @@ -46,8 +46,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "level" t.integer "status" t.integer "build_list_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "version" end @@ -61,8 +61,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "project_id" t.integer "arch_id" t.datetime "notified_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.boolean "is_circle", :default => false t.text "additional_repos" t.string "name" @@ -85,25 +85,25 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "name" t.string "ancestry" t.integer "projects_count", :default => 0, :null => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "comments", :force => true do |t| - t.string "commentable_id" t.string "commentable_type" t.integer "user_id" t.text "body" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.decimal "commentable_id", :precision => 50, :scale => 0 end create_table "containers", :force => true do |t| t.string "name", :null => false t.integer "project_id", :null => false t.integer "owner_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "delayed_jobs", :force => true do |t| @@ -115,8 +115,9 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.datetime "locked_at" t.datetime "failed_at" t.string "locked_by" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "queue" end add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" @@ -127,8 +128,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "distro" t.string "platform" t.integer "counter", :default => 0 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "event_logs", :force => true do |t| @@ -143,15 +144,15 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "controller" t.string "action" t.text "message" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "groups", :force => true do |t| t.string "name" t.integer "owner_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "uname" t.integer "own_projects_count", :default => 0, :null => false end @@ -163,8 +164,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "title" t.text "body" t.string "status", :default => "open" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "issues", ["project_id", "serial_id"], :name => "index_issues_on_project_id_and_serial_id", :unique => true @@ -173,8 +174,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "description" t.string "name" t.integer "parent_platform_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.boolean "released", :default => false t.integer "owner_id" t.string "owner_type" @@ -187,8 +188,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "platform_id" t.string "login" t.string "password" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "user_id" end @@ -196,8 +197,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "product_id" t.integer "status", :default => 2, :null => false t.datetime "notified_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "product_build_lists", ["product_id"], :name => "index_product_build_lists_on_product_id" @@ -207,8 +208,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.integer "platform_id", :null => false t.integer "build_status", :default => 2, :null => false t.string "build_path" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.text "build_script" t.text "counter" t.text "ks" @@ -228,8 +229,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "name" t.string "version" t.datetime "file_mtime" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "platform_id" end @@ -238,14 +239,14 @@ ActiveRecord::Schema.define(:version => 20120131124517) do create_table "project_to_repositories", :force => true do |t| t.integer "project_id" t.integer "repository_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "projects", :force => true do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "owner_id" t.string "owner_type" t.string "visibility", :default => "open" @@ -268,16 +269,16 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "object_type" t.integer "target_id" t.string "target_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "role" end create_table "repositories", :force => true do |t| t.string "description", :null => false t.integer "platform_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "name", :null => false t.integer "owner_id" t.string "owner_type" @@ -287,8 +288,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "name", :null => false t.integer "arch_id", :null => false t.integer "project_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "rpms", ["project_id", "arch_id"], :name => "index_rpms_on_project_id_and_arch_id" @@ -301,8 +302,8 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.boolean "new_comment_reply", :default => true t.boolean "new_issue", :default => true t.boolean "issue_assign", :default => true - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.boolean "new_comment_commit_owner", :default => true t.boolean "new_comment_commit_repo_owner", :default => true t.boolean "new_comment_commit_commentor", :default => true @@ -312,27 +313,26 @@ ActiveRecord::Schema.define(:version => 20120131124517) do t.string "subscribeable_id" t.string "subscribeable_type" t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.boolean "status", :default => true t.integer "project_id" end create_table "users", :force => true do |t| t.string "name" - t.string "email", :default => "", :null => false - t.string "encrypted_password", :limit => 128, :default => "", :null => false - t.string "password_salt", :default => "", :null => false + t.string "email", :default => "", :null => false + t.string "encrypted_password", :default => "", :null => false t.string "reset_password_token" - t.string "remember_token" + t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.text "ssh_key" t.string "uname" t.string "role" - t.string "language", :default => "en" - t.integer "own_projects_count", :default => 0, :null => false + t.string "language", :default => "en" + t.integer "own_projects_count", :default => 0, :null => false end add_index "users", ["email"], :name => "index_users_on_email", :unique => true diff --git a/doc/design/abf-admin-build-project.html b/doc/design/abf-admin-build-project.html new file mode 100644 index 000000000..9b26449e7 --- /dev/null +++ b/doc/design/abf-admin-build-project.html @@ -0,0 +1,261 @@ + + + + + Сборочная среда + + + + + + + + + + + + +
+ +
+
+
+
+ + + + + +
+ + + +
+ avatar +
+ + +
+
+ + + +
+ +
+
+
+
+
+
+ + +
+
+ + +
+
+

Version

+
+ +
+

Platform

+
+ +
+
+ mandriva2011 +
+
+
+ +
+
+ naulinux +
+
+
+ +
+
+ NauLinux_Nau57 +
+
+
+ +
+
+ mandriva_official_repos1 +
+
+

Update type

+
+ +
+

Preferences

+
+ +
+
+ Automated publishing +
+
+
+ +
+
+ Dependable build requires +
+
+
+ Начать сборку +
+
+

Architecture

+
+ +
+
+ i386 +
+
+
+ +
+
+ i586 +
+
+
+ +
+
+ x86-64 +
+
+

Packet list repository

+
+ +
+

Includes repository

+
+ +
+
+ main +
+
+
+ +
+ + + + + + + \ No newline at end of file diff --git a/doc/design/abf-admin-main.html b/doc/design/abf-admin-main.html new file mode 100644 index 000000000..0a2d3215b --- /dev/null +++ b/doc/design/abf-admin-main.html @@ -0,0 +1,246 @@ + + + + + Сборочная среда + + + + + + + + + + + +
+ +
+
+
+
+ + + + + +
+ + + +
+ avatar +
+ + +
+
+ + + +
+ +
+
+
+
+
+
+ + +
+
+ + +
+ + + +
+
+ Описание проекта: +
+ +
+ +
+ +
+ +
+ Видимость проекта: +
+ +
+ public Публичный private Приватный +
+ +
+ +
+ Ветка по умолчанию: +
+ +
+
+ +
+
+ +
+ +
+   +
+ +
+
+ +
+
+ Проект является пакетом +
+
+
+ +
+ +
+   +
+ + + +
+ +
+ +
+ Внимание! Удаленный проект восстановлению не подлежит. +
+ + + +
+
+ +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/doc/design/abf-admin-members.html b/doc/design/abf-admin-members.html new file mode 100644 index 000000000..1bc9aa218 --- /dev/null +++ b/doc/design/abf-admin-members.html @@ -0,0 +1,296 @@ + + + + + Сборочная среда + + + + + + + + + + + + + +
+ +
+
+
+
+ + + + + +
+ + + +
+ avatar +
+ + +
+
+ + + +
+ +
+
+
+
+
+
+ + +
+
+ + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+   + + Участники + + Роли +
+ + +
miki (Mike Shane)
+
+
читатель
+
+
писатель
+
+
администратор
+
+ + +
vitko (Виталий Усупов)
+
+
читатель
+
+
писатель
+
+
администратор
+
+ + +
miha (Михаил Буданов)
+
+
читатель
+
+
писатель
+
+
администратор
+
+ + +
jeni (Jane Conzi)
+
+
читатель
+
+
писатель
+
+
администратор
+
+ + Удалить + +
+ +
+
+ +
+
+ +
+
+ +
+ + Сохранить + + +
+
+ +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/doc/design/abf-admin-sections.html b/doc/design/abf-admin-sections.html new file mode 100644 index 000000000..a25b02b85 --- /dev/null +++ b/doc/design/abf-admin-sections.html @@ -0,0 +1,203 @@ + + + + + Сборочная среда + + + + + + + +
+ +
+
+
+
+ + + + + +
+ + + +
+ avatar +
+ + +
+
+ + + +
+ +
+
+
+
+
+
+ + +
+
+ + +
+ + + +
+ +
+ +
+ +
+ Трекер
+ + GitHub Issues adds lightweight issue tracking tightly integrated with your repository. + Add issues to milestones, label issues, and close & reference issues from commit messages. + +
+ +
+ +
+ +
+ +
+ Wiki
+ + GitHub Wikis are the simplest way to let others contribute content. Any GitHub user +can create and edit pages to use for documentation, examples, support or anything +you wish. + +
+ +
+ + + +
+
+ +
+
+ +
+ + + + \ No newline at end of file diff --git a/doc/design/abf-commits-history.html b/doc/design/abf-commits-history.html new file mode 100644 index 000000000..7f94494c6 --- /dev/null +++ b/doc/design/abf-commits-history.html @@ -0,0 +1,441 @@ + + + + + Сборочная среда + + + + + + + + + +
+ +
+
+
+
+ + + + + +
+ + + +
+ avatar +
+ + +
+
+ + + +
+ +
+
+
+
+
+
+ + +
+
+ + +
+
+
+ +
+
+

Текущая ветка:

+
+
+ + + + + + + +
+
+ 05
января +
+
+
+
+
+ avatar +
+
+ Mike Shane
+ сегодня в 11:45
+ Merge pull request #112 from snigipigi/issues expand +
+
+
+
+ Наша команда благодарит вас за то, что решили уделить нашему продукту немного внимания. Наша сборочная среда предоставляет широкий спектр возможностей как для личного использования, так и для бизнеса. Нам бы хотелось немного подробнее узнать о вас, поэтому, в удобное для вас время, заполните ваш профиль. +

+ Также вы можете познакомиться с подробной документацией, включающей в себя не только описание с картинками, но и видеоуроки. +

+ Если вы разработчик, то советуем заглянуть в раздел для разработчиков.
+ Если вы мейнтейнер, то советуем заглянуть в раздел для мейнтейнеров.
+
+
+
+
+
+ code +
+
+ 1245ef48 +
+
+ +
+
+
+
+ + +
+
+
+ avatar +
+
+ Mike Shane
+ сегодня в 11:45
+ Merge pull request #112 from snigipigi/issues expand +
+
+
+
+ Наша команда благодарит вас за то, что решили уделить нашему продукту немного внимания. Наша сборочная среда предоставляет широкий спектр возможностей как для личного использования, так и для бизнеса. Нам бы хотелось немного подробнее узнать о вас, поэтому, в удобное для вас время, заполните ваш профиль. +

+ Также вы можете познакомиться с подробной документацией, включающей в себя не только описание с картинками, но и видеоуроки. +

+ Если вы разработчик, то советуем заглянуть в раздел для разработчиков.
+ Если вы мейнтейнер, то советуем заглянуть в раздел для мейнтейнеров.
+
+
+
+
+
+ code +
+
+ 1245ef48 +
+
+ +
+
+
+
+ + + + +
+
+
+ avatar +
+
+ Mike Shane
+ сегодня в 11:45
+ Merge pull request #112 from snigipigi/issues expand +
+
+
+
+ Наша команда благодарит вас за то, что решили уделить нашему продукту немного внимания. Наша сборочная среда предоставляет широкий спектр возможностей как для личного использования, так и для бизнеса. Нам бы хотелось немного подробнее узнать о вас, поэтому, в удобное для вас время, заполните ваш профиль. +

+ Также вы можете познакомиться с подробной документацией, включающей в себя не только описание с картинками, но и видеоуроки. +

+ Если вы разработчик, то советуем заглянуть в раздел для разработчиков.
+ Если вы мейнтейнер, то советуем заглянуть в раздел для мейнтейнеров.
+
+
+
+
+
+ code +
+
+ 1245ef48 +
+
+ +
+
+
+
+ + + +
+
+
+
+ + + +
+

2011 год

+
+ + + +
+
+ 26
декабря +
+
+
+
+
+ avatar +
+
+ Mike Shane
+ сегодня в 11:45
+ Merge pull request #112 from snigipigi/issues expand +
+
+
+
+ Наша команда благодарит вас за то, что решили уделить нашему продукту немного внимания. Наша сборочная среда предоставляет широкий спектр возможностей как для личного использования, так и для бизнеса. Нам бы хотелось немного подробнее узнать о вас, поэтому, в удобное для вас время, заполните ваш профиль. +

+ Также вы можете познакомиться с подробной документацией, включающей в себя не только описание с картинками, но и видеоуроки. +

+ Если вы разработчик, то советуем заглянуть в раздел для разработчиков.
+ Если вы мейнтейнер, то советуем заглянуть в раздел для мейнтейнеров.
+
+
+
+
+
+ code +
+
+ 1245ef48 +
+
+ +
+
+
+
+ + +
+
+
+ avatar +
+
+ Mike Shane
+ сегодня в 11:45
+ Merge pull request #112 from snigipigi/issues expand +
+
+
+
+ Наша команда благодарит вас за то, что решили уделить нашему продукту немного внимания. Наша сборочная среда предоставляет широкий спектр возможностей как для личного использования, так и для бизнеса. Нам бы хотелось немного подробнее узнать о вас, поэтому, в удобное для вас время, заполните ваш профиль. +

+ Также вы можете познакомиться с подробной документацией, включающей в себя не только описание с картинками, но и видеоуроки. +

+ Если вы разработчик, то советуем заглянуть в раздел для разработчиков.
+ Если вы мейнтейнер, то советуем заглянуть в раздел для мейнтейнеров.
+
+
+
+
+
+ code +
+
+ 1245ef48 +
+
+ +
+
+
+
+ + + + +
+
+
+ avatar +
+
+ Mike Shane
+ сегодня в 11:45
+ Merge pull request #112 from snigipigi/issues expand +
+
+
+
+ Наша команда благодарит вас за то, что решили уделить нашему продукту немного внимания. Наша сборочная среда предоставляет широкий спектр возможностей как для личного использования, так и для бизнеса. Нам бы хотелось немного подробнее узнать о вас, поэтому, в удобное для вас время, заполните ваш профиль. +

+ Также вы можете познакомиться с подробной документацией, включающей в себя не только описание с картинками, но и видеоуроки. +

+ Если вы разработчик, то советуем заглянуть в раздел для разработчиков.
+ Если вы мейнтейнер, то советуем заглянуть в раздел для мейнтейнеров.
+
+
+
+
+
+ code +
+
+ 1245ef48 +
+
+ +
+
+
+
+ + + +
+
+
+
+ + + + + +
+
+ +
+ + + + \ No newline at end of file diff --git a/doc/design/abf-index.html b/doc/design/abf-index.html new file mode 100644 index 000000000..5fdc16c04 --- /dev/null +++ b/doc/design/abf-index.html @@ -0,0 +1,402 @@ + + + + + Сборочная среда + + + + + + +
+ +
+
+
+
+ + + + + +
+ + + +
+ avatar +
+ + +
+
+ + + +
+ +
+
+
+
+
+
+ + +
+
+ + +
+ + + +
+

Лента активности

+
+

expand 2 новых сообщения

+
+ + + +
+
+
+ avatar +
+
+ Mike Shane внес изменения в проект gsapronov/ROSA-Jabber
+ сегодня в 11:45
+ Merge pull request #112 from snigipigi/issues expand +
+ +
+
+ +
+ +
+ Наша команда благодарит вас за то, что решили уделить нашему продукту немного внимания. Наша сборочная среда предоставляет широкий спектр возможностей как для личного использования, так и для бизнеса. Нам бы хотелось немного подробнее узнать о вас, поэтому, в удобное для вас время, заполните ваш профиль. +

+ Также вы можете познакомиться с подробной документацией, включающей в себя не только описание с картинками, но и видеоуроки. +

+ Если вы разработчик, то советуем заглянуть в раздел для разработчиков.
+ Если вы мейнтейнер, то советуем заглянуть в раздел для мейнтейнеров.
+
+ +
+ +
+
+
+ avatar +
+
+ ROSA ABF Team
+ сегодня в 10:45
+ Добро пожаловать! +
+ +
+
+ +
+ +
+ Наша команда благодарит вас за то, что решили уделить нашему продукту немного внимания. Наша сборочная среда предоставляет широкий спектр возможностей как для личного использования, так и для бизнеса. Нам бы хотелось немного подробнее узнать о вас, поэтому, в удобное для вас время, заполните ваш профиль. +

+ Также вы можете познакомиться с подробной документацией, включающей в себя не только описание с картинками, но и видеоуроки. +

+ Если вы разработчик, то советуем заглянуть в раздел для разработчиков.
+ Если вы мейнтейнер, то советуем заглянуть в раздел для мейнтейнеров.
+
+
+ + + +
+

Загрузить сообщения

+
+ +
+ +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/doc/design/abf-my projects.html b/doc/design/abf-my projects.html new file mode 100644 index 000000000..5f8793230 --- /dev/null +++ b/doc/design/abf-my projects.html @@ -0,0 +1,179 @@ + + + + + Сборочная среда + + + + + + + + + + +
+ +
+
+
+
+ + + + + +
+ + + +
+ avatar +
+ + +
+
+ + + +
+ +
+
+
+
+
+
+ +
+
+ + +
+ +
+ Создать проект + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ПроектОписание проектаРоль в проектеПокинуть проект
unlock
gsapronov/ROSA-Jabber
Проект создан для разработки интернет-пейджера, с простым +пользовательским интерфейсом и поддержкой социальных сетей.Чтениеdelete
lock
santaux/WacomDrivers
Мы пытаемся доработать драйвера для полноценной работы +дигитайзеров Wacom.Записьdelete
unlock
snigipini/Gimp-Extensions
Растровому редактору не хватает большого количества +функционала и расширений, которые позволили бы ему решать...Записьdelete
lock
pinovd/Rosa_Media_Player
Под OS ROSA отсутствует нормальный простой интуитивно +понятный видеопроигрыватель.Администраторdelete
lock
gsapronov/Inkscape-Plugins
У векторного редактора ощущается острая нехватка плагинов для +работы.Администраторdelete
+
+ +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/doc/design/js/admin-members.js b/doc/design/js/admin-members.js new file mode 100644 index 000000000..cef30a9e3 --- /dev/null +++ b/doc/design/js/admin-members.js @@ -0,0 +1,14 @@ +function deleteAdminMember() { + if (document.getElementById("niceCheckbox1-1").checked == true) { + $("#admin-table-members-row1").fadeOut("slow"); + } + if (document.getElementById("niceCheckbox2-1").checked == true) { + $("#admin-table-members-row2").fadeOut("slow"); + } + if (document.getElementById("niceCheckbox3-1").checked == true) { + $("#admin-table-members-row3").fadeOut("slow"); + } + if (document.getElementById("niceCheckbox4-1").checked == true) { + $("#admin-table-members-row4").fadeOut("slow"); + } +} \ No newline at end of file diff --git a/doc/design/js/all.js b/doc/design/js/all.js new file mode 100644 index 000000000..4c8eb5e96 --- /dev/null +++ b/doc/design/js/all.js @@ -0,0 +1,42 @@ +var state = 0; + +function droplist() { + if (state == 0) { + $("#droplist").slideToggle("slow"); + //borderDown(); + state = 1; + } +} + +function loadMessages() { + $("#messages-new").fadeOut("slow"); + $("#new-messages").delay(700).fadeIn("slow"); + //setTimeout(border1, 700) +} +function loadOldMessages() { + $("#old-messages").fadeIn("slow"); + //setTimeout(border1, 700) +} + + +$(document).click(function() { + var dl = $("#droplist").css("height"); + var dl2 = $("#droplist").css("display"); + if ((dl2 == "block")&&(dl == "91px")) { + state = 0; + droplist(); + state = 0; + } +}); + +function showActivity(elem) { + //borderDown(); + $("#activity-bottom"+elem).slideToggle("slow"); + var img = $("#expand" + elem).attr("src"); + if (img == "pics/expand-gray.png") { + $("#expand" + elem).attr("src","pics/expand-gray2.png"); + } else { + $("#expand" + elem).attr("src","pics/expand-gray.png"); + } + //setTimeout(border1, 700) +} \ No newline at end of file diff --git a/doc/design/js/checkbox-main.js b/doc/design/js/checkbox-main.js new file mode 100644 index 000000000..2c3a8c48c --- /dev/null +++ b/doc/design/js/checkbox-main.js @@ -0,0 +1,47 @@ +function changeCheck(el) +/* + + el - span + input - +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + + if(input.checked) + { + el.style.backgroundPosition="0 0"; + input.checked=false; + } + else + { + el.style.backgroundPosition="0 -18px"; + input.checked=true; + } + return true; +} +function startChangeCheck(el) +/* + on, +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + if(input.checked) + { + el.style.backgroundPosition="0 -18px"; + } + return true; +} + +function startCheck() +{ + /* + . + , id + */ + startChangeCheck(document.getElementById("niceCheckbox1")); + startChangeCheck(document.getElementById("niceCheckbox2")); + startChangeCheck(document.getElementById("niceCheckbox3")); + startChangeCheck(document.getElementById("niceCheckbox4")); +} \ No newline at end of file diff --git a/doc/design/js/checkbox.js b/doc/design/js/checkbox.js new file mode 100644 index 000000000..45c2ec45f --- /dev/null +++ b/doc/design/js/checkbox.js @@ -0,0 +1,44 @@ +function changeCheck(el) +/* + + el - span + input - +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + + if(input.checked) + { + el.style.backgroundPosition="0 0"; + input.checked=false; + } + else + { + el.style.backgroundPosition="0 -17px"; + input.checked=true; + } + return true; +} +function startChangeCheck(el) +/* + on, +*/ +{ + var el = el, + input = el.getElementsByTagName("input")[0]; + if(input.checked) + { + el.style.backgroundPosition="0 -17px"; + } + return true; +} + +function startCheck() +{ + /* + . + , id + */ + startChangeCheck(document.getElementById("niceCheckbox1")); +} \ No newline at end of file diff --git a/doc/design/js/cusel-2.5.js b/doc/design/js/cusel-2.5.js new file mode 100644 index 000000000..07cae4b05 --- /dev/null +++ b/doc/design/js/cusel-2.5.js @@ -0,0 +1,506 @@ +/* ------------------------------------- + + cusel version 2.5 + last update: 31.10.11 + смена обычного селект на стильный + autor: Evgen Ryzhkov + updates by: + - Alexey Choporov + - Roman Omelkovitch + using libs: + - jScrollPane + - mousewheel + www.xiper.net +----------------------------------------*/ +function cuSel(params) { + + jQuery(params.changedEl).each( + function(num) + { + var chEl = jQuery(this), + chElWid = chEl.outerWidth(), // ширина селекта + chElClass = chEl.prop("class"), // класс селекта + chElId = chEl.prop("id"), // id + chElName = chEl.prop("name"), // имя + defaultVal = chEl.val(), // начальное значение + activeOpt = chEl.find("option[value='"+defaultVal+"']").eq(0), + defaultText = activeOpt.text(), // начальный текст + disabledSel = chEl.prop("disabled"), // заблокирован ли селект + scrollArrows = params.scrollArrows, + chElOnChange = chEl.prop("onchange"), + chElTab = chEl.prop("tabindex"), + chElMultiple = chEl.prop("multiple"); + + if(!chElId || chElMultiple) return false; // не стилизируем селект если не задан id + + if(!disabledSel) + { + classDisCuselText = "", // для отслеживания клика по задизайбленному селекту + classDisCusel=""; // для оформления задизейбленного селекта + } + else + { + classDisCuselText = "classDisCuselLabel"; + classDisCusel="classDisCusel"; + } + + if(scrollArrows) + { + classDisCusel+=" cuselScrollArrows"; + } + + activeOpt.addClass("cuselActive"); // активному оптиону сразу добавляем класс для подсветки + + var optionStr = chEl.html(), // список оптионов + + + /* + делаем замену тегов option на span, полностью сохраняя начальную конструкцию + */ + + spanStr = optionStr.replace(/option/ig,"span").replace(/value=/ig,"val="); // value меняем на val, т.к. jquery отказывается воспринимать value у span + + /* + для IE проставляем кавычки для значений, т.к. html() возращает код без кавычек + что произошла корректная обработка value должно быть последний атрибутом option, + например + */ + if($.browser.msie && parseInt($.browser.version) < 9) + { + var pattern = /(val=)(.*?)(>)/g; + spanStr = spanStr.replace(pattern, "$1'$2'$3"); + } + + + /* каркас стильного селекта */ + var cuselFrame = '
'+ + '
'+ + '
'+defaultText+'
'+ + '
'+ + spanStr+ + '
'+ + ''+ + '
'; + + + /* удаляем обычный селект, на его место вставляем стильный */ + chEl.replaceWith(cuselFrame); + + /* если был поцеплен onchange - цепляем его полю */ + if(chElOnChange) jQuery("#"+chElId).bind('change',chElOnChange); + + + /* + устаналиваем высоту выпадающих списков основываясь на числе видимых позиций и высоты одной позиции + при чем только тем, у которых число оптионов больше числа заданного числа видимых + */ + var newSel = jQuery("#cuselFrame-"+chElId), + arrSpan = newSel.find("span"), + defaultHeight; + + if(!arrSpan.eq(0).text()) + { + defaultHeight = arrSpan.eq(1).innerHeight(); + arrSpan.eq(0).css("height", arrSpan.eq(1).height()); + } + else + { + defaultHeight = arrSpan.eq(0).innerHeight(); + } + + + if(arrSpan.length>params.visRows) + { + newSel.find(".cusel-scroll-wrap").eq(0) + .css({height: defaultHeight*params.visRows+"px", display : "none", visibility: "visible" }) + .children(".cusel-scroll-pane").css("height",defaultHeight*params.visRows+"px"); + } + else + { + newSel.find(".cusel-scroll-wrap").eq(0) + .css({display : "none", visibility: "visible" }); + } + + /* вставляем в оптионы дополнительные теги */ + + var arrAddTags = jQuery("#cusel-scroll-"+chElId).find("span[addTags]"), + lenAddTags = arrAddTags.length; + + for(i=0;iparams.visRows) + { + refreshScroll + .css({height: defaultHeight*params.visRows+"px", display : "none", visibility: "visible" }) + .children(".cusel-scroll-pane").css("height",defaultHeight*params.visRows+"px"); + } + else + { + refreshScroll + .css({display : "none", visibility: "visible" }); + } + } + +} +/* + фукция раскрытия/скрытия списка +*/ +function cuselShowList(cuselWrap) +{ + var cuselMain = cuselWrap.parent(".cusel"); + + /* если выпадающее меню скрыто - показываем */ + if(cuselWrap.css("display")=="none") + { + $(".cusel-scroll-wrap").css("display","none"); + + cuselMain.addClass("cuselOpen"); + cuselWrap.css("display","block"); + var cuselArrows = false; + if(cuselMain.prop("class").indexOf("cuselScrollArrows")!=-1) cuselArrows=true; + if(!cuselWrap.find(".jScrollPaneContainer").eq(0).is("div")) + { + cuselWrap.find("div").eq(0).jScrollPaneCusel({showArrows:cuselArrows}); + } + + /* прокручиваем к текущему оптиону */ + cuselScrollToCurent(cuselWrap); + } + else + { + cuselWrap.css("display","none"); + cuselMain.removeClass("cuselOpen"); + } +} + + +/* + функция прокрутки к текущему элементу +*/ +function cuselScrollToCurent(cuselWrap) +{ + var cuselScrollEl = null; + if(cuselWrap.find(".cuselOptHover").eq(0).is("span")) cuselScrollEl = cuselWrap.find(".cuselOptHover").eq(0); + else if(cuselWrap.find(".cuselActive").eq(0).is("span")) cuselScrollEl = cuselWrap.find(".cuselActive").eq(0); + + if(cuselWrap.find(".jScrollPaneTrack").eq(0).is("div") && cuselScrollEl) + { + + var posCurrentOpt = cuselScrollEl.position(), + idScrollWrap = cuselWrap.find(".cusel-scroll-pane").eq(0).attr("id"); + + jQuery("#"+idScrollWrap)[0].scrollTo(posCurrentOpt.top); + + } +} diff --git a/doc/design/js/cusel-init.js b/doc/design/js/cusel-init.js new file mode 100644 index 000000000..04a7f7093 --- /dev/null +++ b/doc/design/js/cusel-init.js @@ -0,0 +1,11 @@ +jQuery(document).ready(function(){ + +var params = { + changedEl: ".lineForm select", + visRows: 999999, + scrollArrows: false + } + + cuSel(params); + +}); \ No newline at end of file diff --git a/doc/design/js/html5shiv.js b/doc/design/js/html5shiv.js new file mode 100644 index 000000000..abd599852 --- /dev/null +++ b/doc/design/js/html5shiv.js @@ -0,0 +1,200 @@ +/*! HTML5 Shiv v3.3RC1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */ +;(function(window, document) { + + /** Preset options */ + var options = window.html5 || {}; + + /** Used to skip problem elements */ + var reSkip = /^<|^(?:button|iframe|input|script|textarea)$/i; + + /** Detect whether the browser supports default html5 styles */ + var supportsHtml5Styles; + + /** Detect whether the browser supports unknown elements */ + var supportsUnknownElements; + + (function() { + var fake, + a = document.createElement('a'), + compStyle = window.getComputedStyle, + docEl = document.documentElement, + body = document.body || (fake = docEl.insertBefore(document.createElement('body'), docEl.firstChild)); + + body.insertBefore(a, body.firstChild); + a.hidden = true; + a.innerHTML = ''; + + supportsHtml5Styles = (a.currentStyle || compStyle(a, null)).display == 'none'; + supportsUnknownElements = a.childNodes.length == 1 || (function() { + // assign a false positive if unable to shiv + try { + (document.createElement)('a'); + } catch(e) { + return true; + } + var frag = document.createDocumentFragment(); + return ( + typeof frag.cloneNode == 'undefined' || + typeof frag.createDocumentFragment == 'undefined' || + typeof frag.createElement == 'undefined' + ); + }()); + + body.removeChild(a); + fake && docEl.removeChild(fake); + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a style sheet with the given CSS text and adds it to the document. + * @private + * @param {Document} ownerDocument The document. + * @param {String} cssText The CSS text. + * @returns {StyleSheet} The style element. + */ + function addStyleSheet(ownerDocument, cssText) { + var p = ownerDocument.createElement('p'), + parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; + + p.innerHTML = 'x'; + return parent.insertBefore(p.lastChild, parent.firstChild); + } + + /** + * Returns the value of `html5.elements` as an array. + * @private + * @returns {Array} An array of shived element node names. + */ + function getElements() { + var elements = html5.elements; + return typeof elements == 'string' ? elements.split(' ') : elements; + } + + /** + * Shivs the `createElement` and `createDocumentFragment` methods of the document. + * @private + * @param {Document|DocumentFragment} ownerDocument The document. + */ + function shivMethods(ownerDocument) { + var nodeName, + cache = {}, + docCreateElement = ownerDocument.createElement, + docCreateFragment = ownerDocument.createDocumentFragment, + elements = getElements(), + frag = docCreateFragment(), + index = elements.length; + + function createDocumentFragment() { + var node = frag.cloneNode(false); + return html5.shivMethods ? (shivMethods(node), node) : node; + } + + function createElement(nodeName) { + // avoid shiving elements like button, iframe, input, and textarea + // because IE < 9 cannot set the `name` or `type` attributes of an + // element once it's inserted into a document + var node = (cache[nodeName] || (cache[nodeName] = docCreateElement(nodeName))).cloneNode(false); + return html5.shivMethods && !reSkip.test(nodeName) ? frag.appendChild(node) : node; + } + + while (index--) { + nodeName = elements[index]; + cache[nodeName] = docCreateElement(nodeName); + frag.createElement(nodeName); + } + ownerDocument.createElement = createElement; + ownerDocument.createDocumentFragment = createDocumentFragment; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Shivs the given document. + * @memberOf html5 + * @param {Document} ownerDocument The document to shiv. + * @returns {Document} The shived document. + */ + function shivDocument(ownerDocument) { + var shived; + if (ownerDocument.documentShived) { + return ownerDocument; + } + if (html5.shivCSS && !supportsHtml5Styles) { + shived = !!addStyleSheet(ownerDocument, + // corrects block display not defined in IE6/7/8/9 + 'article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}' + + // corrects audio display not defined in IE6/7/8/9 + 'audio{display:none}' + + // corrects canvas and video display not defined in IE6/7/8/9 + 'canvas,video{display:inline-block;*display:inline;*zoom:1}' + + // corrects 'hidden' attribute and audio[controls] display not present in IE7/8/9 + '[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}' + + // adds styling not present in IE6/7/8/9 + 'mark{background:#FF0;color:#000}' + ); + } + if (html5.shivMethods && !supportsUnknownElements) { + shived = !shivMethods(ownerDocument); + } + if (shived) { + ownerDocument.documentShived = shived; + } + return ownerDocument; + } + + /*--------------------------------------------------------------------------*/ + + /** + * The `html5` object is exposed so that more elements can be shived and + * existing shiving can be detected on iframes. + * @type Object + * @example + * + * // options can be changed before the script is included + * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false }; + */ + var html5 = { + + /** + * An array or space separated string of node names of the elements to shiv. + * @memberOf html5 + * @type Array|String + */ + 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video'.split(' '), + + /** + * A flag to indicate that the HTML5 style sheet should be inserted. + * @memberOf html5 + * @type Boolean + */ + 'shivCSS': !(options.shivCSS === false), + + /** + * A flag to indicate that the document's `createElement` and `createDocumentFragment` + * methods should be overwritten. + * @memberOf html5 + * @type Boolean + */ + 'shivMethods': !(options.shivMethods === false), + + /** + * A string to describe the type of `html5` object ("default" or "default print"). + * @memberOf html5 + * @type String + */ + 'type': 'default', + + // shivs the document according to the specified `html5` object options + 'shivDocument': shivDocument + }; + + /*--------------------------------------------------------------------------*/ + + // expose html5 + window.html5 = html5; + + // shiv the document + shivDocument(document); + +}(this, document)); \ No newline at end of file diff --git a/doc/design/js/jquery-1.7.1.min.js b/doc/design/js/jquery-1.7.1.min.js new file mode 100644 index 000000000..198b3ff07 --- /dev/null +++ b/doc/design/js/jquery-1.7.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/doc/design/js/jquery.tablesorter.js b/doc/design/js/jquery.tablesorter.js new file mode 100644 index 000000000..f7813343f --- /dev/null +++ b/doc/design/js/jquery.tablesorter.js @@ -0,0 +1,852 @@ +/* + * + * TableSorter 2.0 - Client-side table sorting with ease! + * Version 2.0.3 + * @requires jQuery v1.2.3 + * + * Copyright (c) 2007 Christian Bach + * Examples and docs at: http://tablesorter.com + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ +/** + * + * @description Create a sortable table with multi-column sorting capabilitys + * + * @example $('table').tablesorter(); + * @desc Create a simple tablesorter interface. + * + * @example $('table').tablesorter({ sortList:[[0,0],[1,0]] }); + * @desc Create a tablesorter interface and sort on the first and secound column in ascending order. + * + * @example $('table').tablesorter({ headers: { 0: { sorter: false}, 1: {sorter: false} } }); + * @desc Create a tablesorter interface and disableing the first and secound column headers. + * + * @example $('table').tablesorter({ 0: {sorter:"integer"}, 1: {sorter:"currency"} }); + * @desc Create a tablesorter interface and set a column parser for the first and secound column. + * + * + * @param Object settings An object literal containing key/value pairs to provide optional settings. + * + * @option String cssHeader (optional) A string of the class name to be appended to sortable tr elements in the thead of the table. + * Default value: "header" + * + * @option String cssAsc (optional) A string of the class name to be appended to sortable tr elements in the thead on a ascending sort. + * Default value: "headerSortUp" + * + * @option String cssDesc (optional) A string of the class name to be appended to sortable tr elements in the thead on a descending sort. + * Default value: "headerSortDown" + * + * @option String sortInitialOrder (optional) A string of the inital sorting order can be asc or desc. + * Default value: "asc" + * + * @option String sortMultisortKey (optional) A string of the multi-column sort key. + * Default value: "shiftKey" + * + * @option String textExtraction (optional) A string of the text-extraction method to use. + * For complex html structures inside td cell set this option to "complex", + * on large tables the complex option can be slow. + * Default value: "simple" + * + * @option Object headers (optional) An array containing the forces sorting rules. + * This option let's you specify a default sorting rule. + * Default value: null + * + * @option Array sortList (optional) An array containing the forces sorting rules. + * This option let's you specify a default sorting rule. + * Default value: null + * + * @option Array sortForce (optional) An array containing forced sorting rules. + * This option let's you specify a default sorting rule, which is prepended to user-selected rules. + * Default value: null + * + * @option Array sortAppend (optional) An array containing forced sorting rules. + * This option let's you specify a default sorting rule, which is appended to user-selected rules. + * Default value: null + * + * @option Boolean widthFixed (optional) Boolean flag indicating if tablesorter should apply fixed widths to the table columns. + * This is usefull when using the pager companion plugin. + * This options requires the dimension jquery plugin. + * Default value: false + * + * @option Boolean cancelSelection (optional) Boolean flag indicating if tablesorter should cancel selection of the table headers text. + * Default value: true + * + * @option Boolean debug (optional) Boolean flag indicating if tablesorter should display debuging information usefull for development. + * + * @type jQuery + * + * @name tablesorter + * + * @cat Plugins/Tablesorter + * + * @author Christian Bach/christian.bach@polyester.se + */ + +(function($) { + $.extend({ + tablesorter: new function() { + + var parsers = [], widgets = []; + + this.defaults = { + cssHeader: "header", + cssAsc: "headerSortUp", + cssDesc: "headerSortDown", + sortInitialOrder: "asc", + sortMultiSortKey: "shiftKey", + sortForce: null, + sortAppend: null, + textExtraction: "simple", + parsers: {}, + widgets: [], + widgetZebra: {css: ["even","odd"]}, + headers: {}, + widthFixed: false, + cancelSelection: true, + sortList: [], + headerList: [], + dateFormat: "us", + decimal: '.', + debug: false + }; + + /* debuging utils */ + function benchmark(s,d) { + log(s + "," + (new Date().getTime() - d.getTime()) + "ms"); + } + + this.benchmark = benchmark; + + function log(s) { + if (typeof console != "undefined" && typeof console.debug != "undefined") { + console.log(s); + } else { + alert(s); + } + } + + /* parsers utils */ + function buildParserCache(table,$headers) { + + if(table.config.debug) { var parsersDebug = ""; } + + var rows = table.tBodies[0].rows; + + if(table.tBodies[0].rows[0]) { + + var list = [], cells = rows[0].cells, l = cells.length; + + for (var i=0;i < l; i++) { + var p = false; + + if($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter) ) { + + p = getParserById($($headers[i]).metadata().sorter); + + } else if((table.config.headers[i] && table.config.headers[i].sorter)) { + + p = getParserById(table.config.headers[i].sorter); + } + if(!p) { + p = detectParserForColumn(table,cells[i]); + } + + if(table.config.debug) { parsersDebug += "column:" + i + " parser:" +p.id + "\n"; } + + list.push(p); + } + } + + if(table.config.debug) { log(parsersDebug); } + + return list; + }; + + function detectParserForColumn(table,node) { + var l = parsers.length; + for(var i=1; i < l; i++) { + if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)) { + return parsers[i]; + } + } + // 0 is always the generic parser (text) + return parsers[0]; + } + + function getParserById(name) { + var l = parsers.length; + for(var i=0; i < l; i++) { + if(parsers[i].id.toLowerCase() == name.toLowerCase()) { + return parsers[i]; + } + } + return false; + } + + /* utils */ + function buildCache(table) { + + if(table.config.debug) { var cacheTime = new Date(); } + + + var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0, + totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0, + parsers = table.config.parsers, + cache = {row: [], normalized: []}; + + for (var i=0;i < totalRows; ++i) { + + /** Add the table data to main data array */ + var c = table.tBodies[0].rows[i], cols = []; + + cache.row.push($(c)); + + for(var j=0; j < totalCells; ++j) { + cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j])); + } + + cols.push(i); // add position for rowCache + cache.normalized.push(cols); + cols = null; + }; + + if(table.config.debug) { benchmark("Building cache for " + totalRows + " rows:", cacheTime); } + + return cache; + }; + + function getElementText(config,node) { + + if(!node) return ""; + + var t = ""; + + if(config.textExtraction == "simple") { + if(node.childNodes[0] && node.childNodes[0].hasChildNodes()) { + t = node.childNodes[0].innerHTML; + } else { + t = node.innerHTML; + } + } else { + if(typeof(config.textExtraction) == "function") { + t = config.textExtraction(node); + } else { + t = $(node).text(); + } + } + return t; + } + + function appendToTable(table,cache) { + + if(table.config.debug) {var appendTime = new Date()} + + var c = cache, + r = c.row, + n= c.normalized, + totalRows = n.length, + checkCell = (n[0].length-1), + tableBody = $(table.tBodies[0]), + rows = []; + + for (var i=0;i < totalRows; i++) { + rows.push(r[n[i][checkCell]]); + if(!table.config.appender) { + + var o = r[n[i][checkCell]]; + var l = o.length; + for(var j=0; j < l; j++) { + + tableBody[0].appendChild(o[j]); + + } + + //tableBody.append(r[n[i][checkCell]]); + } + } + + if(table.config.appender) { + + table.config.appender(table,rows); + } + + rows = null; + + if(table.config.debug) { benchmark("Rebuilt table:", appendTime); } + + //apply table widgets + applyWidget(table); + + // trigger sortend + setTimeout(function() { + $(table).trigger("sortEnd"); + },0); + + }; + + function buildHeaders(table) { + + if(table.config.debug) { var time = new Date(); } + + var meta = ($.metadata) ? true : false, tableHeadersRows = []; + + for(var i = 0; i < table.tHead.rows.length; i++) { tableHeadersRows[i]=0; }; + + $tableHeaders = $("thead th",table); + + $tableHeaders.each(function(index) { + + this.count = 0; + this.column = index; + this.order = formatSortingOrder(table.config.sortInitialOrder); + + if(checkHeaderMetadata(this) || checkHeaderOptions(table,index)) this.sortDisabled = true; + + if(!this.sortDisabled) { + $(this).addClass(table.config.cssHeader); + } + + // add cell to headerList + table.config.headerList[index]= this; + }); + + if(table.config.debug) { benchmark("Built headers:", time); log($tableHeaders); } + + return $tableHeaders; + + }; + + function checkCellColSpan(table, rows, row) { + var arr = [], r = table.tHead.rows, c = r[row].cells; + + for(var i=0; i < c.length; i++) { + var cell = c[i]; + + if ( cell.colSpan > 1) { + arr = arr.concat(checkCellColSpan(table, headerArr,row++)); + } else { + if(table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row+1])) { + arr.push(cell); + } + //headerArr[row] = (i+row); + } + } + return arr; + }; + + function checkHeaderMetadata(cell) { + if(($.metadata) && ($(cell).metadata().sorter === false)) { return true; }; + return false; + } + + function checkHeaderOptions(table,i) { + if((table.config.headers[i]) && (table.config.headers[i].sorter === false)) { return true; }; + return false; + } + + function applyWidget(table) { + var c = table.config.widgets; + var l = c.length; + for(var i=0; i < l; i++) { + + getWidgetById(c[i]).format(table); + } + + } + + function getWidgetById(name) { + var l = widgets.length; + for(var i=0; i < l; i++) { + if(widgets[i].id.toLowerCase() == name.toLowerCase() ) { + return widgets[i]; + } + } + }; + + function formatSortingOrder(v) { + + if(typeof(v) != "Number") { + i = (v.toLowerCase() == "desc") ? 1 : 0; + } else { + i = (v == (0 || 1)) ? v : 0; + } + return i; + } + + function isValueInArray(v, a) { + var l = a.length; + for(var i=0; i < l; i++) { + if(a[i][0] == v) { + return true; + } + } + return false; + } + + function setHeadersCss(table,$headers, list, css) { + // remove all header information + $headers.removeClass(css[0]).removeClass(css[1]); + + var h = []; + $headers.each(function(offset) { + if(!this.sortDisabled) { + h[this.column] = $(this); + } + }); + + var l = list.length; + for(var i=0; i < l; i++) { + h[list[i][0]].addClass(css[list[i][1]]); + } + } + + function fixColumnWidth(table,$headers) { + var c = table.config; + if(c.widthFixed) { + var colgroup = $('
'); + $("tr:first td",table.tBodies[0]).each(function() { + colgroup.append($('').css('width',$(this).width())); + }); + $(table).prepend(colgroup); + }; + } + + function updateHeaderSortCount(table,sortList) { + var c = table.config, l = sortList.length; + for(var i=0; i < l; i++) { + var s = sortList[i], o = c.headerList[s[0]]; + o.count = s[1]; + o.count++; + } + } + + /* sorting methods */ + function multisort(table,sortList,cache) { + + if(table.config.debug) { var sortTime = new Date(); } + + var dynamicExp = "var sortWrapper = function(a,b) {", l = sortList.length; + + for(var i=0; i < l; i++) { + + var c = sortList[i][0]; + var order = sortList[i][1]; + var s = (getCachedSortType(table.config.parsers,c) == "text") ? ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ? "sortNumeric" : "sortNumericDesc"); + + var e = "e" + i; + + dynamicExp += "var " + e + " = " + s + "(a[" + c + "],b[" + c + "]); "; + dynamicExp += "if(" + e + ") { return " + e + "; } "; + dynamicExp += "else { "; + } + + // if value is the same keep orignal order + var orgOrderCol = cache.normalized[0].length - 1; + dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];"; + + for(var i=0; i < l; i++) { + dynamicExp += "}; "; + } + + dynamicExp += "return 0; "; + dynamicExp += "}; "; + + eval(dynamicExp); + + cache.normalized.sort(sortWrapper); + + if(table.config.debug) { benchmark("Sorting on " + sortList.toString() + " and dir " + order+ " time:", sortTime); } + + return cache; + }; + + function sortText(a,b) { + return ((a < b) ? -1 : ((a > b) ? 1 : 0)); + }; + + function sortTextDesc(a,b) { + return ((b < a) ? -1 : ((b > a) ? 1 : 0)); + }; + + function sortNumeric(a,b) { + return a-b; + }; + + function sortNumericDesc(a,b) { + return b-a; + }; + + function getCachedSortType(parsers,i) { + return parsers[i].type; + }; + + /* public methods */ + this.construct = function(settings) { + + return this.each(function() { + + if(!this.tHead || !this.tBodies) return; + + var $this, $document,$headers, cache, config, shiftDown = 0, sortOrder; + + this.config = {}; + + config = $.extend(this.config, $.tablesorter.defaults, settings); + + // store common expression for speed + $this = $(this); + + // build headers + $headers = buildHeaders(this); + + // try to auto detect column type, and store in tables config + this.config.parsers = buildParserCache(this,$headers); + + + // build the cache for the tbody cells + cache = buildCache(this); + + // get the css class names, could be done else where. + var sortCSS = [config.cssDesc,config.cssAsc]; + + // fixate columns if the users supplies the fixedWidth option + fixColumnWidth(this); + + // apply event handling to headers + // this is to big, perhaps break it out? + $headers.click(function(e) { + + $this.trigger("sortStart"); + + var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0; + + if(!this.sortDisabled && totalRows > 0) { + + + // store exp, for speed + var $cell = $(this); + + // get current column index + var i = this.column; + + // get current column sort order + this.order = this.count++ % 2; + + // user only whants to sort on one column + if(!e[config.sortMultiSortKey]) { + + // flush the sort list + config.sortList = []; + + if(config.sortForce != null) { + var a = config.sortForce; + for(var j=0; j < a.length; j++) { + if(a[j][0] != i) { + config.sortList.push(a[j]); + } + } + } + + // add column to sort list + config.sortList.push([i,this.order]); + + // multi column sorting + } else { + // the user has clicked on an all ready sortet column. + if(isValueInArray(i,config.sortList)) { + + // revers the sorting direction for all tables. + for(var j=0; j < config.sortList.length; j++) { + var s = config.sortList[j], o = config.headerList[s[0]]; + if(s[0] == i) { + o.count = s[1]; + o.count++; + s[1] = o.count % 2; + } + } + } else { + // add column to sort list array + config.sortList.push([i,this.order]); + } + }; + setTimeout(function() { + //set css for headers + setHeadersCss($this[0],$headers,config.sortList,sortCSS); + appendToTable($this[0],multisort($this[0],config.sortList,cache)); + },1); + // stop normal event by returning false + return false; + } + // cancel selection + }).mousedown(function() { + if(config.cancelSelection) { + this.onselectstart = function() {return false}; + return false; + } + }); + + // apply easy methods that trigger binded events + $this.bind("update",function() { + + // rebuild parsers. + this.config.parsers = buildParserCache(this,$headers); + + // rebuild the cache map + cache = buildCache(this); + + }).bind("sorton",function(e,list) { + + $(this).trigger("sortStart"); + + config.sortList = list; + + // update and store the sortlist + var sortList = config.sortList; + + // update header count index + updateHeaderSortCount(this,sortList); + + //set css for headers + setHeadersCss(this,$headers,sortList,sortCSS); + + + // sort the table and append it to the dom + appendToTable(this,multisort(this,sortList,cache)); + + }).bind("appendCache",function() { + + appendToTable(this,cache); + + }).bind("applyWidgetId",function(e,id) { + + getWidgetById(id).format(this); + + }).bind("applyWidgets",function() { + // apply widgets + applyWidget(this); + }); + + if($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) { + config.sortList = $(this).metadata().sortlist; + } + // if user has supplied a sort list to constructor. + if(config.sortList.length > 0) { + $this.trigger("sorton",[config.sortList]); + } + + // apply widgets + applyWidget(this); + }); + }; + + this.addParser = function(parser) { + var l = parsers.length, a = true; + for(var i=0; i < l; i++) { + if(parsers[i].id.toLowerCase() == parser.id.toLowerCase()) { + a = false; + } + } + if(a) { parsers.push(parser); }; + }; + + this.addWidget = function(widget) { + widgets.push(widget); + }; + + this.formatFloat = function(s) { + var i = parseFloat(s); + return (isNaN(i)) ? 0 : i; + }; + this.formatInt = function(s) { + var i = parseInt(s); + return (isNaN(i)) ? 0 : i; + }; + + this.isDigit = function(s,config) { + var DECIMAL = '\\' + config.decimal; + var exp = '/(^[+]?0(' + DECIMAL +'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)' + DECIMAL +'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*' + DECIMAL +'0+$)/'; + return RegExp(exp).test($.trim(s)); + }; + + this.clearTableBody = function(table) { + if($.browser.msie) { + function empty() { + while ( this.firstChild ) this.removeChild( this.firstChild ); + } + empty.apply(table.tBodies[0]); + } else { + table.tBodies[0].innerHTML = ""; + } + }; + } + }); + + // extend plugin scope + $.fn.extend({ + tablesorter: $.tablesorter.construct + }); + + var ts = $.tablesorter; + + // add default parsers + ts.addParser({ + id: "text", + is: function(s) { + return true; + }, + format: function(s) { + return $.trim(s.toLowerCase()); + }, + type: "text" + }); + + ts.addParser({ + id: "digit", + is: function(s,table) { + var c = table.config; + return $.tablesorter.isDigit(s,c); + }, + format: function(s) { + return $.tablesorter.formatFloat(s); + }, + type: "numeric" + }); + + ts.addParser({ + id: "currency", + is: function(s) { + return /^[£$€?.]/.test(s); + }, + format: function(s) { + return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),"")); + }, + type: "numeric" + }); + + ts.addParser({ + id: "ipAddress", + is: function(s) { + return /^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s); + }, + format: function(s) { + var a = s.split("."), r = "", l = a.length; + for(var i = 0; i < l; i++) { + var item = a[i]; + if(item.length == 2) { + r += "0" + item; + } else { + r += item; + } + } + return $.tablesorter.formatFloat(r); + }, + type: "numeric" + }); + + ts.addParser({ + id: "url", + is: function(s) { + return /^(https?|ftp|file):\/\/$/.test(s); + }, + format: function(s) { + return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),'')); + }, + type: "text" + }); + + ts.addParser({ + id: "isoDate", + is: function(s) { + return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s); + }, + format: function(s) { + return $.tablesorter.formatFloat((s != "") ? new Date(s.replace(new RegExp(/-/g),"/")).getTime() : "0"); + }, + type: "numeric" + }); + + ts.addParser({ + id: "percent", + is: function(s) { + return /\%$/.test($.trim(s)); + }, + format: function(s) { + return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),"")); + }, + type: "numeric" + }); + + ts.addParser({ + id: "usLongDate", + is: function(s) { + return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/)); + }, + format: function(s) { + return $.tablesorter.formatFloat(new Date(s).getTime()); + }, + type: "numeric" + }); + + ts.addParser({ + id: "shortDate", + is: function(s) { + return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s); + }, + format: function(s,table) { + var c = table.config; + s = s.replace(/\-/g,"/"); + if(c.dateFormat == "us") { + // reformat the string in ISO format + s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2"); + } else if(c.dateFormat == "uk") { + //reformat the string in ISO format + s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1"); + } else if(c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") { + s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3"); + } + return $.tablesorter.formatFloat(new Date(s).getTime()); + }, + type: "numeric" + }); + + ts.addParser({ + id: "time", + is: function(s) { + return /^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s); + }, + format: function(s) { + return $.tablesorter.formatFloat(new Date("2000/01/01 " + s).getTime()); + }, + type: "numeric" + }); + + + ts.addParser({ + id: "metadata", + is: function(s) { + return false; + }, + format: function(s,table,cell) { + var c = table.config, p = (!c.parserMetadataName) ? 'sortValue' : c.parserMetadataName; + return $(cell).metadata()[p]; + }, + type: "numeric" + }); + + // add default widgets + ts.addWidget({ + id: "zebra", + format: function(table) { + if(table.config.debug) { var time = new Date(); } + $("tr:visible",table.tBodies[0]) + .filter(':even') + .removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]) + .end().filter(':odd') + .removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]); + if(table.config.debug) { $.tablesorter.benchmark("Applying Zebra widget", time); } + } + }); +})(jQuery); \ No newline at end of file diff --git a/doc/design/js/myprojects.js b/doc/design/js/myprojects.js new file mode 100644 index 000000000..f0d45cf96 --- /dev/null +++ b/doc/design/js/myprojects.js @@ -0,0 +1,16 @@ +$(document).ready(function() { + $("#myTable").tablesorter({ + headers: { + 1: { + sorter: false + }, + 3: { + sorter: false + } + } + }); +}); + +function deleteRow(num) { + $("#Row"+num).fadeOut("slow"); +} \ No newline at end of file diff --git a/doc/design/js/radio.js b/doc/design/js/radio.js new file mode 100644 index 000000000..dd19ce10b --- /dev/null +++ b/doc/design/js/radio.js @@ -0,0 +1,124 @@ +jQuery(document).ready(function(){ + +jQuery(".niceRadio").each( +/* radio */ +function() { + + changeRadioStart(jQuery(this)); + +}); + + +}); + + +function changeRadio(el) +/* + radio +*/ +{ + + var el = el, + input = el.find("input").eq(0); + var nm=input.attr("name"); + + jQuery(".niceRadio input").each( + + function() { + + if(jQuery(this).attr("name")==nm) + { + jQuery(this).parent().removeClass("radioChecked"); + } + + + }); + + + if(el.attr("class").indexOf("niceRadioDisabled")==-1) + { + el.addClass("radioChecked"); + input.attr("checked", true); + } + + return true; +} + +function changeVisualRadio(input) +{ +/* + radio +*/ + var wrapInput = input.parent(); + var nm=input.attr("name"); + + jQuery(".niceRadio input").each( + + function() { + + if(jQuery(this).attr("name")==nm) + { + jQuery(this).parent().removeClass("radioChecked"); + } + + + }); + + if(input.attr("checked")) + { + wrapInput.addClass("radioChecked"); + } +} + +function changeRadioStart(el) +/* + + name, id +*/ +{ + +try +{ +var el = el, + radioName = el.attr("name"), + radioId = el.attr("id"), + radioChecked = el.attr("checked"), + radioDisabled = el.attr("disabled"), + radioTab = el.attr("tabindex"), + radioValue = el.attr("value"); + if(radioChecked) + el.after(""+ + ""); + else + el.after(""+ + ""); + + /* disabled - disabled radio */ + if(radioDisabled) + { + el.next().addClass("niceRadioDisabled"); + el.next().find("input").eq(0).attr("disabled","disabled"); + } + + /* radio */ + el.next().bind("mousedown", function(e) { changeRadio(jQuery(this)) }); + if(jQuery.browser.msie) el.next().find("input").eq(0).bind("click", function(e) { changeVisualRadio(jQuery(this)) }); + else el.next().find("input").eq(0).bind("change", function(e) { changeVisualRadio(jQuery(this)) }); + el.remove(); +} +catch(e) +{ + // , +} + + return true; +} diff --git a/doc/design/pics/ava-admin.png b/doc/design/pics/ava-admin.png new file mode 100644 index 000000000..b5927a3fd Binary files /dev/null and b/doc/design/pics/ava-admin.png differ diff --git a/doc/design/pics/ava.png b/doc/design/pics/ava.png new file mode 100644 index 000000000..3c2371473 Binary files /dev/null and b/doc/design/pics/ava.png differ diff --git a/doc/design/pics/bg-droplist.png b/doc/design/pics/bg-droplist.png new file mode 100644 index 000000000..2c5a4309b Binary files /dev/null and b/doc/design/pics/bg-droplist.png differ diff --git a/doc/design/pics/bg.png b/doc/design/pics/bg.png new file mode 100644 index 000000000..62e74e049 Binary files /dev/null and b/doc/design/pics/bg.png differ diff --git a/doc/design/pics/checkbox-main.png b/doc/design/pics/checkbox-main.png new file mode 100644 index 000000000..44aa8b14b Binary files /dev/null and b/doc/design/pics/checkbox-main.png differ diff --git a/doc/design/pics/code.png b/doc/design/pics/code.png new file mode 100644 index 000000000..c348e8d7c Binary files /dev/null and b/doc/design/pics/code.png differ diff --git a/doc/design/pics/expand-gray.png b/doc/design/pics/expand-gray.png new file mode 100644 index 000000000..cb8bbd46f Binary files /dev/null and b/doc/design/pics/expand-gray.png differ diff --git a/doc/design/pics/expand-gray2.png b/doc/design/pics/expand-gray2.png new file mode 100644 index 000000000..c49b0b21b Binary files /dev/null and b/doc/design/pics/expand-gray2.png differ diff --git a/doc/design/pics/expand-white.png b/doc/design/pics/expand-white.png new file mode 100644 index 000000000..78dc7c9fe Binary files /dev/null and b/doc/design/pics/expand-white.png differ diff --git a/doc/design/pics/expand.png b/doc/design/pics/expand.png new file mode 100644 index 000000000..700e9957a Binary files /dev/null and b/doc/design/pics/expand.png differ diff --git a/doc/design/pics/flag.png b/doc/design/pics/flag.png new file mode 100644 index 000000000..85b84ce4f Binary files /dev/null and b/doc/design/pics/flag.png differ diff --git a/doc/design/pics/folder.png b/doc/design/pics/folder.png new file mode 100644 index 000000000..2df35409f Binary files /dev/null and b/doc/design/pics/folder.png differ diff --git a/doc/design/pics/lock.png b/doc/design/pics/lock.png new file mode 100644 index 000000000..ddf7e233e Binary files /dev/null and b/doc/design/pics/lock.png differ diff --git a/doc/design/pics/logo-mini.png b/doc/design/pics/logo-mini.png new file mode 100644 index 000000000..3175f3b21 Binary files /dev/null and b/doc/design/pics/logo-mini.png differ diff --git a/doc/design/pics/menu-hover.png b/doc/design/pics/menu-hover.png new file mode 100644 index 000000000..8883a2116 Binary files /dev/null and b/doc/design/pics/menu-hover.png differ diff --git a/doc/design/pics/page-bg.png b/doc/design/pics/page-bg.png new file mode 100644 index 000000000..f81678dec Binary files /dev/null and b/doc/design/pics/page-bg.png differ diff --git a/doc/design/pics/radio.png b/doc/design/pics/radio.png new file mode 100644 index 000000000..28f16dfae Binary files /dev/null and b/doc/design/pics/radio.png differ diff --git a/doc/design/pics/search-button.png b/doc/design/pics/search-button.png new file mode 100644 index 000000000..7a9e40bc4 Binary files /dev/null and b/doc/design/pics/search-button.png differ diff --git a/doc/design/pics/selects-2.png b/doc/design/pics/selects-2.png new file mode 100644 index 000000000..150f7045b Binary files /dev/null and b/doc/design/pics/selects-2.png differ diff --git a/doc/design/pics/selects-focus.png b/doc/design/pics/selects-focus.png new file mode 100644 index 000000000..e6fbaf8b5 Binary files /dev/null and b/doc/design/pics/selects-focus.png differ diff --git a/doc/design/pics/square.png b/doc/design/pics/square.png new file mode 100644 index 000000000..a6f4b5f9b Binary files /dev/null and b/doc/design/pics/square.png differ diff --git a/doc/design/pics/submenu-hover.png b/doc/design/pics/submenu-hover.png new file mode 100644 index 000000000..eda9a1a1a Binary files /dev/null and b/doc/design/pics/submenu-hover.png differ diff --git a/doc/design/pics/switch-off.png b/doc/design/pics/switch-off.png new file mode 100644 index 000000000..e119baf8e Binary files /dev/null and b/doc/design/pics/switch-off.png differ diff --git a/doc/design/pics/switch-on.png b/doc/design/pics/switch-on.png new file mode 100644 index 000000000..cdfa3e37e Binary files /dev/null and b/doc/design/pics/switch-on.png differ diff --git a/doc/design/pics/table-down.png b/doc/design/pics/table-down.png new file mode 100644 index 000000000..0a6e66179 Binary files /dev/null and b/doc/design/pics/table-down.png differ diff --git a/doc/design/pics/table-header.png b/doc/design/pics/table-header.png new file mode 100644 index 000000000..ff7181431 Binary files /dev/null and b/doc/design/pics/table-header.png differ diff --git a/doc/design/pics/table-sort.png b/doc/design/pics/table-sort.png new file mode 100644 index 000000000..765c685e2 Binary files /dev/null and b/doc/design/pics/table-sort.png differ diff --git a/doc/design/pics/table-up.png b/doc/design/pics/table-up.png new file mode 100644 index 000000000..53b1671cb Binary files /dev/null and b/doc/design/pics/table-up.png differ diff --git a/doc/design/pics/top-left.png b/doc/design/pics/top-left.png new file mode 100644 index 000000000..3590e4141 Binary files /dev/null and b/doc/design/pics/top-left.png differ diff --git a/doc/design/pics/top-middle.png b/doc/design/pics/top-middle.png new file mode 100644 index 000000000..2d01d9206 Binary files /dev/null and b/doc/design/pics/top-middle.png differ diff --git a/doc/design/pics/top-right.png b/doc/design/pics/top-right.png new file mode 100644 index 000000000..8f6e2ac4c Binary files /dev/null and b/doc/design/pics/top-right.png differ diff --git a/doc/design/pics/unlock.png b/doc/design/pics/unlock.png new file mode 100644 index 000000000..ca5ae11f2 Binary files /dev/null and b/doc/design/pics/unlock.png differ diff --git a/doc/design/pics/unlock2.png b/doc/design/pics/unlock2.png new file mode 100644 index 000000000..97e9fe8be Binary files /dev/null and b/doc/design/pics/unlock2.png differ diff --git a/doc/design/pics/x.png b/doc/design/pics/x.png new file mode 100644 index 000000000..ffd4e813e Binary files /dev/null and b/doc/design/pics/x.png differ diff --git a/doc/design/styles/blue/asc.png b/doc/design/styles/blue/asc.png new file mode 100644 index 000000000..7cea5a1c3 Binary files /dev/null and b/doc/design/styles/blue/asc.png differ diff --git a/doc/design/styles/blue/bg.png b/doc/design/styles/blue/bg.png new file mode 100644 index 000000000..b2598acb2 Binary files /dev/null and b/doc/design/styles/blue/bg.png differ diff --git a/doc/design/styles/blue/desc.png b/doc/design/styles/blue/desc.png new file mode 100644 index 000000000..4753d0e4f Binary files /dev/null and b/doc/design/styles/blue/desc.png differ diff --git a/doc/design/styles/blue/style.css b/doc/design/styles/blue/style.css new file mode 100644 index 000000000..e1a08b9df --- /dev/null +++ b/doc/design/styles/blue/style.css @@ -0,0 +1,113 @@ +/* tables */ +table.tablesorter { + font-family:arial; + margin:10px 0pt 15px; + font-size: 12px; + width: 100%; + text-align: left; + border: 1px solid #DDD; + border-bottom: none; +} +table.tablesorter thead tr th, table.tablesorter tfoot tr th { + font-size: 12px; + margin: 0px; +} +table.tablesorter thead tr .header { + background-image: url(bg.png); + background-repeat: no-repeat; + background-position: center left; + cursor: pointer; +} +table.tablesorter tbody td { + color: #3D3D3D; + padding: 5px; + margin: 0px; + background-color: #FFF; + vertical-align: top; + +} +table.tablesorter tbody tr.odd td { + background-color:#F0F0F6; +} +table.tablesorter thead tr .headerSortUp { + background-image: url(asc.png); +} +table.tablesorter thead tr .headerSortDown { + background-image: url(desc.png); +} +table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp { + +} + +table.tablesorter thead tr { + height: 38px; + background: #ededed; + -webkit-box-shadow: 0px 3px 3px -1px rgba(18, 86, 135, 0.2); + -moz-box-shadow: 0px 3px 3px -1px rgba(18, 86, 135, 0.2); + box-shadow: 0px 3px 3px -1px rgba(18, 86, 135, 0.2); + position: relative; + z-index: 99; +} + +table.tablesorter thead tr th{ + border-bottom: 1px solid #FFF; +} + +table.tablesorter tr { + position: relative; + z-index: 70; +} + +table.tablesorter tbody tr td { + border-bottom: 1px solid #DDD; +} + +table.tablesorter thead th { + color: #575756; + font-weight: normal; +} + +table.tablesorter tbody td { + color: #58595b; + padding-top: 8px; + padding-bottom: 8px; +} + +table.tablesorter .th1 { + width: 180px; + padding-left: 17px; +} + +table.tablesorter .th2 { + width: 390px; +} + +table.tablesorter .th3 { + width: 110px; + padding-left: 17px; +} + +table.tablesorter .td2 { + padding-right: 20px; +} + +table.tablesorter .th4 { + width: 120px; +} + +table.tablesorter .td5 { + text-align: center; +} + +table.tablesorter .td5 img{ + cursor: pointer; +} + +.table-sort-left { + float: left; + width: 25px; +} + +.table-sort-right { + float: left; +} \ No newline at end of file diff --git a/doc/design/styles/cusel.css b/doc/design/styles/cusel.css new file mode 100644 index 000000000..1c7b15b1b --- /dev/null +++ b/doc/design/styles/cusel.css @@ -0,0 +1,169 @@ +@charset "utf-8"; +/* + styles for select +*/ + + +.cusel:focus { outline: none; } + +.cusel, +.cuselFrameRight, +.jScrollPaneDrag, +.jScrollArrowUp, +.jScrollArrowDown { + background: url(../pics/selects-2.png) no-repeat; +} +.cusel { /* общий вид селекта включая стрелку справа */ + height: 24px; + background-position: left top; + display: inline-block; + position: relative; + cursor: pointer; + font-size: 12px; + z-index: 1; +} +.cuselFrameRight { /* левая чсть селект. обыно скругление и левая граница */ + position: absolute; + z-index: 2; + top: 0; + right: 0; + height: 100%; + width: 42px; + background-position: right top; +} + +.cuselText { /* контейнер для отображенного текста селект */ + height: 29px; + padding: 6px 0 0 10px; /* подбираем отступы и высоту для видимого текста в селекте */ + cursor: pointer; + overflow: hidden; + position: relative; + z-index: 1; + font: 12px Tahoma, Arial; /* шрифты */ + position: absolute; + top: 0; + left: 0; +} +* html .cuselText { /* высота блока для текста для ие6 */ + height: 22px; +} +.cusel span { /* оформление оптиона */ + display: block; + cursor: pointer; + white-space: nowrap; + padding: 2px 5px 2px 5px; /* паддинг справа - это отступ текста от ползунка */ + zoom: 1; +} +.cusel span:hover, +.cusel .cuselOptHover { /* реакция оптиона на наведение */ + background: #dcecfa; + border-radius: 0px; +} +.cusel .cuselActive { /* оформление активного оптиона в списке */ + cursor: default; +} + +/* + styles for focus and hover +*/ +.cusel:hover, +.cusel:hover .cuselFrameRight, +.cusel:focus, +.cusel:focus .cuselFrameRight, +.cuselFocus, +.cuselFocus .cuselFrameRight { + background-image: url(../pics/selects-focus.png); +} + +.cuselOpen { + z-index: 999; +} + +/* + styles for disabled select +*/ +.classDisCusel, +.classDisCusel .cuselFrameRight { + background-image: url(../pics/selects-2-dis.png) !important; + cursor: default; + color: #575756; +} +.classDisCusel .cuselText { + cursor: default; +} + + +/* + styles for scrollbar +*/ +.cusel .cusel-scroll-wrap { /* контейнер для блока с прокруткой */ + display: block; + visibility: hidden; + position: absolute; + left: 0; + top: 100%; + background: #fff; /* фон выпадающего списка */ + width: 198px; + border: 1px solid #dcdcdc; + border-top: none; + margin-top: 0px; + +} +.cusel .jScrollPaneContainer { + position: relative; + overflow: hidden; + z-index: 5; + border: 1px solid #999; /* границы выпадающего спиcка */ +} + +.cusel .jScrollPaneTrack { /* трек для ползунка прокрутки */ + height: 100%; + width: 7px !important; + background: #ccc; + position: absolute; + top: 0; + right: 4px; +} +.cusel .jScrollPaneDrag { /* ползунок */ + position: absolute; + background-position: -40px -26px; + cursor: pointer; + width: 15px !important; + height: 27px !important; + right: -4px; + +} + +.cusel .jScrollPaneDragTop { + position: absolute; + top: 0; + left: 0; + overflow: hidden; +} +.cusel .jScrollPaneDragBottom { + position: absolute; + bottom: 0; + left: 0; + overflow: hidden; +} +.cusel .jScrollArrowUp { /* стрелка вверх */ + position: absolute; + top: 0; + right: 2px; + width: 26px; + height: 12px; + cursor: pointer; + background-position: -2px -26px; + overflow: hidden; +} +.cusel .jScrollArrowDown { /* стрелка вниз */ + width: 25px; + height: 12px; + position: absolute; + top: auto; + bottom: 0; + right: 3px; + cursor: pointer; + background-position: -21px -26px; + overflow: hidden; +} \ No newline at end of file diff --git a/doc/design/styles/main.css b/doc/design/styles/main.css new file mode 100644 index 000000000..9aef97c45 --- /dev/null +++ b/doc/design/styles/main.css @@ -0,0 +1,944 @@ +html, body { + margin: 0; + padding: 0; + font-family: Tahoma, Arial; + color: #565667; + background: #1f60a1 url("../pics/bg.png") repeat-x; + min-width: 940px; + min-height: 600px; + text-align: center; + height: 100%; +} + +header, section, footer, aside, nav, article, menu { + display: block; +} + +input[type="text"]:focus { outline: none; } + +input[type="password"]:focus { outline: none; } + +input:focus { outline: none; } + +select:focus { outline: none; } + +a img { border: none; } + +.wrap { + width: 940px; + margin: 0 auto; + text-align: center; + border: 1px solid #3f668c; + -webkit-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5); + box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5); + background: #FFF; + min-height: 92%; +} + +.wrap.columns { + background: #FFF url("../pics/page-bg.png") repeat-y; +} + +.both { + clear: both; +} + +/* Top menu */ + +header { + -webkit-box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.4); + -moz-box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.4); + box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.4); + position: relative; + z-index: 1000; +} + +header div.left { + background: url("../pics/top-left.png"); + height: 46px; + width: 14px; + float: left; +} + +header div.middle { + background: url("../pics/top-middle.png"); + float: left; + height: 46px; + width: 912px; +} + +header div.right { + background: url("../pics/top-right.png"); + height: 46px; + width: 14px; + float: right; +} + +/* Left part of top menu*/ + +header menu { + float: left; + margin: 0; + padding: 0; +} + +header menu ul { + list-style: none; + margin: 0; + padding: 10px 0px 0px 0px; +} + +header menu ul li { + display: inline; +} + +header menu ul li a { + font-size: 12px; + color: #FFF; + text-decoration: none; + height: 43px; + padding: 15px 15px 15px 15px; +} + +header menu ul li a:hover { + color: #cee7ff; +} + +header menu ul li a.first { + padding-left: 45px; +} + +header menu ul li a.active { + background: url("../pics/menu-hover.png") repeat-x; +} + +header div.logo { + float: left; + margin-top: -25px; + padding-left: 10px; + position: absolute; +} + +/* Right part of top menu */ + +header div.information { + float: right; +} + +header div.search { + float: left; + margin: 10px 0px 0px 0px; + -moz-border-radius-topleft: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; + -moz-border-radius-bottomleft: 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; + background: #FFF; + border: 1px solid #7691aa; +} + +header div.search div.pic { + background: url(../pics/search-button.png); + height: 22px; + width: 24px; + float: left; +} + +header div.search div.field { + float: left; + margin: -1px 0px 0px 0px; +} + +header div.search div.field input { + border: none; + height: 18px; + background: none; + width: 132px; + font-size: 12px; + font-family: Arial; + padding: 2px 0px 0px 0px; +} + +header div.search div.field input.gray { + color: #cfcfcf; +} + +header div.search div.field input.black { + color: #333333; +} + +header div.avatar { + float:left; + padding-top: 6px; + padding-right: 10px; + padding-bottom: 10px; + padding: 6px 10px 10px 24px; +} + +header div.profile { + float: left; + text-align: right; + color: #FFF; + font-size: 12px; + padding-top: 12px; +} + +header div.profile a { + color: #FFF; + text-decoration: none; +} + +header div.profile a:hover { + text-decoration: underline; +} + + +header div.droplist-wrap { + margin: -4px 0px 0px 0px; +} + +header div.droplist { + background: url("../pics/bg-droplist.png") repeat-x; + height: 91px; + width: 151px; + -webkit-box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5); + box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5); + position: absolute; + margin-top: 0px; + margin-left: 138px; + border-radius: 0px 0px 4px 4px; + display: none; + text-align: right; + z-index: 9999; +} + +header div.droplist-wrap div.a { + margin-top: 5px; +} + +header div.droplist a{ + position: relative; + padding-left: 15px; + font-size: 12px; + color: #7eb7ed; + text-decoration: none; + padding-right: 15px; + margin-top: 10px; +} + +header div.droplist a:hover{ + text-decoration: underline; +} + + +/* Submenu */ + +.sub-menu { + height: 38px; + margin: -7px 0px 0px 0px; + padding: 0px 0px 0px 15px; + background: #ededed; + position: relative; + z-index: 100; + border-bottom: 1px solid #FFF; + -webkit-box-shadow: 0px 5px 3px -3px rgba(18, 86, 135, 0.2); + -moz-box-shadow: 0px 5px 3px -3px rgba(18, 86, 135, 0.2); + box-shadow: 0px 5px 3px -3px rgba(18, 86, 135, 0.2); +} + +.sub-menu div.left { + float: left; + width: 200px; + border-right: 1px solid #dcdcdc; + font-size: 12px; + text-align: left; + font-weight: 700; + padding: 10px 0px 0px 0px; + height: 21px; +} + +.sub-menu div.right { + float: left; +} + + +.sub-menu nav { /* */ + float: left; + margin: 0px 0px 0px 0px; +} + +.sub-menu nav ul { + list-style: none; + text-align: left; + padding: 0; + margin: 0; + padding-top: 5px; +} + +.sub-menu nav ul li { + display: inline; +} + +.sub-menu nav ul li a { + font-size: 12px; + color: #575756; + text-decoration: none; + height: 34px; + padding: 0px 20px 6px 20px; +} + +.sub-menu nav ul li a.active { + background: url("../pics/submenu-hover.png") repeat-x; +} + +.sub-menu nav ul li a:hover { + color: #2b6daf; +} + +/* Page markup */ + +article { + font-size: 12px; +} + +aside { + float: left; + width: 215px; +} + +article div.right { + float: right; + width: 645px; + padding: 20px 40px 40px 40px; + text-align: left; +} + +article div.right.bigpadding { + width: 445px; + padding: 20px 140px 40px 140px; +} + +article div.all { + width: 855px; + padding: 20px 40px 20px 40px; + text-align: left; +} + + +/* Left part of page markup */ + +aside div.bordered { + border-bottom: 1px solid #dee5eb; + text-align: left; + padding: 20px 0px 0px 15px; +} + +aside div.block { + text-align: left; + padding-top: 10px; + padding-left: 15px; +} + +/* Common page parts markups */ + +article a.button { + display: inline-block; + white-space: nowrap; + background-color: #125687; + background-image: -webkit-gradient(linear, left top, left bottom, from(#68a3d8), to(#125687)); + background-image: -webkit-linear-gradient(top, #68a3d8, #125687); + background-image: -moz-linear-gradient(top, #68a3d8, #125687); + background-image: -ms-linear-gradient(top, #68a3d8, #125687); + background-image: -o-linear-gradient(top, #68a3d8, #125687); + background-image: linear-gradient(top, #68a3d8, #125687); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#68a3d8', EndColorStr='#125687'); + border: 1px solid #5084b4; + padding: 4px 20px; + margin: 0; + font-size: 12px; + text-decoration: none; + color: #FFF; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +article a.button:hover{ + background-color: #34719d; + background-image: -webkit-gradient(linear, left top, left bottom, from(#7fb3e1), to(#34719d)); + background-image: -webkit-linear-gradient(top, #7fb3e1, #34719d); + background-image: -moz-linear-gradient(top, #7fb3e1, #34719d); + background-image: -ms-linear-gradient(top, #7fb3e1, #34719d); + background-image: -o-linear-gradient(top, #7fb3e1, #34719d); + background-image: linear-gradient(top, #7fb3e1, #34719d); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#7fb3e1', EndColorStr='#34719d'); + text-decoration: none; +} + + + +article a.button:active{ + background-color: #125687; + background-image: -webkit-gradient(linear, left top, left bottom, from(#68a3d8), to(#125687)); + background-image: -webkit-linear-gradient(top, #68a3d8, #125687); + background-image: -moz-linear-gradient(top, #68a3d8, #125687); + background-image: -ms-linear-gradient(top, #68a3d8, #125687); + background-image: -o-linear-gradient(top, #68a3d8, #125687); + background-image: linear-gradient(top, #68a3d8, #125687); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#68a3d8', EndColorStr='#125687'); +} + +article a.disabled { + background-color: #888888; + background-image: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), to(#888888)); + background-image: -webkit-linear-gradient(top, #aaaaaa, #888888); + background-image: -moz-linear-gradient(top, #aaaaaa, #888888); + background-image: -ms-linear-gradient(top, #aaaaaa, #888888); + background-image: -o-linear-gradient(top, #aaaaaa, #888888); + background-image: linear-gradient(top, #aaaaaa, #888888); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#aaaaaa', EndColorStr='#888888'); + cursor: default; + color: #d8d8d8; + border: 1px solid #aaaaaa; + cursor: default; +} + +article h3{ + font-size: 14px; + color: #575756; + margin-bottom: 0; + padding-bottom: 2px; +} + +article h3.fix { + margin-top: 0px; + padding-top: 0px; +} + +article a{ + color: #7eb7ed; + font-size: 12px; + text-decoration: none; + padding: 0px 0px; +} + +article a:hover{ + text-decoration: underline; +} + +/* Right part of page markup */ + +article div.right div.hr { + border-bottom: 1px solid #dedede; + width: 100%; + padding-top: 30px; + margin-bottom: 40px; +} + +article div.right div.hr.bottom { + margin-bottom: 10px; + padding-top: 20px; +} + +article div.right div.hr.top { + padding-top: 7px; + margin-bottom: 20px; +} + +article div.right div.leftside { + float: left; +} + +article div.right div.rightside { + float: right; +} + + +.w25 { + width: 25px; +} + +.w420 { + width: 420px; + padding-bottom: 20px; +} + +.padd25 { + padding-left: 25px; +} + + +/* Footer */ + +footer { + height: 32px; + /*background: url("../pics/footer-bg.png");*/ + padding-left: 15px; + width: 900px; + margin: 0 auto; + text-align: center; +} + +footer ul { + margin: 0; + padding: 0; + list-style: none; + font-size: 12px; + color: #FFF; + padding-top: 10px; + text-align: left; +} + +footer ul li { + display: inline; +} + +footer ul li a { + font-size: 12px; + color: #FFF; + text-decoration: none; +} + +footer ul li a:hover { + text-decoration: underline; +} + +/* Main page */ + +aside div.bordered table{ + padding: 0; + margin: 0; + padding-bottom: 30px; + margin-left: -10px; +} + +aside div.bordered table td{ + font-size: 12px; + padding: 1px 0px 0px 0px; +} + +aside div.block table td { + text-align: right; + padding: 2px 0px 1px 0px; +} + + +aside div.block table td.first{ + width: 150px; + text-align: left; +} + +article div.right div.messages { + background: #e9f4fb; + border: 1px solid #dfeefa; + border-radius: 5px; + width: 100%; + color: #477cae; + text-align: center; + font-size: 12px; + padding: 4px 0px 4px 0px; + cursor: pointer; + margin: 15px 0px 15px 0px; +} + +article div.right div.messages:hover { + background: #dceffa; +} + +article div.right div.messages p{ + margin: 0; + padding: 0; +} + +article div.right div.activity { + border: 1px solid #d6d6d6; + width: 614px; + border-radius: 5px; + padding: 6px; + margin-top: 15px; + color: #333; +} + +article div.right div.activity div.top div.image { + float: left; +} + +article div.right div.activity div.top div.text { + float: left; + padding-left: 10px; + font-size: 12px; +} + +article div.right div.activity div.top div.text span.name { + font-weight: 700; +} + +article div.right div.activity div.top div.text span.date { + font-size: 11px; +} + +article div.right div.activity div.top div.text span.subject img { + cursor: pointer; +} + +article div.right div.activity div.fulltext { + font-size: 12px; + padding-top: 10px; + display: none; +} + +/* Admin page */ + +.admin-preferences ul { + list-style: none; + margin: 0; + padding: 0; + margin-top: 20px; + width: 215px; + text-align: left; +} + +.admin-preferences ul li{ + padding-top: 5px; + padding-bottom: 5px; + width: 215px; +} + +.admin-preferences ul li.active, .admin-preferences ul li:hover { + background: #dcecfa; +} + +.admin-preferences ul li a{ + color: #575756; + text-decoration: none; + padding-top: 5px; + padding-bottom: 5px; + padding-left: 15px; +} + +.right div.leftlist { + float: left; + width: 200px; + margin: 0px 0px 10px 0px; +} + +.right div.rightlist { + float: left; + width: 400px; + font-size: 12px; + color: #575756; + margin: 0px 0px 10px 0px; +} + +.right div.rightlist div.check { + float: left; +} + +.right div.rightlist div.forcheck { + float: left; + margin: 1px 0px 0px 5px; +} +.right div.rightlist textarea { + height: 110px; + width: 340px; + border: 1px solid #dedede; + border-radius: 4px; + padding: 5px; + font-family: Tahoma, Arial; + font-size: 12px; +} + +/* Admin-members page */ + +.right table div.img { + float: left; +} + +.right table div.radio { + float: left; + margin: 5px 0px 0px 0px; +} + +.right table div.forimg { + float: left; + margin: 5px 0px 0px 5px; +} + +.right table div.forradio { + float: left; + margin: 5px 0px 0px 5px; +} + +.right table span.niceCheck-main { + margin-top: 3px; +} + +.right div.admin-search { + float: left; +} + +.right div.admin-role { + float: left; +} + +.right div.admin-search input { + width: 300px; + margin-right: 5px; + height: 23px; + border: 1px solid #dedede; + border-radius: 3px; + margin-top: 1px; + font-size: 12px; + font-family: Tahoma, Arial; + padding-left: 5px; +} + +.right div.admin-search input.gray { + color: #cfcfcf; +} + +.right div.admin-search input.black { + color: #333333; +} + +.right div.admin-add { + float: left; + padding-top: 1px; + margin-left: 5px; +} + +.right div.admin-add a { + width: 86px; + text-align: center; + padding-bottom: 5px; +} + +/* Input elements */ + +.niceRadio { + width: 17px; + height: 17px; + display: inline-block; + cursor: pointer; + background: url(../pics/radio.png); + overflow: hidden; +} +.radioChecked { + background-position: 0 -17px; +} +.niceRadio input { + margin-left: -18px; +} + +.sel80 { + width: 200px; + padding-bottom: 4px; + text-align: left; +} +.lineForm, +.lineForm3 { + margin-bottom: 0px; +} + +.niceCheck { + width: 17px; + height: 17px; + display: inline-block; + cursor: pointer; + background: url("../pics/checkbox.png"); +} +.niceCheck input { + display: none; +} + +.niceCheck-main { + width: 18px; + height: 18px; + display: inline-block; + cursor: pointer; + background: url("../pics/checkbox-main.png"); +} +.niceCheck-main input { + display: none; +} + +/* Admin build project */ + +section.left { + float: left; + text-align: left; + width: 230px; + margin-left: 250px; +} + +section.right { + float: right; + text-align: left; + width: 200px; + margin-right: 250px; +} + +section .left { + float: left; + margin-right: 4px; +} + +/* Commits history */ + +article .fright { + float: right; +} + +article .fright p{ + margin: 0; + padding: 5px 5px 0px 0px; +} + +article .date-block { + width: 100%; + margin-top: 17px; +} + +article .date-block div.date { + float: left; + background: #bedbf6; + color: #477cae; + border: 1px solid #98bede; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 0px; + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-radius: 4px 0px 0px 4px; + border-radius: 4px 0px 0px 4px; + width: 65px; + height: 55px; + padding: 10px; + padding-top: 20px; + -webkit-box-shadow: -1px 0px 0px 1px rgba(0, 0, 0, 0.1); + -moz-box-shadow: -1px 0px 0px 1px rgba(0, 0, 0, 0.1); + box-shadow: -1px 0px 0px 1px rgba(0, 0, 0, 0.1); + font-size: 14px; + text-align: center; +} + +article .date-block div.messages { + float: left; + border: 1px solid #cfdde7; + -moz-border-radius-topleft: 0px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-radius: 0px 4px 4px 4px; + border-radius: 0px 4px 4px 4px; + padding: 10px; + padding-bottom: 0px; + width: 746px; +} + +article .date-block div.message { + border: 1px solid #d6d6d6; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-radius: 4px 4px 4px 4px; + border-radius: 4px 4px 4px 4px; + padding: 6px; + margin-bottom: 10px; +} + +article .date-block div.message div.body { + float: left; + text-align: left; +} + +article .date-block div.message div.code { + float: right; + margin: -7px 0px 0px 640px; + position: absolute; +} + +article .date-block div.code div.top { + width: 90px; + height: 22px; + border: 1px solid #9dbcd5; + background: #cbdeef; +} + +article .date-block div.code div.bottom { + width: 90px; + text-align: right; +} + +article .date-block div.code div.left { + float: left; + width: 13px; + height: 13px; + padding-left: 2px; + padding-top: 4px; +} + +article .date-block div.code div.right { + float: right; + border: 1px solid #bcd5ea; + background: #FFF; + font-size: 12px; + width: 65px; + height: 14px; + margin: 2px; + padding: 0px 2px 2px 0px; + text-align: center; +} + +article .date-block div.image { + float: left; +} + +article .date-block div.text { + float: left; + padding-left: 10px; + font-size: 12px; +} + +article .date-block div.text span.name { + font-weight: 700; +} + +article .date-block div.text span.date { + font-size: 11px; +} + +article .date-block div.text span.subject img { + cursor: pointer; +} + +article .date-block div.fulltext { + font-size: 12px; + padding-top: 10px; + display: none; + /*width: 640px;*/ +} + + +article div.year { + background: #e9f4fb; + border: 1px solid #dfeefa; + border-radius: 5px; + width: 760px; + color: 477cae; + text-align: center; + font-size: 12px; + padding: 4px; + margin-left: 87px; + margin-top: 30px; + margin-bottom: 30px; +} + +article div.year p{ + margin: 0; + padding: 0; + color: #477CAE; +} \ No newline at end of file diff --git a/lib/tasks/import.rake b/lib/tasks/import.rake index 13b6a18c8..b59a7112e 100644 --- a/lib/tasks/import.rake +++ b/lib/tasks/import.rake @@ -61,7 +61,7 @@ namespace :import do platform = Platform.find_by_name(ENV['PLATFORM'] || "mandriva2011") repository = platform.repositories.find_by_name(ENV['REPOSITORY'] || 'main') source = ENV['SOURCE'] || File.join(APP_CONFIG['root_path'], 'mirror.yandex.ru', 'mandriva', release, 'SRPMS', repository.name) - owner = Group.find_or_create_by_uname(ENV['OWNER'] || 'import') {|g| g.owner = User.first} + owner = Group.find_or_create_by_uname(ENV['OWNER'] || 'import') {|g| g.name = g.uname; g.owner = User.first} branch = "import_#{platform.name}" say 'START' diff --git a/public/images/datatables/Sorting icons.psd b/public/images/datatables/Sorting icons.psd deleted file mode 100644 index 53b2e0685..000000000 Binary files a/public/images/datatables/Sorting icons.psd and /dev/null differ diff --git a/public/images/datatables/back_disabled.jpg b/public/images/datatables/back_disabled.jpg deleted file mode 100644 index 1e73a546e..000000000 Binary files a/public/images/datatables/back_disabled.jpg and /dev/null differ diff --git a/public/images/datatables/back_enabled.jpg b/public/images/datatables/back_enabled.jpg deleted file mode 100644 index a6d764c79..000000000 Binary files a/public/images/datatables/back_enabled.jpg and /dev/null differ diff --git a/public/images/datatables/favicon.ico b/public/images/datatables/favicon.ico deleted file mode 100644 index 6eeaa2a0d..000000000 Binary files a/public/images/datatables/favicon.ico and /dev/null differ diff --git a/public/images/datatables/forward_disabled.jpg b/public/images/datatables/forward_disabled.jpg deleted file mode 100644 index 28a9dc53f..000000000 Binary files a/public/images/datatables/forward_disabled.jpg and /dev/null differ diff --git a/public/images/datatables/forward_enabled.jpg b/public/images/datatables/forward_enabled.jpg deleted file mode 100644 index 598c075f1..000000000 Binary files a/public/images/datatables/forward_enabled.jpg and /dev/null differ diff --git a/public/images/datatables/sort_asc.png b/public/images/datatables/sort_asc.png deleted file mode 100644 index a56d0e219..000000000 Binary files a/public/images/datatables/sort_asc.png and /dev/null differ diff --git a/public/images/datatables/sort_asc_disabled.png b/public/images/datatables/sort_asc_disabled.png deleted file mode 100644 index b7e621ef1..000000000 Binary files a/public/images/datatables/sort_asc_disabled.png and /dev/null differ diff --git a/public/images/datatables/sort_both.png b/public/images/datatables/sort_both.png deleted file mode 100644 index 839ac4bb5..000000000 Binary files a/public/images/datatables/sort_both.png and /dev/null differ diff --git a/public/images/datatables/sort_desc.png b/public/images/datatables/sort_desc.png deleted file mode 100644 index 90b295159..000000000 Binary files a/public/images/datatables/sort_desc.png and /dev/null differ diff --git a/public/images/datatables/sort_desc_disabled.png b/public/images/datatables/sort_desc_disabled.png deleted file mode 100644 index 2409653dc..000000000 Binary files a/public/images/datatables/sort_desc_disabled.png and /dev/null differ diff --git a/public/images/git/icons/folder_16.png b/public/images/git/icons/folder_16.png deleted file mode 100644 index 236020e2c..000000000 Binary files a/public/images/git/icons/folder_16.png and /dev/null differ diff --git a/public/images/git/icons/text_document_16.png b/public/images/git/icons/text_document_16.png deleted file mode 100644 index 809f7e016..000000000 Binary files a/public/images/git/icons/text_document_16.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png b/public/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png deleted file mode 100755 index 29460f0ef..000000000 Binary files a/public/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png b/public/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png deleted file mode 100755 index 64ece5707..000000000 Binary files a/public/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-bg_flat_10_000000_40x100.png b/public/images/jquery-ui/ui-bg_flat_10_000000_40x100.png deleted file mode 100755 index abdc01082..000000000 Binary files a/public/images/jquery-ui/ui-bg_flat_10_000000_40x100.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png b/public/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png deleted file mode 100755 index 9b383f4d2..000000000 Binary files a/public/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png b/public/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png deleted file mode 100755 index a23baad25..000000000 Binary files a/public/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png b/public/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100755 index 42ccba269..000000000 Binary files a/public/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png b/public/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png deleted file mode 100755 index 39d5824d6..000000000 Binary files a/public/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png b/public/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png deleted file mode 100755 index f1273672d..000000000 Binary files a/public/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png b/public/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png deleted file mode 100755 index 359397acf..000000000 Binary files a/public/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-icons_222222_256x240.png b/public/images/jquery-ui/ui-icons_222222_256x240.png deleted file mode 100755 index b273ff111..000000000 Binary files a/public/images/jquery-ui/ui-icons_222222_256x240.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-icons_228ef1_256x240.png b/public/images/jquery-ui/ui-icons_228ef1_256x240.png deleted file mode 100755 index a641a371a..000000000 Binary files a/public/images/jquery-ui/ui-icons_228ef1_256x240.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-icons_ef8c08_256x240.png b/public/images/jquery-ui/ui-icons_ef8c08_256x240.png deleted file mode 100755 index 85e63e9f6..000000000 Binary files a/public/images/jquery-ui/ui-icons_ef8c08_256x240.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-icons_ffd27a_256x240.png b/public/images/jquery-ui/ui-icons_ffd27a_256x240.png deleted file mode 100755 index e117effa3..000000000 Binary files a/public/images/jquery-ui/ui-icons_ffd27a_256x240.png and /dev/null differ diff --git a/public/images/jquery-ui/ui-icons_ffffff_256x240.png b/public/images/jquery-ui/ui-icons_ffffff_256x240.png deleted file mode 100755 index 42f8f992c..000000000 Binary files a/public/images/jquery-ui/ui-icons_ffffff_256x240.png and /dev/null differ diff --git a/public/images/rails.png b/public/images/rails.png deleted file mode 100644 index d5edc04e6..000000000 Binary files a/public/images/rails.png and /dev/null differ diff --git a/public/images/web-app-theme/avatar.png b/public/images/web-app-theme/avatar.png deleted file mode 100644 index 66488481a..000000000 Binary files a/public/images/web-app-theme/avatar.png and /dev/null differ diff --git a/public/images/web-app-theme/icons/application_edit.png b/public/images/web-app-theme/icons/application_edit.png deleted file mode 100644 index fb2efb877..000000000 Binary files a/public/images/web-app-theme/icons/application_edit.png and /dev/null differ diff --git a/public/images/web-app-theme/icons/cross.png b/public/images/web-app-theme/icons/cross.png deleted file mode 100644 index 1514d51a3..000000000 Binary files a/public/images/web-app-theme/icons/cross.png and /dev/null differ diff --git a/public/images/web-app-theme/icons/key.png b/public/images/web-app-theme/icons/key.png deleted file mode 100644 index 4ec1a9281..000000000 Binary files a/public/images/web-app-theme/icons/key.png and /dev/null differ diff --git a/public/images/web-app-theme/icons/tick.png b/public/images/web-app-theme/icons/tick.png deleted file mode 100644 index a9925a06a..000000000 Binary files a/public/images/web-app-theme/icons/tick.png and /dev/null differ diff --git a/public/javascripts/.gitkeep b/public/javascripts/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/public/javascripts/application.js b/public/javascripts/application.js deleted file mode 100644 index 2ab692666..000000000 --- a/public/javascripts/application.js +++ /dev/null @@ -1,46 +0,0 @@ -function disableNotifierCbx(global_cbx) { - if ($(global_cbx).attr('checked')) { - $('.notify_cbx').removeAttr('disabled'); - $('.notify_cbx').each(function(i,el) { $(el).prev().removeAttr('disabled'); }) - } else { - $('.notify_cbx').attr('disabled', 'disabled'); - $('.notify_cbx').each(function(i,el) { $(el).prev().attr('disabled', 'disabled'); }) - } -} - -$(document).ready(function() { - $('select#build_list_pl_id').change(function() { - var platform_id = $(this).val(); - var base_platforms = $('.base_platforms input[type=checkbox]'); - - $('#include_repos').html($('.preloaded_include_repos .include_repos_' + platform_id).html()); - - base_platforms.each(function(){ - if ($.inArray(platform_id, base_platforms.map(function(){ return $(this).val() }).get()) >= 0) { - if ($(this).val() == platform_id) { - $(this).attr('checked', 'checked'); - $(this).removeAttr('disabled'); - } else { - $(this).removeAttr('checked'); - $(this).attr('disabled', 'disabled'); - } - } else { - $(this).removeAttr('disabled'); - } - }); - }); - $('select#build_list_pl_id').trigger('change'); - - $('input.user_role_chbx').click(function() { - var current = $(this); - current.parent().find('input.user_role_chbx').each(function(i,el) { - if ($(el).attr('id') != current.attr('id')) { - $(el).removeAttr('checked'); - } - }); - }); - - $('#settings_notifier_can_notify').click(function() { - disableNotifierCbx($(this)); - }); -}); diff --git a/public/javascripts/autocomplete-rails.js b/public/javascripts/autocomplete-rails.js deleted file mode 100644 index 2e0bfdbdc..000000000 --- a/public/javascripts/autocomplete-rails.js +++ /dev/null @@ -1,16 +0,0 @@ -/* -* Unobtrusive autocomplete -* -* To use it, you just have to include the HTML attribute autocomplete -* with the autocomplete URL as the value -* -* Example: -* -* -* Optionally, you can use a jQuery selector to specify a field that can -* be updated with the element id whenever you find a matching value -* -* Example: -* -*/ -$(document).ready(function(){$("input[data-autocomplete]").railsAutocomplete()}),function(a){var b=null;a.fn.railsAutocomplete=function(){return this.live("focus",function(){this.railsAutoCompleter||(this.railsAutoCompleter=new a.railsAutocomplete(this))})},a.railsAutocomplete=function(a){_e=a,this.init(_e)},a.railsAutocomplete.fn=a.railsAutocomplete.prototype={railsAutocomplete:"0.0.1"},a.railsAutocomplete.fn.extend=a.railsAutocomplete.extend=a.extend,a.railsAutocomplete.fn.extend({init:function(a){function b(b){return b.split(a.delimiter)}function c(a){return b(a).pop().replace(/^\s+/,"")}a.delimiter=$(a).attr("data-delimiter")||null,$(a).autocomplete({source:function(b,d){$.getJSON($(a).attr("data-autocomplete"),{term:c(b.term)},function(){$(arguments[0]).each(function(b,c){var d={};d[c.id]=c,$(a).data(d)}),d.apply(null,arguments)})},search:function(){var a=c(this.value);if(a.length<2)return!1},focus:function(){return!1},select:function(c,d){var f=b(this.value);f.pop(),f.push(d.item.value);if(a.delimiter!=null)f.push(""),this.value=f.join(a.delimiter);else{this.value=f.join(""),$(this).attr("data-id-element")&&$($(this).attr("data-id-element")).val(d.item.id);if($(this).attr("data-update-elements")){var g=$(this).data(d.item.id.toString()),h=$.parseJSON($(this).attr("data-update-elements"));for(var i in h)$(h[i]).val(g[i])}}var j=this.value;return $(this).bind("keyup.clearId",function(){$(this).val().trim()!=j.trim()&&($($(this).attr("data-id-element")).val(""),$(this).unbind("keyup.clearId"))}),$(this).trigger("railsAutocomplete.select",d),!1}})}})}(jQuery) \ No newline at end of file diff --git a/public/javascripts/drop_down_menu.js b/public/javascripts/drop_down_menu.js deleted file mode 100644 index a1f750fc6..000000000 --- a/public/javascripts/drop_down_menu.js +++ /dev/null @@ -1,43 +0,0 @@ -var DropDownMenu = function() { - this.timeout = 500; - this.close_timer = 0; - this.menu_item = 0; -}; -// open hidden layer -DropDownMenu.prototype.open = function(id) { - // cancel close timer - this.cancel_close_time(); - - // close old layer - if(this.menu_item) this.menu_item.hide(); - - // get new layer and show it - this.menu_item = $("#" + id); - this.menu_item.show(); -}; - -// close showed layer -DropDownMenu.prototype.close = function() { - if (this.menu_item) this.menu_item.hide(); -}; - -// go close timer -DropDownMenu.prototype.close_time = function() { - var _this = this; - function mclose() { - return _this.close(); - } - this.close_timer = window.setTimeout(mclose, this.timeout); -}; - -// cancel close timer -DropDownMenu.prototype.cancel_close_time = function() { - if(this.close_timer) - { - window.clearTimeout(this.close_timer); - this.close_timer = null; - } -}; - -var menu = new DropDownMenu(); -document.onclick = menu.close; diff --git a/public/javascripts/gollum/jquery.js b/public/javascripts/gollum/jquery.js deleted file mode 100644 index a4f114586..000000000 --- a/public/javascripts/gollum/jquery.js +++ /dev/null @@ -1,7179 +0,0 @@ -/*! - * jQuery JavaScript Library v1.4.4 - * http://jquery.com/ - * - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2010, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu Nov 11 19:04:53 2010 -0500 - */ -(function( window, undefined ) { - -// Use the correct document accordingly with window argument (sandbox) -var document = window.document; -var jQuery = (function() { - -// Define a local copy of jQuery -var jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context ); - }, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // A central reference to the root jQuery(document) - rootjQuery, - - // A simple way to check for HTML strings or ID strings - // (both of which we optimize for) - quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/, - - // Is it a simple selector - isSimple = /^.[^:#\[\.,]*$/, - - // Check if a string has a non-whitespace character in it - rnotwhite = /\S/, - rwhite = /\s/, - - // Used for trimming whitespace - trimLeft = /^\s+/, - trimRight = /\s+$/, - - // Check for non-word characters - rnonword = /\W/, - - // Check for digits - rdigit = /\d/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, - rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - - // Useragent RegExp - rwebkit = /(webkit)[ \/]([\w.]+)/, - ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, - rmsie = /(msie) ([\w.]+)/, - rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, - - // Keep a UserAgent string for use with jQuery.browser - userAgent = navigator.userAgent, - - // For matching the engine and version of the browser - browserMatch, - - // Has the ready events already been bound? - readyBound = false, - - // The functions to execute on DOM ready - readyList = [], - - // The ready event handler - DOMContentLoaded, - - // Save a reference to some core methods - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), or $(undefined) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // The body element only exists once, optimize finding it - if ( selector === "body" && !context && document.body ) { - this.context = document; - this[0] = document.body; - this.selector = "body"; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - doc = (context ? context.ownerDocument || context : document); - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - ret = rsingleTag.exec( selector ); - - if ( ret ) { - if ( jQuery.isPlainObject( context ) ) { - selector = [ document.createElement( ret[1] ) ]; - jQuery.fn.attr.call( selector, context, true ); - - } else { - selector = [ doc.createElement( ret[1] ) ]; - } - - } else { - ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); - selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes; - } - - return jQuery.merge( this, selector ); - - // HANDLE: $("#id") - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $("TAG") - } else if ( !context && !rnonword.test( selector ) ) { - this.selector = selector; - this.context = document; - selector = document.getElementsByTagName( selector ); - return jQuery.merge( this, selector ); - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return (context || rootjQuery).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return jQuery( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if (selector.selector !== undefined) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.4.4", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return slice.call( this, 0 ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = jQuery(); - - if ( jQuery.isArray( elems ) ) { - push.apply( ret, elems ); - - } else { - jQuery.merge( ret, elems ); - } - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + (this.selector ? " " : "") + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Attach the listeners - jQuery.bindReady(); - - // If the DOM is already ready - if ( jQuery.isReady ) { - // Execute the function immediately - fn.call( document, jQuery ); - - // Otherwise, remember the function for later - } else if ( readyList ) { - // Add the function to the wait list - readyList.push( fn ); - } - - return this; - }, - - eq: function( i ) { - return i === -1 ? - this.slice( i ) : - this.slice( i, +i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ), - "slice", slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || jQuery(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - // A third-party is pushing the ready event forwards - if ( wait === true ) { - jQuery.readyWait--; - } - - // Make sure that the DOM is not already loaded - if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - if ( readyList ) { - // Execute all of them - var fn, - i = 0, - ready = readyList; - - // Reset the list of functions - readyList = null; - - while ( (fn = ready[ i++ ]) ) { - fn.call( document, jQuery ); - } - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger( "ready" ).unbind( "ready" ); - } - } - } - }, - - bindReady: function() { - if ( readyBound ) { - return; - } - - readyBound = true; - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - return setTimeout( jQuery.ready, 1 ); - } - - // Mozilla, Opera and webkit nightlies currently support this event - if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else if ( document.attachEvent ) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent("onreadystatechange", DOMContentLoaded); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var toplevel = false; - - try { - toplevel = window.frameElement == null; - } catch(e) {} - - if ( document.documentElement.doScroll && toplevel ) { - doScrollCheck(); - } - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - // A crude way of determining if an object is a window - isWindow: function( obj ) { - return obj && typeof obj === "object" && "setInterval" in obj; - }, - - isNaN: function( obj ) { - return obj == null || !rdigit.test( obj ) || isNaN( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - for ( var name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw msg; - }, - - parseJSON: function( data ) { - if ( typeof data !== "string" || !data ) { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test(data.replace(rvalidescape, "@") - .replace(rvalidtokens, "]") - .replace(rvalidbraces, "")) ) { - - // Try to use the native JSON parser first - return window.JSON && window.JSON.parse ? - window.JSON.parse( data ) : - (new Function("return " + data))(); - - } else { - jQuery.error( "Invalid JSON: " + data ); - } - }, - - noop: function() {}, - - // Evalulates a script in a global context - globalEval: function( data ) { - if ( data && rnotwhite.test(data) ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - - if ( jQuery.support.scriptEval ) { - script.appendChild( document.createTextNode( data ) ); - } else { - script.text = data; - } - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction(object); - - if ( args ) { - if ( isObj ) { - for ( name in object ) { - if ( callback.apply( object[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( object[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in object ) { - if ( callback.call( object[ name ], name, object[ name ] ) === false ) { - break; - } - } - } else { - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {} - } - } - - return object; - }, - - // Use native String.trim function wherever possible - trim: trim ? - function( text ) { - return text == null ? - "" : - trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); - }, - - // results is for internal usage only - makeArray: function( array, results ) { - var ret = results || []; - - if ( array != null ) { - // The window, strings (and functions) also have 'length' - // The extra typeof function check is to prevent crashes - // in Safari 2 (See: #3039) - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - var type = jQuery.type(array); - - if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { - push.call( ret, array ); - } else { - jQuery.merge( ret, array ); - } - } - - return ret; - }, - - inArray: function( elem, array ) { - if ( array.indexOf ) { - return array.indexOf( elem ); - } - - for ( var i = 0, length = array.length; i < length; i++ ) { - if ( array[ i ] === elem ) { - return i; - } - } - - return -1; - }, - - merge: function( first, second ) { - var i = first.length, - j = 0; - - if ( typeof second.length === "number" ) { - for ( var l = second.length; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var ret = [], retVal; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( var i = 0, length = elems.length; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var ret = [], value; - - // Go through the array, translating each of the items to their - // new value (or values). - for ( var i = 0, length = elems.length; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - proxy: function( fn, proxy, thisObject ) { - if ( arguments.length === 2 ) { - if ( typeof proxy === "string" ) { - thisObject = fn; - fn = thisObject[ proxy ]; - proxy = undefined; - - } else if ( proxy && !jQuery.isFunction( proxy ) ) { - thisObject = proxy; - proxy = undefined; - } - } - - if ( !proxy && fn ) { - proxy = function() { - return fn.apply( thisObject || this, arguments ); - }; - } - - // Set the guid of unique handler to the same of original handler, so it can be removed - if ( fn ) { - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - } - - // So proxy can be declared as an argument - return proxy; - }, - - // Mutifunctional method to get and set values to a collection - // The value/s can be optionally by executed if its a function - access: function( elems, key, value, exec, fn, pass ) { - var length = elems.length; - - // Setting many attributes - if ( typeof key === "object" ) { - for ( var k in key ) { - jQuery.access( elems, k, key[k], exec, fn, value ); - } - return elems; - } - - // Setting one attribute - if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = !pass && exec && jQuery.isFunction(value); - - for ( var i = 0; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - - return elems; - } - - // Getting an attribute - return length ? fn( elems[0], key ) : undefined; - }, - - now: function() { - return (new Date()).getTime(); - }, - - // Use of jQuery.browser is frowned upon. - // More details: http://docs.jquery.com/Utilities/jQuery.browser - uaMatch: function( ua ) { - ua = ua.toLowerCase(); - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }, - - browser: {} -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -browserMatch = jQuery.uaMatch( userAgent ); -if ( browserMatch.browser ) { - jQuery.browser[ browserMatch.browser ] = true; - jQuery.browser.version = browserMatch.version; -} - -// Deprecated, use jQuery.browser.webkit instead -if ( jQuery.browser.webkit ) { - jQuery.browser.safari = true; -} - -if ( indexOf ) { - jQuery.inArray = function( elem, array ) { - return indexOf.call( array, elem ); - }; -} - -// Verify that \s matches non-breaking spaces -// (IE fails on this test) -if ( !rwhite.test( "\xA0" ) ) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); - -// Cleanup functions for the document ready method -if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - }; - -} else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; -} - -// The DOM ready check for Internet Explorer -function doScrollCheck() { - if ( jQuery.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - jQuery.ready(); -} - -// Expose jQuery to the global object -return (window.jQuery = window.$ = jQuery); - -})(); - - -(function() { - - jQuery.support = {}; - - var root = document.documentElement, - script = document.createElement("script"), - div = document.createElement("div"), - id = "script" + jQuery.now(); - - div.style.display = "none"; - div.innerHTML = "
a"; - - var all = div.getElementsByTagName("*"), - a = div.getElementsByTagName("a")[0], - select = document.createElement("select"), - opt = select.appendChild( document.createElement("option") ); - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return; - } - - jQuery.support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: div.firstChild.nodeType === 3, - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText insted) - style: /red/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: a.getAttribute("href") === "/a", - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.55$/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: div.getElementsByTagName("input")[0].value === "on", - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Will be defined later - deleteExpando: true, - optDisabled: false, - checkClone: false, - scriptEval: false, - noCloneEvent: true, - boxModel: null, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableHiddenOffsets: true - }; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as diabled) - select.disabled = true; - jQuery.support.optDisabled = !opt.disabled; - - script.type = "text/javascript"; - try { - script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); - } catch(e) {} - - root.insertBefore( script, root.firstChild ); - - // Make sure that the execution of code works by injecting a script - // tag with appendChild/createTextNode - // (IE doesn't support this, fails, and uses .text instead) - if ( window[ id ] ) { - jQuery.support.scriptEval = true; - delete window[ id ]; - } - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete script.test; - - } catch(e) { - jQuery.support.deleteExpando = false; - } - - root.removeChild( script ); - - if ( div.attachEvent && div.fireEvent ) { - div.attachEvent("onclick", function click() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - jQuery.support.noCloneEvent = false; - div.detachEvent("onclick", click); - }); - div.cloneNode(true).fireEvent("onclick"); - } - - div = document.createElement("div"); - div.innerHTML = ""; - - var fragment = document.createDocumentFragment(); - fragment.appendChild( div.firstChild ); - - // WebKit doesn't clone checked state correctly in fragments - jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; - - // Figure out if the W3C box model works as expected - // document.body must exist before we can do this - jQuery(function() { - var div = document.createElement("div"); - div.style.width = div.style.paddingLeft = "1px"; - - document.body.appendChild( div ); - jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; - - if ( "zoom" in div.style ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.style.display = "inline"; - div.style.zoom = 1; - jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2; - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = ""; - div.innerHTML = "
"; - jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2; - } - - div.innerHTML = "
t
"; - var tds = div.getElementsByTagName("td"); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0; - - tds[0].style.display = ""; - tds[1].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE < 8 fail this test) - jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0; - div.innerHTML = ""; - - document.body.removeChild( div ).style.display = "none"; - div = tds = null; - }); - - // Technique from Juriy Zaytsev - // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ - var eventSupported = function( eventName ) { - var el = document.createElement("div"); - eventName = "on" + eventName; - - var isSupported = (eventName in el); - if ( !isSupported ) { - el.setAttribute(eventName, "return;"); - isSupported = typeof el[eventName] === "function"; - } - el = null; - - return isSupported; - }; - - jQuery.support.submitBubbles = eventSupported("submit"); - jQuery.support.changeBubbles = eventSupported("change"); - - // release memory in IE - root = script = div = all = a = null; -})(); - - - -var windowData = {}, - rbrace = /^(?:\{.*\}|\[.*\])$/; - -jQuery.extend({ - cache: {}, - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - expando: "jQuery" + jQuery.now(), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - data: function( elem, name, data ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - elem = elem == window ? - windowData : - elem; - - var isNode = elem.nodeType, - id = isNode ? elem[ jQuery.expando ] : null, - cache = jQuery.cache, thisCache; - - if ( isNode && !id && typeof name === "string" && data === undefined ) { - return; - } - - // Get the data from the object directly - if ( !isNode ) { - cache = elem; - - // Compute a unique ID for the element - } else if ( !id ) { - elem[ jQuery.expando ] = id = ++jQuery.uuid; - } - - // Avoid generating a new cache unless none exists and we - // want to manipulate it. - if ( typeof name === "object" ) { - if ( isNode ) { - cache[ id ] = jQuery.extend(cache[ id ], name); - - } else { - jQuery.extend( cache, name ); - } - - } else if ( isNode && !cache[ id ] ) { - cache[ id ] = {}; - } - - thisCache = isNode ? cache[ id ] : cache; - - // Prevent overriding the named cache with undefined values - if ( data !== undefined ) { - thisCache[ name ] = data; - } - - return typeof name === "string" ? thisCache[ name ] : thisCache; - }, - - removeData: function( elem, name ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - elem = elem == window ? - windowData : - elem; - - var isNode = elem.nodeType, - id = isNode ? elem[ jQuery.expando ] : elem, - cache = jQuery.cache, - thisCache = isNode ? cache[ id ] : id; - - // If we want to remove a specific section of the element's data - if ( name ) { - if ( thisCache ) { - // Remove the section of cache data - delete thisCache[ name ]; - - // If we've removed all the data, remove the element's cache - if ( isNode && jQuery.isEmptyObject(thisCache) ) { - jQuery.removeData( elem ); - } - } - - // Otherwise, we want to remove all of the element's data - } else { - if ( isNode && jQuery.support.deleteExpando ) { - delete elem[ jQuery.expando ]; - - } else if ( elem.removeAttribute ) { - elem.removeAttribute( jQuery.expando ); - - // Completely remove the data cache - } else if ( isNode ) { - delete cache[ id ]; - - // Remove all fields from the object - } else { - for ( var n in elem ) { - delete elem[ n ]; - } - } - } - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - if ( elem.nodeName ) { - var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; - - if ( match ) { - return !(match === true || elem.getAttribute("classid") !== match); - } - } - - return true; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var data = null; - - if ( typeof key === "undefined" ) { - if ( this.length ) { - var attr = this[0].attributes, name; - data = jQuery.data( this[0] ); - - for ( var i = 0, l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = name.substr( 5 ); - dataAttr( this[0], name, data[ name ] ); - } - } - } - - return data; - - } else if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - var parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - // Try to fetch any internally stored data first - if ( data === undefined && this.length ) { - data = jQuery.data( this[0], key ); - data = dataAttr( this[0], key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - - } else { - return this.each(function() { - var $this = jQuery( this ), - args = [ parts[0], value ]; - - $this.triggerHandler( "setData" + parts[1] + "!", args ); - jQuery.data( this, key, value ); - $this.triggerHandler( "changeData" + parts[1] + "!", args ); - }); - } - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - data = elem.getAttribute( "data-" + key ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - !jQuery.isNaN( data ) ? parseFloat( data ) : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - - - - -jQuery.extend({ - queue: function( elem, type, data ) { - if ( !elem ) { - return; - } - - type = (type || "fx") + "queue"; - var q = jQuery.data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( !data ) { - return q || []; - } - - if ( !q || jQuery.isArray(data) ) { - q = jQuery.data( elem, type, jQuery.makeArray(data) ); - - } else { - q.push( data ); - } - - return q; - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(); - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift("inprogress"); - } - - fn.call(elem, function() { - jQuery.dequeue(elem, type); - }); - } - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - } - - if ( data === undefined ) { - return jQuery.queue( this[0], type ); - } - return this.each(function( i ) { - var queue = jQuery.queue( this, type, data ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; - type = type || "fx"; - - return this.queue( type, function() { - var elem = this; - setTimeout(function() { - jQuery.dequeue( elem, type ); - }, time ); - }); - }, - - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - } -}); - - - - -var rclass = /[\n\t]/g, - rspaces = /\s+/, - rreturn = /\r/g, - rspecialurl = /^(?:href|src|style)$/, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea)?$/i, - rradiocheck = /^(?:radio|checkbox)$/i; - -jQuery.props = { - "for": "htmlFor", - "class": "className", - readonly: "readOnly", - maxlength: "maxLength", - cellspacing: "cellSpacing", - rowspan: "rowSpan", - colspan: "colSpan", - tabindex: "tabIndex", - usemap: "useMap", - frameborder: "frameBorder" -}; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.attr ); - }, - - removeAttr: function( name, fn ) { - return this.each(function(){ - jQuery.attr( this, name, "" ); - if ( this.nodeType === 1 ) { - this.removeAttribute( name ); - } - }); - }, - - addClass: function( value ) { - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - self.addClass( value.call(this, i, self.attr("class")) ); - }); - } - - if ( value && typeof value === "string" ) { - var classNames = (value || "").split( rspaces ); - - for ( var i = 0, l = this.length; i < l; i++ ) { - var elem = this[i]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className ) { - elem.className = value; - - } else { - var className = " " + elem.className + " ", - setClass = elem.className; - - for ( var c = 0, cl = classNames.length; c < cl; c++ ) { - if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { - setClass += " " + classNames[c]; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - self.removeClass( value.call(this, i, self.attr("class")) ); - }); - } - - if ( (value && typeof value === "string") || value === undefined ) { - var classNames = (value || "").split( rspaces ); - - for ( var i = 0, l = this.length; i < l; i++ ) { - var elem = this[i]; - - if ( elem.nodeType === 1 && elem.className ) { - if ( value ) { - var className = (" " + elem.className + " ").replace(rclass, " "); - for ( var c = 0, cl = classNames.length; c < cl; c++ ) { - className = className.replace(" " + classNames[c] + " ", " "); - } - elem.className = jQuery.trim( className ); - - } else { - elem.className = ""; - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this); - self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( rspaces ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space seperated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery.data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " "; - for ( var i = 0, l = this.length; i < l; i++ ) { - if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - if ( !arguments.length ) { - var elem = this[0]; - - if ( elem ) { - if ( jQuery.nodeName( elem, "option" ) ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery(option).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - } - - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { - return elem.getAttribute("value") === null ? "on" : elem.value; - } - - - // Everything else, we just grab the value - return (elem.value || "").replace(rreturn, ""); - - } - - return undefined; - } - - var isFunction = jQuery.isFunction(value); - - return this.each(function(i) { - var self = jQuery(this), val = value; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call(this, i, self.val()); - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray(val) ) { - val = jQuery.map(val, function (value) { - return value == null ? "" : value + ""; - }); - } - - if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { - this.checked = jQuery.inArray( self.val(), val ) >= 0; - - } else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(val); - - jQuery( "option", this ).each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - this.selectedIndex = -1; - } - - } else { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - attrFn: { - val: true, - css: true, - html: true, - text: true, - data: true, - width: true, - height: true, - offset: true - }, - - attr: function( elem, name, value, pass ) { - // don't set attributes on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { - return undefined; - } - - if ( pass && name in jQuery.attrFn ) { - return jQuery(elem)[name](value); - } - - var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ), - // Whether we are setting (or getting) - set = value !== undefined; - - // Try to normalize/fix the name - name = notxml && jQuery.props[ name ] || name; - - // These attributes require special treatment - var special = rspecialurl.test( name ); - - // Safari mis-reports the default selected property of an option - // Accessing the parent's selectedIndex property fixes it - if ( name === "selected" && !jQuery.support.optSelected ) { - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - - // If applicable, access the attribute via the DOM 0 way - // 'in' checks fail in Blackberry 4.7 #6931 - if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) { - if ( set ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } - - if ( value === null ) { - if ( elem.nodeType === 1 ) { - elem.removeAttribute( name ); - } - - } else { - elem[ name ] = value; - } - } - - // browsers index elements by id/name on forms, give priority to attributes. - if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) { - return elem.getAttributeNode( name ).nodeValue; - } - - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - if ( name === "tabIndex" ) { - var attributeNode = elem.getAttributeNode( "tabIndex" ); - - return attributeNode && attributeNode.specified ? - attributeNode.value : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - - return elem[ name ]; - } - - if ( !jQuery.support.style && notxml && name === "style" ) { - if ( set ) { - elem.style.cssText = "" + value; - } - - return elem.style.cssText; - } - - if ( set ) { - // convert the value to a string (all browsers do this but IE) see #1070 - elem.setAttribute( name, "" + value ); - } - - // Ensure that missing attributes return undefined - // Blackberry 4.7 returns "" from getAttribute #6938 - if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) { - return undefined; - } - - var attr = !jQuery.support.hrefNormalized && notxml && special ? - // Some attributes require a special call on IE - elem.getAttribute( name, 2 ) : - elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return attr === null ? undefined : attr; - } -}); - - - - -var rnamespaces = /\.(.*)$/, - rformElems = /^(?:textarea|input|select)$/i, - rperiod = /\./g, - rspace = / /g, - rescape = /[^\w\s.|`]/g, - fcleanup = function( nm ) { - return nm.replace(rescape, "\\$&"); - }, - focusCounts = { focusin: 0, focusout: 0 }; - -/* - * A number of helper functions used for managing events. - * Many of the ideas behind this code originated from - * Dean Edwards' addEvent library. - */ -jQuery.event = { - - // Bind an event to an element - // Original by Dean Edwards - add: function( elem, types, handler, data ) { - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // For whatever reason, IE has trouble passing the window object - // around, causing it to be cloned in the process - if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) { - elem = window; - } - - if ( handler === false ) { - handler = returnFalse; - } else if ( !handler ) { - // Fixes bug #7229. Fix recommended by jdalton - return; - } - - var handleObjIn, handleObj; - - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - } - - // Make sure that the function being executed has a unique ID - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure - var elemData = jQuery.data( elem ); - - // If no elemData is found then we must be trying to bind to one of the - // banned noData elements - if ( !elemData ) { - return; - } - - // Use a key less likely to result in collisions for plain JS objects. - // Fixes bug #7150. - var eventKey = elem.nodeType ? "events" : "__events__", - events = elemData[ eventKey ], - eventHandle = elemData.handle; - - if ( typeof events === "function" ) { - // On plain objects events is a fn that holds the the data - // which prevents this data from being JSON serialized - // the function does not need to be called, it just contains the data - eventHandle = events.handle; - events = events.events; - - } else if ( !events ) { - if ( !elem.nodeType ) { - // On plain objects, create a fn that acts as the holder - // of the values to avoid JSON serialization of event data - elemData[ eventKey ] = elemData = function(){}; - } - - elemData.events = events = {}; - } - - if ( !eventHandle ) { - elemData.handle = eventHandle = function() { - // Handle the second event of a trigger and when - // an event is called after a page has unloaded - return typeof jQuery !== "undefined" && !jQuery.event.triggered ? - jQuery.event.handle.apply( eventHandle.elem, arguments ) : - undefined; - }; - } - - // Add elem as a property of the handle function - // This is to prevent a memory leak with non-native events in IE. - eventHandle.elem = elem; - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = types.split(" "); - - var type, i = 0, namespaces; - - while ( (type = types[ i++ ]) ) { - handleObj = handleObjIn ? - jQuery.extend({}, handleObjIn) : - { handler: handler, data: data }; - - // Namespaced event handlers - if ( type.indexOf(".") > -1 ) { - namespaces = type.split("."); - type = namespaces.shift(); - handleObj.namespace = namespaces.slice(0).sort().join("."); - - } else { - namespaces = []; - handleObj.namespace = ""; - } - - handleObj.type = type; - if ( !handleObj.guid ) { - handleObj.guid = handler.guid; - } - - // Get the current list of functions bound to this event - var handlers = events[ type ], - special = jQuery.event.special[ type ] || {}; - - // Init the event handler queue - if ( !handlers ) { - handlers = events[ type ] = []; - - // Check for a special event handler - // Only use addEventListener/attachEvent if the special - // events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add the function to the element's handler list - handlers.push( handleObj ); - - // Keep track of which events have been used, for global triggering - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, pos ) { - // don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - if ( handler === false ) { - handler = returnFalse; - } - - var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, - eventKey = elem.nodeType ? "events" : "__events__", - elemData = jQuery.data( elem ), - events = elemData && elemData[ eventKey ]; - - if ( !elemData || !events ) { - return; - } - - if ( typeof events === "function" ) { - elemData = events; - events = events.events; - } - - // types is actually an event object here - if ( types && types.type ) { - handler = types.handler; - types = types.type; - } - - // Unbind all events for the element - if ( !types || typeof types === "string" && types.charAt(0) === "." ) { - types = types || ""; - - for ( type in events ) { - jQuery.event.remove( elem, type + types ); - } - - return; - } - - // Handle multiple events separated by a space - // jQuery(...).unbind("mouseover mouseout", fn); - types = types.split(" "); - - while ( (type = types[ i++ ]) ) { - origType = type; - handleObj = null; - all = type.indexOf(".") < 0; - namespaces = []; - - if ( !all ) { - // Namespaced event handlers - namespaces = type.split("."); - type = namespaces.shift(); - - namespace = new RegExp("(^|\\.)" + - jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - eventType = events[ type ]; - - if ( !eventType ) { - continue; - } - - if ( !handler ) { - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( all || namespace.test( handleObj.namespace ) ) { - jQuery.event.remove( elem, origType, handleObj.handler, j ); - eventType.splice( j--, 1 ); - } - } - - continue; - } - - special = jQuery.event.special[ type ] || {}; - - for ( j = pos || 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( handler.guid === handleObj.guid ) { - // remove the given handler for the given type - if ( all || namespace.test( handleObj.namespace ) ) { - if ( pos == null ) { - eventType.splice( j--, 1 ); - } - - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - - if ( pos != null ) { - break; - } - } - } - - // remove generic event handler if no more handlers exist - if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { - if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - ret = null; - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - var handle = elemData.handle; - if ( handle ) { - handle.elem = null; - } - - delete elemData.events; - delete elemData.handle; - - if ( typeof elemData === "function" ) { - jQuery.removeData( elem, eventKey ); - - } else if ( jQuery.isEmptyObject( elemData ) ) { - jQuery.removeData( elem ); - } - } - }, - - // bubbling is internal - trigger: function( event, data, elem /*, bubbling */ ) { - // Event object or event type - var type = event.type || event, - bubbling = arguments[3]; - - if ( !bubbling ) { - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - jQuery.extend( jQuery.Event(type), event ) : - // Just the event type (string) - jQuery.Event(type); - - if ( type.indexOf("!") >= 0 ) { - event.type = type = type.slice(0, -1); - event.exclusive = true; - } - - // Handle a global trigger - if ( !elem ) { - // Don't bubble custom events when global (to avoid too much overhead) - event.stopPropagation(); - - // Only trigger if we've ever bound an event for it - if ( jQuery.event.global[ type ] ) { - jQuery.each( jQuery.cache, function() { - if ( this.events && this.events[type] ) { - jQuery.event.trigger( event, data, this.handle.elem ); - } - }); - } - } - - // Handle triggering a single element - - // don't do events on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { - return undefined; - } - - // Clean up in case it is reused - event.result = undefined; - event.target = elem; - - // Clone the incoming data, if any - data = jQuery.makeArray( data ); - data.unshift( event ); - } - - event.currentTarget = elem; - - // Trigger the event, it is assumed that "handle" is a function - var handle = elem.nodeType ? - jQuery.data( elem, "handle" ) : - (jQuery.data( elem, "__events__" ) || {}).handle; - - if ( handle ) { - handle.apply( elem, data ); - } - - var parent = elem.parentNode || elem.ownerDocument; - - // Trigger an inline bound script - try { - if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) { - if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) { - event.result = false; - event.preventDefault(); - } - } - - // prevent IE from throwing an error for some elements with some event types, see #3533 - } catch (inlineError) {} - - if ( !event.isPropagationStopped() && parent ) { - jQuery.event.trigger( event, data, parent, true ); - - } else if ( !event.isDefaultPrevented() ) { - var old, - target = event.target, - targetType = type.replace( rnamespaces, "" ), - isClick = jQuery.nodeName( target, "a" ) && targetType === "click", - special = jQuery.event.special[ targetType ] || {}; - - if ( (!special._default || special._default.call( elem, event ) === false) && - !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) { - - try { - if ( target[ targetType ] ) { - // Make sure that we don't accidentally re-trigger the onFOO events - old = target[ "on" + targetType ]; - - if ( old ) { - target[ "on" + targetType ] = null; - } - - jQuery.event.triggered = true; - target[ targetType ](); - } - - // prevent IE from throwing an error for some elements with some event types, see #3533 - } catch (triggerError) {} - - if ( old ) { - target[ "on" + targetType ] = old; - } - - jQuery.event.triggered = false; - } - } - }, - - handle: function( event ) { - var all, handlers, namespaces, namespace_re, events, - namespace_sort = [], - args = jQuery.makeArray( arguments ); - - event = args[0] = jQuery.event.fix( event || window.event ); - event.currentTarget = this; - - // Namespaced event handlers - all = event.type.indexOf(".") < 0 && !event.exclusive; - - if ( !all ) { - namespaces = event.type.split("."); - event.type = namespaces.shift(); - namespace_sort = namespaces.slice(0).sort(); - namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - event.namespace = event.namespace || namespace_sort.join("."); - - events = jQuery.data(this, this.nodeType ? "events" : "__events__"); - - if ( typeof events === "function" ) { - events = events.events; - } - - handlers = (events || {})[ event.type ]; - - if ( events && handlers ) { - // Clone the handlers to prevent manipulation - handlers = handlers.slice(0); - - for ( var j = 0, l = handlers.length; j < l; j++ ) { - var handleObj = handlers[ j ]; - - // Filter the functions by class - if ( all || namespace_re.test( handleObj.namespace ) ) { - // Pass in a reference to the handler function itself - // So that we can later remove it - event.handler = handleObj.handler; - event.data = handleObj.data; - event.handleObj = handleObj; - - var ret = handleObj.handler.apply( this, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - - if ( event.isImmediatePropagationStopped() ) { - break; - } - } - } - } - - return event.result; - }, - - props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // store a copy of the original event object - // and "clone" to set read-only properties - var originalEvent = event; - event = jQuery.Event( originalEvent ); - - for ( var i = this.props.length, prop; i; ) { - prop = this.props[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary - if ( !event.target ) { - // Fixes #1925 where srcElement might not be defined either - event.target = event.srcElement || document; - } - - // check if target is a textnode (safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && event.fromElement ) { - event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; - } - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && event.clientX != null ) { - var doc = document.documentElement, - body = document.body; - - event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); - event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); - } - - // Add which for key events - if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { - event.which = event.charCode != null ? event.charCode : event.keyCode; - } - - // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) - if ( !event.metaKey && event.ctrlKey ) { - event.metaKey = event.ctrlKey; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && event.button !== undefined ) { - event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); - } - - return event; - }, - - // Deprecated, use jQuery.guid instead - guid: 1E8, - - // Deprecated, use jQuery.proxy instead - proxy: jQuery.proxy, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady, - teardown: jQuery.noop - }, - - live: { - add: function( handleObj ) { - jQuery.event.add( this, - liveConvert( handleObj.origType, handleObj.selector ), - jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); - }, - - remove: function( handleObj ) { - jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); - } - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - if ( elem.detachEvent ) { - elem.detachEvent( "on" + type, handle ); - } - }; - -jQuery.Event = function( src ) { - // Allow instantiation without the 'new' keyword - if ( !this.preventDefault ) { - return new jQuery.Event( src ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - // Event type - } else { - this.type = src; - } - - // timeStamp is buggy for some events on Firefox(#3843) - // So we won't rely on the native value - this.timeStamp = jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Checks if an event happened on an element within another element -// Used in jQuery.event.special.mouseenter and mouseleave handlers -var withinElement = function( event ) { - // Check if mouse(over|out) are still within the same parent element - var parent = event.relatedTarget; - - // Firefox sometimes assigns relatedTarget a XUL element - // which we cannot access the parentNode property of - try { - // Traverse up the tree - while ( parent && parent !== this ) { - parent = parent.parentNode; - } - - if ( parent !== this ) { - // set the correct event type - event.type = event.data; - - // handle event if we actually just moused on to a non sub-element - jQuery.event.handle.apply( this, arguments ); - } - - // assuming we've left the element since we most likely mousedover a xul element - } catch(e) { } -}, - -// In case of event delegation, we only need to rename the event.type, -// liveHandler will take care of the rest. -delegate = function( event ) { - event.type = event.data; - jQuery.event.handle.apply( this, arguments ); -}; - -// Create mouseenter and mouseleave events -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - setup: function( data ) { - jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); - }, - teardown: function( data ) { - jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); - } - }; -}); - -// submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function( data, namespaces ) { - if ( this.nodeName.toLowerCase() !== "form" ) { - jQuery.event.add(this, "click.specialSubmit", function( e ) { - var elem = e.target, - type = elem.type; - - if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { - e.liveFired = undefined; - return trigger( "submit", this, arguments ); - } - }); - - jQuery.event.add(this, "keypress.specialSubmit", function( e ) { - var elem = e.target, - type = elem.type; - - if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { - e.liveFired = undefined; - return trigger( "submit", this, arguments ); - } - }); - - } else { - return false; - } - }, - - teardown: function( namespaces ) { - jQuery.event.remove( this, ".specialSubmit" ); - } - }; - -} - -// change delegation, happens here so we have bind. -if ( !jQuery.support.changeBubbles ) { - - var changeFilters, - - getVal = function( elem ) { - var type = elem.type, val = elem.value; - - if ( type === "radio" || type === "checkbox" ) { - val = elem.checked; - - } else if ( type === "select-multiple" ) { - val = elem.selectedIndex > -1 ? - jQuery.map( elem.options, function( elem ) { - return elem.selected; - }).join("-") : - ""; - - } else if ( elem.nodeName.toLowerCase() === "select" ) { - val = elem.selectedIndex; - } - - return val; - }, - - testChange = function testChange( e ) { - var elem = e.target, data, val; - - if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { - return; - } - - data = jQuery.data( elem, "_change_data" ); - val = getVal(elem); - - // the current data will be also retrieved by beforeactivate - if ( e.type !== "focusout" || elem.type !== "radio" ) { - jQuery.data( elem, "_change_data", val ); - } - - if ( data === undefined || val === data ) { - return; - } - - if ( data != null || val ) { - e.type = "change"; - e.liveFired = undefined; - return jQuery.event.trigger( e, arguments[1], elem ); - } - }; - - jQuery.event.special.change = { - filters: { - focusout: testChange, - - beforedeactivate: testChange, - - click: function( e ) { - var elem = e.target, type = elem.type; - - if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) { - return testChange.call( this, e ); - } - }, - - // Change has to be called before submit - // Keydown will be called before keypress, which is used in submit-event delegation - keydown: function( e ) { - var elem = e.target, type = elem.type; - - if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") || - (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || - type === "select-multiple" ) { - return testChange.call( this, e ); - } - }, - - // Beforeactivate happens also before the previous element is blurred - // with this event you can't trigger a change event, but you can store - // information - beforeactivate: function( e ) { - var elem = e.target; - jQuery.data( elem, "_change_data", getVal(elem) ); - } - }, - - setup: function( data, namespaces ) { - if ( this.type === "file" ) { - return false; - } - - for ( var type in changeFilters ) { - jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); - } - - return rformElems.test( this.nodeName ); - }, - - teardown: function( namespaces ) { - jQuery.event.remove( this, ".specialChange" ); - - return rformElems.test( this.nodeName ); - } - }; - - changeFilters = jQuery.event.special.change.filters; - - // Handle when the input is .focus()'d - changeFilters.focus = changeFilters.beforeactivate; -} - -function trigger( type, elem, args ) { - args[0].type = type; - return jQuery.event.handle.apply( elem, args ); -} - -// Create "bubbling" focus and blur events -if ( document.addEventListener ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - jQuery.event.special[ fix ] = { - setup: function() { - if ( focusCounts[fix]++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --focusCounts[fix] === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - - function handler( e ) { - e = jQuery.event.fix( e ); - e.type = fix; - return jQuery.event.trigger( e, null, e.target ); - } - }); -} - -jQuery.each(["bind", "one"], function( i, name ) { - jQuery.fn[ name ] = function( type, data, fn ) { - // Handle object literals - if ( typeof type === "object" ) { - for ( var key in type ) { - this[ name ](key, data, type[key], fn); - } - return this; - } - - if ( jQuery.isFunction( data ) || data === false ) { - fn = data; - data = undefined; - } - - var handler = name === "one" ? jQuery.proxy( fn, function( event ) { - jQuery( this ).unbind( event, handler ); - return fn.apply( this, arguments ); - }) : fn; - - if ( type === "unload" && name !== "one" ) { - this.one( type, data, fn ); - - } else { - for ( var i = 0, l = this.length; i < l; i++ ) { - jQuery.event.add( this[i], type, handler, data ); - } - } - - return this; - }; -}); - -jQuery.fn.extend({ - unbind: function( type, fn ) { - // Handle object literals - if ( typeof type === "object" && !type.preventDefault ) { - for ( var key in type ) { - this.unbind(key, type[key]); - } - - } else { - for ( var i = 0, l = this.length; i < l; i++ ) { - jQuery.event.remove( this[i], type, fn ); - } - } - - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.live( types, data, fn, selector ); - }, - - undelegate: function( selector, types, fn ) { - if ( arguments.length === 0 ) { - return this.unbind( "live" ); - - } else { - return this.die( types, null, fn, selector ); - } - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - - triggerHandler: function( type, data ) { - if ( this[0] ) { - var event = jQuery.Event( type ); - event.preventDefault(); - event.stopPropagation(); - jQuery.event.trigger( event, data, this[0] ); - return event.result; - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - i = 1; - - // link all the functions, so any of them can unbind this click handler - while ( i < args.length ) { - jQuery.proxy( fn, args[ i++ ] ); - } - - return this.click( jQuery.proxy( fn, function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - })); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -var liveMap = { - focus: "focusin", - blur: "focusout", - mouseenter: "mouseover", - mouseleave: "mouseout" -}; - -jQuery.each(["live", "die"], function( i, name ) { - jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { - var type, i = 0, match, namespaces, preType, - selector = origSelector || this.selector, - context = origSelector ? this : jQuery( this.context ); - - if ( typeof types === "object" && !types.preventDefault ) { - for ( var key in types ) { - context[ name ]( key, data, types[key], selector ); - } - - return this; - } - - if ( jQuery.isFunction( data ) ) { - fn = data; - data = undefined; - } - - types = (types || "").split(" "); - - while ( (type = types[ i++ ]) != null ) { - match = rnamespaces.exec( type ); - namespaces = ""; - - if ( match ) { - namespaces = match[0]; - type = type.replace( rnamespaces, "" ); - } - - if ( type === "hover" ) { - types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); - continue; - } - - preType = type; - - if ( type === "focus" || type === "blur" ) { - types.push( liveMap[ type ] + namespaces ); - type = type + namespaces; - - } else { - type = (liveMap[ type ] || type) + namespaces; - } - - if ( name === "live" ) { - // bind live handler - for ( var j = 0, l = context.length; j < l; j++ ) { - jQuery.event.add( context[j], "live." + liveConvert( type, selector ), - { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); - } - - } else { - // unbind live handler - context.unbind( "live." + liveConvert( type, selector ), fn ); - } - } - - return this; - }; -}); - -function liveHandler( event ) { - var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, - elems = [], - selectors = [], - events = jQuery.data( this, this.nodeType ? "events" : "__events__" ); - - if ( typeof events === "function" ) { - events = events.events; - } - - // Make sure we avoid non-left-click bubbling in Firefox (#3861) - if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) { - return; - } - - if ( event.namespace ) { - namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - event.liveFired = this; - - var live = events.live.slice(0); - - for ( j = 0; j < live.length; j++ ) { - handleObj = live[j]; - - if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { - selectors.push( handleObj.selector ); - - } else { - live.splice( j--, 1 ); - } - } - - match = jQuery( event.target ).closest( selectors, event.currentTarget ); - - for ( i = 0, l = match.length; i < l; i++ ) { - close = match[i]; - - for ( j = 0; j < live.length; j++ ) { - handleObj = live[j]; - - if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) { - elem = close.elem; - related = null; - - // Those two events require additional checking - if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { - event.type = handleObj.preType; - related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; - } - - if ( !related || related !== elem ) { - elems.push({ elem: elem, handleObj: handleObj, level: close.level }); - } - } - } - } - - for ( i = 0, l = elems.length; i < l; i++ ) { - match = elems[i]; - - if ( maxLevel && match.level > maxLevel ) { - break; - } - - event.currentTarget = match.elem; - event.data = match.handleObj.data; - event.handleObj = match.handleObj; - - ret = match.handleObj.origHandler.apply( match.elem, arguments ); - - if ( ret === false || event.isPropagationStopped() ) { - maxLevel = match.level; - - if ( ret === false ) { - stop = false; - } - if ( event.isImmediatePropagationStopped() ) { - break; - } - } - } - - return stop; -} - -function liveConvert( type, selector ) { - return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&"); -} - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.bind( name, data, fn ) : - this.trigger( name ); - }; - - if ( jQuery.attrFn ) { - jQuery.attrFn[ name ] = true; - } -}); - -// Prevent memory leaks in IE -// Window isn't included so as not to unbind existing unload events -// More info: -// - http://isaacschlueter.com/2006/10/msie-memory-leaks/ -if ( window.attachEvent && !window.addEventListener ) { - jQuery(window).bind("unload", function() { - for ( var id in jQuery.cache ) { - if ( jQuery.cache[ id ].handle ) { - // Try/Catch is to handle iframes being unloaded, see #4280 - try { - jQuery.event.remove( jQuery.cache[ id ].handle.elem ); - } catch(e) {} - } - } - }); -} - - -/*! - * Sizzle CSS Selector Engine - v1.0 - * Copyright 2009, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){ - -var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true; - -// Here we check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - baseHasDuplicate = false; - return 0; -}); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - - var origContext = context; - - if ( context.nodeType !== 1 && context.nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - var m, set, checkSet, extra, ret, cur, pop, i, - prune = true, - contextXML = Sizzle.isXML( context ), - parts = [], - soFar = selector; - - // Reset the position of the chunker regexp (start from head) - do { - chunker.exec( "" ); - m = chunker.exec( soFar ); - - if ( m ) { - soFar = m[3]; - - parts.push( m[1] ); - - if ( m[2] ) { - extra = m[3]; - break; - } - } - } while ( m ); - - if ( parts.length > 1 && origPOS.exec( selector ) ) { - - if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { - set = posProcess( parts[0] + parts[1], context ); - - } else { - set = Expr.relative[ parts[0] ] ? - [ context ] : - Sizzle( parts.shift(), context ); - - while ( parts.length ) { - selector = parts.shift(); - - if ( Expr.relative[ selector ] ) { - selector += parts.shift(); - } - - set = posProcess( selector, set ); - } - } - - } else { - // Take a shortcut and set the context if the root selector is an ID - // (but not if it'll be faster if the inner selector is an ID) - if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && - Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { - - ret = Sizzle.find( parts.shift(), context, contextXML ); - context = ret.expr ? - Sizzle.filter( ret.expr, ret.set )[0] : - ret.set[0]; - } - - if ( context ) { - ret = seed ? - { expr: parts.pop(), set: makeArray(seed) } : - Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); - - set = ret.expr ? - Sizzle.filter( ret.expr, ret.set ) : - ret.set; - - if ( parts.length > 0 ) { - checkSet = makeArray( set ); - - } else { - prune = false; - } - - while ( parts.length ) { - cur = parts.pop(); - pop = cur; - - if ( !Expr.relative[ cur ] ) { - cur = ""; - } else { - pop = parts.pop(); - } - - if ( pop == null ) { - pop = context; - } - - Expr.relative[ cur ]( checkSet, pop, contextXML ); - } - - } else { - checkSet = parts = []; - } - } - - if ( !checkSet ) { - checkSet = set; - } - - if ( !checkSet ) { - Sizzle.error( cur || selector ); - } - - if ( toString.call(checkSet) === "[object Array]" ) { - if ( !prune ) { - results.push.apply( results, checkSet ); - - } else if ( context && context.nodeType === 1 ) { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { - results.push( set[i] ); - } - } - - } else { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && checkSet[i].nodeType === 1 ) { - results.push( set[i] ); - } - } - } - - } else { - makeArray( checkSet, results ); - } - - if ( extra ) { - Sizzle( extra, origContext, results, seed ); - Sizzle.uniqueSort( results ); - } - - return results; -}; - -Sizzle.uniqueSort = function( results ) { - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( var i = 1; i < results.length; i++ ) { - if ( results[i] === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -Sizzle.matches = function( expr, set ) { - return Sizzle( expr, null, null, set ); -}; - -Sizzle.matchesSelector = function( node, expr ) { - return Sizzle( expr, null, null, [node] ).length > 0; -}; - -Sizzle.find = function( expr, context, isXML ) { - var set; - - if ( !expr ) { - return []; - } - - for ( var i = 0, l = Expr.order.length; i < l; i++ ) { - var match, - type = Expr.order[i]; - - if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { - var left = match[1]; - match.splice( 1, 1 ); - - if ( left.substr( left.length - 1 ) !== "\\" ) { - match[1] = (match[1] || "").replace(/\\/g, ""); - set = Expr.find[ type ]( match, context, isXML ); - - if ( set != null ) { - expr = expr.replace( Expr.match[ type ], "" ); - break; - } - } - } - } - - if ( !set ) { - set = context.getElementsByTagName( "*" ); - } - - return { set: set, expr: expr }; -}; - -Sizzle.filter = function( expr, set, inplace, not ) { - var match, anyFound, - old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); - - while ( expr && set.length ) { - for ( var type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - var found, item, - filter = Expr.filter[ type ], - left = match[1]; - - anyFound = false; - - match.splice(1,1); - - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { - continue; - } - } - - if ( match ) { - for ( var i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - var pass = not ^ !!found; - - if ( inplace && found != null ) { - if ( pass ) { - anyFound = true; - - } else { - curLoop[i] = false; - } - - } else if ( pass ) { - result.push( item ); - anyFound = true; - } - } - } - } - - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; - } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; - } - } - } - - // Improper expression - if ( expr === old ) { - if ( anyFound == null ) { - Sizzle.error( expr ); - - } else { - break; - } - } - - old = expr; - } - - return curLoop; -}; - -Sizzle.error = function( msg ) { - throw "Syntax error, unrecognized expression: " + msg; -}; - -var Expr = Sizzle.selectors = { - order: [ "ID", "NAME", "TAG" ], - - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/, - POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - - leftMatch: {}, - - attrMap: { - "class": "className", - "for": "htmlFor" - }, - - attrHandle: { - href: function( elem ) { - return elem.getAttribute( "href" ); - } - }, - - relative: { - "+": function(checkSet, part){ - var isPartStr = typeof part === "string", - isTag = isPartStr && !/\W/.test( part ), - isPartStrNotTag = isPartStr && !isTag; - - if ( isTag ) { - part = part.toLowerCase(); - } - - for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { - if ( (elem = checkSet[i]) ) { - while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} - - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? - elem || false : - elem === part; - } - } - - if ( isPartStrNotTag ) { - Sizzle.filter( part, checkSet, true ); - } - }, - - ">": function( checkSet, part ) { - var elem, - isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - - if ( isPartStr && !/\W/.test( part ) ) { - part = part.toLowerCase(); - - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - - } else { - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - checkSet[i] = isPartStr ? - elem.parentNode : - elem.parentNode === part; - } - } - - if ( isPartStr ) { - Sizzle.filter( part, checkSet, true ); - } - } - }, - - "": function(checkSet, part, isXML){ - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !/\W/.test(part) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); - }, - - "~": function( checkSet, part, isXML ) { - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !/\W/.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); - } - }, - - find: { - ID: function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }, - - NAME: function( match, context ) { - if ( typeof context.getElementsByName !== "undefined" ) { - var ret = [], - results = context.getElementsByName( match[1] ); - - for ( var i = 0, l = results.length; i < l; i++ ) { - if ( results[i].getAttribute("name") === match[1] ) { - ret.push( results[i] ); - } - } - - return ret.length === 0 ? null : ret; - } - }, - - TAG: function( match, context ) { - return context.getElementsByTagName( match[1] ); - } - }, - preFilter: { - CLASS: function( match, curLoop, inplace, result, not, isXML ) { - match = " " + match[1].replace(/\\/g, "") + " "; - - if ( isXML ) { - return match; - } - - for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { - if ( elem ) { - if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) { - if ( !inplace ) { - result.push( elem ); - } - - } else if ( inplace ) { - curLoop[i] = false; - } - } - } - - return false; - }, - - ID: function( match ) { - return match[1].replace(/\\/g, ""); - }, - - TAG: function( match, curLoop ) { - return match[1].toLowerCase(); - }, - - CHILD: function( match ) { - if ( match[1] === "nth" ) { - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( - match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || - !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); - - // calculate the numbers (first)n+(last) including if they are negative - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } - - // TODO: Move to normal caching system - match[0] = done++; - - return match; - }, - - ATTR: function( match, curLoop, inplace, result, not, isXML ) { - var name = match[1].replace(/\\/g, ""); - - if ( !isXML && Expr.attrMap[name] ) { - match[1] = Expr.attrMap[name]; - } - - if ( match[2] === "~=" ) { - match[4] = " " + match[4] + " "; - } - - return match; - }, - - PSEUDO: function( match, curLoop, inplace, result, not ) { - if ( match[1] === "not" ) { - // If we're dealing with a complex expression, or a simple one - if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { - match[3] = Sizzle(match[3], null, null, curLoop); - - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - - if ( !inplace ) { - result.push.apply( result, ret ); - } - - return false; - } - - } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { - return true; - } - - return match; - }, - - POS: function( match ) { - match.unshift( true ); - - return match; - } - }, - - filters: { - enabled: function( elem ) { - return elem.disabled === false && elem.type !== "hidden"; - }, - - disabled: function( elem ) { - return elem.disabled === true; - }, - - checked: function( elem ) { - return elem.checked === true; - }, - - selected: function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - elem.parentNode.selectedIndex; - - return elem.selected === true; - }, - - parent: function( elem ) { - return !!elem.firstChild; - }, - - empty: function( elem ) { - return !elem.firstChild; - }, - - has: function( elem, i, match ) { - return !!Sizzle( match[3], elem ).length; - }, - - header: function( elem ) { - return (/h\d/i).test( elem.nodeName ); - }, - - text: function( elem ) { - return "text" === elem.type; - }, - radio: function( elem ) { - return "radio" === elem.type; - }, - - checkbox: function( elem ) { - return "checkbox" === elem.type; - }, - - file: function( elem ) { - return "file" === elem.type; - }, - password: function( elem ) { - return "password" === elem.type; - }, - - submit: function( elem ) { - return "submit" === elem.type; - }, - - image: function( elem ) { - return "image" === elem.type; - }, - - reset: function( elem ) { - return "reset" === elem.type; - }, - - button: function( elem ) { - return "button" === elem.type || elem.nodeName.toLowerCase() === "button"; - }, - - input: function( elem ) { - return (/input|select|textarea|button/i).test( elem.nodeName ); - } - }, - setFilters: { - first: function( elem, i ) { - return i === 0; - }, - - last: function( elem, i, match, array ) { - return i === array.length - 1; - }, - - even: function( elem, i ) { - return i % 2 === 0; - }, - - odd: function( elem, i ) { - return i % 2 === 1; - }, - - lt: function( elem, i, match ) { - return i < match[3] - 0; - }, - - gt: function( elem, i, match ) { - return i > match[3] - 0; - }, - - nth: function( elem, i, match ) { - return match[3] - 0 === i; - }, - - eq: function( elem, i, match ) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function( elem, match, i, array ) { - var name = match[1], - filter = Expr.filters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - - } else if ( name === "contains" ) { - return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; - - } else if ( name === "not" ) { - var not = match[3]; - - for ( var j = 0, l = not.length; j < l; j++ ) { - if ( not[j] === elem ) { - return false; - } - } - - return true; - - } else { - Sizzle.error( "Syntax error, unrecognized expression: " + name ); - } - }, - - CHILD: function( elem, match ) { - var type = match[1], - node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - - case "nth": - var first = match[2], - last = match[3]; - - if ( first === 1 && last === 0 ) { - return true; - } - - var doneName = match[0], - parent = elem.parentNode; - - if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { - var count = 0; - - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.nodeIndex = ++count; - } - } - - parent.sizcache = doneName; - } - - var diff = elem.nodeIndex - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - } - }, - - ID: function( elem, match ) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - - TAG: function( elem, match ) { - return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; - }, - - CLASS: function( elem, match ) { - return (" " + (elem.className || elem.getAttribute("class")) + " ") - .indexOf( match ) > -1; - }, - - ATTR: function( elem, match ) { - var name = match[1], - result = Expr.attrHandle[ name ] ? - Expr.attrHandle[ name ]( elem ) : - elem[ name ] != null ? - elem[ name ] : - elem.getAttribute( name ), - value = result + "", - type = match[2], - check = match[4]; - - return result == null ? - type === "!=" : - type === "=" ? - value === check : - type === "*=" ? - value.indexOf(check) >= 0 : - type === "~=" ? - (" " + value + " ").indexOf(check) >= 0 : - !check ? - value && result !== false : - type === "!=" ? - value !== check : - type === "^=" ? - value.indexOf(check) === 0 : - type === "$=" ? - value.substr(value.length - check.length) === check : - type === "|=" ? - value === check || value.substr(0, check.length + 1) === check + "-" : - false; - }, - - POS: function( elem, match, i, array ) { - var name = match[2], - filter = Expr.setFilters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - } - } - } -}; - -var origPOS = Expr.match.POS, - fescape = function(all, num){ - return "\\" + (num - 0 + 1); - }; - -for ( var type in Expr.match ) { - Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); - Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); -} - -var makeArray = function( array, results ) { - array = Array.prototype.slice.call( array, 0 ); - - if ( results ) { - results.push.apply( results, array ); - return results; - } - - return array; -}; - -// Perform a simple check to determine if the browser is capable of -// converting a NodeList to an array using builtin methods. -// Also verifies that the returned array holds DOM nodes -// (which is not the case in the Blackberry browser) -try { - Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; - -// Provide a fallback method if it does not work -} catch( e ) { - makeArray = function( array, results ) { - var i = 0, - ret = results || []; - - if ( toString.call(array) === "[object Array]" ) { - Array.prototype.push.apply( ret, array ); - - } else { - if ( typeof array.length === "number" ) { - for ( var l = array.length; i < l; i++ ) { - ret.push( array[i] ); - } - - } else { - for ( ; array[i]; i++ ) { - ret.push( array[i] ); - } - } - } - - return ret; - }; -} - -var sortOrder, siblingCheck; - -if ( document.documentElement.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { - return a.compareDocumentPosition ? -1 : 1; - } - - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // If the nodes are siblings (or identical) we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Utility function for retreiving the text value of an array of DOM nodes -Sizzle.getText = function( elems ) { - var ret = "", elem; - - for ( var i = 0; elems[i]; i++ ) { - elem = elems[i]; - - // Get the text from text nodes and CDATA nodes - if ( elem.nodeType === 3 || elem.nodeType === 4 ) { - ret += elem.nodeValue; - - // Traverse everything else, except comment nodes - } else if ( elem.nodeType !== 8 ) { - ret += Sizzle.getText( elem.childNodes ); - } - } - - return ret; -}; - -// Check to see if the browser returns elements by name when -// querying by getElementById (and provide a workaround) -(function(){ - // We're going to inject a fake input element with a specified name - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - - form.innerHTML = ""; - - // Inject it into the root element, check its status, and remove it quickly - root.insertBefore( form, root.firstChild ); - - // The workaround has to do additional checks after a getElementById - // Which slows things down for other browsers (hence the branching) - if ( document.getElementById( id ) ) { - Expr.find.ID = function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - - return m ? - m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? - [m] : - undefined : - []; - } - }; - - Expr.filter.ID = function( elem, match ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - - root.removeChild( form ); - - // release memory in IE - root = form = null; -})(); - -(function(){ - // Check to see if the browser returns only elements - // when doing getElementsByTagName("*") - - // Create a fake element - var div = document.createElement("div"); - div.appendChild( document.createComment("") ); - - // Make sure no comments are found - if ( div.getElementsByTagName("*").length > 0 ) { - Expr.find.TAG = function( match, context ) { - var results = context.getElementsByTagName( match[1] ); - - // Filter out possible comments - if ( match[1] === "*" ) { - var tmp = []; - - for ( var i = 0; results[i]; i++ ) { - if ( results[i].nodeType === 1 ) { - tmp.push( results[i] ); - } - } - - results = tmp; - } - - return results; - }; - } - - // Check to see if an attribute returns normalized href attributes - div.innerHTML = ""; - - if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && - div.firstChild.getAttribute("href") !== "#" ) { - - Expr.attrHandle.href = function( elem ) { - return elem.getAttribute( "href", 2 ); - }; - } - - // release memory in IE - div = null; -})(); - -if ( document.querySelectorAll ) { - (function(){ - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - - div.innerHTML = "

"; - - // Safari can't handle uppercase or unicode characters when - // in quirks mode. - if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { - return; - } - - Sizzle = function( query, context, extra, seed ) { - context = context || document; - - // Make sure that attribute selectors are quoted - query = query.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - // Only use querySelectorAll on non-XML documents - // (ID selectors don't work in non-HTML documents) - if ( !seed && !Sizzle.isXML(context) ) { - if ( context.nodeType === 9 ) { - try { - return makeArray( context.querySelectorAll(query), extra ); - } catch(qsaError) {} - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var old = context.getAttribute( "id" ), - nid = old || id; - - if ( !old ) { - context.setAttribute( "id", nid ); - } - - try { - return makeArray( context.querySelectorAll( "#" + nid + " " + query ), extra ); - - } catch(pseudoError) { - } finally { - if ( !old ) { - context.removeAttribute( "id" ); - } - } - } - } - - return oldSizzle(query, context, extra, seed); - }; - - for ( var prop in oldSizzle ) { - Sizzle[ prop ] = oldSizzle[ prop ]; - } - - // release memory in IE - div = null; - })(); -} - -(function(){ - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector, - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); - - } catch( pseudoError ) { - pseudoWorks = true; - } - - if ( matches ) { - Sizzle.matchesSelector = function( node, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - if ( !Sizzle.isXML( node ) ) { - try { - if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - return matches.call( node, expr ); - } - } catch(e) {} - } - - return Sizzle(expr, null, null, [node]).length > 0; - }; - } -})(); - -(function(){ - var div = document.createElement("div"); - - div.innerHTML = "
"; - - // Opera can't find a second classname (in 9.6) - // Also, make sure that getElementsByClassName actually exists - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - - if ( div.getElementsByClassName("e").length === 1 ) { - return; - } - - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function( match, context, isXML ) { - if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { - return context.getElementsByClassName(match[1]); - } - }; - - // release memory in IE - div = null; -})(); - -function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 && !isXML ){ - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( elem.nodeName.toLowerCase() === cur ) { - match = elem; - break; - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 ) { - if ( !isXML ) { - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( typeof cur !== "string" ) { - if ( elem === cur ) { - match = true; - break; - } - - } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { - match = elem; - break; - } - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -if ( document.documentElement.contains ) { - Sizzle.contains = function( a, b ) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - -} else if ( document.documentElement.compareDocumentPosition ) { - Sizzle.contains = function( a, b ) { - return !!(a.compareDocumentPosition(b) & 16); - }; - -} else { - Sizzle.contains = function() { - return false; - }; -} - -Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -var posProcess = function( selector, context ) { - var match, - tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - - // Position selectors must be done after the filter - // And so must :not(positional) so we move all PSEUDOs to the end - while ( (match = Expr.match.PSEUDO.exec( selector )) ) { - later += match[0]; - selector = selector.replace( Expr.match.PSEUDO, "" ); - } - - selector = Expr.relative[selector] ? selector + "*" : selector; - - for ( var i = 0, l = root.length; i < l; i++ ) { - Sizzle( selector, root[i], tmpSet ); - } - - return Sizzle.filter( later, tmpSet ); -}; - -// EXPOSE -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.filters; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})(); - - -var runtil = /Until$/, - rparentsprev = /^(?:parents|prevUntil|prevAll)/, - // Note: This RegExp should be improved, or likely pulled from Sizzle - rmultiselector = /,/, - isSimple = /^.[^:#\[\.,]*$/, - slice = Array.prototype.slice, - POS = jQuery.expr.match.POS; - -jQuery.fn.extend({ - find: function( selector ) { - var ret = this.pushStack( "", "find", selector ), - length = 0; - - for ( var i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( var n = length; n < ret.length; n++ ) { - for ( var r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var targets = jQuery( target ); - return this.filter(function() { - for ( var i = 0, l = targets.length; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && jQuery.filter( selector, this ).length > 0; - }, - - closest: function( selectors, context ) { - var ret = [], i, l, cur = this[0]; - - if ( jQuery.isArray( selectors ) ) { - var match, selector, - matches = {}, - level = 1; - - if ( cur && selectors.length ) { - for ( i = 0, l = selectors.length; i < l; i++ ) { - selector = selectors[i]; - - if ( !matches[selector] ) { - matches[selector] = jQuery.expr.match.POS.test( selector ) ? - jQuery( selector, context || this.context ) : - selector; - } - } - - while ( cur && cur.ownerDocument && cur !== context ) { - for ( selector in matches ) { - match = matches[selector]; - - if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) { - ret.push({ selector: selector, elem: cur, level: level }); - } - } - - cur = cur.parentNode; - level++; - } - } - - return ret; - } - - var pos = POS.test( selectors ) ? - jQuery( selectors, context || this.context ) : null; - - for ( i = 0, l = this.length; i < l; i++ ) { - cur = this[i]; - - while ( cur ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - - } else { - cur = cur.parentNode; - if ( !cur || !cur.ownerDocument || cur === context ) { - break; - } - } - } - } - - ret = ret.length > 1 ? jQuery.unique(ret) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - if ( !elem || typeof elem === "string" ) { - return jQuery.inArray( this[0], - // If it receives a string, the selector is used - // If it receives nothing, the siblings are used - elem ? jQuery( elem ) : this.parent().children() ); - } - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context || this.context ) : - jQuery.makeArray( selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - andSelf: function() { - return this.add( this.prevObject ); - } -}); - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return jQuery.nth( elem, 2, "nextSibling" ); - }, - prev: function( elem ) { - return jQuery.nth( elem, 2, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( elem.parentNode.firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.makeArray( elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 ? jQuery.unique( ret ) : ret; - - if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, slice.call(arguments).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - nth: function( cur, result, dir, elem ) { - result = result || 1; - var num = 0; - - for ( ; cur; cur = cur[dir] ) { - if ( cur.nodeType === 1 && ++num === result ) { - break; - } - } - - return cur; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return (elem === qualifier) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return (jQuery.inArray( elem, qualifier ) >= 0) === keep; - }); -} - - - - -var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rtagName = /<([\w:]+)/, - rtbody = /\s]+\/)>/g, - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
", "
" ], - thead: [ 1, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - col: [ 2, "", "
" ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }; - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE can't serialize and