diff --git a/Gemfile b/Gemfile index d2f2e627..9c29670d 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,10 @@ gem 'right_aws', '~> 2.1.0' gem "character-encodings", "~> 0.4.1", :platforms => :ruby_18 +gem "nokogiri", "~> 1.5.0" + +gem 'sanitize', '~> 2.0.3' + group :development_async do # async wrappers gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git' diff --git a/Gemfile.lock b/Gemfile.lock index 4fd0dbbf..487b8a40 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,6 +107,7 @@ GEM mime-types (1.16) msgpack (0.4.4) mysql2 (0.2.6) + nokogiri (1.5.0) openneo-auth-signatory (0.1.0) ruby-hmac polyglot (0.3.1) @@ -164,9 +165,11 @@ GEM ruby-hmac (0.4.0) rufus-scheduler (2.0.9) tzinfo (>= 0.3.23) + sanitize (2.0.3) + nokogiri (< 1.6, >= 1.4.4) sinatra (1.2.6) rack (~> 1.1) - tilt (>= 1.2.2, < 2.0) + tilt (< 2.0, >= 1.2.2) swf_converter (0.0.3) thor (0.14.6) tilt (1.3.2) @@ -204,6 +207,7 @@ DEPENDENCIES msgpack (~> 0.4.3) mysql2 mysqlplus! + nokogiri (~> 1.5.0) openneo-auth-signatory (~> 0.1.0) rack-fiber_pool rails (= 3.0.4) @@ -213,6 +217,7 @@ DEPENDENCIES resque-scheduler (~> 2.0.0.d) right_aws (~> 2.1.0) rspec-rails (~> 2.0.0.beta.22) + sanitize (~> 2.0.3) swf_converter (~> 0.0.3) whenever (~> 0.6.2) will_paginate (~> 3.0.pre2) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 903f64ec..c52db242 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,10 +1,34 @@ class ApplicationController < ActionController::Base protect_from_forgery - helper_method :can_use_image_mode? + helper_method :can_use_image_mode?, :user_is? + + def authenticate_user! # too lazy to change references to login_path + redirect_to(login_path) unless user_signed_in? + end + + def authorize_user! + raise AccessDenied unless user_signed_in? && current_user.id == params[:user_id].to_i + end def can_use_image_mode? user_signed_in? && current_user.image_mode_tester? end + + class AccessDenied < StandardError;end + + rescue_from AccessDenied, :with => :on_access_denied + + def on_access_denied + render :file => 'public/403.html', :layout => false, :status => :forbidden + end + + def redirect_back!(default=:back) + redirect_to(params[:return_to] || default) + end + + def user_is?(user) + user_signed_in? && user == current_user + end end diff --git a/app/controllers/closet_hangers_controller.rb b/app/controllers/closet_hangers_controller.rb new file mode 100644 index 00000000..b75a5a70 --- /dev/null +++ b/app/controllers/closet_hangers_controller.rb @@ -0,0 +1,146 @@ +class ClosetHangersController < ApplicationController + before_filter :authorize_user!, :only => [:destroy, :create, :update, :petpage] + before_filter :find_item, :only => [:destroy, :create, :update] + before_filter :find_user, :only => [:index, :petpage] + + def destroy + raise ActiveRecord::RecordNotFound unless params[:closet_hanger] + @closet_hanger = current_user.closet_hangers.find_by_item_id_and_owned!(@item.id, owned) + @closet_hanger.destroy + respond_to do |format| + format.html { redirect_after_destroy! } + format.json { render :json => true } + end + end + + def index + @public_perspective = params.has_key?(:public) || !user_is?(@user) + + find_closet_hangers! + + if @public_perspective && user_signed_in? + items = [] + @closet_lists_by_owned.each do |owned, lists| + lists.each do |list| + list.hangers.each { |hanger| items << hanger.item } + end + end + + @unlisted_closet_hangers_by_owned.each do |owned, hangers| + hangers.each { |hanger| items << hanger.item } + end + + current_user.assign_closeted_to_items!(items) + end + end + + def petpage + @public_perspective = true + find_closet_hangers! + end + + # Since the user does not care about the idea of a hanger, but rather the + # quantity of an item they own, the user would expect a create form to work + # even after the record already exists, and an update form to work even after + # the record is deleted. So, create and update are aliased, and both find + # the record if it exists or create a new one if it does not. They will even + # delete the record if quantity is zero. + # + # This is kinda a violation of REST. It's not worth breaking user + # expectations, though, and I can't really think of a genuinely RESTful way + # to pull this off. + def update + @closet_hanger = current_user.closet_hangers.find_or_initialize_by_item_id_and_owned(@item.id, owned) + @closet_hanger.attributes = params[:closet_hanger] + + unless @closet_hanger.quantity == 0 # save the hanger, new record or not + if @closet_hanger.save + respond_to do |format| + format.html { + message = "Success! You #{@closet_hanger.verb(:you)} #{@closet_hanger.quantity} " + message << ((@closet_hanger.quantity > 1) ? @item.name.pluralize : @item.name) + message << " in the \"#{@closet_hanger.list.name}\" list" if @closet_hanger.list + flash[:success] = "#{message}." + redirect_back!(@item) + } + + format.json { render :json => true } + end + else + respond_to do |format| + format.html { + flash[:alert] = "We couldn't save how many of this item you #{@closet_hanger.verb(:you)}: #{@closet_hanger.errors.full_messages.to_sentence}" + redirect_back!(@item) + } + + format.json { render :json => {:errors => @closet_hanger.errors.full_messages}, :status => :unprocessable_entity } + end + end + else # delete the hanger since the user doesn't want it + @closet_hanger.destroy + respond_to do |format| + format.html { redirect_after_destroy! } + + format.json { render :json => true } + end + end + end + + alias_method :create, :update + + protected + + def find_item + @item = Item.find params[:item_id] + end + + def find_user + if params[:user_id] + @user = User.find params[:user_id] + elsif user_signed_in? + redirect_to user_closet_hangers_path(current_user) + else + redirect_to login_path(:return_to => request.fullpath) + end + end + + def find_closet_hangers! + @perspective_user = current_user unless @public_perspective + + @closet_lists_by_owned = @user.closet_lists. + alphabetical.includes(:hangers => :item) + unless @perspective_user == @user + # If we run this when the user matches, we'll end up with effectively: + # WHERE belongs_to_user AND (is_public OR belongs_to_user) + # and it's a bit silly to put the SQL server through a condition that's + # always true. + @closet_lists_by_owned = @closet_lists_by_owned.visible_to(@perspective_user) + end + @closet_lists_by_owned = @closet_lists_by_owned.group_by(&:hangers_owned) + + visible_groups = @user.closet_hangers_groups_visible_to(@perspective_user) + unless visible_groups.empty? + @unlisted_closet_hangers_by_owned = @user.closet_hangers.unlisted. + owned_before_wanted.alphabetical_by_item_name.includes(:item). + where(:owned => [visible_groups]).group_by(&:owned) + else + @unlisted_closet_hangers_by_owned = {} + end + end + + def owned + owned = true + if params[:closet_hanger] + owned = case params[:closet_hanger][:owned] + when 'true', '1' then true + when 'false', '0' then false + end + end + end + + def redirect_after_destroy! + flash[:success] = "Success! You do not #{@closet_hanger.verb(:you)} #{@item.name}." + redirect_back!(@item) + end +end + diff --git a/app/controllers/closet_lists_controller.rb b/app/controllers/closet_lists_controller.rb new file mode 100644 index 00000000..55bb75ce --- /dev/null +++ b/app/controllers/closet_lists_controller.rb @@ -0,0 +1,49 @@ +class ClosetListsController < ApplicationController + before_filter :authorize_user! + before_filter :find_closet_list, :only => [:edit, :update, :destroy] + + def create + @closet_list = current_user.closet_lists.build params[:closet_list] + if @closet_list.save + save_successful! + else + save_failed! + render :action => :new + end + end + + def destroy + @closet_list.destroy + flash[:success] = "Successfully deleted \"#{@closet_list.name}\"" + redirect_to user_closet_hangers_path(current_user) + end + + def new + @closet_list = current_user.closet_lists.build params[:closet_list] + end + + def update + if @closet_list.update_attributes(params[:closet_list]) + save_successful! + else + save_failed! + render :action => :edit + end + end + + protected + + def find_closet_list + @closet_list = current_user.closet_lists.find params[:id] + end + + def save_failed! + flash.now[:alert] = "We can't save this list because: #{@closet_list.errors.full_messages.to_sentence}" + end + + def save_successful! + flash[:success] = "Successfully saved \"#{@closet_list.name}\"" + redirect_to user_closet_hangers_path(current_user) + end +end + diff --git a/app/controllers/closet_pages_controller.rb b/app/controllers/closet_pages_controller.rb new file mode 100644 index 00000000..c0912883 --- /dev/null +++ b/app/controllers/closet_pages_controller.rb @@ -0,0 +1,67 @@ +class ClosetPagesController < ApplicationController + include ActionView::Helpers::TextHelper + + before_filter :authenticate_user!, :build_closet_page + + rescue_from ClosetPage::ParseError, :with => :on_parse_error + + def create + if params[:closet_page] && params[:closet_page][:source] + @closet_page.index = params[:closet_page][:index] + @closet_page.source = params[:closet_page][:source] + + saved_counts = @closet_page.save_hangers! + + any_created = saved_counts[:created] > 0 + any_updated = saved_counts[:updated] > 0 + if any_created || any_updated + message = "Page #{@closet_page.index} saved! We " + message << "added " + pluralize(saved_counts[:created], 'item') + " to your closet" if any_created + message << " and " if any_created && any_updated + message << "updated the count on " + pluralize(saved_counts[:updated], 'item') if any_updated + message << ". " + else + message = "Success! We checked that page, and we already had all this data recorded. " + end + + unless @closet_page.unknown_item_names.empty? + message << "We also found " + + pluralize(@closet_page.unknown_item_names.size, 'item') + + " we didn't recognize: " + + @closet_page.unknown_item_names.to_sentence + + ". Please put each item on your pet and type its name in on the " + + "home page so we can have a record of it. Thanks! " + end + + if @closet_page.last? + message << "That was the last page of your Neopets closet." + destination = user_closet_hangers_path(current_user) + else + message << "Now the frame should contain page #{@closet_page.index + 1}. Paste that source code over, too." + destination = {:action => :new, :index => (@closet_page.index + 1)} + end + + flash[:success] = message + redirect_to destination + else + redirect_to :action => :new + end + end + + def new + @closet_page.index ||= 1 + end + + protected + + def build_closet_page + @closet_page = ClosetPage.new(current_user) + @closet_page.index = params[:index] + end + + def on_parse_error + flash[:alert] = "We had trouble reading your source code. Is it a valid HTML document? Make sure you pasted the computery-looking result of clicking View Frame Source, and not the pretty page itself." + render :action => :new + end +end + diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index 961dd770..05ff567b 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -10,7 +10,8 @@ class ItemsController < ApplicationController else per_page = nil end - @items = Item.search(@query).alphabetize.paginate :page => params[:page], :per_page => per_page + @items = Item.search(@query, current_user).alphabetize.paginate :page => params[:page], :per_page => per_page + assign_closeted! respond_to do |format| format.html { render } format.json { render :json => {:items => @items, :total_pages => @items.total_pages} } @@ -24,6 +25,7 @@ class ItemsController < ApplicationController end elsif params.has_key?(:ids) && params[:ids].is_a?(Array) @items = Item.find(params[:ids]) + assign_closeted! respond_to do |format| format.json { render :json => @items } end @@ -37,6 +39,19 @@ class ItemsController < ApplicationController def show @item = Item.find params[:id] + + @trading_closet_hangers_by_owned = { + true => @item.closet_hangers.owned_trading.newest.includes(:user), + false => @item.closet_hangers.wanted_trading.newest.includes(:user) + } + + if user_signed_in? + @current_user_hangers = [true, false].map do |owned| + hanger = current_user.closet_hangers.find_or_initialize_by_item_id_and_owned(@item.id, owned) + hanger.quantity ||= 1 + hanger + end + end end def needed @@ -50,11 +65,16 @@ class ItemsController < ApplicationController raise ActiveRecord::RecordNotFound, 'Pet type not found' end @items = @pet_type.needed_items.alphabetize + assign_closeted! @pet_name = params[:name] render :layout => 'application' end - private + protected + + def assign_closeted! + current_user.assign_closeted_to_items!(@items) if user_signed_in? + end def set_query @query = params[:q] diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 70ed203d..7a7d7750 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,5 +1,40 @@ class UsersController < ApplicationController + before_filter :find_and_authorize_user!, :only => [:update] + def top_contributors @users = User.top_contributors.paginate :page => params[:page], :per_page => 20 end + + def update + success = @user.update_attributes params[:user] + respond_to do |format| + format.html { + if success + flash[:success] = "Settings successfully saved" + redirect_back! user_closet_hangers_path(@user) + else + flash[:alert] = "Error saving user settings: #{@user.errors.full_messages.to_sentence}" + end + } + + format.json { + if success + render :json => true + else + render :json => {:errors => @user.errors.full_messages}, :status => :unprocessable_entity + end + } + end + end + + protected + + def find_and_authorize_user! + if current_user.id == params[:id].to_i + @user = current_user + else + raise AccessDenied + end + end end + diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f30b2a73..9deca063 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -29,10 +29,22 @@ module ApplicationHelper content_tag(:div, html, :class => 'campaign-progress-wrapper') end + def canonical_path(resource) + content_for :meta, tag(:link, :rel => 'canonical', :href => url_for(resource)) + end + + def contact_email + "webmaster@openneo.net" + end + + def feedback_url + "http://openneo.uservoice.com/forums/40720-dress-to-impress" + end + def flashes raw(flash.inject('') do |html, pair| key, value = pair - html + content_tag('p', value, :class => key) + html + content_tag('p', value, :class => "flash #{key}") end) end @@ -86,6 +98,15 @@ module ApplicationHelper hidden_field_tag 'origin', value, :id => nil end + def return_to_field_tag + hidden_field_tag :return_to, request.fullpath + end + + def secondary_nav(&block) + content_for :before_flashes, + content_tag(:nav, :id => 'secondary-nav', &block) + end + def show_title_header? params[:controller] != 'items' end diff --git a/app/helpers/closet_hangers_helper.rb b/app/helpers/closet_hangers_helper.rb new file mode 100644 index 00000000..5649019c --- /dev/null +++ b/app/helpers/closet_hangers_helper.rb @@ -0,0 +1,110 @@ +require 'cgi' + +module ClosetHangersHelper + def closet_hangers_help_class + 'hidden' unless @user.closet_hangers.empty? + end + + def closet_hanger_verb(owned, positive=true) + ClosetHanger.verb(closet_hanger_subject, owned, positive) + end + + def send_neomail_url(user) + "http://www.neopets.com/neomessages.phtml?type=send&recipient=#{CGI.escape @user.neopets_username}" + end + + def closet_hanger_subject + public_perspective? ? @user.name : :you + end + + def hangers_group_visibility_field_name(owned) + owned ? :owned_closet_hangers_visibility : :wanted_closet_hangers_visibility + end + + def closet_visibility_choices(*args) + ClosetVisibility.levels.map do |level| + [level.send(*args), level.id] + end + end + + def closet_visibility_descriptions(subject='these items') + content = '' + ClosetVisibility.levels.each do |level| + content << content_tag(:li, level.description(subject), 'data-id' => level.id) + end + content_tag :ul, content.html_safe, :class => 'visibility-descriptions' + end + + # Do we have either unlisted hangers that are owned/wanted, or non-empty + # owned/wanted lists? + def has_hangers?(owned) + # If we have unlisted hangers of this type, pass. + return true if @unlisted_closet_hangers_by_owned.has_key?(owned) + + # Additionally, if we have no lists of this type, fail. + lists = @closet_lists_by_owned[owned] + return false unless lists + + # If any of those lists are non-empty, pass. + lists.each do |list| + return true unless list.hangers.empty? + end + + # Otherwise, all of the lists are empty. Fail. + return false + end + + def has_lists?(owned) + @closet_lists_by_owned.has_key?(owned) + end + + def link_to_add_closet_list(content, options) + owned = options.delete(:owned) + path = new_user_closet_list_path current_user, + :closet_list => {:hangers_owned => owned} + link_to(content, path, options) + end + + def nc_icon_url + "http://#{request.host}#{image_path 'nc.png'}" + end + + def petpage_item_name(item) + item.name.gsub(/ on/i, ' on') + end + + def public_perspective? + @public_perspective + end + + PETPAGE_HANGER_BATCH_SIZE = 5 + def render_batched_petpage_hangers(hangers) + output do |html| + hangers.in_groups_of(PETPAGE_HANGER_BATCH_SIZE) do |batch| + content = batch.map do |hanger| + render 'petpage_hanger', :hanger => hanger if hanger + end.join.html_safe + html << content_tag(:div, content, :class => 'dti-item-row') + end + end + end + + def render_closet_lists(lists) + if lists + render :partial => 'closet_lists/closet_list', :collection => lists, + :locals => {:show_controls => !public_perspective?} + end + end + + def render_unlisted_closet_hangers(owned) + hangers_content = render :partial => 'closet_hanger', + :collection => @unlisted_closet_hangers_by_owned[owned], + :locals => {:show_controls => !public_perspective?} + end + + def unlisted_hangers_count(owned) + hangers = @unlisted_closet_hangers_by_owned[owned] + hangers ? hangers.size : 0 + end +end + diff --git a/app/helpers/closet_lists_helper.rb b/app/helpers/closet_lists_helper.rb new file mode 100644 index 00000000..e03c6b95 --- /dev/null +++ b/app/helpers/closet_lists_helper.rb @@ -0,0 +1,30 @@ +module ClosetListsHelper + def closet_list_delete_confirmation(closet_list) + "Are you sure you want to delete \"#{closet_list.name}\"?".tap do |msg| + unless closet_list.hangers.empty? + msg << " Even if you do, we'll remember that you " + + ClosetHanger.verb(:you, closet_list.hangers_owned) + + " these items." + end + end + end + + def closet_list_description_format(list) + md = RDiscount.new(list.description) + Sanitize.clean(md.to_html, Sanitize::Config::BASIC).html_safe + end + + def hangers_owned_options + @hangers_owned_options ||= [true, false].map do |owned| + verb = ClosetHanger.verb(:i, owned) + ["items I #{verb}", owned] + end + end + + def render_sorted_hangers(list, show_controls) + render :partial => 'closet_hanger', + :collection => list.hangers.sort { |x,y| x.item.name <=> y.item.name }, + :locals => {:show_controls => show_controls} + end +end + diff --git a/app/helpers/closet_pages_helper.rb b/app/helpers/closet_pages_helper.rb new file mode 100644 index 00000000..1ed8454c --- /dev/null +++ b/app/helpers/closet_pages_helper.rb @@ -0,0 +1,10 @@ +module ClosetPagesHelper + def link_to_neopets_login(content) + link_to content, neopets_login_url, :target => "_blank" + end + + def neopets_login_url + "http://www.neopets.com/loginpage.phtml" + end +end + diff --git a/app/helpers/items_helper.rb b/app/helpers/items_helper.rb index cf586268..55540a3a 100644 --- a/app/helpers/items_helper.rb +++ b/app/helpers/items_helper.rb @@ -48,6 +48,28 @@ module ItemsHelper end end + def closeted_icons_for(item) + content = ''.html_safe + + if item.owned? + content << image_tag( + 'owned.png', + :title => 'You own this', + :alt => 'Own' + ) + end + + if item.wanted? + content << image_tag( + 'wanted.png', + :title => 'You want this', + :alt => 'Want' + ) + end + + content_tag :div, content, :class => 'closeted-icons' + end + def list_zones(zones, method=:label) zones.sort { |x,y| x.label <=> y.label }.map(&method).join(', ') end @@ -60,6 +82,12 @@ module ItemsHelper sprintf(NeoitemsURLFormat, CGI::escape(item.name)) end + def render_trading_closet_hangers(owned) + @trading_closet_hangers_by_owned[owned].map do |hanger| + link_to hanger.user.name, user_closet_hangers_path(hanger.user) + end.to_sentence.html_safe + end + private def build_on_pet_types(species, special_color=nil, &block) diff --git a/app/models/closet_hanger.rb b/app/models/closet_hanger.rb new file mode 100644 index 00000000..e873f6cb --- /dev/null +++ b/app/models/closet_hanger.rb @@ -0,0 +1,58 @@ +class ClosetHanger < ActiveRecord::Base + belongs_to :item + belongs_to :list, :class_name => 'ClosetList' + belongs_to :user + + attr_accessible :list_id, :owned, :quantity + + validates :item_id, :uniqueness => {:scope => [:user_id, :owned]} + validates :quantity, :numericality => {:greater_than => 0} + validates_presence_of :item, :user + + validate :list_belongs_to_user + + scope :alphabetical_by_item_name, joins(:item).order(Item.arel_table[:name]) + scope :newest, order(arel_table[:created_at].desc) + scope :owned_before_wanted, order(arel_table[:owned].desc) + scope :unlisted, where(:list_id => nil) + + {:owned => true, :wanted => false}.each do |name, owned| + scope "#{name}_trading", joins(:user).includes(:list). + where(:owned => owned). + where(( + User.arel_table["#{name}_closet_hangers_visibility"].gteq(ClosetVisibility[:trading].id) + ).or( + ClosetList.arel_table[:visibility].gteq(ClosetVisibility[:trading].id) + )) + end + + before_validation :set_owned_by_list + + def verb(subject=:someone) + self.class.verb(subject, owned?) + end + + def self.verb(subject, owned, positive=true) + base = (owned) ? 'own' : 'want' + base << 's' if positive && subject != :you && subject != :i + base + end + + protected + + def list_belongs_to_user + if list_id? + if list + errors.add(:list_id, "must belong to you") unless list.user_id == user_id + else + errors.add(:list, "must exist") + end + end + end + + def set_owned_by_list + self.owned = list.hangers_owned if list + true + end +end + diff --git a/app/models/closet_list.rb b/app/models/closet_list.rb new file mode 100644 index 00000000..57722726 --- /dev/null +++ b/app/models/closet_list.rb @@ -0,0 +1,31 @@ +class ClosetList < ActiveRecord::Base + belongs_to :user + has_many :hangers, :class_name => 'ClosetHanger', :foreign_key => 'list_id', + :dependent => :nullify + + attr_accessible :description, :hangers_owned, :name, :visibility + + validates :name, :presence => true, :uniqueness => {:scope => :user_id} + validates :user, :presence => true + validates :hangers_owned, :inclusion => {:in => [true, false], :message => "can't be blank"} + + scope :alphabetical, order(:name) + scope :public, where(arel_table[:visibility].gteq(ClosetVisibility[:public].id)) + scope :visible_to, lambda { |user| + condition = arel_table[:visibility].gteq(ClosetVisibility[:public].id) + condition = condition.or(arel_table[:user_id].eq(user.id)) if user + where(condition) + } + + after_save :sync_hangers_owned! + + def sync_hangers_owned! + if hangers_owned_changed? + hangers.each do |hanger| + hanger.owned = hangers_owned + hanger.save! + end + end + end +end + diff --git a/app/models/closet_page.rb b/app/models/closet_page.rb new file mode 100644 index 00000000..9ac91838 --- /dev/null +++ b/app/models/closet_page.rb @@ -0,0 +1,138 @@ +require 'yaml' + +class ClosetPage + include ActiveModel::Conversion + extend ActiveModel::Naming + + SELECTORS = { + :items => "form[action=\"process_closet.phtml\"] tr[bgcolor!=silver][bgcolor!=\"#E4E4E4\"]", + :item_thumbnail => "img", + :item_name => "td:nth-child(2)", + :item_quantity => "td:nth-child(5)", + :item_remove => "input", + :page_select => "select[name=page]", + :selected => "option[selected]" + } + + attr_accessor :index + attr_reader :hangers, :source, :total_pages, :unknown_item_names, :user + + def initialize(user) + raise ArgumentError, "Expected #{user.inspect} to be a User", caller unless user.is_a?(User) + @user = user + end + + def last? + @index == @total_pages + end + + def persisted? + false + end + + def save_hangers! + counts = {:created => 0, :updated => 0} + ClosetHanger.transaction do + @hangers.each do |hanger| + if hanger.new_record? + counts[:created] += 1 + hanger.save! + elsif hanger.changed? + counts[:updated] += 1 + hanger.save! + end + end + end + counts + end + + def source=(source) + @source = source + parse_source!(source) + end + + def url + "http://www.neopets.com/closet.phtml?per_page=50&page=#{@index}" + end + + protected + + def element(selector_name, parent) + parent.at_css(SELECTORS[selector_name]) || + raise(ParseError, "Closet #{selector_name} element not found in #{parent.inspect}") + end + + def elements(selector_name, parent) + parent.css(SELECTORS[selector_name]) + end + + def parse_source!(source) + doc = Nokogiri::HTML(source) + + page_selector = element(:page_select, doc) + @total_pages = page_selector.children.size + @index = element(:selected, page_selector)['value'].to_i + + items_data = { + :id => {}, + :thumbnail_url => {} + } + + # Go through the items, and find the ID/thumbnail for each and data with it + elements(:items, doc).each do |row| + # For normal items, the td contains essentially: + # NAME
OPTIONAL ADJECTIVE
+ # For PB items, the td contains: + # NAME
OPTIONAL ADJECTIVE + # So, we want the first text node. If it's a PB item, that's the first + # child. If it's a normal item, it's the first child 's child. + name_el = element(:item_name, row).children[0] + name_el = name_el.children[0] if name_el.name == 'b' + + data = { + :name => name_el.text, + :quantity => element(:item_quantity, row).text.to_i + } + + if id = element(:item_remove, row)['name'] + id = id.to_i + items_data[:id][id] = data + else # if this is a pb item, which does not give ID, go by thumbnail + thumbnail_url = element(:item_thumbnail, row)['src'] + items_data[:thumbnail_url][thumbnail_url] = data + end + end + + # Find items with either a matching ID or matching thumbnail URL + # Check out that single-query beauty :) + i = Item.arel_table + items = Item.where( + i[:id].in(items_data[:id].keys). + or( + i[:thumbnail_url].in(items_data[:thumbnail_url].keys) + ) + ) + + # Create closet hanger from each item, and remove them from the reference + # lists + @hangers = items.map do |item| + data = items_data[:id].delete(item.id) || + items_data[:thumbnail_url].delete(item.thumbnail_url) + hanger = @user.closet_hangers.find_or_initialize_by_item_id(item.id) + hanger.quantity = data[:quantity] + hanger + end + + # Take the names of the items remaining in the reference lists, meaning + # that they weren't found + @unknown_item_names = [] + items_data.each do |type, data_by_key| + data_by_key.each do |key, data| + @unknown_item_names << data[:name] + end + end + end + + class ParseError < RuntimeError;end +end + diff --git a/app/models/closet_visibility.rb b/app/models/closet_visibility.rb new file mode 100644 index 00000000..4cbc0e9a --- /dev/null +++ b/app/models/closet_visibility.rb @@ -0,0 +1,58 @@ +module ClosetVisibility + class Level + attr_accessor :id, :name + attr_writer :description + + def initialize(data) + data.each do |key, value| + send("#{key}=", value) + end + end + + def description(subject=nil) + if subject + @description.sub('$SUBJECT', subject).capitalize + else + @description + end + end + + def human_name + name.to_s.humanize + end + end + + LEVELS = [ + Level.new( + :id => 0, + :name => :private, + :description => "Only you can see $SUBJECT" + ), + Level.new( + :id => 1, + :name => :public, + :description => "Anyone who visits this page can see $SUBJECT" + ), + Level.new( + :id => 2, + :name => :trading, + :description => "$SUBJECT will be publicly listed for trades" + ) + ] + + LEVELS_BY_NAME = {}.tap do |levels_by_name| + LEVELS.each do |level| + levels_by_name[level.id] = level + levels_by_name[level.name] = level + end + end + + def self.[](id) + LEVELS_BY_NAME[id] + end + + def self.levels + LEVELS + end +end + diff --git a/app/models/item.rb b/app/models/item.rb index 08c3ee07..1492ded9 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -1,15 +1,18 @@ # requires item sweeper at bottom class Item < ActiveRecord::Base + include PrettyParam + SwfAssetType = 'object' + has_many :closet_hangers has_one :contribution, :as => :contributed has_many :parent_swf_asset_relationships, :foreign_key => 'parent_id', :conditions => {:swf_asset_type => SwfAssetType} has_many :swf_assets, :through => :parent_swf_asset_relationships, :source => :object_asset, :conditions => {:type => SwfAssetType} - attr_writer :current_body_id + attr_writer :current_body_id, :owned, :wanted NCRarities = [0, 500] PAINTBRUSH_SET_DESCRIPTION = 'This item is part of a deluxe paint brush set!' @@ -42,12 +45,24 @@ class Item < ActiveRecord::Base scope :sitemap, select([:id, :name]).order(:id).limit(49999) - # Not defining validations, since this app is currently read-only + scope :with_closet_hangers, joins(:closet_hangers) + + def closeted? + @owned || @wanted + end def nc? NCRarities.include?(rarity_index) end + def owned? + @owned + end + + def wanted? + @wanted + end + def restricted_zones unless @restricted_zones @restricted_zones = [] @@ -115,7 +130,7 @@ class Item < ActiveRecord::Base @supported_species ||= species_support_ids.blank? ? Species.all : species_support_ids.sort.map { |id| Species.find(id) } end - def self.search(query) + def self.search(query, user=nil) raise SearchError, "Please provide a search query" unless query query = query.strip raise SearchError, "Search queries should be at least 3 characters" if query.length < 3 @@ -143,7 +158,7 @@ class Item < ActiveRecord::Base limited_filters_used << condition.filter end end - condition.narrow(scope) + condition.narrow(scope, user) end end @@ -154,19 +169,12 @@ class Item < ActiveRecord::Base :name => name, :thumbnail_url => thumbnail_url, :zones_restrict => zones_restrict, - :rarity_index => rarity_index + :rarity_index => rarity_index, + :owned => owned?, + :wanted => wanted? } end - URL_CHAR_BLACKLIST = /[^a-z0-9\-]/i - def name_for_url - name.downcase.gsub(' ', '-').gsub(URL_CHAR_BLACKLIST, '') - end - - def to_param - "#{id}-#{name_for_url}" - end - before_create do self.sold_in_mall ||= false true @@ -631,6 +639,7 @@ class Item < ActiveRecord::Base name = name.to_s SearchFilterScopes << name LimitedSearchFilters << name if options[:limit] + (class << self; self; end).instance_eval do if options[:full] define_method "search_filter_#{name}", &options[:full] @@ -648,10 +657,13 @@ class Item < ActiveRecord::Base search_filter name, options, &block end - def self.search_filter_block(options, positive) - Proc.new { |str, scope| - condition = yield(str) - condition = "!(#{condition.to_sql})" unless positive + def self.search_filter_block(options, positive, &block) + Proc.new { |str, user, scope| + condition = block.arity == 1 ? block.call(str) : block.call(str, user) + unless positive + condition = condition.to_sql if condition.respond_to?(:to_sql) + condition = "!(#{condition})" + end scope = scope.send(options[:scope]) if options[:scope] scope.where(condition) } @@ -679,6 +691,47 @@ class Item < ActiveRecord::Base filter end + USER_ADJECTIVES = { + 'own' => true, + 'owns' => true, + 'owned' => true, + 'want' => false, + 'wants' => false, + 'wanted' => false, + 'all' => nil, + 'items' => nil + } + def self.parse_user_adjective(adjective, user) + unless USER_ADJECTIVES.has_key?(adjective) + raise SearchError, "We don't understand user:#{adjective}. " + + "Find items you own with user:owns, items you want with user:wants, or " + + "both with user:all" + end + + unless user + raise SearchError, "It looks like you're not logged in, so you don't own any items." + end + + USER_ADJECTIVES[adjective] + end + + search_filter :user do |adjective, user| + # Though joins may seem more efficient here for the positive case, we need + # to be able to handle cases like "user:owns user:wants", which breaks on + # the JOIN approach. Just have to look up the IDs in advance. + + owned_value = parse_user_adjective(adjective, user) + hangers = ClosetHanger.arel_table + items = user.closeted_items + items = items.where(ClosetHanger.arel_table[:owned].eq(owned_value)) unless owned_value.nil? + item_ids = items.map(&:id) + # Though it's best to do arel_table[:id].in(item_ids), it breaks in this + # version of Arel, and other conditions will overwrite this one. Since IDs + # are guaranteed to be integers, let's just build our own string condition + # and be done with it. + "id IN (#{item_ids.join(',')})" + end + search_filter :only do |species_name| begin id = Species.require_by_name(species_name).id @@ -709,7 +762,7 @@ class Item < ActiveRecord::Base SwfAsset.arel_table[:zone_id].in(zone_set.map(&:id)) end - single_search_filter :not_type, :full => lambda { |zone_set_name, scope| + single_search_filter :not_type, :full => lambda { |zone_set_name, user, scope| zone_set = Zone::ItemZoneSets[zone_set_name] raise SearchError, "Type \"#{zone_set_name}\" does not exist" unless zone_set psa = ParentSwfAssetRelationship.arel_table.alias @@ -757,10 +810,10 @@ class Item < ActiveRecord::Base @positive = !@positive end - def narrow(scope) + def narrow(scope, user) if SearchFilterScopes.include?(filter) polarized_filter = @positive ? filter : "not_#{filter}" - Item.send("search_filter_#{polarized_filter}", self, scope) + Item.send("search_filter_#{polarized_filter}", self, user, scope) else raise SearchError, "Filter #{filter} does not exist" end diff --git a/app/models/pretty_param.rb b/app/models/pretty_param.rb new file mode 100644 index 00000000..c24bd71a --- /dev/null +++ b/app/models/pretty_param.rb @@ -0,0 +1,11 @@ +module PrettyParam + BLACKLIST = /[^a-z0-9]/i + def name_for_param + name.split(BLACKLIST).select { |word| !word.blank? }.join('-') + end + + def to_param + "#{id}-#{name_for_param}" + end +end + diff --git a/app/models/user.rb b/app/models/user.rb index a13ade3a..12ffecbf 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,14 +1,22 @@ class User < ActiveRecord::Base + include PrettyParam + DefaultAuthServerId = 1 PreviewTopContributorsCount = 3 - + + has_many :closet_hangers + has_many :closet_lists + has_many :closeted_items, :through => :closet_hangers, :source => :item has_many :contributions has_many :outfits - + scope :top_contributors, order('points DESC').where(arel_table[:points].gt(0)) - + devise :rememberable - + + attr_accessible :neopets_username, :owned_closet_hangers_visibility, + :wanted_closet_hangers_visibility + def contribute!(pet) new_contributions = [] new_points = 0 @@ -38,7 +46,31 @@ class User < ActiveRecord::Base end new_points end - + + def assign_closeted_to_items!(items) + # Assigning these items to a hash by ID means that we don't have to go + # N^2 searching the items list for items that match the given IDs or vice + # versa, and everything stays a lovely O(n) + items_by_id = {} + items.each { |item| items_by_id[item.id] = item } + closet_hangers.where(:item_id => items_by_id.keys).each do |hanger| + item = items_by_id[hanger.item_id] + if hanger.owned? + item.owned = true + else + item.wanted = true + end + end + end + + def closet_hangers_groups_visible_to(user) + return [true, false] if user == self + [].tap do |groups| + groups << true if owned_closet_hangers_visibility >= ClosetVisibility[:public].id + groups << false if wanted_closet_hangers_visibility >= ClosetVisibility[:public].id + end + end + def self.find_or_create_from_remote_auth_data(user_data) user = find_or_initialize_by_remote_id_and_auth_server_id( user_data['id'], @@ -50,9 +82,10 @@ class User < ActiveRecord::Base end user end - + def self.points_required_to_pass_top_contributor(offset) user = User.top_contributors.select(:points).limit(1).offset(offset).first user ? user.points : 0 end end + diff --git a/app/stylesheets/_layout.sass b/app/stylesheets/_layout.sass index a4b5722a..29fd2103 100644 --- a/app/stylesheets/_layout.sass +++ b/app/stylesheets/_layout.sass @@ -76,7 +76,7 @@ $container_width: 800px input, button, select, label cursor: pointer -input[type=text], input[type=password], input[type=search], select +input[type=text], input[type=password], input[type=search], input[type=number], select, textarea +border-radius(3px) background: #fff border: 1px solid $input-border-color @@ -85,14 +85,14 @@ input[type=text], input[type=password], input[type=search], select &:focus, &:active color: inherit +textarea + font: inherit + a.button, input[type=submit], button +awesome-button &.loud +loud-awesome-button -a.button - +arrowed-awesome-button - ul.buttons margin-bottom: 1em li @@ -155,9 +155,21 @@ ul.buttons &:hover span text-decoration: none +#userbar-items-link + +hover-link + background: $module-bg-color + padding: .25em .5em + + &:after + color: red + content: "new!" + font-size: 85% + margin-left: .5em + .object +inline-block - padding: .5em + margin: $object-padding 0 + padding: 0 $object-padding position: relative text-align: center vertical-align: top @@ -166,13 +178,38 @@ ul.buttons text-decoration: none img +opacity(0.75) - &:hover img - +opacity(1) img display: block height: $object-img-size margin: 0 auto width: $object-img-size + &:hover img, a:hover img + // behave in browsers that only respond to a:hover, but also be in the + // hover state more often for browsers who support div:hover + // (quantity form in user items) + +opacity(1) + + .nc-icon, .closeted-icons + +opacity(1) + background: rgba(255, 255, 255, 0.75) + line-height: 1 + position: absolute + top: $object-img-size - $nc-icon-size + &:hover + +opacity(0.5) + background: transparent + + .nc-icon, .closeted-icons img + display: inline + height: $nc-icon-size + width: $nc-icon-size + + .nc-icon + right: ($object-width - $object-img-size) / 2 + $object-padding + + $closeted-icons-left: ($object-width - $object-img-size) / 2 + $object-padding + .closeted-icons + left: $closeted-icons-left dt font-weight: bold @@ -202,15 +239,6 @@ dd .current font-weight: bold -.object .nc-icon - height: 16px - position: absolute - right: ($object-width - $object-img-size) / 2 + $object-padding - top: $object-img-size - $nc-icon-size - width: 16px - &:hover - +opacity(0.5) - /* Fonts /* A font by Jos Buivenga (exljbris) -> www.exljbris.nl diff --git a/app/stylesheets/closet_hangers/_index.sass b/app/stylesheets/closet_hangers/_index.sass new file mode 100644 index 00000000..9364af11 --- /dev/null +++ b/app/stylesheets/closet_hangers/_index.sass @@ -0,0 +1,388 @@ +@import "partials/context_button" +@import "partials/icon" +@import "partials/secondary_nav" + +body.closet_hangers-index + +secondary-nav + + #title + margin-bottom: 0 + + #import-link + +awesome-button + +loud-awesome-button-color + + #closet-hangers-items-search + float: right + + input[name=q] + &.loading + background: + image: url(/images/loading.gif) + position: 2px center + repeat: no-repeat + padding-left: $icon-width + 4px + + #closet-hangers-contact + clear: both + color: $soft-text-color + margin-bottom: 1em + margin-left: 2em + min-height: image-height("neomail.png") + + a, > span + +hover-link + background: + image: image-url("neomail.png") + position: left center + repeat: no-repeat + color: inherit + float: left + height: 100% + padding-left: image-width("neomail.png") + 4px + + > span + background-image: image-url("neomail_edit.png") + + input[type=text] + width: 10em + + label + font-weight: bold + margin-right: .5em + + &:after + content: ":" + + #edit-contact-link-to-replace-form, #cancel-contact-link + display: none + + .edit-contact-link, #cancel-contact-link + cursor: pointer + text-decoration: underline + + &:hover + text-decoration: none + + #edit-contact-link-to-replace-form + #contact-link-has-value + display: none + + #contact-link-no-value + display: inline + + &.has-value + #contact-link-has-value + display: inline + + #contact-link-no-value + display: none + + #cancel-contact-link + margin-left: 1em + + #toggle-help + +awesome-button + cursor: pointer + display: none + + #closet-hangers-help.hidden + display: none + + #closet-hangers-extras + margin: + bottom: 2em + top: 2em + text-align: center + + a + +awesome-button + margin: 0 0.5em + + #closet-hangers-share + font-size: 85% + margin-bottom: 1em + + label + font-weight: bold + margin-right: .5em + + input + width: 30em + + #closet-hangers + clear: both + text-align: center + + .object + .quantity + +opacity(.75) + background: white + padding: 6px 4px 4px + position: absolute + left: ($object-width - $object-img-size) / 2 + $object-padding + line-height: 1 + text-align: left + top: 0 + + span, input[type=number] + font-size: 16px + font-weight: bold + + form + display: none + + &[data-quantity="1"] + .quantity + display: none + + .closet-hangers-group + border-top: 1px solid $module-border-color + margin-bottom: 2em + padding-bottom: 1em + + > header + border-bottom: 1px solid $soft-border-color + display: block + margin-bottom: .25em + padding: .25em 0 + position: relative + + h3 + font-size: 250% + margin: 0 + + .add-closet-list + +awesome-button + bottom: 50% + margin-bottom: -1em + position: absolute + right: 1em + + &:active + margin-bottom: -1.1em + top: auto + + span.show, span.hide + color: $soft-text-color + display: none + font-size: 85% + left: 1em + position: absolute + top: 1em + + &:hover + color: inherit + text-decoration: underline + + .closet-list + border-bottom: 1px solid $soft-border-color + padding: .5em 0 + position: relative + + .visibility-form + font-size: 85% + left: .5em + position: absolute + text-align: left + top: .25em + z-index: 10 + + input, select + font-size: inherit + margin: + bottom: 0 + top: 0 + + select + border-color: $background-color + + input[type=submit] + +context-button + font-size: inherit + visibility: hidden + + &:active + top: 1px + + .visibility-descriptions + +opacity(.75) + background: $background-color + font-style: italic + list-style: none + padding: 0 .5em + + li + display: none + + &:hover + .visibility-descriptions li.current + display: block + + header + display: block + position: relative + + h4 + +header-text + font-size: 150% + line-height: 1 + margin: 0 auto .67em + width: 50% + + .empty-list + display: none + font-style: italic + + .closet-list-controls + display: none + position: absolute + right: 1em + top: 0 + + a, input[type=submit] + +context-button + + form + display: inline + + &[data-hangers-count="0"] + .empty-list + display: block + + &.unlisted + h4 + font: + size: 125% + style: italic + + &:hover + .closet-list-controls + display: block + + .visibility-form + input[type=submit] + visibility: visible + + select + border-color: $soft-border-color + + &:last-child + border-bottom: 0 + + &.droppable-active + +border-radius(1em) + +module + border-bottom-width: 1px + border-style: dotted + margin: 1em 0 + + .object + // totally hiding these elements causes the original element to change + // position, throwing off the drag + +opacity(.25) + &.ui-draggable-dragging + +opacity(1) + + .closet-list-controls + display: none + + .closet-list-hangers + overflow: hidden + + .visibility-form + display: none + + .closet-hangers-group-autocomplete-item, .closet-list-autocomplete-item + span + font-style: italic + padding: .2em .4em + + .closet-list-autocomplete-item + a, span + font-size: 85% + padding-left: 2em + + &.current-user + #closet-hangers + .object:hover + form + display: inline + + .closet-hanger-destroy + position: absolute + right: ($object-width - $object-img-size) / 2 + $object-padding + top: $object-img-size - 28px + + input + +context-button + + .quantity + +opacity(1) + background: transparent + top: 0 + padding: 0 + + span + display: none + + input[type=number] + padding: 2px + width: 2em + + input[type=submit] + font-size: 85% + + &.js + #closet-hangers + .object:hover .quantity + display: block + + input[type=number] + width: 2.5em + + input[type=submit] + display: none + + .object.loading + background: $module-bg-color + outline: 1px solid $module-border-color + + .quantity + display: block + + span:after + content: "…" + + #closet-hangers-contact + form + display: none + + .edit-contact-link, #cancel-contact-link + display: inline + + &.editing + form + display: block + + .edit-contact-link + display: none + + .closet-hangers-group + header + .show, .hide + cursor: pointer + + .hide + display: block + + &.hidden + header .hide, .closet-hangers-group-content + display: none + + header .show + display: block + + #toggle-help + display: inline + diff --git a/app/stylesheets/closet_hangers/_petpage.sass b/app/stylesheets/closet_hangers/_petpage.sass new file mode 100644 index 00000000..5a8a51a8 --- /dev/null +++ b/app/stylesheets/closet_hangers/_petpage.sass @@ -0,0 +1,12 @@ +body.closet_hangers-petpage + +secondary-nav + + #intro + clear: both + + #petpage-output + display: block + height: 30em + margin: 0 auto + width: 50% + diff --git a/app/stylesheets/closet_lists/_form.sass b/app/stylesheets/closet_lists/_form.sass new file mode 100644 index 00000000..2c451ef9 --- /dev/null +++ b/app/stylesheets/closet_lists/_form.sass @@ -0,0 +1,30 @@ +body.closet_lists-new, body.closet_lists-create, body.closet_lists-edit, body.closet_lists-update + +secondary-nav + + form ul.fields + clear: both + list-style: none + + label + float: left + font-weight: bold + margin-right: 1em + + li + padding: 0.75em 0 + width: 35em + + input, textarea, select + clear: both + display: block + margin-top: .25em + width: 80% + + textarea + height: 12em + + .hint + display: block + font: + size: 85% + diff --git a/app/stylesheets/closet_pages/_new.sass b/app/stylesheets/closet_pages/_new.sass new file mode 100644 index 00000000..ceb49654 --- /dev/null +++ b/app/stylesheets/closet_pages/_new.sass @@ -0,0 +1,55 @@ +body.closet_pages-new, body.closet_pages-create + + #title + float: left + + .flash + clear: both + + #back-to-items + +awesome-button + margin: + left: 1em + top: .75em + + #closet-page-form + +clearfix + clear: both + margin-bottom: 1em + + #closet-page-frame-wrapper + float: left + margin-right: 2% + width: 48% + + #closet-page-frame + height: 19em + width: 100% + + #closet-page-source + float: left + width: 50% + + label + font-weight: bold + + textarea + height: 19em + + + ol + padding-left: 1em + + > li + margin-bottom: 1em + + ul + font-size: 85% + margin: + bottom: 1em + top: 0 + padding-left: 1em + + p + margin: 0 + diff --git a/app/stylesheets/items/_show.sass b/app/stylesheets/items/_show.sass index 24b3b239..c52f9a88 100644 --- a/app/stylesheets/items/_show.sass +++ b/app/stylesheets/items/_show.sass @@ -1,5 +1,5 @@ body.items-show - header + #item-header border-bottom: 1px solid $module-border-color display: block margin-bottom: 1em @@ -50,8 +50,51 @@ body.items-show font: family: $text-font size: 85% - p:first-child - margin-bottom: .25em + margin-bottom: 1em + + p + display: inline + + &:first-child + margin-right: 1em + #trade-hangers + font-size: 85% + text-align: left + + p + position: relative + + &:first-child + margin-bottom: .5em + + &.overflows + .toggle + display: block + + &.showing-more + .toggle + .less + display: block + + .more + display: none + + .toggle + background: white + bottom: 0 + cursor: pointer + display: none + font-family: $main-font + padding: 0 1em + position: absolute + right: 0 + + &:hover + text-decoration: underline + + .less + display: none + #item-preview-header margin-top: 3em h3, a @@ -62,3 +105,37 @@ body.items-show .nc-icon height: 16px width: 16px + + #closet-hangers + border: 1px solid $module-border-color + float: right + font-size: 85% + margin-left: 1em + padding: 1em + width: 21em + + label, header + display: block + font-weight: bold + + header + font-size: 125% + + form + padding: .5em 0 + + select + width: 9em + + input[type=number] + width: 4em + + &.js + #trade-hangers + p + max-height: 3em + overflow: hidden + + &.showing-more + max-height: none + diff --git a/app/stylesheets/outfits/_edit.sass b/app/stylesheets/outfits/_edit.sass index 4c2b1e3b..b29a8a9f 100644 --- a/app/stylesheets/outfits/_edit.sass +++ b/app/stylesheets/outfits/_edit.sass @@ -1,6 +1,7 @@ @import ../shared/jquery.jgrowl @import partials/wardrobe +@import "partials/context_button" @import "partials/icon" @import star @@ -229,9 +230,10 @@ body.outfits-edit display: none font-size: 85% margin: 0 auto - #preview-mode-image-access-denied + #preview-mode-note display: block font-size: 75% + margin-top: .5em text-align: center text-decoration: none width: 100% @@ -312,9 +314,14 @@ body.outfits-edit margin: 0 1em 0 0 input +inline-block + &[type=submit] + margin-right: 2em + .preview-search-form-your-items + display: none + font-size: 85% + margin-right: 1em #preview-search-form-pagination +inline-block - margin-left: 2em a, span margin: 0 .25em .current @@ -400,10 +407,7 @@ body.outfits-edit li margin-bottom: .25em a - +awesome-button - +awesome-button-color(#aaaaaa) - +opacity(0.9) - font-size: 80% + +context-button &:hover ul, .object-info display: block @@ -560,6 +564,8 @@ body.outfits-edit display: block #save-outfit, #save-current-outfit, #save-outfit-copy, #current-outfit-permalink, #shared-outfit-permalink, #share-outfit, #shared-outfit-url display: none + .preview-search-form-your-items + +inline-block &.user-not-signed-in #save-outfit-not-signed-in diff --git a/app/stylesheets/outfits/_new.sass b/app/stylesheets/outfits/_new.sass index aa755dcb..38d55196 100644 --- a/app/stylesheets/outfits/_new.sass +++ b/app/stylesheets/outfits/_new.sass @@ -137,3 +137,12 @@ body.outfits-new #read-more float: right + #your-items-module + h3 + &:after + color: red + content: "new!" + font-size: 85% + font-weight: bold + margin-left: .5em + diff --git a/app/stylesheets/partials/_context_button.sass b/app/stylesheets/partials/_context_button.sass new file mode 100644 index 00000000..a49f6cc3 --- /dev/null +++ b/app/stylesheets/partials/_context_button.sass @@ -0,0 +1,6 @@ +=context-button + +awesome-button + +awesome-button-color(#aaaaaa) + +opacity(0.9) + font-size: 80% + diff --git a/app/stylesheets/partials/_secondary_nav.sass b/app/stylesheets/partials/_secondary_nav.sass new file mode 100644 index 00000000..f4f501e1 --- /dev/null +++ b/app/stylesheets/partials/_secondary_nav.sass @@ -0,0 +1,12 @@ +=secondary-nav + #title + float: left + margin-right: .5em + + .flash + clear: both + + #secondary-nav + display: block + margin-top: .75em + diff --git a/app/stylesheets/partials/clean/_constants.sass b/app/stylesheets/partials/clean/_constants.sass index 877b5b2f..f0595da9 100644 --- a/app/stylesheets/partials/clean/_constants.sass +++ b/app/stylesheets/partials/clean/_constants.sass @@ -24,7 +24,8 @@ $text-font: "Droid Serif", Georgia, "Times New Roman", Times, serif $object-img-size: 80px $object-width: 100px -$object-padding: 6px +$object-padding: 8px $nc-icon-size: 16px $container-top-padding: 3em + diff --git a/app/stylesheets/screen.sass b/app/stylesheets/screen.sass index 2ae499f8..c8db393f 100644 --- a/app/stylesheets/screen.sass +++ b/app/stylesheets/screen.sass @@ -6,6 +6,10 @@ @import partials/jquery.jgrowl +@import closet_hangers/index +@import closet_hangers/petpage +@import closet_lists/form +@import closet_pages/new @import contributions/index @import items @import items/index diff --git a/app/views/closet_hangers/_closet_hanger.html.haml b/app/views/closet_hangers/_closet_hanger.html.haml new file mode 100644 index 00000000..63c6a936 --- /dev/null +++ b/app/views/closet_hangers/_closet_hanger.html.haml @@ -0,0 +1,18 @@ +- show_controls ||= false # we could do user check here, but may as well do it once +.object{'data-item-id' => closet_hanger.item_id, 'data-quantity' => closet_hanger.quantity} + = render :partial => 'items/item_link', :locals => {:item => closet_hanger.item} + .quantity{:class => "quantity-#{closet_hanger.quantity}"} + %span= closet_hanger.quantity + - if show_controls + = form_for closet_hanger, :url => user_item_closet_hanger_path(current_user, closet_hanger.item), :html => {:class => 'closet-hanger-update'} do |f| + = return_to_field_tag + = f.hidden_field :list_id + = f.hidden_field :owned + = f.number_field :quantity, :min => 0, :required => true, :title => "You own #{pluralize closet_hanger.quantity, closet_hanger.item.name}" + = f.submit "Save" + - if show_controls + = form_tag user_item_closet_hanger_path(current_user, closet_hanger.item), :method => :delete, :class => 'closet-hanger-destroy' do + = return_to_field_tag + = hidden_field_tag 'closet_hanger[owned]', closet_hanger.owned + = submit_tag "Remove" + diff --git a/app/views/closet_hangers/_petpage_content.html.haml b/app/views/closet_hangers/_petpage_content.html.haml new file mode 100644 index 00000000..efb0d4c3 --- /dev/null +++ b/app/views/closet_hangers/_petpage_content.html.haml @@ -0,0 +1,99 @@ +%style{:type => 'text/css'} + :plain + .dti-item-group, .dti-item-list, .dti-unlisted-items { + margin: 0; + padding: 0; + } + + .dti-item-group-header, .dti-item-group, #dti-item-footer { + color: #040; + font-family: Helvetica, Arial, Verdana, sans-serif; + line-height: 1.5; + margin: 0 auto; + text-align: center; + width: 560px; + } + + .dti-item-group-header { + border-top: 1px solid #060; + font-size: 175%; + margin-top: 1em; + } + + .dti-item-group-header, .dti-item-list { + border-bottom: 1px solid #ADA; + } + + .dti-item-group { + list-style: none; + } + + .dti-item-list h3 { + font-size: 150%; + } + + .dti-items { + border-spacing: 10px; + display: table; + } + + .dti-item-row { + display: table-row; + } + + .dti-item { + display: table-cell; + margin: 0 10px; + padding: 8px; + text-align: right; + width: 84px; + } + + .dti-item-thumbnail { + height: 80px; + width: 80px; + } + + .dti-item span { + display: block; + text-align: center; + } + + .dti-item-nc { + margin-top: -16px; + } + + .dti-unlisted-items h3 { + font-style: italic; + } + + #dti-item-footer { + font-size: 85%; + margin-top: 2em; + } + +- [true, false].each do |owned| + - lists = lists_by_owned[owned] + - if lists || unlisted_hangers_by_owned[owned] + %h2.dti-item-group-header Items #OWNER #{ClosetHanger.verb(:someone, owned)} + %ul.dti-item-group + - if lists + - lists.each do |list| + - unless list.hangers.empty? + %li.dti-item-list + %h3= list.name + - if list.description? + .dti-item-list-desc + = closet_list_description_format list + %div.dti-items + = render_batched_petpage_hangers(list.hangers.sort { |a,b| a.item.name <=> b.item.name }) + - if unlisted_hangers_by_owned[owned] + %li.dti-unlisted-items + - unless lists.blank? + %h3 (Not in a list) + %div + = render_batched_petpage_hangers(unlisted_hangers_by_owned[owned]) + +#dti-item-footer + I made this list on Dress to Impress. You can, too! + diff --git a/app/views/closet_hangers/_petpage_hanger.html.haml b/app/views/closet_hangers/_petpage_hanger.html.haml new file mode 100644 index 00000000..e3d69b20 --- /dev/null +++ b/app/views/closet_hangers/_petpage_hanger.html.haml @@ -0,0 +1,6 @@ +%div.dti-item + = image_tag hanger.item.thumbnail_url, :alt => nil, :class => 'dti-item-thumbnail' + - if hanger.item.nc? + = image_tag nc_icon_url, :alt => 'NC', :class => 'dti-item-nc', :title => 'This is an NC Mall item' + %span= petpage_item_name hanger.item + diff --git a/app/views/closet_hangers/index.html.haml b/app/views/closet_hangers/index.html.haml new file mode 100644 index 00000000..9be85fe2 --- /dev/null +++ b/app/views/closet_hangers/index.html.haml @@ -0,0 +1,119 @@ +- unless public_perspective? + - title 'Your Items' + - add_body_class 'current-user' + - secondary_nav do + %span#toggle-help Need help? + = form_tag items_path, :method => :get, :id => 'closet-hangers-items-search', 'data-current-user-id' => current_user.id do + = text_field_tag :q, nil, :placeholder => "Find items to add" + = submit_tag 'Search', :name => nil +- else + - title "#{@user.name}'s Items" + +- canonical_path user_closet_hangers_path(@user) + +- content_for :before_flashes do + #closet-hangers-contact + - if public_perspective? + - if @user.neopets_username? + = link_to "Neomail #{@user.neopets_username}", send_neomail_url(@user) + - else + %span#edit-contact-link-to-replace-form.edit-contact-link{:class => @user.neopets_username? ? 'has-value' : nil} + %span#contact-link-no-value + Add your Neopets username + %span#contact-link-has-value + Edit + = surround '"' do + Neomail + %span= @user.neopets_username + = form_for @user do |f| + = f.label :neopets_username + = f.text_field :neopets_username + = f.submit "Save" + %span#cancel-contact-link cancel + +- unless public_perspective? + #closet-hangers-help{:class => closet_hangers_help_class} + :markdown + **These are your items! You can track what items you want and own, and + share [this page](#{request.fullpath}) with the world**. Just look up an + item in the search form above to get started. + + **You can also sort your items into lists.** + [Building an Up For Trade list is a good place to start][uft]. You can + make lists for trade items with different market values, a private list of + what you need for that next outfit, or whatever you like. You can also + drag-and-drop items in and out of lists. It's pretty fun. + + **Your items also have privacy settings.** + Items can be **private**, so only you can see them. They can be **public**, + so you can share this page with friends. They can even be **trading**, + meaning that we'll mention on the item's [Infinite Closet][ic] page that + you own or want that item. + + **We try to make trading easy.** If there's some item you want, you can + pull up that item's [Infinite Closet][ic] page to see if anyone is offering + it, and see what *that* user wants + in exchange. It's all pretty spiffy. Also, if you plan to trade, your should + add your Neopets username so that + when other users come here they know how to contact you. + + **Have fun!** If you have any [neat ideas][suggestions] or [general praise and + bug reports][mail], we love to hear them. And, if you enjoy this feature, + [please consider donating to keep Dress to Impress running and improving][donate]. + Thanks! + + [donate]: #{donate_path} + [ic]: #{items_path} + [mail]: mailto:#{contact_email} + [suggestions]: #{feedback_url} + [uft]: #{new_user_closet_list_path(@user, :closet_list => {:hangers_owned => true, :name => 'Up For Trade', :visibility => ClosetVisibility[:trading].id})} + +- unless public_perspective? + #closet-hangers-extras + #closet-hangers-share + %label{:for => 'closet-hangers-share-box'} Public URL: + %input#closet-hangers-share-box{:type => 'text', :value => user_closet_hangers_url(@user), :readonly => true} + + = link_to "Import from Neopets closet", new_closet_page_path + = link_to "Export to Neopets petpage", petpage_user_closet_hangers_path(@user) + + + +#closet-hangers{:class => public_perspective? ? nil : 'current-user'} + - [true, false].each do |owned| + .closet-hangers-group{'data-owned' => owned.to_s, :id => "closet-hangers-group-#{owned}"} + %header + %h3 + Items #{closet_hanger_subject} #{closet_hanger_verb(owned)} + %span.toggle.show show + %span.toggle.hide hide + - unless public_perspective? + = link_to_add_closet_list 'Add new list', :owned => owned, :class => 'add-closet-list' + .closet-hangers-group-content + = render_closet_lists(@closet_lists_by_owned[owned]) + .closet-list.unlisted{'data-hangers-count' => unlisted_hangers_count(owned)} + %header + - unless public_perspective? + = form_for @user, :html => {:class => 'visibility-form'} do |f| + = f.select hangers_group_visibility_field_name(owned), + closet_visibility_choices(:human_name) + = f.submit "Save" + = closet_visibility_descriptions + - if has_lists?(owned) + %h4 (Not in a list) + .closet-list-content + .closet-list-hangers + = render_unlisted_closet_hangers(owned) + %span.empty-list + There aren't any items here. + - if public_perspective? + - unless has_hangers?(owned) + %p #{@user.name} doesn't seem to #{closet_hanger_verb(owned, false)} anything. + +- content_for :stylesheets do + = stylesheet_link_tag 'south-street/jquery-ui' + +- content_for :javascripts do + = include_javascript_libraries :jquery + = javascript_include_tag 'jquery.ui', 'jquery.jgrowl', 'placeholder', 'closet_hangers/index' + diff --git a/app/views/closet_hangers/petpage.html.haml b/app/views/closet_hangers/petpage.html.haml new file mode 100644 index 00000000..62e7325a --- /dev/null +++ b/app/views/closet_hangers/petpage.html.haml @@ -0,0 +1,22 @@ +- title 'Export to petpage' +- secondary_nav do + = link_to 'Back to Your Items', user_closet_hangers_path(current_user), :class => 'button' + +#intro + %p + We took your public lists and created a nice, simple HTML file for your + Neopet's petpage. By default it's styled as a table, but it doesn't have to + be. The HTML is flexible, so, if you're the artsy type, you're free to mess + with the styles all you want! + + %p + Copy the HTML from the box below, then paste it into + = succeed '.' do + = link_to "your pet's page", 'http://www.neopets.com/edithomepage.phtml' + Then head to the Neoboards to show off! Have fun! + +%textarea#petpage-output + = '' + render('petpage_content', + :lists_by_owned => @closet_lists_by_owned, + :unlisted_hangers_by_owned => @unlisted_closet_hangers_by_owned) + diff --git a/app/views/closet_lists/_closet_list.html.haml b/app/views/closet_lists/_closet_list.html.haml new file mode 100644 index 00000000..40005b79 --- /dev/null +++ b/app/views/closet_lists/_closet_list.html.haml @@ -0,0 +1,22 @@ +.closet-list{'data-id' => closet_list.id, 'data-hangers-count' => closet_list.hangers.count, :id => "closet-list-#{closet_list.id}"} + %header + - if show_controls + = form_for [closet_list.user, closet_list], :html => {:class => 'visibility-form'} do |f| + = f.select :visibility, closet_visibility_choices(:human_name) + = f.submit "Save" + = closet_visibility_descriptions('items in this list') + .closet-list-controls + = link_to 'Edit', edit_user_closet_list_path(closet_list.user, closet_list) + = form_tag user_closet_list_path(closet_list.user, closet_list), :method => 'delete' do + = submit_tag 'Delete', :confirm => closet_list_delete_confirmation(closet_list) + %h4= closet_list.name + + .closet-list-content + - if closet_list.description? + = closet_list_description_format closet_list + + .closet-list-hangers + - unless closet_list.hangers.empty? + = render_sorted_hangers(closet_list, show_controls) + %span.empty-list This list is empty. + diff --git a/app/views/closet_lists/_form.html.haml b/app/views/closet_lists/_form.html.haml new file mode 100644 index 00000000..fb84c0d2 --- /dev/null +++ b/app/views/closet_lists/_form.html.haml @@ -0,0 +1,31 @@ +- secondary_nav do + = link_to 'Back to Your Items', user_closet_hangers_path(current_user), :class => 'button' + += form_for [@closet_list.user, @closet_list] do |f| + %ul.fields + %li + = f.label :name + %span.hint Like "up for trade" or "NC wishlist" + = f.text_field :name, :required => true + %li + = f.label :hangers_owned, 'This is a list for…'.html_safe + = f.select :hangers_owned, hangers_owned_options + %li + = f.label :visibility, 'Who can see this list?' + = f.select :visibility, closet_visibility_choices(:description, 'Items in this list') + %li + = f.label :description + %span.hint + Why are these items in a list? What are your terms for trading? + Or you can leave this blank. + = f.text_area :description + %span.hint + We + = surround '_' do + %em support + = surround '**' do + %strong Markdown + and + some HTML. + = f.submit 'Save list' + diff --git a/app/views/closet_lists/edit.html.haml b/app/views/closet_lists/edit.html.haml new file mode 100644 index 00000000..d5ed6893 --- /dev/null +++ b/app/views/closet_lists/edit.html.haml @@ -0,0 +1,3 @@ +- title "Editing list \"#{@closet_list.name}\"" += render 'form' + diff --git a/app/views/closet_lists/new.html.haml b/app/views/closet_lists/new.html.haml new file mode 100644 index 00000000..af941cfe --- /dev/null +++ b/app/views/closet_lists/new.html.haml @@ -0,0 +1,3 @@ +- title 'Create an items list' += render 'form' + diff --git a/app/views/closet_pages/new.html.haml b/app/views/closet_pages/new.html.haml new file mode 100644 index 00000000..e2f6f5d6 --- /dev/null +++ b/app/views/closet_pages/new.html.haml @@ -0,0 +1,57 @@ +- title "Import from closet, Page #{@closet_page.index}" +- content_for :before_flashes do + = link_to 'Back to Your Items', user_closet_hangers_path(current_user), :id => 'back-to-items' + += form_for @closet_page, :html => {:id => 'closet-page-form'} do |f| + = f.hidden_field :index + #closet-page-frame-wrapper + %span + %strong Page #{@closet_page.index} + of your closet + %iframe#closet-page-frame{:src => @closet_page.url} + #closet-page-source + = f.label :source, "Paste source code below" + = f.text_area :source + = f.submit 'Add items to closet' + +:markdown + **Welcome to the bulk closet importer!** We're going to make it as + easy as possible to import your Neopets.com closet data into your Dress to + Impress closet. Here's how it works. + + 1. Check the framed Neopets.com window on the left, pointing to + [page #{@closet_page.index} of your closet][cp]. + * **Confirm that you're logged in.** If you're logged into + Neopets, but the above frame says that you're not, try enabling + "third-party cookies" in your browser. (Most have that on by default.) + * **If you haven't logged in, #{link_to_neopets_login "do so in another window"}.** + It's never a good idea to log in inside of a frame, unless you're a + web programmer pro who can check that the frame does, in fact, point + to Neopets.com. To be safe, + #{link_to_neopets_login "pull up another window, check the URL, and log in safely"}. + * **Confirm that the page is, in fact, your closet.** Similarly, don't + just trust a website when they tell you to copy-paste the source code + of another site. Instead, check that the page is what it is supposed to + be and does not contain any information you didn't mean to give out. + + 2. View the frame's source code. + * **In Google Chrome,** right-click the frame and choose **View Frame Source**. + * **In Firefox,** right-click the frame, choose **This Frame**, then **View Frame Source**. + * In other browsers, right-click, and look for something similar. If you're + still having trouble, try + #{link_to "viewing the page in a new window", @closet_page.url, :target => "_blank"}, + right-clicking, and choosing View Source. + + 3. Highlight the entire source code, and copy-paste it into the box on the right. + * Some nifty shortcuts: Ctrl-A to select all the text, Ctrl-C to copy it, + Ctrl-V to paste it in. + + 4. Submit! + * We'll analyze the code you sent us, grab exclusively the identity and + quantity of items in your closet, and add that to your Dress to Impress + closet. I promise it's all safe, but, if you're concerned, find a + programmer buddy and [check out the source code to be sure][source]. + + [cp]: #{@closet_page.url} + [source]: http://github.com/matchu/openneo-impress-rails + diff --git a/app/views/contributions/index.html.haml b/app/views/contributions/index.html.haml index 95bd7de2..7de1fd3a 100644 --- a/app/views/contributions/index.html.haml +++ b/app/views/contributions/index.html.haml @@ -1,4 +1,7 @@ - title 'Recent Contributions' +- if @user + - canonical_path user_contributions_path(@user) + %ul.buttons - if @user %li= link_to 'Recent Contributions', contributions_path, :class => 'button' @@ -15,3 +18,4 @@ = will_paginate @contributions %ul.contributions= render @contributions = will_paginate @contributions + diff --git a/app/views/items/_item.html.haml b/app/views/items/_item.html.haml index 1634f0be..a3de7727 100644 --- a/app/views/items/_item.html.haml +++ b/app/views/items/_item.html.haml @@ -1,5 +1,3 @@ .object - = link_to item_path(item, :q => @query) do - = image_tag item.thumbnail_url, :alt => item.description, :title => item.description - = item.name - = nc_icon_for(item) + = render :partial => 'item_link', :locals => {:item => item} + diff --git a/app/views/items/_item_link.html.haml b/app/views/items/_item_link.html.haml new file mode 100644 index 00000000..e9f95056 --- /dev/null +++ b/app/views/items/_item_link.html.haml @@ -0,0 +1,6 @@ += link_to item_path(item, :q => @query) do + = image_tag item.thumbnail_url, :alt => item.description, :title => item.description + %span.name= item.name + = nc_icon_for(item) + = closeted_icons_for(item) + diff --git a/app/views/items/index.html.haml b/app/views/items/index.html.haml index 999a3096..f02d4fa3 100644 --- a/app/views/items/index.html.haml +++ b/app/views/items/index.html.haml @@ -20,6 +20,11 @@ %dd returns any item with the word "kreludor" and the phrase "altador cup" in it, but not the word "background" + %dt hat user:owns + %dd + returns + = link_to 'items that you own', your_items_path + with the word "hat" %dt blue is:nc %dd returns any NC Mall item with the word "blue" in it %dt collar -is:pb diff --git a/app/views/items/show.html.haml b/app/views/items/show.html.haml index 83c04220..1a9d7970 100644 --- a/app/views/items/show.html.haml +++ b/app/views/items/show.html.haml @@ -1,17 +1,35 @@ - title @item.name -- content_for :meta do - %link{:rel => 'canonical', :href => url_for(@item)} +- canonical_path @item - cache "items_show_#{@item.id}_main_content" do - %header + %header#item-header = image_tag @item.thumbnail_url, :id => 'item-thumbnail' %div %h2#item-name= @item.name = nc_icon_for(@item) - unless @item.rarity.blank? == Rarity: #{@item.rarity_index} (#{@item.rarity}) - %a.button{:href => neoitems_url_for(@item)} NeoItems + = link_to 'NeoItems', neoitems_url_for(@item), :class => 'button' + - if @current_user_hangers + #closet-hangers + %header + Track this in + = link_to 'Your Items', user_closet_hangers_path(current_user) + - @current_user_hangers.each do |hanger| + = form_for(hanger, :url => user_item_closet_hanger_path(current_user, @item)) do |f| + - if hanger.new_record? + = f.hidden_field :quantity + = f.hidden_field :owned + = f.submit "I #{hanger.verb(:you)} this item!" + - else + = f.hidden_field :owned + = f.label :quantity, "How many of these do you #{hanger.verb(:you)}?" + = f.number_field :quantity, :min => 0, :required => true + - lists = current_user.closet_lists.where(:hangers_owned => hanger.owned).all + - unless lists.empty? + = f.collection_select :list_id, lists, :id, :name, :include_blank => 'Not in a list' + = f.submit "Save" %p= @item.description #item-zones @@ -25,6 +43,37 @@ - else = list_zones @item.restricted_zones + #trade-hangers + - [true, false].each do |owned| + %p + - unless @trading_closet_hangers_by_owned[owned].empty? + %strong + = pluralize @trading_closet_hangers_by_owned[owned].size, 'user' + - if owned + - if @trading_closet_hangers_by_owned[owned].size == 1 + has + - else + have + this item up for trade: + - else + - if @trading_closet_hangers_by_owned[owned].size == 1 + wants + - else + want + this item: + = render_trading_closet_hangers(owned) + - else + %strong + We don't know anyone who + - if owned + has this item up for trade. + - else + wants this item. + %span.toggle + %span.more more + %span.less less + + #item-preview-header %h3 Preview %a#customize-more.button{:href => '/'} Customize more diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 40300d78..eb92e9a6 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,6 +11,7 @@ Dress to Impress: Preview customized Neopets' clothing and wearables /[if IE] = include_javascript_libraries :html5 + = yield :stylesheets = stylesheet_link_tag "compiled/screen" = yield :meta = csrf_meta_tag @@ -36,15 +37,12 @@ #userbar - if user_signed_in? - - if can_use_image_mode? - = link_to image_mode_path, :id => 'userbar-image-mode' do - = image_tag 'image_mode_icon.png', :alt => 'Image Mode' - Welcome to Image Mode! %span - Hey, - = succeed '!' do - = link_to current_user.name, user_contributions_path(current_user) - == You have #{current_user.points} points. + Hey, #{current_user.name}! + You have + = succeed '.' do + = link_to "#{current_user.points} points", user_contributions_path(current_user) + = link_to 'Items', user_closet_hangers_path(current_user), :id => 'userbar-items-link' = link_to 'Outfits', current_user_outfits_path = link_to 'Settings', Openneo::Auth.remote_settings_url = link_to 'Log out', logout_path_with_return_to @@ -69,9 +67,9 @@ Contact: %ul %li - %a{:href => "http://openneo.uservoice.com/forums/40720-dress-to-impress"} Suggestions + %a{:href => feedback_url} Suggestions %li - %a{:href => "mailto:webmaster@openneo.net"} Questions, comments, bugs + %a{:href => "mailto:#{contact_email}"} Questions, comments, bugs %p Images © 2000-2010 Neopets, Inc. All Rights Reserved. Used With Permission diff --git a/app/views/outfits/edit.html.haml b/app/views/outfits/edit.html.haml index ba42560b..75e6dc46 100644 --- a/app/views/outfits/edit.html.haml +++ b/app/views/outfits/edit.html.haml @@ -41,14 +41,16 @@ %li#preview-mode-flash.active Flash - if can_use_image_mode? %li#preview-mode-image Image - - unless can_use_image_mode? - = link_to(donate_path, :id => 'preview-mode-image-access-denied', :target => '_blank') do + - if can_use_image_mode? + %button#preview-download-image Download + = link_to 'Image mode FAQ', image_mode_path, + :id => 'preview-mode-note', :target => '_blank' + - else + = link_to(donate_path, :id => 'preview-mode-note', :target => '_blank') do %strong Image mode is available for early beta testing to users who %em donate at least $5 to help upgrade the server. Thanks! - - if can_use_image_mode? - %button#preview-download-image Download #preview-sidebar - unless can_use_image_mode? #preview-sidebar-donation-request @@ -91,6 +93,8 @@ %h2 Add an item %input{:name => "query", :placeholder => "Search items...", :type => "search"}/ %input{:type => "submit", :value => "Go"}/ + %a.preview-search-form-your-items{:href => '#', 'data-search-value' => 'owns'} Items you own + %a.preview-search-form-your-items{:href => '#', 'data-search-value' => 'wants'} Items you want #preview-search-form-pagination %a#preview-search-form-clear{:href => "#"} clear %dl#preview-search-form-help diff --git a/app/views/outfits/new.html.haml b/app/views/outfits/new.html.haml index a678108f..1baa4804 100644 --- a/app/views/outfits/new.html.haml +++ b/app/views/outfits/new.html.haml @@ -28,16 +28,16 @@ - cache :action_suffix => 'sections_and_description' do %ul#sections - %li - %a{:href => "http://forum.openneo.net"} - = image_tag 'forum.png' + %li#your-items-module + = link_to image_tag('your_items.png'), your_items_path %h3 - %a{:href => "http://forum.openneo.net/"} Forum + = link_to 'Your Items', your_items_path %div - %h4 Join our community! + %h4 Track and trade! %p - Show off your designs, ask for advice, or play silly forum games - here. + Make lists of the items you own and want, and share them with the + world. + %li %a{:href => items_path} = image_tag 'items.png' diff --git a/config/routes.rb b/config/routes.rb index 74a89a92..7a19db34 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,10 @@ OpenneoImpressItems::Application.routes.draw do |map| + get "petpages/new" + + get "closet_lists/new" + + get "closet_lists/create" + root :to => 'outfits#new' devise_for :users @@ -24,6 +30,8 @@ OpenneoImpressItems::Application.routes.draw do |map| resources :pet_attributes, :only => [:index] resources :swf_assets, :only => [:index, :show] + resources :closet_pages, :only => [:new, :create], :path => 'closet/pages' + match '/users/current-user/outfits' => 'outfits#index', :as => :current_user_outfits match '/pets/load' => 'pets#load', :method => :post, :as => :load_pet @@ -33,9 +41,22 @@ OpenneoImpressItems::Application.routes.draw do |map| match '/logout' => 'sessions#destroy', :as => :logout match '/users/authorize' => 'sessions#create' - resources :user, :only => [] do + resources :users, :path => 'user', :only => [:update] do resources :contributions, :only => [:index] + resources :closet_hangers, :only => [:index], :path => 'closet' do + collection do + get :petpage + end + end + resources :closet_lists, :only => [:new, :create, :edit, :update, :destroy], :path => 'closet/lists' + + resources :items, :only => [] do + resource :closet_hanger, :only => [:create, :update, :destroy] + end end + + match 'users/current-user/closet' => 'closet_hangers#index', :as => :your_items + match 'users/top-contributors' => 'users#top_contributors', :as => :top_contributors match 'users/top_contributors' => redirect('/users/top-contributors') diff --git a/db/migrate/20110712232259_create_closet_hangers.rb b/db/migrate/20110712232259_create_closet_hangers.rb new file mode 100644 index 00000000..80fc9f07 --- /dev/null +++ b/db/migrate/20110712232259_create_closet_hangers.rb @@ -0,0 +1,15 @@ +class CreateClosetHangers < ActiveRecord::Migration + def self.up + create_table :closet_hangers do |t| + t.integer :item_id + t.integer :user_id + t.integer :quantity + + t.timestamps + end + end + + def self.down + drop_table :closet_hangers + end +end diff --git a/db/migrate/20110713162012_set_closet_hangers_quantity_default_to_zero.rb b/db/migrate/20110713162012_set_closet_hangers_quantity_default_to_zero.rb new file mode 100644 index 00000000..4a32f700 --- /dev/null +++ b/db/migrate/20110713162012_set_closet_hangers_quantity_default_to_zero.rb @@ -0,0 +1,7 @@ +class SetClosetHangersQuantityDefaultToZero < ActiveRecord::Migration + def self.up + end + + def self.down + end +end diff --git a/db/migrate/20110720183722_add_neopets_username_to_users.rb b/db/migrate/20110720183722_add_neopets_username_to_users.rb new file mode 100644 index 00000000..5cef44b9 --- /dev/null +++ b/db/migrate/20110720183722_add_neopets_username_to_users.rb @@ -0,0 +1,9 @@ +class AddNeopetsUsernameToUsers < ActiveRecord::Migration + def self.up + add_column :users, :neopets_username, :string + end + + def self.down + remove_column :users, :neopets_username + end +end diff --git a/db/migrate/20110722180616_add_owned_to_closet_hangers.rb b/db/migrate/20110722180616_add_owned_to_closet_hangers.rb new file mode 100644 index 00000000..faa4d4cf --- /dev/null +++ b/db/migrate/20110722180616_add_owned_to_closet_hangers.rb @@ -0,0 +1,10 @@ +class AddOwnedToClosetHangers < ActiveRecord::Migration + def self.up + add_column :closet_hangers, :owned, :boolean, :null => false, :default => true + end + + def self.down + remove_column :closet_hangers, :owned + end +end + diff --git a/db/migrate/20110726231143_create_closet_lists.rb b/db/migrate/20110726231143_create_closet_lists.rb new file mode 100644 index 00000000..85ec7f33 --- /dev/null +++ b/db/migrate/20110726231143_create_closet_lists.rb @@ -0,0 +1,21 @@ +class CreateClosetLists < ActiveRecord::Migration + def self.up + create_table :closet_lists do |t| + t.string :name + t.text :description + t.integer :user_id + t.boolean :hangers_owned, :null => false + + t.timestamps + end + + add_column :closet_hangers, :list_id, :integer + end + + def self.down + drop_table :closet_lists + + remove_column :closet_hangers, :list_id + end +end + diff --git a/db/migrate/20110730174148_add_closet_hangers_visibility_to_users.rb b/db/migrate/20110730174148_add_closet_hangers_visibility_to_users.rb new file mode 100644 index 00000000..77281cef --- /dev/null +++ b/db/migrate/20110730174148_add_closet_hangers_visibility_to_users.rb @@ -0,0 +1,12 @@ +class AddClosetHangersVisibilityToUsers < ActiveRecord::Migration + def self.up + add_column :users, :owned_closet_hangers_visibility, :integer, :null => false, :default => 1 + add_column :users, :wanted_closet_hangers_visibility, :integer, :null => false, :default => 1 + end + + def self.down + remove_column :users, :wanted_closet_hangers_visibility + remove_column :users, :owned_closet_hangers_visibility + end +end + diff --git a/db/migrate/20110731021808_add_visibility_to_closet_lists.rb b/db/migrate/20110731021808_add_visibility_to_closet_lists.rb new file mode 100644 index 00000000..68d62874 --- /dev/null +++ b/db/migrate/20110731021808_add_visibility_to_closet_lists.rb @@ -0,0 +1,10 @@ +class AddVisibilityToClosetLists < ActiveRecord::Migration + def self.up + add_column :closet_lists, :visibility, :integer, :null => false, :default => 1 + end + + def self.down + remove_column :closet_lists, :visibility + end +end + diff --git a/db/schema.rb b/db/schema.rb index 69c5dca6..b966ec98 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20110626202605) do +ActiveRecord::Schema.define(:version => 20110731021808) do create_table "auth_servers", :force => true do |t| t.string "short_name", :limit => 10, :null => false @@ -20,6 +20,26 @@ ActiveRecord::Schema.define(:version => 20110626202605) do t.string "secret", :limit => 64, :null => false end + create_table "closet_hangers", :force => true do |t| + t.integer "item_id" + t.integer "user_id" + t.integer "quantity" + t.datetime "created_at" + t.datetime "updated_at" + t.boolean "owned", :default => true, :null => false + t.integer "list_id" + end + + create_table "closet_lists", :force => true do |t| + t.string "name" + t.text "description" + t.integer "user_id" + t.boolean "hangers_owned", :null => false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "visibility", :default => 1, :null => false + end + create_table "contributions", :force => true do |t| t.string "contributed_type", :limit => 8, :null => false t.integer "contributed_id", :null => false @@ -159,16 +179,20 @@ ActiveRecord::Schema.define(:version => 20110626202605) do end create_table "users", :force => true do |t| - t.string "name", :limit => 20, :null => false - t.integer "auth_server_id", :limit => 1, :null => false - t.integer "remote_id", :null => false - t.integer "points", :default => 0, :null => false - t.boolean "beta", :default => false, :null => false + t.string "name", :limit => 20, :null => false + t.integer "auth_server_id", :limit => 1, :null => false + t.integer "remote_id", :null => false + t.integer "points", :default => 0, :null => false + 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_admin", :default => false, :null => false t.boolean "forum_moderator" - t.boolean "image_mode_tester", :default => false, :null => false + t.boolean "image_mode_tester", :default => false, :null => false + t.text "closet_description", :null => false + t.string "neopets_username" + t.integer "owned_closet_hangers_visibility", :default => 1, :null => false + t.integer "wanted_closet_hangers_visibility", :default => 1, :null => false end create_table "zones", :force => true do |t| diff --git a/public/403.html b/public/403.html new file mode 100644 index 00000000..0ccf5383 --- /dev/null +++ b/public/403.html @@ -0,0 +1,28 @@ + + + + You do not have permission to access this page (403) + + + + + +
+

You do not have permission to access this page.

+

This resource might belong to another user, or your session may have expired.

+

Try logging in again.

+
+ + + diff --git a/public/images/nc.png b/public/images/nc.png index 42c52d05..0ca9074d 100644 Binary files a/public/images/nc.png and b/public/images/nc.png differ diff --git a/public/images/neomail.png b/public/images/neomail.png new file mode 100644 index 00000000..4a6c5d39 Binary files /dev/null and b/public/images/neomail.png differ diff --git a/public/images/neomail_edit.png b/public/images/neomail_edit.png new file mode 100644 index 00000000..244f04ae Binary files /dev/null and b/public/images/neomail_edit.png differ diff --git a/public/images/owned.png b/public/images/owned.png new file mode 100644 index 00000000..a9925a06 Binary files /dev/null and b/public/images/owned.png differ diff --git a/public/images/wanted.png b/public/images/wanted.png new file mode 100644 index 00000000..003924f5 Binary files /dev/null and b/public/images/wanted.png differ diff --git a/public/images/your_items.png b/public/images/your_items.png new file mode 100644 index 00000000..87973fc6 Binary files /dev/null and b/public/images/your_items.png differ diff --git a/public/javascripts/closet_hangers/index.js b/public/javascripts/closet_hangers/index.js new file mode 100644 index 00000000..bfa4a025 --- /dev/null +++ b/public/javascripts/closet_hangers/index.js @@ -0,0 +1,510 @@ +(function () { + var hangersInitCallbacks = []; + + function onHangersInit(callback) { + hangersInitCallbacks[hangersInitCallbacks.length] = callback; + } + + function hangersInit() { + for(var i = 0; i < hangersInitCallbacks.length; i++) { + hangersInitCallbacks[i](); + } + } + + /* + + Hanger groups + + */ + + var hangerGroups = []; + + $('div.closet-hangers-group').each(function () { + var el = $(this); + var lists = []; + + el.find('div.closet-list').each(function () { + var el = $(this); + var id = el.attr('data-id'); + if(id) { + lists[lists.length] = { + id: parseInt(id, 10), + label: el.find('h4').text() + } + } + }); + + hangerGroups[hangerGroups.length] = { + label: el.find('h3').text(), + lists: lists, + owned: (el.attr('data-owned') == 'true') + }; + }); + + $('div.closet-hangers-group span.toggle').live('click', function () { + $(this).closest('.closet-hangers-group').toggleClass('hidden'); + }); + + /* + + Hanger forms + + */ + + $.fn.liveDraggable = function (opts) { + this.live("mouseover", function() { + if (!$(this).data("init")) { + $(this).data("init", true).draggable(opts); + } + }); + }; + + var body = $(document.body).addClass("js"); + if(!body.hasClass("current-user")) return false; + + var hangersElQuery = '#closet-hangers'; + var hangersEl = $(hangersElQuery); + + $.fn.disableForms = function () { + return this.data("formsDisabled", true).find("input").attr("disabled", "disabled").end(); + } + + $.fn.enableForms = function () { + return this.data("formsDisabled", false).find("input").removeAttr("disabled").end(); + } + + $.fn.hasChanged = function () { + return this.attr('data-previous-value') != this.val(); + } + + $.fn.revertValue = function () { + return this.each(function () { + var el = $(this); + el.val(el.attr('data-previous-value')); + }); + } + + $.fn.storeValue = function () { + return this.each(function () { + var el = $(this); + el.attr('data-previous-value', el.val()); + }); + } + + $.fn.insertIntoSortedList = function (list, compare) { + var newChild = this, inserted = false; + list.children().each(function () { + if(compare(newChild, $(this)) < 1) { + newChild.insertBefore(this); + inserted = true; + return false; + } + }); + if(!inserted) newChild.appendTo(list); + return this; + } + + function handleSaveError(xhr, action) { + try { + var data = $.parseJSON(xhr.responseText); + } catch(e) { + var data = {}; + } + + if(typeof data.errors != 'undefined') { + $.jGrowl("Error " + action + ": " + data.errors.join(", ")); + } else { + $.jGrowl("We had trouble " + action + " just now. Try again?"); + } + } + + function objectRemoved(objectWrapper) { + objectWrapper.hide(250, $.proxy(objectWrapper, 'remove')); + } + + function compareItemsByName(a, b) { + return a.find('span.name').text().localeCompare(b.find('span.name').text()); + } + + function findList(id, item) { + if(id) { + return $('#closet-list-' + id); + } else { + return item.closest('.closet-hangers-group').find('div.closet-list.unlisted'); + } + } + + function updateListHangersCount(el) { + el.attr('data-hangers-count', el.find('div.object').length); + } + + function moveItemToList(item, listId) { + var newList = findList(listId, item); + var oldList = item.closest('div.closet-list'); + var hangersWrapper = newList.find('div.closet-list-hangers'); + item.insertIntoSortedList(hangersWrapper, compareItemsByName); + updateListHangersCount(oldList); + updateListHangersCount(newList); + } + + function submitUpdateForm(form) { + if(form.data('loading')) return false; + var quantityEl = form.children("input[name=closet_hanger\[quantity\]]"); + var listEl = form.children("input[name=closet_hanger\[list_id\]]"); + var listChanged = listEl.hasChanged(); + if(listChanged || quantityEl.hasChanged()) { + var objectWrapper = form.closest(".object").addClass("loading"); + var newQuantity = quantityEl.val(); + var quantitySpan = objectWrapper.find(".quantity span").text(newQuantity); + objectWrapper.attr('data-quantity', newQuantity); + var data = form.serialize(); // get data before disabling inputs + objectWrapper.disableForms(); + form.data('loading', true); + if(listChanged) moveItemToList(objectWrapper, listEl.val()); + $.ajax({ + url: form.attr("action") + ".json", + type: "post", + data: data, + dataType: "json", + complete: function (data) { + if(quantityEl.val() == 0) { + objectRemoved(objectWrapper); + } else { + objectWrapper.removeClass("loading").enableForms(); + } + form.data('loading', false); + }, + success: function () { + quantityEl.storeValue(); + listEl.storeValue(); + }, + error: function (xhr) { + quantityEl.revertValue(); + listEl.revertValue(); + if(listChanged) moveItemToList(objectWrapper, listEl.val()); + quantitySpan.text(quantityEl.val()); + + handleSaveError(xhr, "updating the quantity"); + } + }); + } + } + + $(hangersElQuery + ' form.closet-hanger-update').live('submit', function (e) { + e.preventDefault(); + submitUpdateForm($(this)); + }); + + function editableInputs() { return $(hangersElQuery).find('input[name=closet_hanger\[quantity\]], input[name=closet_hanger\[list_id\]]') } + + $(hangersElQuery + 'input[name=closet_hanger\[quantity\]]').live('change', function () { + submitUpdateForm($(this).parent()); + }).storeValue(); + + onHangersInit(function () { + editableInputs().storeValue(); + }); + + $(hangersElQuery + ' div.object').live('mouseleave', function () { + submitUpdateForm($(this).find('form.closet-hanger-update')); + }).liveDraggable({ + appendTo: '#closet-hangers', + distance: 20, + helper: "clone", + revert: "invalid" + }); + + $(hangersElQuery + " form.closet-hanger-destroy").live("submit", function (e) { + e.preventDefault(); + var form = $(this); + var button = form.children("input[type=submit]").val("Removing…"); + var objectWrapper = form.closest(".object").addClass("loading"); + var data = form.serialize(); // get data before disabling inputs + objectWrapper.addClass("loading").disableForms(); + $.ajax({ + url: form.attr("action") + ".json", + type: "post", + data: data, + dataType: "json", + complete: function () { + button.val("Remove"); + }, + success: function () { + objectRemoved(objectWrapper); + }, + error: function () { + objectWrapper.removeClass("loading").enableForms(); + $.jGrowl("Error removing item. Try again?"); + } + }); + }); + + /* + + Search, autocomplete + + */ + + $('input, textarea').placeholder(); + + var itemsSearchForm = $("#closet-hangers-items-search[data-current-user-id]"); + var itemsSearchField = itemsSearchForm.children("input[name=q]"); + + itemsSearchField.autocomplete({ + select: function (e, ui) { + if(ui.item.is_item) { + // Let the autocompleter finish up this search before starting a new one + setTimeout(function () { itemsSearchField.autocomplete("search", ui.item) }, 0); + } else { + var item = ui.item.item; + var group = ui.item.group; + + itemsSearchField.addClass("loading"); + + var closetHanger = { + owned: group.owned, + list_id: ui.item.list ? ui.item.list.id : '' + }; + + if(!item.hangerInGroup) closetHanger.quantity = 1; + + $.ajax({ + url: "/user/" + itemsSearchForm.data("current-user-id") + "/items/" + item.id + "/closet_hanger", + type: "post", + data: {closet_hanger: closetHanger, return_to: window.location.pathname + window.location.search}, + complete: function () { + itemsSearchField.removeClass("loading"); + }, + success: function (html) { + var doc = $(html); + hangersEl.html( doc.find('#closet-hangers').html() ); + hangersInit(); + doc.find('.flash').hide().insertBefore(hangersEl).show(500).delay(5000).hide(250); + itemsSearchField.val(""); + }, + error: function (xhr) { + handleSaveError(xhr, "adding the item"); + } + }); + } + }, + source: function (input, callback) { + if(typeof input.term == 'string') { // user-typed query + $.getJSON("/items.json?q=" + input.term, function (data) { + var output = []; + var items = data.items; + for(var i in items) { + items[i].label = items[i].name; + items[i].is_item = true; + output[output.length] = items[i]; + } + callback(output); + }); + } else { // item was chosen, now choose a group to insert + var groupInserts = [], group; + var item = input.term, itemEl, hangerInGroup, currentListId; + for(var i in hangerGroups) { + group = hangerGroups[i]; + itemEl = $('div.closet-hangers-group[data-owned=' + group.owned + '] div.object[data-item-id=' + item.id + ']'); + hangerInGroup = itemEl.length > 0; + currentListId = itemEl.closest('.closet-list').attr('data-id'); + + groupInserts[groupInserts.length] = { + group: group, + item: item, + label: item.label, + hangerInGroup: hangerInGroup, + hangerInList: !!currentListId + } + + for(var i = 0; i < group.lists.length; i++) { + groupInserts[groupInserts.length] = { + group: group, + item: item, + label: item.label, + list: group.lists[i], + hangerInGroup: hangerInGroup, + currentListId: currentListId + } + } + } + callback(groupInserts); + } + } + }); + + var autocompleter = itemsSearchField.data("autocomplete"); + + autocompleter._renderItem = function( ul, item ) { + var li = $("
  • ").data("item.autocomplete", item); + if(item.is_item) { // these are items from the server + li.append("Add " + item.label + ""); + } else if(item.list) { // these are list inserts + if(item.hangerInGroup) { + if(item.currentListId == item.list.id) { + li.append("It's in " + item.list.label + " now"); + } else { + li.append("Move to " + item.list.label + ""); + } + } else { + li.append("Add to " + item.list.label + ""); + } + li.addClass("closet-list-autocomplete-item"); + } else { // these are group inserts + if(item.hangerInGroup) { + var groupName = item.group.label; + if(item.hangerInList) { + li.append("Move to " + groupName.replace(/\s+$/, '') + ", no list"); + } else { + li.append("It's in " + groupName + " now"); + } + } else { + li.append("Add to " + item.group.label + ""); + } + li.addClass('closet-hangers-group-autocomplete-item'); + } + return li.appendTo(ul); + } + + /* + + Contact Neopets username form + + */ + + var contactEl = $('#closet-hangers-contact'); + var editContactLink = $('.edit-contact-link'); + var contactForm = contactEl.children('form'); + var cancelContactLink = $('#cancel-contact-link'); + var contactFormUsername = contactForm.children('input[type=text]'); + var editContactLinkUsername = $('#contact-link-has-value span'); + + function closeContactForm() { + contactEl.removeClass('editing'); + } + + editContactLink.click(function () { + contactEl.addClass('editing'); + contactFormUsername.focus(); + }); + + cancelContactLink.click(closeContactForm); + + contactForm.submit(function (e) { + var data = contactForm.serialize(); + contactForm.disableForms(); + $.ajax({ + url: contactForm.attr('action') + '.json', + type: 'post', + data: data, + dataType: 'json', + complete: function () { + contactForm.enableForms(); + }, + success: function () { + var newName = contactFormUsername.val(); + if(newName.length > 0) { + editContactLink.addClass('has-value'); + editContactLinkUsername.text(newName); + } else { + editContactLink.removeClass('has-value'); + } + closeContactForm(); + }, + error: function (xhr) { + handleSaveError(xhr, 'saving Neopets username'); + } + }); + e.preventDefault(); + }); + + /* + + Hanger list controls + + */ + + $('input[type=submit][data-confirm]').live('click', function (e) { + if(!confirm(this.getAttribute('data-confirm'))) e.preventDefault(); + }); + + /* + + Closet list droppable + + */ + + onHangersInit(function () { + $('.closet-hangers-group').each(function () { + var group = $(this); + group.find('div.closet-list').droppable({ + accept: '#' + group.attr('id') + ' div.object', + activate: function () { + $(this).find('.closet-list-content').animate({opacity: 0, height: 100}, 250); + }, + activeClass: 'droppable-active', + deactivate: function () { + $(this).find('.closet-list-content').css('height', 'auto').animate({opacity: 1}, 250); + }, + drop: function (e, ui) { + var form = ui.draggable.find('form.closet-hanger-update'); + form.find('input[name=closet_hanger\[list_id\]]').val(this.getAttribute('data-id')); + submitUpdateForm(form); + } + }); + }); + }); + + /* + + Visibility Descriptions + + */ + + function updateVisibilityDescription() { + var descriptions = $(this).closest('.visibility-form'). + find('ul.visibility-descriptions'); + + descriptions.children('li.current').removeClass('current'); + descriptions.children('li[data-id=' + $(this).val() + ']').addClass('current'); + } + + function visibilitySelects() { return $('form.visibility-form select') } + + visibilitySelects().live('change', updateVisibilityDescription); + + onHangersInit(function () { + visibilitySelects().each(updateVisibilityDescription); + }); + + /* + + Help + + */ + + $('#toggle-help').click(function () { + $('#closet-hangers-help').toggleClass('hidden'); + }); + + /* + + Share URL + + */ + + $('#closet-hangers-share-box').mouseover(function () { + $(this).focus(); + }).mouseout(function () { + $(this).blur(); + }); + + /* + + Initialize + + */ + + hangersInit(); +})(); + diff --git a/public/javascripts/items/show.js b/public/javascripts/items/show.js index c913e930..e02d8a48 100644 --- a/public/javascripts/items/show.js +++ b/public/javascripts/items/show.js @@ -260,3 +260,23 @@ window.MainWardrobe = {View: {Outfit: {setFlashIsReady: previewSWFIsReady}}} var SWFLog = $.noop; + +/* + + Trade hangers + +*/ + +$(document.body).addClass('js'); + +$('#trade-hangers p').wrapInner('
    ').each(function () { + var el = $(this); + if(el.height() < el.children().height()) { + el.addClass('overflows'); + } +}); + +$('#trade-hangers .toggle').click(function () { + $(this).closest('p').toggleClass('showing-more'); +}); + diff --git a/public/javascripts/jquery.ui.js b/public/javascripts/jquery.ui.js new file mode 100644 index 00000000..ee5f624e --- /dev/null +++ b/public/javascripts/jquery.ui.js @@ -0,0 +1,175 @@ +/*! + * jQuery UI 1.8.14 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.14", +keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus(); +b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this, +"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection", +function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth, +outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,"tabindex"),d=isNaN(b); +return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e= +0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= +false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +;/* + * jQuery UI Position 1.8.14 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Position + */ +(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, +left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= +k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= +m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= +d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= +a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), +g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); +;/* + * jQuery UI Draggable 1.8.14 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== +"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= +this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options;this.helper= +this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}); +this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true}, +_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b= +false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration, +10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle|| +!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&& +a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent= +this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"), +10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"), +10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top, +(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!= +"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"), +10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+ +this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&& +!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.leftg[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.topg[3])?h:!(h-this.offset.click.topg[2])?e:!(e-this.offset.click.left=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e=j&&f<=l||h>=j&&h<=l||fl)&&(e>= +i&&e<=k||g>=i&&g<=k||ek);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&& +a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"); +d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&& +b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source= +this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length").data("item.autocomplete",b).append(d("
    ").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, +"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); +(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", +-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); +this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b, +this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| +this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| +this.first()?":last":":first"))},hasScroll:function(){return this.element.height()', {'class': 'nc-icon', text: 'NC', title: 'NC'}).appendTo(li); } + if(item.owned || item.wanted) { + var iconsWrapper = $('
    ', {'class': 'closeted-icons'}).appendTo(li); + if(item.owned) { + $('', {alt: 'Own', title: 'You own this', src: '/images/owned.png'}).appendTo(iconsWrapper); + $('', {alt: 'Want', title: 'You want this', src: '/images/wanted.png'}).appendTo(iconsWrapper); + } + } li.append(img).append(controls).append(info_link).append(item.name).appendTo(ul); } setClosetItems(wardrobe.outfit.getClosetItems()); @@ -860,6 +867,7 @@ View.Search = function (wardrobe) { loading_el = $('#preview-search-form-loading'), no_results_el = $('#preview-search-form-no-results'), no_results_span = no_results_el.children('span'), + your_items_links = $('.preview-search-form-your-items'), PAGINATION = { INNER_WINDOW: 4, OUTER_WINDOW: 1, @@ -924,6 +932,12 @@ View.Search = function (wardrobe) { form.submit(); }); + your_items_links.click(function (e) { + e.preventDefault(); + input_el.val('user:' + this.getAttribute('data-search-value')); + form.submit(); + }); + wardrobe.search.bind('startRequest', function () { loading_el.delay(1000).show('slow'); }); diff --git a/public/javascripts/placeholder.js b/public/javascripts/placeholder.js new file mode 100644 index 00000000..f6ded977 --- /dev/null +++ b/public/javascripts/placeholder.js @@ -0,0 +1,3 @@ +/*! http://mths.be/placeholder v1.8.4 by @mathias */ +(function($){var e='placeholder' in document.createElement('input'),a='placeholder' in document.createElement('textarea');if(e&&a){$.fn.placeholder=function(){return this};$.fn.placeholder.input=$.fn.placeholder.textarea=true}else{$.fn.placeholder=function(){return this.filter((e?'textarea':':input')+'[placeholder]').bind('focus.placeholder',b).bind('blur.placeholder',d).trigger('blur.placeholder').end()};$.fn.placeholder.input=e;$.fn.placeholder.textarea=a;$(function(){$('form').bind('submit.placeholder',function(){var f=$('.placeholder',this).each(b);setTimeout(function(){f.each(d)},10)})});$(window).bind('unload.placeholder',function(){$('.placeholder').val('')})}function c(g){var f={},h=/^jQuery\d+$/;$.each(g.attributes,function(k,j){if(j.specified&&!h.test(j.name)){f[j.name]=j.value}});return f}function b(){var f=$(this);if(f.val()===f.attr('placeholder')&&f.hasClass('placeholder')){if(f.data('placeholder-password')){f.hide().next().attr('id',f.removeAttr('id').data('placeholder-id')).show().focus()}else{f.val('').removeClass('placeholder')}}}function d(){var j,i=$(this),f=i,h=this.id;if(i.val()===''){if(i.is(':password')){if(!i.data('placeholder-textinput')){try{j=i.clone().attr({type:'text'})}catch(g){j=$('').attr($.extend(c(this),{type:'text'}))}j.removeAttr('name').data('placeholder-password',true).data('placeholder-id',h).bind('focus.placeholder',b);i.data('placeholder-textinput',j).data('placeholder-id',h).before(j)}i=i.removeAttr('id').hide().prev().attr('id',h).show()}i.addClass('placeholder').val(i.attr('placeholder'))}else{i.removeClass('placeholder')}}}(jQuery)); + diff --git a/public/stylesheets/compiled/screen.css b/public/stylesheets/compiled/screen.css index c3504025..906a6599 100644 --- a/public/stylesheets/compiled/screen.css +++ b/public/stylesheets/compiled/screen.css @@ -97,7 +97,7 @@ input, button, select, label { } /* line 79, ../../../app/stylesheets/_layout.sass */ -input[type=text], body.pets-bulk #bulk-pets-form textarea, input[type=password], input[type=search], select { +input[type=text], body.pets-bulk #bulk-pets-form textarea, input[type=password], input[type=search], input[type=number], select, textarea { -moz-border-radius: 3px; -webkit-border-radius: 3px; background: white; @@ -106,11 +106,16 @@ input[type=text], body.pets-bulk #bulk-pets-form textarea, input[type=password], padding: 0.25em; } /* line 85, ../../../app/stylesheets/_layout.sass */ -input[type=text]:focus, body.pets-bulk #bulk-pets-form textarea:focus, input[type=text]:active, body.pets-bulk #bulk-pets-form textarea:active, input[type=password]:focus, input[type=password]:active, input[type=search]:focus, input[type=search]:active, select:focus, select:active { +input[type=text]:focus, body.pets-bulk #bulk-pets-form textarea:focus, input[type=text]:active, body.pets-bulk #bulk-pets-form textarea:active, input[type=password]:focus, input[type=password]:active, input[type=search]:focus, input[type=search]:active, input[type=number]:focus, input[type=number]:active, select:focus, select:active, textarea:focus, textarea:active { color: inherit; } /* line 88, ../../../app/stylesheets/_layout.sass */ +textarea { + font: inherit; +} + +/* line 91, ../../../app/stylesheets/_layout.sass */ a.button, input[type=submit], button { /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ -moz-border-radius: 5px; @@ -141,7 +146,7 @@ a.button:hover, input[type=submit]:hover, button:hover { a.button:active, input[type=submit]:active, button:active { top: 1px; } -/* line 90, ../../../app/stylesheets/_layout.sass */ +/* line 93, ../../../app/stylesheets/_layout.sass */ a.button.loud, input[type=submit].loud, button.loud { background: #ff5c00 url('/images/alert-overlay.png?1296599919') repeat-x; font-size: 125%; @@ -152,11 +157,6 @@ a.button.loud:hover, input[type=submit].loud:hover, button.loud:hover { background-color: #ee4b00; } -/* line 87, ../../../app/stylesheets/partials/clean/_mixins.sass */ -a.button:after { - content: " >>"; -} - /* line 96, ../../../app/stylesheets/_layout.sass */ ul.buttons { margin-bottom: 1em; @@ -264,6 +264,24 @@ ul.buttons li, ul.buttons li form { } /* line 158, ../../../app/stylesheets/_layout.sass */ +#userbar-items-link { + text-decoration: none; + background: #eeffee; + padding: 0.25em 0.5em; +} +/* line 4, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/compass/stylesheets/compass/utilities/links/_hover-link.scss */ +#userbar-items-link:hover { + text-decoration: underline; +} +/* line 163, ../../../app/stylesheets/_layout.sass */ +#userbar-items-link:after { + color: red; + content: "new!"; + font-size: 85%; + margin-left: 0.5em; +} + +/* line 169, ../../../app/stylesheets/_layout.sass */ .object { display: -moz-inline-box; -moz-box-orient: vertical; @@ -271,49 +289,83 @@ ul.buttons li, ul.buttons li form { vertical-align: middle; *display: inline; *vertical-align: auto; - padding: 0.5em; + margin: 8px 0; + padding: 0 8px; position: relative; text-align: center; vertical-align: top; width: 100px; } -/* line 165, ../../../app/stylesheets/_layout.sass */ +/* line 177, ../../../app/stylesheets/_layout.sass */ .object a { text-decoration: none; } -/* line 167, ../../../app/stylesheets/_layout.sass */ +/* line 179, ../../../app/stylesheets/_layout.sass */ .object a img { -moz-opacity: 0.75; -webkit-opacity: 0.75; -o-opacity: 0.75; -khtml-opacity: 0.75; } -/* line 169, ../../../app/stylesheets/_layout.sass */ -.object a:hover img { - -moz-opacity: 1; - -webkit-opacity: 1; - -o-opacity: 1; - -khtml-opacity: 1; -} -/* line 171, ../../../app/stylesheets/_layout.sass */ +/* line 181, ../../../app/stylesheets/_layout.sass */ .object img { display: block; height: 80px; margin: 0 auto; width: 80px; } +/* line 186, ../../../app/stylesheets/_layout.sass */ +.object:hover img, .object a:hover img { + -moz-opacity: 1; + -webkit-opacity: 1; + -o-opacity: 1; + -khtml-opacity: 1; +} +/* line 192, ../../../app/stylesheets/_layout.sass */ +.object .nc-icon, .object .closeted-icons { + -moz-opacity: 1; + -webkit-opacity: 1; + -o-opacity: 1; + -khtml-opacity: 1; + background: rgba(255, 255, 255, 0.75); + line-height: 1; + position: absolute; + top: 64px; +} +/* line 198, ../../../app/stylesheets/_layout.sass */ +.object .nc-icon:hover, .object .closeted-icons:hover { + -moz-opacity: 0.5; + -webkit-opacity: 0.5; + -o-opacity: 0.5; + -khtml-opacity: 0.5; + background: transparent; +} +/* line 202, ../../../app/stylesheets/_layout.sass */ +.object .nc-icon, .object .closeted-icons img { + display: inline; + height: 16px; + width: 16px; +} +/* line 207, ../../../app/stylesheets/_layout.sass */ +.object .nc-icon { + right: 18px; +} +/* line 211, ../../../app/stylesheets/_layout.sass */ +.object .closeted-icons { + left: 18px; +} -/* line 177, ../../../app/stylesheets/_layout.sass */ +/* line 214, ../../../app/stylesheets/_layout.sass */ dt { font-weight: bold; } -/* line 180, ../../../app/stylesheets/_layout.sass */ +/* line 217, ../../../app/stylesheets/_layout.sass */ dd { margin: 0 0 1.5em 1em; } -/* line 183, ../../../app/stylesheets/_layout.sass */ +/* line 220, ../../../app/stylesheets/_layout.sass */ #home-link { font-family: Delicious, Helvetica, Arial, Verdana, sans-serif; font-size: 175%; @@ -324,41 +376,25 @@ dd { position: absolute; top: 0; } -/* line 193, ../../../app/stylesheets/_layout.sass */ +/* line 230, ../../../app/stylesheets/_layout.sass */ #home-link:hover { background: #eeffee; text-decoration: none; } -/* line 196, ../../../app/stylesheets/_layout.sass */ +/* line 233, ../../../app/stylesheets/_layout.sass */ #home-link span:before { content: "<< "; } -/* line 200, ../../../app/stylesheets/_layout.sass */ +/* line 237, ../../../app/stylesheets/_layout.sass */ .pagination a, .pagination span { margin: 0 0.5em; } -/* line 202, ../../../app/stylesheets/_layout.sass */ +/* line 239, ../../../app/stylesheets/_layout.sass */ .pagination .current { font-weight: bold; } -/* line 205, ../../../app/stylesheets/_layout.sass */ -.object .nc-icon { - height: 16px; - position: absolute; - right: 16px; - top: 64px; - width: 16px; -} -/* line 211, ../../../app/stylesheets/_layout.sass */ -.object .nc-icon:hover { - -moz-opacity: 0.5; - -webkit-opacity: 0.5; - -o-opacity: 0.5; - -khtml-opacity: 0.5; -} - /* Fonts */ /* A font by Jos Buivenga (exljbris) -> www.exljbris.nl */ @font-face { @@ -538,6 +574,876 @@ div.jGrowl div.jGrowl-closer { } } +/* line 2, ../../../app/stylesheets/partials/_secondary_nav.sass */ +body.closet_hangers-index #title { + float: left; + margin-right: 0.5em; +} +/* line 6, ../../../app/stylesheets/partials/_secondary_nav.sass */ +body.closet_hangers-index .flash { + clear: both; +} +/* line 9, ../../../app/stylesheets/partials/_secondary_nav.sass */ +body.closet_hangers-index #secondary-nav { + display: block; + margin-top: 0.75em; +} +/* line 8, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #title { + margin-bottom: 0; +} +/* line 11, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #import-link { + /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background: #006400 url('/images/alert-overlay.png?1296599919') repeat-x; + border: 0; + display: inline-block; + padding: 0.5em 0.75em 0.45em; + color: white; + text-decoration: none; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + position: relative; + font-weight: bold; + line-height: 1; + background: #ff5c00 url('/images/alert-overlay.png?1296599919') repeat-x; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index #import-link:hover { + background-color: #005300; +} +/* line 53, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index #import-link:hover { + color: white; +} +/* line 55, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index #import-link:active { + top: 1px; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index #import-link:hover { + background-color: #ee4b00; +} +/* line 15, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-items-search { + float: right; +} +/* line 19, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-items-search input[name=q].loading { + background-image: url(/images/loading.gif); + background-position: 2px center; + background-repeat: no-repeat; + padding-left: 20px; +} +/* line 26, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-contact { + clear: both; + color: #448844; + margin-bottom: 1em; + margin-left: 2em; + min-height: 16px; +} +/* line 33, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-contact a, body.closet_hangers-index #closet-hangers-contact > span { + text-decoration: none; + background-image: url('/images/neomail.png?1311877030'); + background-position: left center; + background-repeat: no-repeat; + color: inherit; + float: left; + height: 100%; + padding-left: 20px; +} +/* line 4, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/compass/stylesheets/compass/utilities/links/_hover-link.scss */ +body.closet_hangers-index #closet-hangers-contact a:hover, body.closet_hangers-index #closet-hangers-contact > span:hover { + text-decoration: underline; +} +/* line 44, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-contact > span { + background-image: url('/images/neomail_edit.png?1312153508'); +} +/* line 47, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-contact input[type=text], body.closet_hangers-index #closet-hangers-contact body.pets-bulk #bulk-pets-form textarea, body.pets-bulk #bulk-pets-form body.closet_hangers-index #closet-hangers-contact textarea { + width: 10em; +} +/* line 50, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-contact label { + font-weight: bold; + margin-right: 0.5em; +} +/* line 54, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-contact label:after { + content: ":"; +} +/* line 57, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #edit-contact-link-to-replace-form, body.closet_hangers-index #cancel-contact-link { + display: none; +} +/* line 60, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .edit-contact-link, body.closet_hangers-index #cancel-contact-link { + cursor: pointer; + text-decoration: underline; +} +/* line 64, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .edit-contact-link:hover, body.closet_hangers-index #cancel-contact-link:hover { + text-decoration: none; +} +/* line 68, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #edit-contact-link-to-replace-form #contact-link-has-value { + display: none; +} +/* line 71, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #edit-contact-link-to-replace-form #contact-link-no-value { + display: inline; +} +/* line 75, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #edit-contact-link-to-replace-form.has-value #contact-link-has-value { + display: inline; +} +/* line 78, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #edit-contact-link-to-replace-form.has-value #contact-link-no-value { + display: none; +} +/* line 81, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #cancel-contact-link { + margin-left: 1em; +} +/* line 84, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #toggle-help { + /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background: #006400 url('/images/alert-overlay.png?1296599919') repeat-x; + border: 0; + display: inline-block; + padding: 0.5em 0.75em 0.45em; + color: white; + text-decoration: none; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + position: relative; + font-weight: bold; + line-height: 1; + cursor: pointer; + display: none; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index #toggle-help:hover { + background-color: #005300; +} +/* line 53, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index #toggle-help:hover { + color: white; +} +/* line 55, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index #toggle-help:active { + top: 1px; +} +/* line 89, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-help.hidden { + display: none; +} +/* line 92, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-extras { + margin-bottom: 2em; + margin-top: 2em; + text-align: center; +} +/* line 98, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-extras a { + /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background: #006400 url('/images/alert-overlay.png?1296599919') repeat-x; + border: 0; + display: inline-block; + padding: 0.5em 0.75em 0.45em; + color: white; + text-decoration: none; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + position: relative; + font-weight: bold; + line-height: 1; + margin: 0 0.5em; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index #closet-hangers-extras a:hover { + background-color: #005300; +} +/* line 53, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index #closet-hangers-extras a:hover { + color: white; +} +/* line 55, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index #closet-hangers-extras a:active { + top: 1px; +} +/* line 102, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-share { + font-size: 85%; + margin-bottom: 1em; +} +/* line 106, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-share label { + font-weight: bold; + margin-right: 0.5em; +} +/* line 110, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-share input { + width: 30em; +} +/* line 113, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers { + clear: both; + text-align: center; +} +/* line 118, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers .object .quantity { + -moz-opacity: 0.75; + -webkit-opacity: 0.75; + -o-opacity: 0.75; + -khtml-opacity: 0.75; + background: white; + padding: 6px 4px 4px; + position: absolute; + left: 18px; + line-height: 1; + text-align: left; + top: 0; +} +/* line 128, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers .object .quantity span, body.closet_hangers-index #closet-hangers .object .quantity input[type=number] { + font-size: 16px; + font-weight: bold; +} +/* line 132, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers .object form { + display: none; +} +/* line 136, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers .object[data-quantity="1"] .quantity { + display: none; +} +/* line 139, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-hangers-group { + border-top: 1px solid #006600; + margin-bottom: 2em; + padding-bottom: 1em; +} +/* line 144, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-hangers-group > header { + border-bottom: 1px solid #aaddaa; + display: block; + margin-bottom: 0.25em; + padding: 0.25em 0; + position: relative; +} +/* line 151, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-hangers-group > header h3 { + font-size: 250%; + margin: 0; +} +/* line 155, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-hangers-group > header .add-closet-list { + /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background: #006400 url('/images/alert-overlay.png?1296599919') repeat-x; + border: 0; + display: inline-block; + padding: 0.5em 0.75em 0.45em; + color: white; + text-decoration: none; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + position: relative; + font-weight: bold; + line-height: 1; + bottom: 50%; + margin-bottom: -1em; + position: absolute; + right: 1em; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-hangers-group > header .add-closet-list:hover { + background-color: #005300; +} +/* line 53, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-hangers-group > header .add-closet-list:hover { + color: white; +} +/* line 55, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-hangers-group > header .add-closet-list:active { + top: 1px; +} +/* line 162, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-hangers-group > header .add-closet-list:active { + margin-bottom: -1.1em; + top: auto; +} +/* line 166, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-hangers-group > header span.show, body.closet_hangers-index .closet-hangers-group > header span.hide { + color: #448844; + display: none; + font-size: 85%; + left: 1em; + position: absolute; + top: 1em; +} +/* line 174, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-hangers-group > header span.show:hover, body.closet_hangers-index .closet-hangers-group > header span.hide:hover { + color: inherit; + text-decoration: underline; +} +/* line 178, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list { + border-bottom: 1px solid #aaddaa; + padding: 0.5em 0; + position: relative; +} +/* line 183, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .visibility-form { + font-size: 85%; + left: 0.5em; + position: absolute; + text-align: left; + top: 0.25em; + z-index: 10; +} +/* line 191, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .visibility-form input, body.closet_hangers-index .closet-list .visibility-form select { + font-size: inherit; + margin-bottom: 0; + margin-top: 0; +} +/* line 197, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .visibility-form select { + border-color: white; +} +/* line 200, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .visibility-form input[type=submit] { + /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background: #006400 url('/images/alert-overlay.png?1296599919') repeat-x; + border: 0; + display: inline-block; + padding: 0.5em 0.75em 0.45em; + color: white; + text-decoration: none; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + position: relative; + font-weight: bold; + line-height: 1; + background: #aaaaaa url('/images/alert-overlay.png?1296599919') repeat-x; + -moz-opacity: 0.9; + -webkit-opacity: 0.9; + -o-opacity: 0.9; + -khtml-opacity: 0.9; + font-size: 80%; + font-size: inherit; + visibility: hidden; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-list .visibility-form input[type=submit]:hover { + background-color: #005300; +} +/* line 53, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-list .visibility-form input[type=submit]:hover { + color: white; +} +/* line 55, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-list .visibility-form input[type=submit]:active { + top: 1px; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-list .visibility-form input[type=submit]:hover { + background-color: #999999; +} +/* line 205, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .visibility-form input[type=submit]:active { + top: 1px; +} +/* line 208, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .visibility-form .visibility-descriptions { + -moz-opacity: 0.75; + -webkit-opacity: 0.75; + -o-opacity: 0.75; + -khtml-opacity: 0.75; + background: white; + font-style: italic; + list-style: none; + padding: 0 0.5em; +} +/* line 215, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .visibility-form .visibility-descriptions li { + display: none; +} +/* line 219, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .visibility-form:hover .visibility-descriptions li.current { + display: block; +} +/* line 222, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list header { + display: block; + position: relative; +} +/* line 226, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list h4 { + font-family: Delicious, Helvetica, Arial, Verdana, sans-serif; + font-size: 150%; + line-height: 1; + margin: 0 auto 0.67em; + width: 50%; +} +/* line 233, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .empty-list { + display: none; + font-style: italic; +} +/* line 237, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .closet-list-controls { + display: none; + position: absolute; + right: 1em; + top: 0; +} +/* line 243, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .closet-list-controls a, body.closet_hangers-index .closet-list .closet-list-controls input[type=submit] { + /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background: #006400 url('/images/alert-overlay.png?1296599919') repeat-x; + border: 0; + display: inline-block; + padding: 0.5em 0.75em 0.45em; + color: white; + text-decoration: none; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + position: relative; + font-weight: bold; + line-height: 1; + background: #aaaaaa url('/images/alert-overlay.png?1296599919') repeat-x; + -moz-opacity: 0.9; + -webkit-opacity: 0.9; + -o-opacity: 0.9; + -khtml-opacity: 0.9; + font-size: 80%; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-list .closet-list-controls a:hover, body.closet_hangers-index .closet-list .closet-list-controls input[type=submit]:hover { + background-color: #005300; +} +/* line 53, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-list .closet-list-controls a:hover, body.closet_hangers-index .closet-list .closet-list-controls input[type=submit]:hover { + color: white; +} +/* line 55, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-list .closet-list-controls a:active, body.closet_hangers-index .closet-list .closet-list-controls input[type=submit]:active { + top: 1px; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index .closet-list .closet-list-controls a:hover, body.closet_hangers-index .closet-list .closet-list-controls input[type=submit]:hover { + background-color: #999999; +} +/* line 246, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list .closet-list-controls form { + display: inline; +} +/* line 250, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list[data-hangers-count="0"] .empty-list { + display: block; +} +/* line 254, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list.unlisted h4 { + font-size: 125%; + font-style: italic; +} +/* line 260, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list:hover .closet-list-controls { + display: block; +} +/* line 264, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list:hover .visibility-form input[type=submit] { + visibility: visible; +} +/* line 267, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list:hover .visibility-form select { + border-color: #aaddaa; +} +/* line 270, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list:last-child { + border-bottom: 0; +} +/* line 273, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list.droppable-active { + -moz-border-radius: 1em; + -webkit-border-radius: 1em; + background: #eeffee; + border: 1px solid #006600; + padding: 1em; + border-bottom-width: 1px; + border-style: dotted; + margin: 1em 0; +} +/* line 280, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list.droppable-active .object { + -moz-opacity: 0.25; + -webkit-opacity: 0.25; + -o-opacity: 0.25; + -khtml-opacity: 0.25; +} +/* line 284, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list.droppable-active .object.ui-draggable-dragging { + -moz-opacity: 1; + -webkit-opacity: 1; + -o-opacity: 1; + -khtml-opacity: 1; +} +/* line 287, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list.droppable-active .closet-list-controls { + display: none; +} +/* line 290, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list.droppable-active .closet-list-hangers { + overflow: hidden; +} +/* line 293, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list.droppable-active .visibility-form { + display: none; +} +/* line 297, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-hangers-group-autocomplete-item span, body.closet_hangers-index .closet-list-autocomplete-item span { + font-style: italic; + padding: 0.2em 0.4em; +} +/* line 302, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index .closet-list-autocomplete-item a, body.closet_hangers-index .closet-list-autocomplete-item span { + font-size: 85%; + padding-left: 2em; +} +/* line 309, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover form { + display: inline; +} +/* line 312, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy { + position: absolute; + right: 18px; + top: 52px; +} +/* line 317, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy input { + /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background: #006400 url('/images/alert-overlay.png?1296599919') repeat-x; + border: 0; + display: inline-block; + padding: 0.5em 0.75em 0.45em; + color: white; + text-decoration: none; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + position: relative; + font-weight: bold; + line-height: 1; + background: #aaaaaa url('/images/alert-overlay.png?1296599919') repeat-x; + -moz-opacity: 0.9; + -webkit-opacity: 0.9; + -o-opacity: 0.9; + -khtml-opacity: 0.9; + font-size: 80%; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy input:hover { + background-color: #005300; +} +/* line 53, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy input:hover { + color: white; +} +/* line 55, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy input:active { + top: 1px; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy input:hover { + background-color: #999999; +} +/* line 320, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity { + -moz-opacity: 1; + -webkit-opacity: 1; + -o-opacity: 1; + -khtml-opacity: 1; + background: transparent; + top: 0; + padding: 0; +} +/* line 326, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity span { + display: none; +} +/* line 329, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity input[type=number] { + padding: 2px; + width: 2em; +} +/* line 333, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity input[type=submit] { + font-size: 85%; +} +/* line 338, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #closet-hangers .object:hover .quantity { + display: block; +} +/* line 341, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #closet-hangers .object:hover .quantity input[type=number] { + width: 2.5em; +} +/* line 344, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #closet-hangers .object:hover .quantity input[type=submit] { + display: none; +} +/* line 347, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #closet-hangers .object.loading { + background: #eeffee; + outline: 1px solid #006600; +} +/* line 351, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #closet-hangers .object.loading .quantity { + display: block; +} +/* line 354, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #closet-hangers .object.loading .quantity span:after { + content: "…"; +} +/* line 358, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #closet-hangers-contact form { + display: none; +} +/* line 361, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #closet-hangers-contact .edit-contact-link, body.closet_hangers-index.current-user.js #closet-hangers-contact #cancel-contact-link { + display: inline; +} +/* line 365, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #closet-hangers-contact.editing form { + display: block; +} +/* line 368, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #closet-hangers-contact.editing .edit-contact-link { + display: none; +} +/* line 373, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js .closet-hangers-group header .show, body.closet_hangers-index.current-user.js .closet-hangers-group header .hide { + cursor: pointer; +} +/* line 376, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js .closet-hangers-group header .hide { + display: block; +} +/* line 380, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js .closet-hangers-group.hidden header .hide, body.closet_hangers-index.current-user.js .closet-hangers-group.hidden .closet-hangers-group-content { + display: none; +} +/* line 383, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js .closet-hangers-group.hidden header .show { + display: block; +} +/* line 386, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index.current-user.js #toggle-help { + display: inline; +} + +/* line 2, ../../../app/stylesheets/partials/_secondary_nav.sass */ +body.closet_hangers-petpage #title { + float: left; + margin-right: 0.5em; +} +/* line 6, ../../../app/stylesheets/partials/_secondary_nav.sass */ +body.closet_hangers-petpage .flash { + clear: both; +} +/* line 9, ../../../app/stylesheets/partials/_secondary_nav.sass */ +body.closet_hangers-petpage #secondary-nav { + display: block; + margin-top: 0.75em; +} +/* line 4, ../../../app/stylesheets/closet_hangers/_petpage.sass */ +body.closet_hangers-petpage #intro { + clear: both; +} +/* line 7, ../../../app/stylesheets/closet_hangers/_petpage.sass */ +body.closet_hangers-petpage #petpage-output { + display: block; + height: 30em; + margin: 0 auto; + width: 50%; +} + +/* line 2, ../../../app/stylesheets/partials/_secondary_nav.sass */ +body.closet_lists-new #title, body.closet_lists-create #title, body.closet_lists-edit #title, body.closet_lists-update #title { + float: left; + margin-right: 0.5em; +} +/* line 6, ../../../app/stylesheets/partials/_secondary_nav.sass */ +body.closet_lists-new .flash, body.closet_lists-create .flash, body.closet_lists-edit .flash, body.closet_lists-update .flash { + clear: both; +} +/* line 9, ../../../app/stylesheets/partials/_secondary_nav.sass */ +body.closet_lists-new #secondary-nav, body.closet_lists-create #secondary-nav, body.closet_lists-edit #secondary-nav, body.closet_lists-update #secondary-nav { + display: block; + margin-top: 0.75em; +} +/* line 4, ../../../app/stylesheets/closet_lists/_form.sass */ +body.closet_lists-new form ul.fields, body.closet_lists-create form ul.fields, body.closet_lists-edit form ul.fields, body.closet_lists-update form ul.fields { + clear: both; + list-style: none; +} +/* line 8, ../../../app/stylesheets/closet_lists/_form.sass */ +body.closet_lists-new form ul.fields label, body.closet_lists-create form ul.fields label, body.closet_lists-edit form ul.fields label, body.closet_lists-update form ul.fields label { + float: left; + font-weight: bold; + margin-right: 1em; +} +/* line 13, ../../../app/stylesheets/closet_lists/_form.sass */ +body.closet_lists-new form ul.fields li, body.closet_lists-create form ul.fields li, body.closet_lists-edit form ul.fields li, body.closet_lists-update form ul.fields li { + padding: 0.75em 0; + width: 35em; +} +/* line 17, ../../../app/stylesheets/closet_lists/_form.sass */ +body.closet_lists-new form ul.fields input, body.closet_lists-new form ul.fields textarea, body.closet_lists-new form ul.fields select, body.closet_lists-create form ul.fields input, body.closet_lists-create form ul.fields textarea, body.closet_lists-create form ul.fields select, body.closet_lists-edit form ul.fields input, body.closet_lists-edit form ul.fields textarea, body.closet_lists-edit form ul.fields select, body.closet_lists-update form ul.fields input, body.closet_lists-update form ul.fields textarea, body.closet_lists-update form ul.fields select { + clear: both; + display: block; + margin-top: 0.25em; + width: 80%; +} +/* line 23, ../../../app/stylesheets/closet_lists/_form.sass */ +body.closet_lists-new form ul.fields textarea, body.closet_lists-create form ul.fields textarea, body.closet_lists-edit form ul.fields textarea, body.closet_lists-update form ul.fields textarea { + height: 12em; +} +/* line 26, ../../../app/stylesheets/closet_lists/_form.sass */ +body.closet_lists-new form ul.fields .hint, body.closet_lists-create form ul.fields .hint, body.closet_lists-edit form ul.fields .hint, body.closet_lists-update form ul.fields .hint { + display: block; + font-size: 85%; +} + +/* line 3, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new #title, body.closet_pages-create #title { + float: left; +} +/* line 6, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new .flash, body.closet_pages-create .flash { + clear: both; +} +/* line 9, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new #back-to-items, body.closet_pages-create #back-to-items { + /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background: #006400 url('/images/alert-overlay.png?1296599919') repeat-x; + border: 0; + display: inline-block; + padding: 0.5em 0.75em 0.45em; + color: white; + text-decoration: none; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + position: relative; + font-weight: bold; + line-height: 1; + margin-left: 1em; + margin-top: 0.75em; +} +/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_pages-new #back-to-items:hover, body.closet_pages-create #back-to-items:hover { + background-color: #005300; +} +/* line 53, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_pages-new #back-to-items:hover, body.closet_pages-create #back-to-items:hover { + color: white; +} +/* line 55, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_pages-new #back-to-items:active, body.closet_pages-create #back-to-items:active { + top: 1px; +} +/* line 15, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new #closet-page-form, body.closet_pages-create #closet-page-form { + overflow: hidden; + display: inline-block; + clear: both; + margin-bottom: 1em; +} +/* line 8, ../../../app/stylesheets/partials/clean/_mixins.sass */ +body.closet_pages-new #closet-page-form, body.closet_pages-create #closet-page-form { + display: block; +} +/* line 20, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new #closet-page-frame-wrapper, body.closet_pages-create #closet-page-frame-wrapper { + float: left; + margin-right: 2%; + width: 48%; +} +/* line 25, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new #closet-page-frame, body.closet_pages-create #closet-page-frame { + height: 19em; + width: 100%; +} +/* line 29, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new #closet-page-source, body.closet_pages-create #closet-page-source { + float: left; + width: 50%; +} +/* line 33, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new #closet-page-source label, body.closet_pages-create #closet-page-source label { + font-weight: bold; +} +/* line 36, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new #closet-page-source textarea, body.closet_pages-create #closet-page-source textarea { + height: 19em; +} +/* line 40, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new ol, body.closet_pages-create ol { + padding-left: 1em; +} +/* line 43, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new ol > li, body.closet_pages-create ol > li { + margin-bottom: 1em; +} +/* line 46, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new ol ul, body.closet_pages-create ol ul { + font-size: 85%; + margin-bottom: 1em; + margin-top: 0; + padding-left: 1em; +} +/* line 53, ../../../app/stylesheets/closet_pages/_new.sass */ +body.closet_pages-new ol p, body.closet_pages-create ol p { + margin: 0; +} + /* line 1, ../../../app/stylesheets/contributions/_index.sass */ body.contributions-index { text-align: center; @@ -721,14 +1627,14 @@ body.items-index #species-search-links img { } /* line 2, ../../../app/stylesheets/items/_show.sass */ -body.items-show header { +body.items-show #item-header { border-bottom: 1px solid #006600; display: block; margin-bottom: 1em; padding: 1em 0; } /* line 7, ../../../app/stylesheets/items/_show.sass */ -body.items-show header div, body.items-show header img { +body.items-show #item-header div, body.items-show #item-header img { display: -moz-inline-box; -moz-box-orient: vertical; display: inline-block; @@ -737,11 +1643,11 @@ body.items-show header div, body.items-show header img { *vertical-align: auto; } /* line 9, ../../../app/stylesheets/items/_show.sass */ -body.items-show header div { +body.items-show #item-header div { text-align: left; } /* line 11, ../../../app/stylesheets/items/_show.sass */ -body.items-show header a { +body.items-show #item-header a { font-size: 75%; margin-left: 1em; } @@ -811,16 +1717,65 @@ body.items-show #item-preview-swf { body.items-show #item-zones { font-family: "Droid Serif", Georgia, "Times New Roman", Times, serif; font-size: 85%; -} -/* line 53, ../../../app/stylesheets/items/_show.sass */ -body.items-show #item-zones p:first-child { - margin-bottom: 0.25em; + margin-bottom: 1em; } /* line 55, ../../../app/stylesheets/items/_show.sass */ +body.items-show #item-zones p { + display: inline; +} +/* line 58, ../../../app/stylesheets/items/_show.sass */ +body.items-show #item-zones p:first-child { + margin-right: 1em; +} +/* line 60, ../../../app/stylesheets/items/_show.sass */ +body.items-show #trade-hangers { + font-size: 85%; + text-align: left; +} +/* line 64, ../../../app/stylesheets/items/_show.sass */ +body.items-show #trade-hangers p { + position: relative; +} +/* line 67, ../../../app/stylesheets/items/_show.sass */ +body.items-show #trade-hangers p:first-child { + margin-bottom: 0.5em; +} +/* line 71, ../../../app/stylesheets/items/_show.sass */ +body.items-show #trade-hangers p.overflows .toggle { + display: block; +} +/* line 76, ../../../app/stylesheets/items/_show.sass */ +body.items-show #trade-hangers p.showing-more .toggle .less { + display: block; +} +/* line 79, ../../../app/stylesheets/items/_show.sass */ +body.items-show #trade-hangers p.showing-more .toggle .more { + display: none; +} +/* line 82, ../../../app/stylesheets/items/_show.sass */ +body.items-show #trade-hangers .toggle { + background: white; + bottom: 0; + cursor: pointer; + display: none; + font-family: "Droid Sans", Helvetica, Arial, Verdana, sans-serif; + padding: 0 1em; + position: absolute; + right: 0; +} +/* line 92, ../../../app/stylesheets/items/_show.sass */ +body.items-show #trade-hangers .toggle:hover { + text-decoration: underline; +} +/* line 95, ../../../app/stylesheets/items/_show.sass */ +body.items-show #trade-hangers .toggle .less { + display: none; +} +/* line 98, ../../../app/stylesheets/items/_show.sass */ body.items-show #item-preview-header { margin-top: 3em; } -/* line 57, ../../../app/stylesheets/items/_show.sass */ +/* line 100, ../../../app/stylesheets/items/_show.sass */ body.items-show #item-preview-header h3, body.items-show #item-preview-header a { display: -moz-inline-box; -moz-box-orient: vertical; @@ -829,24 +1784,63 @@ body.items-show #item-preview-header h3, body.items-show #item-preview-header a *display: inline; *vertical-align: auto; } -/* line 59, ../../../app/stylesheets/items/_show.sass */ +/* line 102, ../../../app/stylesheets/items/_show.sass */ body.items-show #item-preview-header a { font-size: 85%; margin: -1.5em 0 0 1em; } -/* line 62, ../../../app/stylesheets/items/_show.sass */ +/* line 105, ../../../app/stylesheets/items/_show.sass */ body.items-show .nc-icon { height: 16px; width: 16px; } +/* line 109, ../../../app/stylesheets/items/_show.sass */ +body.items-show #closet-hangers { + border: 1px solid #006600; + float: right; + font-size: 85%; + margin-left: 1em; + padding: 1em; + width: 21em; +} +/* line 117, ../../../app/stylesheets/items/_show.sass */ +body.items-show #closet-hangers label, body.items-show #closet-hangers header { + display: block; + font-weight: bold; +} +/* line 121, ../../../app/stylesheets/items/_show.sass */ +body.items-show #closet-hangers header { + font-size: 125%; +} +/* line 124, ../../../app/stylesheets/items/_show.sass */ +body.items-show #closet-hangers form { + padding: 0.5em 0; +} +/* line 127, ../../../app/stylesheets/items/_show.sass */ +body.items-show #closet-hangers select { + width: 9em; +} +/* line 130, ../../../app/stylesheets/items/_show.sass */ +body.items-show #closet-hangers input[type=number] { + width: 4em; +} +/* line 135, ../../../app/stylesheets/items/_show.sass */ +body.items-show.js #trade-hangers p { + max-height: 3em; + overflow: hidden; +} +/* line 139, ../../../app/stylesheets/items/_show.sass */ +body.items-show.js #trade-hangers p.showing-more { + max-height: none; +} @import url(../shared/jquery.jgrowl.css); -/* line 112, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 113, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-toolbar { margin-bottom: 0.5em; text-align: left; } -/* line 115, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 116, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-toolbar form { display: -moz-inline-box; -moz-box-orient: vertical; @@ -856,23 +1850,23 @@ body.outfits-edit #preview-toolbar form { *vertical-align: auto; margin-right: 2em; } -/* line 118, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 119, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-info form { display: inline; } -/* line 121, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 122, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form ul { list-style: none; } -/* line 123, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 124, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form ul, body.outfits-edit #pet-state-form ul li { display: inline; } -/* line 125, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 126, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form input { display: none; } -/* line 127, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 128, ../../../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; @@ -904,7 +1898,7 @@ body.outfits-edit #pet-state-form label:hover { body.outfits-edit #pet-state-form label:active { top: 1px; } -/* line 130, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 131, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form li.selected button { background: #0b61a4 url('/images/alert-overlay.png?1296599919') repeat-x; } @@ -912,30 +1906,30 @@ body.outfits-edit #pet-state-form li.selected button { body.outfits-edit #pet-state-form li.selected button:hover { background-color: #005093; } -/* line 132, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 133, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #pet-state-form.hidden { visibility: hidden; } -/* line 134, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 135, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit-wrapper { float: right; } -/* line 136, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 137, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit-wrapper button { display: none; } -/* line 138, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 139, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit-wrapper #share-outfit { display: inline-block; } -/* line 140, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 141, ../../../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 146, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 147, ../../../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; } @@ -943,28 +1937,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 148, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 149, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #current-outfit-permalink, body.outfits-edit #shared-outfit-permalink { display: none; margin-right: 0.25em; } -/* line 151, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 152, ../../../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 153, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 154, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #shared-outfit-url { display: none; width: 15em; } -/* line 156, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 157, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview { clear: both; } -/* line 158, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 159, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-swf { float: left; height: 400px; @@ -972,15 +1966,15 @@ body.outfits-edit #preview-swf { position: relative; width: 400px; } -/* line 165, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 166, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-swf.swf-adapter #preview-image-container { display: none; } -/* line 168, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 169, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-swf.image-adapter #preview-swf-container { display: none; } -/* line 170, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 171, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-image-container { position: relative; } @@ -990,12 +1984,12 @@ body.outfits-edit #preview-image-container img { position: absolute; top: 0; } -/* line 173, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 174, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-image-container, body.outfits-edit #preview-image-container img { height: 100%; width: 100%; } -/* line 176, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 177, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-swf-overlay { -moz-opacity: 0; -webkit-opacity: 0; @@ -1008,7 +2002,7 @@ body.outfits-edit #preview-swf-overlay { top: 0; width: 100%; } -/* line 184, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 185, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-images-pending { background: black; background: rgba(0, 0, 0, 0.75); @@ -1020,11 +2014,11 @@ body.outfits-edit #preview-images-pending { right: 0; z-index: 1000; } -/* line 194, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 195, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-images-pending.waiting-on-0 { display: none; } -/* line 196, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 197, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-mode { margin-right: 1em; position: absolute; @@ -1033,21 +2027,21 @@ body.outfits-edit #preview-mode { top: 0; width: 7em; } -/* line 204, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 205, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-mode.flash-active #preview-mode-flash { color: #004400; font-weight: bold; } -/* line 207, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 208, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-mode.image-active #preview-mode-image { color: #004400; font-weight: bold; } -/* line 210, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 211, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-mode.image-active.can-download #preview-download-image { display: inline-block; } -/* line 212, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 213, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-mode-toggle { -moz-border-radius: 0.5em; -webkit-border-radius: 0.5em; @@ -1059,37 +2053,38 @@ body.outfits-edit #preview-mode-toggle { text-align: center; width: 5em; } -/* line 221, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 222, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-mode-toggle li { border-top: 1px solid #aaddaa; cursor: pointer; padding: 0.125em 0; width: 100%; } -/* line 226, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 227, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-mode-toggle li:first-child { border-top: 0; } -/* line 228, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 229, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-download-image { display: none; font-size: 85%; margin: 0 auto; } -/* line 232, ../../../app/stylesheets/outfits/_edit.sass */ -body.outfits-edit #preview-mode-image-access-denied { +/* line 233, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-mode-note { display: block; font-size: 75%; + margin-top: 0.5em; text-align: center; text-decoration: none; width: 100%; } -/* line 238, ../../../app/stylesheets/outfits/_edit.sass */ -body.outfits-edit #preview-mode-image-access-denied em { +/* line 240, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-mode-note em { font-style: normal; text-decoration: underline; } -/* line 241, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 243, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar { -moz-border-radius: 10px; -webkit-border-radius: 10px; @@ -1101,73 +2096,73 @@ body.outfits-edit #preview-sidebar { overflow: auto; width: 378px; } -/* line 251, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 253, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar.viewing-outfits #preview-closet { display: none; } -/* line 253, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 255, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar.viewing-outfits #preview-outfits { display: block; } -/* line 255, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 257, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar.viewing-saving-outfit { height: auto; max-height: 100%; } -/* line 258, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 260, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar.viewing-saving-outfit #preview-closet { display: none; } -/* line 260, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 262, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar.viewing-saving-outfit #preview-saving-outfit { display: block; } -/* line 263, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 265, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar .sidebar-view h2 { margin-bottom: 0.25em; margin-left: 24px; } -/* line 268, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 270, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet h2 { margin-bottom: 0; } -/* line 270, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 272, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet ul { text-align: center; } -/* line 272, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 274, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet .object { background: #eeffee; } -/* line 274, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 276, ../../../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 276, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 278, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet .object.worn { background: transparent; } -/* line 278, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 280, ../../../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 280, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 282, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet .object.no-assets { background: #fbe3e4; color: #8a1f11; padding-bottom: 1.25em; } -/* line 284, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 286, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-closet .object.no-assets .no-assets-message { display: block; } -/* line 286, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 288, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .no-assets-message { background: #f3dbdc; bottom: 0; @@ -1179,7 +2174,7 @@ body.outfits-edit .no-assets-message { position: absolute; width: 100%; } -/* line 296, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 298, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #no-assets-full-message { -moz-border-radius: 5px; -webkit-border-radius: 5px; @@ -1193,12 +2188,12 @@ body.outfits-edit #no-assets-full-message { top: -9999px; width: 30em; } -/* line 307, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 309, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form { clear: both; text-align: left; } -/* line 310, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 312, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form h2 { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1208,7 +2203,7 @@ body.outfits-edit #preview-search-form h2 { *vertical-align: auto; margin: 0 1em 0 0; } -/* line 313, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 315, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form input { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1217,7 +2212,17 @@ body.outfits-edit #preview-search-form input { *display: inline; *vertical-align: auto; } -/* line 315, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 317, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit #preview-search-form input[type=submit] { + margin-right: 2em; +} +/* line 319, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit .preview-search-form-your-items { + display: none; + font-size: 85%; + margin-right: 1em; +} +/* line 323, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-pagination { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1225,55 +2230,54 @@ body.outfits-edit #preview-search-form-pagination { vertical-align: middle; *display: inline; *vertical-align: auto; - margin-left: 2em; } -/* line 318, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 325, ../../../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 320, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 327, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-pagination .current { font-weight: bold; } -/* line 322, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 329, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-clear { display: none; font-size: 87.5%; margin-left: 2em; } -/* line 326, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 333, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-loading { display: none; font-size: 75%; font-style: italic; margin-left: 2em; } -/* line 332, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 339, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-no-results { display: none; } -/* line 334, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 341, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-search-form-help { font-size: 87.5%; margin-left: 2em; } -/* line 337, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 344, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .search-helper { font-family: inherit; } -/* line 339, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 346, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .possible-error { display: none; } -/* line 342, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 349, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #fullscreen-copyright { display: none; } -/* line 344, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 351, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen { height: 100%; } -/* line 347, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 354, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #container { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -1286,19 +2290,19 @@ body.outfits-edit.fullscreen #container { position: relative; width: 80%; } -/* line 355, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 362, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen h1 { display: none; } -/* line 357, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 364, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #short-url-response { position: static; } -/* line 359, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 366, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview { width: 100%; } -/* line 361, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 368, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-sidebar { float: right; height: 100%; @@ -1306,12 +2310,12 @@ body.outfits-edit.fullscreen #preview-sidebar { position: relative; width: 400px; } -/* line 367, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 374, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-sidebar.viewing-saving-outfit { height: auto; max-height: 100%; } -/* line 370, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 377, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-search-form { bottom: 1.5em; left: 0; @@ -1320,7 +2324,7 @@ body.outfits-edit.fullscreen #preview-search-form { position: absolute; width: 100%; } -/* line 378, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 385, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #preview-search-form-help div { display: -moz-inline-box; -moz-box-orient: vertical; @@ -1330,27 +2334,27 @@ body.outfits-edit.fullscreen #preview-search-form-help div { *vertical-align: auto; width: 48%; } -/* line 381, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 388, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #footer { bottom: 0; left: 0; position: absolute; width: 100%; } -/* line 386, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 393, ../../../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 388, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 395, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.fullscreen #footer ul { margin-right: 2em; } -/* line 391, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 398, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object { padding: 6px; position: relative; } -/* line 394, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 401, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object ul { display: none; left: 0; @@ -1358,11 +2362,11 @@ body.outfits-edit .object ul { position: absolute; top: 0; } -/* line 400, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 407, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object ul li { margin-bottom: 0.25em; } -/* line 402, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 409, ../../../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; @@ -1403,13 +2407,13 @@ body.outfits-edit .object ul li a:active { body.outfits-edit .object ul li a:hover { background-color: #999999; } -/* line 408, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 412, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object:hover ul, body.outfits-edit .object:hover .object-info { display: block; } -/* line 415, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 419, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .nc-icon { - background: url('/images/nc.png?1310662236') no-repeat; + background: url('/images/nc.png?1311877029') no-repeat; height: 16px; position: absolute; right: 16px; @@ -1417,14 +2421,14 @@ body.outfits-edit .nc-icon { top: 64px; width: 16px; } -/* line 423, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 427, ../../../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 426, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 430, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object-info { -moz-border-radius: 12px; -webkit-border-radius: 12px; @@ -1441,26 +2445,26 @@ body.outfits-edit .object-info { top: 0; width: 16px; } -/* line 437, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 441, ../../../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 443, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 447, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .object-info:hover { -moz-opacity: 1; -webkit-opacity: 1; -o-opacity: 1; -khtml-opacity: 1; } -/* line 446, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 450, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits { display: none; text-align: left; } -/* line 449, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 453, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul { margin-left: 24px; margin-right: 24px; @@ -1471,7 +2475,7 @@ body.outfits-edit #preview-outfits > ul { margin-bottom: 1em; min-height: 16px; } -/* line 458, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 462, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li { padding: 0.25em 0; } @@ -1506,7 +2510,7 @@ body.outfits-edit #preview-outfits > ul > li .outfit-star { margin-left: -24px; margin-right: 0; } -/* line 37, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 38, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li img { height: 100px; left: -25px; @@ -1514,7 +2518,7 @@ body.outfits-edit #preview-outfits > ul > li img { top: -25px; width: 100px; } -/* line 43, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 44, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete { -moz-border-radius: 0; -webkit-border-radius: 0; @@ -1548,7 +2552,7 @@ body.outfits-edit #preview-outfits > ul > li .outfit-delete:hover { body.outfits-edit #preview-outfits > ul > li .outfit-delete:active { top: auto; } -/* line 51, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 52, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1556,29 +2560,29 @@ body.outfits-edit #preview-outfits > ul > li .outfit-delete:hover { -khtml-opacity: 1; background: #eeffee; } -/* line 54, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 55, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li header { display: block; padding-left: 24px; } -/* line 57, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 58, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li h4 { cursor: pointer; display: inline; } -/* line 60, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 61, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li h4:hover { text-decoration: underline; } -/* line 62, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 63, ../../../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 64, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 65, ../../../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 66, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 67, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-rename-button { -moz-opacity: 0.75; -webkit-opacity: 0.75; @@ -1587,7 +2591,7 @@ body.outfits-edit #preview-outfits > ul > li .outfit-rename-button { font-size: 75%; margin-left: 1em; } -/* line 70, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 71, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-url { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -1597,7 +2601,7 @@ body.outfits-edit #preview-outfits > ul > li .outfit-url { border-width: 0; width: 284px; } -/* line 75, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 76, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-url:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1605,63 +2609,63 @@ body.outfits-edit #preview-outfits > ul > li .outfit-url:hover { -khtml-opacity: 1; border-width: 1px; } -/* line 78, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 79, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete-confirmation { display: none; font-size: 75%; } -/* line 81, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 82, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete-confirmation span { color: red; } -/* line 83, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 84, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li .outfit-delete-confirmation a { margin: 0 0.25em; } -/* line 85, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 86, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.active { background: #eeffee; } -/* line 88, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 89, ../../../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 91, ../../../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 93, ../../../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 96, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.renaming h4 { display: none; } -/* line 97, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 98, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.renaming .outfit-rename-form { display: inline; } -/* line 100, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 101, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li.renaming:hover .outfit-rename-button { display: none; } -/* line 103, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 104, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul > li:hover .outfit-rename-button { display: inline; } -/* line 460, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 464, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-outfits > ul.loaded { background: transparent; } -/* line 463, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 467, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .preview-sidebar-nav { float: right; font-size: 85%; margin-right: 24px; margin-top: 1em; } -/* line 470, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 474, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-success, body.outfits-edit #save-error, body.outfits-edit #outfit-not-found, body.outfits-edit #preview-sidebar-donation-request { margin-left: 24px; margin-right: 24px; @@ -1669,7 +2673,7 @@ body.outfits-edit #save-success, body.outfits-edit #save-error, body.outfits-edi margin-top: 1em; text-align: center; } -/* line 477, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 481, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar-donation-request { background: #e6efc2; border: 1px solid #c6d880; @@ -1677,23 +2681,23 @@ body.outfits-edit #preview-sidebar-donation-request { font-size: 85%; padding: 1em; } -/* line 482, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 486, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar-donation-request-no-thanks { margin-left: 1em; } -/* line 485, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 489, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-success { background: #e6efc2; border: 1px solid #c6d880; color: #264409; } -/* line 488, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 492, ../../../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 491, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 495, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #userbar-message { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -1701,7 +2705,7 @@ body.outfits-edit #userbar-message { -khtml-opacity: 0.5; display: none; } -/* line 495, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 499, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit { padding: 0.25em 0; margin-left: 24px; @@ -1739,7 +2743,7 @@ body.outfits-edit #new-outfit .outfit-star { margin-left: -24px; margin-right: 0; } -/* line 37, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 38, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit img { height: 100px; left: -25px; @@ -1747,7 +2751,7 @@ body.outfits-edit #new-outfit img { top: -25px; width: 100px; } -/* line 43, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 44, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete { -moz-border-radius: 0; -webkit-border-radius: 0; @@ -1781,7 +2785,7 @@ body.outfits-edit #new-outfit .outfit-delete:hover { body.outfits-edit #new-outfit .outfit-delete:active { top: auto; } -/* line 51, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 52, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1789,29 +2793,29 @@ body.outfits-edit #new-outfit .outfit-delete:hover { -khtml-opacity: 1; background: #eeffee; } -/* line 54, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 55, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit header { display: block; padding-left: 24px; } -/* line 57, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 58, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4 { cursor: pointer; display: inline; } -/* line 60, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 61, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4:hover { text-decoration: underline; } -/* line 62, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 63, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4, body.outfits-edit #new-outfit .outfit-rename-field { font-size: 115%; } -/* line 64, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 65, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-rename-button, body.outfits-edit #new-outfit .outfit-rename-form { display: none; } -/* line 66, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 67, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-rename-button { -moz-opacity: 0.75; -webkit-opacity: 0.75; @@ -1820,7 +2824,7 @@ body.outfits-edit #new-outfit .outfit-rename-button { font-size: 75%; margin-left: 1em; } -/* line 70, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 71, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-url { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -1830,7 +2834,7 @@ body.outfits-edit #new-outfit .outfit-url { border-width: 0; width: 284px; } -/* line 75, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 76, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-url:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -1838,78 +2842,78 @@ body.outfits-edit #new-outfit .outfit-url:hover { -khtml-opacity: 1; border-width: 1px; } -/* line 78, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 79, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete-confirmation { display: none; font-size: 75%; } -/* line 81, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 82, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete-confirmation span { color: red; } -/* line 83, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 84, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-delete-confirmation a { margin: 0 0.25em; } -/* line 85, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 86, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.active { background: #eeffee; } -/* line 88, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 89, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.confirming-deletion .outfit-delete { visibility: hidden; } -/* line 90, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 91, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.confirming-deletion .outfit-url { display: none; } -/* line 92, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 93, ../../../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 96, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.renaming h4 { display: none; } -/* line 97, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 98, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.renaming .outfit-rename-form { display: inline; } -/* line 100, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 101, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit.renaming:hover .outfit-rename-button { display: none; } -/* line 103, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 104, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit:hover .outfit-rename-button { display: inline; } -/* line 499, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 503, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4 { display: inline; } -/* line 501, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 505, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit h4:hover { text-decoration: none; } -/* line 503, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 507, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit .outfit-star { margin-top: 0.5em; } -/* line 506, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 510, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #new-outfit-name { font: inherit; line-height: 1; } -/* line 510, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 514, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-saving-outfit { display: none; padding-bottom: 1em; } -/* line 514, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 518, ../../../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 517, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 521, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .control-overlay { height: 100%; left: 0; @@ -1918,11 +2922,11 @@ body.outfits-edit .control-overlay { width: 100%; z-index: 5; } -/* line 525, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 529, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #preview-sidebar-nav-outfits, body.outfits-edit #save-outfit-signed-in { display: none; } -/* line 528, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 532, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form { padding: 0.25em 0; display: none; @@ -1960,7 +2964,7 @@ body.outfits-edit form#save-outfit-form .outfit-star { margin-left: -24px; margin-right: 0; } -/* line 37, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 38, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form img { height: 100px; left: -25px; @@ -1968,7 +2972,7 @@ body.outfits-edit form#save-outfit-form img { top: -25px; width: 100px; } -/* line 43, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 44, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-delete { -moz-border-radius: 0; -webkit-border-radius: 0; @@ -2002,7 +3006,7 @@ body.outfits-edit form#save-outfit-form .outfit-delete:hover { body.outfits-edit form#save-outfit-form .outfit-delete:active { top: auto; } -/* line 51, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 52, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-delete:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -2010,29 +3014,29 @@ body.outfits-edit form#save-outfit-form .outfit-delete:hover { -khtml-opacity: 1; background: #eeffee; } -/* line 54, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 55, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form header { display: block; padding-left: 24px; } -/* line 57, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 58, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form h4 { cursor: pointer; display: inline; } -/* line 60, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 61, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form h4:hover { text-decoration: underline; } -/* line 62, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 63, ../../../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 64, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 65, ../../../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 66, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 67, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-rename-button { -moz-opacity: 0.75; -webkit-opacity: 0.75; @@ -2041,7 +3045,7 @@ body.outfits-edit form#save-outfit-form .outfit-rename-button { font-size: 75%; margin-left: 1em; } -/* line 70, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 71, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-url { -moz-opacity: 0.5; -webkit-opacity: 0.5; @@ -2051,7 +3055,7 @@ body.outfits-edit form#save-outfit-form .outfit-url { border-width: 0; width: 284px; } -/* line 75, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 76, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-url:hover { -moz-opacity: 1; -webkit-opacity: 1; @@ -2059,52 +3063,52 @@ body.outfits-edit form#save-outfit-form .outfit-url:hover { -khtml-opacity: 1; border-width: 1px; } -/* line 78, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 79, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-delete-confirmation { display: none; font-size: 75%; } -/* line 81, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 82, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-delete-confirmation span { color: red; } -/* line 83, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 84, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-delete-confirmation a { margin: 0 0.25em; } -/* line 85, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 86, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.active { background: #eeffee; } -/* line 88, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 89, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.confirming-deletion .outfit-delete { visibility: hidden; } -/* line 90, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 91, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.confirming-deletion .outfit-url { display: none; } -/* line 92, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 93, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.confirming-deletion .outfit-delete-confirmation { display: block; } -/* line 95, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 96, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.renaming h4 { display: none; } -/* line 97, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 98, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.renaming .outfit-rename-form { display: inline; } -/* line 100, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 101, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form.renaming:hover .outfit-rename-button { display: none; } -/* line 103, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 104, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form:hover .outfit-rename-button { display: inline; } -/* line 534, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 538, ../../../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; @@ -2115,51 +3119,60 @@ body.outfits-edit form#save-outfit-form .outfit-star, body.outfits-edit form#sav float: none; vertical-align: top; } -/* line 539, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 543, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit form#save-outfit-form .outfit-star { margin-top: 0.25em; } -/* line 542, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 546, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit .outfit-url { font-size: 75%; } -/* line 546, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 550, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #preview-sidebar-nav-outfits { display: block; } -/* line 548, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 552, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #save-outfit { display: inline-block; } -/* line 552, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 556, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #save-outfit-wrapper.active-outfit #save-outfit { display: none; } -/* line 554, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 558, ../../../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 556, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 560, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #save-outfit-wrapper.active-outfit #current-outfit-permalink { display: inline-block; } -/* line 559, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 563, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #save-outfit-form { display: block; } -/* line 561, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 565, ../../../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 565, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 567, ../../../app/stylesheets/outfits/_edit.sass */ +body.outfits-edit.user-signed-in .preview-search-form-your-items { + display: -moz-inline-box; + -moz-box-orient: vertical; + display: inline-block; + vertical-align: middle; + *display: inline; + *vertical-align: auto; +} +/* line 571, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit.user-not-signed-in #save-outfit-not-signed-in { display: inline-block; } -/* line 569, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 575, ../../../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 571, ../../../app/stylesheets/outfits/_edit.sass */ +/* line 577, ../../../app/stylesheets/outfits/_edit.sass */ body.outfits-edit #save-outfit-wrapper.shared-outfit #current-outfit-permalink { display: none !important; } @@ -2536,6 +3549,14 @@ body.outfits-new #sections img:hover { body.outfits-new #read-more { float: right; } +/* line 142, ../../../app/stylesheets/outfits/_new.sass */ +body.outfits-new #your-items-module h3:after { + color: red; + content: "new!"; + font-size: 85%; + font-weight: bold; + margin-left: 0.5em; +} /* line 2, ../../../app/stylesheets/partials/_campaign-progress.sass */ body.outfits-show .campaign-progress-wrapper { diff --git a/public/stylesheets/south-street/images/ui-bg_glass_55_fcf0ba_1x400.png b/public/stylesheets/south-street/images/ui-bg_glass_55_fcf0ba_1x400.png new file mode 100644 index 00000000..a95fa334 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-bg_glass_55_fcf0ba_1x400.png differ diff --git a/public/stylesheets/south-street/images/ui-bg_gloss-wave_100_ece8da_500x100.png b/public/stylesheets/south-street/images/ui-bg_gloss-wave_100_ece8da_500x100.png new file mode 100644 index 00000000..709b5ab1 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-bg_gloss-wave_100_ece8da_500x100.png differ diff --git a/public/stylesheets/south-street/images/ui-bg_highlight-hard_100_f5f3e5_1x100.png b/public/stylesheets/south-street/images/ui-bg_highlight-hard_100_f5f3e5_1x100.png new file mode 100644 index 00000000..f0d2e151 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-bg_highlight-hard_100_f5f3e5_1x100.png differ diff --git a/public/stylesheets/south-street/images/ui-bg_highlight-hard_100_fafaf4_1x100.png b/public/stylesheets/south-street/images/ui-bg_highlight-hard_100_fafaf4_1x100.png new file mode 100644 index 00000000..bfc39c67 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-bg_highlight-hard_100_fafaf4_1x100.png differ diff --git a/public/stylesheets/south-street/images/ui-bg_highlight-hard_15_459e00_1x100.png b/public/stylesheets/south-street/images/ui-bg_highlight-hard_15_459e00_1x100.png new file mode 100644 index 00000000..677a9020 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-bg_highlight-hard_15_459e00_1x100.png differ diff --git a/public/stylesheets/south-street/images/ui-bg_highlight-hard_95_cccccc_1x100.png b/public/stylesheets/south-street/images/ui-bg_highlight-hard_95_cccccc_1x100.png new file mode 100644 index 00000000..ca80bffc Binary files /dev/null and b/public/stylesheets/south-street/images/ui-bg_highlight-hard_95_cccccc_1x100.png differ diff --git a/public/stylesheets/south-street/images/ui-bg_highlight-soft_25_67b021_1x100.png b/public/stylesheets/south-street/images/ui-bg_highlight-soft_25_67b021_1x100.png new file mode 100644 index 00000000..51773351 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-bg_highlight-soft_25_67b021_1x100.png differ diff --git a/public/stylesheets/south-street/images/ui-bg_highlight-soft_95_ffedad_1x100.png b/public/stylesheets/south-street/images/ui-bg_highlight-soft_95_ffedad_1x100.png new file mode 100644 index 00000000..b4cb8241 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-bg_highlight-soft_95_ffedad_1x100.png differ diff --git a/public/stylesheets/south-street/images/ui-bg_inset-soft_15_2b2922_1x100.png b/public/stylesheets/south-street/images/ui-bg_inset-soft_15_2b2922_1x100.png new file mode 100644 index 00000000..8568394c Binary files /dev/null and b/public/stylesheets/south-street/images/ui-bg_inset-soft_15_2b2922_1x100.png differ diff --git a/public/stylesheets/south-street/images/ui-icons_808080_256x240.png b/public/stylesheets/south-street/images/ui-icons_808080_256x240.png new file mode 100644 index 00000000..69ba6d81 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-icons_808080_256x240.png differ diff --git a/public/stylesheets/south-street/images/ui-icons_847e71_256x240.png b/public/stylesheets/south-street/images/ui-icons_847e71_256x240.png new file mode 100644 index 00000000..71838ca8 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-icons_847e71_256x240.png differ diff --git a/public/stylesheets/south-street/images/ui-icons_8dc262_256x240.png b/public/stylesheets/south-street/images/ui-icons_8dc262_256x240.png new file mode 100644 index 00000000..0f580253 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-icons_8dc262_256x240.png differ diff --git a/public/stylesheets/south-street/images/ui-icons_cd0a0a_256x240.png b/public/stylesheets/south-street/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 00000000..2ab019b7 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-icons_cd0a0a_256x240.png differ diff --git a/public/stylesheets/south-street/images/ui-icons_eeeeee_256x240.png b/public/stylesheets/south-street/images/ui-icons_eeeeee_256x240.png new file mode 100644 index 00000000..01bb36ba Binary files /dev/null and b/public/stylesheets/south-street/images/ui-icons_eeeeee_256x240.png differ diff --git a/public/stylesheets/south-street/images/ui-icons_ffffff_256x240.png b/public/stylesheets/south-street/images/ui-icons_ffffff_256x240.png new file mode 100644 index 00000000..42f8f992 Binary files /dev/null and b/public/stylesheets/south-street/images/ui-icons_ffffff_256x240.png differ diff --git a/public/stylesheets/south-street/jquery-ui.css b/public/stylesheets/south-street/jquery-ui.css new file mode 100644 index 00000000..9924eec1 --- /dev/null +++ b/public/stylesheets/south-street/jquery-ui.css @@ -0,0 +1,342 @@ +/* + * jQuery UI CSS Framework 1.8.14 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework 1.8.14 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=segoe%20ui,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=ece8da&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=100&borderColorHeader=d4ccb0&fcHeader=433f38&iconColorHeader=847e71&bgColorContent=f5f3e5&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dfd9c3&fcContent=312e25&iconColorContent=808080&bgColorDefault=459e00&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=15&borderColorDefault=327E04&fcDefault=ffffff&iconColorDefault=eeeeee&bgColorHover=67b021&bgTextureHover=03_highlight_soft.png&bgImgOpacityHover=25&borderColorHover=327E04&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=fafaf4&bgTextureActive=04_highlight_hard.png&bgImgOpacityActive=100&borderColorActive=d4ccb0&fcActive=459e00&iconColorActive=8DC262&bgColorHighlight=fcf0ba&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=e8e1b5&fcHighlight=363636&iconColorHighlight=8DC262&bgColorError=ffedad&bgTextureError=03_highlight_soft.png&bgImgOpacityError=95&borderColorError=e3a345&fcError=cd5c0a&iconColorError=cd0a0a&bgColorOverlay=2b2922&bgTextureOverlay=05_inset_soft.png&bgImgOpacityOverlay=15&opacityOverlay=90&bgColorShadow=cccccc&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=95&opacityShadow=20&thicknessShadow=12px&offsetTopShadow=-12px&offsetLeftShadow=-12px&cornerRadiusShadow=10px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: segoe ui, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: segoe ui, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dfd9c3; background: #f5f3e5 url(images/ui-bg_highlight-hard_100_f5f3e5_1x100.png) 50% top repeat-x; color: #312e25; } +.ui-widget-content a { color: #312e25; } +.ui-widget-header { border: 1px solid #d4ccb0; background: #ece8da url(images/ui-bg_gloss-wave_100_ece8da_500x100.png) 50% 50% repeat-x; color: #433f38; font-weight: bold; } +.ui-widget-header a { color: #433f38; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #327e04; background: #459e00 url(images/ui-bg_highlight-hard_15_459e00_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #ffffff; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #327e04; background: #67b021 url(images/ui-bg_highlight-soft_25_67b021_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } +.ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #d4ccb0; background: #fafaf4 url(images/ui-bg_highlight-hard_100_fafaf4_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #459e00; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #459e00; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #e8e1b5; background: #fcf0ba url(images/ui-bg_glass_55_fcf0ba_1x400.png) 50% 50% repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #e3a345; background: #ffedad url(images/ui-bg_highlight-soft_95_ffedad_1x100.png) 50% top repeat-x; color: #cd5c0a; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd5c0a; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd5c0a; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_808080_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_808080_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_847e71_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_eeeeee_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_8dc262_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_8dc262_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -khtml-border-top-left-radius: 6px; border-top-left-radius: 6px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; -khtml-border-top-right-radius: 6px; border-top-right-radius: 6px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; -khtml-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; -khtml-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } + +/* Overlays */ +.ui-widget-overlay { background: #2b2922 url(images/ui-bg_inset-soft_15_2b2922_1x100.png) 50% bottom repeat-x; opacity: .90;filter:Alpha(Opacity=90); } +.ui-widget-shadow { margin: -12px 0 0 -12px; padding: 12px; background: #cccccc url(images/ui-bg_highlight-hard_95_cccccc_1x100.png) 50% top repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 10px; -khtml-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; }/* + * jQuery UI Autocomplete 1.8.14 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.14 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} diff --git a/spec/controllers/closet_hangers_controller_spec.rb b/spec/controllers/closet_hangers_controller_spec.rb new file mode 100644 index 00000000..6f79ab79 --- /dev/null +++ b/spec/controllers/closet_hangers_controller_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe ClosetHangersController do + +end diff --git a/spec/controllers/closet_lists_controller_spec.rb b/spec/controllers/closet_lists_controller_spec.rb new file mode 100644 index 00000000..075e1270 --- /dev/null +++ b/spec/controllers/closet_lists_controller_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe ClosetListsController do + + describe "GET 'new'" do + it "should be successful" do + get 'new' + response.should be_success + end + end + + describe "GET 'create'" do + it "should be successful" do + get 'create' + response.should be_success + end + end + +end diff --git a/spec/controllers/closet_pages_controller_spec.rb b/spec/controllers/closet_pages_controller_spec.rb new file mode 100644 index 00000000..9f7b67ac --- /dev/null +++ b/spec/controllers/closet_pages_controller_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe ClosetPagesController do + +end diff --git a/spec/helpers/closet_hangers_helper_spec.rb b/spec/helpers/closet_hangers_helper_spec.rb new file mode 100644 index 00000000..74eee5bb --- /dev/null +++ b/spec/helpers/closet_hangers_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the ClosetHangersHelper. For example: +# +# describe ClosetHangersHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe ClosetHangersHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/closet_lists_helper_spec.rb b/spec/helpers/closet_lists_helper_spec.rb new file mode 100644 index 00000000..2678a281 --- /dev/null +++ b/spec/helpers/closet_lists_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the ClosetListsHelper. For example: +# +# describe ClosetListsHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe ClosetListsHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/closet_pages_helper_spec.rb b/spec/helpers/closet_pages_helper_spec.rb new file mode 100644 index 00000000..9483444d --- /dev/null +++ b/spec/helpers/closet_pages_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the ClosetPagesHelper. For example: +# +# describe ClosetPagesHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe ClosetPagesHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/closet_hanger_spec.rb b/spec/models/closet_hanger_spec.rb new file mode 100644 index 00000000..d8d2f0bb --- /dev/null +++ b/spec/models/closet_hanger_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe ClosetHanger do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/closet_list_spec.rb b/spec/models/closet_list_spec.rb new file mode 100644 index 00000000..1e43990d --- /dev/null +++ b/spec/models/closet_list_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe ClosetList do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/views/closet_lists/create.html.erb_spec.rb b/spec/views/closet_lists/create.html.erb_spec.rb new file mode 100644 index 00000000..cdb8c9b1 --- /dev/null +++ b/spec/views/closet_lists/create.html.erb_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe "closet_lists/create.html.erb" do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/views/closet_lists/new.html.erb_spec.rb b/spec/views/closet_lists/new.html.erb_spec.rb new file mode 100644 index 00000000..98ce1cfd --- /dev/null +++ b/spec/views/closet_lists/new.html.erb_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe "closet_lists/new.html.erb" do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/views/petpages/new.html.erb_spec.rb b/spec/views/petpages/new.html.erb_spec.rb new file mode 100644 index 00000000..b9434a86 --- /dev/null +++ b/spec/views/petpages/new.html.erb_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe "petpages/new.html.erb" do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/vendor/cache/nokogiri-1.5.0.gem b/vendor/cache/nokogiri-1.5.0.gem new file mode 100644 index 00000000..47c37a67 Binary files /dev/null and b/vendor/cache/nokogiri-1.5.0.gem differ diff --git a/vendor/cache/sanitize-2.0.3.gem b/vendor/cache/sanitize-2.0.3.gem new file mode 100644 index 00000000..8d81d81e Binary files /dev/null and b/vendor/cache/sanitize-2.0.3.gem differ