diff --git a/Gemfile b/Gemfile index 2c3fd33d..6087ef88 100644 --- a/Gemfile +++ b/Gemfile @@ -23,6 +23,12 @@ gem 'addressable', :require => ['addressable/template', 'addressable/uri'] gem 'whenever', '~> 0.6.2', :require => false +gem 'swf_converter', '~> 0.0.3' + +gem 'resque', '~> 1.15.0' + +gem 'right_aws', '~> 2.1.0' + group :development_async do # async wrappers gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git' @@ -42,9 +48,9 @@ end group :production do gem 'thin', '~> 1.2.7' - + gem 'mysql2' - + gem 'memcache-client', '~> 1.8.5', :require => ['memcache', 'memcache/event_machine'] end @@ -52,3 +58,4 @@ group :test do gem 'factory_girl_rails', '~> 1.0' gem 'rspec-rails', '~> 2.0.0.beta.22' end + diff --git a/Gemfile.lock b/Gemfile.lock index 57257ae7..4c52aeb7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -97,6 +97,7 @@ GEM jammit (0.5.4) closure-compiler (>= 0.1.0) yui-compressor (>= 0.9.1) + json (1.4.6) mail (2.2.15) activesupport (>= 2.3.6) i18n (>= 0.4.0) @@ -130,6 +131,17 @@ GEM thor (~> 0.14.4) rake (0.8.7) rdiscount (1.6.8) + redis (2.2.0) + redis-namespace (0.10.0) + redis (< 3.0.0) + resque (1.15.0) + json (~> 1.4.6) + redis-namespace (>= 0.10.0) + sinatra (>= 0.9.2) + vegas (~> 0.1.2) + right_aws (2.1.0) + right_http_connection (>= 1.2.5) + right_http_connection (1.3.0) rspec (2.0.1) rspec-core (~> 2.0.1) rspec-expectations (~> 2.0.1) @@ -143,14 +155,21 @@ GEM rspec-rails (2.0.1) rspec (~> 2.0.0) ruby-hmac (0.4.0) + sinatra (1.2.6) + rack (~> 1.1) + tilt (< 2.0, >= 1.2.2) + swf_converter (0.0.3) thin (1.2.7) daemons (>= 1.0.9) eventmachine (>= 0.12.6) rack (>= 1.0.0) thor (0.14.6) + tilt (1.3) treetop (1.4.9) polyglot (>= 0.3.1) tzinfo (0.3.24) + vegas (0.1.8) + rack (>= 1.0.0) warden (1.0.3) rack (>= 1.0.0) whenever (0.6.2) @@ -183,7 +202,10 @@ DEPENDENCIES rack-fiber_pool rails (= 3.0.4) rdiscount (~> 1.6.5) + resque (~> 1.15.0) + right_aws (~> 2.1.0) rspec-rails (~> 2.0.0.beta.22) + swf_converter (~> 0.0.3) thin (~> 1.2.7) whenever (~> 0.6.2) will_paginate (~> 3.0.pre2) diff --git a/Rakefile b/Rakefile index fb3c6050..927f8f09 100644 --- a/Rakefile +++ b/Rakefile @@ -8,3 +8,4 @@ require 'rake/testtask' require 'rake/rdoctask' OpenneoImpressItems::Application.load_tasks + diff --git a/app/controllers/swf_assets_controller.rb b/app/controllers/swf_assets_controller.rb index 60fa7195..1eadc135 100644 --- a/app/controllers/swf_assets_controller.rb +++ b/app/controllers/swf_assets_controller.rb @@ -26,9 +26,28 @@ class SwfAssetsController < ApplicationController json = @swf_assets.map { |a| a.as_json(:parent_id => pet_state_id, :for => 'wardrobe') } elsif params[:pet_type_id] @swf_assets = PetType.find(params[:pet_type_id]).pet_states.emotion_order.first.swf_assets + elsif params[:ids] + @swf_assets = [] + if params[:ids][:biology] + @swf_assets += SwfAsset.biology_assets.where(:id => params[:ids][:biology]).all + end + if params[:ids][:object] + @swf_assets += SwfAsset.object_assets.where(:id => params[:ids][:object]).all + end + end + if @swf_assets + @swf_assets = @swf_assets.all unless @swf_assets.is_a? Array + @swf_assets.each(&:request_image_conversion!) + json = @swf_assets unless json + else + json = nil end - json ||= @swf_assets ? @swf_assets.all : nil render :json => json end + + def show + @swf_asset = SwfAsset.find params[:id] + render :json => @swf_asset + end end diff --git a/app/models/asset_image_conversion_request.rb b/app/models/asset_image_conversion_request.rb new file mode 100644 index 00000000..2d5d1a09 --- /dev/null +++ b/app/models/asset_image_conversion_request.rb @@ -0,0 +1,13 @@ +class AssetImageConversionRequest + @queue = :requested_asset_images + + def self.perform(asset_type, asset_id) + asset = SwfAsset.where(:type => asset_type).find(asset_id) + asset.convert_swf_if_not_converted! + end + + class OnCreation < AssetImageConversionRequest + @queue = :requested_asset_images_on_creation + end +end + diff --git a/app/models/swf_asset.rb b/app/models/swf_asset.rb index 4455e8df..23c2779c 100644 --- a/app/models/swf_asset.rb +++ b/app/models/swf_asset.rb @@ -1,9 +1,88 @@ +require 'fileutils' +require 'uri' + class SwfAsset < ActiveRecord::Base PUBLIC_ASSET_DIR = File.join('swfs', 'outfit') LOCAL_ASSET_DIR = Rails.root.join('public', PUBLIC_ASSET_DIR) + IMAGE_BUCKET = IMPRESS_S3.bucket('impress-asset-images') + IMAGE_PERMISSION = 'public-read' + IMAGE_HEADERS = { + 'Cache-Control' => 'max-age=315360000', + 'Content-Type' => 'image/png' + } NEOPETS_ASSET_SERVER = 'http://images.neopets.com' + set_inheritance_column 'inheritance_type' + include SwfConverter + converts_swfs :size => [600, 600], :output_sizes => [[150, 150], [300, 300], [600, 600]] + + def local_swf_path + LOCAL_ASSET_DIR.join(local_path_within_outfit_swfs) + end + + def swf_image_path(size) + Rails.root.join('tmp', 'asset_images_before_upload', self.id.to_s, "#{size.join 'x'}.png") + end + + def after_swf_conversion(images) + images.each do |size, path| + key = s3_key(size) + print "Uploading #{key}..." + IMAGE_BUCKET.put( + key, + File.open(path), + {}, # meta headers + IMAGE_PERMISSION, # permission + IMAGE_HEADERS + ) + puts "done." + + FileUtils.rm path + end + end + + def s3_key(size) + URI.encode("#{s3_path}/#{size.join 'x'}.png") + end + + def s3_path + "#{type}/#{s3_partition_path}#{self.id}" + end + + PARTITION_COUNT = 3 + PARTITION_DIGITS = 3 + PARTITION_ID_LENGTH = PARTITION_COUNT * PARTITION_DIGITS + def s3_partition_path + (id / 10**PARTITION_DIGITS).to_s.rjust(PARTITION_ID_LENGTH, '0').tap do |id_str| + PARTITION_COUNT.times do |n| + id_str.insert(PARTITION_ID_LENGTH - (n * PARTITION_DIGITS), '/') + end + end + end + + def convert_swf_if_not_converted! + if has_image? + false + else + convert_swf! + self.has_image = true + save! + true + end + end + + def request_image_conversion! + if image_requested? + false + else + Resque.enqueue(AssetImageConversionRequest, self.type, self.id) + self.image_requested = true + save! + true + end + end + attr_accessor :item has_one :contribution, :as => :contributed @@ -40,11 +119,14 @@ class SwfAsset < ActiveRecord::Base def as_json(options={}) json = { :id => id, + :type => type, :depth => depth, :body_id => body_id, :zone_id => zone_id, :zones_restrict => zones_restrict, - :is_body_specific => body_specific? + :is_body_specific => body_specific?, + :has_image => has_image?, + :s3_path => s3_path } if options[:for] == 'wardrobe' json[:local_path] = local_url @@ -117,6 +199,10 @@ class SwfAsset < ActiveRecord::Base self.body_id = 0 if !self.body_specific? || (!self.new_record? && self.body_id_changed?) end + after_commit :on => :create do + Resque.enqueue(AssetImageConversionRequest::OnCreation, self.type, self.id) + end + class DownloadError < Exception;end private diff --git a/app/stylesheets/outfits/_edit.sass b/app/stylesheets/outfits/_edit.sass index a6d2a537..4ccf69ca 100644 --- a/app/stylesheets/outfits/_edit.sass +++ b/app/stylesheets/outfits/_edit.sass @@ -1,4 +1,5 @@ @import ../shared/jquery.jgrowl +@import partials/wardrobe @import icon @import star @@ -156,6 +157,16 @@ body.outfits-edit margin-bottom: 1em position: relative width: $preview-dimension + &.swf-adapter + #preview-image-container + display: none + &.image-adapter + #preview-swf-container + display: none + #preview-image-container + +wardrobe-image-wrapper + margin: 1em auto + position: relative #preview-swf-overlay +opacity(0) background: black @@ -164,6 +175,18 @@ body.outfits-edit position: absolute top: 0 width: 100% + #preview-images-pending + background: black + background: rgba(0, 0, 0, 0.75) + bottom: 0 + color: white + font-size: 75% + padding: .5em + position: absolute + right: 0 + z-index: 1000 + &.waiting-on-0 + display: none #preview-sidebar +border-radius(10px) border: 1px solid $soft-border-color diff --git a/app/stylesheets/partials/_wardrobe.sass b/app/stylesheets/partials/_wardrobe.sass new file mode 100644 index 00000000..bd0e792f --- /dev/null +++ b/app/stylesheets/partials/_wardrobe.sass @@ -0,0 +1,6 @@ +=wardrobe-image-wrapper + img + left: 0 + position: absolute + top: 0 + diff --git a/app/views/outfits/edit.html.haml b/app/views/outfits/edit.html.haml index 8132190e..e51db33b 100644 --- a/app/views/outfits/edit.html.haml +++ b/app/views/outfits/edit.html.haml @@ -35,6 +35,7 @@ #preview-swf-container %p Flash and Javascript (but not Java!) are required to preview outfits. %p If this message stays after the page is done loading, check those first. + #preview-image-container #preview-sidebar #outfit-not-found Outfit not found #save-success Outfit successfully saved diff --git a/config/.gitignore b/config/.gitignore index ec2c36e4..b6259f0b 100644 --- a/config/.gitignore +++ b/config/.gitignore @@ -1,3 +1,5 @@ +aws_s3.yml database.yml deploy.rb openneo_auth.yml + diff --git a/config/aws_s3.sample.yml b/config/aws_s3.sample.yml new file mode 100644 index 00000000..b78dbe10 --- /dev/null +++ b/config/aws_s3.sample.yml @@ -0,0 +1,3 @@ +access_key_id: ACCESS_KEY_ID +secret_access_key: SECRET_ACCESS_KEY + diff --git a/config/initializers/aws_s3.rb b/config/initializers/aws_s3.rb new file mode 100644 index 00000000..eda254f9 --- /dev/null +++ b/config/initializers/aws_s3.rb @@ -0,0 +1,8 @@ +require 'yaml' + +config = YAML.load_file Rails.root.join('config', 'aws_s3.yml') +access_key_id = config.delete 'access_key_id' +secret_access_key = config.delete 'secret_access_key' + +IMPRESS_S3 = RightAws::S3.new access_key_id, secret_access_key, config + diff --git a/config/routes.rb b/config/routes.rb index 9416e110..1360da74 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -22,6 +22,7 @@ OpenneoImpressItems::Application.routes.draw do |map| end resources :outfits, :only => [:show, :create, :update, :destroy] resources :pet_attributes, :only => [:index] + resources :swf_assets, :only => [:index, :show] match '/users/current-user/outfits' => 'outfits#index', :as => :current_user_outfits diff --git a/db/migrate/20110514145602_add_has_image_to_swf_assets.rb b/db/migrate/20110514145602_add_has_image_to_swf_assets.rb new file mode 100644 index 00000000..ae477876 --- /dev/null +++ b/db/migrate/20110514145602_add_has_image_to_swf_assets.rb @@ -0,0 +1,10 @@ +class AddHasImageToSwfAssets < ActiveRecord::Migration + def self.up + add_column :swf_assets, :has_image, :boolean, :null => false, :default => false + end + + def self.down + remove_column :swf_assets, :has_image + end +end + diff --git a/db/migrate/20110515134542_add_image_requested_to_swf_assets.rb b/db/migrate/20110515134542_add_image_requested_to_swf_assets.rb new file mode 100644 index 00000000..6162e0ed --- /dev/null +++ b/db/migrate/20110515134542_add_image_requested_to_swf_assets.rb @@ -0,0 +1,10 @@ +class AddImageRequestedToSwfAssets < ActiveRecord::Migration + def self.up + add_column :swf_assets, :image_requested, :boolean, :null => false, :default => false + end + + def self.down + remove_column :swf_assets, :image_requested + end +end + diff --git a/db/schema.rb b/db/schema.rb index 6b2fc1df..cdecbcb9 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,14 +10,14 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20110210222230) do +ActiveRecord::Schema.define(:version => 20110515134542) do create_table "auth_servers", :force => true do |t| - t.string "short_name", :limit => 10, :null => false - t.string "name", :limit => 40, :null => false - t.text "icon", :null => false - t.text "gateway", :null => false - t.string "secret", :limit => 64, :null => false + t.string "short_name", :limit => 10, :null => false + t.string "name", :limit => 40, :null => false + t.text "icon", :limit => 16777215, :null => false + t.text "gateway", :limit => 16777215, :null => false + t.string "secret", :limit => 64, :null => false end create_table "contributions", :force => true do |t| @@ -27,6 +27,14 @@ ActiveRecord::Schema.define(:version => 20110210222230) do t.datetime "created_at", :null => false end + create_table "forums", :force => true do |t| + t.string "name" + t.text "description" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "sort_index" + end + create_table "item_outfit_relationships", :force => true do |t| t.integer "item_id" t.integer "outfit_id" @@ -45,18 +53,18 @@ ActiveRecord::Schema.define(:version => 20110210222230) do add_index "login_cookies", ["user_id"], :name => "login_cookies_user_id" create_table "objects", :force => true do |t| - t.text "zones_restrict", :limit => 255, :null => false - t.text "thumbnail_url", :null => false - t.string "name", :limit => 100, :null => false - t.text "description", :null => false + t.text "zones_restrict", :null => false + t.text "thumbnail_url", :limit => 16777215, :null => false + t.string "name", :limit => 100, :null => false + t.text "description", :limit => 16777215, :null => false t.string "category", :limit => 50 t.string "type", :limit => 50 t.string "rarity", :limit => 25 t.integer "rarity_index", :limit => 2 - t.integer "price", :limit => 3, :null => false + t.integer "price", :limit => 3, :null => false t.integer "weight_lbs", :limit => 2 - t.text "species_support_ids" - t.boolean "sold_in_mall", :null => false + t.text "species_support_ids", :limit => 16777215 + t.boolean "sold_in_mall", :null => false t.datetime "last_spidered" end @@ -83,14 +91,14 @@ ActiveRecord::Schema.define(:version => 20110210222230) do add_index "parents_swf_assets", ["swf_asset_id"], :name => "parents_swf_assets_swf_asset_id" create_table "pet_loads", :force => true do |t| - t.string "pet_name", :limit => 20, :null => false - t.text "amf", :null => false - t.datetime "created_at", :null => false + t.string "pet_name", :limit => 20, :null => false + t.text "amf", :limit => 16777215, :null => false + t.datetime "created_at", :null => false end create_table "pet_states", :force => true do |t| - t.integer "pet_type_id", :limit => 3, :null => false - t.text "swf_asset_ids", :limit => 255, :null => false + t.integer "pet_type_id", :limit => 3, :null => false + t.text "swf_asset_ids", :null => false end add_index "pet_states", ["pet_type_id"], :name => "pet_states_pet_type_id" @@ -113,24 +121,43 @@ ActiveRecord::Schema.define(:version => 20110210222230) do add_index "pets", ["name"], :name => "pets_name", :unique => true add_index "pets", ["pet_type_id"], :name => "pets_pet_type_id" + create_table "posts", :force => true do |t| + t.integer "topic_id" + t.integer "user_id" + t.text "body" + t.datetime "created_at" + t.datetime "updated_at" + end + create_table "schema_info", :id => false, :force => true do |t| t.integer "version", :default => 0, :null => false end create_table "swf_assets", :id => false, :force => true do |t| - t.string "type", :limit => 7, :null => false - t.integer "id", :limit => 3, :null => false - t.text "url", :null => false - t.integer "zone_id", :limit => 1, :null => false - t.text "zones_restrict", :limit => 255, :null => false - t.datetime "created_at", :null => false - t.integer "body_id", :limit => 2, :null => false + t.string "type", :limit => 7, :null => false + t.integer "id", :limit => 3, :null => false + t.text "url", :limit => 16777215, :null => false + t.integer "zone_id", :limit => 1, :null => false + t.text "zones_restrict", :null => false + t.datetime "created_at", :null => false + t.integer "body_id", :limit => 2, :null => false + t.boolean "has_image", :default => false, :null => false + t.boolean "image_requested", :default => false, :null => false end add_index "swf_assets", ["body_id"], :name => "swf_assets_body_id_and_object_id" add_index "swf_assets", ["type", "id"], :name => "swf_assets_type_and_id" add_index "swf_assets", ["zone_id"], :name => "idx_swf_assets_zone_id" + create_table "topics", :force => true do |t| + t.string "title" + t.integer "user_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "forum_id" + t.integer "original_post_id" + end + create_table "users", :force => true do |t| t.string "name", :limit => 20, :null => false t.integer "auth_server_id", :limit => 1, :null => false @@ -139,6 +166,8 @@ ActiveRecord::Schema.define(:version => 20110210222230) do t.boolean "beta", :default => false, :null => false t.string "remember_token" t.datetime "remember_created_at" + t.boolean "forum_admin", :default => false, :null => false + t.boolean "forum_moderator" end create_table "zones", :force => true do |t| diff --git a/lib/tasks/resque.rake b/lib/tasks/resque.rake new file mode 100644 index 00000000..d2e2a27b --- /dev/null +++ b/lib/tasks/resque.rake @@ -0,0 +1,4 @@ +require 'resque/tasks' + +task "resque:setup" => :environment + diff --git a/public/images/outfit/.gitignore b/public/images/outfit/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/public/images/outfit/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/public/javascripts/outfits/edit.js b/public/javascripts/outfits/edit.js index c6daef0f..7301b69b 100644 --- a/public/javascripts/outfits/edit.js +++ b/public/javascripts/outfits/edit.js @@ -25,8 +25,9 @@ var Partial = {}, main_wardrobe, View = Wardrobe.getStandardView({ Preview: { swf_url: '/swfs/preview.swf?v=0.12', - wrapper: $('#preview'), - placeholder: $('#preview-swf-container') + wrapper: $('#preview-swf'), + placeholder: $('#preview-swf-container'), + image_container: '#preview-image-container' } }); @@ -223,18 +224,6 @@ View.Fullscreen = function (wardrobe) { wardrobe.item_zone_sets.bind('update', fitSoon); wardrobe.pet_attributes.bind('update', fitSoon); fit(); - - var Konami=function(){var a={addEvent:function(b,c,d,e){if(b.addEventListener)b.addEventListener(c,d,false);else if(b.attachEvent){b["e"+c+d]=d;b[c+d]=function(){b["e"+c+d](window.event,e)};b.attachEvent("on"+c,b[c+d])}},input:"",pattern:"3838404037393739666513",load:function(b){this.addEvent(document,"keydown",function(c,d){if(d)a=d;a.input+=c?c.keyCode:event.keyCode;if(a.input.indexOf(a.pattern)!=-1){a.code(b);a.input=""}},this);this.iphone.load(b)},code:function(b){window.location=b},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:false,capture:false,keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(b){a.code(b)},load:function(b){a.addEvent(document,"touchmove",function(c){if(c.touches.length==1&&a.iphone.capture==true){c=c.touches[0];a.iphone.stop_x=c.pageX;a.iphone.stop_y=c.pageY;a.iphone.tap=false;a.iphone.capture=false;a.iphone.check_direction()}});a.addEvent(document,"touchend",function(){a.iphone.tap==true&&a.iphone.check_direction(b)},false);a.addEvent(document,"touchstart",function(c){a.iphone.start_x=c.changedTouches[0].pageX;a.iphone.start_y=c.changedTouches[0].pageY;a.iphone.tap=true;a.iphone.capture=true})},check_direction:function(b){x_magnitude=Math.abs(this.start_x-this.stop_x);y_magnitude=Math.abs(this.start_y-this.stop_y);x=this.start_x-this.stop_x<0?"RIGHT":"LEFT";y=this.start_y-this.stop_y<0?"DOWN":"UP";result=x_magnitude>y_magnitude?x:y;result=this.tap==true?"TAP":result;if(result==this.keys[0])this.keys=this.keys.slice(1,this.keys.length);this.keys.length==0&&this.code(b)}}};return a}; - konami = new Konami(); - konami.code = function () { - overrideFull = true; - $(document.body).removeClass('fullscreen'); - preview_swf.removeAttr('style').css('visibility', 'visible'); - preview_el.removeAttr('style'); - wardrobe.search.setItemsByQuery(wardrobe.search.request.query, {offset: wardrobe.search.request.offset}); - full = false; - } - konami.load(); } View.Hash = function (wardrobe) { @@ -825,6 +814,16 @@ View.PetTypeForm = function (wardrobe) { }); } +View.PreviewAdapterForm = function (wardrobe) { + var preview = wardrobe.views.Preview; + var Konami=function(){var a={addEvent:function(b,c,d,e){if(b.addEventListener)b.addEventListener(c,d,false);else if(b.attachEvent){b["e"+c+d]=d;b[c+d]=function(){b["e"+c+d](window.event,e)};b.attachEvent("on"+c,b[c+d])}},input:"",pattern:"3838404037393739666513",load:function(b){this.addEvent(document,"keydown",function(c,d){if(d)a=d;a.input+=c?c.keyCode:event.keyCode;if(a.input.indexOf(a.pattern)!=-1){a.code(b);a.input=""}},this);this.iphone.load(b)},code:function(b){window.location=b},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:false,capture:false,keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(b){a.code(b)},load:function(b){a.addEvent(document,"touchmove",function(c){if(c.touches.length==1&&a.iphone.capture==true){c=c.touches[0];a.iphone.stop_x=c.pageX;a.iphone.stop_y=c.pageY;a.iphone.tap=false;a.iphone.capture=false;a.iphone.check_direction()}});a.addEvent(document,"touchend",function(){a.iphone.tap==true&&a.iphone.check_direction(b)},false);a.addEvent(document,"touchstart",function(c){a.iphone.start_x=c.changedTouches[0].pageX;a.iphone.start_y=c.changedTouches[0].pageY;a.iphone.tap=true;a.iphone.capture=true})},check_direction:function(b){x_magnitude=Math.abs(this.start_x-this.stop_x);y_magnitude=Math.abs(this.start_y-this.stop_y);x=this.start_x-this.stop_x<0?"RIGHT":"LEFT";y=this.start_y-this.stop_y<0?"DOWN":"UP";result=x_magnitude>y_magnitude?x:y;result=this.tap==true?"TAP":result;if(result==this.keys[0])this.keys=this.keys.slice(1,this.keys.length);this.keys.length==0&&this.code(b)}}};return a}; + konami = new Konami(); + konami.code = function () { + preview.toggleAdapter(); + } + konami.load(); +} + View.Search = function (wardrobe) { var form_selector = '#preview-search-form', form = $(form_selector), item_set = new Partial.ItemSet(wardrobe, form_selector + ' ul'), diff --git a/public/javascripts/wardrobe.js b/public/javascripts/wardrobe.js index 84198af5..e1e92d1a 100644 --- a/public/javascripts/wardrobe.js +++ b/public/javascripts/wardrobe.js @@ -76,13 +76,22 @@ function Wardrobe() { } } - function Asset(data) { + function Asset(newData) { var asset = this; - for(var key in data) { - if(data.hasOwnProperty(key)) { - asset[key] = data[key]; + + this.imageURL = function (size) { + return Wardrobe.IMAGE_CONFIG.base_url + this.s3_path + "/" + size[0] + "x" + size[1] + ".png"; + } + + this.update = function (data) { + for(var key in data) { + if(data.hasOwnProperty(key)) { + asset[key] = data[key]; + } } } + + this.update(newData); } function BiologyAsset(data) { @@ -282,7 +291,8 @@ function Wardrobe() { // note: may contain duplicates - loop through assets, not these, for // best performance var restricted_zones = [], - restrictors = outfit.worn_items.concat(outfit.pet_state.assets); + restrictors = outfit.worn_items; + if(outfit.pet_state) restrictors = restrictors.concat(outfit.pet_state.assets); $.each(restrictors, function () { restricted_zones = restricted_zones.concat(this.restricted_zones); }); @@ -377,8 +387,9 @@ function Wardrobe() { } this.getVisibleAssets = function () { - var assets = this.pet_state.assets, restricted_zones = getRestrictedZones(), + var assets, restricted_zones = getRestrictedZones(), visible_assets = []; + assets = this.pet_state ? this.pet_state.assets : []; for(var i = 0; i < outfit.worn_items.length; i++) { assets = assets.concat(outfit.worn_items[i].getAssetsFitting(outfit.pet_type)); } @@ -719,8 +730,6 @@ function Wardrobe() { return pet_type; } - function SwfAsset() {} - /* * * Controllers @@ -1127,6 +1136,15 @@ function Wardrobe() { } } +Wardrobe.IMAGE_CONFIG = { + base_url: "https://s3.amazonaws.com/impress-asset-images/", + sizes: [ + [600, 600], + [300, 300], + [150, 150] + ] +} + Wardrobe.StandardPreview = { views_by_swf_id: {} }; @@ -1176,47 +1194,190 @@ Wardrobe.getStandardView = function (options) { } StandardView.Preview = function (wardrobe) { + var preview = this; var preview_el = $(options.Preview.wrapper), - preview_swf_placeholder = $(options.Preview.placeholder), - preview_swf_id = preview_swf_placeholder.attr('id'), - preview_swf, - update_pending_flash = false; + preview_swf_placeholder = $(options.Preview.placeholder); - swfobject.embedSWF( - options.Preview.swf_url, - preview_swf_id, - '100%', - '100%', - '9', - '/assets/js/swfobject/expressInstall.swf', - {'id': preview_swf_id}, - {'wmode': 'transparent'} - ); - - Wardrobe.StandardPreview.views_by_swf_id[preview_swf_id] = this; - - this.previewSWFIsReady = function () { - preview_swf = document.getElementById(preview_swf_id); - if(update_pending_flash) { + function SWFAdapter() { + var preview_swf_id = preview_swf_placeholder.attr('id'), + preview_swf, update_pending_flash = false; - updateAssets(); + + preview_el.removeClass('image-adapter').addClass('swf-adapter'); + + swfobject.embedSWF( + options.Preview.swf_url, + preview_swf_id, + '100%', + '100%', + '9', + '/assets/js/swfobject/expressInstall.swf', + {'id': preview_swf_id}, + {'wmode': 'transparent'} + ); + + Wardrobe.StandardPreview.views_by_swf_id[preview_swf_id] = this; + + this.previewSWFIsReady = function () { + preview_swf = document.getElementById(preview_swf_id); + if(update_pending_flash) { + update_pending_flash = false; + this.updateAssets(); + } + } + + this.updateAssets = function () { + var assets, assets_for_swf; + if(update_pending_flash) return false; + if(preview_swf && preview_swf.setAssets) { + assets = wardrobe.outfit.getVisibleAssets(); + preview_swf.setAssets(assets); + } else { + update_pending_flash = true; + } } } - function updateAssets() { - var assets, assets_for_swf; - if(update_pending_flash) return false; - if(preview_swf && preview_swf.setAssets) { - assets = wardrobe.outfit.getVisibleAssets(); - preview_swf.setAssets(assets); - } else { - update_pending_flash = true; + function ImageAdapter() { + var pendingAssets = {}, pendingAssetIds = [], pendingInterval, + pendingAssetsCount = 0, + pendingMessageEl = $('', {id: 'preview-images-pending'}), + previewImageContainer = $(options.Preview.image_container); + + var ASSET_PING_RATE = 5000; + + preview_el.removeClass('swf-adapter').addClass('image-adapter'); + pendingMessageEl.appendTo(previewImageContainer); + + this.updateAssets = function () { + var assets = wardrobe.outfit.getVisibleAssets(), asset, + availableAssets = []; + pendingAssets = {}; + pendingAssetsCount = 0; + clearView(); + for(var i in assets) { + if(!assets.hasOwnProperty(i)) continue; + asset = assets[i]; + if(asset.has_image) { + addToView(asset); + } else { + pendingAssets[asset.id] = asset; + pendingAssetsCount++; + } + } + updatePendingStatus(); } + + function addToView(asset) { + $( + '', + { + css: { + zIndex: asset.depth + }, + src: asset.imageURL(bestSize()) + } + ).appendTo(previewImageContainer); + } + + // TODO: choose new best size on window resize + function bestSize() { + var sizes = Wardrobe.IMAGE_CONFIG.sizes, + width = preview_el.width(), height = preview_el.height(); + for(var i in sizes) { + if(sizes[i][0] < width && sizes[i][1] < height) return sizes[i]; + } + return sizes[sizes.length - 1]; + } + + function clearView() { + previewImageContainer.children('img').remove(); + } + + function loadPendingAssets() { + var pendingAssetIds = { + biology: [], + object: [] + }, asset; + for(var i in pendingAssets) { + if(pendingAssets.hasOwnProperty(i)) { + pendingAssetIds[pendingAssets[i].type].push(pendingAssets[i].id); + } + } + $.getJSON( + '/swf_assets.json', + { + ids: pendingAssetIds + }, + function (assetsData) { + var assetData, asset; + for(var i in assetsData) { + assetData = assetsData[i]; + if(assetData.has_image && pendingAssets.hasOwnProperty(assetData.id)) { + asset = pendingAssets[assetData.id]; + asset.update(assetData); + delete pendingAssets[assetData.id]; + pendingAssetsCount--; + addToView(asset); + } + } + updatePendingStatus(); + } + ); + } + + function updateContainerSize() { + var size = bestSize(); + previewImageContainer.css({ + height: size[1], + width: size[0] + }); + } + + function updatePendingInterval() { + if(pendingAssetsCount) { + if(pendingInterval == null) { + pendingInterval = setInterval(loadPendingAssets, ASSET_PING_RATE); + } + } else { + if(pendingInterval != null) { + clearInterval(pendingInterval); + pendingInterval = null; + } + } + } + + function updatePendingMessage() { + pendingMessageEl.text("Waiting on " + pendingAssetsCount + " images"). + attr("className", "waiting-on-" + pendingAssetsCount); + } + + function updatePendingStatus() { + updatePendingInterval(); + updatePendingMessage(); + } + + updateContainerSize(); + $(window).resize(updateContainerSize); + } + + this.adapter = new SWFAdapter(); + + function updateAssets() { + preview.adapter.updateAssets(); } wardrobe.outfit.bind('updateWornItems', updateAssets); wardrobe.outfit.bind('updateItemAssets', updateAssets); wardrobe.outfit.bind('updatePetState', updateAssets); + + this.useSWFAdapter = function () { preview.adapter = new SWFAdapter(); updateAssets(); } + this.useImageAdapter = function () { preview.adapter = new ImageAdapter(); updateAssets(); } + this.toggleAdapter = function () { + var nextAdapter = preview.adapter.constructor == SWFAdapter ? ImageAdapter : SWFAdapter; + preview.adapter = new nextAdapter(); + updateAssets(); + } } window.previewSWFIsReady = function (id) { diff --git a/public/stylesheets/compiled/screen.css b/public/stylesheets/compiled/screen.css index d5459c0f..1e4174ef 100644 --- a/public/stylesheets/compiled/screen.css +++ b/public/stylesheets/compiled/screen.css @@ -760,12 +760,12 @@ body.items-show .nc-icon { } @import url(../shared/jquery.jgrowl.css); -/* line 107, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 108, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-toolbar { margin-bottom: 0.5em; text-align: left; } -/* line 110, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 111, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-toolbar form { display: -moz-inline-box; -moz-box-orient: vertical; @@ -775,23 +775,23 @@ body.outfits-edit #preview-toolbar form { *vertical-align: auto; margin-right: 2em; } -/* line 113, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 114, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-info form { display: inline; } -/* line 116, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 117, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form ul { list-style: none; } -/* line 118, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 119, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form ul, body.outfits-edit #pet-state-form ul li { display: inline; } -/* line 120, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 121, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form input { display: none; } -/* line 122, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 123, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form label { /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ -moz-border-radius: 5px; @@ -823,7 +823,7 @@ body.outfits-edit #pet-state-form label:hover { body.outfits-edit #pet-state-form label:active { top: 1px; } -/* line 125, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 126, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form li.selected button { background: #0b61a4 url('/images/alert-overlay.png?1296599919') repeat-x; } @@ -831,30 +831,30 @@ body.outfits-edit #pet-state-form li.selected button { body.outfits-edit #pet-state-form li.selected button:hover { background-color: #005093; } -/* line 127, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 128, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form.hidden { visibility: hidden; } -/* line 129, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 130, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit-wrapper { float: right; } -/* line 131, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 132, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit-wrapper button { display: none; } -/* line 133, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 134, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit-wrapper #share-outfit { display: inline-block; } -/* line 135, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 136, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit-wrapper.loading { background-image: url('/images/loading.gif?1296599919'); background-position: left center; background-repeat: no-repeat; padding-left: 20px; } -/* line 141, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 142, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit, body.outfits-edit #save-outfit-not-signed-in, body.outfits-edit #save-current-outfit, body.outfits-edit #save-outfit-copy, body.outfits-edit #save-outfit-finish { background: #ff5c00 url('/images/alert-overlay.png?1296599919') repeat-x; } @@ -862,28 +862,28 @@ body.outfits-edit #save-outfit, body.outfits-edit #save-outfit-not-signed-in, bo body.outfits-edit #save-outfit:hover, body.outfits-edit #save-outfit-not-signed-in:hover, body.outfits-edit #save-current-outfit:hover, body.outfits-edit #save-outfit-copy:hover, body.outfits-edit #save-outfit-finish:hover { background-color: #ee4b00; } -/* line 143, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 144, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #current-outfit-permalink, body.outfits-edit #shared-outfit-permalink { display: none; margin-right: 0.25em; } -/* line 146, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 147, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #current-outfit-permalink img, body.outfits-edit #shared-outfit-permalink img { bottom: -2px; height: 16px; position: relative; width: 16px; } -/* line 148, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 149, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #shared-outfit-url { display: none; width: 15em; } -/* line 151, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 152, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview { clear: both; } -/* line 153, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 154, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-swf { float: left; height: 400px; @@ -891,7 +891,26 @@ body.outfits-edit #preview-swf { position: relative; width: 400px; } -/* line 159, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 161, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-swf.swf-adapter #preview-image-container { + display: none; +} +/* line 164, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-swf.image-adapter #preview-swf-container { + display: none; +} +/* line 166, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-image-container { + margin: 1em auto; + position: relative; +} +/* line 2, ../../../app/stylesheets/partials/_wardrobe.sass */ +body.outfits-edit #preview-image-container img { + left: 0; + position: absolute; + top: 0; +} +/* line 170, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-swf-overlay { -moz-opacity: 0; -webkit-opacity: 0; @@ -904,7 +923,23 @@ body.outfits-edit #preview-swf-overlay { top: 0; width: 100%; } -/* line 167, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 178, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-images-pending { + background: black; + background: rgba(0, 0, 0, 0.75); + bottom: 0; + color: white; + font-size: 75%; + padding: 0.5em; + position: absolute; + right: 0; + z-index: 1000; +} +/* line 188, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-images-pending.waiting-on-0 { + display: none; +} +/* line 190, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar { -moz-border-radius: 10px; -webkit-border-radius: 10px; @@ -916,73 +951,73 @@ body.outfits-edit #preview-sidebar { overflow: auto; width: 378px; } -/* line 177, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 200, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar.viewing-outfits #preview-closet { display: none; } -/* line 179, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 202, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar.viewing-outfits #preview-outfits { display: block; } -/* line 181, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 204, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar.viewing-saving-outfit { height: auto; max-height: 100%; } -/* line 184, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 207, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar.viewing-saving-outfit #preview-closet { display: none; } -/* line 186, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 209, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar.viewing-saving-outfit #preview-saving-outfit { display: block; } -/* line 189, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 212, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar .sidebar-view h2 { margin-bottom: 0.25em; margin-left: 24px; } -/* line 194, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 217, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet h2 { margin-bottom: 0; } -/* line 196, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 219, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet ul { text-align: center; } -/* line 198, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 221, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet .object { background: #eeffee; } -/* line 200, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 223, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet .object img { -moz-opacity: 0.5; -webkit-opacity: 0.5; -o-opacity: 0.5; -khtml-opacity: 0.5; } -/* line 202, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 225, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet .object.worn { background: transparent; } -/* line 204, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 227, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet .object.worn img { -moz-opacity: 1; -webkit-opacity: 1; -o-opacity: 1; -khtml-opacity: 1; } -/* line 206, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 229, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet .object.no-assets { background: #fbe3e4; color: #8a1f11; padding-bottom: 1.25em; } -/* line 210, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 233, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet .object.no-assets .no-assets-message { display: block; } -/* line 212, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 235, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .no-assets-message { background: #f3dbdc; bottom: 0; @@ -994,7 +1029,7 @@ body.outfits-edit .no-assets-message { position: absolute; width: 100%; } -/* line 222, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 245, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #no-assets-full-message { -moz-border-radius: 5px; -webkit-border-radius: 5px; @@ -1008,12 +1043,12 @@ body.outfits-edit #no-assets-full-message { top: -9999px; width: 30em; } -/* line 233, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 256, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form { clear: both; text-align: left; } -/* line 236, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 259, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form h2 { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1023,7 +1058,7 @@ body.outfits-edit #preview-search-form h2 { *vertical-align: auto; margin: 0 1em 0 0; } -/* line 239, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 262, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form input { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1032,7 +1067,7 @@ body.outfits-edit #preview-search-form input { *display: inline; *vertical-align: auto; } -/* line 241, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 264, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-pagination { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1042,53 +1077,53 @@ body.outfits-edit #preview-search-form-pagination { *vertical-align: auto; margin-left: 2em; } -/* line 244, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 267, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-pagination a, body.outfits-edit #preview-search-form-pagination span { margin: 0 0.25em; } -/* line 246, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 269, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-pagination .current { font-weight: bold; } -/* line 248, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 271, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-clear { display: none; font-size: 87.5%; margin-left: 2em; } -/* line 252, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 275, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-loading { display: none; font-size: 75%; font-style: italic; margin-left: 2em; } -/* line 258, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 281, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-no-results { display: none; } -/* line 260, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 283, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-help { font-size: 87.5%; margin-left: 2em; } -/* line 263, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 286, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .search-helper { font-family: inherit; } -/* line 265, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 288, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .possible-error { display: none; } -/* line 268, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 291, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #fullscreen-copyright { display: none; } -/* line 270, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 293, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen { height: 100%; } -/* line 273, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 296, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #container { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -1101,19 +1136,19 @@ body.outfits-edit.fullscreen #container { position: relative; width: 80%; } -/* line 281, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 304, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen h1 { display: none; } -/* line 283, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 306, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #short-url-response { position: static; } -/* line 285, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 308, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview { width: 100%; } -/* line 287, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 310, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-sidebar { float: right; height: 100%; @@ -1121,12 +1156,12 @@ body.outfits-edit.fullscreen #preview-sidebar { position: relative; width: 400px; } -/* line 293, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 316, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-sidebar.viewing-saving-outfit { height: auto; max-height: 100%; } -/* line 296, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 319, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-search-form { bottom: 1.5em; left: 0; @@ -1135,7 +1170,7 @@ body.outfits-edit.fullscreen #preview-search-form { position: absolute; width: 100%; } -/* line 304, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 327, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-search-form-help div { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1145,27 +1180,27 @@ body.outfits-edit.fullscreen #preview-search-form-help div { *vertical-align: auto; width: 48%; } -/* line 307, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 330, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #footer { bottom: 0; left: 0; position: absolute; width: 100%; } -/* line 312, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 335, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #footer ul, body.outfits-edit.fullscreen #footer p, body.outfits-edit.fullscreen #footer li { display: inline; } -/* line 314, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 337, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #footer ul { margin-right: 2em; } -/* line 317, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 340, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object { padding: 6px; position: relative; } -/* line 320, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 343, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object ul { display: none; left: 0; @@ -1173,11 +1208,11 @@ body.outfits-edit .object ul { position: absolute; top: 0; } -/* line 326, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 349, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object ul li { margin-bottom: 0.25em; } -/* line 328, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 351, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object ul li a { /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ -moz-border-radius: 5px; @@ -1218,11 +1253,11 @@ body.outfits-edit .object ul li a:active { body.outfits-edit .object ul li a:hover { background-color: #999999; } -/* line 334, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 357, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object:hover ul, body.outfits-edit .object:hover .object-info { display: block; } -/* line 341, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 364, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .nc-icon { background: url('/images/nc.png?1296599919') no-repeat; height: 16px; @@ -1232,14 +1267,14 @@ body.outfits-edit .nc-icon { top: 64px; width: 16px; } -/* line 349, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 372, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .nc-icon:hover { -moz-opacity: 0.5; -webkit-opacity: 0.5; -o-opacity: 0.5; -khtml-opacity: 0.5; } -/* line 352, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 375, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object-info { -moz-border-radius: 12px; -webkit-border-radius: 12px; @@ -1256,26 +1291,26 @@ body.outfits-edit .object-info { top: 0; width: 16px; } -/* line 363, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 386, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object-info span { font-family: "Droid Serif", Georgia, "Times New Roman", Times, serif; font-weight: bold; position: relative; top: -2px; } -/* line 369, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 392, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object-info:hover { -moz-opacity: 1; -webkit-opacity: 1; -o-opacity: 1; -khtml-opacity: 1; } -/* line 372, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 395, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits { display: none; text-align: left; } -/* line 375, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 398, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul { margin-left: 24px; margin-right: 24px; @@ -1286,7 +1321,7 @@ body.outfits-edit #preview-outfits > ul { margin-bottom: 1em; min-height: 16px; } -/* line 384, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 407, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li { padding: 0.25em 0; } @@ -1321,7 +1356,7 @@ body.outfits-edit #preview-outfits > ul > li .outfit-star { margin-left: -24px; margin-right: 0; } -/* line 32, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 33, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li img { height: 100px; left: -25px; @@ -1329,7 +1364,7 @@ body.outfits-edit #preview-outfits > ul > li img { top: -25px; width: 100px; } -/* line 38, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 39, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete { -moz-border-radius: 0; -webkit-border-radius: 0; @@ -1363,7 +1398,7 @@ body.outfits-edit #preview-outfits > ul > li .outfit-delete:hover { body.outfits-edit #preview-outfits > ul > li .outfit-delete:active { top: auto; } -/* line 46, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 47, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1371,29 +1406,29 @@ body.outfits-edit #preview-outfits > ul > li .outfit-delete:hover { -khtml-opacity: 1; background: #eeffee; } -/* line 49, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 50, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li header { display: block; padding-left: 24px; } -/* line 52, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 53, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li h4 { cursor: pointer; display: inline; } -/* line 55, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 56, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li h4:hover { text-decoration: underline; } -/* line 57, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 58, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li h4, body.outfits-edit #preview-outfits > ul > li .outfit-rename-field { font-size: 115%; } -/* line 59, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 60, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-rename-button, body.outfits-edit #preview-outfits > ul > li .outfit-rename-form { display: none; } -/* line 61, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 62, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-rename-button { -moz-opacity: 0.75; -webkit-opacity: 0.75; @@ -1402,7 +1437,7 @@ body.outfits-edit #preview-outfits > ul > li .outfit-rename-button { font-size: 75%; margin-left: 1em; } -/* line 65, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 66, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-url { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -1412,7 +1447,7 @@ body.outfits-edit #preview-outfits > ul > li .outfit-url { border-width: 0; width: 284px; } -/* line 70, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 71, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-url:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1420,63 +1455,63 @@ body.outfits-edit #preview-outfits > ul > li .outfit-url:hover { -khtml-opacity: 1; border-width: 1px; } -/* line 73, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 74, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete-confirmation { display: none; font-size: 75%; } -/* line 76, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 77, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete-confirmation span { color: red; } -/* line 78, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 79, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete-confirmation a { margin: 0 0.25em; } -/* line 80, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 81, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.active { background: #eeffee; } -/* line 83, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 84, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.confirming-deletion .outfit-delete { visibility: hidden; } -/* line 85, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 86, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.confirming-deletion .outfit-url { display: none; } -/* line 87, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 88, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.confirming-deletion .outfit-delete-confirmation { display: block; } -/* line 90, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 91, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.renaming h4 { display: none; } -/* line 92, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 93, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.renaming .outfit-rename-form { display: inline; } -/* line 95, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 96, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.renaming:hover .outfit-rename-button { display: none; } -/* line 98, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 99, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li:hover .outfit-rename-button { display: inline; } -/* line 386, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 409, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul.loaded { background: transparent; } -/* line 389, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 412, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .preview-sidebar-nav { float: right; font-size: 85%; margin-right: 24px; margin-top: 1em; } -/* line 396, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 419, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-success, body.outfits-edit #save-error, body.outfits-edit #outfit-not-found { margin-left: 24px; margin-right: 24px; @@ -1484,19 +1519,19 @@ body.outfits-edit #save-success, body.outfits-edit #save-error, body.outfits-edi margin-top: 1em; text-align: center; } -/* line 403, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 426, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-success { background: #e6efc2; border: 1px solid #c6d880; color: #264409; } -/* line 406, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 429, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-error, body.outfits-edit #outfit-not-found { background: #fbe3e4; border: 1px solid #fbc2c4; color: #8a1f11; } -/* line 409, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 432, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #userbar-message { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -1504,7 +1539,7 @@ body.outfits-edit #userbar-message { -khtml-opacity: 0.5; display: none; } -/* line 413, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 436, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit { padding: 0.25em 0; margin-left: 24px; @@ -1542,7 +1577,7 @@ body.outfits-edit #new-outfit .outfit-star { margin-left: -24px; margin-right: 0; } -/* line 32, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 33, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit img { height: 100px; left: -25px; @@ -1550,7 +1585,7 @@ body.outfits-edit #new-outfit img { top: -25px; width: 100px; } -/* line 38, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 39, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete { -moz-border-radius: 0; -webkit-border-radius: 0; @@ -1584,7 +1619,7 @@ body.outfits-edit #new-outfit .outfit-delete:hover { body.outfits-edit #new-outfit .outfit-delete:active { top: auto; } -/* line 46, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 47, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1592,29 +1627,29 @@ body.outfits-edit #new-outfit .outfit-delete:hover { -khtml-opacity: 1; background: #eeffee; } -/* line 49, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 50, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit header { display: block; padding-left: 24px; } -/* line 52, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 53, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4 { cursor: pointer; display: inline; } -/* line 55, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 56, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4:hover { text-decoration: underline; } -/* line 57, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 58, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4, body.outfits-edit #new-outfit .outfit-rename-field { font-size: 115%; } -/* line 59, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 60, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-rename-button, body.outfits-edit #new-outfit .outfit-rename-form { display: none; } -/* line 61, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 62, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-rename-button { -moz-opacity: 0.75; -webkit-opacity: 0.75; @@ -1623,7 +1658,7 @@ body.outfits-edit #new-outfit .outfit-rename-button { font-size: 75%; margin-left: 1em; } -/* line 65, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 66, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-url { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -1633,7 +1668,7 @@ body.outfits-edit #new-outfit .outfit-url { border-width: 0; width: 284px; } -/* line 70, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 71, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-url:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1641,78 +1676,78 @@ body.outfits-edit #new-outfit .outfit-url:hover { -khtml-opacity: 1; border-width: 1px; } -/* line 73, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 74, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete-confirmation { display: none; font-size: 75%; } -/* line 76, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 77, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete-confirmation span { color: red; } -/* line 78, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 79, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete-confirmation a { margin: 0 0.25em; } -/* line 80, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 81, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.active { background: #eeffee; } -/* line 83, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 84, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.confirming-deletion .outfit-delete { visibility: hidden; } -/* line 85, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 86, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.confirming-deletion .outfit-url { display: none; } -/* line 87, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 88, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.confirming-deletion .outfit-delete-confirmation { display: block; } -/* line 90, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 91, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.renaming h4 { display: none; } -/* line 92, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 93, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.renaming .outfit-rename-form { display: inline; } -/* line 95, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 96, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.renaming:hover .outfit-rename-button { display: none; } -/* line 98, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 99, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit:hover .outfit-rename-button { display: inline; } -/* line 417, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 440, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4 { display: inline; } -/* line 419, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 442, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4:hover { text-decoration: none; } -/* line 421, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 444, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-star { margin-top: 0.5em; } -/* line 424, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 447, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit-name { font: inherit; line-height: 1; } -/* line 428, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 451, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-saving-outfit { display: none; padding-bottom: 1em; } -/* line 432, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 455, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-type-form, body.outfits-edit #pet-state-form, body.outfits-edit #preview-swf, body.outfits-edit #preview-search-form { position: relative; } -/* line 435, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 458, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .control-overlay { height: 100%; left: 0; @@ -1721,11 +1756,11 @@ body.outfits-edit .control-overlay { width: 100%; z-index: 5; } -/* line 443, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 466, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar-nav-outfits, body.outfits-edit #save-outfit-signed-in { display: none; } -/* line 446, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 469, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form { padding: 0.25em 0; display: none; @@ -1763,7 +1798,7 @@ body.outfits-edit form#save-outfit-form .outfit-star { margin-left: -24px; margin-right: 0; } -/* line 32, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 33, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form img { height: 100px; left: -25px; @@ -1771,7 +1806,7 @@ body.outfits-edit form#save-outfit-form img { top: -25px; width: 100px; } -/* line 38, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 39, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-delete { -moz-border-radius: 0; -webkit-border-radius: 0; @@ -1805,7 +1840,7 @@ body.outfits-edit form#save-outfit-form .outfit-delete:hover { body.outfits-edit form#save-outfit-form .outfit-delete:active { top: auto; } -/* line 46, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 47, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-delete:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1813,29 +1848,29 @@ body.outfits-edit form#save-outfit-form .outfit-delete:hover { -khtml-opacity: 1; background: #eeffee; } -/* line 49, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 50, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form header { display: block; padding-left: 24px; } -/* line 52, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 53, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form h4 { cursor: pointer; display: inline; } -/* line 55, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 56, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form h4:hover { text-decoration: underline; } -/* line 57, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 58, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form h4, body.outfits-edit form#save-outfit-form .outfit-rename-field { font-size: 115%; } -/* line 59, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 60, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-rename-button, body.outfits-edit form#save-outfit-form .outfit-rename-form { display: none; } -/* line 61, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 62, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-rename-button { -moz-opacity: 0.75; -webkit-opacity: 0.75; @@ -1844,7 +1879,7 @@ body.outfits-edit form#save-outfit-form .outfit-rename-button { font-size: 75%; margin-left: 1em; } -/* line 65, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 66, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-url { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -1854,7 +1889,7 @@ body.outfits-edit form#save-outfit-form .outfit-url { border-width: 0; width: 284px; } -/* line 70, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 71, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-url:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1862,52 +1897,52 @@ body.outfits-edit form#save-outfit-form .outfit-url:hover { -khtml-opacity: 1; border-width: 1px; } -/* line 73, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 74, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-delete-confirmation { display: none; font-size: 75%; } -/* line 76, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 77, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-delete-confirmation span { color: red; } -/* line 78, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 79, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-delete-confirmation a { margin: 0 0.25em; } -/* line 80, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 81, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.active { background: #eeffee; } -/* line 83, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 84, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.confirming-deletion .outfit-delete { visibility: hidden; } -/* line 85, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 86, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.confirming-deletion .outfit-url { display: none; } -/* line 87, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 88, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.confirming-deletion .outfit-delete-confirmation { display: block; } -/* line 90, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 91, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.renaming h4 { display: none; } -/* line 92, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 93, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.renaming .outfit-rename-form { display: inline; } -/* line 95, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 96, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.renaming:hover .outfit-rename-button { display: none; } -/* line 98, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 99, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form:hover .outfit-rename-button { display: inline; } -/* line 452, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 475, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-star, body.outfits-edit form#save-outfit-form input, body.outfits-edit form#save-outfit-form button { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1918,51 +1953,51 @@ body.outfits-edit form#save-outfit-form .outfit-star, body.outfits-edit form#sav float: none; vertical-align: top; } -/* line 457, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 480, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-star { margin-top: 0.25em; } -/* line 460, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 483, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .outfit-url { font-size: 75%; } -/* line 464, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 487, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #preview-sidebar-nav-outfits { display: block; } -/* line 466, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 489, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #save-outfit { display: inline-block; } -/* line 470, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 493, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #save-outfit-wrapper.active-outfit #save-outfit { display: none; } -/* line 472, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 495, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #save-outfit-wrapper.active-outfit #save-current-outfit, body.outfits-edit.user-signed-in #save-outfit-wrapper.active-outfit #save-outfit-copy { display: inline-block; } -/* line 474, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 497, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #save-outfit-wrapper.active-outfit #current-outfit-permalink { display: inline-block; } -/* line 477, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 500, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #save-outfit-form { display: block; } -/* line 479, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 502, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #save-outfit, body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #save-current-outfit, body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #save-outfit-copy, body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #current-outfit-permalink, body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #shared-outfit-permalink, body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #share-outfit, body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #shared-outfit-url { display: none; } -/* line 483, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 506, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-not-signed-in #save-outfit-not-signed-in { display: inline-block; } -/* line 487, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 510, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit-wrapper.shared-outfit #shared-outfit-permalink, body.outfits-edit #save-outfit-wrapper.shared-outfit #shared-outfit-url { display: inline-block; } -/* line 489, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 512, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit-wrapper.shared-outfit #current-outfit-permalink { display: none !important; } diff --git a/tmp/restart.txt b/tmp/restart.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/cache/json-1.4.6.gem b/vendor/cache/json-1.4.6.gem new file mode 100644 index 00000000..53e04e6e Binary files /dev/null and b/vendor/cache/json-1.4.6.gem differ diff --git a/vendor/cache/redis-2.2.0.gem b/vendor/cache/redis-2.2.0.gem new file mode 100644 index 00000000..a5255cc6 Binary files /dev/null and b/vendor/cache/redis-2.2.0.gem differ diff --git a/vendor/cache/redis-namespace-0.10.0.gem b/vendor/cache/redis-namespace-0.10.0.gem new file mode 100644 index 00000000..45dc0845 Binary files /dev/null and b/vendor/cache/redis-namespace-0.10.0.gem differ diff --git a/vendor/cache/resque-1.15.0.gem b/vendor/cache/resque-1.15.0.gem new file mode 100644 index 00000000..ff74983d Binary files /dev/null and b/vendor/cache/resque-1.15.0.gem differ diff --git a/vendor/cache/right_aws-2.1.0.gem b/vendor/cache/right_aws-2.1.0.gem new file mode 100644 index 00000000..e7ec0f56 Binary files /dev/null and b/vendor/cache/right_aws-2.1.0.gem differ diff --git a/vendor/cache/right_http_connection-1.3.0.gem b/vendor/cache/right_http_connection-1.3.0.gem new file mode 100644 index 00000000..bf9fdfb2 Binary files /dev/null and b/vendor/cache/right_http_connection-1.3.0.gem differ diff --git a/vendor/cache/sinatra-1.2.6.gem b/vendor/cache/sinatra-1.2.6.gem new file mode 100644 index 00000000..64e231f2 Binary files /dev/null and b/vendor/cache/sinatra-1.2.6.gem differ diff --git a/vendor/cache/swf_converter-0.0.3.gem b/vendor/cache/swf_converter-0.0.3.gem new file mode 100644 index 00000000..50c9a4c7 Binary files /dev/null and b/vendor/cache/swf_converter-0.0.3.gem differ diff --git a/vendor/cache/tilt-1.3.gem b/vendor/cache/tilt-1.3.gem new file mode 100644 index 00000000..1150cb6d Binary files /dev/null and b/vendor/cache/tilt-1.3.gem differ diff --git a/vendor/cache/vegas-0.1.8.gem b/vendor/cache/vegas-0.1.8.gem new file mode 100644 index 00000000..ea0aeec1 Binary files /dev/null and b/vendor/cache/vegas-0.1.8.gem differ