OSDN Git Service

import all source code
authoryasushiito <yas@pen-chan.jp>
Fri, 23 Dec 2011 00:57:29 +0000 (09:57 +0900)
committeryasushiito <yas@pen-chan.jp>
Fri, 23 Dec 2011 00:57:29 +0000 (09:57 +0900)
402 files changed:
.gitignore [new file with mode: 0644]
.rspec [new file with mode: 0644]
ERD.dot [new file with mode: 0644]
Gemfile [new file with mode: 0644]
Gemfile.lock [new file with mode: 0644]
LISENCE.txt [new file with mode: 0644]
README.rails [new file with mode: 0644]
Rakefile [new file with mode: 0644]
app/assets/images/rails.png [new file with mode: 0644]
app/assets/javascripts/admins/sessions.js.coffee [new file with mode: 0644]
app/assets/javascripts/application.js [new file with mode: 0644]
app/assets/javascripts/artists.js.coffee [new file with mode: 0644]
app/assets/javascripts/authors/sessions.js.coffee [new file with mode: 0644]
app/assets/javascripts/baloon_templates.js.coffee [new file with mode: 0644]
app/assets/javascripts/baloon_types.js.coffee [new file with mode: 0644]
app/assets/javascripts/baloons.js.coffee [new file with mode: 0644]
app/assets/javascripts/comics.js.coffee [new file with mode: 0644]
app/assets/javascripts/common_lisences.js.coffee [new file with mode: 0644]
app/assets/javascripts/help.js.coffee [new file with mode: 0644]
app/assets/javascripts/home.js.coffee [new file with mode: 0644]
app/assets/javascripts/lisences.js.coffee [new file with mode: 0644]
app/assets/javascripts/original_lisences.js.coffee [new file with mode: 0644]
app/assets/javascripts/original_pictures.js.coffee [new file with mode: 0644]
app/assets/javascripts/panels.js.coffee [new file with mode: 0644]
app/assets/javascripts/pictures.js.coffee [new file with mode: 0644]
app/assets/javascripts/source_pictures.js.coffee [new file with mode: 0644]
app/assets/javascripts/speach_baloons.js.coffee [new file with mode: 0644]
app/assets/javascripts/speach_templates.js.coffee [new file with mode: 0644]
app/assets/javascripts/speachbaloons.js.coffee [new file with mode: 0644]
app/assets/javascripts/speaches.js.coffee [new file with mode: 0644]
app/assets/javascripts/system.js.coffee [new file with mode: 0644]
app/assets/stylesheets/admins/sessions.css.scss [new file with mode: 0644]
app/assets/stylesheets/application.css [new file with mode: 0644]
app/assets/stylesheets/artists.css.scss [new file with mode: 0644]
app/assets/stylesheets/authors/sessions.css.scss [new file with mode: 0644]
app/assets/stylesheets/baloon_templates.css.scss [new file with mode: 0644]
app/assets/stylesheets/baloon_types.css.scss [new file with mode: 0644]
app/assets/stylesheets/baloons.css.scss [new file with mode: 0644]
app/assets/stylesheets/comics.css.scss [new file with mode: 0644]
app/assets/stylesheets/common_lisences.css.scss [new file with mode: 0644]
app/assets/stylesheets/help.css.scss [new file with mode: 0644]
app/assets/stylesheets/home.css.scss [new file with mode: 0644]
app/assets/stylesheets/lisences.css.scss [new file with mode: 0644]
app/assets/stylesheets/original_lisences.css.scss [new file with mode: 0644]
app/assets/stylesheets/original_pictures.css.scss [new file with mode: 0644]
app/assets/stylesheets/panels.css.scss [new file with mode: 0644]
app/assets/stylesheets/pictures.css.scss [new file with mode: 0644]
app/assets/stylesheets/scaffolds.css.scss [new file with mode: 0644]
app/assets/stylesheets/source_pictures.css.scss [new file with mode: 0644]
app/assets/stylesheets/speach_baloons.css.scss [new file with mode: 0644]
app/assets/stylesheets/speach_templates.css.scss [new file with mode: 0644]
app/assets/stylesheets/speachbaloons.css.scss [new file with mode: 0644]
app/assets/stylesheets/speaches.css.scss [new file with mode: 0644]
app/assets/stylesheets/system.css.scss [new file with mode: 0644]
app/controllers/application_controller.rb [new file with mode: 0644]
app/controllers/artists_controller.rb [new file with mode: 0644]
app/controllers/balloon_templates_controller.rb [new file with mode: 0644]
app/controllers/balloons_controller.rb [new file with mode: 0644]
app/controllers/comics_controller.rb [new file with mode: 0644]
app/controllers/common_lisences_controller.rb [new file with mode: 0644]
app/controllers/help_controller.rb [new file with mode: 0644]
app/controllers/home_controller.rb [new file with mode: 0644]
app/controllers/lisences_controller.rb [new file with mode: 0644]
app/controllers/original_lisences_controller.rb [new file with mode: 0644]
app/controllers/original_pictures_controller.rb [new file with mode: 0644]
app/controllers/panel_pictures_controller.rb [new file with mode: 0644]
app/controllers/panels_controller.rb [new file with mode: 0644]
app/controllers/resource_pictures_controller.rb [new file with mode: 0644]
app/controllers/speach_balloons_controller.rb [new file with mode: 0644]
app/controllers/speach_templates_controller.rb [new file with mode: 0644]
app/controllers/speaches_controller.rb [new file with mode: 0644]
app/controllers/system_controller.rb [new file with mode: 0644]
app/helpers/application_helper.rb [new file with mode: 0644]
app/helpers/artists_helper.rb [new file with mode: 0644]
app/helpers/balloon_templates_helper.rb [new file with mode: 0644]
app/helpers/balloon_types_helper.rb [new file with mode: 0644]
app/helpers/balloons_helper.rb [new file with mode: 0644]
app/helpers/comics_helper.rb [new file with mode: 0644]
app/helpers/common_lisences_helper.rb [new file with mode: 0644]
app/helpers/help_helper.rb [new file with mode: 0644]
app/helpers/home_helper.rb [new file with mode: 0644]
app/helpers/lisences_helper.rb [new file with mode: 0644]
app/helpers/original_lisences_helper.rb [new file with mode: 0644]
app/helpers/original_pictures_helper.rb [new file with mode: 0644]
app/helpers/panel_pictures_helper.rb [new file with mode: 0644]
app/helpers/panels_helper.rb [new file with mode: 0644]
app/helpers/resource_pictures_helper.rb [new file with mode: 0644]
app/helpers/speach_balloons_helper.rb [new file with mode: 0644]
app/helpers/speach_templates_helper.rb [new file with mode: 0644]
app/helpers/speaches_helper.rb [new file with mode: 0644]
app/helpers/system_helper.rb [new file with mode: 0644]
app/mailers/.gitkeep [new file with mode: 0644]
app/models/.gitkeep [new file with mode: 0644]
app/models/admin.rb [new file with mode: 0644]
app/models/artist.rb [new file with mode: 0644]
app/models/author.rb [new file with mode: 0644]
app/models/balloon.rb [new file with mode: 0644]
app/models/balloon_template.rb [new file with mode: 0644]
app/models/comic.rb [new file with mode: 0644]
app/models/common_lisence.rb [new file with mode: 0644]
app/models/lisence.rb [new file with mode: 0644]
app/models/original_lisence.rb [new file with mode: 0644]
app/models/original_picture.rb [new file with mode: 0644]
app/models/panel.rb [new file with mode: 0644]
app/models/panel_picture.rb [new file with mode: 0644]
app/models/resource_picture.rb [new file with mode: 0644]
app/models/speach.rb [new file with mode: 0644]
app/models/speach_balloon.rb [new file with mode: 0644]
app/models/speach_template.rb [new file with mode: 0644]
app/views/admins/confirmations/new.html.erb [new file with mode: 0644]
app/views/admins/mailer/confirmation_instructions.html.erb [new file with mode: 0644]
app/views/admins/mailer/reset_password_instructions.html.erb [new file with mode: 0644]
app/views/admins/mailer/unlock_instructions.html.erb [new file with mode: 0644]
app/views/admins/passwords/edit.html.erb [new file with mode: 0644]
app/views/admins/passwords/new.html.erb [new file with mode: 0644]
app/views/admins/registrations/edit.html.erb [new file with mode: 0644]
app/views/admins/registrations/new.html.erb [new file with mode: 0644]
app/views/admins/sessions/new.html.erb [new file with mode: 0644]
app/views/admins/shared/_links.erb [new file with mode: 0644]
app/views/admins/unlocks/new.html.erb [new file with mode: 0644]
app/views/artists/_form.html.erb [new file with mode: 0644]
app/views/artists/edit.html.erb [new file with mode: 0644]
app/views/artists/index.html.erb [new file with mode: 0644]
app/views/artists/new.html.erb [new file with mode: 0644]
app/views/artists/show.html.erb [new file with mode: 0644]
app/views/authors/confirmations/new.html.erb [new file with mode: 0644]
app/views/authors/mailer/confirmation_instructions.html.erb [new file with mode: 0644]
app/views/authors/mailer/reset_password_instructions.html.erb [new file with mode: 0644]
app/views/authors/mailer/unlock_instructions.html.erb [new file with mode: 0644]
app/views/authors/passwords/edit.html.erb [new file with mode: 0644]
app/views/authors/passwords/new.html.erb [new file with mode: 0644]
app/views/authors/registrations/edit.html.erb [new file with mode: 0644]
app/views/authors/registrations/new.html.erb [new file with mode: 0644]
app/views/authors/sessions/new.html.erb [new file with mode: 0644]
app/views/authors/shared/_links.erb [new file with mode: 0644]
app/views/authors/unlocks/new.html.erb [new file with mode: 0644]
app/views/balloon_templates/index.html.erb [new file with mode: 0644]
app/views/balloons/index.html.erb [new file with mode: 0644]
app/views/comics/index.html.erb [new file with mode: 0644]
app/views/comics/play.html.erb [new file with mode: 0644]
app/views/comics/show.html.erb [new file with mode: 0644]
app/views/comics/top.html.erb [new file with mode: 0644]
app/views/common_lisences/_form.html.erb [new file with mode: 0644]
app/views/common_lisences/edit.html.erb [new file with mode: 0644]
app/views/common_lisences/index.html.erb [new file with mode: 0644]
app/views/common_lisences/new.html.erb [new file with mode: 0644]
app/views/common_lisences/show.html.erb [new file with mode: 0644]
app/views/home/index.html.erb [new file with mode: 0644]
app/views/layouts/application.html.erb [new file with mode: 0644]
app/views/lisences/_form.html.erb [new file with mode: 0644]
app/views/lisences/edit.html.erb [new file with mode: 0644]
app/views/lisences/index.html.erb [new file with mode: 0644]
app/views/lisences/new.html.erb [new file with mode: 0644]
app/views/lisences/show.html.erb [new file with mode: 0644]
app/views/original_lisences/_form.html.erb [new file with mode: 0644]
app/views/original_lisences/edit.html.erb [new file with mode: 0644]
app/views/original_lisences/index.html.erb [new file with mode: 0644]
app/views/original_lisences/new.html.erb [new file with mode: 0644]
app/views/original_lisences/show.html.erb [new file with mode: 0644]
app/views/original_pictures/_artist_register.html.erb [new file with mode: 0644]
app/views/original_pictures/_uploader.html.erb [new file with mode: 0644]
app/views/original_pictures/index.html.erb [new file with mode: 0644]
app/views/original_pictures/show.html.erb [new file with mode: 0644]
app/views/panel_pictures/index.html.erb [new file with mode: 0644]
app/views/panels/_standard.html.erb [new file with mode: 0644]
app/views/panels/index.html.erb [new file with mode: 0644]
app/views/panels/show.html.erb [new file with mode: 0644]
app/views/resource_pictures/index.html.erb [new file with mode: 0644]
app/views/resource_pictures/show.html.erb [new file with mode: 0644]
app/views/speach_balloons/index.html.erb [new file with mode: 0644]
app/views/speach_balloons/show.html.erb [new file with mode: 0644]
app/views/speach_templates/index.html.erb [new file with mode: 0644]
app/views/speaches/index.html.erb [new file with mode: 0644]
app/views/system/start.html.erb [new file with mode: 0644]
app/views/system/waiting_list.html.erb [new file with mode: 0644]
config.ru [new file with mode: 0644]
config/application.rb [new file with mode: 0644]
config/aws.yaml.org [new file with mode: 0644]
config/boot.rb [new file with mode: 0644]
config/cucumber.yml [new file with mode: 0644]
config/database.yml [new file with mode: 0644]
config/environment.rb [new file with mode: 0644]
config/environments/development.rb [new file with mode: 0644]
config/environments/production.rb [new file with mode: 0644]
config/environments/test.rb [new file with mode: 0644]
config/initializers/backtrace_silencers.rb [new file with mode: 0644]
config/initializers/devise.rb [new file with mode: 0644]
config/initializers/inflections.rb [new file with mode: 0644]
config/initializers/mime_types.rb [new file with mode: 0644]
config/initializers/secret_token.rb [new file with mode: 0644]
config/initializers/session_store.rb [new file with mode: 0644]
config/initializers/wrap_parameters.rb [new file with mode: 0644]
config/locales/devise.en.yml [new file with mode: 0644]
config/locales/en.yml [new file with mode: 0644]
config/routes.rb [new file with mode: 0644]
db/migrate/20111206091950_devise_create_authors.rb [new file with mode: 0644]
db/migrate/20111206092734_devise_create_admins.rb [new file with mode: 0644]
db/migrate/20111206095746_create_artists.rb [new file with mode: 0644]
db/migrate/20111206100750_create_lisences.rb [new file with mode: 0644]
db/migrate/20111206105022_create_original_lisences.rb [new file with mode: 0644]
db/migrate/20111206105830_create_comics.rb [new file with mode: 0644]
db/migrate/20111206111202_create_panels.rb [new file with mode: 0644]
db/migrate/20111206112042_create_original_pictures.rb [new file with mode: 0644]
db/migrate/20111206112949_create_resource_pictures.rb [new file with mode: 0644]
db/migrate/20111206113803_create_panel_pictures.rb [new file with mode: 0644]
db/migrate/20111206115439_create_balloon_templates.rb [new file with mode: 0644]
db/migrate/20111206120252_create_speach_templates.rb [new file with mode: 0644]
db/migrate/20111206121123_create_balloons.rb [new file with mode: 0644]
db/migrate/20111206130635_create_speaches.rb [new file with mode: 0644]
db/migrate/20111208235818_create_speach_balloons.rb [new file with mode: 0644]
db/migrate/20111211052544_add_author_id_on_artist.rb [new file with mode: 0644]
db/migrate/20111213073529_create_common_lisences.rb [new file with mode: 0644]
db/schema.rb [new file with mode: 0644]
db/seeds.rb [new file with mode: 0644]
doc/README_FOR_APP [new file with mode: 0644]
features/support/env.rb [new file with mode: 0644]
lib/DMagick.rb [new file with mode: 0644]
lib/assets/.gitkeep [new file with mode: 0644]
lib/local_picture.rb [new file with mode: 0644]
lib/picture_io.rb [new file with mode: 0644]
lib/s3_picture.rb [new file with mode: 0644]
lib/tasks/.gitkeep [new file with mode: 0644]
lib/tasks/cucumber.rake [new file with mode: 0644]
log/.gitkeep [new file with mode: 0644]
public/404.html [new file with mode: 0644]
public/422.html [new file with mode: 0644]
public/500.html [new file with mode: 0644]
public/assets/application-00960e5186894b532975562d59176a6a.css [new file with mode: 0644]
public/assets/application-00960e5186894b532975562d59176a6a.css.gz [new file with mode: 0644]
public/assets/application-fd525bbd17efb79c1bb774c528fe1959.js [new file with mode: 0644]
public/assets/application-fd525bbd17efb79c1bb774c528fe1959.js.gz [new file with mode: 0644]
public/assets/application.css [new file with mode: 0644]
public/assets/application.css.gz [new file with mode: 0644]
public/assets/application.js [new file with mode: 0644]
public/assets/application.js.gz [new file with mode: 0644]
public/assets/manifest.yml [new file with mode: 0644]
public/assets/rails-e4b51606cd77fda2615e7439907bfc92.png [new file with mode: 0644]
public/assets/rails.png [new file with mode: 0644]
public/favicon.ico [new file with mode: 0644]
public/robots.txt [new file with mode: 0644]
script/cucumber [new file with mode: 0644]
script/encode64.rb [new file with mode: 0644]
script/rails [new file with mode: 0644]
spec/controllers/admins/sessions_controller_spec.rb [new file with mode: 0644]
spec/controllers/artists_controller_spec.rb [new file with mode: 0644]
spec/controllers/authors/sessions_controller_spec.rb [new file with mode: 0644]
spec/controllers/baloon_templates_controller_spec.rb [new file with mode: 0644]
spec/controllers/baloon_types_controller_spec.rb [new file with mode: 0644]
spec/controllers/baloons_controller_spec.rb [new file with mode: 0644]
spec/controllers/comics_controller_spec.rb [new file with mode: 0644]
spec/controllers/common_lisences_controller_spec.rb [new file with mode: 0644]
spec/controllers/help_controller_spec.rb [new file with mode: 0644]
spec/controllers/home_controller_spec.rb [new file with mode: 0644]
spec/controllers/lisences_controller_spec.rb [new file with mode: 0644]
spec/controllers/original_lisences_controller_spec.rb [new file with mode: 0644]
spec/controllers/original_pictures_controller_spec.rb [new file with mode: 0644]
spec/controllers/panels_controller_spec.rb [new file with mode: 0644]
spec/controllers/pictures_controller_spec.rb [new file with mode: 0644]
spec/controllers/source_pictures_controller_spec.rb [new file with mode: 0644]
spec/controllers/speach_baloons_controller_spec.rb [new file with mode: 0644]
spec/controllers/speach_templates_controller_spec.rb [new file with mode: 0644]
spec/controllers/speachbaloons_controller_spec.rb [new file with mode: 0644]
spec/controllers/speaches_controller_spec.rb [new file with mode: 0644]
spec/controllers/system_controller_spec.rb [new file with mode: 0644]
spec/helpers/admins/sessions_helper_spec.rb [new file with mode: 0644]
spec/helpers/artists_helper_spec.rb [new file with mode: 0644]
spec/helpers/authors/sessions_helper_spec.rb [new file with mode: 0644]
spec/helpers/baloon_templates_helper_spec.rb [new file with mode: 0644]
spec/helpers/baloon_types_helper_spec.rb [new file with mode: 0644]
spec/helpers/baloons_helper_spec.rb [new file with mode: 0644]
spec/helpers/comics_helper_spec.rb [new file with mode: 0644]
spec/helpers/common_lisences_helper_spec.rb [new file with mode: 0644]
spec/helpers/help_helper_spec.rb [new file with mode: 0644]
spec/helpers/home_helper_spec.rb [new file with mode: 0644]
spec/helpers/lisences_helper_spec.rb [new file with mode: 0644]
spec/helpers/original_lisences_helper_spec.rb [new file with mode: 0644]
spec/helpers/original_pictures_helper_spec.rb [new file with mode: 0644]
spec/helpers/panels_helper_spec.rb [new file with mode: 0644]
spec/helpers/pictures_helper_spec.rb [new file with mode: 0644]
spec/helpers/source_pictures_helper_spec.rb [new file with mode: 0644]
spec/helpers/speach_baloons_helper_spec.rb [new file with mode: 0644]
spec/helpers/speach_templates_helper_spec.rb [new file with mode: 0644]
spec/helpers/speachbaloons_helper_spec.rb [new file with mode: 0644]
spec/helpers/speaches_helper_spec.rb [new file with mode: 0644]
spec/helpers/system_helper_spec.rb [new file with mode: 0644]
spec/models/admin_spec.rb [new file with mode: 0644]
spec/models/artist_spec.rb [new file with mode: 0644]
spec/models/author_spec.rb [new file with mode: 0644]
spec/models/baloon_spec.rb [new file with mode: 0644]
spec/models/baloon_template_spec.rb [new file with mode: 0644]
spec/models/baloon_type_spec.rb [new file with mode: 0644]
spec/models/comic_spec.rb [new file with mode: 0644]
spec/models/common_lisence_spec.rb [new file with mode: 0644]
spec/models/lisence_spec.rb [new file with mode: 0644]
spec/models/original_lisence_spec.rb [new file with mode: 0644]
spec/models/original_picture_spec.rb [new file with mode: 0644]
spec/models/panel_spec.rb [new file with mode: 0644]
spec/models/picture_spec.rb [new file with mode: 0644]
spec/models/source_picture_spec.rb [new file with mode: 0644]
spec/models/speach_baloon_spec.rb [new file with mode: 0644]
spec/models/speach_spec.rb [new file with mode: 0644]
spec/models/speach_template_spec.rb [new file with mode: 0644]
spec/models/speachbaloon_spec.rb [new file with mode: 0644]
spec/requests/artists_spec.rb [new file with mode: 0644]
spec/requests/baloon_templates_spec.rb [new file with mode: 0644]
spec/requests/baloon_types_spec.rb [new file with mode: 0644]
spec/requests/baloons_spec.rb [new file with mode: 0644]
spec/requests/comics_spec.rb [new file with mode: 0644]
spec/requests/common_lisences_spec.rb [new file with mode: 0644]
spec/requests/lisences_spec.rb [new file with mode: 0644]
spec/requests/original_lisences_spec.rb [new file with mode: 0644]
spec/requests/original_pictures_spec.rb [new file with mode: 0644]
spec/requests/panels_spec.rb [new file with mode: 0644]
spec/requests/pictures_spec.rb [new file with mode: 0644]
spec/requests/source_pictures_spec.rb [new file with mode: 0644]
spec/requests/speach_baloons_spec.rb [new file with mode: 0644]
spec/requests/speach_templates_spec.rb [new file with mode: 0644]
spec/requests/speachbaloons_spec.rb [new file with mode: 0644]
spec/requests/speaches_spec.rb [new file with mode: 0644]
spec/routing/artists_routing_spec.rb [new file with mode: 0644]
spec/routing/baloon_templates_routing_spec.rb [new file with mode: 0644]
spec/routing/baloon_types_routing_spec.rb [new file with mode: 0644]
spec/routing/baloons_routing_spec.rb [new file with mode: 0644]
spec/routing/comics_routing_spec.rb [new file with mode: 0644]
spec/routing/common_lisences_routing_spec.rb [new file with mode: 0644]
spec/routing/lisences_routing_spec.rb [new file with mode: 0644]
spec/routing/original_lisences_routing_spec.rb [new file with mode: 0644]
spec/routing/original_pictures_routing_spec.rb [new file with mode: 0644]
spec/routing/panels_routing_spec.rb [new file with mode: 0644]
spec/routing/pictures_routing_spec.rb [new file with mode: 0644]
spec/routing/source_pictures_routing_spec.rb [new file with mode: 0644]
spec/routing/speach_baloons_routing_spec.rb [new file with mode: 0644]
spec/routing/speach_templates_routing_spec.rb [new file with mode: 0644]
spec/routing/speachbaloons_routing_spec.rb [new file with mode: 0644]
spec/routing/speaches_routing_spec.rb [new file with mode: 0644]
spec/spec_helper.rb [new file with mode: 0644]
spec/views/artists/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/artists/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/artists/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/artists/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloon_templates/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloon_templates/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloon_templates/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloon_templates/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloon_types/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloon_types/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloon_types/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloon_types/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloons/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloons/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloons/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/baloons/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/comics/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/comics/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/comics/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/comics/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/common_lisences/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/common_lisences/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/common_lisences/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/common_lisences/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/lisences/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/lisences/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/lisences/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/lisences/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/original_lisences/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/original_lisences/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/original_lisences/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/original_lisences/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/original_pictures/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/original_pictures/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/original_pictures/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/original_pictures/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/panels/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/panels/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/panels/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/panels/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/pictures/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/pictures/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/pictures/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/pictures/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/source_pictures/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/source_pictures/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/source_pictures/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/source_pictures/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/speach_baloons/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/speach_baloons/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/speach_baloons/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/speach_baloons/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/speach_templates/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/speach_templates/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/speach_templates/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/speach_templates/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/speachbaloons/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/speachbaloons/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/speachbaloons/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/speachbaloons/show.html.erb_spec.rb [new file with mode: 0644]
spec/views/speaches/edit.html.erb_spec.rb [new file with mode: 0644]
spec/views/speaches/index.html.erb_spec.rb [new file with mode: 0644]
spec/views/speaches/new.html.erb_spec.rb [new file with mode: 0644]
spec/views/speaches/show.html.erb_spec.rb [new file with mode: 0644]
vendor/assets/stylesheets/.gitkeep [new file with mode: 0644]
vendor/plugins/.gitkeep [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..5aff11a
--- /dev/null
@@ -0,0 +1,7 @@
+.bundle
+db/*.sqlite3
+log/*.log
+tmp/
+.sass-cache/
+public/image/*
+config/aws.yaml
diff --git a/.rspec b/.rspec
new file mode 100644 (file)
index 0000000..53607ea
--- /dev/null
+++ b/.rspec
@@ -0,0 +1 @@
+--colour
diff --git a/ERD.dot b/ERD.dot
new file mode 100644 (file)
index 0000000..e955cc0
--- /dev/null
+++ b/ERD.dot
@@ -0,0 +1,245 @@
+digraph Pettanr {\r
+  rankdir = "LR"; ranksep = "0.5"; nodesep = "0.4"; pad = "0.4,0.4"; margin = "0,0"; concentrate = "true"; labelloc = "t"; fontsize = "13"; fontname = "Arial Bold";\r
+  node [shape = "Mrecord", fontsize = "10", fontname = "Arial", margin = "0.07,0.05", penwidth = "1.0"];\r
+  edge [fontname = "Arial", fontsize = "7", dir = "both", arrowsize = "0.9", penwidth = "1.0", labelangle = "32", labeldistance = "1.8"];\r
+  label = "Pettanr domain model\n\n";\r
+  m_Admin [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Admin</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="activate">activate <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="current_sign_in_at">current_sign_in_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="current_sign_in_ip">current_sign_in_ip <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="email">email <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="encrypted_password">encrypted_password <font face="Arial Italic" color="grey60">string (128)caA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="last_sign_in_at">last_sign_in_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="last_sign_in_ip">last_sign_in_ip <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="remember_created_at">remember_created_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="reset_password_sent_at">reset_password_sent_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="reset_password_token">reset_password_token <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="sign_in_count">sign_in_count <font face="Arial Italic" color="grey60">integer</font></td></tr>\r
+</table>\r
+>];\r
+  m_Artist [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Artist</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="api_url">api_url <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="crowled_at">crowled_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="default_lisence_id">default_lisence_id <font face="Arial Italic" color="grey60">integer</font></td></tr>\r
+  <tr><td align="left" width="130" port="email">email <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="homepage_url">homepage_url <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="name">name <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+</table>\r
+>];\r
+  m_Author [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Author</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="authentication_token">authentication_token <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="confirmation_sent_at">confirmation_sent_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="confirmation_token">confirmation_token <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="confirmed_at">confirmed_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="current_sign_in_at">current_sign_in_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="current_sign_in_ip">current_sign_in_ip <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="email">email <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="encrypted_password">encrypted_password <font face="Arial Italic" color="grey60">string (128)caA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="last_sign_in_at">last_sign_in_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="last_sign_in_ip">last_sign_in_ip <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="remember_created_at">remember_created_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="reset_password_sent_at">reset_password_sent_at <font face="Arial Italic" color="grey60">datetime</font></td></tr>\r
+  <tr><td align="left" width="130" port="reset_password_token">reset_password_token <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="sign_in_count">sign_in_count <font face="Arial Italic" color="grey60">integer</font></td></tr>\r
+</table>\r
+>];\r
+  m_Balloon [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Balloon</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="balloon_template_id">balloon_template_id <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="border">border <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="height">height <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="left_offset">left_offset <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="tail">tail <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="top_offset">top_offset <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="width">width <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="zindex">zindex <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_BalloonTemplate [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">BalloonTemplate</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="border">border <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="max_height">max_height <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="max_width">max_width <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="min_height">min_height <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="min_width">min_width <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="tail">tail <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_Comic [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Comic</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="author_id">author_id <font face="Arial Italic" color="grey60">integer</font></td></tr>\r
+  <tr><td align="left" width="130" port="default_height">default_height <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="default_width">default_width <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="title">title <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+</table>\r
+>];\r
+  m_CommonLisence [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">CommonLisence</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="cc_by">cc_by <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="cc_nc">cc_nc <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="cc_nd">cc_nd <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="cc_sa">cc_sa <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="keep_aspect_ratio">keep_aspect_ratio <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="name">name <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="no_flip">no_flip <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="no_resize">no_resize <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="url">url <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_Lisence [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Lisence</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="cc_by">cc_by <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="cc_nc">cc_nc <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="cc_nd">cc_nd <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="cc_sa">cc_sa <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="keep_aspect_ratio">keep_aspect_ratio <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="name">name <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="no_flip">no_flip <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="no_resize">no_resize <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="url">url <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_OriginalLisence [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">OriginalLisence</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="artist_id">artist_id <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="cc_by">cc_by <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="cc_nc">cc_nc <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="cc_nd">cc_nd <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="cc_sa">cc_sa <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="keep_aspect_ratio">keep_aspect_ratio <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="name">name <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="no_flip">no_flip <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="no_resize">no_resize <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="url">url <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_OriginalPicture [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">OriginalPicture</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="ext">ext <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="filesize">filesize <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="height">height <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="width">width <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_Panel [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Panel</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="author_id">author_id <font face="Arial Italic" color="grey60">integer</font></td></tr>\r
+  <tr><td align="left" width="130" port="border">border <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="height">height <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="resource_picture_id">resource_picture_id <font face="Arial Italic" color="grey60">integer</font></td></tr>\r
+  <tr><td align="left" width="130" port="seqno">seqno <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="width">width <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_PanelPicture [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">PanelPicture</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="h">h <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="height">height <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="left_offset">left_offset <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="top_offset">top_offset <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="v">v <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="width">width <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="zindex">zindex <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_ResourcePicture [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">ResourcePicture</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="ext">ext <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="filesize">filesize <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="height">height <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="width">width <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_Speach [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Speach</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="content">content <font face="Arial Italic" color="grey60">string</font></td></tr>\r
+  <tr><td align="left" width="130" port="height">height <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="left_offset">left_offset <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="top_offset">top_offset <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="width">width <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_SpeachBalloon [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">SpeachBalloon</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="border_limit">border_limit <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="name">name <font face="Arial Italic" color="grey60">stringcaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="tail_limit">tail_limit <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_SpeachTemplate [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134">\r
+  <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">SpeachTemplate</font></td></tr>\r
+</table>\r
+|\r
+<table border="0" align="left" cellspacing="2" cellpadding="0" width="134">\r
+  <tr><td align="left" width="130" port="height">height <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="left_offset">left_offset <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="top_offset">top_offset <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+  <tr><td align="left" width="130" port="width">width <font face="Arial Italic" color="grey60">integercaA\81÷a2c</font></td></tr>\r
+</table>\r
+>];\r
+  m_Author -> m_Artist [arrowhead = "none", arrowtail = "none", weight = "2"]\r
+  m_SpeachBalloon -> m_BalloonTemplate [arrowhead = "normal", arrowtail = "none", weight = "2"]\r
+  m_BalloonTemplate -> m_SpeachTemplate [arrowhead = "normal", arrowtail = "none", weight = "2"]\r
+  m_ResourcePicture -> m_BalloonTemplate [arrowhead = "normal", arrowtail = "none", weight = "1"]\r
+  m_Balloon -> m_Speach [arrowhead = "normal", arrowtail = "none", weight = "2"]\r
+  m_Panel -> m_Balloon [arrowhead = "normal", arrowtail = "none", weight = "2"]\r
+  m_ResourcePicture -> m_Balloon [arrowhead = "normal", arrowtail = "none", weight = "1"]\r
+  m_Comic -> m_Panel [arrowhead = "normal", arrowtail = "none", weight = "2"]\r
+  m_Lisence -> m_CommonLisence [arrowhead = "none", arrowtail = "none", weight = "2"]\r
+  m_Lisence -> m_OriginalLisence [arrowhead = "none", arrowtail = "none", weight = "2"]\r
+  m_Artist -> m_OriginalPicture [arrowhead = "normal", arrowtail = "none", weight = "1"]\r
+  m_Lisence -> m_OriginalPicture [arrowhead = "normal", arrowtail = "none", weight = "1"]\r
+  m_OriginalPicture -> m_ResourcePicture [arrowhead = "none", arrowtail = "none", weight = "2"]\r
+  m_Panel -> m_PanelPicture [arrowhead = "normal", arrowtail = "none", weight = "2"]\r
+  m_ResourcePicture -> m_PanelPicture [arrowhead = "normal", arrowtail = "none", weight = "2"]\r
+  m_Artist -> m_ResourcePicture [arrowhead = "normal", arrowtail = "none", weight = "1"]\r
+  m_Lisence -> m_ResourcePicture [arrowhead = "normal", arrowtail = "none", weight = "1"]\r
+}\r
diff --git a/Gemfile b/Gemfile
new file mode 100644 (file)
index 0000000..46c6d45
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,50 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.1.1'
+gem 'devise'
+gem 'aws-s3'
+
+# Bundle edge Rails instead:
+# gem 'rails',     :git => 'git://github.com/rails/rails.git'
+
+gem 'sqlite3'
+
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+  gem 'sass-rails',   '~> 3.1.4'
+  gem 'coffee-rails', '~> 3.1.1'
+  gem 'uglifier', '>= 1.0.3'
+end
+
+gem 'jquery-rails'
+
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
+
+# Use unicorn as the web server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug19', :require => 'ruby-debug'
+
+group :production do
+  gem 'pg'
+  gem 'therubyracer-heroku'
+  gem 'rmagick', '=2.12.0', :require => 'RMagick'
+end
+
+group :development, :test do
+  gem 'webrat'
+  gem 'rspec'
+   gem 'rspec-rails'
+   gem 'cucumber'
+   gem 'cucumber-rails'
+  gem 'moro-miso'
+  gem 'database_cleaner'
+  gem 'rails-erd'
+end
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644 (file)
index 0000000..8c9ad92
--- /dev/null
@@ -0,0 +1,200 @@
+GEM
+  remote: http://rubygems.org/
+  specs:
+    actionmailer (3.1.1)
+      actionpack (= 3.1.1)
+      mail (~> 2.3.0)
+    actionpack (3.1.1)
+      activemodel (= 3.1.1)
+      activesupport (= 3.1.1)
+      builder (~> 3.0.0)
+      erubis (~> 2.7.0)
+      i18n (~> 0.6)
+      rack (~> 1.3.2)
+      rack-cache (~> 1.1)
+      rack-mount (~> 0.8.2)
+      rack-test (~> 0.6.1)
+      sprockets (~> 2.0.2)
+    activemodel (3.1.1)
+      activesupport (= 3.1.1)
+      builder (~> 3.0.0)
+      i18n (~> 0.6)
+    activerecord (3.1.1)
+      activemodel (= 3.1.1)
+      activesupport (= 3.1.1)
+      arel (~> 2.2.1)
+      tzinfo (~> 0.3.29)
+    activeresource (3.1.1)
+      activemodel (= 3.1.1)
+      activesupport (= 3.1.1)
+    activesupport (3.1.1)
+      multi_json (~> 1.0)
+    arel (2.2.1)
+    aws-s3 (0.6.2)
+      builder
+      mime-types
+      xml-simple
+    bcrypt-ruby (3.0.1-x86-mingw32)
+    builder (3.0.0)
+    capybara (1.1.2)
+      mime-types (>= 1.16)
+      nokogiri (>= 1.3.3)
+      rack (>= 1.0.0)
+      rack-test (>= 0.5.4)
+      selenium-webdriver (~> 2.0)
+      xpath (~> 0.1.4)
+    childprocess (0.2.3)
+      ffi (~> 1.0.6)
+    coffee-rails (3.1.1)
+      coffee-script (>= 2.2.0)
+      railties (~> 3.1.0)
+    coffee-script (2.2.0)
+      coffee-script-source
+      execjs
+    coffee-script-source (1.1.3)
+    cucumber (1.1.3)
+      builder (>= 2.1.2)
+      diff-lcs (>= 1.1.2)
+      gherkin (~> 2.6.7)
+      json (>= 1.4.6)
+      term-ansicolor (>= 1.0.6)
+    cucumber-rails (1.2.1)
+      capybara (>= 1.1.2)
+      cucumber (>= 1.1.3)
+      nokogiri (>= 1.5.0)
+    database_cleaner (0.7.0)
+    devise (1.5.2)
+      bcrypt-ruby (~> 3.0)
+      orm_adapter (~> 0.0.3)
+      warden (~> 1.1)
+    diff-lcs (1.1.3)
+    erubis (2.7.0)
+    execjs (1.2.11)
+      multi_json (~> 1.0)
+    ffi (1.0.11-x86-mingw32)
+    gherkin (2.6.9-x86-mingw32)
+      json (>= 1.4.6)
+    hike (1.2.1)
+    i18n (0.6.0)
+    jquery-rails (1.0.19)
+      railties (~> 3.0)
+      thor (~> 0.14)
+    json (1.6.3)
+    mail (2.3.0)
+      i18n (>= 0.4.0)
+      mime-types (~> 1.16)
+      treetop (~> 1.4.8)
+    mime-types (1.17.2)
+    moro-miso (0.0.6)
+    multi_json (1.0.4)
+    nokogiri (1.5.0-x86-mingw32)
+    orm_adapter (0.0.5)
+    pg (0.11.0-x86-mingw32)
+    polyglot (0.3.3)
+    rack (1.3.5)
+    rack-cache (1.1)
+      rack (>= 0.4)
+    rack-mount (0.8.3)
+      rack (>= 1.0.0)
+    rack-ssl (1.3.2)
+      rack
+    rack-test (0.6.1)
+      rack (>= 1.0)
+    rails (3.1.1)
+      actionmailer (= 3.1.1)
+      actionpack (= 3.1.1)
+      activerecord (= 3.1.1)
+      activeresource (= 3.1.1)
+      activesupport (= 3.1.1)
+      bundler (~> 1.0)
+      railties (= 3.1.1)
+    rails-erd (0.4.5)
+      activerecord (~> 3.0)
+      activesupport (~> 3.0)
+      ruby-graphviz (~> 0.9.18)
+    railties (3.1.1)
+      actionpack (= 3.1.1)
+      activesupport (= 3.1.1)
+      rack-ssl (~> 1.3.2)
+      rake (>= 0.8.7)
+      rdoc (~> 3.4)
+      thor (~> 0.14.6)
+    rake (0.9.2.2)
+    rdoc (3.11)
+      json (~> 1.4)
+    rmagick (2.12.0)
+    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)
+      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)
+    ruby-graphviz (0.9.21)
+    rubyzip (0.9.5)
+    sass (3.1.11)
+    sass-rails (3.1.5)
+      actionpack (~> 3.1.0)
+      railties (~> 3.1.0)
+      sass (~> 3.1.10)
+      tilt (~> 1.3.2)
+    selenium-webdriver (2.14.0)
+      childprocess (>= 0.2.1)
+      ffi (~> 1.0.9)
+      multi_json (~> 1.0.4)
+      rubyzip
+    sprockets (2.0.3)
+      hike (~> 1.2)
+      rack (~> 1.0)
+      tilt (!= 1.3.0, ~> 1.1)
+    sqlite3 (1.3.5-x86-mingw32)
+    term-ansicolor (1.0.7)
+    therubyracer-heroku (0.8.1.pre3)
+    thor (0.14.6)
+    tilt (1.3.3)
+    treetop (1.4.10)
+      polyglot
+      polyglot (>= 0.3.1)
+    tzinfo (0.3.31)
+    uglifier (1.1.0)
+      execjs (>= 0.3.0)
+      multi_json (>= 1.0.2)
+    warden (1.1.0)
+      rack (>= 1.0)
+    webrat (0.7.3)
+      nokogiri (>= 1.2.0)
+      rack (>= 1.0)
+      rack-test (>= 0.5.3)
+    xml-simple (1.1.1)
+    xpath (0.1.4)
+      nokogiri (~> 1.3)
+
+PLATFORMS
+  x86-mingw32
+
+DEPENDENCIES
+  aws-s3
+  coffee-rails (~> 3.1.1)
+  cucumber
+  cucumber-rails
+  database_cleaner
+  devise
+  jquery-rails
+  moro-miso
+  pg
+  rails (= 3.1.1)
+  rails-erd
+  rmagick (= 2.12.0)
+  rspec
+  rspec-rails
+  sass-rails (~> 3.1.4)
+  sqlite3
+  therubyracer-heroku
+  uglifier (>= 1.0.3)
+  webrat
diff --git a/LISENCE.txt b/LISENCE.txt
new file mode 100644 (file)
index 0000000..3fe62b5
--- /dev/null
@@ -0,0 +1,25 @@
+Copyright (c) 2011, Team Pettan (http://sourceforge.jp/projects/pettanr/)\r
+All rights reserved.\r
+\r
+Redistribution and use in source and binary forms, with or without \r
+modification, are permitted provided that the following conditions are met:\r
+\r
+・Redistributions of source code must retain the above copyright notice, this \r
+  list of conditions and the following disclaimer.\r
+・Redistributions in binary form must reproduce the above copyright notice, \r
+  this list of conditions and the following disclaimer in the documentation \r
+  and/or other materials provided with the distribution.\r
+・Neither the name of the pettanR nor the names of its contributors may be used \r
+  to endorse or promote products derived from this software without specific \r
+  prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \r
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE \r
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL \r
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR \r
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER \r
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \r
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
diff --git a/README.rails b/README.rails
new file mode 100644 (file)
index 0000000..7c36f23
--- /dev/null
@@ -0,0 +1,261 @@
+== Welcome to Rails
+
+Rails is a web-application framework that includes everything needed to create
+database-backed web applications according to the Model-View-Control pattern.
+
+This pattern splits the view (also called the presentation) into "dumb"
+templates that are primarily responsible for inserting pre-built data in between
+HTML tags. The model contains the "smart" domain objects (such as Account,
+Product, Person, Post) that holds all the business logic and knows how to
+persist themselves to a database. The controller handles the incoming requests
+(such as Save New Account, Update Product, Show Post) by manipulating the model
+and directing data to the view.
+
+In Rails, the model is handled by what's called an object-relational mapping
+layer entitled Active Record. This layer allows you to present the data from
+database rows as objects and embellish these data objects with business logic
+methods. You can read more about Active Record in
+link:files/vendor/rails/activerecord/README.html.
+
+The controller and view are handled by the Action Pack, which handles both
+layers by its two parts: Action View and Action Controller. These two layers
+are bundled in a single package due to their heavy interdependence. This is
+unlike the relationship between the Active Record and Action Pack that is much
+more separate. Each of these packages can be used independently outside of
+Rails. You can read more about Action Pack in
+link:files/vendor/rails/actionpack/README.html.
+
+
+== Getting Started
+
+1. At the command prompt, create a new Rails application:
+       <tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
+
+2. Change directory to <tt>myapp</tt> and start the web server:
+       <tt>cd myapp; rails server</tt> (run with --help for options)
+
+3. Go to http://localhost:3000/ and you'll see:
+       "Welcome aboard: You're riding Ruby on Rails!"
+
+4. Follow the guidelines to start developing your application. You can find
+the following resources handy:
+
+* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
+* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
+
+
+== Debugging Rails
+
+Sometimes your application goes wrong. Fortunately there are a lot of tools that
+will help you debug it and get it back on the rails.
+
+First area to check is the application log files. Have "tail -f" commands
+running on the server.log and development.log. Rails will automatically display
+debugging and runtime information to these files. Debugging info will also be
+shown in the browser on requests from 127.0.0.1.
+
+You can also log your own messages directly into the log file from your code
+using the Ruby logger class from inside your controllers. Example:
+
+  class WeblogController < ActionController::Base
+    def destroy
+      @weblog = Weblog.find(params[:id])
+      @weblog.destroy
+      logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
+    end
+  end
+
+The result will be a message in your log file along the lines of:
+
+  Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
+
+More information on how to use the logger is at http://www.ruby-doc.org/core/
+
+Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
+several books available online as well:
+
+* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
+* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
+
+These two books will bring you up to speed on the Ruby language and also on
+programming in general.
+
+
+== Debugger
+
+Debugger support is available through the debugger command when you start your
+Mongrel or WEBrick server with --debugger. This means that you can break out of
+execution at any point in the code, investigate and change the model, and then,
+resume execution! You need to install ruby-debug to run the server in debugging
+mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
+
+  class WeblogController < ActionController::Base
+    def index
+      @posts = Post.all
+      debugger
+    end
+  end
+
+So the controller will accept the action, run the first line, then present you
+with a IRB prompt in the server window. Here you can do things like:
+
+  >> @posts.inspect
+  => "[#<Post:0x14a6be8
+          @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
+       #<Post:0x14a6620
+          @attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
+  >> @posts.first.title = "hello from a debugger"
+  => "hello from a debugger"
+
+...and even better, you can examine how your runtime objects actually work:
+
+  >> f = @posts.first
+  => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
+  >> f.
+  Display all 152 possibilities? (y or n)
+
+Finally, when you're ready to resume execution, you can enter "cont".
+
+
+== Console
+
+The console is a Ruby shell, which allows you to interact with your
+application's domain model. Here you'll have all parts of the application
+configured, just like it is when the application is running. You can inspect
+domain models, change values, and save to the database. Starting the script
+without arguments will launch it in the development environment.
+
+To start the console, run <tt>rails console</tt> from the application
+directory.
+
+Options:
+
+* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
+  made to the database.
+* Passing an environment name as an argument will load the corresponding
+  environment. Example: <tt>rails console production</tt>.
+
+To reload your controllers and models after launching the console run
+<tt>reload!</tt>
+
+More information about irb can be found at:
+link:http://www.rubycentral.org/pickaxe/irb.html
+
+
+== dbconsole
+
+You can go to the command line of your database directly through <tt>rails
+dbconsole</tt>. You would be connected to the database with the credentials
+defined in database.yml. Starting the script without arguments will connect you
+to the development database. Passing an argument will connect you to a different
+database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
+PostgreSQL and SQLite 3.
+
+== Description of Contents
+
+The default directory structure of a generated Ruby on Rails application:
+
+  |-- app
+  |   |-- assets
+  |       |-- images
+  |       |-- javascripts
+  |       `-- stylesheets
+  |   |-- controllers
+  |   |-- helpers
+  |   |-- mailers
+  |   |-- models
+  |   `-- views
+  |       `-- layouts
+  |-- config
+  |   |-- environments
+  |   |-- initializers
+  |   `-- locales
+  |-- db
+  |-- doc
+  |-- lib
+  |   `-- tasks
+  |-- log
+  |-- public
+  |-- script
+  |-- test
+  |   |-- fixtures
+  |   |-- functional
+  |   |-- integration
+  |   |-- performance
+  |   `-- unit
+  |-- tmp
+  |   |-- cache
+  |   |-- pids
+  |   |-- sessions
+  |   `-- sockets
+  `-- vendor
+      |-- assets
+          `-- stylesheets
+      `-- plugins
+
+app
+  Holds all the code that's specific to this particular application.
+
+app/assets
+  Contains subdirectories for images, stylesheets, and JavaScript files.
+
+app/controllers
+  Holds controllers that should be named like weblogs_controller.rb for
+  automated URL mapping. All controllers should descend from
+  ApplicationController which itself descends from ActionController::Base.
+
+app/models
+  Holds models that should be named like post.rb. Models descend from
+  ActiveRecord::Base by default.
+
+app/views
+  Holds the template files for the view that should be named like
+  weblogs/index.html.erb for the WeblogsController#index action. All views use
+  eRuby syntax by default.
+
+app/views/layouts
+  Holds the template files for layouts to be used with views. This models the
+  common header/footer method of wrapping views. In your views, define a layout
+  using the <tt>layout :default</tt> and create a file named default.html.erb.
+  Inside default.html.erb, call <% yield %> to render the view using this
+  layout.
+
+app/helpers
+  Holds view helpers that should be named like weblogs_helper.rb. These are
+  generated for you automatically when using generators for controllers.
+  Helpers can be used to wrap functionality for your views into methods.
+
+config
+  Configuration files for the Rails environment, the routing map, the database,
+  and other dependencies.
+
+db
+  Contains the database schema in schema.rb. db/migrate contains all the
+  sequence of Migrations for your schema.
+
+doc
+  This directory is where your application documentation will be stored when
+  generated using <tt>rake doc:app</tt>
+
+lib
+  Application specific libraries. Basically, any kind of custom code that
+  doesn't belong under controllers, models, or helpers. This directory is in
+  the load path.
+
+public
+  The directory available for the web server. Also contains the dispatchers and the
+  default HTML files. This should be set as the DOCUMENT_ROOT of your web
+  server.
+
+script
+  Helper scripts for automation and generation.
+
+test
+  Unit and functional tests along with fixtures. When using the rails generate
+  command, template test files will be generated for you and placed in this
+  directory.
+
+vendor
+  External libraries that the application depends on. Also includes the plugins
+  subdirectory. If the app has frozen rails, those gems also go here, under
+  vendor/rails/. This directory is in the load path.
diff --git a/Rakefile b/Rakefile
new file mode 100644 (file)
index 0000000..82351ad
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Pettanr::Application.load_tasks
diff --git a/app/assets/images/rails.png b/app/assets/images/rails.png
new file mode 100644 (file)
index 0000000..d5edc04
Binary files /dev/null and b/app/assets/images/rails.png differ
diff --git a/app/assets/javascripts/admins/sessions.js.coffee b/app/assets/javascripts/admins/sessions.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
new file mode 100644 (file)
index 0000000..37c7bfc
--- /dev/null
@@ -0,0 +1,9 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
diff --git a/app/assets/javascripts/artists.js.coffee b/app/assets/javascripts/artists.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/authors/sessions.js.coffee b/app/assets/javascripts/authors/sessions.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/baloon_templates.js.coffee b/app/assets/javascripts/baloon_templates.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/baloon_types.js.coffee b/app/assets/javascripts/baloon_types.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/baloons.js.coffee b/app/assets/javascripts/baloons.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/comics.js.coffee b/app/assets/javascripts/comics.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/common_lisences.js.coffee b/app/assets/javascripts/common_lisences.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/help.js.coffee b/app/assets/javascripts/help.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/home.js.coffee b/app/assets/javascripts/home.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/lisences.js.coffee b/app/assets/javascripts/lisences.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/original_lisences.js.coffee b/app/assets/javascripts/original_lisences.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/original_pictures.js.coffee b/app/assets/javascripts/original_pictures.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/panels.js.coffee b/app/assets/javascripts/panels.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/pictures.js.coffee b/app/assets/javascripts/pictures.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/source_pictures.js.coffee b/app/assets/javascripts/source_pictures.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/speach_baloons.js.coffee b/app/assets/javascripts/speach_baloons.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/speach_templates.js.coffee b/app/assets/javascripts/speach_templates.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/speachbaloons.js.coffee b/app/assets/javascripts/speachbaloons.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/speaches.js.coffee b/app/assets/javascripts/speaches.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/system.js.coffee b/app/assets/javascripts/system.js.coffee
new file mode 100644 (file)
index 0000000..7615679
--- /dev/null
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/stylesheets/admins/sessions.css.scss b/app/assets/stylesheets/admins/sessions.css.scss
new file mode 100644 (file)
index 0000000..c6bbc18
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the admins/sessions controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
new file mode 100644 (file)
index 0000000..fc25b57
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require_self
+ *= require_tree . 
+*/
\ No newline at end of file
diff --git a/app/assets/stylesheets/artists.css.scss b/app/assets/stylesheets/artists.css.scss
new file mode 100644 (file)
index 0000000..cf63878
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the artists controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/authors/sessions.css.scss b/app/assets/stylesheets/authors/sessions.css.scss
new file mode 100644 (file)
index 0000000..244137d
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the authors/sessions controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/baloon_templates.css.scss b/app/assets/stylesheets/baloon_templates.css.scss
new file mode 100644 (file)
index 0000000..06e9b14
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the baloon_templates controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/baloon_types.css.scss b/app/assets/stylesheets/baloon_types.css.scss
new file mode 100644 (file)
index 0000000..ca4b2f3
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the baloon_types controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/baloons.css.scss b/app/assets/stylesheets/baloons.css.scss
new file mode 100644 (file)
index 0000000..67e17d0
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the baloons controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/comics.css.scss b/app/assets/stylesheets/comics.css.scss
new file mode 100644 (file)
index 0000000..6ef66b0
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the comics controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/common_lisences.css.scss b/app/assets/stylesheets/common_lisences.css.scss
new file mode 100644 (file)
index 0000000..3d954b1
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the common_lisences controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/help.css.scss b/app/assets/stylesheets/help.css.scss
new file mode 100644 (file)
index 0000000..a2342cb
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the help controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/home.css.scss b/app/assets/stylesheets/home.css.scss
new file mode 100644 (file)
index 0000000..f0ddc68
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the home controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/lisences.css.scss b/app/assets/stylesheets/lisences.css.scss
new file mode 100644 (file)
index 0000000..ea7f80b
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the lisences controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/original_lisences.css.scss b/app/assets/stylesheets/original_lisences.css.scss
new file mode 100644 (file)
index 0000000..f9474df
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the original_lisences controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/original_pictures.css.scss b/app/assets/stylesheets/original_pictures.css.scss
new file mode 100644 (file)
index 0000000..48be6db
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the original_pictures controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/panels.css.scss b/app/assets/stylesheets/panels.css.scss
new file mode 100644 (file)
index 0000000..9d1f3f6
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the panels controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/pictures.css.scss b/app/assets/stylesheets/pictures.css.scss
new file mode 100644 (file)
index 0000000..8355327
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the pictures controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss
new file mode 100644 (file)
index 0000000..05188f0
--- /dev/null
@@ -0,0 +1,56 @@
+body {
+  background-color: #fff;
+  color: #333;
+  font-family: verdana, arial, helvetica, sans-serif;
+  font-size: 13px;
+  line-height: 18px; }
+
+p, ol, ul, td {
+  font-family: verdana, arial, helvetica, sans-serif;
+  font-size: 13px;
+  line-height: 18px; }
+
+pre {
+  background-color: #eee;
+  padding: 10px;
+  font-size: 11px; }
+
+a {
+  color: #000;
+  &:visited {
+    color: #666; }
+  &:hover {
+    color: #fff;
+    background-color: #000; } }
+
+div {
+  &.field, &.actions {
+    margin-bottom: 10px; } }
+
+#notice {
+  color: green; }
+
+.field_with_errors {
+  padding: 2px;
+  background-color: red;
+  display: table; }
+
+#error_explanation {
+  width: 450px;
+  border: 2px solid red;
+  padding: 7px;
+  padding-bottom: 0;
+  margin-bottom: 20px;
+  background-color: #f0f0f0;
+  h2 {
+    text-align: left;
+    font-weight: bold;
+    padding: 5px 5px 5px 15px;
+    font-size: 12px;
+    margin: -7px;
+    margin-bottom: 0px;
+    background-color: #c00;
+    color: #fff; }
+  ul li {
+    font-size: 12px;
+    list-style: square; } }
diff --git a/app/assets/stylesheets/source_pictures.css.scss b/app/assets/stylesheets/source_pictures.css.scss
new file mode 100644 (file)
index 0000000..d9973ed
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the source_pictures controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/speach_baloons.css.scss b/app/assets/stylesheets/speach_baloons.css.scss
new file mode 100644 (file)
index 0000000..085a9a2
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the speach_baloons controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/speach_templates.css.scss b/app/assets/stylesheets/speach_templates.css.scss
new file mode 100644 (file)
index 0000000..7fe46be
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the speach_templates controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/speachbaloons.css.scss b/app/assets/stylesheets/speachbaloons.css.scss
new file mode 100644 (file)
index 0000000..af35a9e
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the speachbaloons controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/speaches.css.scss b/app/assets/stylesheets/speaches.css.scss
new file mode 100644 (file)
index 0000000..2b19f3b
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the speaches controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/system.css.scss b/app/assets/stylesheets/system.css.scss
new file mode 100644 (file)
index 0000000..9c5e904
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the system controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
new file mode 100644 (file)
index 0000000..2741dd3
--- /dev/null
@@ -0,0 +1,22 @@
+class ApplicationController < ActionController::Base
+  protect_from_forgery
+  before_filter :bf
+  
+  def bf
+    if Admin.count.to_i == 0
+      if params[:controller] == 'system' and params[:action] == 'start'
+      else
+        redirect_to :controller => '/system', :action => 'start'
+      end
+    else
+      if author_signed_in?
+        @artist = if current_author.artist?
+          current_author.artist
+        else
+          Artist.new author_id: current_author.id, email: current_author.email, name: current_author.name
+        end
+      end
+    end
+  end
+  
+end
diff --git a/app/controllers/artists_controller.rb b/app/controllers/artists_controller.rb
new file mode 100644 (file)
index 0000000..442890a
--- /dev/null
@@ -0,0 +1,83 @@
+class ArtistsController < ApplicationController
+  # GET /artists
+  # GET /artists.json
+  def index
+    @artists = Artist.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @artists }
+    end
+  end
+
+  # GET /artists/1
+  # GET /artists/1.json
+  def show
+    @artist = Artist.find(params[:id])
+
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json { render json: @artist }
+    end
+  end
+
+  # GET /artists/new
+  # GET /artists/new.json
+  def new
+    @artist = Artist.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @artist }
+    end
+  end
+
+  # GET /artists/1/edit
+  def edit
+    @artist = Artist.find(params[:id])
+  end
+
+  # POST /artists
+  # POST /artists.json
+  def create
+    @artist = Artist.new(params[:artist])
+
+    respond_to do |format|
+      if @artist.save
+        format.html { redirect_to @artist, notice: 'Artist was successfully created.' }
+        format.json { render json: @artist, status: :created, location: @artist }
+      else
+        format.html { render action: "new" }
+        format.json { render json: @artist.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # PUT /artists/1
+  # PUT /artists/1.json
+  def update
+    @artist = Artist.find(params[:id])
+
+    respond_to do |format|
+      if @artist.update_attributes(params[:artist])
+        format.html { redirect_to @artist, notice: 'Artist was successfully updated.' }
+        format.json { head :ok }
+      else
+        format.html { render action: "edit" }
+        format.json { render json: @artist.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # DELETE /artists/1
+  # DELETE /artists/1.json
+  def destroy
+    @artist = Artist.find(params[:id])
+    @artist.destroy
+
+    respond_to do |format|
+      format.html { redirect_to artists_url }
+      format.json { head :ok }
+    end
+  end
+end
diff --git a/app/controllers/balloon_templates_controller.rb b/app/controllers/balloon_templates_controller.rb
new file mode 100644 (file)
index 0000000..a1ef251
--- /dev/null
@@ -0,0 +1,86 @@
+class BalloonTemplatesController < ApplicationController
+  before_filter :authenticate_author!, :except => [:index]
+  
+  # GET /balloon_templates
+  # GET /balloon_templates.json
+  def index
+    @balloon_templates = BalloonTemplate.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @balloon_templates }
+    end
+  end
+=begin
+  # GET /balloon_templates/1
+  # GET /balloon_templates/1.json
+  def show
+    @balloon_template = BalloonTemplate.find(params[:id])
+
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json { render json: @balloon_template }
+    end
+  end
+
+  # GET /balloon_templates/new
+  # GET /balloon_templates/new.json
+  def new
+    @balloon_template = BalloonTemplate.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @balloon_template }
+    end
+  end
+
+  # GET /balloon_templates/1/edit
+  def edit
+    @balloon_template = BalloonTemplate.find(params[:id])
+  end
+
+  # POST /balloon_templates
+  # POST /balloon_templates.json
+  def create
+    @balloon_template = BalloonTemplate.new(params[:balloon_template])
+
+    respond_to do |format|
+      if @balloon_template.save
+        format.html { redirect_to @balloon_template, notice: 'Balloon template was successfully created.' }
+        format.json { render json: @balloon_template, status: :created, location: @balloon_template }
+      else
+        format.html { render action: "new" }
+        format.json { render json: @balloon_template.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # PUT /balloon_templates/1
+  # PUT /balloon_templates/1.json
+  def update
+    @balloon_template = BalloonTemplate.find(params[:id])
+
+    respond_to do |format|
+      if @balloon_template.update_attributes(params[:balloon_template])
+        format.html { redirect_to @balloon_template, notice: 'Balloon template was successfully updated.' }
+        format.json { head :ok }
+      else
+        format.html { render action: "edit" }
+        format.json { render json: @balloon_template.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # DELETE /balloon_templates/1
+  # DELETE /balloon_templates/1.json
+  def destroy
+    @balloon_template = BalloonTemplate.find(params[:id])
+    @balloon_template.destroy
+
+    respond_to do |format|
+      format.html { redirect_to balloon_templates_url }
+      format.json { head :ok }
+    end
+  end
+=end
+end
diff --git a/app/controllers/balloons_controller.rb b/app/controllers/balloons_controller.rb
new file mode 100644 (file)
index 0000000..617e9b5
--- /dev/null
@@ -0,0 +1,86 @@
+class BalloonsController < ApplicationController
+  before_filter :authenticate_user!, :except => [:index]
+  # GET /balloons
+  # GET /balloons.json
+  def index
+    @balloons = Balloon.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @balloons }
+    end
+  end
+
+=begin
+  # GET /balloons/1
+  # GET /balloons/1.json
+  def show
+    @balloon = Balloon.find(params[:id])
+
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json { render json: @balloon }
+    end
+  end
+
+  # GET /balloons/new
+  # GET /balloons/new.json
+  def new
+    @balloon = Balloon.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @balloon }
+    end
+  end
+
+  # GET /balloons/1/edit
+  def edit
+    @balloon = Balloon.find(params[:id])
+  end
+
+  # POST /balloons
+  # POST /balloons.json
+  def create
+    @balloon = Balloon.new(params[:balloon])
+
+    respond_to do |format|
+      if @balloon.save
+        format.html { redirect_to @balloon, notice: 'Balloon was successfully created.' }
+        format.json { render json: @balloon, status: :created, location: @balloon }
+      else
+        format.html { render action: "new" }
+        format.json { render json: @balloon.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # PUT /balloons/1
+  # PUT /balloons/1.json
+  def update
+    @balloon = Balloon.find(params[:id])
+
+    respond_to do |format|
+      if @balloon.update_attributes(params[:balloon])
+        format.html { redirect_to @balloon, notice: 'Balloon was successfully updated.' }
+        format.json { head :ok }
+      else
+        format.html { render action: "edit" }
+        format.json { render json: @balloon.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # DELETE /balloons/1
+  # DELETE /balloons/1.json
+  def destroy
+    @balloon = Balloon.find(params[:id])
+    @balloon.destroy
+
+    respond_to do |format|
+      format.html { redirect_to balloons_url }
+      format.json { head :ok }
+    end
+  end
+=end
+end
diff --git a/app/controllers/comics_controller.rb b/app/controllers/comics_controller.rb
new file mode 100644 (file)
index 0000000..2d3664a
--- /dev/null
@@ -0,0 +1,133 @@
+class ComicsController < ApplicationController
+  before_filter :authenticate_author!, :except => [:index, :show, :play]
+
+  private
+  
+  def treat_param comic
+    comic.author_id = current_author.id
+  end
+  
+  public
+  
+  def top
+  end
+  
+  # GET /comics
+  # GET /comics.json
+  def index
+    @comics = Comic.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @comics }
+    end
+  end
+
+  # GET /comics/1
+  # GET /comics/1.json
+  def show
+    @comic = Comic.find(params[:id])
+
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json { render json: @comic }
+    end
+  end
+
+  def play
+    @comic = Comic.find(params[:id], include: {:panels => [:panel_pictures => :resource_picture, :balloons => :speaches]}, order: 'panels.seqno')
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json {
+        render :json => @comic.to_json(
+          :include => {
+            :panels => {:include => {
+              :panel_pictures => {:include => :resource_picture}, 
+              :balloons => {:include => :speaches}
+            }}
+          }
+        )
+      }
+      format.jsonp {
+        render :json => "callback(" + @comic.to_json(
+          :include => {
+            :panels => {:include => {
+              :panel_pictures => {:include => :resource_picture}, 
+              :balloons => {:include => :speaches}
+            }}
+          }
+        ) + ");"
+      }
+    end
+  end
+  
+  # GET /comics/new
+  # GET /comics/new.json
+  def new
+    @comic = Comic.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @comic }
+    end
+  end
+
+  # GET /comics/1/edit
+  def edit
+    @comic = Comic.find(params[:id])
+  end
+
+  # POST /comics
+  # POST /comics.json
+  def create
+    @comic = Comic.new(params[:comic])
+    treat_param @comic
+
+    respond_to do |format|
+      if @comic.save
+        format.html { redirect_to @comic, notice: 'Comic was successfully created.' }
+        format.json { render json: @comic, status: :created, location: @comic }
+      else
+        format.html { render action: "new" }
+        format.json { render json: @comic.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # PUT /comics/1
+  # PUT /comics/1.json
+  def update
+    @comic = Comic.find(params[:id])
+    if @comic.own? current_author
+      respond_to do |format|
+        if @comic.update_attributes(params[:comic])
+          format.html { redirect_to @comic, notice: 'Comic was successfully updated.' }
+          format.json { head :ok }
+        else
+          format.html { render action: "edit" }
+          format.json { render json: @comic.errors, status: :unprocessable_entity }
+        end
+      end
+    else
+      format.html { render action: "edit" }
+      format.json { render json: @comic.errors, status: :unprocessable_entity }
+    end
+  end
+
+  # DELETE /comics/1
+  # DELETE /comics/1.json
+  def destroy
+    @comic = Comic.find(params[:id])
+    if @comic.own? current_author
+      @comic.destroy
+      respond_to do |format|
+        format.html { redirect_to comics_url }
+        format.json { head :ok }
+      end
+    else
+      format.html { render action: "edit" }
+      format.json { render json: @comic.errors, status: :unprocessable_entity }
+    end
+  end
+end
diff --git a/app/controllers/common_lisences_controller.rb b/app/controllers/common_lisences_controller.rb
new file mode 100644 (file)
index 0000000..35ac50d
--- /dev/null
@@ -0,0 +1,85 @@
+class CommonLisencesController < ApplicationController
+  # GET /common_lisences
+  # GET /common_lisences.json
+  def index
+    @common_lisences = CommonLisence.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @common_lisences }
+    end
+  end
+
+  # GET /common_lisences/1
+  # GET /common_lisences/1.json
+  def show
+    @common_lisence = CommonLisence.find(params[:id])
+
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json { render json: @common_lisence }
+    end
+  end
+
+  # GET /common_lisences/new
+  # GET /common_lisences/new.json
+  def new
+    @common_lisence = CommonLisence.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @common_lisence }
+    end
+  end
+
+  # GET /common_lisences/1/edit
+  def edit
+    @common_lisence = CommonLisence.find(params[:id])
+  end
+
+  # POST /common_lisences
+  # POST /common_lisences.json
+  def create
+    @common_lisence = CommonLisence.new(params[:common_lisence])
+
+    respond_to do |format|
+      CommonLisence.transaction do
+        if @common_lisence.save_save
+          format.html { redirect_to @common_lisence, notice: 'Common lisence was successfully created.' }
+          format.json { render json: @common_lisence, status: :created, location: @common_lisence }
+        else
+          format.html { render action: "new" }
+          format.json { render json: @common_lisence.errors, status: :unprocessable_entity }
+        end
+      end
+    end
+  end
+
+  # PUT /common_lisences/1
+  # PUT /common_lisences/1.json
+  def update
+    @common_lisence = CommonLisence.find(params[:id])
+
+    respond_to do |format|
+      if @common_lisence.update_attributes(params[:common_lisence])
+        format.html { redirect_to @common_lisence, notice: 'Common lisence was successfully updated.' }
+        format.json { head :ok }
+      else
+        format.html { render action: "edit" }
+        format.json { render json: @common_lisence.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # DELETE /common_lisences/1
+  # DELETE /common_lisences/1.json
+  def destroy
+    @common_lisence = CommonLisence.find(params[:id])
+    @common_lisence.destroy
+
+    respond_to do |format|
+      format.html { redirect_to common_lisences_url }
+      format.json { head :ok }
+    end
+  end
+end
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
new file mode 100644 (file)
index 0000000..f9d547e
--- /dev/null
@@ -0,0 +1,3 @@
+class HelpController < ApplicationController
+
+end
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb
new file mode 100644 (file)
index 0000000..cc3895a
--- /dev/null
@@ -0,0 +1,13 @@
+class HomeController < ApplicationController
+  
+  def start
+    
+  end
+  
+  def index
+  end
+  
+  def profile
+  end
+  
+end
diff --git a/app/controllers/lisences_controller.rb b/app/controllers/lisences_controller.rb
new file mode 100644 (file)
index 0000000..941c838
--- /dev/null
@@ -0,0 +1,83 @@
+class LisencesController < ApplicationController
+  # GET /lisences
+  # GET /lisences.json
+  def index
+    @lisences = Lisence.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @lisences }
+    end
+  end
+
+  # GET /lisences/1
+  # GET /lisences/1.json
+  def show
+    @lisence = Lisence.find(params[:id])
+
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json { render json: @lisence }
+    end
+  end
+
+  # GET /lisences/new
+  # GET /lisences/new.json
+  def new
+    @lisence = Lisence.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @lisence }
+    end
+  end
+
+  # GET /lisences/1/edit
+  def edit
+    @lisence = Lisence.find(params[:id])
+  end
+
+  # POST /lisences
+  # POST /lisences.json
+  def create
+    @lisence = Lisence.new(params[:lisence])
+
+    respond_to do |format|
+      if @lisence.save
+        format.html { redirect_to @lisence, notice: 'Lisence was successfully created.' }
+        format.json { render json: @lisence, status: :created, location: @lisence }
+      else
+        format.html { render action: "new" }
+        format.json { render json: @lisence.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # PUT /lisences/1
+  # PUT /lisences/1.json
+  def update
+    @lisence = Lisence.find(params[:id])
+
+    respond_to do |format|
+      if @lisence.update_attributes(params[:lisence])
+        format.html { redirect_to @lisence, notice: 'Lisence was successfully updated.' }
+        format.json { head :ok }
+      else
+        format.html { render action: "edit" }
+        format.json { render json: @lisence.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # DELETE /lisences/1
+  # DELETE /lisences/1.json
+  def destroy
+    @lisence = Lisence.find(params[:id])
+    @lisence.destroy
+
+    respond_to do |format|
+      format.html { redirect_to lisences_url }
+      format.json { head :ok }
+    end
+  end
+end
diff --git a/app/controllers/original_lisences_controller.rb b/app/controllers/original_lisences_controller.rb
new file mode 100644 (file)
index 0000000..d43d0f4
--- /dev/null
@@ -0,0 +1,85 @@
+class OriginalLisencesController < ApplicationController
+  before_filter :authenticate_author!, :except => [:index]
+
+  # GET /original_lisences
+  # GET /original_lisences.json
+  def index
+    @original_lisences = OriginalLisence.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @original_lisences }
+    end
+  end
+
+  # GET /original_lisences/1
+  # GET /original_lisences/1.json
+  def show
+    @original_lisence = OriginalLisence.find(params[:id])
+
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json { render json: @original_lisence }
+    end
+  end
+
+  # GET /original_lisences/new
+  # GET /original_lisences/new.json
+  def new
+    @original_lisence = OriginalLisence.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @original_lisence }
+    end
+  end
+
+  # GET /original_lisences/1/edit
+  def edit
+    @original_lisence = OriginalLisence.find(params[:id])
+  end
+
+  # POST /original_lisences
+  # POST /original_lisences.json
+  def create
+    @original_lisence = OriginalLisence.new(params[:original_lisence])
+    @original_lisence.artist_id = current_author.artist.id
+    respond_to do |format|
+      if @original_lisence.save
+        format.html { redirect_to @original_lisence, notice: 'Original lisence was successfully created.' }
+        format.json { render json: @original_lisence, status: :created, location: @original_lisence }
+      else
+        format.html { render action: "new" }
+        format.json { render json: @original_lisence.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # PUT /original_lisences/1
+  # PUT /original_lisences/1.json
+  def update
+    @original_lisence = OriginalLisence.find(params[:id])
+
+    respond_to do |format|
+      if @original_lisence.update_attributes(params[:original_lisence])
+        format.html { redirect_to @original_lisence, notice: 'Original lisence was successfully updated.' }
+        format.json { head :ok }
+      else
+        format.html { render action: "edit" }
+        format.json { render json: @original_lisence.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # DELETE /original_lisences/1
+  # DELETE /original_lisences/1.json
+  def destroy
+    @original_lisence = OriginalLisence.find(params[:id])
+    @original_lisence.destroy
+
+    respond_to do |format|
+      format.html { redirect_to original_lisences_url }
+      format.json { head :ok }
+    end
+  end
+end
diff --git a/app/controllers/original_pictures_controller.rb b/app/controllers/original_pictures_controller.rb
new file mode 100644 (file)
index 0000000..ac85efe
--- /dev/null
@@ -0,0 +1,184 @@
+class OriginalPicturesController < ApplicationController
+  before_filter :authenticate_author!, :except => [:index, :show]
+
+  private
+  
+  def set_image(prm)
+    img = nil
+    if (f = prm[:original_picture][:file]).respond_to?(:read)
+      if f.size > 1000000
+        @original_picture.width = 0
+        @original_picture.height = 0
+        @original_picture.ext = 'none'
+        @original_picture.filesize = 1.megabytes
+      else
+        img = Magick::Image.from_blob(f.read).shift
+        @original_picture.width = img.columns
+        @original_picture.height = img.rows
+        @original_picture.ext = img.format.downcase
+        @original_picture.filesize = f.size
+      end
+    else
+      dat = Base64.decode64(prm[:original_picture][:file].to_s.gsub(' ', '+')) #rubyのバグ?+でデコードされるべきキャラがスペースになる
+      img = Magick::Image.from_blob(dat).shift
+      @original_picture.width = img.columns
+      @original_picture.height = img.rows
+      @original_picture.ext = img.format.downcase
+      @original_picture.filesize = 1000
+    end
+    img
+  end
+  
+  public
+  
+  # GET /original_pictures
+  # GET /original_pictures.json
+  def index
+    @original_pictures = OriginalPicture.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @original_pictures }
+    end
+  end
+
+  # GET /original_pictures/1
+  # GET /original_pictures/1.json
+  def show
+    @original_picture = OriginalPicture.find(params[:id])
+#    if params[:subdir] == 'refresh'
+#      refresh 
+#      return
+#    end
+
+    respond_to do |format|
+      opt = {:type => @original_picture.mime_type, :disposition=>"inline"}
+      format.png { send_data(@original_picture.restore, opt ) }
+      format.gif { send_data(@original_picture.restore, opt ) }
+      format.jpeg { send_data(@original_picture.restore, opt ) }
+      format.html # show.html.erb
+      format.json { render json: @original_picture}
+    end
+  end
+
+  def refresh
+    @original_picture = OriginalPicture.find(params[:id])
+    img = Magick::Image.from_blob(@original_picture.restore).shift
+    @original_picture.store img
+    respond_to do |format|
+      format.html { redirect_to original_pictures_url }
+    end
+  end
+  
+  # GET /original_pictures/new
+  # GET /original_pictures/new.json
+  def new
+    @original_picture = OriginalPicture.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @original_picture }
+    end
+  end
+
+  # GET /original_pictures/1/edit
+  def edit
+    @original_picture = OriginalPicture.find(params[:id])
+  end
+
+  # POST /original_pictures
+  # POST /original_pictures.json
+  def create
+    unless @artist
+      respond_to do |format|
+        format.html { redirect_to @original_picture, notice: 'Failed! author does not artist.' }
+        format.json { render json: @original_picture.errors, status: :unprocessable_entity }
+      end
+      return
+    end
+    @original_picture = OriginalPicture.new
+    img = set_image params
+    @original_picture.artist_id = current_author.artist.id
+
+    respond_to do |format|
+      OriginalPicture.transaction do
+        if @original_picture.save
+          if @original_picture.store(img)
+            format.html { redirect_to @original_picture, notice: 'Original picture was successfully created.' }
+            format.json { render json: @original_picture, status: :created, location: @original_picture }
+          else
+            format.html { redirect_to @original_picture, notice: 'Failed! Original picture was NOT created.' }
+            format.json { render json: @original_picture.errors, status: :unprocessable_entity }
+          end
+        else
+          format.html { render action: "new" }
+          format.json { render json: @original_picture.errors, status: :unprocessable_entity }
+        end
+      end
+    end
+  end
+
+  # PUT /original_pictures/1
+  # PUT /original_pictures/1.json
+  def update
+    unless @artist
+      respond_to do |format|
+        format.html { redirect_to @original_picture, notice: 'Failed! author does not artist.' }
+        format.json { render json: @original_picture.errors, status: :unprocessable_entity }
+      end
+      return
+    end
+    @original_picture = OriginalPicture.find(params[:id])
+    unless @original_picture.own? current_author
+      respond_to do |format|
+        format.html { redirect_to @original_picture, notice: 'Failed! ' }
+        format.json { render json: @original_picture.errors, status: :unprocessable_entity }
+      end
+      return
+    end
+    img = set_image params
+
+    respond_to do |format|
+      OriginalPicture.transaction do
+        if @original_picture.save
+          if @original_picture.store(img)
+            format.html { redirect_to @original_picture, notice: 'Original picture was successfully updated.' }
+            format.json { head :ok }
+          else
+            format.html { redirect_to @original_picture, notice: 'Failed! Original picture was NOT created.' }
+            format.json { render json: @original_picture.errors, status: :unprocessable_entity }
+          end
+        else
+          format.html { render action: "edit" }
+          format.json { render json: @original_picture.errors, status: :unprocessable_entity }
+        end
+      end
+    end
+  end
+
+  # DELETE /original_pictures/1
+  # DELETE /original_pictures/1.json
+  def destroy
+    unless @artist
+      respond_to do |format|
+        format.html { redirect_to @original_picture, notice: 'Failed! author does not artist.' }
+        format.json { render json: @original_picture.errors, status: :unprocessable_entity }
+      end
+      return
+    end
+    @original_picture = OriginalPicture.find(params[:id])
+    unless @original_picture.own? current_author
+      respond_to do |format|
+        format.html { redirect_to @original_picture, notice: 'Failed! ' }
+        format.json { render json: @original_picture.errors, status: :unprocessable_entity }
+      end
+      return
+    end
+    @original_picture.destroy
+
+    respond_to do |format|
+      format.html { redirect_to original_pictures_url }
+      format.json { head :ok }
+    end
+  end
+end
diff --git a/app/controllers/panel_pictures_controller.rb b/app/controllers/panel_pictures_controller.rb
new file mode 100644 (file)
index 0000000..94d3218
--- /dev/null
@@ -0,0 +1,15 @@
+class PanelPicturesController < ApplicationController
+  before_filter :authenticate_author!, :except => [:index]
+
+  # GET /panel_pictures
+  # GET /panel_pictures.json
+  def index
+    @panel_pictures = PanelPicture.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @panel_pictures }
+    end
+  end
+
+end
diff --git a/app/controllers/panels_controller.rb b/app/controllers/panels_controller.rb
new file mode 100644 (file)
index 0000000..e0a7789
--- /dev/null
@@ -0,0 +1,141 @@
+class PanelsController < ApplicationController
+  before_filter :authenticate_author!, :except => [:index, :show]
+
+  private
+  
+  def treat_param panel
+    panel.author_id = current_author.id
+  end
+  
+  public
+  
+  # GET /panels
+  # GET /panels.json
+  def index
+    @panels = Panel.all :order => 'updated_at'
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @panels }
+    end
+  end
+
+  # GET /panels/1
+  # GET /panels/1.json
+  def show
+    @panel = Panel.find(params[:id], include: [:comic, :panel_pictures => :resource_picture, :balloons => :speaches])# only: [:width, :height])
+
+    respond_to do |format|
+      format.html # show.html.erb
+       format.json {
+        render :json => @panel.to_json(include: {
+          :comic => {}, :panel_pictures => {:include => :image}, :fukidashis => {:include => :serifus}
+        })
+      }
+      format.jsonp {
+        render :json => "callback(" + @panel.to_json(include: {
+          :comic => {}, :panel_pictures => {:include => :image}, :fukidashis => {:include => :serifus}
+        }) + ");"
+      }
+#      format.json { render :json => @frame.to_json(include: {
+#        :comic => {:only => :title}, :panel_pictures => {:include => {:image => {:only => [:width]}},:only => [:width, :height, :zindex, :image_id]}
+#      }, only: [:border]) }
+   end
+  end
+
+  # GET /panels/new
+  # GET /panels/new.json
+  def new
+    @panel = Panel.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @panel }
+    end
+  end
+
+  # GET /panels/1/edit
+  def edit
+    @panel = Panel.find(params[:id])
+  end
+
+  # POST /panels
+  # POST /panels.json
+  def create
+    @panel = Panel.new(params[:panel])
+    treat_param @panel
+    @comic = Comic.find @panel.comic_id
+
+    respond_to do |format|
+      Panel.transaction do
+        if @panel.vdt_save
+          format.html { redirect_to @panel, notice: 'Panel was successfully created.' }
+          format.json { render json: @panel, status: :created, location: @panel }
+        else
+          format.html { render action: "new" }
+          format.json { render json: @panel.errors, status: :unprocessable_entity }
+        end
+      end
+    end
+  end
+
+  # PUT /panels/1
+  # PUT /panels/1.json
+  def update
+    @panel = Panel.find(params[:id])
+    if @panel.own? current_author
+      respond_to do |format|
+        Panel.transaction do
+          if params[:panel][:seqno] and params[:panel][:seqno].to_i != @panel.seqno
+            @panel.move_to params[:panel][:seqno].to_i
+          end
+          if @panel.update_attributes(params[:panel])
+            format.html { redirect_to @panel, notice: 'Panel was successfully updated.' }
+            format.json { head :ok }
+          else
+            format.html { render action: "edit" }
+            format.json { render json: @panel.errors, status: :unprocessable_entity }
+          end
+        end
+      end
+    else
+      format.html { render action: "edit" }
+      format.json { render json: @panel.errors, status: :unprocessable_entity }
+    end
+  end
+
+  # DELETE /panels/1
+  # DELETE /panels/1.json
+  def destroy
+    @panel = Panel.find(params[:id])
+    if @panel.own? current_author
+      respond_to do |format|
+        Panel.transaction do
+          @panel.destroy_and_shorten
+          format.html { redirect_to panels_url }
+          format.json { head :ok }
+        end
+      end
+    else
+      format.html { render action: "edit" }
+      format.json { render json: @panel.errors, status: :unprocessable_entity }
+    end
+  end
+  
+  def move
+    @panel = Panel.find(params[:id])
+    @new_seq = params[:panel][:seqno].to_i
+    respond_to do |format|
+      Panel.transaction do
+        if @panel.move_to(@new_seq)
+          format.html { redirect_to @panel, notice: 'Panel was successfully moved.' }
+          format.json { head :ok }
+        else
+          format.html { render action: "show" }
+          format.json { render json: @panel.errors, status: :unprocessable_entity }
+        end
+      end
+    end
+  end
+  
+end
diff --git a/app/controllers/resource_pictures_controller.rb b/app/controllers/resource_pictures_controller.rb
new file mode 100644 (file)
index 0000000..f422561
--- /dev/null
@@ -0,0 +1,91 @@
+class ResourcePicturesController < ApplicationController
+  before_filter :authenticate_author!, :except => [:index, :show]
+
+  # GET /resource_pictures
+  # GET /resource_pictures.json
+  def index
+    @resource_pictures = ResourcePicture.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @resource_pictures }
+    end
+  end
+
+  # GET /resource_pictures/1
+  # GET /resource_pictures/1.json
+  def show
+    @resource_picture = ResourcePicture.find(params[:id])
+
+    respond_to do |format|
+      opt = {:type => @resource_picture.mime_type, :disposition=>"inline"}
+      format.png { send_data(@resource_picture.restore(params[:subdir]), opt ) }
+      format.gif { send_data(@resource_picture.restore(params[:subdir]), opt ) }
+      format.jpeg { send_data(@resource_picture.restore(params[:subdir]), opt ) }
+      format.html # show.html.erb
+      format.json { render json: @resource_picture}
+    end
+  end
+
+=begin
+  # GET /resource_pictures/new
+  # GET /resource_pictures/new.json
+  def new
+    @resource_picture = ResourcePicture.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @resource_picture }
+    end
+  end
+
+  # GET /resource_pictures/1/edit
+  def edit
+    @resource_picture = ResourcePicture.find(params[:id])
+  end
+
+  # POST /resource_pictures
+  # POST /resource_pictures.json
+  def create
+    @resource_picture = ResourcePicture.new(params[:resource_picture])
+
+    respond_to do |format|
+      if @resource_picture.save
+        format.html { redirect_to @resource_picture, notice: 'Resource picture was successfully created.' }
+        format.json { render json: @resource_picture, status: :created, location: @resource_picture }
+      else
+        format.html { render action: "new" }
+        format.json { render json: @resource_picture.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # PUT /resource_pictures/1
+  # PUT /resource_pictures/1.json
+  def update
+    @resource_picture = ResourcePicture.find(params[:id])
+
+    respond_to do |format|
+      if @resource_picture.update_attributes(params[:resource_picture])
+        format.html { redirect_to @resource_picture, notice: 'Resource picture was successfully updated.' }
+        format.json { head :ok }
+      else
+        format.html { render action: "edit" }
+        format.json { render json: @resource_picture.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # DELETE /resource_pictures/1
+  # DELETE /resource_pictures/1.json
+  def destroy
+    @resource_picture = ResourcePicture.find(params[:id])
+    @resource_picture.destroy
+
+    respond_to do |format|
+      format.html { redirect_to resource_pictures_url }
+      format.json { head :ok }
+    end
+  end
+=end
+end
diff --git a/app/controllers/speach_balloons_controller.rb b/app/controllers/speach_balloons_controller.rb
new file mode 100644 (file)
index 0000000..3297494
--- /dev/null
@@ -0,0 +1,127 @@
+class SpeachBalloonsController < ApplicationController
+  before_filter :authenticate_author!, :except => [:index]
+
+  private
+  
+  def validate_param(ft)
+    res = nil
+    bl = ft[:border_limit].to_i
+    tl = ft[:tail_limit].to_i
+    if bl * tl == ft[:balloon_templates_attributes].size
+      flag = []
+      bl.times do |i|
+        flag[i] = []
+        tl.times do |j|
+          flag[i][j] = true
+        end
+      end
+      ft[:balloon_templates_attributes].each do |k, t|
+        flag[t[:border].to_i - 1][t[:tail].to_i - 1] = nil
+      end
+      if flag.flatten.compact.size == 0
+      else
+        res = "invalid variation"
+      end
+    else
+      res = "invalid template size"
+    end
+    res
+  end
+  
+  public  # GET /speach_balloons
+  # GET /speach_balloons.json
+  def index
+    @speach_balloons = SpeachBalloon.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @speach_balloons }
+    end
+  end
+
+  # GET /speach_balloons/1
+  # GET /speach_balloons/1.json
+  def show
+    @speach_balloon = SpeachBalloon.find(params[:id], include: {:balloon_templates => :speach_templates})
+
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json {
+        render :json => @speach_balloon.to_json(include: {
+          :balloon_templates => {:include => :speach_templates}
+        })
+      }
+      format.jsonp {
+        render :json => "callback(" + @speach_balloon.to_json(include: {
+          :balloon_templates => {:include => :speach_templates}
+        }) + ")"
+      }
+    end
+  end
+
+  # GET /speach_balloons/new
+  # GET /speach_balloons/new.json
+  def new
+    @speach_balloon = SpeachBalloon.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @speach_balloon }
+    end
+  end
+
+  # GET /speach_balloons/1/edit
+  def edit
+    @speach_balloon = SpeachBalloon.find(params[:id])
+  end
+
+  # POST /speach_balloons
+  # POST /speach_balloons.json
+  def create
+    @speach_balloon = SpeachBalloon.new(params[:speach_balloon])
+
+    if em = validate_param(params[:speach_balloon])
+      respond_to do |format|
+        format.json { render json: em, status: :unprocessable_entity }
+      end
+    else
+      respond_to do |format|
+        if @speach_balloon.save
+          format.html { redirect_to @speach_balloon, notice: 'Speach balloon was successfully created.' }
+          format.json { render json: @speach_balloon, status: :created, location: @speach_balloon }
+        else
+          format.html { render action: "new" }
+          format.json { render json: @speach_balloon.errors, status: :unprocessable_entity }
+        end
+      end
+    end
+  end
+
+  # PUT /speach_balloons/1
+  # PUT /speach_balloons/1.json
+  def update
+    @speach_balloon = SpeachBalloon.find(params[:id])
+
+    respond_to do |format|
+      if @speach_balloon.update_attributes(params[:speach_balloon])
+        format.html { redirect_to @speach_balloon, notice: 'Speach balloon was successfully updated.' }
+        format.json { head :ok }
+      else
+        format.html { render action: "edit" }
+        format.json { render json: @speach_balloon.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # DELETE /speach_balloons/1
+  # DELETE /speach_balloons/1.json
+  def destroy
+    @speach_balloon = SpeachBalloon.find(params[:id])
+    @speach_balloon.destroy
+
+    respond_to do |format|
+      format.html { redirect_to speach_balloons_url }
+      format.json { head :ok }
+    end
+  end
+end
diff --git a/app/controllers/speach_templates_controller.rb b/app/controllers/speach_templates_controller.rb
new file mode 100644 (file)
index 0000000..401844d
--- /dev/null
@@ -0,0 +1,87 @@
+class SpeachTemplatesController < ApplicationController
+  before_filter :authenticate_author!, :except => [:index]
+
+  # GET /speach_templates
+  # GET /speach_templates.json
+  def index
+    @speach_templates = SpeachTemplate.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @speach_templates }
+    end
+  end
+
+=begin
+  # GET /speach_templates/1
+  # GET /speach_templates/1.json
+  def show
+    @speach_template = SpeachTemplate.find(params[:id])
+
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json { render json: @speach_template }
+    end
+  end
+
+  # GET /speach_templates/new
+  # GET /speach_templates/new.json
+  def new
+    @speach_template = SpeachTemplate.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @speach_template }
+    end
+  end
+
+  # GET /speach_templates/1/edit
+  def edit
+    @speach_template = SpeachTemplate.find(params[:id])
+  end
+
+  # POST /speach_templates
+  # POST /speach_templates.json
+  def create
+    @speach_template = SpeachTemplate.new(params[:speach_template])
+
+    respond_to do |format|
+      if @speach_template.save
+        format.html { redirect_to @speach_template, notice: 'Speach template was successfully created.' }
+        format.json { render json: @speach_template, status: :created, location: @speach_template }
+      else
+        format.html { render action: "new" }
+        format.json { render json: @speach_template.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # PUT /speach_templates/1
+  # PUT /speach_templates/1.json
+  def update
+    @speach_template = SpeachTemplate.find(params[:id])
+
+    respond_to do |format|
+      if @speach_template.update_attributes(params[:speach_template])
+        format.html { redirect_to @speach_template, notice: 'Speach template was successfully updated.' }
+        format.json { head :ok }
+      else
+        format.html { render action: "edit" }
+        format.json { render json: @speach_template.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # DELETE /speach_templates/1
+  # DELETE /speach_templates/1.json
+  def destroy
+    @speach_template = SpeachTemplate.find(params[:id])
+    @speach_template.destroy
+
+    respond_to do |format|
+      format.html { redirect_to speach_templates_url }
+      format.json { head :ok }
+    end
+  end
+=end
+end
diff --git a/app/controllers/speaches_controller.rb b/app/controllers/speaches_controller.rb
new file mode 100644 (file)
index 0000000..06675f8
--- /dev/null
@@ -0,0 +1,87 @@
+class SpeachesController < ApplicationController
+  before_filter :authenticate_author!, :except => [:index]
+
+  # GET /speaches
+  # GET /speaches.json
+  def index
+    @speaches = Speach.all
+
+    respond_to do |format|
+      format.html # index.html.erb
+      format.json { render json: @speaches }
+    end
+  end
+
+=begin
+  # GET /speaches/1
+  # GET /speaches/1.json
+  def show
+    @speach = Speach.find(params[:id])
+
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json { render json: @speach }
+    end
+  end
+
+  # GET /speaches/new
+  # GET /speaches/new.json
+  def new
+    @speach = Speach.new
+
+    respond_to do |format|
+      format.html # new.html.erb
+      format.json { render json: @speach }
+    end
+  end
+
+  # GET /speaches/1/edit
+  def edit
+    @speach = Speach.find(params[:id])
+  end
+
+  # POST /speaches
+  # POST /speaches.json
+  def create
+    @speach = Speach.new(params[:speach])
+
+    respond_to do |format|
+      if @speach.save
+        format.html { redirect_to @speach, notice: 'Speach was successfully created.' }
+        format.json { render json: @speach, status: :created, location: @speach }
+      else
+        format.html { render action: "new" }
+        format.json { render json: @speach.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # PUT /speaches/1
+  # PUT /speaches/1.json
+  def update
+    @speach = Speach.find(params[:id])
+
+    respond_to do |format|
+      if @speach.update_attributes(params[:speach])
+        format.html { redirect_to @speach, notice: 'Speach was successfully updated.' }
+        format.json { head :ok }
+      else
+        format.html { render action: "edit" }
+        format.json { render json: @speach.errors, status: :unprocessable_entity }
+      end
+    end
+  end
+
+  # DELETE /speaches/1
+  # DELETE /speaches/1.json
+  def destroy
+    @speach = Speach.find(params[:id])
+    @speach.destroy
+
+    respond_to do |format|
+      format.html { redirect_to speaches_url }
+      format.json { head :ok }
+    end
+  end
+=end
+end
diff --git a/app/controllers/system_controller.rb b/app/controllers/system_controller.rb
new file mode 100644 (file)
index 0000000..6ba18d0
--- /dev/null
@@ -0,0 +1,22 @@
+class SystemController < ApplicationController
+  before_filter :authenticate_admin!, :except => [:start]
+  layout false, :only => :start
+  
+  def start
+  
+  end
+  
+  def waiting_list
+    @newadmins = Admin.find(:all, :conditions => ['activate = 0'])
+  end
+  
+  def accept_admin
+    @newadmin = Admin.find params[:id]
+    if admin_signed_in? and current_admin.activate
+      @newadmin.activate = 1
+      @newadmin.save
+    else
+    end
+  end
+  
+end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
new file mode 100644 (file)
index 0000000..de6be79
--- /dev/null
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
diff --git a/app/helpers/artists_helper.rb b/app/helpers/artists_helper.rb
new file mode 100644 (file)
index 0000000..52d21cb
--- /dev/null
@@ -0,0 +1,2 @@
+module ArtistsHelper
+end
diff --git a/app/helpers/balloon_templates_helper.rb b/app/helpers/balloon_templates_helper.rb
new file mode 100644 (file)
index 0000000..afab2a2
--- /dev/null
@@ -0,0 +1,2 @@
+module BalloonTemplatesHelper
+end
diff --git a/app/helpers/balloon_types_helper.rb b/app/helpers/balloon_types_helper.rb
new file mode 100644 (file)
index 0000000..abc0847
--- /dev/null
@@ -0,0 +1,2 @@
+module BalloonTypesHelper
+end
diff --git a/app/helpers/balloons_helper.rb b/app/helpers/balloons_helper.rb
new file mode 100644 (file)
index 0000000..6dba8f8
--- /dev/null
@@ -0,0 +1,2 @@
+module BalloonsHelper
+end
diff --git a/app/helpers/comics_helper.rb b/app/helpers/comics_helper.rb
new file mode 100644 (file)
index 0000000..597e65a
--- /dev/null
@@ -0,0 +1,2 @@
+module ComicsHelper
+end
diff --git a/app/helpers/common_lisences_helper.rb b/app/helpers/common_lisences_helper.rb
new file mode 100644 (file)
index 0000000..7f959d2
--- /dev/null
@@ -0,0 +1,2 @@
+module CommonLisencesHelper
+end
diff --git a/app/helpers/help_helper.rb b/app/helpers/help_helper.rb
new file mode 100644 (file)
index 0000000..6a35490
--- /dev/null
@@ -0,0 +1,2 @@
+module HelpHelper
+end
diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb
new file mode 100644 (file)
index 0000000..23de56a
--- /dev/null
@@ -0,0 +1,2 @@
+module HomeHelper
+end
diff --git a/app/helpers/lisences_helper.rb b/app/helpers/lisences_helper.rb
new file mode 100644 (file)
index 0000000..5519b99
--- /dev/null
@@ -0,0 +1,2 @@
+module LisencesHelper
+end
diff --git a/app/helpers/original_lisences_helper.rb b/app/helpers/original_lisences_helper.rb
new file mode 100644 (file)
index 0000000..1fe11c8
--- /dev/null
@@ -0,0 +1,2 @@
+module OriginalLisencesHelper
+end
diff --git a/app/helpers/original_pictures_helper.rb b/app/helpers/original_pictures_helper.rb
new file mode 100644 (file)
index 0000000..cd77d99
--- /dev/null
@@ -0,0 +1,2 @@
+module OriginalPicturesHelper
+end
diff --git a/app/helpers/panel_pictures_helper.rb b/app/helpers/panel_pictures_helper.rb
new file mode 100644 (file)
index 0000000..3a65773
--- /dev/null
@@ -0,0 +1,2 @@
+module PanelPicturesHelper
+end
diff --git a/app/helpers/panels_helper.rb b/app/helpers/panels_helper.rb
new file mode 100644 (file)
index 0000000..e8dc6e5
--- /dev/null
@@ -0,0 +1,2 @@
+module PanelsHelper
+end
diff --git a/app/helpers/resource_pictures_helper.rb b/app/helpers/resource_pictures_helper.rb
new file mode 100644 (file)
index 0000000..6f1dd28
--- /dev/null
@@ -0,0 +1,2 @@
+module ResourcePicturesHelper
+end
diff --git a/app/helpers/speach_balloons_helper.rb b/app/helpers/speach_balloons_helper.rb
new file mode 100644 (file)
index 0000000..ca42158
--- /dev/null
@@ -0,0 +1,2 @@
+module SpeachBalloonsHelper
+end
diff --git a/app/helpers/speach_templates_helper.rb b/app/helpers/speach_templates_helper.rb
new file mode 100644 (file)
index 0000000..51b4580
--- /dev/null
@@ -0,0 +1,2 @@
+module SpeachTemplatesHelper
+end
diff --git a/app/helpers/speaches_helper.rb b/app/helpers/speaches_helper.rb
new file mode 100644 (file)
index 0000000..c4b52bb
--- /dev/null
@@ -0,0 +1,2 @@
+module SpeachesHelper
+end
diff --git a/app/helpers/system_helper.rb b/app/helpers/system_helper.rb
new file mode 100644 (file)
index 0000000..2344fba
--- /dev/null
@@ -0,0 +1,2 @@
+module SystemHelper
+end
diff --git a/app/mailers/.gitkeep b/app/mailers/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/models/.gitkeep b/app/models/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/models/admin.rb b/app/models/admin.rb
new file mode 100644 (file)
index 0000000..07f6523
--- /dev/null
@@ -0,0 +1,14 @@
+class Admin < ActiveRecord::Base
+  # Include default devise modules. Others available are:
+  # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
+  devise :database_authenticatable, :registerable,
+         :recoverable, :rememberable, :trackable, :validatable
+
+  # Setup accessible (or protected) attributes for your model
+  attr_accessible :email, :password, :password_confirmation, :remember_me
+  
+  def self.start(email, passwd)
+    Admin.create! :email => email, :password => passwd, :password_confirmation => passwd, :activate => true
+  end
+  
+end
diff --git a/app/models/artist.rb b/app/models/artist.rb
new file mode 100644 (file)
index 0000000..973be0f
--- /dev/null
@@ -0,0 +1,9 @@
+class Artist < ActiveRecord::Base
+  belongs_to :author
+  has_many :original_pictures
+  
+  def self.find_by_author author
+    Artist.find( :first, :conditions => ['author_id = ?', author.id])
+  end
+  
+end
diff --git a/app/models/author.rb b/app/models/author.rb
new file mode 100644 (file)
index 0000000..cc154ca
--- /dev/null
@@ -0,0 +1,21 @@
+class Author < ActiveRecord::Base
+  has_one :artist
+  
+  # Include default devise modules. Others available are:
+  # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
+  devise :database_authenticatable, :registerable,
+         :recoverable, :rememberable, :trackable, :token_authenticatable, :validatable#, :confirmable
+
+  # Setup accessible (or protected) attributes for your model
+  attr_accessible :email, :password, :password_confirmation, :remember_me
+
+  before_save :ensure_authentication_token\r
+  before_save do |r|
+    r.name = 'no name' if r.name.blank?
+  end
+  
+ def artist?
+   Artist.find_by_author(self) != nil
+ end
+end
diff --git a/app/models/balloon.rb b/app/models/balloon.rb
new file mode 100644 (file)
index 0000000..45d2ead
--- /dev/null
@@ -0,0 +1,11 @@
+class Balloon < ActiveRecord::Base
+  has_many :speaches
+  belongs_to :panel
+  belongs_to :resource_picture
+  accepts_nested_attributes_for :speaches
+  
+  def picture_url
+    '/resource_pictures/' + self.resource_picture.filename
+  end
+  
+end
diff --git a/app/models/balloon_template.rb b/app/models/balloon_template.rb
new file mode 100644 (file)
index 0000000..d4e3d5e
--- /dev/null
@@ -0,0 +1,6 @@
+class BalloonTemplate < ActiveRecord::Base
+  belongs_to :speach_balloon
+  has_many :speach_templates, :dependent => :destroy
+  belongs_to :resource_picture
+  accepts_nested_attributes_for :speach_templates
+end
diff --git a/app/models/comic.rb b/app/models/comic.rb
new file mode 100644 (file)
index 0000000..b4b502d
--- /dev/null
@@ -0,0 +1,9 @@
+class Comic < ActiveRecord::Base
+  has_many :panels, :dependent => :destroy
+
+  def own? author
+    return false unless author
+    self.author_id == author.id
+  end
+  
+end
diff --git a/app/models/common_lisence.rb b/app/models/common_lisence.rb
new file mode 100644 (file)
index 0000000..ea1fb4b
--- /dev/null
@@ -0,0 +1,18 @@
+class CommonLisence < ActiveRecord::Base
+  belongs_to :lisence
+  
+  def save_save
+    lisence = Lisence.new( {
+      :name => self.name, :url => self.url, :cc_by => self.cc_by, :cc_sa => self.cc_sa, :cc_nd => self.cc_nd, :cc_nc => self.cc_nc, 
+      :no_resize => self.no_resize, :no_flip => self.no_flip, :keep_aspect_ratio => self.keep_aspect_ratio
+    })
+    self.lisence_id = 0
+    res = self.save
+    return false unless res
+    return false unless lisence.save
+    self.lisence_id = lisence.id
+    res = self.save
+    res
+  end
+  
+end
diff --git a/app/models/lisence.rb b/app/models/lisence.rb
new file mode 100644 (file)
index 0000000..d4ed435
--- /dev/null
@@ -0,0 +1,7 @@
+class Lisence < ActiveRecord::Base
+  has_one :original_lisence
+  has_one :common_lisence
+  accepts_nested_attributes_for :original_lisence
+  accepts_nested_attributes_for :common_lisence
+  
+end
diff --git a/app/models/original_lisence.rb b/app/models/original_lisence.rb
new file mode 100644 (file)
index 0000000..c87cda5
--- /dev/null
@@ -0,0 +1,19 @@
+class OriginalLisence < ActiveRecord::Base
+  belongs_to :lisence
+  
+  
+  def save_save
+    lisence = Lisence.new( {
+      :name => self.name, :url => self.url, :cc_by => self.cc_by, :cc_sa => self.cc_sa, :cc_nd => self.cc_nd, :cc_nc => self.cc_nc, 
+      :no_resize => self.no_resize, :no_flip => self.no_flip, :keep_aspect_ratio => self.keep_aspect_ratio
+    })
+    self.lisence_id = 0
+    res = self.save
+    return false unless res
+    return false unless lisence.save
+    self.lisence_id = lisence.id
+    res = self.save
+    res
+  end
+  
+end
diff --git a/app/models/original_picture.rb b/app/models/original_picture.rb
new file mode 100644 (file)
index 0000000..d67a581
--- /dev/null
@@ -0,0 +1,47 @@
+class OriginalPicture < ActiveRecord::Base
+  belongs_to :artist
+  belongs_to :lisence
+  has_one :resource_picture
+  
+  def validate
+    errors.add(:filesize, 'size over(1MB)') if self.filesize > 1000000
+  end
+  
+  def dext
+    self.ext.downcase
+  end
+  
+  def filename
+    "#{self.id}.#{self.dext}"
+  end
+  
+  def mime_type
+    "image/#{self.dext}"
+  end
+  
+  def url
+    '/original_pictures/' + filename
+  end
+  
+  def store(rimg)
+    bindata = rimg.to_blob
+    PictureIO.original_picture_io.put bindata, self.filename
+    res = if self.resource_picture
+      self.resource_picture.store rimg
+    else
+      ResourcePicture.store(rimg, self)
+    end
+    res
+  end
+  
+  def restore(subdir = nil)
+    PictureIO.original_picture_io.get self.filename, subdir
+  end
+  
+  def own? author
+    return false unless author
+    return false unless author.artist?
+    self.artist_id == author.artist.id
+  end
+  
+end
diff --git a/app/models/panel.rb b/app/models/panel.rb
new file mode 100644 (file)
index 0000000..efc3a4d
--- /dev/null
@@ -0,0 +1,54 @@
+class Panel < ActiveRecord::Base
+  belongs_to :comic
+  has_many :panel_pictures, :dependent => :destroy
+  has_many :balloons, :dependent => :destroy
+  accepts_nested_attributes_for :panel_pictures, :allow_destroy => true
+  accepts_nested_attributes_for :balloons, :allow_destroy => true
+
+  def self.max_seq comic_id
+    Panel.maximum(:seqno, :conditions => ['comic_id = ?', comic_id]).to_i
+  end
+  
+  def self.find_seq comic_id, seqno
+    Panel.find(:first, :conditions => ['comic_id = ? and seqno = ?', comic_id, seqno])
+  end
+
+  #更新する時にPanelIDをチェックしとかないと勝手に所属先を変えられるゾ!?
+
+  def vdt_save
+    f = nil
+    max_seq = Panel.max_seq self.comic_id
+    f = Panel.find_seq(self.comic_id, self.seqno) if self.seqno
+    if f
+      Panel.update_all('seqno = seqno + 1', ['comic_id = ? and seqno >= ?', self.comic_id, self.seqno])
+    else
+      self.seqno = max_seq + 1
+    end
+    self.save
+  end
+  
+  def move_to new_seq
+    return true if self.seqno == new_seq
+    if self.seqno > new_seq
+      Panel.update_all('seqno = seqno + 1', ['comic_id = ? and (seqno >= ? and seqno < ?)', self.comic_id, new_seq, self.seqno])
+    else
+      nf = Panel.find_seq(self.comic_id, new_seq)
+      max_seq = Panel.max_seq self.comic_id
+      new_seq = max_seq if new_seq > max_seq
+      Panel.update_all('seqno = seqno - 1', ['comic_id = ? and (seqno > ? and seqno <= ?)', self.comic_id, self.seqno, new_seq])
+    end
+    self.seqno = new_seq
+    self.save
+  end
+  
+  def destroy_and_shorten
+    Panel.update_all('seqno = seqno - 1', ['comic_id = ? and (seqno > ?)', self.comic_id, self.seqno])
+    self.destroy
+  end
+  
+  def own? author
+    return false unless author
+    self.author_id == author.id
+  end
+  
+end
diff --git a/app/models/panel_picture.rb b/app/models/panel_picture.rb
new file mode 100644 (file)
index 0000000..426248c
--- /dev/null
@@ -0,0 +1,19 @@
+class PanelPicture < ActiveRecord::Base
+  belongs_to :panel
+  belongs_to :resource_picture
+  
+  def flip
+    res = (self.v == 0 ? '' : 'v') + (self.h == 0 ? '' : 'h')
+    res += '/' unless res.empty?
+    res
+  end
+  
+  def filename
+    flip + self.resource_picture.filename
+  end
+  
+  def url
+    '/resource_pictures/' + filename
+  end
+  
+end
diff --git a/app/models/resource_picture.rb b/app/models/resource_picture.rb
new file mode 100644 (file)
index 0000000..1bf9021
--- /dev/null
@@ -0,0 +1,105 @@
+class ResourcePicture < ActiveRecord::Base
+  belongs_to :artist
+  belongs_to :lisence
+  has_many :panel_pictures
+  belongs_to :original_picture
+  
+  def self.resize(data, dw, dh)
+    Magick::Image.from_blob(data).shift.resize(dw, dh)
+  end
+  
+  #サイズの調整(limw,limhに必ず収まるように合わせる)
+  def self.fix_size_both(limw, limh, w, h)
+    wr = if w > limw
+      limw*100/w
+    else
+      100
+    end
+    hr = if h > limh
+      limh*100/h
+    else
+      100
+    end
+    res = if wr < hr
+      #幅の方が圧縮率が高い
+      [w*wr/100, h*wr/100]
+    else
+      #高さの方が圧縮率が高い
+      [w*hr/100, h*hr/100]
+    end
+    res
+  end
+  
+  def dext
+    self.ext.downcase
+  end
+  
+  def filename
+    "#{self.id}.#{self.dext}"
+  end
+  
+  def mime_type
+    "image/#{self.dext}"
+  end
+  
+  def v(rimg)
+    rimg.flip.to_blob
+  end
+  
+  def h(rimg)
+    rimg.flop.to_blob
+  end
+  
+  def vh(rimg)
+    rimg.flip.flop.to_blob
+  end
+  
+  def url subdir = nil
+    '/resource_pictures/' + (subdir.to_s.empty? ? '' : subdir.to_s + '/' ) + filename
+  end
+  
+  def thumbnail(rimg)
+    tw, th = ResourcePicture.fix_size_both(80, 80, rimg.columns, rimg.rows)
+    ResourcePicture.resize(rimg.to_blob, tw, th).to_blob
+  end
+  
+  def self.store(img, original_picture)
+    
+    resource_picture = ResourcePicture.new(
+      width: original_picture.width, height: original_picture.height, 
+      ext: original_picture.ext, filesize: original_picture.filesize, 
+      original_picture_id: original_picture.id
+    )
+    res = if resource_picture.save
+      if resource_picture.store(img)
+        true
+      else
+        false
+      end
+    else
+      false
+    end
+    res
+  end
+  
+  def store(img)
+    res = false
+    bindata = img.to_blob
+#    begin
+      PictureIO.resource_picture_io.put bindata, self.filename
+      PictureIO.resource_picture_io.class.subdirs.each do |d|
+        next if d.empty?
+        PictureIO.resource_picture_io.put(self.__send__(d, img), self.filename, d)
+      end
+      res = true
+#    rescue
+#      res = false
+#    end
+    res
+  end
+  
+  def restore(subdir = nil)
+    PictureIO.resource_picture_io.get self.filename, subdir
+  end
+  
+end
diff --git a/app/models/speach.rb b/app/models/speach.rb
new file mode 100644 (file)
index 0000000..2346626
--- /dev/null
@@ -0,0 +1,3 @@
+class Speach < ActiveRecord::Base
+  belongs_to :balloon
+end
diff --git a/app/models/speach_balloon.rb b/app/models/speach_balloon.rb
new file mode 100644 (file)
index 0000000..3264e4c
--- /dev/null
@@ -0,0 +1,4 @@
+class SpeachBalloon < ActiveRecord::Base
+  has_many :balloon_templates, :dependent => :destroy
+  accepts_nested_attributes_for :balloon_templates
+end
diff --git a/app/models/speach_template.rb b/app/models/speach_template.rb
new file mode 100644 (file)
index 0000000..b44ebed
--- /dev/null
@@ -0,0 +1,3 @@
+class SpeachTemplate < ActiveRecord::Base
+  belongs_to :balloon_template
+end
diff --git a/app/views/admins/confirmations/new.html.erb b/app/views/admins/confirmations/new.html.erb
new file mode 100644 (file)
index 0000000..b7ae403
--- /dev/null
@@ -0,0 +1,12 @@
+<h2>Resend confirmation instructions</h2>
+
+<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
+  <%= devise_error_messages! %>
+
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.submit "Resend confirmation instructions" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/admins/mailer/confirmation_instructions.html.erb b/app/views/admins/mailer/confirmation_instructions.html.erb
new file mode 100644 (file)
index 0000000..a6ea8ca
--- /dev/null
@@ -0,0 +1,5 @@
+<p>Welcome <%= @resource.email %>!</p>
+
+<p>You can confirm your account through the link below:</p>
+
+<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
diff --git a/app/views/admins/mailer/reset_password_instructions.html.erb b/app/views/admins/mailer/reset_password_instructions.html.erb
new file mode 100644 (file)
index 0000000..ae9e888
--- /dev/null
@@ -0,0 +1,8 @@
+<p>Hello <%= @resource.email %>!</p>
+
+<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
+
+<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
+
+<p>If you didn't request this, please ignore this email.</p>
+<p>Your password won't change until you access the link above and create a new one.</p>
diff --git a/app/views/admins/mailer/unlock_instructions.html.erb b/app/views/admins/mailer/unlock_instructions.html.erb
new file mode 100644 (file)
index 0000000..2263c21
--- /dev/null
@@ -0,0 +1,7 @@
+<p>Hello <%= @resource.email %>!</p>
+
+<p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
+
+<p>Click the link below to unlock your account:</p>
+
+<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
diff --git a/app/views/admins/passwords/edit.html.erb b/app/views/admins/passwords/edit.html.erb
new file mode 100644 (file)
index 0000000..e75c937
--- /dev/null
@@ -0,0 +1,16 @@
+<h2>Change your password</h2>
+
+<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
+  <%= devise_error_messages! %>
+  <%= f.hidden_field :reset_password_token %>
+
+  <div><%= f.label :password, "New password" %><br />
+  <%= f.password_field :password %></div>
+
+  <div><%= f.label :password_confirmation, "Confirm new password" %><br />
+  <%= f.password_field :password_confirmation %></div>
+
+  <div><%= f.submit "Change my password" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/admins/passwords/new.html.erb b/app/views/admins/passwords/new.html.erb
new file mode 100644 (file)
index 0000000..6c21e9f
--- /dev/null
@@ -0,0 +1,12 @@
+<h2>Forgot your password?</h2>
+
+<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
+  <%= devise_error_messages! %>
+
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.submit "Send me reset password instructions" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/admins/registrations/edit.html.erb b/app/views/admins/registrations/edit.html.erb
new file mode 100644 (file)
index 0000000..ff38050
--- /dev/null
@@ -0,0 +1,25 @@
+<h2>Edit <%= resource_name.to_s.humanize %></h2>
+
+<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
+  <%= devise_error_messages! %>
+
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
+  <%= f.password_field :password %></div>
+
+  <div><%= f.label :password_confirmation %><br />
+  <%= f.password_field :password_confirmation %></div>
+
+  <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
+  <%= f.password_field :current_password %></div>
+
+  <div><%= f.submit "Update" %></div>
+<% end %>
+
+<h3>Cancel my account</h3>
+
+<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
+
+<%= link_to "Back", :back %>
diff --git a/app/views/admins/registrations/new.html.erb b/app/views/admins/registrations/new.html.erb
new file mode 100644 (file)
index 0000000..d15e275
--- /dev/null
@@ -0,0 +1,18 @@
+<h2>Sign up</h2>
+
+<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
+  <%= devise_error_messages! %>
+
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.label :password %><br />
+  <%= f.password_field :password %></div>
+
+  <div><%= f.label :password_confirmation %><br />
+  <%= f.password_field :password_confirmation %></div>
+
+  <div><%= f.submit "Sign up" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
diff --git a/app/views/admins/sessions/new.html.erb b/app/views/admins/sessions/new.html.erb
new file mode 100644 (file)
index 0000000..1b6aee0
--- /dev/null
@@ -0,0 +1,16 @@
+<h2>Sign in</h2>
+
+<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.label :password %><br />
+  <%= f.password_field :password %></div>
+
+  <% if devise_mapping.rememberable? -%>
+    <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
+  <% end -%>
+
+  <div><%= f.submit "Sign in" %></div>
+<% end %>
+<%= render :partial => "admins/shared/links" %>
\ No newline at end of file
diff --git a/app/views/admins/shared/_links.erb b/app/views/admins/shared/_links.erb
new file mode 100644 (file)
index 0000000..eab783a
--- /dev/null
@@ -0,0 +1,25 @@
+<%- if controller_name != 'sessions' %>
+  <%= link_to "Sign in", new_session_path(resource_name) %><br />
+<% end -%>
+
+<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
+  <%= link_to "Sign up", new_registration_path(resource_name) %><br />
+<% end -%>
+
+<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
+  <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
+<% end -%>
+
+<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
+  <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
+<% end -%>
+
+<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
+  <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
+<% end -%>
+
+<%- if devise_mapping.omniauthable? %>
+  <%- resource_class.omniauth_providers.each do |provider| %>
+    <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
+  <% end -%>
+<% end -%>
\ No newline at end of file
diff --git a/app/views/admins/unlocks/new.html.erb b/app/views/admins/unlocks/new.html.erb
new file mode 100644 (file)
index 0000000..c6cdcfe
--- /dev/null
@@ -0,0 +1,12 @@
+<h2>Resend unlock instructions</h2>
+
+<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
+  <%= devise_error_messages! %>
+
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.submit "Resend unlock instructions" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/artists/_form.html.erb b/app/views/artists/_form.html.erb
new file mode 100644 (file)
index 0000000..513fa61
--- /dev/null
@@ -0,0 +1,17 @@
+<%= form_for(@artist) do |f| %>
+  <% if @artist.errors.any? %>
+    <div id="error_explanation">
+      <h2><%= pluralize(@artist.errors.count, "error") %> prohibited this artist from being saved:</h2>
+
+      <ul>
+      <% @artist.errors.full_messages.each do |msg| %>
+        <li><%= msg %></li>
+      <% end %>
+      </ul>
+    </div>
+  <% end %>
+
+  <div class="actions">
+    <%= f.submit %>
+  </div>
+<% end %>
diff --git a/app/views/artists/edit.html.erb b/app/views/artists/edit.html.erb
new file mode 100644 (file)
index 0000000..0ca9f85
--- /dev/null
@@ -0,0 +1,6 @@
+<h1>Editing artist</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @artist %> |
+<%= link_to 'Back', artists_path %>
diff --git a/app/views/artists/index.html.erb b/app/views/artists/index.html.erb
new file mode 100644 (file)
index 0000000..39e31fa
--- /dev/null
@@ -0,0 +1,17 @@
+<h1>Listing artists</h1>
+
+<table>
+  <tr>
+    <th>author</th>
+    <th>name</th>
+    <th></th>
+  </tr>
+
+<% @artists.each do |artist| %>
+  <tr>
+    <td><%= artist.author_id %></td>
+    <td><%= artist.name %></td>
+    <td><%= link_to 'Show', artist %></td>
+  </tr>
+<% end %>
+</table>
diff --git a/app/views/artists/new.html.erb b/app/views/artists/new.html.erb
new file mode 100644 (file)
index 0000000..40a9512
--- /dev/null
@@ -0,0 +1,5 @@
+<h1>New artist</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', artists_path %>
diff --git a/app/views/artists/show.html.erb b/app/views/artists/show.html.erb
new file mode 100644 (file)
index 0000000..70d3626
--- /dev/null
@@ -0,0 +1,5 @@
+<p id="notice"><%= notice %></p>
+
+投稿された素材
+
+<%= link_to 'Back', artists_path %>
diff --git a/app/views/authors/confirmations/new.html.erb b/app/views/authors/confirmations/new.html.erb
new file mode 100644 (file)
index 0000000..b7ae403
--- /dev/null
@@ -0,0 +1,12 @@
+<h2>Resend confirmation instructions</h2>
+
+<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
+  <%= devise_error_messages! %>
+
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.submit "Resend confirmation instructions" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/authors/mailer/confirmation_instructions.html.erb b/app/views/authors/mailer/confirmation_instructions.html.erb
new file mode 100644 (file)
index 0000000..a6ea8ca
--- /dev/null
@@ -0,0 +1,5 @@
+<p>Welcome <%= @resource.email %>!</p>
+
+<p>You can confirm your account through the link below:</p>
+
+<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
diff --git a/app/views/authors/mailer/reset_password_instructions.html.erb b/app/views/authors/mailer/reset_password_instructions.html.erb
new file mode 100644 (file)
index 0000000..ae9e888
--- /dev/null
@@ -0,0 +1,8 @@
+<p>Hello <%= @resource.email %>!</p>
+
+<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
+
+<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
+
+<p>If you didn't request this, please ignore this email.</p>
+<p>Your password won't change until you access the link above and create a new one.</p>
diff --git a/app/views/authors/mailer/unlock_instructions.html.erb b/app/views/authors/mailer/unlock_instructions.html.erb
new file mode 100644 (file)
index 0000000..2263c21
--- /dev/null
@@ -0,0 +1,7 @@
+<p>Hello <%= @resource.email %>!</p>
+
+<p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
+
+<p>Click the link below to unlock your account:</p>
+
+<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
diff --git a/app/views/authors/passwords/edit.html.erb b/app/views/authors/passwords/edit.html.erb
new file mode 100644 (file)
index 0000000..e75c937
--- /dev/null
@@ -0,0 +1,16 @@
+<h2>Change your password</h2>
+
+<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
+  <%= devise_error_messages! %>
+  <%= f.hidden_field :reset_password_token %>
+
+  <div><%= f.label :password, "New password" %><br />
+  <%= f.password_field :password %></div>
+
+  <div><%= f.label :password_confirmation, "Confirm new password" %><br />
+  <%= f.password_field :password_confirmation %></div>
+
+  <div><%= f.submit "Change my password" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/authors/passwords/new.html.erb b/app/views/authors/passwords/new.html.erb
new file mode 100644 (file)
index 0000000..6c21e9f
--- /dev/null
@@ -0,0 +1,12 @@
+<h2>Forgot your password?</h2>
+
+<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
+  <%= devise_error_messages! %>
+
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.submit "Send me reset password instructions" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/authors/registrations/edit.html.erb b/app/views/authors/registrations/edit.html.erb
new file mode 100644 (file)
index 0000000..ff38050
--- /dev/null
@@ -0,0 +1,25 @@
+<h2>Edit <%= resource_name.to_s.humanize %></h2>
+
+<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
+  <%= devise_error_messages! %>
+
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
+  <%= f.password_field :password %></div>
+
+  <div><%= f.label :password_confirmation %><br />
+  <%= f.password_field :password_confirmation %></div>
+
+  <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
+  <%= f.password_field :current_password %></div>
+
+  <div><%= f.submit "Update" %></div>
+<% end %>
+
+<h3>Cancel my account</h3>
+
+<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
+
+<%= link_to "Back", :back %>
diff --git a/app/views/authors/registrations/new.html.erb b/app/views/authors/registrations/new.html.erb
new file mode 100644 (file)
index 0000000..3ae6813
--- /dev/null
@@ -0,0 +1,21 @@
+<h2>Sign up</h2>
+
+<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
+  <%= devise_error_messages! %>
+
+  <div><%= f.label :name %><br />
+  <%= f.text_field :name %></div>
+
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.label :password %><br />
+  <%= f.password_field :password %></div>
+
+  <div><%= f.label :password_confirmation %><br />
+  <%= f.password_field :password_confirmation %></div>
+
+  <div><%= f.submit "Sign up" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
diff --git a/app/views/authors/sessions/new.html.erb b/app/views/authors/sessions/new.html.erb
new file mode 100644 (file)
index 0000000..ff59f7c
--- /dev/null
@@ -0,0 +1,17 @@
+<h2>Sign in</h2>
+
+<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.label :password %><br />
+  <%= f.password_field :password %></div>
+
+  <% if devise_mapping.rememberable? -%>
+    <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
+  <% end -%>
+
+  <div><%= f.submit "Sign in" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/authors/shared/_links.erb b/app/views/authors/shared/_links.erb
new file mode 100644 (file)
index 0000000..eab783a
--- /dev/null
@@ -0,0 +1,25 @@
+<%- if controller_name != 'sessions' %>
+  <%= link_to "Sign in", new_session_path(resource_name) %><br />
+<% end -%>
+
+<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
+  <%= link_to "Sign up", new_registration_path(resource_name) %><br />
+<% end -%>
+
+<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
+  <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
+<% end -%>
+
+<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
+  <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
+<% end -%>
+
+<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
+  <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
+<% end -%>
+
+<%- if devise_mapping.omniauthable? %>
+  <%- resource_class.omniauth_providers.each do |provider| %>
+    <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
+  <% end -%>
+<% end -%>
\ No newline at end of file
diff --git a/app/views/authors/unlocks/new.html.erb b/app/views/authors/unlocks/new.html.erb
new file mode 100644 (file)
index 0000000..c6cdcfe
--- /dev/null
@@ -0,0 +1,12 @@
+<h2>Resend unlock instructions</h2>
+
+<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
+  <%= devise_error_messages! %>
+
+  <div><%= f.label :email %><br />
+  <%= f.email_field :email %></div>
+
+  <div><%= f.submit "Resend unlock instructions" %></div>
+<% end %>
+
+<%= render :partial => "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/balloon_templates/index.html.erb b/app/views/balloon_templates/index.html.erb
new file mode 100644 (file)
index 0000000..5204337
--- /dev/null
@@ -0,0 +1,27 @@
+<h1>Listing balloon_templates</h1>
+
+<table>
+  <tr>
+    <th>speach balloon</th>
+    <th>resource_picture</th>
+    <th>Tail</th>
+    <th>Border</th>
+    <th>MinWidth</th>
+    <th>MinHeight</th>
+    <th>MaxWidth</th>
+    <th>MaxHeight</th>
+  </tr>
+
+<% @balloon_templates.each do |balloon_template| %>
+  <tr>
+    <td><%= balloon_template.speach_balloon_id %></td>
+    <td><%= balloon_template.resource_picture_id %></td>
+    <td><%= balloon_template.tail %></td>
+    <td><%= balloon_template.border %></td>
+    <td><%= balloon_template.min_width %></td>
+    <td><%= balloon_template.min_height %></td>
+    <td><%= balloon_template.max_width %></td>
+    <td><%= balloon_template.max_height %></td>
+  </tr>
+<% end %>
+</table>
diff --git a/app/views/balloons/index.html.erb b/app/views/balloons/index.html.erb
new file mode 100644 (file)
index 0000000..2377f0e
--- /dev/null
@@ -0,0 +1,31 @@
+<h1>Listing balloons</h1>
+
+<table>
+  <tr>
+    <th>panel</th>
+    <th>balloonTemplate</th>
+    <th>resource_picture</th>
+    <th>Tail</th>
+    <th>Border</th>
+    <th>Zindex</th>
+    <th>Top offset</th>
+    <th>Left offset</th>
+    <th>Width</th>
+    <th>Height</th>
+  </tr>
+
+<% @balloons.each do |balloon| %>
+  <tr>
+    <td><%= balloon.panel_id %></td>
+    <td><%= balloon.balloon_template_id %></td>
+    <td><%= balloon.resource_picture_id %></td>
+    <td><%= balloon.tail %></td>
+    <td><%= balloon.border %></td>
+    <td><%= balloon.zindex %></td>
+    <td><%= balloon.top_offset %></td>
+    <td><%= balloon.left_offset %></td>
+    <td><%= balloon.width %></td>
+    <td><%= balloon.height %></td>
+  </tr>
+<% end %>
+</table>
diff --git a/app/views/comics/index.html.erb b/app/views/comics/index.html.erb
new file mode 100644 (file)
index 0000000..022e342
--- /dev/null
@@ -0,0 +1,36 @@
+<h1>Listing comics</h1>
+
+<table>
+  <tr>
+    <th>id</th>
+    <th>Title</th>
+    <th>Default width</th>
+    <th>Default height</th>
+    <th>author_id</th>
+    <th>updated_at</th>
+    <th></th>
+    <th></th>
+    <th></th>
+  </tr>
+
+<% @comics.each do |comic| %>
+  <tr>
+    <td><%= comic.id %></td>
+    <td><%= h comic.title %></td>
+    <td><%= comic.default_width %></td>
+    <td><%= comic.default_height %></td>
+    <td><%= comic.author_id%></td>
+    <td><%= comic.updated_at %></td>
+    <td><%= link_to 'Show', comic %></td>
+    <td><%= link_to 'Play', :action => :play, :id => comic.id %></td>
+    <td>
+      <% if author_signed_in? -%>
+        <% if comic.own? current_author -%>
+          <%= link_to 'Destroy', comic, confirm: 'Are you sure?', method: :delete %>
+        <% end -%>
+      <% end -%>
+    </td>
+  </tr>
+<% end %>
+</table>
+
diff --git a/app/views/comics/play.html.erb b/app/views/comics/play.html.erb
new file mode 100644 (file)
index 0000000..2bde1ba
--- /dev/null
@@ -0,0 +1,22 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+  <b>Title:</b>
+  <%= @comic.title %>
+</p>
+
+<p>
+  <b>Default width:</b>
+  <%= @comic.default_width %>
+</p>
+
+<p>
+  <b>Default height:</b>
+  <%= @comic.default_height %>
+</p>
+<% @comic.panels.each do |panel| %>
+  <% @panel = panel %>
+  <%= render 'panels/standard' %>
+<% end %>
+
+<%= link_to 'Back', comics_path %>
diff --git a/app/views/comics/show.html.erb b/app/views/comics/show.html.erb
new file mode 100644 (file)
index 0000000..7d2fe84
--- /dev/null
@@ -0,0 +1,18 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+  <b>Title:</b>
+  <%= h @comic.title %>
+</p>
+
+<p>
+  <b>Default width:</b>
+  <%= @comic.default_width %>
+</p>
+
+<p>
+  <b>Default height:</b>
+  <%= @comic.default_height %>
+</p>
+
+<%= link_to 'Back', comics_path %>
diff --git a/app/views/comics/top.html.erb b/app/views/comics/top.html.erb
new file mode 100644 (file)
index 0000000..c07326a
--- /dev/null
@@ -0,0 +1,3 @@
+<h1>PettanR</h1>
+
+  
diff --git a/app/views/common_lisences/_form.html.erb b/app/views/common_lisences/_form.html.erb
new file mode 100644 (file)
index 0000000..cb73f6a
--- /dev/null
@@ -0,0 +1,54 @@
+<%= form_for(@common_lisence) do |f| %>
+  <% if @common_lisence.errors.any? %>
+    <div id="error_explanation">
+      <h2><%= pluralize(@common_lisence.errors.count, "error") %> prohibited this common_lisence from being saved:</h2>
+
+      <ul>
+      <% @common_lisence.errors.full_messages.each do |msg| %>
+        <li><%= msg %></li>
+      <% end %>
+      </ul>
+    </div>
+  <% end %>
+
+  <div class="field">
+    <%= f.label :name %><br />
+    <%= f.text_field :name %>
+  </div>
+  <div class="field">
+    <%= f.label :url %><br />
+    <%= f.text_field :url %>
+  </div>
+  <div class="field">
+    <%= f.label :cc_by %><br />
+    <%= f.check_box :cc_by %>
+  </div>
+  <div class="field">
+    <%= f.label :cc_sa %><br />
+    <%= f.check_box :cc_sa %>
+  </div>
+  <div class="field">
+    <%= f.label :cc_nd %><br />
+    <%= f.check_box :cc_nd %>
+  </div>
+  <div class="field">
+    <%= f.label :cc_nc %><br />
+    <%= f.check_box :cc_nc %>
+  </div>
+  <div class="field">
+    <%= f.label :no_resize %><br />
+    <%= f.check_box :no_resize %>
+  </div>
+  <div class="field">
+    <%= f.label :no_flip %><br />
+    <%= f.check_box :no_flip %>
+  </div>
+  <div class="field">
+    <%= f.label :keep_aspect_ratio %><br />
+    <%= f.check_box :keep_aspect_ratio %>
+  </div>
+
+  <div class="actions">
+    <%= f.submit %>
+  </div>
+<% end %>
diff --git a/app/views/common_lisences/edit.html.erb b/app/views/common_lisences/edit.html.erb
new file mode 100644 (file)
index 0000000..2760acb
--- /dev/null
@@ -0,0 +1,6 @@
+<h1>Editing common_lisence</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @common_lisence %> |
+<%= link_to 'Back', lisences_path %>
diff --git a/app/views/common_lisences/index.html.erb b/app/views/common_lisences/index.html.erb
new file mode 100644 (file)
index 0000000..c57bc22
--- /dev/null
@@ -0,0 +1,39 @@
+<h1>Listing common_lisences</h1>
+
+<table>
+  <tr>
+    <th>name</th>
+    <th>url</th>
+    <th>cc_by</th>
+    <th>cc_sa</th>
+    <th>cc_nd</th>
+    <th>cc_nc</th>
+    <th>no_resize</th>
+    <th>no_flip</th>
+    <th>keep_aspect_ratio</th>
+    <th></th>
+    <th></th>
+    <th></th>
+  </tr>
+
+<% @common_lisences.each do |common_lisence| %>
+  <tr>
+    <td><%=@common_lisence.name %></td>
+    <td><%=@common_lisence.url %></td>
+    <td><%=@common_lisence.cc_by %></td>
+    <td><%=@common_lisence.cc_sa %></td>
+    <td><%=@common_lisence.cc_nd %></td>
+    <td><%=@common_lisence.cc_nc %></td>
+    <td><%=@common_lisence.no_resize %></td>
+    <td><%=@common_lisence.no_flip %></td>
+    <td><%=@common_lisence.keep_aspect_ratio %></td>
+    <td><%= link_to 'Show', common_lisence %></td>
+    <td><%= link_to 'Edit', edit_common_lisence_path(common_lisence) %></td>
+    <td><%= link_to 'Destroy', common_lisence, confirm: 'Are you sure?', method: :delete %></td>
+  </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New Common_lisence', new_common_lisence_path %>
diff --git a/app/views/common_lisences/new.html.erb b/app/views/common_lisences/new.html.erb
new file mode 100644 (file)
index 0000000..d9a3454
--- /dev/null
@@ -0,0 +1,5 @@
+<h1>New common_lisence</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', common_lisences_path %>
diff --git a/app/views/common_lisences/show.html.erb b/app/views/common_lisences/show.html.erb
new file mode 100644 (file)
index 0000000..067f510
--- /dev/null
@@ -0,0 +1,49 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+  <b>name:</b>
+  <%= @common_lisence.name %>
+</p>
+
+<p>
+  <b>url:</b>
+  <%= @common_lisence.url %>
+</p>
+
+<p>
+  <b>cc_by:</b>
+  <%= @common_lisence.cc_by %>
+</p>
+
+<p>
+  <b>cc_sa:</b>
+  <%= @common_lisence.cc_sa %>
+</p>
+
+<p>
+  <b>cc_nd:</b>
+  <%= @common_lisence.cc_nd %>
+</p>
+
+<p>
+  <b>cc_nc:</b>
+  <%= @common_lisence.cc_nc %>
+</p>
+
+<p>
+  <b>no_resize:</b>
+  <%= @common_lisence.no_resize %>
+</p>
+
+<p>
+  <b>no_flip:</b>
+  <%= @common_lisence.no_flip %>
+</p>
+
+<p>
+  <b>keep_aspect_ratio:</b>
+  <%= @common_lisence.keep_aspect_ratio %>
+</p>
+
+<%= link_to 'Edit', edit_common_lisence_path(@common_lisence) %> |
+<%= link_to 'Back', lisences_path %>
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
new file mode 100644 (file)
index 0000000..e45cd11
--- /dev/null
@@ -0,0 +1,14 @@
+<h1><%= h(current_author.name) -%>(<%= h(current_author.email) -%>)</h1>
+<div>
+あなたの認証トークンは<%= current_author.authentication_token %>です
+</div>
+
+<div>
+<p>絵師活動</p>
+<% if current_author.artist? -%>
+  <%= link_to h(current_author.artist.name), current_author.artist %>です
+<% else -%>
+  <p>まだ絵師登録していません。</p>
+  <p>登録する</p>
+<% end -%>
+</div>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
new file mode 100644 (file)
index 0000000..c739f33
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Pettanr</title>
+  <%= stylesheet_link_tag    "application" %>
+  <%= javascript_include_tag "application" %>
+  <%= csrf_meta_tags %>
+</head>
+<body>
+
+<% if author_signed_in? %>
+<%= link_to "my home", :controller => '/home' %>
+<%= link_to "ログアウト", destroy_author_session_path, :method => :delete %>
+<% else %>
+<%= link_to "ログイン", new_author_session_path %>
+<% end %>
+<%= link_to "管理者", new_admin_session_path %>
+<div>
+ <p class="notice"><%= notice %></p>
+ <p class="alert"><%= alert %></p>
+<%= link_to 'comics', comics_path %>
+<%= link_to 'panels', panels_path %>
+<%= link_to 'original_pictures', original_pictures_path %>
+<%= link_to 'resource_pictures', resource_pictures_path %>
+<%= link_to 'panel_pictures', panel_pictures_path %>
+<%= link_to 'balloons', balloons_path %>
+<%= link_to 'speaches', speaches_path %>
+ : 
+<%= link_to 'speach_balloons', speach_balloons_path %>
+<%= link_to 'balloon_templates', balloon_templates_path %>
+<%= link_to 'speach_templates', speach_templates_path %>
+ : 
+<%= link_to 'artists', artists_path %>
+<%= link_to 'lesences', lisences_path %>
+(<%= link_to 'common', common_lisences_path %> <%= link_to 'original', original_lisences_path %>)
+</div>
+<%= yield %>
+
+</body>
+</html>
diff --git a/app/views/lisences/_form.html.erb b/app/views/lisences/_form.html.erb
new file mode 100644 (file)
index 0000000..29c8cab
--- /dev/null
@@ -0,0 +1,17 @@
+<%= form_for(@lisence) do |f| %>
+  <% if @lisence.errors.any? %>
+    <div id="error_explanation">
+      <h2><%= pluralize(@lisence.errors.count, "error") %> prohibited this lisence from being saved:</h2>
+
+      <ul>
+      <% @lisence.errors.full_messages.each do |msg| %>
+        <li><%= msg %></li>
+      <% end %>
+      </ul>
+    </div>
+  <% end %>
+
+  <div class="actions">
+    <%= f.submit %>
+  </div>
+<% end %>
diff --git a/app/views/lisences/edit.html.erb b/app/views/lisences/edit.html.erb
new file mode 100644 (file)
index 0000000..1c041a6
--- /dev/null
@@ -0,0 +1,6 @@
+<h1>Editing lisence</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @lisence %> |
+<%= link_to 'Back', lisences_path %>
diff --git a/app/views/lisences/index.html.erb b/app/views/lisences/index.html.erb
new file mode 100644 (file)
index 0000000..d14ee88
--- /dev/null
@@ -0,0 +1,38 @@
+<h1>Listing lisences</h1>
+
+<table>
+  <tr>
+    <th>name</th>
+    <th>url</th>
+    <th>cc_by</th>
+    <th>cc_sa</th>
+    <th>cc_nd</th>
+    <th>cc_nc</th>
+    <th>no_resize</th>
+    <th>no_flip</th>
+    <th>keep_aspect_ratio</th>
+    <th></th>
+  </tr>
+
+<% @lisences.each do |lisence| %>
+  <tr>
+    <td><%= lisence.name %></td>
+    <td><%= lisence.url %></td>
+    <td><%= lisence.cc_by %></td>
+    <td><%= lisence.cc_sa %></td>
+    <td><%= lisence.cc_nd %></td>
+    <td><%= lisence.cc_nc %></td>
+    <td><%= lisence.no_resize %></td>
+    <td><%= lisence.no_flip %></td>
+    <td><%= lisence.keep_aspect_ratio %></td>
+    <td>
+      <% if lisence.common_lisence -%>
+        <%= link_to 'Show', lisence.common_lisence %>
+      <% else -%>
+        <%= link_to 'Show', lisence.original_lisence %>
+      <% end -%>
+    </td>
+  </tr>
+<% end -%>
+</table>
+<%= link_to 'new original lisence', new_original_lisence_path %>
diff --git a/app/views/lisences/new.html.erb b/app/views/lisences/new.html.erb
new file mode 100644 (file)
index 0000000..3205771
--- /dev/null
@@ -0,0 +1,5 @@
+<h1>New lisence</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', lisences_path %>
diff --git a/app/views/lisences/show.html.erb b/app/views/lisences/show.html.erb
new file mode 100644 (file)
index 0000000..fd82a9b
--- /dev/null
@@ -0,0 +1,5 @@
+<p id="notice"><%= notice %></p>
+
+
+<%= link_to 'Edit', edit_lisence_path(@lisence) %> |
+<%= link_to 'Back', lisences_path %>
diff --git a/app/views/original_lisences/_form.html.erb b/app/views/original_lisences/_form.html.erb
new file mode 100644 (file)
index 0000000..9e9aaf4
--- /dev/null
@@ -0,0 +1,54 @@
+<%= form_for(@original_lisence) do |f| %>
+  <% if @original_lisence.errors.any? %>
+    <div id="error_explanation">
+      <h2><%= pluralize(@original_lisence.errors.count, "error") %> prohibited this original_lisence from being saved:</h2>
+
+      <ul>
+      <% @original_lisence.errors.full_messages.each do |msg| %>
+        <li><%= msg %></li>
+      <% end %>
+      </ul>
+    </div>
+  <% end %>
+
+  <div class="field">
+    <%= f.label :name %><br />
+    <%= f.text_field :name %>
+  </div>
+  <div class="field">
+    <%= f.label :url %><br />
+    <%= f.text_field :url %>
+  </div>
+  <div class="field">
+    <%= f.label :cc_by %><br />
+    <%= f.check_box :cc_by %>
+  </div>
+  <div class="field">
+    <%= f.label :cc_sa %><br />
+    <%= f.check_box :cc_sa %>
+  </div>
+  <div class="field">
+    <%= f.label :cc_nd %><br />
+    <%= f.check_box :cc_nd %>
+  </div>
+  <div class="field">
+    <%= f.label :cc_nc %><br />
+    <%= f.check_box :cc_nc %>
+  </div>
+  <div class="field">
+    <%= f.label :no_resize %><br />
+    <%= f.check_box :no_resize %>
+  </div>
+  <div class="field">
+    <%= f.label :no_flip %><br />
+    <%= f.check_box :no_flip %>
+  </div>
+  <div class="field">
+    <%= f.label :keep_aspect_ratio %><br />
+    <%= f.check_box :keep_aspect_ratio %>
+  </div>
+
+  <div class="actions">
+    <%= f.submit %>
+  </div>
+<% end %>
diff --git a/app/views/original_lisences/edit.html.erb b/app/views/original_lisences/edit.html.erb
new file mode 100644 (file)
index 0000000..dd54b16
--- /dev/null
@@ -0,0 +1,6 @@
+<h1>Editing original_lisence</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @original_lisence %> |
+<%= link_to 'Back', lisences_path %>
diff --git a/app/views/original_lisences/index.html.erb b/app/views/original_lisences/index.html.erb
new file mode 100644 (file)
index 0000000..570b54c
--- /dev/null
@@ -0,0 +1,21 @@
+<h1>Listing original_lisences</h1>
+
+<table>
+  <tr>
+    <th></th>
+    <th></th>
+    <th></th>
+  </tr>
+
+<% @original_lisences.each do |original_lisence| %>
+  <tr>
+    <td><%= link_to 'Show', original_lisence %></td>
+    <td><%= link_to 'Edit', edit_original_lisence_path(original_lisence) %></td>
+    <td><%= link_to 'Destroy', original_lisence, confirm: 'Are you sure?', method: :delete %></td>
+  </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New Original lisence', new_original_lisence_path %>
diff --git a/app/views/original_lisences/new.html.erb b/app/views/original_lisences/new.html.erb
new file mode 100644 (file)
index 0000000..14de64d
--- /dev/null
@@ -0,0 +1,5 @@
+<h1>New original_lisence</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', lisences_path %>
diff --git a/app/views/original_lisences/show.html.erb b/app/views/original_lisences/show.html.erb
new file mode 100644 (file)
index 0000000..8ec72b7
--- /dev/null
@@ -0,0 +1,53 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+  <b>name:</b>
+  <%= @original_lisence.name %>
+</p>
+
+<p>
+  <b>url:</b>
+  <%= @original_lisence.url %>
+</p>
+
+<p>
+  <b>artist:</b>
+  <%= @original_lisence.artist_id %>
+</p>
+<p>
+  <b>cc_by:</b>
+  <%= @original_lisence.cc_by %>
+</p>
+
+<p>
+  <b>cc_sa:</b>
+  <%= @original_lisence.cc_sa %>
+</p>
+
+<p>
+  <b>cc_nd:</b>
+  <%= @original_lisence.cc_nd %>
+</p>
+
+<p>
+  <b>cc_nc:</b>
+  <%= @original_lisence.cc_nc %>
+</p>
+
+<p>
+  <b>no_resize:</b>
+  <%= @original_lisence.no_resize %>
+</p>
+
+<p>
+  <b>no_flip:</b>
+  <%= @original_lisence.no_flip %>
+</p>
+
+<p>
+  <b>keep_aspect_ratio:</b>
+  <%= @original_lisence.keep_aspect_ratio %>
+</p>
+
+<%= link_to 'Edit', edit_original_lisence_path(@original_lisence) %> |
+<%= link_to 'Back', original_lisences_path %>
diff --git a/app/views/original_pictures/_artist_register.html.erb b/app/views/original_pictures/_artist_register.html.erb
new file mode 100644 (file)
index 0000000..a7125bb
--- /dev/null
@@ -0,0 +1,29 @@
+<p>素材の投稿には絵師登録が必要です。</p>
+<p>下記フォームで登録してください。</p>
+
+<%= form_for(@artist) do |f| %>
+  <% if @artist.errors.any? %>
+    <div id="error_explanation">
+      <h2><%= pluralize(@artist.errors.count, "error") %> prohibited this artist from being saved:</h2>
+
+      <ul>
+      <% @artist.errors.full_messages.each do |msg| %>
+        <li><%= msg %></li>
+      <% end %>
+      </ul>
+    </div>
+  <% end %>
+
+  <div class="field">
+    <%= f.label :name %><br />
+    <%= f.text_field :name %><br />
+
+    <%= f.label :default_lisence_id %><br />
+    <%= f.number_field :default_lisence_id %>
+    <%= f.hidden_field :author_id, :value => @artist.author_id %>
+  </div>
+  <div class="actions">
+    <%= f.submit %>
+  </div>
+<% end %>
+
diff --git a/app/views/original_pictures/_uploader.html.erb b/app/views/original_pictures/_uploader.html.erb
new file mode 100644 (file)
index 0000000..21555b3
--- /dev/null
@@ -0,0 +1,12 @@
+<% if author_signed_in? -%>
+  <% if current_author.artist? -%>
+    <%= form_tag( {:action => "create"} , { :multipart => true }) do %>
+      <label for="file">File to Upload</label> <%= file_field_tag "original_picture[file]" %>
+      <%= submit_tag 'upload' -%>
+    <% end -%>
+  <% else -%>
+    <%= render 'artist_register' %>
+  <% end -%>
+<% else -%>
+  素材を投稿するなら<%= link_to "ログイン", new_author_session_path %>
+<% end -%>
diff --git a/app/views/original_pictures/index.html.erb b/app/views/original_pictures/index.html.erb
new file mode 100644 (file)
index 0000000..0143366
--- /dev/null
@@ -0,0 +1,31 @@
+<h1>Listing original_pictures</h1>
+
+<%= render 'uploader' %>
+<table>
+  <tr>
+    <th>Ext</th>
+    <th>Width</th>
+    <th>Height</th>
+    <th>filesize</th>
+    <th>artist</th>
+    <th></th>
+  </tr>
+
+<% @original_pictures.each do |original_picture| %>
+  <tr>
+    <td><%= original_picture.ext %></td>
+    <td><%= original_picture.width %></td>
+    <td><%= original_picture.height %></td>
+    <td><%= original_picture.filesize %></td>
+    <td><%= original_picture.artist_id %></td>
+    <td><%= link_to 'Show', original_picture %></td>
+    <td>
+      <% if author_signed_in? -%>
+        <% if original_picture.own? current_author -%>
+          <%= link_to 'Destroy', original_picture, confirm: 'Are you sure?', method: :delete %>
+        <% end -%>
+      <% end -%>
+    </td>
+  </tr>
+<% end %>
+</table>
diff --git a/app/views/original_pictures/show.html.erb b/app/views/original_pictures/show.html.erb
new file mode 100644 (file)
index 0000000..a48ef44
--- /dev/null
@@ -0,0 +1,48 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+  <b>Ext:</b>
+  <%= @original_picture.ext %>
+</p>
+
+<p>
+  <b>Width:</b>
+  <%= @original_picture.width %>
+</p>
+
+<p>
+  <b>Height:</b>
+  <%= @original_picture.height %>
+</p>
+
+<p>
+  <b>filesize:</b>
+  <%= @original_picture.filesize %>
+</p>
+
+<p>
+  <b>artist:</b>
+  <%= @original_picture.artist_id %>
+</p>
+
+<img src="<%= @original_picture.url -%>">
+
+<p>
+<a href="<%= @original_picture.url %>">browse picture</a> 
+</p>
+<p>
+<%= link_to '再生成', :action => :refresh, :id => @original_picture.id %>
+</p>
+<% if @original_picture.own? current_author -%>
+<p>
+Replace picture
+</p>
+  <%= form_for(@original_picture, :html => { :multipart => true }) do |f| %>
+    <label for="file">File to Upload</label> <%= f.file_field "file" %>
+    <div class="actions">
+      <%= f.submit 'replace' %>
+    </div>
+  <% end %>
+<% end -%>
+
+<%= link_to 'Back', original_pictures_path %>
diff --git a/app/views/panel_pictures/index.html.erb b/app/views/panel_pictures/index.html.erb
new file mode 100644 (file)
index 0000000..afb2280
--- /dev/null
@@ -0,0 +1,31 @@
+<h1>Listing panel_pictures</h1>
+
+<table>
+  <tr>
+    <th>id</th>
+    <th>panel</th>
+    <th>resource_picture</th>
+    <th>Width</th>
+    <th>Height</th>
+    <th>Top offset</th>
+    <th>Left offset</th>
+    <th>Zindex</th>
+    <th>flip</th>
+    <th>updated_at</th>
+  </tr>
+
+<% @panel_pictures.each do |panel_picture| %>
+  <tr>
+    <td><%= panel_picture.id %></td>
+    <td><%= panel_picture.panel_id %></td>
+    <td><%= panel_picture.resource_picture_id %></td>
+    <td><%= panel_picture.width %></td>
+    <td><%= panel_picture.height %></td>
+    <td><%= panel_picture.top_offset %></td>
+    <td><%= panel_picture.left_offset %></td>
+    <td><%= panel_picture.zindex %></td>
+    <td><%= panel_picture.flip %></td>
+    <td><%= panel_picture.updated_at %></td>
+  </tr>
+<% end %>
+</table>
diff --git a/app/views/panels/_standard.html.erb b/app/views/panels/_standard.html.erb
new file mode 100644 (file)
index 0000000..f5df30b
--- /dev/null
@@ -0,0 +1,38 @@
+<span>
+Seqno:<%= @panel.seqno %>
+</span>
+<div class="panel" style="width:<%= @panel.width %>px;height:<%= @panel.height %>px;overflow:hidden; border:solid black <%= @panel.border %>px; background:white;">
+  <% @panel.panel_pictures.each do |panel_picture| %>
+    <div id="vPicture<%= panel_picture.id -%>" class="panel_picture" style="position:relative;  top:<%= panel_picture.top_offset -%>px; left:<%= panel_picture.left_offset -%>px; z-index:<%= panel_picture.zindex -%>; ">
+      <img style=" position:absolute; width:<%= panel_picture.width -%>px; height:<%= panel_picture.height -%>px; " src="<%= panel_picture.url -%>">
+    </div>
+  <% end %>
+  <% @panel.balloons.each do |balloon| %>
+    <div id="vballoon<%= balloon.id -%>" class="balloon" style="position:relative;  top:<%= balloon.top_offset -%>px; left:<%= balloon.left_offset -%>px; z-index:<%= balloon.zindex -%>; ">
+      <img style=" position:absolute; width:<%= balloon.width -%>px; height:<%= balloon.height -%>px; " src="<%= balloon.resource_picture.url -%>">
+      <% balloon.speaches.each do |speach| %>
+        <div style="position:relative; top:<%= speach.top_offset -%>px; left:<%= speach.left_offset -%>px;width:<%= speach.width -%>px; height:<%= speach.height -%>px; top:1px; left:1px; z-index:1; ">
+          <%= h speach.content -%>
+        </div>
+      <% end %>
+    </div>
+  <% end %>
+</div>
+<span>
+Comic:<%= @panel.comic_id %>
+</span>
+<span>
+resource_picture:<%= @panel.resource_picture_id %>
+</span>
+<span>
+Width:<%= @panel.width %>
+</span>
+<span>
+Height:<%= @panel.height %>
+</span>
+<%= form_for(@panel) do |f| %>
+    <%= f.submit 'move to' %>
+     <%= f.number_field :seqno %>
+<% end %>
+<%= button_to 'Destroy', @panel, confirm: 'Are you sure?', method: :delete %>
+
diff --git a/app/views/panels/index.html.erb b/app/views/panels/index.html.erb
new file mode 100644 (file)
index 0000000..d0d77e4
--- /dev/null
@@ -0,0 +1,39 @@
+<h1>Listing panels</h1>
+
+<table>
+  <tr>
+    <th>id</th>
+    <th>Comic</th>
+    <th>bg</th>
+    <th>Width</th>
+    <th>Height</th>
+    <th>Border</th>
+    <th>Seqno</th>
+    <th>author_id</th>
+    <th>updated_at</th>
+    <th></th>
+    <th></th>
+  </tr>
+
+<% @panels.each do |panel| %>
+  <tr>
+    <td><%= panel.id %></td>
+    <td><%= panel.comic_id %></td>
+    <td><%= panel.resource_picture_id %></td>
+    <td><%= panel.width %></td>
+    <td><%= panel.height %></td>
+    <td><%= panel.border %></td>
+    <td><%= panel.seqno %></td>
+    <td><%= panel.author_id %></td>
+    <td><%= panel.updated_at %></td>
+    <td><%= link_to 'Show', panel %></td>
+    <td>
+      <% if author_signed_in? -%>
+        <% if panel.own? current_author -%>
+          <%= link_to 'Destroy', panel, confirm: 'Are you sure?', method: :delete %>
+        <% end -%>
+      <% end -%>
+    </td>
+  </tr>
+<% end %>
+</table>
diff --git a/app/views/panels/show.html.erb b/app/views/panels/show.html.erb
new file mode 100644 (file)
index 0000000..df3247a
--- /dev/null
@@ -0,0 +1,15 @@
+  <% if @panel.errors.any? %>
+    <div id="error_explanation">
+      <h2><%= pluralize(@panel.errors.count, "error") %> prohibited this panel from being saved:</h2>
+
+      <ul>
+      <% @panel.errors.full_messages.each do |msg| %>
+        <li><%= msg %></li>
+      <% end %>
+      </ul>
+    </div>
+  <% end %>
+<p id="notice"><%= notice %></p>
+<%= render 'standard' %>
+
+<%= link_to 'Back', panels_path %>
diff --git a/app/views/resource_pictures/index.html.erb b/app/views/resource_pictures/index.html.erb
new file mode 100644 (file)
index 0000000..05a67a1
--- /dev/null
@@ -0,0 +1,22 @@
+<h1>Listing resource_pictures</h1>
+
+<table>
+  <tr>
+    <th>Ext</th>
+    <th>Width</th>
+    <th>Height</th>
+    <th>filesize</th>
+  </tr>
+
+<% @resource_pictures.each do |resource_picture| %>
+  <tr>
+    <td><%= resource_picture.ext %></td>
+    <td><%= resource_picture.width %></td>
+    <td><%= resource_picture.height %></td>
+    <td><%= resource_picture.filesize %></td>
+    <td>
+      <%= link_to 'show', resource_picture %>
+    </td>
+  </tr>
+<% end %>
+</table>
diff --git a/app/views/resource_pictures/show.html.erb b/app/views/resource_pictures/show.html.erb
new file mode 100644 (file)
index 0000000..03474a2
--- /dev/null
@@ -0,0 +1,23 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+  <a href="<%= @resource_picture.url %>">ノーマル</a> 
+  <img src="<%= @resource_picture.url -%>">
+</p>
+<p>
+  <a href="<%= @resource_picture.url :v %>">垂直反転</a> 
+  <img src="<%= @resource_picture.url :v -%>">
+</p>
+<p>
+  <a href="<%= @resource_picture.url :h %>">水平反転</a> 
+  <img src="<%= @resource_picture.url :h -%>">
+</p>
+<p>
+  <a href="<%= @resource_picture.url :vh%>">垂直水平反転</a> 
+  <img src="<%= @resource_picture.url :vh -%>">
+</p>
+<p>
+  <a href="<%= @resource_picture.url :thumbnail%>">サムネ</a> 
+  <img src="<%= @resource_picture.url :thumbnail -%>">
+</p>
+<%= link_to 'Back', resource_pictures_path %>
diff --git a/app/views/speach_balloons/index.html.erb b/app/views/speach_balloons/index.html.erb
new file mode 100644 (file)
index 0000000..648f9bc
--- /dev/null
@@ -0,0 +1,19 @@
+<h1>Listing speach_balloons</h1>
+
+<table>
+  <tr>
+    <th>Name</th>
+    <th>Tail limit</th>
+    <th>Border limit</th>
+    <th></th>
+  </tr>
+
+<% @speach_balloons.each do |speach_balloon| %>
+  <tr>
+    <td><%= h speach_balloon.name %></td>
+    <td><%= speach_balloon.tail_limit %></td>
+    <td><%= speach_balloon.border_limit %></td>
+    <td><%= link_to 'show', speach_balloon %></td>
+  </tr>
+<% end %>
+</table>
diff --git a/app/views/speach_balloons/show.html.erb b/app/views/speach_balloons/show.html.erb
new file mode 100644 (file)
index 0000000..122485b
--- /dev/null
@@ -0,0 +1,26 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+  <b>Name:</b>
+  <%= h @speach_balloon.name %>
+</p>
+
+<p>
+  <b>Tail limit:</b>
+  <%= @speach_balloon.tail_limit %>
+</p>
+
+<p>
+  <b>Border limit:</b>
+  <%= @speach_balloon.border_limit %>
+</p>
+<% @speach_balloon.balloon_templates.each do |balloon_template| -%>\r
+  <div>\r
+    <p>\r
+      Tail:<%= balloon_template.tail -%>\r
+      Border:<%= balloon_template.border -%>\r
+    </p>\r
+    <img src="<%= balloon_template.resource_picture.url -%>" />\r
+  </div>\r
+<% end -%>\r
+<%= link_to 'Back', speach_balloons_path %>
diff --git a/app/views/speach_templates/index.html.erb b/app/views/speach_templates/index.html.erb
new file mode 100644 (file)
index 0000000..b2fe5a6
--- /dev/null
@@ -0,0 +1,21 @@
+<h1>Listing speach_templates</h1>
+
+<table>
+  <tr>
+    <th>balloon template</th>
+    <th>Top offset</th>
+    <th>Left offset</th>
+    <th>Width</th>
+    <th>Height</th>
+  </tr>
+
+<% @speach_templates.each do |speach_template| %>
+  <tr>
+    <td><%= speach_template.balloon_template_id %></td>
+    <td><%= speach_template.top_offset %></td>
+    <td><%= speach_template.left_offset %></td>
+    <td><%= speach_template.width %></td>
+    <td><%= speach_template.height %></td>
+  </tr>
+<% end %>
+</table>
diff --git a/app/views/speaches/index.html.erb b/app/views/speaches/index.html.erb
new file mode 100644 (file)
index 0000000..434bef7
--- /dev/null
@@ -0,0 +1,24 @@
+<h1>Listing speaches</h1>
+
+<table>
+  <tr>
+    <th>balloon</th>
+    <th>content</th>
+    <th>Top offset</th>
+    <th>Left offset</th>
+    <th>Width</th>
+    <th>Height</th>
+  </tr>
+
+<% @speaches.each do |speach| %>
+  <tr>
+    <td><%= speach.balloon_id %></td>
+    <td><%= speach.content %></td>
+    <td><%= speach.top_offset %></td>
+    <td><%= speach.left_offset %></td>
+    <td><%= speach.width %></td>
+    <td><%= speach.height %></td>
+  </tr>
+<% end %>
+</table>
+
diff --git a/app/views/system/start.html.erb b/app/views/system/start.html.erb
new file mode 100644 (file)
index 0000000..3da455d
--- /dev/null
@@ -0,0 +1,6 @@
+<p>このシステムには管理者が設定されていません。</p>
+<p>次のコマンドで管理者アカウントを作成してください。</p>
+
+<div style="background-color: #dddddd">
+rails r "Admin.start('admin@mail.adr.ess', 'admin_password')
+</div>
diff --git a/app/views/system/waiting_list.html.erb b/app/views/system/waiting_list.html.erb
new file mode 100644 (file)
index 0000000..c6e8fe5
--- /dev/null
@@ -0,0 +1,15 @@
+<h1>Listing artists</h1>
+
+<table>
+  <tr>
+    <th>author</th>
+    <th></th>
+  </tr>
+
+<% @artists.each do |artist| %>
+  <tr>
+    <td><%= artist.author_id %></td>
+    <td><%= link_to 'Show', artist %></td>
+  </tr>
+<% end %>
+</table>
diff --git a/config.ru b/config.ru
new file mode 100644 (file)
index 0000000..b8f4003
--- /dev/null
+++ b/config.ru
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment',  __FILE__)
+run Pettanr::Application
diff --git a/config/application.rb b/config/application.rb
new file mode 100644 (file)
index 0000000..35fd1cc
--- /dev/null
@@ -0,0 +1,55 @@
+require File.expand_path('../boot', __FILE__)
+
+# Pick the frameworks you want:
+require "active_record/railtie"
+require "action_controller/railtie"
+require "action_mailer/railtie"
+require "active_resource/railtie"
+require "sprockets/railtie"
+# require "rails/test_unit/railtie"
+
+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 Pettanr
+  class Application < Rails::Application
+    # Settings in config/environments/* take precedence over those specified here.
+    # Application configuration should go into files in config/initializers
+    # -- all .rb files in that directory are automatically loaded.
+config.assets.initialize_on_precompile = false
+
+    # Custom directories with classes and modules you want to be autoloadable.
+    # config.autoload_paths += %W(#{config.root}/extras)
+
+    # Only load the plugins named here, in the order given (default is alphabetical).
+    # :all can be used as a placeholder for all plugins not explicitly named.
+    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+    # Activate observers that should always be running.
+    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+    # config.time_zone = 'Central Time (US & Canada)'
+
+    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+    # config.i18n.default_locale = :de
+
+    # Configure the default encoding used in templates for Ruby 1.9.
+    config.encoding = "utf-8"
+
+    # 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/aws.yaml.org b/config/aws.yaml.org
new file mode 100644 (file)
index 0000000..869e47f
--- /dev/null
@@ -0,0 +1,2 @@
+access_key_id: XXXXXXXXXXXXXXXXXXXX
+secret_access_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
diff --git a/config/boot.rb b/config/boot.rb
new file mode 100644 (file)
index 0000000..4489e58
--- /dev/null
@@ -0,0 +1,6 @@
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
diff --git a/config/cucumber.yml b/config/cucumber.yml
new file mode 100644 (file)
index 0000000..19b288d
--- /dev/null
@@ -0,0 +1,8 @@
+<%
+rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
+rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
+std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
+%>
+default: <%= std_opts %> features
+wip: --tags @wip:3 --wip features
+rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
diff --git a/config/database.yml b/config/database.yml
new file mode 100644 (file)
index 0000000..09cc85a
--- /dev/null
@@ -0,0 +1,28 @@
+# SQLite version 3.x
+#   gem install sqlite3
+#
+#   Ensure the SQLite 3 gem is defined in your Gemfile
+#   gem 'sqlite3'
+development:
+  adapter: sqlite3
+  database: db/development.sqlite3
+  pool: 5
+  timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test: &test
+  adapter: sqlite3
+  database: db/test.sqlite3
+  pool: 5
+  timeout: 5000
+
+production:
+  adapter: sqlite3
+  database: db/production.sqlite3
+  pool: 5
+  timeout: 5000
+
+cucumber:
+  <<: *test
\ No newline at end of file
diff --git a/config/environment.rb b/config/environment.rb
new file mode 100644 (file)
index 0000000..904ba8d
--- /dev/null
@@ -0,0 +1,6 @@
+# Load the rails application
+require File.expand_path('../application', __FILE__)
+
+# Initialize the rails application
+Pettanr::Application.initialize!
+require 'picture_io'
diff --git a/config/environments/development.rb b/config/environments/development.rb
new file mode 100644 (file)
index 0000000..138112a
--- /dev/null
@@ -0,0 +1,38 @@
+require 'DMagick'
+
+Pettanr::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # In the development environment your application's code is reloaded on
+  # every request.  This slows down response time but is perfect for development
+  # since you don't have to restart the web server when you make code changes.
+  config.cache_classes = false
+
+  # Log error messages when you accidentally call methods on nil.
+  config.whiny_nils = true
+
+  # Show full error reports and disable caching
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
+
+  # Don't care if the mailer can't send
+  config.action_mailer.raise_delivery_errors = false
+
+  # Print deprecation notices to the Rails logger
+  config.active_support.deprecation = :log
+
+  # 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
+end
+
+require 'local_picture'
+PictureIO.setup do |config|
+  config.original_picture_io = PictureIO::LocalPicture.new '/sites/original/pettanr/'
+  config.resource_picture_io = PictureIO::LocalPicture.new  '/sites/resource/pettanr/'
+end
diff --git a/config/environments/production.rb b/config/environments/production.rb
new file mode 100644 (file)
index 0000000..71c356d
--- /dev/null
@@ -0,0 +1,74 @@
+require 'RMagick'
+Pettanr::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # Code is not reloaded between requests
+  config.cache_classes = true
+
+  # Full error reports are disabled and caching is turned on
+  config.consider_all_requests_local       = false
+  config.action_controller.perform_caching = true
+
+  # Disable Rails's static asset server (Apache or nginx will already do this)
+  config.serve_static_assets = false
+
+  # 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
+
+  # Defaults to Rails.root.join("public/assets")
+  # config.assets.manifest = YOUR_PATH
+
+  # Specifies the header that your server uses for sending files
+  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
+
+  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+  # config.force_ssl = true
+
+  # See everything in the log (default is :info)
+  # config.log_level = :debug
+
+  # Use a different logger for distributed setups
+  # config.logger = SyslogLogger.new
+
+  # Use a different cache store in production
+  # config.cache_store = :mem_cache_store
+
+  # Enable serving of images, stylesheets, and JavaScripts from an asset server
+  # config.action_controller.asset_host = "http://assets.example.com"
+
+  # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+  # config.assets.precompile += %w( search.js )
+
+  # Disable delivery errors, bad email addresses will be ignored
+  # config.action_mailer.raise_delivery_errors = false
+
+  # Enable threaded mode
+  # config.threadsafe!
+
+  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+  # the I18n.default_locale when a translation can not be found)
+  config.i18n.fallbacks = true
+
+  # Send deprecation notices to registered listeners
+  config.active_support.deprecation = :notify
+end
+require 'aws/s3'
+require 'yaml'
+
+y = YAML.load(open(Rails.root + 'config/aws.yaml').read)
+AWS::S3::Base.establish_connection!(
+  :access_key_id => y["access_key_id"], 
+  :secret_access_key => y["secret_access_key"]
+)
+require 's3_picture'
+PictureIO.setup do |config|
+  config.original_picture_io = PictureIO::S3Picture.new 'pettanr-original'
+  config.resource_picture_io = PictureIO::S3Picture.new 'pettanr-stable'
+end
diff --git a/config/environments/test.rb b/config/environments/test.rb
new file mode 100644 (file)
index 0000000..a9b849b
--- /dev/null
@@ -0,0 +1,39 @@
+Pettanr::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # The test environment is used exclusively to run your application's
+  # test suite.  You never need to work with it otherwise.  Remember that
+  # your test database is "scratch space" for the test suite and is wiped
+  # and recreated between test runs.  Don't rely on the data there!
+  config.cache_classes = true
+
+  # Configure static asset server for tests with Cache-Control for performance
+  config.serve_static_assets = true
+  config.static_cache_control = "public, max-age=3600"
+
+  # Log error messages when you accidentally call methods on nil
+  config.whiny_nils = true
+
+  # Show full error reports and disable caching
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
+
+  # Raise exceptions instead of rendering exception templates
+  config.action_dispatch.show_exceptions = false
+
+  # Disable request forgery protection in test environment
+  config.action_controller.allow_forgery_protection    = false
+
+  # Tell Action Mailer not to deliver emails to the real world.
+  # The :test delivery method accumulates sent emails in the
+  # ActionMailer::Base.deliveries array.
+  config.action_mailer.delivery_method = :test
+
+  # Use SQL instead of Active Record's schema dumper when creating the test database.
+  # This is necessary if your schema can't be completely dumped by the schema dumper,
+  # like if you have constraints or database-specific column types
+  # config.active_record.schema_format = :sql
+
+  # Print deprecation notices to the stderr
+  config.active_support.deprecation = :stderr
+end
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb
new file mode 100644 (file)
index 0000000..59385cd
--- /dev/null
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
new file mode 100644 (file)
index 0000000..cbfbd72
--- /dev/null
@@ -0,0 +1,210 @@
+# Use this hook to configure devise mailer, warden hooks and so forth.
+# Many of these configuration options can be set straight in your model.
+Devise.setup do |config|
+  # ==> Mailer Configuration
+  # Configure the e-mail address which will be shown in Devise::Mailer,
+  # note that it will be overwritten if you use your own mailer class with default "from" parameter.
+  config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
+config.sign_out_via = :get
+
+  # Configure the class responsible to send e-mails.
+  # config.mailer = "Devise::Mailer"
+
+  # ==> ORM configuration
+  # Load and configure the ORM. Supports :active_record (default) and
+  # :mongoid (bson_ext recommended) by default. Other ORMs may be
+  # available as additional gems.
+  require 'devise/orm/active_record'
+
+  # ==> Configuration for any authentication mechanism
+  # Configure which keys are used when authenticating a user. The default is
+  # just :email. You can configure it to use [:username, :subdomain], so for
+  # authenticating a user, both parameters are required. Remember that those
+  # parameters are used only when authenticating and not when retrieving from
+  # session. If you need permissions, you should implement that in a before filter.
+  # You can also supply a hash where the value is a boolean determining whether
+  # or not authentication should be aborted when the value is not present.
+  # config.authentication_keys = [ :email ]
+
+  # Configure parameters from the request object used for authentication. Each entry
+  # given should be a request method and it will automatically be passed to the
+  # find_for_authentication method and considered in your model lookup. For instance,
+  # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
+  # The same considerations mentioned for authentication_keys also apply to request_keys.
+  # config.request_keys = []
+
+  # Configure which authentication keys should be case-insensitive.
+  # These keys will be downcased upon creating or modifying a user and when used
+  # to authenticate or find a user. Default is :email.
+  config.case_insensitive_keys = [ :email ]
+
+  # Configure which authentication keys should have whitespace stripped.
+  # These keys will have whitespace before and after removed upon creating or
+  # modifying a user and when used to authenticate or find a user. Default is :email.
+  config.strip_whitespace_keys = [ :email ]
+
+  # Tell if authentication through request.params is enabled. True by default.
+  # config.params_authenticatable = true
+
+  # Tell if authentication through HTTP Basic Auth is enabled. False by default.
+  # config.http_authenticatable = false
+
+  # If http headers should be returned for AJAX requests. True by default.
+  # config.http_authenticatable_on_xhr = true
+
+  # The realm used in Http Basic Authentication. "Application" by default.
+  # config.http_authentication_realm = "Application"
+
+  # It will change confirmation, password recovery and other workflows
+  # to behave the same regardless if the e-mail provided was right or wrong.
+  # Does not affect registerable.
+  # config.paranoid = true
+
+  # ==> Configuration for :database_authenticatable
+  # For bcrypt, this is the cost for hashing the password and defaults to 10. If
+  # using other encryptors, it sets how many times you want the password re-encrypted.
+  #
+  # Limiting the stretches to just one in testing will increase the performance of
+  # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
+  # a value less than 10 in other environments.
+  config.stretches = Rails.env.test? ? 1 : 10
+
+  # Setup a pepper to generate the encrypted password.
+  # config.pepper = "7835fc9cebff957984851fd2936fbfb6593439b1ebf26dbe6e3da1554a12dfaaa6e551ad7b4681d07ccaf66cd73cf9440cd54c75e0d85caa27f605118b1456b0"
+
+  # ==> Configuration for :confirmable
+  # A period that the user is allowed to access the website even without
+  # confirming his account. For instance, if set to 2.days, the user will be
+  # able to access the website for two days without confirming his account,
+  # access will be blocked just in the third day. Default is 0.days, meaning
+  # the user cannot access the website without confirming his account.
+  # config.confirm_within = 2.days
+
+  # Defines which key will be used when confirming an account
+  # config.confirmation_keys = [ :email ]
+
+  # ==> Configuration for :rememberable
+  # The time the user will be remembered without asking for credentials again.
+  # config.remember_for = 2.weeks
+
+  # If true, a valid remember token can be re-used between multiple browsers.
+  # config.remember_across_browsers = true
+
+  # If true, extends the user's remember period when remembered via cookie.
+  # config.extend_remember_period = false
+
+  # If true, uses the password salt as remember token. This should be turned
+  # to false if you are not using database authenticatable.
+  config.use_salt_as_remember_token = true
+
+  # Options to be passed to the created cookie. For instance, you can set
+  # :secure => true in order to force SSL only cookies.
+  # config.cookie_options = {}
+
+  # ==> Configuration for :validatable
+  # Range for password length. Default is 6..128.
+  # config.password_length = 6..128
+
+  # Email regex used to validate email formats. It simply asserts that
+  # an one (and only one) @ exists in the given string. This is mainly
+  # to give user feedback and not to assert the e-mail validity.
+  # config.email_regexp = /\A[^@]+@[^@]+\z/
+
+  # ==> Configuration for :timeoutable
+  # The time you want to timeout the user session without activity. After this
+  # time the user will be asked for credentials again. Default is 30 minutes.
+  # config.timeout_in = 30.minutes
+
+  # ==> Configuration for :lockable
+  # Defines which strategy will be used to lock an account.
+  # :failed_attempts = Locks an account after a number of failed attempts to sign in.
+  # :none            = No lock strategy. You should handle locking by yourself.
+  # config.lock_strategy = :failed_attempts
+
+  # Defines which key will be used when locking and unlocking an account
+  # config.unlock_keys = [ :email ]
+
+  # Defines which strategy will be used to unlock an account.
+  # :email = Sends an unlock link to the user email
+  # :time  = Re-enables login after a certain amount of time (see :unlock_in below)
+  # :both  = Enables both strategies
+  # :none  = No unlock strategy. You should handle unlocking by yourself.
+  # config.unlock_strategy = :both
+
+  # Number of authentication tries before locking an account if lock_strategy
+  # is failed attempts.
+  # config.maximum_attempts = 20
+
+  # Time interval to unlock the account if :time is enabled as unlock_strategy.
+  # config.unlock_in = 1.hour
+
+  # ==> Configuration for :recoverable
+  #
+  # Defines which key will be used when recovering the password for an account
+  # config.reset_password_keys = [ :email ]
+
+  # Time interval you can reset your password with a reset password key.
+  # Don't put a too small interval or your users won't have the time to
+  # change their passwords.
+  config.reset_password_within = 2.hours
+
+  # ==> Configuration for :encryptable
+  # Allow you to use another encryption algorithm besides bcrypt (default). You can use
+  # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
+  # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
+  # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
+  # REST_AUTH_SITE_KEY to pepper)
+  # config.encryptor = :sha512
+
+  # ==> Configuration for :token_authenticatable
+  # Defines name of the authentication token params key
+config.token_authentication_key = :auth_token
+
+  # If true, authentication through token does not store user in session and needs
+  # to be supplied on each request. Useful if you are using the token as API token.
+  # config.stateless_token = false
+
+  # ==> Scopes configuration
+  # Turn scoped views on. Before rendering "sessions/new", it will first check for
+  # "users/sessions/new". It's turned off by default because it's slower if you
+  # are using only default views.
+config.scoped_views = true
+
+  # Configure the default scope given to Warden. By default it's the first
+  # devise role declared in your routes (usually :user).
+  # config.default_scope = :user
+
+  # Configure sign_out behavior.
+  # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
+  # The default is true, which means any logout action will sign out all active scopes.
+  # config.sign_out_all_scopes = true
+
+  # ==> Navigation configuration
+  # Lists the formats that should be treated as navigational. Formats like
+  # :html, should redirect to the sign in page when the user does not have
+  # access, but formats like :xml or :json, should return 401.
+  #
+  # If you have any extra navigational formats, like :iphone or :mobile, you
+  # should add them to the navigational formats lists.
+  #
+  # The :"*/*" and "*/*" formats below is required to match Internet
+  # Explorer requests.
+  # config.navigational_formats = [:"*/*", "*/*", :html]
+
+  # The default HTTP method used to sign out a resource. Default is :delete.
+  config.sign_out_via = :delete
+
+  # ==> OmniAuth
+  # Add a new OmniAuth provider. Check the wiki for more information on setting
+  # up on your models and hooks.
+  # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
+
+  # ==> Warden configuration
+  # If you want to use other strategies, that are not supported by Devise, or
+  # change the failure app, you can configure them inside the config.warden block.
+  #
+  # config.warden do |manager|
+  #   manager.intercept_401 = false
+  #   manager.default_strategies(:scope => :user).unshift :some_external_strategy
+  # end
+end
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
new file mode 100644 (file)
index 0000000..9e8b013
--- /dev/null
@@ -0,0 +1,10 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+#   inflect.plural /^(ox)$/i, '\1en'
+#   inflect.singular /^(ox)en/i, '\1'
+#   inflect.irregular 'person', 'people'
+#   inflect.uncountable %w( fish sheep )
+# end
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
new file mode 100644 (file)
index 0000000..8f16e73
--- /dev/null
@@ -0,0 +1,9 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
+Mime::Type.register_alias "image/png", :png
+Mime::Type.register_alias "image/gif", :gif
+Mime::Type.register_alias "image/jpeg", :jpeg
+Mime::Type.register_alias "application/javascript", :jsonp
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
new file mode 100644 (file)
index 0000000..0c7ad4b
--- /dev/null
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+Pettanr::Application.config.secret_token = 'e19abc2df3c3b5b73fa734769b24396a24cf79a79c4d4ebae8a170cb67bc4969beb3a88053fa9f9e1dbfb7c6a60bcc04852156adc3ef0675de283562e500a43a'
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
new file mode 100644 (file)
index 0000000..87c3743
--- /dev/null
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+Pettanr::Application.config.session_store :cookie_store, key: '_pettanr_session'
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rails generate session_migration")
+# Pettanr::Application.config.session_store :active_record_store
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb
new file mode 100644 (file)
index 0000000..999df20
--- /dev/null
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+  wrap_parameters format: [:json]
+end
+
+# Disable root element in JSON by default.
+ActiveSupport.on_load(:active_record) do
+  self.include_root_in_json = false
+end
diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml
new file mode 100644 (file)
index 0000000..79b3d5e
--- /dev/null
@@ -0,0 +1,58 @@
+# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
+
+en:
+  errors:
+    messages:
+      expired: "has expired, please request a new one"
+      not_found: "not found"
+      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.'
+      invalid: 'Invalid email or password.'
+      invalid_token: 'Invalid authentication token.'
+      timeout: 'Your session expired, please sign in again to continue.'
+      inactive: 'Your account was not activated yet.'
+    sessions:
+      signed_in: 'Signed in successfully.'
+      signed_out: 'Signed out successfully.'
+    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.'
+      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: 'Welcome! You have signed up successfully.'
+      inactive_signed_up: 'You have signed up successfully. However, we could not sign you in because your account is %{reason}.'
+      updated: 'You updated your account successfully.'
+      destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
+      reasons:
+        inactive: 'inactive'
+        unconfirmed: 'unconfirmed'
+        locked: 'locked'
+    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.'
+      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'
+      reset_password_instructions:
+        subject: 'Reset password instructions'
+      unlock_instructions:
+        subject: 'Unlock Instructions'
diff --git a/config/locales/en.yml b/config/locales/en.yml
new file mode 100644 (file)
index 0000000..179c14c
--- /dev/null
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+  hello: "Hello world"
diff --git a/config/routes.rb b/config/routes.rb
new file mode 100644 (file)
index 0000000..0e0b2c6
--- /dev/null
@@ -0,0 +1,87 @@
+Pettanr::Application.routes.draw do
+
+  devise_for :admins
+  devise_for :authors
+
+  match 'original_pictures/:id(.:format)/refresh' => 'original_pictures#refresh'
+
+  resources :artists, except: [:new, :edit]
+  resources :speaches, only: [:index]
+  resources :balloons, only: [:index]
+  resources :speach_templates, only: [:index]
+  resources :balloon_templates, only: [:index]
+  resources :speach_balloons, except: [:new, :edit]
+  resources :panel_pictures, only: [:index]
+  resources :resource_pictures, only: [:index, :show]
+  resources :original_pictures, except: [:new]
+  resources :panels, except: [:new, :edit]
+  resources :comics, except: [:new, :edit]
+  resources :lisences, only: [:index]
+  resources :original_lisences
+  resources :common_lisences
+
+  # The priority is based upon order of creation:
+  # first created -> highest priority.
+
+  # Sample of regular route:
+  #   match 'products/:id' => 'catalog#view'
+  # Keep in mind you can assign values other than :controller and :action
+  match 'comics/:id(.:format)/play' => 'comics#play'
+  match 'resource_pictures/:subdir/:id(.:format)/' => 'resource_pictures#show'
+  match 'home/(:action)', :controller => 'home'
+  match 'help/(:action)', :controller => 'help'
+  controller 'system' do
+    get 'start'
+#    match 'start', :to => 'system#start'
+  end
+  
+  # Sample of named route:
+  #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
+  # This route can be invoked with purchase_url(:id => product.id)
+
+  # Sample resource route (maps HTTP verbs to controller actions automatically):
+  #   resources :products
+
+  # Sample resource route with options:
+  #   resources :products do
+  #     member do
+  #       get 'short'
+  #       post 'toggle'
+  #     end
+  #
+  #     collection do
+  #       get 'sold'
+  #     end
+  #   end
+
+  # Sample resource route with sub-resources:
+  #   resources :products do
+  #     resources :comments, :sales
+  #     resource :seller
+  #   end
+
+  # Sample resource route with more complex sub-resources
+  #   resources :products do
+  #     resources :comments
+  #     resources :sales do
+  #       get 'recent', :on => :collection
+  #     end
+  #   end
+
+  # Sample resource route within a namespace:
+  #   namespace :admin do
+  #     # Directs /admin/products/* to Admin::ProductsController
+  #     # (app/controllers/admin/products_controller.rb)
+  #     resources :products
+  #   end
+
+  # You can have the root of your site routed with "root"
+  # just remember to delete public/index.html.
+  root :to => 'comics#top'
+
+  # See how all your routes lay out with "rake routes"
+
+  # This is a legacy wild controller route that's not recommended for RESTful applications.
+  # Note: This route will make all actions in every controller accessible via GET requests.
+#  match ':controller(/:action(/:id(.:format)))'
+end
diff --git a/db/migrate/20111206091950_devise_create_authors.rb b/db/migrate/20111206091950_devise_create_authors.rb
new file mode 100644 (file)
index 0000000..74b0f47
--- /dev/null
@@ -0,0 +1,26 @@
+class DeviseCreateAuthors < ActiveRecord::Migration
+  def change
+    create_table(:authors) do |t|
+      t.string :name\r
+      t.database_authenticatable :null => false
+      t.recoverable
+      t.rememberable
+      t.trackable
+      t.token_authenticatable
+      t.confirmable
+
+      # t.encryptable
+      # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
+
+
+      t.timestamps
+    end
+
+    add_index :authors, :email,                :unique => true
+    add_index :authors, :reset_password_token, :unique => true
+    add_index :authors, :confirmation_token,   :unique => true
+    # add_index :authors, :unlock_token,         :unique => true
+    add_index :authors, :authentication_token, :unique => true
+  end
+
+end
diff --git a/db/migrate/20111206092734_devise_create_admins.rb b/db/migrate/20111206092734_devise_create_admins.rb
new file mode 100644 (file)
index 0000000..554e768
--- /dev/null
@@ -0,0 +1,25 @@
+class DeviseCreateAdmins < ActiveRecord::Migration
+  def change
+    create_table(:admins) do |t|
+      t.database_authenticatable :null => false
+      t.recoverable
+      t.rememberable
+      t.trackable
+
+      # t.encryptable
+      # t.confirmable
+      # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
+      # t.token_authenticatable
+      t.integer :activate, :null => false, :default => false
+
+      t.timestamps
+    end
+
+    add_index :admins, :email,                :unique => true
+    add_index :admins, :reset_password_token, :unique => true
+    # add_index :admins, :confirmation_token,   :unique => true
+    # add_index :admins, :unlock_token,         :unique => true
+    # add_index :admins, :authentication_token, :unique => true
+  end
+
+end
diff --git a/db/migrate/20111206095746_create_artists.rb b/db/migrate/20111206095746_create_artists.rb
new file mode 100644 (file)
index 0000000..1d5e26e
--- /dev/null
@@ -0,0 +1,14 @@
+class CreateArtists < ActiveRecord::Migration
+  def change
+    create_table :artists do |t|
+      t.string :email\r
+      t.string :name\r
+      t.string :homepage_url\r
+      t.string :api_url\r
+      t.integer :default_lisence_id\r
+      t.timestamp :crowled_at\r
+
+      t.timestamps
+    end
+  end
+end
diff --git a/db/migrate/20111206100750_create_lisences.rb b/db/migrate/20111206100750_create_lisences.rb
new file mode 100644 (file)
index 0000000..7261771
--- /dev/null
@@ -0,0 +1,18 @@
+class CreateLisences < ActiveRecord::Migration
+  def change
+    create_table :lisences do |t|
+      t.string :name, :null => false\r
+      t.string :url, :null => false\r
+      t.integer :cc_by, :null => false, :default => 0\r
+      t.integer :cc_sa, :null => false, :default => 0\r
+      t.integer :cc_nd, :null => false, :default => 0\r
+      t.integer :cc_nc, :null => false, :default => 0\r
+      t.integer :no_resize, :null => false, :default => 0\r
+      t.integer :no_flip, :null => false, :default => 0\r
+      t.integer :keep_aspect_ratio, :null => false, :default => 0\r
+
+      t.timestamps
+    end
+    add_index :lisences, [:url], :unique => true
+  end
+end
diff --git a/db/migrate/20111206105022_create_original_lisences.rb b/db/migrate/20111206105022_create_original_lisences.rb
new file mode 100644 (file)
index 0000000..221565c
--- /dev/null
@@ -0,0 +1,19 @@
+class CreateOriginalLisences < ActiveRecord::Migration
+  def change
+    create_table :original_lisences do |t|
+      t.integer :artist_id, :null => false
+      t.integer :lisence_id, :null => false
+      t.string :name, :null => false\r
+      t.string :url, :null => false\r
+      t.integer :cc_by, :null => false, :default => 0\r
+      t.integer :cc_sa, :null => false, :default => 0\r
+      t.integer :cc_nd, :null => false, :default => 0\r
+      t.integer :cc_nc, :null => false, :default => 0\r
+      t.integer :no_resize, :null => false, :default => 0\r
+      t.integer :no_flip, :null => false, :default => 0\r
+      t.integer :keep_aspect_ratio, :null => false, :default => 0\r
+
+      t.timestamps
+    end
+  end
+end
diff --git a/db/migrate/20111206105830_create_comics.rb b/db/migrate/20111206105830_create_comics.rb
new file mode 100644 (file)
index 0000000..4724a82
--- /dev/null
@@ -0,0 +1,13 @@
+class CreateComics < ActiveRecord::Migration
+  def change
+    create_table :comics do |t|
+      t.string :title
+      t.integer :default_width, :null => false, :default => 200
+      t.integer :default_height, :null => false, :default => 80
+      t.integer :author_id
+
+      t.timestamps
+    end
+    add_index :comics, [:author_id]
+  end
+end
diff --git a/db/migrate/20111206111202_create_panels.rb b/db/migrate/20111206111202_create_panels.rb
new file mode 100644 (file)
index 0000000..2645e88
--- /dev/null
@@ -0,0 +1,17 @@
+class CreatePanels < ActiveRecord::Migration
+  def change
+    create_table :panels do |t|
+      t.integer :comic_id, :null => false
+      t.integer :resource_picture_id
+      t.integer :width, :null => false, :default => 200
+      t.integer :height, :null => false, :default => 80
+      t.integer :border, :null => false, :default => 1
+      t.integer :seqno, :null => false
+      t.integer :author_id
+
+      t.timestamps
+    end
+    add_index :panels, [:comic_id, :seqno]
+    add_index :panels, [:author_id]
+  end
+end
diff --git a/db/migrate/20111206112042_create_original_pictures.rb b/db/migrate/20111206112042_create_original_pictures.rb
new file mode 100644 (file)
index 0000000..b1bf18f
--- /dev/null
@@ -0,0 +1,15 @@
+class CreateOriginalPictures < ActiveRecord::Migration
+  def change
+    create_table :original_pictures do |t|
+      t.string :ext, :null => false
+      t.integer :width, :null => false
+      t.integer :height, :null => false
+      t.integer :filesize, :null => false
+      t.integer :artist_id#, :null => false
+      t.integer :lisence_id#, :null => false
+
+      t.timestamps
+    end
+    add_index :original_pictures, [:artist_id]\r
+  end
+end
diff --git a/db/migrate/20111206112949_create_resource_pictures.rb b/db/migrate/20111206112949_create_resource_pictures.rb
new file mode 100644 (file)
index 0000000..7ed414c
--- /dev/null
@@ -0,0 +1,15 @@
+class CreateResourcePictures < ActiveRecord::Migration
+  def change
+    create_table :resource_pictures do |t|
+      t.string :ext, :null => false
+      t.integer :width, :null => false
+      t.integer :height, :null => false
+      t.integer :filesize, :null => false
+      t.integer :artist_id#, :null => false
+      t.integer :lisence_id#, :null => false
+      t.integer :original_picture_id, :null => false
+
+      t.timestamps
+    end
+  end
+end
diff --git a/db/migrate/20111206113803_create_panel_pictures.rb b/db/migrate/20111206113803_create_panel_pictures.rb
new file mode 100644 (file)
index 0000000..cae5489
--- /dev/null
@@ -0,0 +1,18 @@
+class CreatePanelPictures < ActiveRecord::Migration
+  def change
+    create_table :panel_pictures do |t|
+      t.integer :panel_id, :null => false
+      t.integer :resource_picture_id, :null => false
+      t.integer :width, :null => false
+      t.integer :height, :null => false
+      t.integer :top_offset, :null => false
+      t.integer :left_offset, :null => false
+      t.integer :zindex, :null => false
+      t.integer :v, :null => false, :default => 0
+      t.integer :h, :null => false, :default => 0
+
+      t.timestamps
+    end
+    add_index :panel_pictures, [:panel_id, :zindex]
+  end
+end
diff --git a/db/migrate/20111206115439_create_balloon_templates.rb b/db/migrate/20111206115439_create_balloon_templates.rb
new file mode 100644 (file)
index 0000000..80f235e
--- /dev/null
@@ -0,0 +1,18 @@
+class CreateBalloonTemplates < ActiveRecord::Migration
+  def change
+    create_table :balloon_templates do |t|
+      t.integer :speach_balloon_id, :null => false
+      t.integer :resource_picture_id, :null => false
+      t.integer :tail, :null => false, :default => 1
+      t.integer :border, :null => false, :default => 1
+      t.integer :min_width, :null => false, :default => 0
+      t.integer :max_width, :null => false, :default => 0
+      t.integer :min_height, :null => false, :default => 0
+      t.integer :max_height, :null => false, :default => 0
+
+      t.timestamps
+    end
+    add_index :balloon_templates, [:speach_balloon_id]
+    add_index :balloon_templates, [:speach_balloon_id, :tail, :border], :unique => true, :name => 'sb_tb'
+  end
+end
diff --git a/db/migrate/20111206120252_create_speach_templates.rb b/db/migrate/20111206120252_create_speach_templates.rb
new file mode 100644 (file)
index 0000000..8c6d6fc
--- /dev/null
@@ -0,0 +1,14 @@
+class CreateSpeachTemplates < ActiveRecord::Migration
+  def change
+    create_table :speach_templates do |t|
+      t.integer :balloon_template_id, :null => false
+      t.integer :top_offset, :null => false
+      t.integer :left_offset, :null => false
+      t.integer :width, :null => false
+      t.integer :height, :null => false
+
+      t.timestamps
+    end
+    add_index :speach_templates, [:balloon_template_id]
+  end
+end
diff --git a/db/migrate/20111206121123_create_balloons.rb b/db/migrate/20111206121123_create_balloons.rb
new file mode 100644 (file)
index 0000000..04de574
--- /dev/null
@@ -0,0 +1,20 @@
+class CreateBalloons < ActiveRecord::Migration
+  def change
+    create_table :balloons do |t|
+      t.integer :panel_id, :null => false
+      t.integer :balloon_template_id, :null => false
+      t.integer :resource_picture_id, :null => false
+      t.integer :tail, :null => false, :default => 1
+      t.integer :border, :null => false, :default => 1
+      t.integer :zindex, :null => false
+      t.integer :top_offset, :null => false
+      t.integer :left_offset, :null => false
+      t.integer :width, :null => false
+      t.integer :height, :null => false
+
+      t.timestamps
+    end
+    add_index :balloons, [:panel_id]
+    add_index :balloons, [:panel_id, :zindex]
+  end
+end
diff --git a/db/migrate/20111206130635_create_speaches.rb b/db/migrate/20111206130635_create_speaches.rb
new file mode 100644 (file)
index 0000000..3e18702
--- /dev/null
@@ -0,0 +1,15 @@
+class CreateSpeaches < ActiveRecord::Migration
+  def change
+    create_table :speaches do |t|
+      t.integer :balloon_id, :null => false
+      t.string :content
+      t.integer :top_offset, :null => false
+      t.integer :left_offset, :null => false
+      t.integer :width, :null => false
+      t.integer :height, :null => false
+
+      t.timestamps
+    end
+    add_index :speaches, [:balloon_id]
+  end
+end
diff --git a/db/migrate/20111208235818_create_speach_balloons.rb b/db/migrate/20111208235818_create_speach_balloons.rb
new file mode 100644 (file)
index 0000000..b484aa8
--- /dev/null
@@ -0,0 +1,11 @@
+class CreateSpeachBalloons < ActiveRecord::Migration
+  def change
+    create_table :speach_balloons do |t|
+      t.string :name, :null => false
+      t.integer :tail_limit, :null => false, :default => 1
+      t.integer :border_limit, :null => false, :default => 1
+
+      t.timestamps
+    end
+  end
+end
diff --git a/db/migrate/20111211052544_add_author_id_on_artist.rb b/db/migrate/20111211052544_add_author_id_on_artist.rb
new file mode 100644 (file)
index 0000000..4df8c0c
--- /dev/null
@@ -0,0 +1,9 @@
+class AddAuthorIdOnArtist < ActiveRecord::Migration
+  def up
+    add_column :artists, :author_id, :integer
+  end
+
+  def down
+    remove_column :artists, :author_id
+  end
+end
diff --git a/db/migrate/20111213073529_create_common_lisences.rb b/db/migrate/20111213073529_create_common_lisences.rb
new file mode 100644 (file)
index 0000000..1f9efcb
--- /dev/null
@@ -0,0 +1,18 @@
+class CreateCommonLisences < ActiveRecord::Migration
+  def change
+    create_table :common_lisences do |t|
+      t.integer :lisence_id, :null => false
+      t.string :name, :null => false\r
+      t.string :url, :null => false\r
+      t.integer :cc_by, :null => false, :default => 0\r
+      t.integer :cc_sa, :null => false, :default => 0\r
+      t.integer :cc_nd, :null => false, :default => 0\r
+      t.integer :cc_nc, :null => false, :default => 0\r
+      t.integer :no_resize, :null => false, :default => 0\r
+      t.integer :no_flip, :null => false, :default => 0\r
+      t.integer :keep_aspect_ratio, :null => false, :default => 0\r
+
+      t.timestamps
+    end
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
new file mode 100644 (file)
index 0000000..17cce13
--- /dev/null
@@ -0,0 +1,253 @@
+# encoding: UTF-8\r
+# This file is auto-generated from the current state of the database. Instead\r
+# of editing this file, please use the migrations feature of Active Record to\r
+# incrementally modify your database, and then regenerate this schema definition.\r
+#\r
+# Note that this schema.rb definition is the authoritative source for your\r
+# database schema. If you need to create the application database on another\r
+# system, you should be using db:schema:load, not running all the migrations\r
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations\r
+# you'll amass, the slower it'll run and the greater likelihood for issues).\r
+#\r
+# It's strongly recommended to check this file into your version control system.\r
+\r
+ActiveRecord::Schema.define(:version => 20111213073529) do\r
+\r
+  create_table "admins", :force => true do |t|\r
+    t.string   "email",                                 :default => "", :null => false\r
+    t.string   "encrypted_password",     :limit => 128, :default => "", :null => false\r
+    t.string   "reset_password_token"\r
+    t.datetime "reset_password_sent_at"\r
+    t.datetime "remember_created_at"\r
+    t.integer  "sign_in_count",                         :default => 0\r
+    t.datetime "current_sign_in_at"\r
+    t.datetime "last_sign_in_at"\r
+    t.string   "current_sign_in_ip"\r
+    t.string   "last_sign_in_ip"\r
+    t.integer  "activate",                              :default => 0,  :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "admins", ["email"], :name => "index_admins_on_email", :unique => true\r
+  add_index "admins", ["reset_password_token"], :name => "index_admins_on_reset_password_token", :unique => true\r
+\r
+  create_table "artists", :force => true do |t|\r
+    t.string   "email"\r
+    t.string   "name"\r
+    t.string   "homepage_url"\r
+    t.string   "api_url"\r
+    t.integer  "default_lisence_id"\r
+    t.datetime "crowled_at"\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+    t.integer  "author_id"\r
+  end\r
+\r
+  create_table "authors", :force => true do |t|\r
+    t.string   "name"\r
+    t.string   "email",                                 :default => "", :null => false\r
+    t.string   "encrypted_password",     :limit => 128, :default => "", :null => false\r
+    t.string   "reset_password_token"\r
+    t.datetime "reset_password_sent_at"\r
+    t.datetime "remember_created_at"\r
+    t.integer  "sign_in_count",                         :default => 0\r
+    t.datetime "current_sign_in_at"\r
+    t.datetime "last_sign_in_at"\r
+    t.string   "current_sign_in_ip"\r
+    t.string   "last_sign_in_ip"\r
+    t.string   "authentication_token"\r
+    t.string   "confirmation_token"\r
+    t.datetime "confirmed_at"\r
+    t.datetime "confirmation_sent_at"\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "authors", ["authentication_token"], :name => "index_authors_on_authentication_token", :unique => true\r
+  add_index "authors", ["confirmation_token"], :name => "index_authors_on_confirmation_token", :unique => true\r
+  add_index "authors", ["email"], :name => "index_authors_on_email", :unique => true\r
+  add_index "authors", ["reset_password_token"], :name => "index_authors_on_reset_password_token", :unique => true\r
+\r
+  create_table "balloon_templates", :force => true do |t|\r
+    t.integer  "speach_balloon_id",                  :null => false\r
+    t.integer  "resource_picture_id",                :null => false\r
+    t.integer  "tail",                :default => 1, :null => false\r
+    t.integer  "border",              :default => 1, :null => false\r
+    t.integer  "min_width",           :default => 0, :null => false\r
+    t.integer  "max_width",           :default => 0, :null => false\r
+    t.integer  "min_height",          :default => 0, :null => false\r
+    t.integer  "max_height",          :default => 0, :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "balloon_templates", ["speach_balloon_id", "tail", "border"], :name => "sb_tb", :unique => true\r
+  add_index "balloon_templates", ["speach_balloon_id"], :name => "index_balloon_templates_on_speach_balloon_id"\r
+\r
+  create_table "balloons", :force => true do |t|\r
+    t.integer  "panel_id",                           :null => false\r
+    t.integer  "balloon_template_id",                :null => false\r
+    t.integer  "resource_picture_id",                :null => false\r
+    t.integer  "tail",                :default => 1, :null => false\r
+    t.integer  "border",              :default => 1, :null => false\r
+    t.integer  "zindex",                             :null => false\r
+    t.integer  "top_offset",                         :null => false\r
+    t.integer  "left_offset",                        :null => false\r
+    t.integer  "width",                              :null => false\r
+    t.integer  "height",                             :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "balloons", ["panel_id", "zindex"], :name => "index_balloons_on_panel_id_and_zindex"\r
+  add_index "balloons", ["panel_id"], :name => "index_balloons_on_panel_id"\r
+\r
+  create_table "comics", :force => true do |t|\r
+    t.string   "title"\r
+    t.integer  "default_width",  :default => 200, :null => false\r
+    t.integer  "default_height", :default => 80,  :null => false\r
+    t.integer  "author_id"\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "comics", ["author_id"], :name => "index_comics_on_author_id"\r
+\r
+  create_table "common_lisences", :force => true do |t|\r
+    t.integer  "lisence_id",                       :null => false\r
+    t.string   "name",                             :null => false\r
+    t.string   "url",                              :null => false\r
+    t.integer  "cc_by",             :default => 0, :null => false\r
+    t.integer  "cc_sa",             :default => 0, :null => false\r
+    t.integer  "cc_nd",             :default => 0, :null => false\r
+    t.integer  "cc_nc",             :default => 0, :null => false\r
+    t.integer  "no_resize",         :default => 0, :null => false\r
+    t.integer  "no_flip",           :default => 0, :null => false\r
+    t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  create_table "lisences", :force => true do |t|\r
+    t.string   "name",                             :null => false\r
+    t.string   "url",                              :null => false\r
+    t.integer  "cc_by",             :default => 0, :null => false\r
+    t.integer  "cc_sa",             :default => 0, :null => false\r
+    t.integer  "cc_nd",             :default => 0, :null => false\r
+    t.integer  "cc_nc",             :default => 0, :null => false\r
+    t.integer  "no_resize",         :default => 0, :null => false\r
+    t.integer  "no_flip",           :default => 0, :null => false\r
+    t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "lisences", ["url"], :name => "index_lisences_on_url", :unique => true\r
+\r
+  create_table "original_lisences", :force => true do |t|\r
+    t.integer  "artist_id",                        :null => false\r
+    t.integer  "lisence_id",                       :null => false\r
+    t.string   "name",                             :null => false\r
+    t.string   "url",                              :null => false\r
+    t.integer  "cc_by",             :default => 0, :null => false\r
+    t.integer  "cc_sa",             :default => 0, :null => false\r
+    t.integer  "cc_nd",             :default => 0, :null => false\r
+    t.integer  "cc_nc",             :default => 0, :null => false\r
+    t.integer  "no_resize",         :default => 0, :null => false\r
+    t.integer  "no_flip",           :default => 0, :null => false\r
+    t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  create_table "original_pictures", :force => true do |t|\r
+    t.string   "ext",        :null => false\r
+    t.integer  "width",      :null => false\r
+    t.integer  "height",     :null => false\r
+    t.integer  "filesize",   :null => false\r
+    t.integer  "artist_id"\r
+    t.integer  "lisence_id"\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "original_pictures", ["artist_id"], :name => "index_original_pictures_on_artist_id"\r
+\r
+  create_table "panel_pictures", :force => true do |t|\r
+    t.integer  "panel_id",                           :null => false\r
+    t.integer  "resource_picture_id",                :null => false\r
+    t.integer  "width",                              :null => false\r
+    t.integer  "height",                             :null => false\r
+    t.integer  "top_offset",                         :null => false\r
+    t.integer  "left_offset",                        :null => false\r
+    t.integer  "zindex",                             :null => false\r
+    t.integer  "v",                   :default => 0, :null => false\r
+    t.integer  "h",                   :default => 0, :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "panel_pictures", ["panel_id", "zindex"], :name => "index_panel_pictures_on_panel_id_and_zindex"\r
+\r
+  create_table "panels", :force => true do |t|\r
+    t.integer  "comic_id",                             :null => false\r
+    t.integer  "resource_picture_id"\r
+    t.integer  "width",               :default => 200, :null => false\r
+    t.integer  "height",              :default => 80,  :null => false\r
+    t.integer  "border",              :default => 1,   :null => false\r
+    t.integer  "seqno",                                :null => false\r
+    t.integer  "author_id"\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "panels", ["author_id"], :name => "index_panels_on_author_id"\r
+  add_index "panels", ["comic_id", "seqno"], :name => "index_panels_on_comic_id_and_seqno"\r
+\r
+  create_table "resource_pictures", :force => true do |t|\r
+    t.string   "ext",                 :null => false\r
+    t.integer  "width",               :null => false\r
+    t.integer  "height",              :null => false\r
+    t.integer  "filesize",            :null => false\r
+    t.integer  "artist_id"\r
+    t.integer  "lisence_id"\r
+    t.integer  "original_picture_id", :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  create_table "speach_balloons", :force => true do |t|\r
+    t.string   "name",                        :null => false\r
+    t.integer  "tail_limit",   :default => 1, :null => false\r
+    t.integer  "border_limit", :default => 1, :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  create_table "speach_templates", :force => true do |t|\r
+    t.integer  "balloon_template_id", :null => false\r
+    t.integer  "top_offset",          :null => false\r
+    t.integer  "left_offset",         :null => false\r
+    t.integer  "width",               :null => false\r
+    t.integer  "height",              :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "speach_templates", ["balloon_template_id"], :name => "index_speach_templates_on_balloon_template_id"\r
+\r
+  create_table "speaches", :force => true do |t|\r
+    t.integer  "balloon_id",  :null => false\r
+    t.string   "content"\r
+    t.integer  "top_offset",  :null => false\r
+    t.integer  "left_offset", :null => false\r
+    t.integer  "width",       :null => false\r
+    t.integer  "height",      :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "speaches", ["balloon_id"], :name => "index_speaches_on_balloon_id"\r
+\r
+end\r
diff --git a/db/seeds.rb b/db/seeds.rb
new file mode 100644 (file)
index 0000000..f86207c
--- /dev/null
@@ -0,0 +1,35 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or newd alongside the db with db:setup).
+#
+# Examples:
+#
+#   cities = City.new([{ name: 'Chicago' }, { name: 'Copenhagen' }])
+#   Mayor.new(name: 'Emanuel', city: cities.first)
+cl = CommonLisence.new name: 'Public Domain', 
+  url: 'http://ja.wikipedia.org/wiki/%E3%83%91%E3%83%96%E3%83%AA%E3%83%83%E3%82%AF%E3%83%89%E3%83%A1%E3%82%A4%E3%83%B3', 
+  cc_by: 0, cc_sa: 0, cc_nd: 0, cc_nc: 0, no_resize: 0, no_flip: 0, keep_aspect_ratio: 0
+cl = CommonLisence.new name: 'Creative Commons 3.0(by)', 
+  url: 'http://creativecommons.org/licenses/by/3.0/legalcode', 
+  cc_by: 1, cc_sa: 0, cc_nd: 0, cc_nc: 0, no_resize: 0, no_flip: 0, keep_aspect_ratio: 0
+cl.save_save
+cl = CommonLisence.new name: 'Creative Commons 3.0(by_sa)', 
+  url: 'http://creativecommons.org/licenses/by-sa/3.0/legalcode', 
+  cc_by: 1, cc_sa: 1, cc_nd: 0, cc_nc: 0, no_resize: 0, no_flip: 0, keep_aspect_ratio: 0
+cl.save_save
+cl = CommonLisence.new name: 'Creative Commons 3.0(by_nd)', 
+  url: 'http://creativecommons.org/licenses/by-nd/3.0/legalcode', 
+  cc_by: 1, cc_sa: 0, cc_nd: 1, cc_nc: 0, no_resize: 0, no_flip: 0, keep_aspect_ratio: 0
+cl.save_save
+cl = CommonLisence.new name: 'Creative Commons 3.0(by_nc)', 
+  url: 'http://creativecommons.org/licenses/by-nc/3.0/legalcode', 
+  cc_by: 1, cc_sa: 0, cc_nd: 0, cc_nc: 1, no_resize: 0, no_flip: 0, keep_aspect_ratio: 0
+cl.save_save
+cl = CommonLisence.new name: 'Creative Commons 3.0(by_nc_sa)', 
+  url: 'http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode', 
+  cc_by: 1, cc_sa: 1, cc_nd: 0, cc_nc: 1, no_resize: 0, no_flip: 0, keep_aspect_ratio: 0
+cl.save_save
+cl = CommonLisence.new name: 'Creative Commons 3.0(by_nc_nd)', 
+  url: 'http://creativecommons.org/licenses/by-nc-nd/3.0/legalcode', 
+  cc_by: 1, cc_sa: 0, cc_nd: 1, cc_nc: 1, no_resize: 0, no_flip: 0, keep_aspect_ratio: 0
+cl.save_save
+
diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP
new file mode 100644 (file)
index 0000000..fe41f5c
--- /dev/null
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
diff --git a/features/support/env.rb b/features/support/env.rb
new file mode 100644 (file)
index 0000000..b2cf673
--- /dev/null
@@ -0,0 +1,56 @@
+# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
+# It is recommended to regenerate this file in the future when you upgrade to a 
+# newer version of cucumber-rails. Consider adding your own code to a new file 
+# instead of editing this one. Cucumber will automatically load all features/**/*.rb
+# files.
+
+require 'cucumber/rails'
+
+# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
+# order to ease the transition to Capybara we set the default here. If you'd
+# prefer to use XPath just remove this line and adjust any selectors in your
+# steps to use the XPath syntax.
+Capybara.default_selector = :css
+
+# By default, any exception happening in your Rails application will bubble up
+# to Cucumber so that your scenario will fail. This is a different from how 
+# your application behaves in the production environment, where an error page will 
+# be rendered instead.
+#
+# Sometimes we want to override this default behaviour and allow Rails to rescue
+# exceptions and display an error page (just like when the app is running in production).
+# Typical scenarios where you want to do this is when you test your error pages.
+# There are two ways to allow Rails to rescue exceptions:
+#
+# 1) Tag your scenario (or feature) with @allow-rescue
+#
+# 2) Set the value below to true. Beware that doing this globally is not
+# recommended as it will mask a lot of errors for you!
+#
+ActionController::Base.allow_rescue = false
+
+# Remove/comment out the lines below if your app doesn't have a database.
+# For some databases (like MongoDB and CouchDB) you may need to use :truncation instead.
+begin
+  DatabaseCleaner.strategy = :transaction
+rescue NameError
+  raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
+end
+
+# You may also want to configure DatabaseCleaner to use different strategies for certain features and scenarios.
+# See the DatabaseCleaner documentation for details. Example:
+#
+#   Before('@no-txn,@selenium,@culerity,@celerity,@javascript') do
+#     DatabaseCleaner.strategy = :truncation, {:except => %w[widgets]}
+#   end
+#
+#   Before('~@no-txn', '~@selenium', '~@culerity', '~@celerity', '~@javascript') do
+#     DatabaseCleaner.strategy = :transaction
+#   end
+#
+
+# Possible values are :truncation and :transaction
+# The :transaction strategy is faster, but might give you threading problems.
+# See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature
+Cucumber::Rails::Database.javascript_strategy = :truncation
+
diff --git a/lib/DMagick.rb b/lib/DMagick.rb
new file mode 100644 (file)
index 0000000..2745468
--- /dev/null
@@ -0,0 +1,41 @@
+module Magick
+  class Image
+    def initialize bindata
+      @bindata = bindata
+    end
+    
+    def self.from_blob bindata
+      [Magick::Image.new(bindata), Magick::Image.new(bindata)]
+    end
+    
+    def to_blob
+      @bindata
+    end
+    
+    def resize w,h
+      self
+    end
+    
+    def columns
+      100
+    end
+    
+    def rows
+      100
+    end
+    
+    def format
+      'png'
+    end
+    
+    def flip
+      self
+    end
+    
+    def flop
+      self
+    end
+    
+  end
+  
+end
diff --git a/lib/assets/.gitkeep b/lib/assets/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/local_picture.rb b/lib/local_picture.rb
new file mode 100644 (file)
index 0000000..536ab22
--- /dev/null
@@ -0,0 +1,51 @@
+require 'picture_io'
+class PictureIO
+  class LocalPicture
+    def initialize base_dir = Rails.root + 'public/images/'
+      @base = base_dir
+    end
+    
+    def base
+      @base
+    end
+    
+    def base=(b)
+      @base = b
+    end
+    
+    def self.subdirs
+      ['', 'v', 'h', 'vh', 'thumbnail']
+    end
+    
+    def dir(subdir = nil)
+      sd = if subdir.to_s.empty?
+        self.base
+      else
+        self.base + (subdir.to_s + '/')
+      end
+      sd
+    end
+    
+    def mkdir subdir = nil
+      Dir.mkdir(base) unless File.exist?(base)
+      return if subdir.to_s.empty?
+      Dir.mkdir(dir(subdir)) unless File.exist?(dir(subdir))
+    end
+    
+    def put(bindata, filename, subdir = nil)
+      mkdir subdir
+      open(dir(subdir) + filename, 'wb') do |f|
+        f.write bindata
+      end
+    end
+    
+    def get(filename, subdir = nil)
+      bindata = ''
+      open(dir(subdir) + filename, 'rb') do |f|
+        bindata += f.read
+      end
+      bindata
+    end
+    
+  end
+end
diff --git a/lib/picture_io.rb b/lib/picture_io.rb
new file mode 100644 (file)
index 0000000..5ca2662
--- /dev/null
@@ -0,0 +1,25 @@
+class PictureIO
+  @@resource_picture_io #= LocalPicture.new
+  @@original_picture_io #= LocalPicture.new Rails.root + 'original'
+  
+  def self.original_picture_io
+    @@original_picture_io
+  end
+  
+  def self.original_picture_io=(pclass)
+    @@original_picture_io = pclass
+  end
+  
+  def self.resource_picture_io
+    @@resource_picture_io
+  end
+  
+  def self.resource_picture_io=(pclass)
+    @@resource_picture_io = pclass
+  end
+  
+  def self.setup
+    yield self
+  end
+  
+end
diff --git a/lib/s3_picture.rb b/lib/s3_picture.rb
new file mode 100644 (file)
index 0000000..f6d7bf8
--- /dev/null
@@ -0,0 +1,68 @@
+require 'picture_io'
+require 'aws/s3'
+class PictureIO
+  class S3Picture
+    def initialize base_dir = 'pettanr'
+      @base = base_dir
+    end
+    
+    def base
+      @base
+    end
+    
+    def base=(b)
+      @base = b
+    end
+    
+    def self.subdirs
+      ['', 'v', 'h', 'vh', 'thumbnail']
+    end
+    
+    def dir(subdir = nil)
+      sd = if subdir.to_s.empty?
+        ''
+      else
+        subdir.to_s + '/'
+      end
+      sd
+    end
+    
+    def put(bindata, filename, subdir = nil)
+      AWS::S3::S3Object.store(dir(subdir) + filename, bindata, base)
+    end
+    
+    def get(filename, subdir = nil)
+      bindata = ''
+  #      if AWS::S3::S3Object.exists?(fn, 'pettanr')
+      AWS::S3::S3Object.stream(dir(subdir) + filename, base) do |st|
+        bindata += st if st
+      end
+      bindata
+    end
+    
+    def store(dt)
+      iw, ih = Image.fix_size_both(80, 80, dt.columns, dt.rows)
+      n = dt.to_blob
+      v = dt.flip.to_blob
+      h = dt.flop.to_blob
+      vh = dt.flip.flop.to_blob
+      AWS::S3::S3Object.store(filename, n, 'pettanr')
+      AWS::S3::S3Object.store('v/' + filename, v, 'pettanr') if v
+      AWS::S3::S3Object.store('h/' + filename, h, 'pettanr') if h
+      AWS::S3::S3Object.store('vh/' + filename, vh, 'pettanr') if vh
+      
+      t = Image.resize(dt.to_blob, iw, ih).to_blob
+      AWS::S3::S3Object.store('thumbnail/' + filename, t, 'pettanr')
+    end
+    
+    def restore(turn)
+      dt = ''
+  #      if AWS::S3::S3Object.exists?(fn, 'pettanr')
+      d = turn ? "#{turn}/" : ''
+      AWS::S3::S3Object.stream(d + filename, 'pettanr') do |st|
+        dt += st if st
+      end
+      dt
+    end
+  end
+end
diff --git a/lib/tasks/.gitkeep b/lib/tasks/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/tasks/cucumber.rake b/lib/tasks/cucumber.rake
new file mode 100644 (file)
index 0000000..83f7947
--- /dev/null
@@ -0,0 +1,65 @@
+# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
+# It is recommended to regenerate this file in the future when you upgrade to a 
+# newer version of cucumber-rails. Consider adding your own code to a new file 
+# instead of editing this one. Cucumber will automatically load all features/**/*.rb
+# files.
+
+
+unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
+
+vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
+$LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
+
+begin
+  require 'cucumber/rake/task'
+
+  namespace :cucumber do
+    Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
+      t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
+      t.fork = true # You may get faster startup if you set this to false
+      t.profile = 'default'
+    end
+
+    Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
+      t.binary = vendored_cucumber_bin
+      t.fork = true # You may get faster startup if you set this to false
+      t.profile = 'wip'
+    end
+
+    Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
+      t.binary = vendored_cucumber_bin
+      t.fork = true # You may get faster startup if you set this to false
+      t.profile = 'rerun'
+    end
+
+    desc 'Run all features'
+    task :all => [:ok, :wip]
+
+    task :statsetup do
+      require 'rails/code_statistics'
+      ::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
+      ::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
+    end
+  end
+  desc 'Alias for cucumber:ok'
+  task :cucumber => 'cucumber:ok'
+
+  task :default => :cucumber
+
+  task :features => :cucumber do
+    STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
+  end
+
+  # In case we don't have ActiveRecord, append a no-op task that we can depend upon.
+  task 'db:test:prepare' do
+  end
+
+  task :stats => 'cucumber:statsetup'
+rescue LoadError
+  desc 'cucumber rake task not available (cucumber not installed)'
+  task :cucumber do
+    abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
+  end
+end
+
+end
diff --git a/log/.gitkeep b/log/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/public/404.html b/public/404.html
new file mode 100644 (file)
index 0000000..9a48320
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>The page you were looking for doesn't exist (404)</title>
+  <style type="text/css">
+    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+    div.dialog {
+      width: 25em;
+      padding: 0 4em;
+      margin: 4em auto 0 auto;
+      border: 1px solid #ccc;
+      border-right-color: #999;
+      border-bottom-color: #999;
+    }
+    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+  </style>
+</head>
+
+<body>
+  <!-- This file lives in public/404.html -->
+  <div class="dialog">
+    <h1>The page you were looking for doesn't exist.</h1>
+    <p>You may have mistyped the address or the page may have moved.</p>
+  </div>
+</body>
+</html>
diff --git a/public/422.html b/public/422.html
new file mode 100644 (file)
index 0000000..83660ab
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>The change you wanted was rejected (422)</title>
+  <style type="text/css">
+    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+    div.dialog {
+      width: 25em;
+      padding: 0 4em;
+      margin: 4em auto 0 auto;
+      border: 1px solid #ccc;
+      border-right-color: #999;
+      border-bottom-color: #999;
+    }
+    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+  </style>
+</head>
+
+<body>
+  <!-- This file lives in public/422.html -->
+  <div class="dialog">
+    <h1>The change you wanted was rejected.</h1>
+    <p>Maybe you tried to change something you didn't have access to.</p>
+  </div>
+</body>
+</html>
diff --git a/public/500.html b/public/500.html
new file mode 100644 (file)
index 0000000..b80307f
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>We're sorry, but something went wrong (500)</title>
+  <style type="text/css">
+    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+    div.dialog {
+      width: 25em;
+      padding: 0 4em;
+      margin: 4em auto 0 auto;
+      border: 1px solid #ccc;
+      border-right-color: #999;
+      border-bottom-color: #999;
+    }
+    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+  </style>
+</head>
+
+<body>
+  <!-- This file lives in public/500.html -->
+  <div class="dialog">
+    <h1>We're sorry, but something went wrong.</h1>
+    <p>We've been notified about this issue and we'll take a look at it shortly.</p>
+  </div>
+</body>
+</html>
diff --git a/public/assets/application-00960e5186894b532975562d59176a6a.css b/public/assets/application-00960e5186894b532975562d59176a6a.css
new file mode 100644 (file)
index 0000000..5b8f3ee
--- /dev/null
@@ -0,0 +1 @@
+body{background-color:#fff;color:#333;font-family:verdana, arial, helvetica, sans-serif;font-size:13px;line-height:18px}p,ol,ul,td{font-family:verdana, arial, helvetica, sans-serif;font-size:13px;line-height:18px}pre{background-color:#eee;padding:10px;font-size:11px}a{color:#000}a:visited{color:#666}a:hover{color:#fff;background-color:#000}div.field,div.actions{margin-bottom:10px}#notice{color:green}.field_with_errors{padding:2px;background-color:red;display:table}#error_explanation{width:450px;border:2px solid red;padding:7px;padding-bottom:0;margin-bottom:20px;background-color:#f0f0f0}#error_explanation h2{text-align:left;font-weight:bold;padding:5px 5px 5px 15px;font-size:12px;margin:-7px;margin-bottom:0px;background-color:#c00;color:#fff}#error_explanation ul li{font-size:12px;list-style:square}
diff --git a/public/assets/application-00960e5186894b532975562d59176a6a.css.gz b/public/assets/application-00960e5186894b532975562d59176a6a.css.gz
new file mode 100644 (file)
index 0000000..005387e
Binary files /dev/null and b/public/assets/application-00960e5186894b532975562d59176a6a.css.gz differ
diff --git a/public/assets/application-fd525bbd17efb79c1bb774c528fe1959.js b/public/assets/application-fd525bbd17efb79c1bb774c528fe1959.js
new file mode 100644 (file)
index 0000000..31da46d
--- /dev/null
@@ -0,0 +1,19 @@
+/*!
+ * jQuery JavaScript Library v1.7.1
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Nov 21 21:11:03 2011 -0500
+ */
+(function(a,b){function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}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 m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}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 J(){return!1}function K(){return!0}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function bj(a,b){if(b.nodeType!==1||!f.hasData(a))return;var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}function bk(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bo(a){var b=c.createElement("div");return bh.appendChild(b),b.innerHTML=a.outerHTML,b.firstChild}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));return(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g)),l}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j)return j!==f[0]&&f.unshift(j),d[j]}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;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cs(){return setTimeout(ct,0),cr=f.now()}function ct(){cr=b}function cu(a,b){var c={};return f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a}),c}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"?"<!doctype html>":"")+"<html><body>"),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 cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c=a.document,d=a.navigator,e=a.location,f=function(){function I(){if(e.isReady)return;try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}e.ready()}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\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,toString=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};return e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(a==="body"&&!d&&c.body)return this.context=c,this[0]=c.body,this.selector=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?g=[null,a,null]:g=i.exec(a);if(g&&(g[1]||!d)){if(g[1])return 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),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}return this.context=c,this.selector=a,this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}return e.isFunction(a)?f.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),e.makeArray(a,this))},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return E.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();return e.isArray(a)?D.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+")"),d},each:function(a,b){return e.each(this,a,b)},ready:function(a){return e.bindReady(),A.add(a),this},eq:function(a){return a=+a,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(E.apply(this,arguments),"slice",E.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:D,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(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){return a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f),e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(A)return;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&&I()}},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):H[toString.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||C.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}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c),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(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:F?function(a){return a==null?"":F.call(a)}:function(a){return a==null?"":a.toString().replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?D.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(G)return G.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];return a.length=d,a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=E.call(arguments,2),g=function(){return a.apply(c,f.concat(E.call(arguments)))};return g.guid=a.guid=a.guid||g.guid||e.guid++,g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function d(c,d){return d&&d instanceof e&&!(d instanceof a)&&(d=a(d)),e.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())}),e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){return c=[],this},disable:function(){return c=d=e=b,this},disabled:function(){return!c},lock:function(){return d=b,(!e||e===!0)&&o.disable(),this},locked:function(){return!d},fireWith:function(b,c){return d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c)),this},fire:function(){return o.fireWith(this,arguments),this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){return i.done(a).fail(b).progress(c),this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments),this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;return i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i),i},when:function(a){function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}var b=i.call(arguments,0),c=0,d=b.length,e=new 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<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",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></: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;return 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];if(!r)return;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="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",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="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",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="<div style='width:4px;'></div>",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)}),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){return a=a.nodeType?f.cache[a[f.expando]]:a[f.expando],!!a&&!m(a)},data:function(a,c,d,e){if(!f.acceptData(a))return;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);return g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d),o&&!h[c]?g.events:(k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h,i)},removeData:function(a,b,c){if(!f.acceptData(a))return;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<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}return typeof a=="object"?this.each(function(){f.data(this,a)}):(d=a.split("."),d[1]=d[1]?"."+d[1]:"",c===b?(h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h)),h===b&&d[1]?this.data(d[0]):h):this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)}))},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){return typeof a!="string"&&(c=a,a="fx"),c===b?f.queue(this[0],a):this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){return a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);return m(),d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){return a=f.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return f.isFunction(a)?this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g)return c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type],c&&"get"in c&&(d=c.get(g,"value"))!==b?d:(d=g.value,typeof d=="string"?d.replace(q,""):d==null?"":d);return}return e=f.isFunction(a),this.each(function(d){var g=f(this),h;if(this.nodeType!==1)return;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})}}),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<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}return j&&!h.length&&i.length?f(i[g]).val():h},set:function(a,b){var c=f.makeArray(b);return f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),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)return;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}return h&&"set"in h&&i&&(g=h.set(a,d,c))!==b?g:(a.setAttribute(c,""+d),d)}return h&&"get"in h&&i&&(g=h.get(a,c))!==null?g:(g=a.getAttribute(c),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<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return w&&f.nodeName(a,"button")?w.get(a,b):b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;return h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]),d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);return e||(e=c.createAttribute(d),a.setAttributeNode(e)),e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=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);return b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)")),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)))return;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?b:f.event.dispatch.apply(i.elem,arguments)},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!g||!(o=g.events))return;b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=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;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();return c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n)),c.result}return},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;return a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];return a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey),h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(this instanceof f.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0;else return new f.Event(a,b)},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return f.event.remove(this,"._change"),z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;return g===1&&(h=e,e=function(a){return f().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++)),this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;return f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler),this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=J),this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return f(this.context).on(a,this.selector,b,c),this},die:function(a,b){return f(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;return f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.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 contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?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 v(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){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<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(l.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,toString=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\r\n/g,k=/\W/;[0,0].sort(function(){return h=!1,0});var l=function(b,d,e,f){e=e||[],d=d||c;var g=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var h,i,j,k,m,p,q,s,t=!0,u=l.isXML(d),v=[],w=b;do{a.exec(""),h=a.exec(w);if(h){w=h[3],v.push(h[1]);if(h[2]){k=h[3];break}}}while(h);if(v.length>1&&o.exec(b))if(v.length===2&&n.relative[v[0]])i=x(v[0]+v[1],d,f);else{i=n.relative[v[0]]?[d]:l(v.shift(),d);while(v.length)b=v.shift(),n.relative[b]&&(b+=v.shift()),i=x(b,i,f)}else{!f&&v.length>1&&d.nodeType===9&&!u&&n.match.ID.test(v[0])&&!n.match.ID.test(v[v.length-1])&&(m=l.find(v.shift(),d,u),d=m.expr?l.filter(m.expr,m.set)[0]:m.set[0]);if(d){m=f?{expr:v.pop(),set:r(f)}:l.find(v.pop(),v.length!==1||v[0]!=="~"&&v[0]!=="+"||!d.parentNode?d:d.parentNode,u),i=m.expr?l.filter(m.expr,m.set):m.set,v.length>0?j=r(i):t=!1;while(v.length)p=v.pop(),q=p,n.relative[p]?q=v.pop():p="",q==null&&(q=d),n.relative[p](j,q,u)}else j=v=[]}j||(j=i),j||l.error(p||b);if(toString.call(j)==="[object Array]")if(!t)e.push.apply(e,j);else if(d&&d.nodeType===1)for(s=0;j[s]!=null;s++)j[s]&&(j[s]===!0||j[s].nodeType===1&&l.contains(d,j[s]))&&e.push(i[s]);else for(s=0;j[s]!=null;s++)j[s]&&j[s].nodeType===1&&e.push(i[s]);else r(j,e);return k&&(l(k,g,e,f),l.uniqueSort(e)),e};l.uniqueSort=function(a){if(t){g=h,a.sort(t);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},l.matches=function(a,b){return l(a,null,null,b)},l.matchesSelector=function(a,b){return l(b,null,null,[a]).length>0},l.find=function(a,b,c){var d,e,f,g,h,j;if(!a)return[];for(e=0,f=n.order.length;e<f;e++){h=n.order[e];if(g=n.leftMatch[h].exec(a)){j=g[1],g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=n.find[h](g,b,c);if(d!=null){a=a.replace(n.match[h],"");break}}}}return d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]),{set:d,expr:a}},l.filter=function(a,c,d,e){var f,g,h,i,j,k,m,o,p,q=a,r=[],s=c,t=c&&c[0]&&l.isXML(c[0]);while(a&&c.length){for(h in n.filter)if((f=n.leftMatch[h].exec(a))!=null&&f[2]){k=n.filter[h],m=f[1],g=!1,f.splice(1,1);if(m.substr(m.length-1)==="\\")continue;s===r&&(r=[]);if(n.preFilter[h]){f=n.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(o=0;(j=s[o])!=null;o++)j&&(i=k(j,f,o,s),p=e^i,d&&i!=null?p?g=!0:s[o]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(n.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)l.error(a);else break;q=a}return s},l.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var m=l.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(j,"");for(a=a.firstChild;a;a=a.nextSibling)e+=m(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=m(c));return e},n=l.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!k.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&l.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!k.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&l.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=w;typeof b=="string"&&!k.test(b)&&(b=b.toLowerCase(),d=b,g=v),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=w;typeof b=="string"&&!k.test(b)&&(b=b.toLowerCase(),d=b,g=v),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||l.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]&&l.error(a[0]);return a[0]=e++,a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");return!f&&n.attrMap[g]&&(a[1]=n.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" "),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]=l(b[3],null,null,c);else{var g=l.filter(b[3],c,d,!0^f);return d||e.push.apply(e,g),!1}else if(n.match.POS.test(b[0])||n.match.CHILD.test(b[0]))return!0;return b},POS:function(a){return a.unshift(!0),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){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!l(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 b<c[3]-0},gt:function(a,b,c){return b>c[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=n.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||m([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}l.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}return j=a.nodeIndex-e,c===0?j===0:j%c===0&&j/c>=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=l.attr?l.attr(a,c):n.attrHandle[c]?n.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&l.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=n.setFilters[e];if(f)return f(a,c,b,d)}}},o=n.match.POS,p=function(a,b){return"\\"+(b-0+1)};for(var q in n.match)n.match[q]=new RegExp(n.match[q].source+/(?![^\[]*\])(?![^\(]*\))/.source),n.leftMatch[q]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[q].source.replace(/\\(\d+)/g,p));var r=function(a,b){return a=Array.prototype.slice.call(a,0),b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(s){r=function(a,b){var c=0,d=b||[];if(toString.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var t,u;c.documentElement.compareDocumentPosition?t=function(a,b){return a===b?(g=!0,0):!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:(t=function(a,b){if(a===b)return g=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return u(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return u(e[k],f[k]);return k===c?u(a,f[k],-1):u(e[k],b,1)},u=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(n.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:[]}},n.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&&(n.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 href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(n.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=l,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)return;l=function(b,e,f,g){e=e||c;if(!g&&!l.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return r(e.getElementsByTagName(b),f);if(h[2]&&n.find.CLASS&&e.getElementsByClassName)return r(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return r([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return r([],f);if(i.id===h[3])return r([i],f)}try{return r(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,m=e.getAttribute("id"),o=m||d,p=e.parentNode,q=/^\s*[+~]/.test(b);m?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),q&&p&&(e=e.parentNode);try{if(!q||p)return r(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{m||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)l[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}l.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!l.isXML(a))try{if(e||!n.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 l(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!a.getElementsByClassName||a.getElementsByClassName("e").length===0)return;a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;n.order.splice(1,0,"CLASS"),n.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}(),c.documentElement.contains?l.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?l.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:l.contains=function(){return!1},l.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var x=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=n.match.PSEUDO.exec(a))f+=d[0],a=a.replace(n.match.PSEUDO,"");a=n.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)l(a,g[h],e,c);return l.filter(f,e)};l.attr=f.attr,l.selectors.attrMap={},f.find=l,f.expr=l.selectors,f.expr[":"]=f.expr.filters,f.unique=l.uniqueSort,f.text=l.getText,f.isXMLDoc=l.isXML,f.contains=l.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=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<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}return c=c.length>1?f.unique(c):c,this.pushStack(c,"closest",a)},index:function(a){return a?typeof a=="string"?f.inArray(this[0],f(a)):f.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},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);return 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()),this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),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:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_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<div>","</div>"]),f.fn.extend({text:function(a){return f.isFunction(a)?this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))}):typeof a!="object"&&a!==b?this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a)):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){return f.isFunction(a)?this.each(function(b){f(this).wrapInner(a.call(this,b))}):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);return a.push.apply(a,this.toArray()),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);return a.push.apply(a,f.clean(arguments)),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){return a=a==null?!1:a,b=b==null?a:b,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></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){return this[0]&&this[0].parentNode?f.isFunction(a)?this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=f(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})):this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];return b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1),{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1)return e[b](this[0]),this;for(var h=0,i=e.length;h<i;h++){var j=(h>0?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])}}return d=e=null,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></$2>");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]==="<table>"&&!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<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){return arguments.length===2&&c===b?this:f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b)return k&&"get"in k&&(g=k.get(a,!1,e))!==b?g:j[c];h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c)return a.offsetWidth!==0?bC(a,b,d):(f.swap(a,bw,function(){e=bC(a,b,d)}),e)},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=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;return f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight}),c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;return 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))),c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;return 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)),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\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/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;return 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("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}}),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){return f.isFunction(d)&&(g=g||e,e=d,d=b),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){return b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b),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)return;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){return s||(d.mimeType=a),this},abort:function(a){return a=a||"abort",p&&p.abort(a),w(0,a),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){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}return v.abort(),!1},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";return 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(){return g||f.error(h+" was not called"),g[0]},b.dataTypes[0]="json","script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return f.globalEval(a),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<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";return f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c),this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);return f.isEmptyObject(a)?this.each(e.complete,[!1]):(a=f.extend({},a),e.queue===!1?this.each(g):this.queue(e.queue,g))},stop:function(a,c,d){return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)},d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a}return this.elem[this.prop]},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=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}return 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(),!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;return f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft)),{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-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();return 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,{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;return c===b?(e=this[0],e?(g=cy(e),g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]):null):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),function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType,j;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var k=d.data("ujs:submit-button");k&&(g.push(k),d.data("ujs:submit-button",null))}else d.is(c.inputChangeSelector)?(e=d.data("method"),f=d.data("url"),g=d.serialize(),d.data("params")&&(g=g+"&"+d.data("params"))):(e=d.data("method"),f=d.attr("href"),g=d.data("params")||null);return j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}},f&&(j.url=f),c.ajax(j)}return!1},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=c.attr("target"),g=a("meta[name=csrf-token]").attr("content"),h=a("meta[name=csrf-param]").attr("content"),i=a('<form method="post" action="'+d+'"></form>'),j='<input name="_method" value="'+e+'" type="hidden" />';h!==b&&g!==b&&(j+='<input name="'+h+'" value="'+g+'" type="hidden" />'),f&&i.attr("target",f),i.hide().append(j).appendTo("body"),i.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.prop("disabled",!0)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.prop("disabled",!1)})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=!0;return e!==b&&e.submit!==b&&a.each(e.submit,function(a,b){if(typeof b.handler=="function")return f=b.handler(d)}),f},disableElement:function(a){a.data("ujs:enable-with",a.html()),a.html(a.data("disable-with")),a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==b&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1)),a.unbind("click.railsDisable")}},a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}),a(document).delegate(c.linkDisableSelector,"ajax:complete",function(){c.enableElement(a(this))}),a(document).delegate(c.linkClickSelector,"click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);e.is(c.linkDisableSelector)&&c.disableElement(e);if(e.data("remote")!==b)return(d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g?!0:(c.handleRemote(e)===!1&&c.enableElement(e),!1);if(e.data
+("method"))return c.handleMethod(e),!1}),a(document).delegate(c.inputChangeSelector,"change.rails",function(b){var d=a(this);return c.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(document).delegate(c.formSubmitSelector,"submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverything(d);if(f)return h?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&a().jquery<"1.7"&&c.callFormSubmitBindings(e,d)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(document).delegate(c.formInputClickSelector,"click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(document).delegate(c.formSubmitSelector,"ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(document).delegate(c.formSubmitSelector,"ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})}(jQuery)
\ No newline at end of file
diff --git a/public/assets/application-fd525bbd17efb79c1bb774c528fe1959.js.gz b/public/assets/application-fd525bbd17efb79c1bb774c528fe1959.js.gz
new file mode 100644 (file)
index 0000000..d8dde8b
Binary files /dev/null and b/public/assets/application-fd525bbd17efb79c1bb774c528fe1959.js.gz differ
diff --git a/public/assets/application.css b/public/assets/application.css
new file mode 100644 (file)
index 0000000..5b8f3ee
--- /dev/null
@@ -0,0 +1 @@
+body{background-color:#fff;color:#333;font-family:verdana, arial, helvetica, sans-serif;font-size:13px;line-height:18px}p,ol,ul,td{font-family:verdana, arial, helvetica, sans-serif;font-size:13px;line-height:18px}pre{background-color:#eee;padding:10px;font-size:11px}a{color:#000}a:visited{color:#666}a:hover{color:#fff;background-color:#000}div.field,div.actions{margin-bottom:10px}#notice{color:green}.field_with_errors{padding:2px;background-color:red;display:table}#error_explanation{width:450px;border:2px solid red;padding:7px;padding-bottom:0;margin-bottom:20px;background-color:#f0f0f0}#error_explanation h2{text-align:left;font-weight:bold;padding:5px 5px 5px 15px;font-size:12px;margin:-7px;margin-bottom:0px;background-color:#c00;color:#fff}#error_explanation ul li{font-size:12px;list-style:square}
diff --git a/public/assets/application.css.gz b/public/assets/application.css.gz
new file mode 100644 (file)
index 0000000..b0ecaea
Binary files /dev/null and b/public/assets/application.css.gz differ
diff --git a/public/assets/application.js b/public/assets/application.js
new file mode 100644 (file)
index 0000000..31da46d
--- /dev/null
@@ -0,0 +1,19 @@
+/*!
+ * jQuery JavaScript Library v1.7.1
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Nov 21 21:11:03 2011 -0500
+ */
+(function(a,b){function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}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 m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}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 J(){return!1}function K(){return!0}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function bj(a,b){if(b.nodeType!==1||!f.hasData(a))return;var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}function bk(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bo(a){var b=c.createElement("div");return bh.appendChild(b),b.innerHTML=a.outerHTML,b.firstChild}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));return(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g)),l}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j)return j!==f[0]&&f.unshift(j),d[j]}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;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cs(){return setTimeout(ct,0),cr=f.now()}function ct(){cr=b}function cu(a,b){var c={};return f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a}),c}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"?"<!doctype html>":"")+"<html><body>"),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 cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c=a.document,d=a.navigator,e=a.location,f=function(){function I(){if(e.isReady)return;try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}e.ready()}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\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,toString=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};return e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(a==="body"&&!d&&c.body)return this.context=c,this[0]=c.body,this.selector=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?g=[null,a,null]:g=i.exec(a);if(g&&(g[1]||!d)){if(g[1])return 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),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}return this.context=c,this.selector=a,this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}return e.isFunction(a)?f.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),e.makeArray(a,this))},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return E.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();return e.isArray(a)?D.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+")"),d},each:function(a,b){return e.each(this,a,b)},ready:function(a){return e.bindReady(),A.add(a),this},eq:function(a){return a=+a,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(E.apply(this,arguments),"slice",E.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:D,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(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){return a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f),e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(A)return;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&&I()}},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):H[toString.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||C.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}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c),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(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:F?function(a){return a==null?"":F.call(a)}:function(a){return a==null?"":a.toString().replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?D.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(G)return G.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];return a.length=d,a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=E.call(arguments,2),g=function(){return a.apply(c,f.concat(E.call(arguments)))};return g.guid=a.guid=a.guid||g.guid||e.guid++,g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function d(c,d){return d&&d instanceof e&&!(d instanceof a)&&(d=a(d)),e.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())}),e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){return c=[],this},disable:function(){return c=d=e=b,this},disabled:function(){return!c},lock:function(){return d=b,(!e||e===!0)&&o.disable(),this},locked:function(){return!d},fireWith:function(b,c){return d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c)),this},fire:function(){return o.fireWith(this,arguments),this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){return i.done(a).fail(b).progress(c),this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments),this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;return i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i),i},when:function(a){function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}var b=i.call(arguments,0),c=0,d=b.length,e=new 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<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",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></: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;return 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];if(!r)return;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="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",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="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",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="<div style='width:4px;'></div>",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)}),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){return a=a.nodeType?f.cache[a[f.expando]]:a[f.expando],!!a&&!m(a)},data:function(a,c,d,e){if(!f.acceptData(a))return;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);return g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d),o&&!h[c]?g.events:(k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h,i)},removeData:function(a,b,c){if(!f.acceptData(a))return;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<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}return typeof a=="object"?this.each(function(){f.data(this,a)}):(d=a.split("."),d[1]=d[1]?"."+d[1]:"",c===b?(h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h)),h===b&&d[1]?this.data(d[0]):h):this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)}))},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){return typeof a!="string"&&(c=a,a="fx"),c===b?f.queue(this[0],a):this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){return a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);return m(),d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){return a=f.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return f.isFunction(a)?this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g)return c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type],c&&"get"in c&&(d=c.get(g,"value"))!==b?d:(d=g.value,typeof d=="string"?d.replace(q,""):d==null?"":d);return}return e=f.isFunction(a),this.each(function(d){var g=f(this),h;if(this.nodeType!==1)return;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})}}),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<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}return j&&!h.length&&i.length?f(i[g]).val():h},set:function(a,b){var c=f.makeArray(b);return f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),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)return;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}return h&&"set"in h&&i&&(g=h.set(a,d,c))!==b?g:(a.setAttribute(c,""+d),d)}return h&&"get"in h&&i&&(g=h.get(a,c))!==null?g:(g=a.getAttribute(c),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<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return w&&f.nodeName(a,"button")?w.get(a,b):b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;return h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]),d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);return e||(e=c.createAttribute(d),a.setAttributeNode(e)),e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=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);return b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)")),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)))return;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?b:f.event.dispatch.apply(i.elem,arguments)},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!g||!(o=g.events))return;b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=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;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();return c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n)),c.result}return},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;return a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];return a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey),h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(this instanceof f.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0;else return new f.Event(a,b)},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return f.event.remove(this,"._change"),z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;return g===1&&(h=e,e=function(a){return f().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++)),this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;return f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler),this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=J),this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return f(this.context).on(a,this.selector,b,c),this},die:function(a,b){return f(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;return f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.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 contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?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 v(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){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<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(l.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,toString=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\r\n/g,k=/\W/;[0,0].sort(function(){return h=!1,0});var l=function(b,d,e,f){e=e||[],d=d||c;var g=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var h,i,j,k,m,p,q,s,t=!0,u=l.isXML(d),v=[],w=b;do{a.exec(""),h=a.exec(w);if(h){w=h[3],v.push(h[1]);if(h[2]){k=h[3];break}}}while(h);if(v.length>1&&o.exec(b))if(v.length===2&&n.relative[v[0]])i=x(v[0]+v[1],d,f);else{i=n.relative[v[0]]?[d]:l(v.shift(),d);while(v.length)b=v.shift(),n.relative[b]&&(b+=v.shift()),i=x(b,i,f)}else{!f&&v.length>1&&d.nodeType===9&&!u&&n.match.ID.test(v[0])&&!n.match.ID.test(v[v.length-1])&&(m=l.find(v.shift(),d,u),d=m.expr?l.filter(m.expr,m.set)[0]:m.set[0]);if(d){m=f?{expr:v.pop(),set:r(f)}:l.find(v.pop(),v.length!==1||v[0]!=="~"&&v[0]!=="+"||!d.parentNode?d:d.parentNode,u),i=m.expr?l.filter(m.expr,m.set):m.set,v.length>0?j=r(i):t=!1;while(v.length)p=v.pop(),q=p,n.relative[p]?q=v.pop():p="",q==null&&(q=d),n.relative[p](j,q,u)}else j=v=[]}j||(j=i),j||l.error(p||b);if(toString.call(j)==="[object Array]")if(!t)e.push.apply(e,j);else if(d&&d.nodeType===1)for(s=0;j[s]!=null;s++)j[s]&&(j[s]===!0||j[s].nodeType===1&&l.contains(d,j[s]))&&e.push(i[s]);else for(s=0;j[s]!=null;s++)j[s]&&j[s].nodeType===1&&e.push(i[s]);else r(j,e);return k&&(l(k,g,e,f),l.uniqueSort(e)),e};l.uniqueSort=function(a){if(t){g=h,a.sort(t);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},l.matches=function(a,b){return l(a,null,null,b)},l.matchesSelector=function(a,b){return l(b,null,null,[a]).length>0},l.find=function(a,b,c){var d,e,f,g,h,j;if(!a)return[];for(e=0,f=n.order.length;e<f;e++){h=n.order[e];if(g=n.leftMatch[h].exec(a)){j=g[1],g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=n.find[h](g,b,c);if(d!=null){a=a.replace(n.match[h],"");break}}}}return d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]),{set:d,expr:a}},l.filter=function(a,c,d,e){var f,g,h,i,j,k,m,o,p,q=a,r=[],s=c,t=c&&c[0]&&l.isXML(c[0]);while(a&&c.length){for(h in n.filter)if((f=n.leftMatch[h].exec(a))!=null&&f[2]){k=n.filter[h],m=f[1],g=!1,f.splice(1,1);if(m.substr(m.length-1)==="\\")continue;s===r&&(r=[]);if(n.preFilter[h]){f=n.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(o=0;(j=s[o])!=null;o++)j&&(i=k(j,f,o,s),p=e^i,d&&i!=null?p?g=!0:s[o]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(n.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)l.error(a);else break;q=a}return s},l.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var m=l.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(j,"");for(a=a.firstChild;a;a=a.nextSibling)e+=m(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=m(c));return e},n=l.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!k.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&l.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!k.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&l.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=w;typeof b=="string"&&!k.test(b)&&(b=b.toLowerCase(),d=b,g=v),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=w;typeof b=="string"&&!k.test(b)&&(b=b.toLowerCase(),d=b,g=v),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||l.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]&&l.error(a[0]);return a[0]=e++,a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");return!f&&n.attrMap[g]&&(a[1]=n.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" "),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]=l(b[3],null,null,c);else{var g=l.filter(b[3],c,d,!0^f);return d||e.push.apply(e,g),!1}else if(n.match.POS.test(b[0])||n.match.CHILD.test(b[0]))return!0;return b},POS:function(a){return a.unshift(!0),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){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!l(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 b<c[3]-0},gt:function(a,b,c){return b>c[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=n.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||m([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}l.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}return j=a.nodeIndex-e,c===0?j===0:j%c===0&&j/c>=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=l.attr?l.attr(a,c):n.attrHandle[c]?n.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&l.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=n.setFilters[e];if(f)return f(a,c,b,d)}}},o=n.match.POS,p=function(a,b){return"\\"+(b-0+1)};for(var q in n.match)n.match[q]=new RegExp(n.match[q].source+/(?![^\[]*\])(?![^\(]*\))/.source),n.leftMatch[q]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[q].source.replace(/\\(\d+)/g,p));var r=function(a,b){return a=Array.prototype.slice.call(a,0),b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(s){r=function(a,b){var c=0,d=b||[];if(toString.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var t,u;c.documentElement.compareDocumentPosition?t=function(a,b){return a===b?(g=!0,0):!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:(t=function(a,b){if(a===b)return g=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return u(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return u(e[k],f[k]);return k===c?u(a,f[k],-1):u(e[k],b,1)},u=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(n.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:[]}},n.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&&(n.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 href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(n.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=l,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)return;l=function(b,e,f,g){e=e||c;if(!g&&!l.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return r(e.getElementsByTagName(b),f);if(h[2]&&n.find.CLASS&&e.getElementsByClassName)return r(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return r([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return r([],f);if(i.id===h[3])return r([i],f)}try{return r(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,m=e.getAttribute("id"),o=m||d,p=e.parentNode,q=/^\s*[+~]/.test(b);m?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),q&&p&&(e=e.parentNode);try{if(!q||p)return r(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{m||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)l[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}l.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!l.isXML(a))try{if(e||!n.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 l(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!a.getElementsByClassName||a.getElementsByClassName("e").length===0)return;a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;n.order.splice(1,0,"CLASS"),n.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}(),c.documentElement.contains?l.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?l.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:l.contains=function(){return!1},l.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var x=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=n.match.PSEUDO.exec(a))f+=d[0],a=a.replace(n.match.PSEUDO,"");a=n.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)l(a,g[h],e,c);return l.filter(f,e)};l.attr=f.attr,l.selectors.attrMap={},f.find=l,f.expr=l.selectors,f.expr[":"]=f.expr.filters,f.unique=l.uniqueSort,f.text=l.getText,f.isXMLDoc=l.isXML,f.contains=l.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=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<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}return c=c.length>1?f.unique(c):c,this.pushStack(c,"closest",a)},index:function(a){return a?typeof a=="string"?f.inArray(this[0],f(a)):f.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},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);return 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()),this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),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:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_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<div>","</div>"]),f.fn.extend({text:function(a){return f.isFunction(a)?this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))}):typeof a!="object"&&a!==b?this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a)):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){return f.isFunction(a)?this.each(function(b){f(this).wrapInner(a.call(this,b))}):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);return a.push.apply(a,this.toArray()),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);return a.push.apply(a,f.clean(arguments)),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){return a=a==null?!1:a,b=b==null?a:b,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></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){return this[0]&&this[0].parentNode?f.isFunction(a)?this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=f(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})):this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];return b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1),{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1)return e[b](this[0]),this;for(var h=0,i=e.length;h<i;h++){var j=(h>0?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])}}return d=e=null,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></$2>");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]==="<table>"&&!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<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){return arguments.length===2&&c===b?this:f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b)return k&&"get"in k&&(g=k.get(a,!1,e))!==b?g:j[c];h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c)return a.offsetWidth!==0?bC(a,b,d):(f.swap(a,bw,function(){e=bC(a,b,d)}),e)},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=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;return f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight}),c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;return 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))),c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;return 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)),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\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/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;return 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("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}}),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){return f.isFunction(d)&&(g=g||e,e=d,d=b),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){return b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b),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)return;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){return s||(d.mimeType=a),this},abort:function(a){return a=a||"abort",p&&p.abort(a),w(0,a),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){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}return v.abort(),!1},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";return 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(){return g||f.error(h+" was not called"),g[0]},b.dataTypes[0]="json","script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return f.globalEval(a),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<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";return f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c),this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);return f.isEmptyObject(a)?this.each(e.complete,[!1]):(a=f.extend({},a),e.queue===!1?this.each(g):this.queue(e.queue,g))},stop:function(a,c,d){return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)},d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a}return this.elem[this.prop]},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=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}return 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(),!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;return f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft)),{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-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();return 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,{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;return c===b?(e=this[0],e?(g=cy(e),g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]):null):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),function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType,j;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var k=d.data("ujs:submit-button");k&&(g.push(k),d.data("ujs:submit-button",null))}else d.is(c.inputChangeSelector)?(e=d.data("method"),f=d.data("url"),g=d.serialize(),d.data("params")&&(g=g+"&"+d.data("params"))):(e=d.data("method"),f=d.attr("href"),g=d.data("params")||null);return j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}},f&&(j.url=f),c.ajax(j)}return!1},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=c.attr("target"),g=a("meta[name=csrf-token]").attr("content"),h=a("meta[name=csrf-param]").attr("content"),i=a('<form method="post" action="'+d+'"></form>'),j='<input name="_method" value="'+e+'" type="hidden" />';h!==b&&g!==b&&(j+='<input name="'+h+'" value="'+g+'" type="hidden" />'),f&&i.attr("target",f),i.hide().append(j).appendTo("body"),i.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.prop("disabled",!0)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.prop("disabled",!1)})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=!0;return e!==b&&e.submit!==b&&a.each(e.submit,function(a,b){if(typeof b.handler=="function")return f=b.handler(d)}),f},disableElement:function(a){a.data("ujs:enable-with",a.html()),a.html(a.data("disable-with")),a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==b&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1)),a.unbind("click.railsDisable")}},a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}),a(document).delegate(c.linkDisableSelector,"ajax:complete",function(){c.enableElement(a(this))}),a(document).delegate(c.linkClickSelector,"click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);e.is(c.linkDisableSelector)&&c.disableElement(e);if(e.data("remote")!==b)return(d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g?!0:(c.handleRemote(e)===!1&&c.enableElement(e),!1);if(e.data
+("method"))return c.handleMethod(e),!1}),a(document).delegate(c.inputChangeSelector,"change.rails",function(b){var d=a(this);return c.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(document).delegate(c.formSubmitSelector,"submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverything(d);if(f)return h?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&a().jquery<"1.7"&&c.callFormSubmitBindings(e,d)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(document).delegate(c.formInputClickSelector,"click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(document).delegate(c.formSubmitSelector,"ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(document).delegate(c.formSubmitSelector,"ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})}(jQuery)
\ No newline at end of file
diff --git a/public/assets/application.js.gz b/public/assets/application.js.gz
new file mode 100644 (file)
index 0000000..21eb736
Binary files /dev/null and b/public/assets/application.js.gz differ
diff --git a/public/assets/manifest.yml b/public/assets/manifest.yml
new file mode 100644 (file)
index 0000000..613aefc
--- /dev/null
@@ -0,0 +1,4 @@
+---
+rails.png: rails-e4b51606cd77fda2615e7439907bfc92.png
+application.js: application-fd525bbd17efb79c1bb774c528fe1959.js
+application.css: application-00960e5186894b532975562d59176a6a.css
diff --git a/public/assets/rails-e4b51606cd77fda2615e7439907bfc92.png b/public/assets/rails-e4b51606cd77fda2615e7439907bfc92.png
new file mode 100644 (file)
index 0000000..d5edc04
Binary files /dev/null and b/public/assets/rails-e4b51606cd77fda2615e7439907bfc92.png differ
diff --git a/public/assets/rails.png b/public/assets/rails.png
new file mode 100644 (file)
index 0000000..d5edc04
Binary files /dev/null and b/public/assets/rails.png differ
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644 (file)
index 0000000..085187f
--- /dev/null
@@ -0,0 +1,5 @@
+# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-Agent: *
+# Disallow: /
diff --git a/script/cucumber b/script/cucumber
new file mode 100644 (file)
index 0000000..7fa5c92
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env ruby
+
+vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
+if vendored_cucumber_bin
+  load File.expand_path(vendored_cucumber_bin)
+else
+  require 'rubygems' unless ENV['NO_RUBYGEMS']
+  require 'cucumber'
+  load Cucumber::BINARY
+end
diff --git a/script/encode64.rb b/script/encode64.rb
new file mode 100644 (file)
index 0000000..0519f4c
--- /dev/null
@@ -0,0 +1,10 @@
+require 'base64'\r
+d = nil\r
+File.open(ARGV[0], 'rb') do |f|\r
+  d = f.read\r
+end\r
+b = Base64.encode64 d\r
+File.open(ARGV[1], 'wb') do |f|\r
+  f.write b\r
+end\r
+\r
diff --git a/script/rails b/script/rails
new file mode 100644 (file)
index 0000000..81eab02
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby.exe
+# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+
+APP_PATH = File.expand_path('../../config/application',  __FILE__)
+require File.expand_path('../../config/boot',  __FILE__)
+require 'rails/commands'
diff --git a/spec/controllers/admins/sessions_controller_spec.rb b/spec/controllers/admins/sessions_controller_spec.rb
new file mode 100644 (file)
index 0000000..9f303bf
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Admins::SessionsController do
+
+end
diff --git a/spec/controllers/artists_controller_spec.rb b/spec/controllers/artists_controller_spec.rb
new file mode 100644 (file)
index 0000000..ea5123d
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe ArtistsController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # Artist. As you add validations to Artist, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all artists as @artists" do
+      artist = Artist.create! valid_attributes
+      get :index
+      assigns(:artists).should eq([artist])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested artist as @artist" do
+      artist = Artist.create! valid_attributes
+      get :show, :id => artist.id
+      assigns(:artist).should eq(artist)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new artist as @artist" do
+      get :new
+      assigns(:artist).should be_a_new(Artist)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested artist as @artist" do
+      artist = Artist.create! valid_attributes
+      get :edit, :id => artist.id
+      assigns(:artist).should eq(artist)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new Artist" do
+        expect {
+          post :create, :artist => valid_attributes
+        }.to change(Artist, :count).by(1)
+      end
+
+      it "assigns a newly created artist as @artist" do
+        post :create, :artist => valid_attributes
+        assigns(:artist).should be_a(Artist)
+        assigns(:artist).should be_persisted
+      end
+
+      it "redirects to the created artist" do
+        post :create, :artist => valid_attributes
+        response.should redirect_to(Artist.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved artist as @artist" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Artist.any_instance.stub(:save).and_return(false)
+        post :create, :artist => {}
+        assigns(:artist).should be_a_new(Artist)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Artist.any_instance.stub(:save).and_return(false)
+        post :create, :artist => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested artist" do
+        artist = Artist.create! valid_attributes
+        # Assuming there are no other artists in the database, this
+        # specifies that the Artist created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        Artist.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => artist.id, :artist => {'these' => 'params'}
+      end
+
+      it "assigns the requested artist as @artist" do
+        artist = Artist.create! valid_attributes
+        put :update, :id => artist.id, :artist => valid_attributes
+        assigns(:artist).should eq(artist)
+      end
+
+      it "redirects to the artist" do
+        artist = Artist.create! valid_attributes
+        put :update, :id => artist.id, :artist => valid_attributes
+        response.should redirect_to(artist)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the artist as @artist" do
+        artist = Artist.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Artist.any_instance.stub(:save).and_return(false)
+        put :update, :id => artist.id, :artist => {}
+        assigns(:artist).should eq(artist)
+      end
+
+      it "re-renders the 'edit' template" do
+        artist = Artist.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Artist.any_instance.stub(:save).and_return(false)
+        put :update, :id => artist.id, :artist => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested artist" do
+      artist = Artist.create! valid_attributes
+      expect {
+        delete :destroy, :id => artist.id
+      }.to change(Artist, :count).by(-1)
+    end
+
+    it "redirects to the artists list" do
+      artist = Artist.create! valid_attributes
+      delete :destroy, :id => artist.id
+      response.should redirect_to(artists_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/authors/sessions_controller_spec.rb b/spec/controllers/authors/sessions_controller_spec.rb
new file mode 100644 (file)
index 0000000..0982484
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Authors::SessionsController do
+
+end
diff --git a/spec/controllers/baloon_templates_controller_spec.rb b/spec/controllers/baloon_templates_controller_spec.rb
new file mode 100644 (file)
index 0000000..34c2897
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe BaloonTemplatesController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # BaloonTemplate. As you add validations to BaloonTemplate, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all baloon_templates as @baloon_templates" do
+      baloon_template = BaloonTemplate.create! valid_attributes
+      get :index
+      assigns(:baloon_templates).should eq([baloon_template])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested baloon_template as @baloon_template" do
+      baloon_template = BaloonTemplate.create! valid_attributes
+      get :show, :id => baloon_template.id
+      assigns(:baloon_template).should eq(baloon_template)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new baloon_template as @baloon_template" do
+      get :new
+      assigns(:baloon_template).should be_a_new(BaloonTemplate)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested baloon_template as @baloon_template" do
+      baloon_template = BaloonTemplate.create! valid_attributes
+      get :edit, :id => baloon_template.id
+      assigns(:baloon_template).should eq(baloon_template)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new BaloonTemplate" do
+        expect {
+          post :create, :baloon_template => valid_attributes
+        }.to change(BaloonTemplate, :count).by(1)
+      end
+
+      it "assigns a newly created baloon_template as @baloon_template" do
+        post :create, :baloon_template => valid_attributes
+        assigns(:baloon_template).should be_a(BaloonTemplate)
+        assigns(:baloon_template).should be_persisted
+      end
+
+      it "redirects to the created baloon_template" do
+        post :create, :baloon_template => valid_attributes
+        response.should redirect_to(BaloonTemplate.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved baloon_template as @baloon_template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        BaloonTemplate.any_instance.stub(:save).and_return(false)
+        post :create, :baloon_template => {}
+        assigns(:baloon_template).should be_a_new(BaloonTemplate)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        BaloonTemplate.any_instance.stub(:save).and_return(false)
+        post :create, :baloon_template => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested baloon_template" do
+        baloon_template = BaloonTemplate.create! valid_attributes
+        # Assuming there are no other baloon_templates in the database, this
+        # specifies that the BaloonTemplate created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        BaloonTemplate.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => baloon_template.id, :baloon_template => {'these' => 'params'}
+      end
+
+      it "assigns the requested baloon_template as @baloon_template" do
+        baloon_template = BaloonTemplate.create! valid_attributes
+        put :update, :id => baloon_template.id, :baloon_template => valid_attributes
+        assigns(:baloon_template).should eq(baloon_template)
+      end
+
+      it "redirects to the baloon_template" do
+        baloon_template = BaloonTemplate.create! valid_attributes
+        put :update, :id => baloon_template.id, :baloon_template => valid_attributes
+        response.should redirect_to(baloon_template)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the baloon_template as @baloon_template" do
+        baloon_template = BaloonTemplate.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        BaloonTemplate.any_instance.stub(:save).and_return(false)
+        put :update, :id => baloon_template.id, :baloon_template => {}
+        assigns(:baloon_template).should eq(baloon_template)
+      end
+
+      it "re-renders the 'edit' template" do
+        baloon_template = BaloonTemplate.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        BaloonTemplate.any_instance.stub(:save).and_return(false)
+        put :update, :id => baloon_template.id, :baloon_template => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested baloon_template" do
+      baloon_template = BaloonTemplate.create! valid_attributes
+      expect {
+        delete :destroy, :id => baloon_template.id
+      }.to change(BaloonTemplate, :count).by(-1)
+    end
+
+    it "redirects to the baloon_templates list" do
+      baloon_template = BaloonTemplate.create! valid_attributes
+      delete :destroy, :id => baloon_template.id
+      response.should redirect_to(baloon_templates_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/baloon_types_controller_spec.rb b/spec/controllers/baloon_types_controller_spec.rb
new file mode 100644 (file)
index 0000000..f24963e
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe BaloonTypesController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # BaloonType. As you add validations to BaloonType, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all baloon_types as @baloon_types" do
+      baloon_type = BaloonType.create! valid_attributes
+      get :index
+      assigns(:baloon_types).should eq([baloon_type])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested baloon_type as @baloon_type" do
+      baloon_type = BaloonType.create! valid_attributes
+      get :show, :id => baloon_type.id
+      assigns(:baloon_type).should eq(baloon_type)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new baloon_type as @baloon_type" do
+      get :new
+      assigns(:baloon_type).should be_a_new(BaloonType)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested baloon_type as @baloon_type" do
+      baloon_type = BaloonType.create! valid_attributes
+      get :edit, :id => baloon_type.id
+      assigns(:baloon_type).should eq(baloon_type)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new BaloonType" do
+        expect {
+          post :create, :baloon_type => valid_attributes
+        }.to change(BaloonType, :count).by(1)
+      end
+
+      it "assigns a newly created baloon_type as @baloon_type" do
+        post :create, :baloon_type => valid_attributes
+        assigns(:baloon_type).should be_a(BaloonType)
+        assigns(:baloon_type).should be_persisted
+      end
+
+      it "redirects to the created baloon_type" do
+        post :create, :baloon_type => valid_attributes
+        response.should redirect_to(BaloonType.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved baloon_type as @baloon_type" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        BaloonType.any_instance.stub(:save).and_return(false)
+        post :create, :baloon_type => {}
+        assigns(:baloon_type).should be_a_new(BaloonType)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        BaloonType.any_instance.stub(:save).and_return(false)
+        post :create, :baloon_type => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested baloon_type" do
+        baloon_type = BaloonType.create! valid_attributes
+        # Assuming there are no other baloon_types in the database, this
+        # specifies that the BaloonType created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        BaloonType.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => baloon_type.id, :baloon_type => {'these' => 'params'}
+      end
+
+      it "assigns the requested baloon_type as @baloon_type" do
+        baloon_type = BaloonType.create! valid_attributes
+        put :update, :id => baloon_type.id, :baloon_type => valid_attributes
+        assigns(:baloon_type).should eq(baloon_type)
+      end
+
+      it "redirects to the baloon_type" do
+        baloon_type = BaloonType.create! valid_attributes
+        put :update, :id => baloon_type.id, :baloon_type => valid_attributes
+        response.should redirect_to(baloon_type)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the baloon_type as @baloon_type" do
+        baloon_type = BaloonType.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        BaloonType.any_instance.stub(:save).and_return(false)
+        put :update, :id => baloon_type.id, :baloon_type => {}
+        assigns(:baloon_type).should eq(baloon_type)
+      end
+
+      it "re-renders the 'edit' template" do
+        baloon_type = BaloonType.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        BaloonType.any_instance.stub(:save).and_return(false)
+        put :update, :id => baloon_type.id, :baloon_type => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested baloon_type" do
+      baloon_type = BaloonType.create! valid_attributes
+      expect {
+        delete :destroy, :id => baloon_type.id
+      }.to change(BaloonType, :count).by(-1)
+    end
+
+    it "redirects to the baloon_types list" do
+      baloon_type = BaloonType.create! valid_attributes
+      delete :destroy, :id => baloon_type.id
+      response.should redirect_to(baloon_types_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/baloons_controller_spec.rb b/spec/controllers/baloons_controller_spec.rb
new file mode 100644 (file)
index 0000000..a8a461f
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe BaloonsController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # Baloon. As you add validations to Baloon, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all baloons as @baloons" do
+      baloon = Baloon.create! valid_attributes
+      get :index
+      assigns(:baloons).should eq([baloon])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested baloon as @baloon" do
+      baloon = Baloon.create! valid_attributes
+      get :show, :id => baloon.id
+      assigns(:baloon).should eq(baloon)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new baloon as @baloon" do
+      get :new
+      assigns(:baloon).should be_a_new(Baloon)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested baloon as @baloon" do
+      baloon = Baloon.create! valid_attributes
+      get :edit, :id => baloon.id
+      assigns(:baloon).should eq(baloon)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new Baloon" do
+        expect {
+          post :create, :baloon => valid_attributes
+        }.to change(Baloon, :count).by(1)
+      end
+
+      it "assigns a newly created baloon as @baloon" do
+        post :create, :baloon => valid_attributes
+        assigns(:baloon).should be_a(Baloon)
+        assigns(:baloon).should be_persisted
+      end
+
+      it "redirects to the created baloon" do
+        post :create, :baloon => valid_attributes
+        response.should redirect_to(Baloon.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved baloon as @baloon" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Baloon.any_instance.stub(:save).and_return(false)
+        post :create, :baloon => {}
+        assigns(:baloon).should be_a_new(Baloon)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Baloon.any_instance.stub(:save).and_return(false)
+        post :create, :baloon => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested baloon" do
+        baloon = Baloon.create! valid_attributes
+        # Assuming there are no other baloons in the database, this
+        # specifies that the Baloon created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        Baloon.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => baloon.id, :baloon => {'these' => 'params'}
+      end
+
+      it "assigns the requested baloon as @baloon" do
+        baloon = Baloon.create! valid_attributes
+        put :update, :id => baloon.id, :baloon => valid_attributes
+        assigns(:baloon).should eq(baloon)
+      end
+
+      it "redirects to the baloon" do
+        baloon = Baloon.create! valid_attributes
+        put :update, :id => baloon.id, :baloon => valid_attributes
+        response.should redirect_to(baloon)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the baloon as @baloon" do
+        baloon = Baloon.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Baloon.any_instance.stub(:save).and_return(false)
+        put :update, :id => baloon.id, :baloon => {}
+        assigns(:baloon).should eq(baloon)
+      end
+
+      it "re-renders the 'edit' template" do
+        baloon = Baloon.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Baloon.any_instance.stub(:save).and_return(false)
+        put :update, :id => baloon.id, :baloon => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested baloon" do
+      baloon = Baloon.create! valid_attributes
+      expect {
+        delete :destroy, :id => baloon.id
+      }.to change(Baloon, :count).by(-1)
+    end
+
+    it "redirects to the baloons list" do
+      baloon = Baloon.create! valid_attributes
+      delete :destroy, :id => baloon.id
+      response.should redirect_to(baloons_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/comics_controller_spec.rb b/spec/controllers/comics_controller_spec.rb
new file mode 100644 (file)
index 0000000..7a11c89
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe ComicsController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # Comic. As you add validations to Comic, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all comics as @comics" do
+      comic = Comic.create! valid_attributes
+      get :index
+      assigns(:comics).should eq([comic])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested comic as @comic" do
+      comic = Comic.create! valid_attributes
+      get :show, :id => comic.id
+      assigns(:comic).should eq(comic)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new comic as @comic" do
+      get :new
+      assigns(:comic).should be_a_new(Comic)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested comic as @comic" do
+      comic = Comic.create! valid_attributes
+      get :edit, :id => comic.id
+      assigns(:comic).should eq(comic)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new Comic" do
+        expect {
+          post :create, :comic => valid_attributes
+        }.to change(Comic, :count).by(1)
+      end
+
+      it "assigns a newly created comic as @comic" do
+        post :create, :comic => valid_attributes
+        assigns(:comic).should be_a(Comic)
+        assigns(:comic).should be_persisted
+      end
+
+      it "redirects to the created comic" do
+        post :create, :comic => valid_attributes
+        response.should redirect_to(Comic.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved comic as @comic" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Comic.any_instance.stub(:save).and_return(false)
+        post :create, :comic => {}
+        assigns(:comic).should be_a_new(Comic)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Comic.any_instance.stub(:save).and_return(false)
+        post :create, :comic => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested comic" do
+        comic = Comic.create! valid_attributes
+        # Assuming there are no other comics in the database, this
+        # specifies that the Comic created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        Comic.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => comic.id, :comic => {'these' => 'params'}
+      end
+
+      it "assigns the requested comic as @comic" do
+        comic = Comic.create! valid_attributes
+        put :update, :id => comic.id, :comic => valid_attributes
+        assigns(:comic).should eq(comic)
+      end
+
+      it "redirects to the comic" do
+        comic = Comic.create! valid_attributes
+        put :update, :id => comic.id, :comic => valid_attributes
+        response.should redirect_to(comic)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the comic as @comic" do
+        comic = Comic.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Comic.any_instance.stub(:save).and_return(false)
+        put :update, :id => comic.id, :comic => {}
+        assigns(:comic).should eq(comic)
+      end
+
+      it "re-renders the 'edit' template" do
+        comic = Comic.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Comic.any_instance.stub(:save).and_return(false)
+        put :update, :id => comic.id, :comic => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested comic" do
+      comic = Comic.create! valid_attributes
+      expect {
+        delete :destroy, :id => comic.id
+      }.to change(Comic, :count).by(-1)
+    end
+
+    it "redirects to the comics list" do
+      comic = Comic.create! valid_attributes
+      delete :destroy, :id => comic.id
+      response.should redirect_to(comics_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/common_lisences_controller_spec.rb b/spec/controllers/common_lisences_controller_spec.rb
new file mode 100644 (file)
index 0000000..b0889e1
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe CommonLisencesController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # CommonLisence. As you add validations to CommonLisence, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all common_lisences as @common_lisences" do
+      common_lisence = CommonLisence.create! valid_attributes
+      get :index
+      assigns(:common_lisences).should eq([common_lisence])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested common_lisence as @common_lisence" do
+      common_lisence = CommonLisence.create! valid_attributes
+      get :show, :id => common_lisence.id
+      assigns(:common_lisence).should eq(common_lisence)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new common_lisence as @common_lisence" do
+      get :new
+      assigns(:common_lisence).should be_a_new(CommonLisence)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested common_lisence as @common_lisence" do
+      common_lisence = CommonLisence.create! valid_attributes
+      get :edit, :id => common_lisence.id
+      assigns(:common_lisence).should eq(common_lisence)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new CommonLisence" do
+        expect {
+          post :create, :common_lisence => valid_attributes
+        }.to change(CommonLisence, :count).by(1)
+      end
+
+      it "assigns a newly created common_lisence as @common_lisence" do
+        post :create, :common_lisence => valid_attributes
+        assigns(:common_lisence).should be_a(CommonLisence)
+        assigns(:common_lisence).should be_persisted
+      end
+
+      it "redirects to the created common_lisence" do
+        post :create, :common_lisence => valid_attributes
+        response.should redirect_to(CommonLisence.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved common_lisence as @common_lisence" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        CommonLisence.any_instance.stub(:save).and_return(false)
+        post :create, :common_lisence => {}
+        assigns(:common_lisence).should be_a_new(CommonLisence)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        CommonLisence.any_instance.stub(:save).and_return(false)
+        post :create, :common_lisence => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested common_lisence" do
+        common_lisence = CommonLisence.create! valid_attributes
+        # Assuming there are no other common_lisences in the database, this
+        # specifies that the CommonLisence created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        CommonLisence.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => common_lisence.id, :common_lisence => {'these' => 'params'}
+      end
+
+      it "assigns the requested common_lisence as @common_lisence" do
+        common_lisence = CommonLisence.create! valid_attributes
+        put :update, :id => common_lisence.id, :common_lisence => valid_attributes
+        assigns(:common_lisence).should eq(common_lisence)
+      end
+
+      it "redirects to the common_lisence" do
+        common_lisence = CommonLisence.create! valid_attributes
+        put :update, :id => common_lisence.id, :common_lisence => valid_attributes
+        response.should redirect_to(common_lisence)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the common_lisence as @common_lisence" do
+        common_lisence = CommonLisence.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        CommonLisence.any_instance.stub(:save).and_return(false)
+        put :update, :id => common_lisence.id, :common_lisence => {}
+        assigns(:common_lisence).should eq(common_lisence)
+      end
+
+      it "re-renders the 'edit' template" do
+        common_lisence = CommonLisence.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        CommonLisence.any_instance.stub(:save).and_return(false)
+        put :update, :id => common_lisence.id, :common_lisence => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested common_lisence" do
+      common_lisence = CommonLisence.create! valid_attributes
+      expect {
+        delete :destroy, :id => common_lisence.id
+      }.to change(CommonLisence, :count).by(-1)
+    end
+
+    it "redirects to the common_lisences list" do
+      common_lisence = CommonLisence.create! valid_attributes
+      delete :destroy, :id => common_lisence.id
+      response.should redirect_to(common_lisences_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb
new file mode 100644 (file)
index 0000000..54cdcf5
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe HelpController do
+
+end
diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb
new file mode 100644 (file)
index 0000000..9d48b6a
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe HomeController do
+
+end
diff --git a/spec/controllers/lisences_controller_spec.rb b/spec/controllers/lisences_controller_spec.rb
new file mode 100644 (file)
index 0000000..3172fd3
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe LisencesController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # Lisence. As you add validations to Lisence, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all lisences as @lisences" do
+      lisence = Lisence.create! valid_attributes
+      get :index
+      assigns(:lisences).should eq([lisence])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested lisence as @lisence" do
+      lisence = Lisence.create! valid_attributes
+      get :show, :id => lisence.id
+      assigns(:lisence).should eq(lisence)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new lisence as @lisence" do
+      get :new
+      assigns(:lisence).should be_a_new(Lisence)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested lisence as @lisence" do
+      lisence = Lisence.create! valid_attributes
+      get :edit, :id => lisence.id
+      assigns(:lisence).should eq(lisence)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new Lisence" do
+        expect {
+          post :create, :lisence => valid_attributes
+        }.to change(Lisence, :count).by(1)
+      end
+
+      it "assigns a newly created lisence as @lisence" do
+        post :create, :lisence => valid_attributes
+        assigns(:lisence).should be_a(Lisence)
+        assigns(:lisence).should be_persisted
+      end
+
+      it "redirects to the created lisence" do
+        post :create, :lisence => valid_attributes
+        response.should redirect_to(Lisence.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved lisence as @lisence" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Lisence.any_instance.stub(:save).and_return(false)
+        post :create, :lisence => {}
+        assigns(:lisence).should be_a_new(Lisence)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Lisence.any_instance.stub(:save).and_return(false)
+        post :create, :lisence => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested lisence" do
+        lisence = Lisence.create! valid_attributes
+        # Assuming there are no other lisences in the database, this
+        # specifies that the Lisence created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        Lisence.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => lisence.id, :lisence => {'these' => 'params'}
+      end
+
+      it "assigns the requested lisence as @lisence" do
+        lisence = Lisence.create! valid_attributes
+        put :update, :id => lisence.id, :lisence => valid_attributes
+        assigns(:lisence).should eq(lisence)
+      end
+
+      it "redirects to the lisence" do
+        lisence = Lisence.create! valid_attributes
+        put :update, :id => lisence.id, :lisence => valid_attributes
+        response.should redirect_to(lisence)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the lisence as @lisence" do
+        lisence = Lisence.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Lisence.any_instance.stub(:save).and_return(false)
+        put :update, :id => lisence.id, :lisence => {}
+        assigns(:lisence).should eq(lisence)
+      end
+
+      it "re-renders the 'edit' template" do
+        lisence = Lisence.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Lisence.any_instance.stub(:save).and_return(false)
+        put :update, :id => lisence.id, :lisence => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested lisence" do
+      lisence = Lisence.create! valid_attributes
+      expect {
+        delete :destroy, :id => lisence.id
+      }.to change(Lisence, :count).by(-1)
+    end
+
+    it "redirects to the lisences list" do
+      lisence = Lisence.create! valid_attributes
+      delete :destroy, :id => lisence.id
+      response.should redirect_to(lisences_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/original_lisences_controller_spec.rb b/spec/controllers/original_lisences_controller_spec.rb
new file mode 100644 (file)
index 0000000..ecd6f09
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe OriginalLisencesController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # OriginalLisence. As you add validations to OriginalLisence, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all original_lisences as @original_lisences" do
+      original_lisence = OriginalLisence.create! valid_attributes
+      get :index
+      assigns(:original_lisences).should eq([original_lisence])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested original_lisence as @original_lisence" do
+      original_lisence = OriginalLisence.create! valid_attributes
+      get :show, :id => original_lisence.id
+      assigns(:original_lisence).should eq(original_lisence)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new original_lisence as @original_lisence" do
+      get :new
+      assigns(:original_lisence).should be_a_new(OriginalLisence)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested original_lisence as @original_lisence" do
+      original_lisence = OriginalLisence.create! valid_attributes
+      get :edit, :id => original_lisence.id
+      assigns(:original_lisence).should eq(original_lisence)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new OriginalLisence" do
+        expect {
+          post :create, :original_lisence => valid_attributes
+        }.to change(OriginalLisence, :count).by(1)
+      end
+
+      it "assigns a newly created original_lisence as @original_lisence" do
+        post :create, :original_lisence => valid_attributes
+        assigns(:original_lisence).should be_a(OriginalLisence)
+        assigns(:original_lisence).should be_persisted
+      end
+
+      it "redirects to the created original_lisence" do
+        post :create, :original_lisence => valid_attributes
+        response.should redirect_to(OriginalLisence.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved original_lisence as @original_lisence" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        OriginalLisence.any_instance.stub(:save).and_return(false)
+        post :create, :original_lisence => {}
+        assigns(:original_lisence).should be_a_new(OriginalLisence)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        OriginalLisence.any_instance.stub(:save).and_return(false)
+        post :create, :original_lisence => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested original_lisence" do
+        original_lisence = OriginalLisence.create! valid_attributes
+        # Assuming there are no other original_lisences in the database, this
+        # specifies that the OriginalLisence created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        OriginalLisence.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => original_lisence.id, :original_lisence => {'these' => 'params'}
+      end
+
+      it "assigns the requested original_lisence as @original_lisence" do
+        original_lisence = OriginalLisence.create! valid_attributes
+        put :update, :id => original_lisence.id, :original_lisence => valid_attributes
+        assigns(:original_lisence).should eq(original_lisence)
+      end
+
+      it "redirects to the original_lisence" do
+        original_lisence = OriginalLisence.create! valid_attributes
+        put :update, :id => original_lisence.id, :original_lisence => valid_attributes
+        response.should redirect_to(original_lisence)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the original_lisence as @original_lisence" do
+        original_lisence = OriginalLisence.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        OriginalLisence.any_instance.stub(:save).and_return(false)
+        put :update, :id => original_lisence.id, :original_lisence => {}
+        assigns(:original_lisence).should eq(original_lisence)
+      end
+
+      it "re-renders the 'edit' template" do
+        original_lisence = OriginalLisence.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        OriginalLisence.any_instance.stub(:save).and_return(false)
+        put :update, :id => original_lisence.id, :original_lisence => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested original_lisence" do
+      original_lisence = OriginalLisence.create! valid_attributes
+      expect {
+        delete :destroy, :id => original_lisence.id
+      }.to change(OriginalLisence, :count).by(-1)
+    end
+
+    it "redirects to the original_lisences list" do
+      original_lisence = OriginalLisence.create! valid_attributes
+      delete :destroy, :id => original_lisence.id
+      response.should redirect_to(original_lisences_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/original_pictures_controller_spec.rb b/spec/controllers/original_pictures_controller_spec.rb
new file mode 100644 (file)
index 0000000..b60ecdf
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe OriginalPicturesController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # OriginalPicture. As you add validations to OriginalPicture, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all original_pictures as @original_pictures" do
+      original_picture = OriginalPicture.create! valid_attributes
+      get :index
+      assigns(:original_pictures).should eq([original_picture])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested original_picture as @original_picture" do
+      original_picture = OriginalPicture.create! valid_attributes
+      get :show, :id => original_picture.id
+      assigns(:original_picture).should eq(original_picture)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new original_picture as @original_picture" do
+      get :new
+      assigns(:original_picture).should be_a_new(OriginalPicture)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested original_picture as @original_picture" do
+      original_picture = OriginalPicture.create! valid_attributes
+      get :edit, :id => original_picture.id
+      assigns(:original_picture).should eq(original_picture)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new OriginalPicture" do
+        expect {
+          post :create, :original_picture => valid_attributes
+        }.to change(OriginalPicture, :count).by(1)
+      end
+
+      it "assigns a newly created original_picture as @original_picture" do
+        post :create, :original_picture => valid_attributes
+        assigns(:original_picture).should be_a(OriginalPicture)
+        assigns(:original_picture).should be_persisted
+      end
+
+      it "redirects to the created original_picture" do
+        post :create, :original_picture => valid_attributes
+        response.should redirect_to(OriginalPicture.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved original_picture as @original_picture" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        OriginalPicture.any_instance.stub(:save).and_return(false)
+        post :create, :original_picture => {}
+        assigns(:original_picture).should be_a_new(OriginalPicture)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        OriginalPicture.any_instance.stub(:save).and_return(false)
+        post :create, :original_picture => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested original_picture" do
+        original_picture = OriginalPicture.create! valid_attributes
+        # Assuming there are no other original_pictures in the database, this
+        # specifies that the OriginalPicture created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        OriginalPicture.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => original_picture.id, :original_picture => {'these' => 'params'}
+      end
+
+      it "assigns the requested original_picture as @original_picture" do
+        original_picture = OriginalPicture.create! valid_attributes
+        put :update, :id => original_picture.id, :original_picture => valid_attributes
+        assigns(:original_picture).should eq(original_picture)
+      end
+
+      it "redirects to the original_picture" do
+        original_picture = OriginalPicture.create! valid_attributes
+        put :update, :id => original_picture.id, :original_picture => valid_attributes
+        response.should redirect_to(original_picture)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the original_picture as @original_picture" do
+        original_picture = OriginalPicture.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        OriginalPicture.any_instance.stub(:save).and_return(false)
+        put :update, :id => original_picture.id, :original_picture => {}
+        assigns(:original_picture).should eq(original_picture)
+      end
+
+      it "re-renders the 'edit' template" do
+        original_picture = OriginalPicture.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        OriginalPicture.any_instance.stub(:save).and_return(false)
+        put :update, :id => original_picture.id, :original_picture => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested original_picture" do
+      original_picture = OriginalPicture.create! valid_attributes
+      expect {
+        delete :destroy, :id => original_picture.id
+      }.to change(OriginalPicture, :count).by(-1)
+    end
+
+    it "redirects to the original_pictures list" do
+      original_picture = OriginalPicture.create! valid_attributes
+      delete :destroy, :id => original_picture.id
+      response.should redirect_to(original_pictures_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/panels_controller_spec.rb b/spec/controllers/panels_controller_spec.rb
new file mode 100644 (file)
index 0000000..1400a91
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe PanelsController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # Panel. As you add validations to Panel, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all panels as @panels" do
+      panel = Panel.create! valid_attributes
+      get :index
+      assigns(:panels).should eq([panel])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested panel as @panel" do
+      panel = Panel.create! valid_attributes
+      get :show, :id => panel.id
+      assigns(:panel).should eq(panel)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new panel as @panel" do
+      get :new
+      assigns(:panel).should be_a_new(Panel)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested panel as @panel" do
+      panel = Panel.create! valid_attributes
+      get :edit, :id => panel.id
+      assigns(:panel).should eq(panel)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new Panel" do
+        expect {
+          post :create, :panel => valid_attributes
+        }.to change(Panel, :count).by(1)
+      end
+
+      it "assigns a newly created panel as @panel" do
+        post :create, :panel => valid_attributes
+        assigns(:panel).should be_a(Panel)
+        assigns(:panel).should be_persisted
+      end
+
+      it "redirects to the created panel" do
+        post :create, :panel => valid_attributes
+        response.should redirect_to(Panel.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved panel as @panel" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Panel.any_instance.stub(:save).and_return(false)
+        post :create, :panel => {}
+        assigns(:panel).should be_a_new(Panel)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Panel.any_instance.stub(:save).and_return(false)
+        post :create, :panel => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested panel" do
+        panel = Panel.create! valid_attributes
+        # Assuming there are no other panels in the database, this
+        # specifies that the Panel created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        Panel.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => panel.id, :panel => {'these' => 'params'}
+      end
+
+      it "assigns the requested panel as @panel" do
+        panel = Panel.create! valid_attributes
+        put :update, :id => panel.id, :panel => valid_attributes
+        assigns(:panel).should eq(panel)
+      end
+
+      it "redirects to the panel" do
+        panel = Panel.create! valid_attributes
+        put :update, :id => panel.id, :panel => valid_attributes
+        response.should redirect_to(panel)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the panel as @panel" do
+        panel = Panel.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Panel.any_instance.stub(:save).and_return(false)
+        put :update, :id => panel.id, :panel => {}
+        assigns(:panel).should eq(panel)
+      end
+
+      it "re-renders the 'edit' template" do
+        panel = Panel.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Panel.any_instance.stub(:save).and_return(false)
+        put :update, :id => panel.id, :panel => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested panel" do
+      panel = Panel.create! valid_attributes
+      expect {
+        delete :destroy, :id => panel.id
+      }.to change(Panel, :count).by(-1)
+    end
+
+    it "redirects to the panels list" do
+      panel = Panel.create! valid_attributes
+      delete :destroy, :id => panel.id
+      response.should redirect_to(panels_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/pictures_controller_spec.rb b/spec/controllers/pictures_controller_spec.rb
new file mode 100644 (file)
index 0000000..76639f4
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe PicturesController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # Picture. As you add validations to Picture, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all pictures as @pictures" do
+      picture = Picture.create! valid_attributes
+      get :index
+      assigns(:pictures).should eq([picture])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested picture as @picture" do
+      picture = Picture.create! valid_attributes
+      get :show, :id => picture.id
+      assigns(:picture).should eq(picture)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new picture as @picture" do
+      get :new
+      assigns(:picture).should be_a_new(Picture)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested picture as @picture" do
+      picture = Picture.create! valid_attributes
+      get :edit, :id => picture.id
+      assigns(:picture).should eq(picture)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new Picture" do
+        expect {
+          post :create, :picture => valid_attributes
+        }.to change(Picture, :count).by(1)
+      end
+
+      it "assigns a newly created picture as @picture" do
+        post :create, :picture => valid_attributes
+        assigns(:picture).should be_a(Picture)
+        assigns(:picture).should be_persisted
+      end
+
+      it "redirects to the created picture" do
+        post :create, :picture => valid_attributes
+        response.should redirect_to(Picture.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved picture as @picture" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Picture.any_instance.stub(:save).and_return(false)
+        post :create, :picture => {}
+        assigns(:picture).should be_a_new(Picture)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Picture.any_instance.stub(:save).and_return(false)
+        post :create, :picture => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested picture" do
+        picture = Picture.create! valid_attributes
+        # Assuming there are no other pictures in the database, this
+        # specifies that the Picture created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        Picture.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => picture.id, :picture => {'these' => 'params'}
+      end
+
+      it "assigns the requested picture as @picture" do
+        picture = Picture.create! valid_attributes
+        put :update, :id => picture.id, :picture => valid_attributes
+        assigns(:picture).should eq(picture)
+      end
+
+      it "redirects to the picture" do
+        picture = Picture.create! valid_attributes
+        put :update, :id => picture.id, :picture => valid_attributes
+        response.should redirect_to(picture)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the picture as @picture" do
+        picture = Picture.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Picture.any_instance.stub(:save).and_return(false)
+        put :update, :id => picture.id, :picture => {}
+        assigns(:picture).should eq(picture)
+      end
+
+      it "re-renders the 'edit' template" do
+        picture = Picture.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Picture.any_instance.stub(:save).and_return(false)
+        put :update, :id => picture.id, :picture => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested picture" do
+      picture = Picture.create! valid_attributes
+      expect {
+        delete :destroy, :id => picture.id
+      }.to change(Picture, :count).by(-1)
+    end
+
+    it "redirects to the pictures list" do
+      picture = Picture.create! valid_attributes
+      delete :destroy, :id => picture.id
+      response.should redirect_to(pictures_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/source_pictures_controller_spec.rb b/spec/controllers/source_pictures_controller_spec.rb
new file mode 100644 (file)
index 0000000..8ee713c
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe SourcePicturesController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # SourcePicture. As you add validations to SourcePicture, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all source_pictures as @source_pictures" do
+      source_picture = SourcePicture.create! valid_attributes
+      get :index
+      assigns(:source_pictures).should eq([source_picture])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested source_picture as @source_picture" do
+      source_picture = SourcePicture.create! valid_attributes
+      get :show, :id => source_picture.id
+      assigns(:source_picture).should eq(source_picture)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new source_picture as @source_picture" do
+      get :new
+      assigns(:source_picture).should be_a_new(SourcePicture)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested source_picture as @source_picture" do
+      source_picture = SourcePicture.create! valid_attributes
+      get :edit, :id => source_picture.id
+      assigns(:source_picture).should eq(source_picture)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new SourcePicture" do
+        expect {
+          post :create, :source_picture => valid_attributes
+        }.to change(SourcePicture, :count).by(1)
+      end
+
+      it "assigns a newly created source_picture as @source_picture" do
+        post :create, :source_picture => valid_attributes
+        assigns(:source_picture).should be_a(SourcePicture)
+        assigns(:source_picture).should be_persisted
+      end
+
+      it "redirects to the created source_picture" do
+        post :create, :source_picture => valid_attributes
+        response.should redirect_to(SourcePicture.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved source_picture as @source_picture" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        SourcePicture.any_instance.stub(:save).and_return(false)
+        post :create, :source_picture => {}
+        assigns(:source_picture).should be_a_new(SourcePicture)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        SourcePicture.any_instance.stub(:save).and_return(false)
+        post :create, :source_picture => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested source_picture" do
+        source_picture = SourcePicture.create! valid_attributes
+        # Assuming there are no other source_pictures in the database, this
+        # specifies that the SourcePicture created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        SourcePicture.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => source_picture.id, :source_picture => {'these' => 'params'}
+      end
+
+      it "assigns the requested source_picture as @source_picture" do
+        source_picture = SourcePicture.create! valid_attributes
+        put :update, :id => source_picture.id, :source_picture => valid_attributes
+        assigns(:source_picture).should eq(source_picture)
+      end
+
+      it "redirects to the source_picture" do
+        source_picture = SourcePicture.create! valid_attributes
+        put :update, :id => source_picture.id, :source_picture => valid_attributes
+        response.should redirect_to(source_picture)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the source_picture as @source_picture" do
+        source_picture = SourcePicture.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        SourcePicture.any_instance.stub(:save).and_return(false)
+        put :update, :id => source_picture.id, :source_picture => {}
+        assigns(:source_picture).should eq(source_picture)
+      end
+
+      it "re-renders the 'edit' template" do
+        source_picture = SourcePicture.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        SourcePicture.any_instance.stub(:save).and_return(false)
+        put :update, :id => source_picture.id, :source_picture => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested source_picture" do
+      source_picture = SourcePicture.create! valid_attributes
+      expect {
+        delete :destroy, :id => source_picture.id
+      }.to change(SourcePicture, :count).by(-1)
+    end
+
+    it "redirects to the source_pictures list" do
+      source_picture = SourcePicture.create! valid_attributes
+      delete :destroy, :id => source_picture.id
+      response.should redirect_to(source_pictures_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/speach_baloons_controller_spec.rb b/spec/controllers/speach_baloons_controller_spec.rb
new file mode 100644 (file)
index 0000000..6f33792
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe SpeachBaloonsController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # SpeachBaloon. As you add validations to SpeachBaloon, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all speach_baloons as @speach_baloons" do
+      speach_baloon = SpeachBaloon.create! valid_attributes
+      get :index
+      assigns(:speach_baloons).should eq([speach_baloon])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested speach_baloon as @speach_baloon" do
+      speach_baloon = SpeachBaloon.create! valid_attributes
+      get :show, :id => speach_baloon.id
+      assigns(:speach_baloon).should eq(speach_baloon)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new speach_baloon as @speach_baloon" do
+      get :new
+      assigns(:speach_baloon).should be_a_new(SpeachBaloon)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested speach_baloon as @speach_baloon" do
+      speach_baloon = SpeachBaloon.create! valid_attributes
+      get :edit, :id => speach_baloon.id
+      assigns(:speach_baloon).should eq(speach_baloon)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new SpeachBaloon" do
+        expect {
+          post :create, :speach_baloon => valid_attributes
+        }.to change(SpeachBaloon, :count).by(1)
+      end
+
+      it "assigns a newly created speach_baloon as @speach_baloon" do
+        post :create, :speach_baloon => valid_attributes
+        assigns(:speach_baloon).should be_a(SpeachBaloon)
+        assigns(:speach_baloon).should be_persisted
+      end
+
+      it "redirects to the created speach_baloon" do
+        post :create, :speach_baloon => valid_attributes
+        response.should redirect_to(SpeachBaloon.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved speach_baloon as @speach_baloon" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        SpeachBaloon.any_instance.stub(:save).and_return(false)
+        post :create, :speach_baloon => {}
+        assigns(:speach_baloon).should be_a_new(SpeachBaloon)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        SpeachBaloon.any_instance.stub(:save).and_return(false)
+        post :create, :speach_baloon => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested speach_baloon" do
+        speach_baloon = SpeachBaloon.create! valid_attributes
+        # Assuming there are no other speach_baloons in the database, this
+        # specifies that the SpeachBaloon created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        SpeachBaloon.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => speach_baloon.id, :speach_baloon => {'these' => 'params'}
+      end
+
+      it "assigns the requested speach_baloon as @speach_baloon" do
+        speach_baloon = SpeachBaloon.create! valid_attributes
+        put :update, :id => speach_baloon.id, :speach_baloon => valid_attributes
+        assigns(:speach_baloon).should eq(speach_baloon)
+      end
+
+      it "redirects to the speach_baloon" do
+        speach_baloon = SpeachBaloon.create! valid_attributes
+        put :update, :id => speach_baloon.id, :speach_baloon => valid_attributes
+        response.should redirect_to(speach_baloon)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the speach_baloon as @speach_baloon" do
+        speach_baloon = SpeachBaloon.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        SpeachBaloon.any_instance.stub(:save).and_return(false)
+        put :update, :id => speach_baloon.id, :speach_baloon => {}
+        assigns(:speach_baloon).should eq(speach_baloon)
+      end
+
+      it "re-renders the 'edit' template" do
+        speach_baloon = SpeachBaloon.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        SpeachBaloon.any_instance.stub(:save).and_return(false)
+        put :update, :id => speach_baloon.id, :speach_baloon => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested speach_baloon" do
+      speach_baloon = SpeachBaloon.create! valid_attributes
+      expect {
+        delete :destroy, :id => speach_baloon.id
+      }.to change(SpeachBaloon, :count).by(-1)
+    end
+
+    it "redirects to the speach_baloons list" do
+      speach_baloon = SpeachBaloon.create! valid_attributes
+      delete :destroy, :id => speach_baloon.id
+      response.should redirect_to(speach_baloons_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/speach_templates_controller_spec.rb b/spec/controllers/speach_templates_controller_spec.rb
new file mode 100644 (file)
index 0000000..a01b04c
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe SpeachTemplatesController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # SpeachTemplate. As you add validations to SpeachTemplate, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all speach_templates as @speach_templates" do
+      speach_template = SpeachTemplate.create! valid_attributes
+      get :index
+      assigns(:speach_templates).should eq([speach_template])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested speach_template as @speach_template" do
+      speach_template = SpeachTemplate.create! valid_attributes
+      get :show, :id => speach_template.id
+      assigns(:speach_template).should eq(speach_template)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new speach_template as @speach_template" do
+      get :new
+      assigns(:speach_template).should be_a_new(SpeachTemplate)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested speach_template as @speach_template" do
+      speach_template = SpeachTemplate.create! valid_attributes
+      get :edit, :id => speach_template.id
+      assigns(:speach_template).should eq(speach_template)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new SpeachTemplate" do
+        expect {
+          post :create, :speach_template => valid_attributes
+        }.to change(SpeachTemplate, :count).by(1)
+      end
+
+      it "assigns a newly created speach_template as @speach_template" do
+        post :create, :speach_template => valid_attributes
+        assigns(:speach_template).should be_a(SpeachTemplate)
+        assigns(:speach_template).should be_persisted
+      end
+
+      it "redirects to the created speach_template" do
+        post :create, :speach_template => valid_attributes
+        response.should redirect_to(SpeachTemplate.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved speach_template as @speach_template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        SpeachTemplate.any_instance.stub(:save).and_return(false)
+        post :create, :speach_template => {}
+        assigns(:speach_template).should be_a_new(SpeachTemplate)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        SpeachTemplate.any_instance.stub(:save).and_return(false)
+        post :create, :speach_template => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested speach_template" do
+        speach_template = SpeachTemplate.create! valid_attributes
+        # Assuming there are no other speach_templates in the database, this
+        # specifies that the SpeachTemplate created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        SpeachTemplate.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => speach_template.id, :speach_template => {'these' => 'params'}
+      end
+
+      it "assigns the requested speach_template as @speach_template" do
+        speach_template = SpeachTemplate.create! valid_attributes
+        put :update, :id => speach_template.id, :speach_template => valid_attributes
+        assigns(:speach_template).should eq(speach_template)
+      end
+
+      it "redirects to the speach_template" do
+        speach_template = SpeachTemplate.create! valid_attributes
+        put :update, :id => speach_template.id, :speach_template => valid_attributes
+        response.should redirect_to(speach_template)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the speach_template as @speach_template" do
+        speach_template = SpeachTemplate.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        SpeachTemplate.any_instance.stub(:save).and_return(false)
+        put :update, :id => speach_template.id, :speach_template => {}
+        assigns(:speach_template).should eq(speach_template)
+      end
+
+      it "re-renders the 'edit' template" do
+        speach_template = SpeachTemplate.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        SpeachTemplate.any_instance.stub(:save).and_return(false)
+        put :update, :id => speach_template.id, :speach_template => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested speach_template" do
+      speach_template = SpeachTemplate.create! valid_attributes
+      expect {
+        delete :destroy, :id => speach_template.id
+      }.to change(SpeachTemplate, :count).by(-1)
+    end
+
+    it "redirects to the speach_templates list" do
+      speach_template = SpeachTemplate.create! valid_attributes
+      delete :destroy, :id => speach_template.id
+      response.should redirect_to(speach_templates_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/speachbaloons_controller_spec.rb b/spec/controllers/speachbaloons_controller_spec.rb
new file mode 100644 (file)
index 0000000..8ee2c2d
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe SpeachbaloonsController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # Speachbaloon. As you add validations to Speachbaloon, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all speachbaloons as @speachbaloons" do
+      speachbaloon = Speachbaloon.create! valid_attributes
+      get :index
+      assigns(:speachbaloons).should eq([speachbaloon])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested speachbaloon as @speachbaloon" do
+      speachbaloon = Speachbaloon.create! valid_attributes
+      get :show, :id => speachbaloon.id
+      assigns(:speachbaloon).should eq(speachbaloon)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new speachbaloon as @speachbaloon" do
+      get :new
+      assigns(:speachbaloon).should be_a_new(Speachbaloon)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested speachbaloon as @speachbaloon" do
+      speachbaloon = Speachbaloon.create! valid_attributes
+      get :edit, :id => speachbaloon.id
+      assigns(:speachbaloon).should eq(speachbaloon)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new Speachbaloon" do
+        expect {
+          post :create, :speachbaloon => valid_attributes
+        }.to change(Speachbaloon, :count).by(1)
+      end
+
+      it "assigns a newly created speachbaloon as @speachbaloon" do
+        post :create, :speachbaloon => valid_attributes
+        assigns(:speachbaloon).should be_a(Speachbaloon)
+        assigns(:speachbaloon).should be_persisted
+      end
+
+      it "redirects to the created speachbaloon" do
+        post :create, :speachbaloon => valid_attributes
+        response.should redirect_to(Speachbaloon.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved speachbaloon as @speachbaloon" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Speachbaloon.any_instance.stub(:save).and_return(false)
+        post :create, :speachbaloon => {}
+        assigns(:speachbaloon).should be_a_new(Speachbaloon)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Speachbaloon.any_instance.stub(:save).and_return(false)
+        post :create, :speachbaloon => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested speachbaloon" do
+        speachbaloon = Speachbaloon.create! valid_attributes
+        # Assuming there are no other speachbaloons in the database, this
+        # specifies that the Speachbaloon created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        Speachbaloon.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => speachbaloon.id, :speachbaloon => {'these' => 'params'}
+      end
+
+      it "assigns the requested speachbaloon as @speachbaloon" do
+        speachbaloon = Speachbaloon.create! valid_attributes
+        put :update, :id => speachbaloon.id, :speachbaloon => valid_attributes
+        assigns(:speachbaloon).should eq(speachbaloon)
+      end
+
+      it "redirects to the speachbaloon" do
+        speachbaloon = Speachbaloon.create! valid_attributes
+        put :update, :id => speachbaloon.id, :speachbaloon => valid_attributes
+        response.should redirect_to(speachbaloon)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the speachbaloon as @speachbaloon" do
+        speachbaloon = Speachbaloon.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Speachbaloon.any_instance.stub(:save).and_return(false)
+        put :update, :id => speachbaloon.id, :speachbaloon => {}
+        assigns(:speachbaloon).should eq(speachbaloon)
+      end
+
+      it "re-renders the 'edit' template" do
+        speachbaloon = Speachbaloon.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Speachbaloon.any_instance.stub(:save).and_return(false)
+        put :update, :id => speachbaloon.id, :speachbaloon => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested speachbaloon" do
+      speachbaloon = Speachbaloon.create! valid_attributes
+      expect {
+        delete :destroy, :id => speachbaloon.id
+      }.to change(Speachbaloon, :count).by(-1)
+    end
+
+    it "redirects to the speachbaloons list" do
+      speachbaloon = Speachbaloon.create! valid_attributes
+      delete :destroy, :id => speachbaloon.id
+      response.should redirect_to(speachbaloons_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/speaches_controller_spec.rb b/spec/controllers/speaches_controller_spec.rb
new file mode 100644 (file)
index 0000000..1bb9b27
--- /dev/null
@@ -0,0 +1,157 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe SpeachesController do
+
+  # This should return the minimal set of attributes required to create a valid
+  # Speach. As you add validations to Speach, be sure to
+  # update the return value of this method accordingly.
+  def valid_attributes
+    {}
+  end
+
+  describe "GET index" do
+    it "assigns all speaches as @speaches" do
+      speach = Speach.create! valid_attributes
+      get :index
+      assigns(:speaches).should eq([speach])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested speach as @speach" do
+      speach = Speach.create! valid_attributes
+      get :show, :id => speach.id
+      assigns(:speach).should eq(speach)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new speach as @speach" do
+      get :new
+      assigns(:speach).should be_a_new(Speach)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested speach as @speach" do
+      speach = Speach.create! valid_attributes
+      get :edit, :id => speach.id
+      assigns(:speach).should eq(speach)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new Speach" do
+        expect {
+          post :create, :speach => valid_attributes
+        }.to change(Speach, :count).by(1)
+      end
+
+      it "assigns a newly created speach as @speach" do
+        post :create, :speach => valid_attributes
+        assigns(:speach).should be_a(Speach)
+        assigns(:speach).should be_persisted
+      end
+
+      it "redirects to the created speach" do
+        post :create, :speach => valid_attributes
+        response.should redirect_to(Speach.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved speach as @speach" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Speach.any_instance.stub(:save).and_return(false)
+        post :create, :speach => {}
+        assigns(:speach).should be_a_new(Speach)
+      end
+
+      it "re-renders the 'new' template" do
+        # Trigger the behavior that occurs when invalid params are submitted
+        Speach.any_instance.stub(:save).and_return(false)
+        post :create, :speach => {}
+        response.should render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      it "updates the requested speach" do
+        speach = Speach.create! valid_attributes
+        # Assuming there are no other speaches in the database, this
+        # specifies that the Speach created on the previous line
+        # receives the :update_attributes message with whatever params are
+        # submitted in the request.
+        Speach.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+        put :update, :id => speach.id, :speach => {'these' => 'params'}
+      end
+
+      it "assigns the requested speach as @speach" do
+        speach = Speach.create! valid_attributes
+        put :update, :id => speach.id, :speach => valid_attributes
+        assigns(:speach).should eq(speach)
+      end
+
+      it "redirects to the speach" do
+        speach = Speach.create! valid_attributes
+        put :update, :id => speach.id, :speach => valid_attributes
+        response.should redirect_to(speach)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the speach as @speach" do
+        speach = Speach.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Speach.any_instance.stub(:save).and_return(false)
+        put :update, :id => speach.id, :speach => {}
+        assigns(:speach).should eq(speach)
+      end
+
+      it "re-renders the 'edit' template" do
+        speach = Speach.create! valid_attributes
+        # Trigger the behavior that occurs when invalid params are submitted
+        Speach.any_instance.stub(:save).and_return(false)
+        put :update, :id => speach.id, :speach => {}
+        response.should render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested speach" do
+      speach = Speach.create! valid_attributes
+      expect {
+        delete :destroy, :id => speach.id
+      }.to change(Speach, :count).by(-1)
+    end
+
+    it "redirects to the speaches list" do
+      speach = Speach.create! valid_attributes
+      delete :destroy, :id => speach.id
+      response.should redirect_to(speaches_url)
+    end
+  end
+
+end
diff --git a/spec/controllers/system_controller_spec.rb b/spec/controllers/system_controller_spec.rb
new file mode 100644 (file)
index 0000000..8d22121
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe SystemController do
+
+end
diff --git a/spec/helpers/admins/sessions_helper_spec.rb b/spec/helpers/admins/sessions_helper_spec.rb
new file mode 100644 (file)
index 0000000..0815142
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the Admins::SessionsHelper. For example:
+#
+# describe Admins::SessionsHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe Admins::SessionsHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/artists_helper_spec.rb b/spec/helpers/artists_helper_spec.rb
new file mode 100644 (file)
index 0000000..7a1305a
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the ArtistsHelper. For example:
+#
+# describe ArtistsHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe ArtistsHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/authors/sessions_helper_spec.rb b/spec/helpers/authors/sessions_helper_spec.rb
new file mode 100644 (file)
index 0000000..ddb409e
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the Authors::SessionsHelper. For example:
+#
+# describe Authors::SessionsHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe Authors::SessionsHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/baloon_templates_helper_spec.rb b/spec/helpers/baloon_templates_helper_spec.rb
new file mode 100644 (file)
index 0000000..c5576f1
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the BaloonTemplatesHelper. For example:
+#
+# describe BaloonTemplatesHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe BaloonTemplatesHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/baloon_types_helper_spec.rb b/spec/helpers/baloon_types_helper_spec.rb
new file mode 100644 (file)
index 0000000..835a5e2
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the BaloonTypesHelper. For example:
+#
+# describe BaloonTypesHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe BaloonTypesHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/baloons_helper_spec.rb b/spec/helpers/baloons_helper_spec.rb
new file mode 100644 (file)
index 0000000..f693f74
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the BaloonsHelper. For example:
+#
+# describe BaloonsHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe BaloonsHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/comics_helper_spec.rb b/spec/helpers/comics_helper_spec.rb
new file mode 100644 (file)
index 0000000..30bdaaf
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the ComicsHelper. For example:
+#
+# describe ComicsHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe ComicsHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/common_lisences_helper_spec.rb b/spec/helpers/common_lisences_helper_spec.rb
new file mode 100644 (file)
index 0000000..25c85dc
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the CommonLisencesHelper. For example:
+#
+# describe CommonLisencesHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe CommonLisencesHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/help_helper_spec.rb b/spec/helpers/help_helper_spec.rb
new file mode 100644 (file)
index 0000000..29709b9
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the HelpHelper. For example:
+#
+# describe HelpHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe HelpHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/home_helper_spec.rb b/spec/helpers/home_helper_spec.rb
new file mode 100644 (file)
index 0000000..4a37633
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the HomeHelper. For example:
+#
+# describe HomeHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe HomeHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/lisences_helper_spec.rb b/spec/helpers/lisences_helper_spec.rb
new file mode 100644 (file)
index 0000000..bf41193
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the LisencesHelper. For example:
+#
+# describe LisencesHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe LisencesHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/original_lisences_helper_spec.rb b/spec/helpers/original_lisences_helper_spec.rb
new file mode 100644 (file)
index 0000000..e7e138f
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the OriginalLisencesHelper. For example:
+#
+# describe OriginalLisencesHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe OriginalLisencesHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/original_pictures_helper_spec.rb b/spec/helpers/original_pictures_helper_spec.rb
new file mode 100644 (file)
index 0000000..b506205
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the OriginalPicturesHelper. For example:
+#
+# describe OriginalPicturesHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe OriginalPicturesHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/panels_helper_spec.rb b/spec/helpers/panels_helper_spec.rb
new file mode 100644 (file)
index 0000000..8a38388
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the PanelsHelper. For example:
+#
+# describe PanelsHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe PanelsHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/pictures_helper_spec.rb b/spec/helpers/pictures_helper_spec.rb
new file mode 100644 (file)
index 0000000..d0a47d3
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the PicturesHelper. For example:
+#
+# describe PicturesHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe PicturesHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/source_pictures_helper_spec.rb b/spec/helpers/source_pictures_helper_spec.rb
new file mode 100644 (file)
index 0000000..5e0a5a5
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the SourcePicturesHelper. For example:
+#
+# describe SourcePicturesHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe SourcePicturesHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/speach_baloons_helper_spec.rb b/spec/helpers/speach_baloons_helper_spec.rb
new file mode 100644 (file)
index 0000000..e68fc3f
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the SpeachBaloonsHelper. For example:
+#
+# describe SpeachBaloonsHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe SpeachBaloonsHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/speach_templates_helper_spec.rb b/spec/helpers/speach_templates_helper_spec.rb
new file mode 100644 (file)
index 0000000..143e65e
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the SpeachTemplatesHelper. For example:
+#
+# describe SpeachTemplatesHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe SpeachTemplatesHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/speachbaloons_helper_spec.rb b/spec/helpers/speachbaloons_helper_spec.rb
new file mode 100644 (file)
index 0000000..2fab07c
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the SpeachbaloonsHelper. For example:
+#
+# describe SpeachbaloonsHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe SpeachbaloonsHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/speaches_helper_spec.rb b/spec/helpers/speaches_helper_spec.rb
new file mode 100644 (file)
index 0000000..6a4a364
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the SpeachesHelper. For example:
+#
+# describe SpeachesHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe SpeachesHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/system_helper_spec.rb b/spec/helpers/system_helper_spec.rb
new file mode 100644 (file)
index 0000000..8f36345
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the SystemHelper. For example:
+#
+# describe SystemHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe SystemHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/admin_spec.rb b/spec/models/admin_spec.rb
new file mode 100644 (file)
index 0000000..ccc4624
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Admin do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/artist_spec.rb b/spec/models/artist_spec.rb
new file mode 100644 (file)
index 0000000..4efbc73
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Artist do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/author_spec.rb b/spec/models/author_spec.rb
new file mode 100644 (file)
index 0000000..0a1954f
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Author do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/baloon_spec.rb b/spec/models/baloon_spec.rb
new file mode 100644 (file)
index 0000000..9f91cd0
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Baloon do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/baloon_template_spec.rb b/spec/models/baloon_template_spec.rb
new file mode 100644 (file)
index 0000000..2cdb490
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe BaloonTemplate do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/baloon_type_spec.rb b/spec/models/baloon_type_spec.rb
new file mode 100644 (file)
index 0000000..94ab96c
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe BaloonType do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/comic_spec.rb b/spec/models/comic_spec.rb
new file mode 100644 (file)
index 0000000..51b9fa8
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Comic do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/common_lisence_spec.rb b/spec/models/common_lisence_spec.rb
new file mode 100644 (file)
index 0000000..a364231
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe CommonLisence do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/lisence_spec.rb b/spec/models/lisence_spec.rb
new file mode 100644 (file)
index 0000000..237d81e
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Lisence do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/original_lisence_spec.rb b/spec/models/original_lisence_spec.rb
new file mode 100644 (file)
index 0000000..35c5c9e
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe OriginalLisence do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/original_picture_spec.rb b/spec/models/original_picture_spec.rb
new file mode 100644 (file)
index 0000000..2b896d6
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe OriginalPicture do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/panel_spec.rb b/spec/models/panel_spec.rb
new file mode 100644 (file)
index 0000000..ad5959d
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Panel do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/picture_spec.rb b/spec/models/picture_spec.rb
new file mode 100644 (file)
index 0000000..5ef8eea
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Picture do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/source_picture_spec.rb b/spec/models/source_picture_spec.rb
new file mode 100644 (file)
index 0000000..e502219
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe SourcePicture do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/speach_baloon_spec.rb b/spec/models/speach_baloon_spec.rb
new file mode 100644 (file)
index 0000000..45ac534
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe SpeachBaloon do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/speach_spec.rb b/spec/models/speach_spec.rb
new file mode 100644 (file)
index 0000000..6ac3992
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Speach do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/speach_template_spec.rb b/spec/models/speach_template_spec.rb
new file mode 100644 (file)
index 0000000..31d8b20
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe SpeachTemplate do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/speachbaloon_spec.rb b/spec/models/speachbaloon_spec.rb
new file mode 100644 (file)
index 0000000..77f2e13
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Speachbaloon do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/requests/artists_spec.rb b/spec/requests/artists_spec.rb
new file mode 100644 (file)
index 0000000..ce39a8f
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Artists" do
+  describe "GET /artists" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get artists_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/baloon_templates_spec.rb b/spec/requests/baloon_templates_spec.rb
new file mode 100644 (file)
index 0000000..0826e76
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "BaloonTemplates" do
+  describe "GET /baloon_templates" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get baloon_templates_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/baloon_types_spec.rb b/spec/requests/baloon_types_spec.rb
new file mode 100644 (file)
index 0000000..ecda4f5
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "BaloonTypes" do
+  describe "GET /baloon_types" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get baloon_types_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/baloons_spec.rb b/spec/requests/baloons_spec.rb
new file mode 100644 (file)
index 0000000..1c613b7
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Baloons" do
+  describe "GET /baloons" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get baloons_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/comics_spec.rb b/spec/requests/comics_spec.rb
new file mode 100644 (file)
index 0000000..20de573
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Comics" do
+  describe "GET /comics" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get comics_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/common_lisences_spec.rb b/spec/requests/common_lisences_spec.rb
new file mode 100644 (file)
index 0000000..d04d49a
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "CommonLisences" do
+  describe "GET /common_lisences" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get common_lisences_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/lisences_spec.rb b/spec/requests/lisences_spec.rb
new file mode 100644 (file)
index 0000000..54ed4c9
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Lisences" do
+  describe "GET /lisences" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get lisences_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/original_lisences_spec.rb b/spec/requests/original_lisences_spec.rb
new file mode 100644 (file)
index 0000000..6a01a21
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "OriginalLisences" do
+  describe "GET /original_lisences" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get original_lisences_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/original_pictures_spec.rb b/spec/requests/original_pictures_spec.rb
new file mode 100644 (file)
index 0000000..f0330b9
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "OriginalPictures" do
+  describe "GET /original_pictures" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get original_pictures_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/panels_spec.rb b/spec/requests/panels_spec.rb
new file mode 100644 (file)
index 0000000..b488811
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Panels" do
+  describe "GET /panels" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get panels_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/pictures_spec.rb b/spec/requests/pictures_spec.rb
new file mode 100644 (file)
index 0000000..18c2c10
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Pictures" do
+  describe "GET /pictures" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get pictures_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/source_pictures_spec.rb b/spec/requests/source_pictures_spec.rb
new file mode 100644 (file)
index 0000000..f7bfb9c
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "SourcePictures" do
+  describe "GET /source_pictures" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get source_pictures_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/speach_baloons_spec.rb b/spec/requests/speach_baloons_spec.rb
new file mode 100644 (file)
index 0000000..3d1998f
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "SpeachBaloons" do
+  describe "GET /speach_baloons" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get speach_baloons_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/speach_templates_spec.rb b/spec/requests/speach_templates_spec.rb
new file mode 100644 (file)
index 0000000..3808822
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "SpeachTemplates" do
+  describe "GET /speach_templates" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get speach_templates_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/speachbaloons_spec.rb b/spec/requests/speachbaloons_spec.rb
new file mode 100644 (file)
index 0000000..a1b9402
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Speachbaloons" do
+  describe "GET /speachbaloons" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get speachbaloons_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/requests/speaches_spec.rb b/spec/requests/speaches_spec.rb
new file mode 100644 (file)
index 0000000..9fc5704
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Speaches" do
+  describe "GET /speaches" do
+    it "works! (now write some real specs)" do
+      # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+      get speaches_path
+      response.status.should be(200)
+    end
+  end
+end
diff --git a/spec/routing/artists_routing_spec.rb b/spec/routing/artists_routing_spec.rb
new file mode 100644 (file)
index 0000000..9c399fb
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe ArtistsController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/artists").should route_to("artists#index")
+    end
+
+    it "routes to #new" do
+      get("/artists/new").should route_to("artists#new")
+    end
+
+    it "routes to #show" do
+      get("/artists/1").should route_to("artists#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/artists/1/edit").should route_to("artists#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/artists").should route_to("artists#create")
+    end
+
+    it "routes to #update" do
+      put("/artists/1").should route_to("artists#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/artists/1").should route_to("artists#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/baloon_templates_routing_spec.rb b/spec/routing/baloon_templates_routing_spec.rb
new file mode 100644 (file)
index 0000000..8d7f985
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe BaloonTemplatesController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/baloon_templates").should route_to("baloon_templates#index")
+    end
+
+    it "routes to #new" do
+      get("/baloon_templates/new").should route_to("baloon_templates#new")
+    end
+
+    it "routes to #show" do
+      get("/baloon_templates/1").should route_to("baloon_templates#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/baloon_templates/1/edit").should route_to("baloon_templates#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/baloon_templates").should route_to("baloon_templates#create")
+    end
+
+    it "routes to #update" do
+      put("/baloon_templates/1").should route_to("baloon_templates#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/baloon_templates/1").should route_to("baloon_templates#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/baloon_types_routing_spec.rb b/spec/routing/baloon_types_routing_spec.rb
new file mode 100644 (file)
index 0000000..add3f9d
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe BaloonTypesController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/baloon_types").should route_to("baloon_types#index")
+    end
+
+    it "routes to #new" do
+      get("/baloon_types/new").should route_to("baloon_types#new")
+    end
+
+    it "routes to #show" do
+      get("/baloon_types/1").should route_to("baloon_types#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/baloon_types/1/edit").should route_to("baloon_types#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/baloon_types").should route_to("baloon_types#create")
+    end
+
+    it "routes to #update" do
+      put("/baloon_types/1").should route_to("baloon_types#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/baloon_types/1").should route_to("baloon_types#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/baloons_routing_spec.rb b/spec/routing/baloons_routing_spec.rb
new file mode 100644 (file)
index 0000000..b6d4572
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe BaloonsController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/baloons").should route_to("baloons#index")
+    end
+
+    it "routes to #new" do
+      get("/baloons/new").should route_to("baloons#new")
+    end
+
+    it "routes to #show" do
+      get("/baloons/1").should route_to("baloons#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/baloons/1/edit").should route_to("baloons#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/baloons").should route_to("baloons#create")
+    end
+
+    it "routes to #update" do
+      put("/baloons/1").should route_to("baloons#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/baloons/1").should route_to("baloons#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/comics_routing_spec.rb b/spec/routing/comics_routing_spec.rb
new file mode 100644 (file)
index 0000000..173c1ec
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe ComicsController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/comics").should route_to("comics#index")
+    end
+
+    it "routes to #new" do
+      get("/comics/new").should route_to("comics#new")
+    end
+
+    it "routes to #show" do
+      get("/comics/1").should route_to("comics#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/comics/1/edit").should route_to("comics#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/comics").should route_to("comics#create")
+    end
+
+    it "routes to #update" do
+      put("/comics/1").should route_to("comics#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/comics/1").should route_to("comics#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/common_lisences_routing_spec.rb b/spec/routing/common_lisences_routing_spec.rb
new file mode 100644 (file)
index 0000000..f42578f
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe CommonLisencesController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/common_lisences").should route_to("common_lisences#index")
+    end
+
+    it "routes to #new" do
+      get("/common_lisences/new").should route_to("common_lisences#new")
+    end
+
+    it "routes to #show" do
+      get("/common_lisences/1").should route_to("common_lisences#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/common_lisences/1/edit").should route_to("common_lisences#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/common_lisences").should route_to("common_lisences#create")
+    end
+
+    it "routes to #update" do
+      put("/common_lisences/1").should route_to("common_lisences#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/common_lisences/1").should route_to("common_lisences#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/lisences_routing_spec.rb b/spec/routing/lisences_routing_spec.rb
new file mode 100644 (file)
index 0000000..2882601
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe LisencesController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/lisences").should route_to("lisences#index")
+    end
+
+    it "routes to #new" do
+      get("/lisences/new").should route_to("lisences#new")
+    end
+
+    it "routes to #show" do
+      get("/lisences/1").should route_to("lisences#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/lisences/1/edit").should route_to("lisences#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/lisences").should route_to("lisences#create")
+    end
+
+    it "routes to #update" do
+      put("/lisences/1").should route_to("lisences#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/lisences/1").should route_to("lisences#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/original_lisences_routing_spec.rb b/spec/routing/original_lisences_routing_spec.rb
new file mode 100644 (file)
index 0000000..95d3d48
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe OriginalLisencesController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/original_lisences").should route_to("original_lisences#index")
+    end
+
+    it "routes to #new" do
+      get("/original_lisences/new").should route_to("original_lisences#new")
+    end
+
+    it "routes to #show" do
+      get("/original_lisences/1").should route_to("original_lisences#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/original_lisences/1/edit").should route_to("original_lisences#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/original_lisences").should route_to("original_lisences#create")
+    end
+
+    it "routes to #update" do
+      put("/original_lisences/1").should route_to("original_lisences#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/original_lisences/1").should route_to("original_lisences#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/original_pictures_routing_spec.rb b/spec/routing/original_pictures_routing_spec.rb
new file mode 100644 (file)
index 0000000..b4558c8
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe OriginalPicturesController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/original_pictures").should route_to("original_pictures#index")
+    end
+
+    it "routes to #new" do
+      get("/original_pictures/new").should route_to("original_pictures#new")
+    end
+
+    it "routes to #show" do
+      get("/original_pictures/1").should route_to("original_pictures#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/original_pictures/1/edit").should route_to("original_pictures#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/original_pictures").should route_to("original_pictures#create")
+    end
+
+    it "routes to #update" do
+      put("/original_pictures/1").should route_to("original_pictures#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/original_pictures/1").should route_to("original_pictures#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/panels_routing_spec.rb b/spec/routing/panels_routing_spec.rb
new file mode 100644 (file)
index 0000000..973c126
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe PanelsController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/panels").should route_to("panels#index")
+    end
+
+    it "routes to #new" do
+      get("/panels/new").should route_to("panels#new")
+    end
+
+    it "routes to #show" do
+      get("/panels/1").should route_to("panels#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/panels/1/edit").should route_to("panels#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/panels").should route_to("panels#create")
+    end
+
+    it "routes to #update" do
+      put("/panels/1").should route_to("panels#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/panels/1").should route_to("panels#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/pictures_routing_spec.rb b/spec/routing/pictures_routing_spec.rb
new file mode 100644 (file)
index 0000000..69c6877
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe PicturesController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/pictures").should route_to("pictures#index")
+    end
+
+    it "routes to #new" do
+      get("/pictures/new").should route_to("pictures#new")
+    end
+
+    it "routes to #show" do
+      get("/pictures/1").should route_to("pictures#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/pictures/1/edit").should route_to("pictures#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/pictures").should route_to("pictures#create")
+    end
+
+    it "routes to #update" do
+      put("/pictures/1").should route_to("pictures#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/pictures/1").should route_to("pictures#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/source_pictures_routing_spec.rb b/spec/routing/source_pictures_routing_spec.rb
new file mode 100644 (file)
index 0000000..dcb207c
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe SourcePicturesController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/source_pictures").should route_to("source_pictures#index")
+    end
+
+    it "routes to #new" do
+      get("/source_pictures/new").should route_to("source_pictures#new")
+    end
+
+    it "routes to #show" do
+      get("/source_pictures/1").should route_to("source_pictures#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/source_pictures/1/edit").should route_to("source_pictures#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/source_pictures").should route_to("source_pictures#create")
+    end
+
+    it "routes to #update" do
+      put("/source_pictures/1").should route_to("source_pictures#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/source_pictures/1").should route_to("source_pictures#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/speach_baloons_routing_spec.rb b/spec/routing/speach_baloons_routing_spec.rb
new file mode 100644 (file)
index 0000000..c52d53f
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe SpeachBaloonsController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/speach_baloons").should route_to("speach_baloons#index")
+    end
+
+    it "routes to #new" do
+      get("/speach_baloons/new").should route_to("speach_baloons#new")
+    end
+
+    it "routes to #show" do
+      get("/speach_baloons/1").should route_to("speach_baloons#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/speach_baloons/1/edit").should route_to("speach_baloons#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/speach_baloons").should route_to("speach_baloons#create")
+    end
+
+    it "routes to #update" do
+      put("/speach_baloons/1").should route_to("speach_baloons#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/speach_baloons/1").should route_to("speach_baloons#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/speach_templates_routing_spec.rb b/spec/routing/speach_templates_routing_spec.rb
new file mode 100644 (file)
index 0000000..da923f1
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe SpeachTemplatesController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/speach_templates").should route_to("speach_templates#index")
+    end
+
+    it "routes to #new" do
+      get("/speach_templates/new").should route_to("speach_templates#new")
+    end
+
+    it "routes to #show" do
+      get("/speach_templates/1").should route_to("speach_templates#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/speach_templates/1/edit").should route_to("speach_templates#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/speach_templates").should route_to("speach_templates#create")
+    end
+
+    it "routes to #update" do
+      put("/speach_templates/1").should route_to("speach_templates#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/speach_templates/1").should route_to("speach_templates#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/speachbaloons_routing_spec.rb b/spec/routing/speachbaloons_routing_spec.rb
new file mode 100644 (file)
index 0000000..f9c5c60
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe SpeachbaloonsController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/speachbaloons").should route_to("speachbaloons#index")
+    end
+
+    it "routes to #new" do
+      get("/speachbaloons/new").should route_to("speachbaloons#new")
+    end
+
+    it "routes to #show" do
+      get("/speachbaloons/1").should route_to("speachbaloons#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/speachbaloons/1/edit").should route_to("speachbaloons#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/speachbaloons").should route_to("speachbaloons#create")
+    end
+
+    it "routes to #update" do
+      put("/speachbaloons/1").should route_to("speachbaloons#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/speachbaloons/1").should route_to("speachbaloons#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/routing/speaches_routing_spec.rb b/spec/routing/speaches_routing_spec.rb
new file mode 100644 (file)
index 0000000..5debf26
--- /dev/null
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe SpeachesController do
+  describe "routing" do
+
+    it "routes to #index" do
+      get("/speaches").should route_to("speaches#index")
+    end
+
+    it "routes to #new" do
+      get("/speaches/new").should route_to("speaches#new")
+    end
+
+    it "routes to #show" do
+      get("/speaches/1").should route_to("speaches#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      get("/speaches/1/edit").should route_to("speaches#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      post("/speaches").should route_to("speaches#create")
+    end
+
+    it "routes to #update" do
+      put("/speaches/1").should route_to("speaches#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      delete("/speaches/1").should route_to("speaches#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644 (file)
index 0000000..6d7f66d
--- /dev/null
@@ -0,0 +1,33 @@
+# This file is copied to spec/ when you run 'rails generate rspec:install'
+ENV["RAILS_ENV"] ||= 'test'
+require File.expand_path("../../config/environment", __FILE__)
+require 'rspec/rails'
+require 'rspec/autorun'
+
+# Requires supporting ruby files with custom matchers and macros, etc,
+# in spec/support/ and its subdirectories.
+Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
+
+RSpec.configure do |config|
+  # == Mock Framework
+  #
+  # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
+  #
+  # config.mock_with :mocha
+  # config.mock_with :flexmock
+  # config.mock_with :rr
+  config.mock_with :rspec
+
+  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
+  config.fixture_path = "#{::Rails.root}/spec/fixtures"
+
+  # If you're not using ActiveRecord, or you'd prefer not to run each of your
+  # examples within a transaction, remove the following line or assign false
+  # instead of true.
+  config.use_transactional_fixtures = true
+
+  # If true, the base class of anonymous controllers will be inferred
+  # automatically. This will be the default behavior in future versions of
+  # rspec-rails.
+  config.infer_base_class_for_anonymous_controllers = false
+end
diff --git a/spec/views/artists/edit.html.erb_spec.rb b/spec/views/artists/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..a3a2781
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "artists/edit.html.erb" do
+  before(:each) do
+    @artist = assign(:artist, stub_model(Artist))
+  end
+
+  it "renders the edit artist form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => artists_path(@artist), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/artists/index.html.erb_spec.rb b/spec/views/artists/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..de4959a
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "artists/index.html.erb" do
+  before(:each) do
+    assign(:artists, [
+      stub_model(Artist),
+      stub_model(Artist)
+    ])
+  end
+
+  it "renders a list of artists" do
+    render
+  end
+end
diff --git a/spec/views/artists/new.html.erb_spec.rb b/spec/views/artists/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..bff7d48
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "artists/new.html.erb" do
+  before(:each) do
+    assign(:artist, stub_model(Artist).as_new_record)
+  end
+
+  it "renders new artist form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => artists_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/artists/show.html.erb_spec.rb b/spec/views/artists/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..76cac49
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "artists/show.html.erb" do
+  before(:each) do
+    @artist = assign(:artist, stub_model(Artist))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/baloon_templates/edit.html.erb_spec.rb b/spec/views/baloon_templates/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..081b4ee
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "baloon_templates/edit.html.erb" do
+  before(:each) do
+    @baloon_template = assign(:baloon_template, stub_model(BaloonTemplate))
+  end
+
+  it "renders the edit baloon_template form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => baloon_templates_path(@baloon_template), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/baloon_templates/index.html.erb_spec.rb b/spec/views/baloon_templates/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..7ff4294
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "baloon_templates/index.html.erb" do
+  before(:each) do
+    assign(:baloon_templates, [
+      stub_model(BaloonTemplate),
+      stub_model(BaloonTemplate)
+    ])
+  end
+
+  it "renders a list of baloon_templates" do
+    render
+  end
+end
diff --git a/spec/views/baloon_templates/new.html.erb_spec.rb b/spec/views/baloon_templates/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..fa5c809
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "baloon_templates/new.html.erb" do
+  before(:each) do
+    assign(:baloon_template, stub_model(BaloonTemplate).as_new_record)
+  end
+
+  it "renders new baloon_template form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => baloon_templates_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/baloon_templates/show.html.erb_spec.rb b/spec/views/baloon_templates/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..6335727
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "baloon_templates/show.html.erb" do
+  before(:each) do
+    @baloon_template = assign(:baloon_template, stub_model(BaloonTemplate))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/baloon_types/edit.html.erb_spec.rb b/spec/views/baloon_types/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..3ffc1d0
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "baloon_types/edit.html.erb" do
+  before(:each) do
+    @baloon_type = assign(:baloon_type, stub_model(BaloonType))
+  end
+
+  it "renders the edit baloon_type form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => baloon_types_path(@baloon_type), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/baloon_types/index.html.erb_spec.rb b/spec/views/baloon_types/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..3b0e863
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "baloon_types/index.html.erb" do
+  before(:each) do
+    assign(:baloon_types, [
+      stub_model(BaloonType),
+      stub_model(BaloonType)
+    ])
+  end
+
+  it "renders a list of baloon_types" do
+    render
+  end
+end
diff --git a/spec/views/baloon_types/new.html.erb_spec.rb b/spec/views/baloon_types/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..9c950b9
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "baloon_types/new.html.erb" do
+  before(:each) do
+    assign(:baloon_type, stub_model(BaloonType).as_new_record)
+  end
+
+  it "renders new baloon_type form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => baloon_types_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/baloon_types/show.html.erb_spec.rb b/spec/views/baloon_types/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..765570a
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "baloon_types/show.html.erb" do
+  before(:each) do
+    @baloon_type = assign(:baloon_type, stub_model(BaloonType))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/baloons/edit.html.erb_spec.rb b/spec/views/baloons/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..2c9b488
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "baloons/edit.html.erb" do
+  before(:each) do
+    @baloon = assign(:baloon, stub_model(Baloon))
+  end
+
+  it "renders the edit baloon form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => baloons_path(@baloon), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/baloons/index.html.erb_spec.rb b/spec/views/baloons/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..c9d7c35
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "baloons/index.html.erb" do
+  before(:each) do
+    assign(:baloons, [
+      stub_model(Baloon),
+      stub_model(Baloon)
+    ])
+  end
+
+  it "renders a list of baloons" do
+    render
+  end
+end
diff --git a/spec/views/baloons/new.html.erb_spec.rb b/spec/views/baloons/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..47d89e1
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "baloons/new.html.erb" do
+  before(:each) do
+    assign(:baloon, stub_model(Baloon).as_new_record)
+  end
+
+  it "renders new baloon form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => baloons_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/baloons/show.html.erb_spec.rb b/spec/views/baloons/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..2edae9d
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "baloons/show.html.erb" do
+  before(:each) do
+    @baloon = assign(:baloon, stub_model(Baloon))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/comics/edit.html.erb_spec.rb b/spec/views/comics/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..42357cc
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "comics/edit.html.erb" do
+  before(:each) do
+    @comic = assign(:comic, stub_model(Comic))
+  end
+
+  it "renders the edit comic form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => comics_path(@comic), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/comics/index.html.erb_spec.rb b/spec/views/comics/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..306c04c
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "comics/index.html.erb" do
+  before(:each) do
+    assign(:comics, [
+      stub_model(Comic),
+      stub_model(Comic)
+    ])
+  end
+
+  it "renders a list of comics" do
+    render
+  end
+end
diff --git a/spec/views/comics/new.html.erb_spec.rb b/spec/views/comics/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..d850215
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "comics/new.html.erb" do
+  before(:each) do
+    assign(:comic, stub_model(Comic).as_new_record)
+  end
+
+  it "renders new comic form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => comics_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/comics/show.html.erb_spec.rb b/spec/views/comics/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..b0fc5f2
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "comics/show.html.erb" do
+  before(:each) do
+    @comic = assign(:comic, stub_model(Comic))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/common_lisences/edit.html.erb_spec.rb b/spec/views/common_lisences/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..17730cb
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "common_lisences/edit.html.erb" do
+  before(:each) do
+    @common_lisence = assign(:common_lisence, stub_model(CommonLisence))
+  end
+
+  it "renders the edit common_lisence form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => common_lisences_path(@common_lisence), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/common_lisences/index.html.erb_spec.rb b/spec/views/common_lisences/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..85fbfcf
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "common_lisences/index.html.erb" do
+  before(:each) do
+    assign(:common_lisences, [
+      stub_model(CommonLisence),
+      stub_model(CommonLisence)
+    ])
+  end
+
+  it "renders a list of common_lisences" do
+    render
+  end
+end
diff --git a/spec/views/common_lisences/new.html.erb_spec.rb b/spec/views/common_lisences/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..3b449a0
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "common_lisences/new.html.erb" do
+  before(:each) do
+    assign(:common_lisence, stub_model(CommonLisence).as_new_record)
+  end
+
+  it "renders new common_lisence form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => common_lisences_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/common_lisences/show.html.erb_spec.rb b/spec/views/common_lisences/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..afd446a
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "common_lisences/show.html.erb" do
+  before(:each) do
+    @common_lisence = assign(:common_lisence, stub_model(CommonLisence))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/lisences/edit.html.erb_spec.rb b/spec/views/lisences/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..df25488
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "lisences/edit.html.erb" do
+  before(:each) do
+    @lisence = assign(:lisence, stub_model(Lisence))
+  end
+
+  it "renders the edit lisence form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => lisences_path(@lisence), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/lisences/index.html.erb_spec.rb b/spec/views/lisences/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..81d62e8
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "lisences/index.html.erb" do
+  before(:each) do
+    assign(:lisences, [
+      stub_model(Lisence),
+      stub_model(Lisence)
+    ])
+  end
+
+  it "renders a list of lisences" do
+    render
+  end
+end
diff --git a/spec/views/lisences/new.html.erb_spec.rb b/spec/views/lisences/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..8e76acc
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "lisences/new.html.erb" do
+  before(:each) do
+    assign(:lisence, stub_model(Lisence).as_new_record)
+  end
+
+  it "renders new lisence form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => lisences_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/lisences/show.html.erb_spec.rb b/spec/views/lisences/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..1fc83c2
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "lisences/show.html.erb" do
+  before(:each) do
+    @lisence = assign(:lisence, stub_model(Lisence))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/original_lisences/edit.html.erb_spec.rb b/spec/views/original_lisences/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..c909a58
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "original_lisences/edit.html.erb" do
+  before(:each) do
+    @original_lisence = assign(:original_lisence, stub_model(OriginalLisence))
+  end
+
+  it "renders the edit original_lisence form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => original_lisences_path(@original_lisence), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/original_lisences/index.html.erb_spec.rb b/spec/views/original_lisences/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..b9df377
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "original_lisences/index.html.erb" do
+  before(:each) do
+    assign(:original_lisences, [
+      stub_model(OriginalLisence),
+      stub_model(OriginalLisence)
+    ])
+  end
+
+  it "renders a list of original_lisences" do
+    render
+  end
+end
diff --git a/spec/views/original_lisences/new.html.erb_spec.rb b/spec/views/original_lisences/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..ff3ca11
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "original_lisences/new.html.erb" do
+  before(:each) do
+    assign(:original_lisence, stub_model(OriginalLisence).as_new_record)
+  end
+
+  it "renders new original_lisence form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => original_lisences_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/original_lisences/show.html.erb_spec.rb b/spec/views/original_lisences/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..4093922
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "original_lisences/show.html.erb" do
+  before(:each) do
+    @original_lisence = assign(:original_lisence, stub_model(OriginalLisence))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/original_pictures/edit.html.erb_spec.rb b/spec/views/original_pictures/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..7cb7d2c
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "original_pictures/edit.html.erb" do
+  before(:each) do
+    @original_picture = assign(:original_picture, stub_model(OriginalPicture))
+  end
+
+  it "renders the edit original_picture form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => original_pictures_path(@original_picture), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/original_pictures/index.html.erb_spec.rb b/spec/views/original_pictures/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..7634112
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "original_pictures/index.html.erb" do
+  before(:each) do
+    assign(:original_pictures, [
+      stub_model(OriginalPicture),
+      stub_model(OriginalPicture)
+    ])
+  end
+
+  it "renders a list of original_pictures" do
+    render
+  end
+end
diff --git a/spec/views/original_pictures/new.html.erb_spec.rb b/spec/views/original_pictures/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..ce1cba0
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "original_pictures/new.html.erb" do
+  before(:each) do
+    assign(:original_picture, stub_model(OriginalPicture).as_new_record)
+  end
+
+  it "renders new original_picture form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => original_pictures_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/original_pictures/show.html.erb_spec.rb b/spec/views/original_pictures/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..51184ac
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "original_pictures/show.html.erb" do
+  before(:each) do
+    @original_picture = assign(:original_picture, stub_model(OriginalPicture))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/panels/edit.html.erb_spec.rb b/spec/views/panels/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..ac7a29f
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "panels/edit.html.erb" do
+  before(:each) do
+    @panel = assign(:panel, stub_model(Panel))
+  end
+
+  it "renders the edit panel form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => panels_path(@panel), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/panels/index.html.erb_spec.rb b/spec/views/panels/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..b2a5172
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "panels/index.html.erb" do
+  before(:each) do
+    assign(:panels, [
+      stub_model(Panel),
+      stub_model(Panel)
+    ])
+  end
+
+  it "renders a list of panels" do
+    render
+  end
+end
diff --git a/spec/views/panels/new.html.erb_spec.rb b/spec/views/panels/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..afcefb4
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "panels/new.html.erb" do
+  before(:each) do
+    assign(:panel, stub_model(Panel).as_new_record)
+  end
+
+  it "renders new panel form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => panels_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/panels/show.html.erb_spec.rb b/spec/views/panels/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..da66f77
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "panels/show.html.erb" do
+  before(:each) do
+    @panel = assign(:panel, stub_model(Panel))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/pictures/edit.html.erb_spec.rb b/spec/views/pictures/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..a9f82b1
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "pictures/edit.html.erb" do
+  before(:each) do
+    @picture = assign(:picture, stub_model(Picture))
+  end
+
+  it "renders the edit picture form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => pictures_path(@picture), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/pictures/index.html.erb_spec.rb b/spec/views/pictures/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..06f977b
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "pictures/index.html.erb" do
+  before(:each) do
+    assign(:pictures, [
+      stub_model(Picture),
+      stub_model(Picture)
+    ])
+  end
+
+  it "renders a list of pictures" do
+    render
+  end
+end
diff --git a/spec/views/pictures/new.html.erb_spec.rb b/spec/views/pictures/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..dde0348
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "pictures/new.html.erb" do
+  before(:each) do
+    assign(:picture, stub_model(Picture).as_new_record)
+  end
+
+  it "renders new picture form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => pictures_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/pictures/show.html.erb_spec.rb b/spec/views/pictures/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..dec106e
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "pictures/show.html.erb" do
+  before(:each) do
+    @picture = assign(:picture, stub_model(Picture))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/source_pictures/edit.html.erb_spec.rb b/spec/views/source_pictures/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..c7eb6d7
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "source_pictures/edit.html.erb" do
+  before(:each) do
+    @source_picture = assign(:source_picture, stub_model(SourcePicture))
+  end
+
+  it "renders the edit source_picture form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => source_pictures_path(@source_picture), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/source_pictures/index.html.erb_spec.rb b/spec/views/source_pictures/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..5f767b3
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "source_pictures/index.html.erb" do
+  before(:each) do
+    assign(:source_pictures, [
+      stub_model(SourcePicture),
+      stub_model(SourcePicture)
+    ])
+  end
+
+  it "renders a list of source_pictures" do
+    render
+  end
+end
diff --git a/spec/views/source_pictures/new.html.erb_spec.rb b/spec/views/source_pictures/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..29bf705
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "source_pictures/new.html.erb" do
+  before(:each) do
+    assign(:source_picture, stub_model(SourcePicture).as_new_record)
+  end
+
+  it "renders new source_picture form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => source_pictures_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/source_pictures/show.html.erb_spec.rb b/spec/views/source_pictures/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..e1da0b6
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "source_pictures/show.html.erb" do
+  before(:each) do
+    @source_picture = assign(:source_picture, stub_model(SourcePicture))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/speach_baloons/edit.html.erb_spec.rb b/spec/views/speach_baloons/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..2dcb015
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "speach_baloons/edit.html.erb" do
+  before(:each) do
+    @speach_baloon = assign(:speach_baloon, stub_model(SpeachBaloon))
+  end
+
+  it "renders the edit speach_baloon form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => speach_baloons_path(@speach_baloon), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/speach_baloons/index.html.erb_spec.rb b/spec/views/speach_baloons/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..5b32124
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "speach_baloons/index.html.erb" do
+  before(:each) do
+    assign(:speach_baloons, [
+      stub_model(SpeachBaloon),
+      stub_model(SpeachBaloon)
+    ])
+  end
+
+  it "renders a list of speach_baloons" do
+    render
+  end
+end
diff --git a/spec/views/speach_baloons/new.html.erb_spec.rb b/spec/views/speach_baloons/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..3f23037
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "speach_baloons/new.html.erb" do
+  before(:each) do
+    assign(:speach_baloon, stub_model(SpeachBaloon).as_new_record)
+  end
+
+  it "renders new speach_baloon form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => speach_baloons_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/speach_baloons/show.html.erb_spec.rb b/spec/views/speach_baloons/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..c1647e3
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "speach_baloons/show.html.erb" do
+  before(:each) do
+    @speach_baloon = assign(:speach_baloon, stub_model(SpeachBaloon))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/speach_templates/edit.html.erb_spec.rb b/spec/views/speach_templates/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..049a756
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "speach_templates/edit.html.erb" do
+  before(:each) do
+    @speach_template = assign(:speach_template, stub_model(SpeachTemplate))
+  end
+
+  it "renders the edit speach_template form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => speach_templates_path(@speach_template), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/speach_templates/index.html.erb_spec.rb b/spec/views/speach_templates/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..84c0e59
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "speach_templates/index.html.erb" do
+  before(:each) do
+    assign(:speach_templates, [
+      stub_model(SpeachTemplate),
+      stub_model(SpeachTemplate)
+    ])
+  end
+
+  it "renders a list of speach_templates" do
+    render
+  end
+end
diff --git a/spec/views/speach_templates/new.html.erb_spec.rb b/spec/views/speach_templates/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..0b41c70
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "speach_templates/new.html.erb" do
+  before(:each) do
+    assign(:speach_template, stub_model(SpeachTemplate).as_new_record)
+  end
+
+  it "renders new speach_template form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => speach_templates_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/speach_templates/show.html.erb_spec.rb b/spec/views/speach_templates/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..a42cd9a
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "speach_templates/show.html.erb" do
+  before(:each) do
+    @speach_template = assign(:speach_template, stub_model(SpeachTemplate))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/speachbaloons/edit.html.erb_spec.rb b/spec/views/speachbaloons/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..152b1bb
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "speachbaloons/edit.html.erb" do
+  before(:each) do
+    @speachbaloon = assign(:speachbaloon, stub_model(Speachbaloon))
+  end
+
+  it "renders the edit speachbaloon form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => speachbaloons_path(@speachbaloon), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/speachbaloons/index.html.erb_spec.rb b/spec/views/speachbaloons/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..e6647af
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "speachbaloons/index.html.erb" do
+  before(:each) do
+    assign(:speachbaloons, [
+      stub_model(Speachbaloon),
+      stub_model(Speachbaloon)
+    ])
+  end
+
+  it "renders a list of speachbaloons" do
+    render
+  end
+end
diff --git a/spec/views/speachbaloons/new.html.erb_spec.rb b/spec/views/speachbaloons/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..13dca10
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "speachbaloons/new.html.erb" do
+  before(:each) do
+    assign(:speachbaloon, stub_model(Speachbaloon).as_new_record)
+  end
+
+  it "renders new speachbaloon form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => speachbaloons_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/speachbaloons/show.html.erb_spec.rb b/spec/views/speachbaloons/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..ecea8ec
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "speachbaloons/show.html.erb" do
+  before(:each) do
+    @speachbaloon = assign(:speachbaloon, stub_model(Speachbaloon))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/spec/views/speaches/edit.html.erb_spec.rb b/spec/views/speaches/edit.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..6730778
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "speaches/edit.html.erb" do
+  before(:each) do
+    @speach = assign(:speach, stub_model(Speach))
+  end
+
+  it "renders the edit speach form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => speaches_path(@speach), :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/speaches/index.html.erb_spec.rb b/spec/views/speaches/index.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..2a669b6
--- /dev/null
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "speaches/index.html.erb" do
+  before(:each) do
+    assign(:speaches, [
+      stub_model(Speach),
+      stub_model(Speach)
+    ])
+  end
+
+  it "renders a list of speaches" do
+    render
+  end
+end
diff --git a/spec/views/speaches/new.html.erb_spec.rb b/spec/views/speaches/new.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..65b98ec
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "speaches/new.html.erb" do
+  before(:each) do
+    assign(:speach, stub_model(Speach).as_new_record)
+  end
+
+  it "renders new speach form" do
+    render
+
+    # Run the generator again with the --webrat flag if you want to use webrat matchers
+    assert_select "form", :action => speaches_path, :method => "post" do
+    end
+  end
+end
diff --git a/spec/views/speaches/show.html.erb_spec.rb b/spec/views/speaches/show.html.erb_spec.rb
new file mode 100644 (file)
index 0000000..fa28c09
--- /dev/null
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "speaches/show.html.erb" do
+  before(:each) do
+    @speach = assign(:speach, stub_model(Speach))
+  end
+
+  it "renders attributes in <p>" do
+    render
+  end
+end
diff --git a/vendor/assets/stylesheets/.gitkeep b/vendor/assets/stylesheets/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/vendor/plugins/.gitkeep b/vendor/plugins/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29