From 6b92c2aa338c00e74a7733b6b307f1f7b7489995 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 11 Nov 2010 13:43:22 -0500 Subject: [PATCH] loading current user outfit list, deleting outfits, toggling star --- app/controllers/outfits_controller.rb | 27 ++- app/helpers/application_helper.rb | 5 + app/models/outfit.rb | 19 +- app/models/user.rb | 1 + app/stylesheets/outfits/_edit.sass | 19 +- app/views/layouts/application.html.haml | 1 + app/views/outfits/edit.html.haml | 67 ++----- config/routes.rb | 4 +- public/images/loading.gif | Bin 0 -> 1737 bytes public/javascripts/outfits/edit.js | 63 ++++++- public/javascripts/wardrobe.js | 147 +++++++++++++-- public/stylesheets/compiled/screen.css | 238 +++++++++++++----------- 12 files changed, 414 insertions(+), 177 deletions(-) create mode 100644 public/images/loading.gif diff --git a/app/controllers/outfits_controller.rb b/app/controllers/outfits_controller.rb index 47dd0d30..8ffffbd5 100644 --- a/app/controllers/outfits_controller.rb +++ b/app/controllers/outfits_controller.rb @@ -4,7 +4,7 @@ class OutfitsController < ApplicationController outfit = Outfit.new params[:outfit] outfit.user = current_user if outfit.save - render :json => true + render :json => outfit.id else render :json => {:errors => outfit.errors}, :status => :bad_request end @@ -13,9 +13,34 @@ class OutfitsController < ApplicationController end end + def for_current_user + @outfits = user_signed_in? ? current_user.outfits : [] + render :json => @outfits + end + + def destroy + authenticate_action &:destroy + end + def new @colors = Color.all @species = Species.all @top_contributors = User.top_contributors.limit(3) end + + def update + authenticate_action { |outfit| outfit.update_attributes(params[:outfit]) } + end + + private + + def authenticate_action + raise ActiveRecord::RecordNotFound unless user_signed_in? + outfit = current_user.outfits.find(params[:id]) + if yield(outfit) + render :json => true + else + render :json => false, :status => :bad_request + end + end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d574a3a5..4ba144ae 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -30,6 +30,7 @@ module ApplicationHelper :bitly => 'http://bit.ly/javascript-api.js?version=latest&login=openneo&apiKey=R_4d0438829b7a99860de1d3edf55d8dc8', :html5 => 'http://html5shim.googlecode.com/svn/trunk/html5.js', :jquery => 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js', + :jquery_tmpl => 'http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js', :swfobject => 'http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js' } @@ -51,6 +52,10 @@ module ApplicationHelper hidden_field_tag 'origin', value, :id => nil end + def signed_in_meta_tag + %().html_safe + end + def title(value) content_for :title, value end diff --git a/app/models/outfit.rb b/app/models/outfit.rb index 8c7d0543..1f473725 100644 --- a/app/models/outfit.rb +++ b/app/models/outfit.rb @@ -8,11 +8,24 @@ class Outfit < ActiveRecord::Base attr_accessible :name, :pet_state_id, :starred, :unworn_item_ids, :worn_item_ids - def worn_and_unworn_items + def as_json(more_options={}) + serializable_hash :only => [:id, :name, :pet_state_id, :starred], + :methods => [:color_id, :species_id, :worn_and_unworn_item_ids] + end + + def color_id + pet_state.pet_type.color_id + end + + def species_id + pet_state.pet_type.species_id + end + + def worn_and_unworn_item_ids {:worn => [], :unworn => []}.tap do |output| - item_outfit_relationships.all(:include => :item).each do |rel| + item_outfit_relationships.each do |rel| key = rel.is_worn? ? :worn : :unworn - output[key] << rel.item + output[key] << rel.item_id end end end diff --git a/app/models/user.rb b/app/models/user.rb index 6e07f9ee..22bf36ec 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -2,6 +2,7 @@ class User < ActiveRecord::Base DefaultAuthServerId = 1 has_many :contributions + has_many :outfits scope :top_contributors, order('points DESC').where(arel_table[:points].gt(0)) diff --git a/app/stylesheets/outfits/_edit.sass b/app/stylesheets/outfits/_edit.sass index 3e196d09..6a28c8d8 100644 --- a/app/stylesheets/outfits/_edit.sass +++ b/app/stylesheets/outfits/_edit.sass @@ -64,6 +64,8 @@ $outfit-content-inner-width: $outfit-content-width - $outfit-header-padding /* makes it not take up inline space position: relative width: 16px + &.loading + background-image: url(/images/loading.gif) !important h4 cursor: pointer font-size: 115% @@ -312,7 +314,7 @@ body.outfits-edit $object-img-diff: ($object-width - $object-img-size) / 2 + $object-padding .nc-icon - background: url(/assets/images/nc.png) no-repeat + background: url(/images/nc.png) no-repeat height: $nc-icon-size position: absolute right: $object-img-diff @@ -348,12 +350,16 @@ body.outfits-edit h3 margin-bottom: .5em > ul + background: url(/images/loading.gif) no-repeat center top display: block font-family: $main-font list-style: none margin-bottom: 1em + min-height: 16px > li +outfit + &.loaded + background: transparent .preview-sidebar-nav float: right @@ -403,3 +409,14 @@ body.outfits-edit top: 0 width: 100% z-index: 5 + + #preview-sidebar-nav-outfits, #save-outfit-signed-in + display: none + + &.user-signed-in + #preview-sidebar-nav-outfits + display: block + #save-outfit span + display: none + span#save-outfit-signed-in + display: inline diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index ec7710f9..adb8688c 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -9,6 +9,7 @@ = stylesheet_link_tag "compiled/screen" = javascript_include_tag "http://#{RemoteImpressHost}/assets/js/analytics.js" = csrf_meta_tag + = signed_in_meta_tag %body{:class => body_class} #container - if content_for? :title diff --git a/app/views/outfits/edit.html.haml b/app/views/outfits/edit.html.haml index 09fbbcba..9d54981f 100644 --- a/app/views/outfits/edit.html.haml +++ b/app/views/outfits/edit.html.haml @@ -14,7 +14,9 @@ Gender/Emotions: %ul #save-outfit-wrapper - %button#save-outfit Save outfit + %button#save-outfit + %span#save-outfit-signed-in Save outfit + %span Log in to save outfit #preview #preview-swf #preview-swf-container @@ -34,54 +36,6 @@ %a#preview-sidebar-nav-closet.preview-sidebar-nav{:href => "#"} ← Back to Closet %h2 Your outfits %ul - %li.starred - %div - %header - %button.outfit-delete × - .outfit-star - %h4 Pretty in Pink - %input.outfit-url{:type => 'text', :value => 'http://impress.openneo.net/outfits/qW2l4o'} - .outfit-delete-confirmation - %span Delete forever? - %a.outfit-delete-confirmation-yes{:href => '#'} yes - \/ - %a.outfit-delete-confirmation-no{:href => '#'} no, thanks - %li.starred - %div - %header - %button.outfit-delete × - .outfit-star - %h4 The Little Mermaid - %input.outfit-url{:type => 'text', :value => 'http://impress.openneo.net/outfits/qW2l4o'} - .outfit-delete-confirmation - %span Delete forever? - %a.outfit-delete-confirmation-yes{:href => '#'} yes - \/ - %a.outfit-delete-confirmation-no{:href => '#'} no, thanks - %li - %div - %header - %button.outfit-delete × - .outfit-star - %h4 Autumn is Here - %input.outfit-url{:type => 'text', :value => 'http://impress.openneo.net/outfits/qW2l4o'} - .outfit-delete-confirmation - %span Delete forever? - %a.outfit-delete-confirmation-yes{:href => '#'} yes - \/ - %a.outfit-delete-confirmation-no{:href => '#'} no, thanks - %li - %div - %header - %button.outfit-delete × - .outfit-star - %h4 Super Mysterious Secret Agent - %input.outfit-url{:type => 'text', :value => 'http://impress.openneo.net/outfits/qW2l4o'} - .outfit-delete-confirmation - %span Delete forever? - %a.outfit-delete-confirmation-yes{:href => '#'} yes - \/ - %a.outfit-delete-confirmation-no{:href => '#'} no, thanks #preview-saving-outfit %a#preview-sidebar-nav-cancel-save.preview-sidebar-nav{:href => '#'} ← Cancel %h2 Saving new outfit @@ -133,8 +87,21 @@ %ul #no-assets-full-message We haven't seen this item on this body type before. Have you? Submit its name on the home page if you have! +%script#outfit-template{:type => 'text/x-jquery-tmpl'} +
  • + %header + %button.outfit-delete × + .outfit-star + %h4 ${name} + %input.outfit-url{:type => 'text', :value => 'http://impress.openneo.net/outfits/FIXME'} + .outfit-delete-confirmation + %span Delete forever? + %a.outfit-delete-confirmation-yes{:href => '#'} yes + \/ + %a.outfit-delete-confirmation-no{:href => '#'} no, thanks +
  • - content_for :javascripts do /[if IE] = include_javascript_libraries :html5 - = include_javascript_libraries :jquery, :swfobject + = include_javascript_libraries :jquery, :swfobject, :jquery_tmpl = include_javascripts :edit_outfit_package diff --git a/config/routes.rb b/config/routes.rb index c23ef8d1..550011e3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -20,9 +20,11 @@ OpenneoImpressItems::Application.routes.draw do |map| get :needed end end - resources :outfits, :only => [:create] + resources :outfits, :only => [:create, :update, :destroy] resources :pet_attributes, :only => [:index] + match '/users/current-user/outfits.json' => 'outfits#for_current_user' + match '/pets/load' => 'pets#load', :method => :post, :as => :load_pet match '/pets/bulk' => 'pets#bulk', :as => :bulk_pets diff --git a/public/images/loading.gif b/public/images/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1aaba16f7eef8bba2b77435eb2014fa1821757e3 GIT binary patch literal 1737 zcmYk+e^8V69l-Ig0rQIp2|P)V*bo8@5kiOweG>AEJV|&G0)`(xQotA!Ac!#r$q=b^ zp8Y;~o;ge9skOGJtw&qWc2=2)Go7WP*2C60_0+l6+0MDnv!3g$wVv&~*}BCYpFh9% zx$nL1-gh5Q9d4=)3xN>a2jJ18N5Bm({q@qe1KUEILym;Qy~Z8i7JvK5+gJZ_b@$}% zl3#`d#aB&Uitf#b#Jaabn4K->4Oc= zH?(YQ>7Y6~U+i=aIIVrwlNV18?ikef>Tmt)R#|7+miM=`CEGOJ8hN{X^!KCwU;1;K zb2q)asr#kws%X_Gmp?i4`I#HHZ+vk2gAJn_wvKJxmD<$`TbccgZ=KIOjT<|mRrYNy?wP}iGp~6h`kcq_|``7WQzV% z;7UZo1CegU+7$!6if}YM6zdCjYgfd3`asbSnSlTEYSE)Ce=V`dg*DacwYrR1KR;<6 z|L`~>;JmaEKr%^Dvf}v_G{v1)Ql^Ed*+}uTo_e~x5*l?jlw`4U}>J45wk;1j$|BhS|FD#9k;vOkSEM9q%GwVoD|JfsAM_= z&&0KUkt`@GH#aZnY zfs$n^%GbEaD?$iguq=@DWH#-j^c0_6%s?aQt#6(HW)x;N*pA>hEM0hV0ue*0ADb|D z{sGhpxf6urIH-}f6ws9{_eZc=UscC5n=5NWvWq09YSnZU`dndxA*$=5`-EEoJw^i7 ztTd1{6Zq>ikjKwk!47IzG;ne1**V#B1ko5}3NG($7K>diD+OFq+3mN|y%kL|*d^>? zfN<4PsL8XZeDNsMdvz&7TLI-&h7|RT)N?)=invm!nM4YErYN)R9O-$c5F?C69a1Sq zDThn#a$*)ouS_;p}#2Rp+U8jQ#yC~lBnNDVa48< z47WL#<}_MKLZvs+J=Z*hm4Fg!XUey# z9(vUFl)tPP;vtigSv?0MD?`;v9W>qp{S;Em;wcH60gZn>s=x)a^Jn$VpNDYM#>|<< zCy9}8Uqr4F)zE-f-XD=xdGquV%5CLK90mi6|Fp1x#7$NU?Nj7AprcF1fXI>O zGr9(boyL?nr+yMU#fY=n6D(cIH5i0q-W0PYkpa=pnmJ0x1VpP#IlfwK+Vd6)>e!} z9rjAvSrzGoHr{@wuSEn2w}An6PVa{Yr|=*LibtjwmO>qFoN_jFL)37QSsIOz#=lUi z9KVOoEGLMr1&bPe^x)cfprSpIZ)LFJ6LOHl-6AZ8a9VMX95K znQ-%1nA6m(q)>6C*Z_=Ti@MH{)Y;6mr_d*cM#Da)xd%IlGSIEDPErPWFa8fl8_l>_jH5J(8gQi3?Y2=W+Kkj%5E7fC9U(Bg0T!3}M*vUahV>=o zV~DF7W(9~b)Yk div { margin-left: 24px; margin-right: 24px; } -/* line 264, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 266, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-sidebar > div h2 { margin-bottom: 0.25em; } -/* line 266, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 268, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-sidebar.viewing-saving-outfit { height: auto; max-height: 100%; } -/* line 269, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 271, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-search-form { bottom: 1em; left: 0; @@ -1103,7 +1103,7 @@ body.outfits-edit.fullscreen #preview-search-form { position: absolute; width: 100%; } -/* line 277, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 279, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-search-form-help div { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1113,27 +1113,27 @@ body.outfits-edit.fullscreen #preview-search-form-help div { *vertical-align: auto; width: 48%; } -/* line 280, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 282, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #footer { bottom: 0; left: 0; position: absolute; width: 100%; } -/* line 285, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 287, ../../../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 287, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 289, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #footer ul { margin-right: 2em; } -/* line 290, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 292, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object { padding: 6px; position: relative; } -/* line 293, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 295, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object ul { display: none; left: 0; @@ -1141,11 +1141,11 @@ body.outfits-edit .object ul { position: absolute; top: 0; } -/* line 299, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 301, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object ul li { margin-bottom: 0.25em; } -/* line 301, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 303, ../../../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; @@ -1186,13 +1186,13 @@ body.outfits-edit .object ul li a:active { body.outfits-edit .object ul li a:hover { background-color: #999999; } -/* line 307, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 309, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object:hover ul, body.outfits-edit .object:hover .object-info { display: block; } -/* line 314, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 316, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .nc-icon { - background: url(/assets/images/nc.png) no-repeat; + background: url(/images/nc.png) no-repeat; height: 16px; position: absolute; right: 16px; @@ -1200,14 +1200,14 @@ body.outfits-edit .nc-icon { top: 64px; width: 16px; } -/* line 322, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 324, ../../../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 325, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 327, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object-info { -moz-border-radius: 12px; -webkit-border-radius: 12px; @@ -1224,37 +1224,39 @@ body.outfits-edit .object-info { top: 0; width: 16px; } -/* line 336, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 338, ../../../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 342, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 344, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object-info:hover { -moz-opacity: 1; -webkit-opacity: 1; -o-opacity: 1; -khtml-opacity: 1; } -/* line 345, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 347, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits { display: none; text-align: left; } -/* line 348, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 350, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits h3 { margin-bottom: 0.5em; } -/* line 350, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 352, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul { + background: url(/images/loading.gif) no-repeat center top; display: block; font-family: "Droid Sans", Helvetica, Arial, Verdana, sans-serif; list-style: none; margin-bottom: 1em; + min-height: 16px; } -/* line 355, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 359, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li { margin-bottom: 0.5em; } @@ -1330,15 +1332,19 @@ body.outfits-edit #preview-outfits > ul > li .outfit-star { width: 16px; } /* line 67, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-outfits > ul > li .outfit-star.loading { + background-image: url(/images/loading.gif) !important; +} +/* line 69, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li h4 { cursor: pointer; font-size: 115%; } -/* line 70, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 72, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li h4:hover { text-decoration: underline; } -/* line 72, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 74, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-url { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -1348,7 +1354,7 @@ body.outfits-edit #preview-outfits > ul > li .outfit-url { font-size: 75%; width: 284px; } -/* line 77, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 79, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-url:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1356,60 +1362,64 @@ body.outfits-edit #preview-outfits > ul > li .outfit-url:hover { -khtml-opacity: 1; border-color: #cceecc; } -/* line 80, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 82, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete-confirmation { display: none; font-size: 75%; } -/* line 83, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 85, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete-confirmation span { color: red; } -/* line 85, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 87, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete-confirmation a { margin: 0 0.25em; } -/* line 88, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 90, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.confirming-deletion .outfit-delete { visibility: hidden; } -/* line 90, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 92, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.confirming-deletion .outfit-url { display: none; } -/* line 92, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 94, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.confirming-deletion .outfit-delete-confirmation { display: block; } -/* line 95, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 97, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.starred .outfit-star { background-image: url(/images/star.png); } -/* line 358, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 361, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-outfits > ul.loaded { + background: transparent; +} +/* line 364, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .preview-sidebar-nav { float: right; font-size: 85%; margin-top: 1em; } -/* line 363, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 369, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-success, body.outfits-edit #save-error { display: none; margin-top: 1em; text-align: center; } -/* line 368, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 374, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-success { background: #e6efc2; border: 1px solid #c6d880; color: #264409; } -/* line 371, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 377, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-error { background: #fbe3e4; border: 1px solid #fbc2c4; color: #8a1f11; } -/* line 374, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 380, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #userbar-message { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -1417,7 +1427,7 @@ body.outfits-edit #userbar-message { -khtml-opacity: 0.5; display: none; } -/* line 378, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 384, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit { margin-bottom: 0.5em; display: none; @@ -1494,15 +1504,19 @@ body.outfits-edit #new-outfit .outfit-star { width: 16px; } /* line 67, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #new-outfit .outfit-star.loading { + background-image: url(/images/loading.gif) !important; +} +/* line 69, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4 { cursor: pointer; font-size: 115%; } -/* line 70, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 72, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4:hover { text-decoration: underline; } -/* line 72, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 74, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-url { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -1512,7 +1526,7 @@ body.outfits-edit #new-outfit .outfit-url { font-size: 75%; width: 284px; } -/* line 77, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 79, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-url:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1520,62 +1534,62 @@ body.outfits-edit #new-outfit .outfit-url:hover { -khtml-opacity: 1; border-color: #cceecc; } -/* line 80, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 82, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete-confirmation { display: none; font-size: 75%; } -/* line 83, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 85, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete-confirmation span { color: red; } -/* line 85, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 87, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete-confirmation a { margin: 0 0.25em; } -/* line 88, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 90, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.confirming-deletion .outfit-delete { visibility: hidden; } -/* line 90, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 92, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.confirming-deletion .outfit-url { display: none; } -/* line 92, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 94, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.confirming-deletion .outfit-delete-confirmation { display: block; } -/* line 95, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 97, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.starred .outfit-star { background-image: url(/images/star.png); } -/* line 381, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 387, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4 { display: inline; } -/* line 383, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 389, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4:hover { text-decoration: none; } -/* line 385, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 391, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-star { margin-top: 0.5em; } -/* line 388, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 394, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit-name { font: inherit; line-height: 1; } -/* line 392, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 398, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-saving-outfit { display: none; padding-bottom: 1em; } -/* line 396, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 402, ../../../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 399, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 405, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .control-overlay { height: 100%; left: 0; @@ -1584,6 +1598,22 @@ body.outfits-edit .control-overlay { width: 100%; z-index: 5; } +/* line 413, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-sidebar-nav-outfits, body.outfits-edit #save-outfit-signed-in { + display: none; +} +/* line 417, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit.user-signed-in #preview-sidebar-nav-outfits { + display: block; +} +/* line 419, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit.user-signed-in #save-outfit span { + display: none; +} +/* line 421, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit.user-signed-in span#save-outfit-signed-in { + display: inline; +} /* line 2, ../../../app/stylesheets/outfits/_new.sass */ body.outfits-new #outfit-forms {