forked from OpenNeo/impress
include share button for logged in users, too
This commit is contained in:
parent
1207e84804
commit
d7d2d5f0e5
6 changed files with 417 additions and 384 deletions
|
@ -73,7 +73,8 @@ class Outfit < ActiveRecord::Base
|
||||||
Outfit.new.tap do |outfit|
|
Outfit.new.tap do |outfit|
|
||||||
name = params.delete(:name)
|
name = params.delete(:name)
|
||||||
starred = params.delete(:starred)
|
starred = params.delete(:starred)
|
||||||
if user
|
anonymous = params.delete(:anonymous) == "true"
|
||||||
|
if user && !anonymous
|
||||||
outfit.user = user
|
outfit.user = user
|
||||||
outfit.name = name
|
outfit.name = name
|
||||||
outfit.starred = starred
|
outfit.starred = starred
|
||||||
|
|
|
@ -130,20 +130,22 @@ body.outfits-edit
|
||||||
float: right
|
float: right
|
||||||
button
|
button
|
||||||
display: none
|
display: none
|
||||||
|
#share-outfit
|
||||||
|
display: inline-block
|
||||||
&.loading
|
&.loading
|
||||||
background:
|
background:
|
||||||
image: image-url("loading.gif")
|
image: image-url("loading.gif")
|
||||||
position: left center
|
position: left center
|
||||||
repeat: no-repeat
|
repeat: no-repeat
|
||||||
padding-left: 20px
|
padding-left: 20px
|
||||||
#save-outfit, #share-outfit, #save-outfit-not-signed-in, #save-current-outfit, #save-outfit-copy, #save-outfit-finish
|
#save-outfit, #save-outfit-not-signed-in, #save-current-outfit, #save-outfit-copy, #save-outfit-finish
|
||||||
+loud-awesome-button-color
|
+loud-awesome-button-color
|
||||||
#current-outfit-permalink
|
#current-outfit-permalink, #shared-outfit-permalink
|
||||||
display: none
|
display: none
|
||||||
margin-right: .25em
|
margin-right: .25em
|
||||||
img
|
img
|
||||||
+icon
|
+icon
|
||||||
#current-outfit-url
|
#shared-outfit-url
|
||||||
display: none
|
display: none
|
||||||
width: 15em
|
width: 15em
|
||||||
#preview
|
#preview
|
||||||
|
@ -474,13 +476,16 @@ body.outfits-edit
|
||||||
&.saving-outfit
|
&.saving-outfit
|
||||||
#save-outfit-form
|
#save-outfit-form
|
||||||
display: block
|
display: block
|
||||||
#save-outfit, #save-current-outfit, #save-outfit-copy, #current-outfit-permalink
|
#save-outfit, #save-current-outfit, #save-outfit-copy, #current-outfit-permalink, #shared-outfit-permalink, #share-outfit, #shared-outfit-url
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
&.user-not-signed-in
|
&.user-not-signed-in
|
||||||
#share-outfit, #save-outfit-not-signed-in
|
#save-outfit-not-signed-in
|
||||||
display: inline-block
|
display: inline-block
|
||||||
#save-outfit-wrapper.shared-outfit
|
|
||||||
#current-outfit-permalink, #current-outfit-url
|
#save-outfit-wrapper.shared-outfit
|
||||||
display: inline-block
|
#shared-outfit-permalink, #shared-outfit-url
|
||||||
|
display: inline-block
|
||||||
|
#current-outfit-permalink
|
||||||
|
display: none !important
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,12 @@
|
||||||
%ul
|
%ul
|
||||||
#save-outfit-wrapper
|
#save-outfit-wrapper
|
||||||
%a#current-outfit-permalink{:target => '_blank'}
|
%a#current-outfit-permalink{:target => '_blank'}
|
||||||
= image_tag 'link_go.png', :alt => 'Permalink', :title => 'Permalink'
|
= image_tag 'link_go.png', :alt => 'Permalink', :title => 'Permalink to current outfit'
|
||||||
%input#current-outfit-url.outfit-url{:type => 'text'}
|
%a#shared-outfit-permalink{:target => '_blank'}
|
||||||
%button#save-outfit Save outfit
|
= image_tag 'link_go.png', :alt => 'Permalink', :title => 'Permalink to shared outfit'
|
||||||
|
%input#shared-outfit-url.outfit-url{:type => 'text'}
|
||||||
%button#share-outfit Share outfit
|
%button#share-outfit Share outfit
|
||||||
|
%button#save-outfit Save outfit
|
||||||
%button#save-outfit-not-signed-in Log in to save
|
%button#save-outfit-not-signed-in Log in to save
|
||||||
%button#save-current-outfit Save "<span>current outfit</span>"
|
%button#save-current-outfit Save "<span>current outfit</span>"
|
||||||
%button#save-outfit-copy Save a copy
|
%button#save-outfit-copy Save a copy
|
||||||
|
@ -118,3 +120,4 @@
|
||||||
- content_for :javascripts do
|
- content_for :javascripts do
|
||||||
= include_javascript_libraries :jquery, :swfobject, :jquery_tmpl
|
= include_javascript_libraries :jquery, :swfobject, :jquery_tmpl
|
||||||
= include_javascripts :edit_outfit_package
|
= include_javascripts :edit_outfit_package
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,9 @@ Partial.ItemSet = function ItemSet(wardrobe, selector) {
|
||||||
var item_set = this, ul = $(selector), items = [], setClosetItems,
|
var item_set = this, ul = $(selector), items = [], setClosetItems,
|
||||||
setOutfitItems, setOutfitItemsControls, no_assets_full_message = $('#no-assets-full-message'),
|
setOutfitItems, setOutfitItemsControls, no_assets_full_message = $('#no-assets-full-message'),
|
||||||
container = $('#container');
|
container = $('#container');
|
||||||
|
|
||||||
Partial.ItemSet.setWardrobe(wardrobe);
|
Partial.ItemSet.setWardrobe(wardrobe);
|
||||||
|
|
||||||
function prepSetSpecificItems(type) {
|
function prepSetSpecificItems(type) {
|
||||||
return function (specific_items) {
|
return function (specific_items) {
|
||||||
var item, worn, li;
|
var item, worn, li;
|
||||||
|
@ -51,15 +51,15 @@ Partial.ItemSet = function ItemSet(wardrobe, selector) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setClosetItems = prepSetSpecificItems('closeted');
|
setClosetItems = prepSetSpecificItems('closeted');
|
||||||
|
|
||||||
setOutfitItemsControls = prepSetSpecificItems('worn');
|
setOutfitItemsControls = prepSetSpecificItems('worn');
|
||||||
setOutfitItems = function (specific_items) {
|
setOutfitItems = function (specific_items) {
|
||||||
setOutfitItemsControls(specific_items);
|
setOutfitItemsControls(specific_items);
|
||||||
setHasAssets(specific_items);
|
setHasAssets(specific_items);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setHasAssets(specific_items) {
|
function setHasAssets(specific_items) {
|
||||||
var item, no_assets, li, no_assets_message;
|
var item, no_assets, li, no_assets_message;
|
||||||
for(var i = 0, l = specific_items.length; i < l; i++) {
|
for(var i = 0, l = specific_items.length; i < l; i++) {
|
||||||
|
@ -75,7 +75,7 @@ Partial.ItemSet = function ItemSet(wardrobe, selector) {
|
||||||
})(li);
|
})(li);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setItems = function (new_items) {
|
this.setItems = function (new_items) {
|
||||||
var item, li, controls, info_link;
|
var item, li, controls, info_link;
|
||||||
items = new_items;
|
items = new_items;
|
||||||
|
@ -106,7 +106,7 @@ Partial.ItemSet = function ItemSet(wardrobe, selector) {
|
||||||
setClosetItems(wardrobe.outfit.getClosetItems());
|
setClosetItems(wardrobe.outfit.getClosetItems());
|
||||||
setOutfitItems(wardrobe.outfit.getWornItems());
|
setOutfitItems(wardrobe.outfit.getWornItems());
|
||||||
}
|
}
|
||||||
|
|
||||||
$('span.no-assets-message').live('mouseover', function () {
|
$('span.no-assets-message').live('mouseover', function () {
|
||||||
var el = $(this), o = el.offset();
|
var el = $(this), o = el.offset();
|
||||||
no_assets_full_message.css({
|
no_assets_full_message.css({
|
||||||
|
@ -116,7 +116,7 @@ Partial.ItemSet = function ItemSet(wardrobe, selector) {
|
||||||
}).live('mouseout', function () {
|
}).live('mouseout', function () {
|
||||||
no_assets_full_message.removeAttr('style');
|
no_assets_full_message.removeAttr('style');
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.outfit.bind('updateItemAssets', function () { setHasAssets(wardrobe.outfit.getWornItems()) });
|
wardrobe.outfit.bind('updateItemAssets', function () { setHasAssets(wardrobe.outfit.getWornItems()) });
|
||||||
wardrobe.outfit.bind('updateWornItems', setOutfitItems);
|
wardrobe.outfit.bind('updateWornItems', setOutfitItems);
|
||||||
wardrobe.outfit.bind('updateClosetItems', setClosetItems);
|
wardrobe.outfit.bind('updateClosetItems', setClosetItems);
|
||||||
|
@ -139,7 +139,7 @@ Partial.ItemSet.setWardrobe = function (wardrobe) {
|
||||||
href: '#',
|
href: '#',
|
||||||
text: verb_set[toggle ? 0 : 1]
|
text: verb_set[toggle ? 0 : 1]
|
||||||
}).wrap('<li/>').parent().attr('class', full_class);
|
}).wrap('<li/>').parent().attr('class', full_class);
|
||||||
|
|
||||||
(function (type, toggle) {
|
(function (type, toggle) {
|
||||||
$('li.' + live_class + ' a').live('click', function (e) {
|
$('li.' + live_class + ' a').live('click', function (e) {
|
||||||
var el = $(this), item = el.closest('.object').data('item');
|
var el = $(this), item = el.closest('.object').data('item');
|
||||||
|
@ -149,7 +149,7 @@ Partial.ItemSet.setWardrobe = function (wardrobe) {
|
||||||
})(type, toggle);
|
})(type, toggle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle_fn.closeted = {};
|
toggle_fn.closeted = {};
|
||||||
toggle_fn.closeted[true] = $.proxy(wardrobe.outfit, 'closetItem');
|
toggle_fn.closeted[true] = $.proxy(wardrobe.outfit, 'closetItem');
|
||||||
toggle_fn.closeted[false] = $.proxy(wardrobe.outfit, 'unclosetItem');
|
toggle_fn.closeted[false] = $.proxy(wardrobe.outfit, 'unclosetItem');
|
||||||
|
@ -157,13 +157,13 @@ Partial.ItemSet.setWardrobe = function (wardrobe) {
|
||||||
toggle_fn.worn = {};
|
toggle_fn.worn = {};
|
||||||
toggle_fn.worn[true] = $.proxy(wardrobe.outfit, 'wearItem');
|
toggle_fn.worn[true] = $.proxy(wardrobe.outfit, 'wearItem');
|
||||||
toggle_fn.worn[false] = $.proxy(wardrobe.outfit, 'unwearItem');
|
toggle_fn.worn[false] = $.proxy(wardrobe.outfit, 'unwearItem');
|
||||||
|
|
||||||
Partial.ItemSet.setWardrobe = $.noop;
|
Partial.ItemSet.setWardrobe = $.noop;
|
||||||
}
|
}
|
||||||
|
|
||||||
View.Closet = function (wardrobe) {
|
View.Closet = function (wardrobe) {
|
||||||
var item_set = new Partial.ItemSet(wardrobe, '#preview-closet ul');
|
var item_set = new Partial.ItemSet(wardrobe, '#preview-closet ul');
|
||||||
|
|
||||||
wardrobe.outfit.bind('updateClosetItems', $.proxy(item_set, 'setItems'));
|
wardrobe.outfit.bind('updateClosetItems', $.proxy(item_set, 'setItems'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ View.Fullscreen = function (wardrobe) {
|
||||||
preview_el = $('#preview'), search_el = $('#preview-search-form'),
|
preview_el = $('#preview'), search_el = $('#preview-search-form'),
|
||||||
preview_swf = $('#preview-swf'), sidebar_el = $('#preview-sidebar'),
|
preview_swf = $('#preview-swf'), sidebar_el = $('#preview-sidebar'),
|
||||||
footer = $('#footer'), jwindow = $(window), overrideFull = false;
|
footer = $('#footer'), jwindow = $(window), overrideFull = false;
|
||||||
|
|
||||||
function fit() {
|
function fit() {
|
||||||
if(!overrideFull) {
|
if(!overrideFull) {
|
||||||
var newFull = jwindow.height() > 500;
|
var newFull = jwindow.height() > 500;
|
||||||
|
@ -185,7 +185,7 @@ View.Fullscreen = function (wardrobe) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(full) {
|
if(full) {
|
||||||
preview_swf = $('#preview-swf'); // swf replaced
|
preview_swf = $('#preview-swf'); // swf replaced
|
||||||
var available = {
|
var available = {
|
||||||
|
@ -211,19 +211,19 @@ View.Fullscreen = function (wardrobe) {
|
||||||
size.next[margin.active] = (available[dim.larger] - size.next[dim.larger]) / 2;
|
size.next[margin.active] = (available[dim.larger] - size.next[dim.larger]) / 2;
|
||||||
size.next[margin.inactive] = 0;
|
size.next[margin.inactive] = 0;
|
||||||
preview_swf.css(size.next);
|
preview_swf.css(size.next);
|
||||||
|
|
||||||
preview_el.height(available.height);
|
preview_el.height(available.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('#preview').data('fit', fit);
|
$('#preview').data('fit', fit);
|
||||||
|
|
||||||
win.resize(fit).load(fit);
|
win.resize(fit).load(fit);
|
||||||
// run fit after search updates select fields
|
// run fit after search updates select fields
|
||||||
function fitSoon() { setTimeout(fit, 0) }
|
function fitSoon() { setTimeout(fit, 0) }
|
||||||
wardrobe.item_zone_sets.bind('update', fitSoon);
|
wardrobe.item_zone_sets.bind('update', fitSoon);
|
||||||
wardrobe.pet_attributes.bind('update', fitSoon);
|
wardrobe.pet_attributes.bind('update', fitSoon);
|
||||||
fit();
|
fit();
|
||||||
|
|
||||||
var Konami=function(){var a={addEvent:function(b,c,d,e){if(b.addEventListener)b.addEventListener(c,d,false);else if(b.attachEvent){b["e"+c+d]=d;b[c+d]=function(){b["e"+c+d](window.event,e)};b.attachEvent("on"+c,b[c+d])}},input:"",pattern:"3838404037393739666513",load:function(b){this.addEvent(document,"keydown",function(c,d){if(d)a=d;a.input+=c?c.keyCode:event.keyCode;if(a.input.indexOf(a.pattern)!=-1){a.code(b);a.input=""}},this);this.iphone.load(b)},code:function(b){window.location=b},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:false,capture:false,keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(b){a.code(b)},load:function(b){a.addEvent(document,"touchmove",function(c){if(c.touches.length==1&&a.iphone.capture==true){c=c.touches[0];a.iphone.stop_x=c.pageX;a.iphone.stop_y=c.pageY;a.iphone.tap=false;a.iphone.capture=false;a.iphone.check_direction()}});a.addEvent(document,"touchend",function(){a.iphone.tap==true&&a.iphone.check_direction(b)},false);a.addEvent(document,"touchstart",function(c){a.iphone.start_x=c.changedTouches[0].pageX;a.iphone.start_y=c.changedTouches[0].pageY;a.iphone.tap=true;a.iphone.capture=true})},check_direction:function(b){x_magnitude=Math.abs(this.start_x-this.stop_x);y_magnitude=Math.abs(this.start_y-this.stop_y);x=this.start_x-this.stop_x<0?"RIGHT":"LEFT";y=this.start_y-this.stop_y<0?"DOWN":"UP";result=x_magnitude>y_magnitude?x:y;result=this.tap==true?"TAP":result;if(result==this.keys[0])this.keys=this.keys.slice(1,this.keys.length);this.keys.length==0&&this.code(b)}}};return a};
|
var Konami=function(){var a={addEvent:function(b,c,d,e){if(b.addEventListener)b.addEventListener(c,d,false);else if(b.attachEvent){b["e"+c+d]=d;b[c+d]=function(){b["e"+c+d](window.event,e)};b.attachEvent("on"+c,b[c+d])}},input:"",pattern:"3838404037393739666513",load:function(b){this.addEvent(document,"keydown",function(c,d){if(d)a=d;a.input+=c?c.keyCode:event.keyCode;if(a.input.indexOf(a.pattern)!=-1){a.code(b);a.input=""}},this);this.iphone.load(b)},code:function(b){window.location=b},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:false,capture:false,keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(b){a.code(b)},load:function(b){a.addEvent(document,"touchmove",function(c){if(c.touches.length==1&&a.iphone.capture==true){c=c.touches[0];a.iphone.stop_x=c.pageX;a.iphone.stop_y=c.pageY;a.iphone.tap=false;a.iphone.capture=false;a.iphone.check_direction()}});a.addEvent(document,"touchend",function(){a.iphone.tap==true&&a.iphone.check_direction(b)},false);a.addEvent(document,"touchstart",function(c){a.iphone.start_x=c.changedTouches[0].pageX;a.iphone.start_y=c.changedTouches[0].pageY;a.iphone.tap=true;a.iphone.capture=true})},check_direction:function(b){x_magnitude=Math.abs(this.start_x-this.stop_x);y_magnitude=Math.abs(this.start_y-this.stop_y);x=this.start_x-this.stop_x<0?"RIGHT":"LEFT";y=this.start_y-this.stop_y<0?"DOWN":"UP";result=x_magnitude>y_magnitude?x:y;result=this.tap==true?"TAP":result;if(result==this.keys[0])this.keys=this.keys.slice(1,this.keys.length);this.keys.length==0&&this.code(b)}}};return a};
|
||||||
konami = new Konami();
|
konami = new Konami();
|
||||||
konami.code = function () {
|
konami.code = function () {
|
||||||
|
@ -253,7 +253,7 @@ View.Hash = function (wardrobe) {
|
||||||
species: TYPES.INTEGER,
|
species: TYPES.INTEGER,
|
||||||
state: TYPES.INTEGER
|
state: TYPES.INTEGER
|
||||||
}, links_with_return_to = $('a[href*=return_to]');
|
}, links_with_return_to = $('a[href*=return_to]');
|
||||||
|
|
||||||
function checkQuery() {
|
function checkQuery() {
|
||||||
var query = (document.location.hash || document.location.search).substr(1);
|
var query = (document.location.hash || document.location.search).substr(1);
|
||||||
if(query != previous_query) {
|
if(query != previous_query) {
|
||||||
|
@ -261,7 +261,7 @@ View.Hash = function (wardrobe) {
|
||||||
previous_query = query;
|
previous_query = query;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseQuery(query) {
|
function parseQuery(query) {
|
||||||
var new_data = {}, pairs = query.split('&');
|
var new_data = {}, pairs = query.split('&');
|
||||||
parse_in_progress = true;
|
parse_in_progress = true;
|
||||||
|
@ -283,7 +283,7 @@ View.Hash = function (wardrobe) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(new_data.color !== data.color || new_data.species !== data.species) {
|
if(new_data.color !== data.color || new_data.species !== data.species) {
|
||||||
wardrobe.outfit.setPetTypeByColorAndSpecies(new_data.color, new_data.species);
|
wardrobe.outfit.setPetTypeByColorAndSpecies(new_data.color, new_data.species);
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,7 @@ View.Hash = function (wardrobe) {
|
||||||
parse_in_progress = false;
|
parse_in_progress = false;
|
||||||
updateLinksWithReturnTo();
|
updateLinksWithReturnTo();
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeQuery(changes) {
|
function changeQuery(changes) {
|
||||||
var value;
|
var value;
|
||||||
if(!parse_in_progress) {
|
if(!parse_in_progress) {
|
||||||
|
@ -336,7 +336,7 @@ View.Hash = function (wardrobe) {
|
||||||
updateQuery();
|
updateQuery();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateQuery() {
|
function updateQuery() {
|
||||||
var new_query;
|
var new_query;
|
||||||
new_query = $.param(data).replace(/%5B%5D/g, '[]');
|
new_query = $.param(data).replace(/%5B%5D/g, '[]');
|
||||||
|
@ -344,7 +344,7 @@ View.Hash = function (wardrobe) {
|
||||||
document.location.hash = '#' + new_query;
|
document.location.hash = '#' + new_query;
|
||||||
updateLinksWithReturnTo();
|
updateLinksWithReturnTo();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateLinksWithReturnTo() {
|
function updateLinksWithReturnTo() {
|
||||||
links_with_return_to.each(function () {
|
links_with_return_to.each(function () {
|
||||||
var new_return_to = 'return_to=' + encodeURIComponent(
|
var new_return_to = 'return_to=' + encodeURIComponent(
|
||||||
|
@ -355,25 +355,25 @@ View.Hash = function (wardrobe) {
|
||||||
this.href = this.href.replace(/return_to=[^&]+/, new_return_to);
|
this.href = this.href.replace(/return_to=[^&]+/, new_return_to);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initialize = function () {
|
this.initialize = function () {
|
||||||
checkQuery();
|
checkQuery();
|
||||||
setInterval(checkQuery, 100);
|
setInterval(checkQuery, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
function singleOutfitResponse(event_name, response) {
|
function singleOutfitResponse(event_name, response) {
|
||||||
wardrobe.outfit.bind(event_name, function () {
|
wardrobe.outfit.bind(event_name, function () {
|
||||||
if(!wardrobe.outfit.in_transaction) response.apply(this, arguments);
|
if(!wardrobe.outfit.in_transaction) response.apply(this, arguments);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
singleOutfitResponse('updateClosetItems', function (items) {
|
singleOutfitResponse('updateClosetItems', function (items) {
|
||||||
var item_ids = items.map('id');
|
var item_ids = items.map('id');
|
||||||
if(!arraysMatch(item_ids, data.closet)) {
|
if(!arraysMatch(item_ids, data.closet)) {
|
||||||
changeQuery({closet: item_ids});
|
changeQuery({closet: item_ids});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
singleOutfitResponse('updateWornItems', function (items) {
|
singleOutfitResponse('updateWornItems', function (items) {
|
||||||
var item_ids = items.map('id'), changes = {};
|
var item_ids = items.map('id'), changes = {};
|
||||||
if(!arraysMatch(item_ids, data.objects)) {
|
if(!arraysMatch(item_ids, data.objects)) {
|
||||||
|
@ -386,7 +386,7 @@ View.Hash = function (wardrobe) {
|
||||||
}
|
}
|
||||||
if(changes.objects || changes.closet) changeQuery(changes);
|
if(changes.objects || changes.closet) changeQuery(changes);
|
||||||
});
|
});
|
||||||
|
|
||||||
singleOutfitResponse('updatePetType', function (pet_type) {
|
singleOutfitResponse('updatePetType', function (pet_type) {
|
||||||
if(pet_type.color_id != data.color || pet_type.species_id != data.species) {
|
if(pet_type.color_id != data.color || pet_type.species_id != data.species) {
|
||||||
changeQuery({
|
changeQuery({
|
||||||
|
@ -396,24 +396,24 @@ View.Hash = function (wardrobe) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
singleOutfitResponse('petTypeNotFound', function () {
|
singleOutfitResponse('petTypeNotFound', function () {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
});
|
});
|
||||||
|
|
||||||
singleOutfitResponse('updatePetState', function (pet_state) {
|
singleOutfitResponse('updatePetState', function (pet_state) {
|
||||||
var pet_type = wardrobe.outfit.getPetType();
|
var pet_type = wardrobe.outfit.getPetType();
|
||||||
if(pet_state.id != data.state && pet_type && (data.state || pet_state.id != pet_type.pet_state_ids[0])) {
|
if(pet_state.id != data.state && pet_type && (data.state || pet_state.id != pet_type.pet_state_ids[0])) {
|
||||||
changeQuery({state: pet_state.id});
|
changeQuery({state: pet_state.id});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
singleOutfitResponse('setOutfit', function (outfit) {
|
singleOutfitResponse('setOutfit', function (outfit) {
|
||||||
if(outfit.id != data.outfit) {
|
if(outfit.id != data.outfit) {
|
||||||
changeQuery({outfit: outfit.id});
|
changeQuery({outfit: outfit.id});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.outfit.bind('loadOutfit', function (outfit) {
|
wardrobe.outfit.bind('loadOutfit', function (outfit) {
|
||||||
changeQuery({
|
changeQuery({
|
||||||
closet: outfit.getClosetItemIds(),
|
closet: outfit.getClosetItemIds(),
|
||||||
|
@ -424,12 +424,12 @@ View.Hash = function (wardrobe) {
|
||||||
state: outfit.pet_state.id
|
state: outfit.pet_state.id
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.outfit.bind('outfitNotFound', function (outfit) {
|
wardrobe.outfit.bind('outfitNotFound', function (outfit) {
|
||||||
var new_id = outfit ? outfit.id : undefined;
|
var new_id = outfit ? outfit.id : undefined;
|
||||||
changeQuery({outfit: new_id});
|
changeQuery({outfit: new_id});
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.search.bind('updateRequest', function (request) {
|
wardrobe.search.bind('updateRequest', function (request) {
|
||||||
if(request.offset != data.search_offset || request.query != data.search) {
|
if(request.offset != data.search_offset || request.query != data.search) {
|
||||||
changeQuery({
|
changeQuery({
|
||||||
|
@ -442,7 +442,8 @@ View.Hash = function (wardrobe) {
|
||||||
|
|
||||||
View.Outfits = function (wardrobe) {
|
View.Outfits = function (wardrobe) {
|
||||||
var current_outfit_permalink_el = $('#current-outfit-permalink'),
|
var current_outfit_permalink_el = $('#current-outfit-permalink'),
|
||||||
current_outfit_url_el = $('#current-outfit-url'),
|
shared_outfit_permalink_el = $('#shared-outfit-permalink'),
|
||||||
|
shared_outfit_url_el = $('#shared-outfit-url'),
|
||||||
new_outfit_form_el = $('#save-outfit-form'),
|
new_outfit_form_el = $('#save-outfit-form'),
|
||||||
new_outfit_name_el = $('#save-outfit-name'),
|
new_outfit_name_el = $('#save-outfit-name'),
|
||||||
outfits_el = $('#preview-outfits'),
|
outfits_el = $('#preview-outfits'),
|
||||||
|
@ -457,77 +458,77 @@ View.Outfits = function (wardrobe) {
|
||||||
sidebar_el = $('#preview-sidebar'),
|
sidebar_el = $('#preview-sidebar'),
|
||||||
signed_in,
|
signed_in,
|
||||||
previously_viewing = '';
|
previously_viewing = '';
|
||||||
|
|
||||||
function liForOutfit(outfit) {
|
function liForOutfit(outfit) {
|
||||||
return $('li.outfit-' + outfit.id);
|
return $('li.outfit-' + outfit.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function navLinkTo(callback) {
|
function navLinkTo(callback) {
|
||||||
return function (e) {
|
return function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function navigateTo(will_be_viewing) {
|
function navigateTo(will_be_viewing) {
|
||||||
var currently_viewing = sidebar_el.attr('class');
|
var currently_viewing = sidebar_el.attr('class');
|
||||||
if(currently_viewing != will_be_viewing) previously_viewing = currently_viewing;
|
if(currently_viewing != will_be_viewing) previously_viewing = currently_viewing;
|
||||||
sidebar_el.attr('class', will_be_viewing);
|
sidebar_el.attr('class', will_be_viewing);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show for login */
|
/* Show for login */
|
||||||
|
|
||||||
signed_in = $('meta[name=user-signed-in]').attr('content') == 'true';
|
signed_in = $('meta[name=user-signed-in]').attr('content') == 'true';
|
||||||
if(signed_in) {
|
if(signed_in) {
|
||||||
$(document.body).addClass('user-signed-in');
|
$(document.body).addClass('user-signed-in');
|
||||||
} else {
|
} else {
|
||||||
$(document.body).addClass('user-not-signed-in');
|
$(document.body).addClass('user-not-signed-in');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Nav */
|
/* Nav */
|
||||||
|
|
||||||
function showCloset() {
|
function showCloset() {
|
||||||
navigateTo('');
|
navigateTo('');
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOutfits() {
|
function showOutfits() {
|
||||||
wardrobe.user.loadOutfits();
|
wardrobe.user.loadOutfits();
|
||||||
navigateTo('viewing-outfits');
|
navigateTo('viewing-outfits');
|
||||||
}
|
}
|
||||||
|
|
||||||
function showNewOutfitForm() {
|
function showNewOutfitForm() {
|
||||||
new_outfit_name_el.val('');
|
new_outfit_name_el.val('');
|
||||||
new_outfit_form_el.removeClass('starred').stopLoading();
|
new_outfit_form_el.removeClass('starred').stopLoading();
|
||||||
save_outfit_wrapper_el.addClass('saving-outfit');
|
save_outfit_wrapper_el.addClass('saving-outfit');
|
||||||
new_outfit_name_el.focus();
|
new_outfit_name_el.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideNewOutfitForm() {
|
function hideNewOutfitForm() {
|
||||||
save_outfit_wrapper_el.removeClass('saving-outfit');
|
save_outfit_wrapper_el.removeClass('saving-outfit');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#preview-sidebar-nav-outfits').click(navLinkTo(showOutfits));
|
$('#preview-sidebar-nav-outfits').click(navLinkTo(showOutfits));
|
||||||
|
|
||||||
$('#preview-sidebar-nav-closet').click(navLinkTo(showCloset));
|
$('#preview-sidebar-nav-closet').click(navLinkTo(showCloset));
|
||||||
|
|
||||||
$('#save-outfit, #save-outfit-copy').click(showNewOutfitForm);
|
$('#save-outfit, #save-outfit-copy').click(showNewOutfitForm);
|
||||||
|
|
||||||
$('#save-outfit-cancel').click(hideNewOutfitForm);
|
$('#save-outfit-cancel').click(hideNewOutfitForm);
|
||||||
|
|
||||||
$('#save-outfit-not-signed-in').click(function () {
|
$('#save-outfit-not-signed-in').click(function () {
|
||||||
window.location.replace($('#userbar a').attr('href'));
|
window.location.replace($('#userbar a').attr('href'));
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Outfits list */
|
/* Outfits list */
|
||||||
|
|
||||||
$('#outfit-template').template('outfitTemplate');
|
$('#outfit-template').template('outfitTemplate');
|
||||||
|
|
||||||
wardrobe.user.bind('outfitsLoaded', function (outfits) {
|
wardrobe.user.bind('outfitsLoaded', function (outfits) {
|
||||||
var outfit_els = $.tmpl('outfitTemplate', outfits);
|
var outfit_els = $.tmpl('outfitTemplate', outfits);
|
||||||
outfits_list_el.html('').append(outfit_els).addClass('loaded');
|
outfits_list_el.html('').append(outfit_els).addClass('loaded');
|
||||||
updateActiveOutfit();
|
updateActiveOutfit();
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.user.bind('addOutfit', function (outfit, i) {
|
wardrobe.user.bind('addOutfit', function (outfit, i) {
|
||||||
var next_child = outfits_list_el.children().not('.hiding').eq(i),
|
var next_child = outfits_list_el.children().not('.hiding').eq(i),
|
||||||
outfit_el = $.tmpl('outfitTemplate', outfit);
|
outfit_el = $.tmpl('outfitTemplate', outfit);
|
||||||
|
@ -539,23 +540,23 @@ View.Outfits = function (wardrobe) {
|
||||||
updateActiveOutfit();
|
updateActiveOutfit();
|
||||||
outfit_el.hide().show('normal');
|
outfit_el.hide().show('normal');
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.user.bind('removeOutfit', function (outfit, i) {
|
wardrobe.user.bind('removeOutfit', function (outfit, i) {
|
||||||
var outfit_el = outfits_list_el.children().not('.hiding').eq(i);
|
var outfit_el = outfits_list_el.children().not('.hiding').eq(i);
|
||||||
outfit_el.addClass('hiding').stop(true).hide('normal', function () { outfit_el.remove() });
|
outfit_el.addClass('hiding').stop(true).hide('normal', function () { outfit_el.remove() });
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#preview-outfits h4').live('click', function () {
|
$('#preview-outfits h4').live('click', function () {
|
||||||
wardrobe.outfit.load($(this).tmplItem().data.id);
|
wardrobe.outfit.load($(this).tmplItem().data.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('a.outfit-rename-button').live('click', function (e) {
|
$('a.outfit-rename-button').live('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var li = $(this).closest('li').addClass('renaming'),
|
var li = $(this).closest('li').addClass('renaming'),
|
||||||
name = li.find('h4').text();
|
name = li.find('h4').text();
|
||||||
li.find('input.outfit-rename-field').val(name).focus();
|
li.find('input.outfit-rename-field').val(name).focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
function submitRename() {
|
function submitRename() {
|
||||||
var el = $(this), outfit = el.tmplItem().data, new_name = el.val(),
|
var el = $(this), outfit = el.tmplItem().data, new_name = el.val(),
|
||||||
li = el.closest('li').removeClass('renaming');
|
li = el.closest('li').removeClass('renaming');
|
||||||
|
@ -564,26 +565,26 @@ View.Outfits = function (wardrobe) {
|
||||||
wardrobe.user.renameOutfit(outfit, new_name);
|
wardrobe.user.renameOutfit(outfit, new_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('input.outfit-rename-field').live('blur', submitRename);
|
$('input.outfit-rename-field').live('blur', submitRename);
|
||||||
|
|
||||||
$('form.outfit-rename-form').live('submit', function (e) {
|
$('form.outfit-rename-form').live('submit', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var input = $(this).find('input');
|
var input = $(this).find('input');
|
||||||
submitRename.apply(input);
|
submitRename.apply(input);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('input.outfit-url').live('mouseover', function () {
|
$('input.outfit-url').live('mouseover', function () {
|
||||||
this.focus();
|
this.focus();
|
||||||
}).live('mouseout', function () {
|
}).live('mouseout', function () {
|
||||||
this.blur();
|
this.blur();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('button.outfit-delete').live('click', function (e) {
|
$('button.outfit-delete').live('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).closest('li').addClass('confirming-deletion');
|
$(this).closest('li').addClass('confirming-deletion');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('a.outfit-delete-confirmation-yes').live('click', function (e) {
|
$('a.outfit-delete-confirmation-yes').live('click', function (e) {
|
||||||
var outfit = $(this).tmplItem().data;
|
var outfit = $(this).tmplItem().data;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -592,108 +593,116 @@ View.Outfits = function (wardrobe) {
|
||||||
wardrobe.outfit.setId(null);
|
wardrobe.outfit.setId(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('a.outfit-delete-confirmation-no').live('click', function (e) {
|
$('a.outfit-delete-confirmation-no').live('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).closest('li').removeClass('confirming-deletion');
|
$(this).closest('li').removeClass('confirming-deletion');
|
||||||
});
|
});
|
||||||
|
|
||||||
stars.live('click', function () {
|
stars.live('click', function () {
|
||||||
var el = $(this);
|
var el = $(this);
|
||||||
el.closest('li').startLoading();
|
el.closest('li').startLoading();
|
||||||
wardrobe.user.toggleOutfitStar(el.tmplItem().data);
|
wardrobe.user.toggleOutfitStar(el.tmplItem().data);
|
||||||
});
|
});
|
||||||
|
|
||||||
function setOutfitPermalink(outfit) {
|
function setOutfitPermalink(outfit, outfit_permalink_el, outfit_url_el) {
|
||||||
var url = document.location.protocol + "//" + document.location.host;
|
var url = document.location.protocol + "//" + document.location.host;
|
||||||
if(document.location.port) url += ":" + document.location.port;
|
if(document.location.port) url += ":" + document.location.port;
|
||||||
url += "/outfits/" + outfit.id;
|
url += "/outfits/" + outfit.id;
|
||||||
current_outfit_permalink_el.attr('href', url);
|
outfit_permalink_el.attr('href', url);
|
||||||
current_outfit_url_el.val(url);
|
if(outfit_url_el) outfit_url_el.val(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setCurrentOutfitPermalink(outfit) {
|
||||||
|
setOutfitPermalink(outfit, current_outfit_permalink_el);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setSharedOutfitPermalink(outfit) {
|
||||||
|
setOutfitPermalink(outfit, shared_outfit_permalink_el, shared_outfit_url_el);
|
||||||
|
}
|
||||||
|
|
||||||
function setActiveOutfit(outfit) {
|
function setActiveOutfit(outfit) {
|
||||||
outfits_list_el.find('li.active').removeClass('active');
|
outfits_list_el.find('li.active').removeClass('active');
|
||||||
if(outfit.id) {
|
if(outfit.id) {
|
||||||
setOutfitPermalink(outfit);
|
setCurrentOutfitPermalink(outfit);
|
||||||
liForOutfit(outfit).addClass('active');
|
liForOutfit(outfit).addClass('active');
|
||||||
save_current_outfit_name_el.text(outfit.name);
|
save_current_outfit_name_el.text(outfit.name);
|
||||||
}
|
}
|
||||||
save_outfit_wrapper_el.toggleClass('active-outfit', outfit.id ? true : false);
|
save_outfit_wrapper_el.toggleClass('active-outfit', outfit.id ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateActiveOutfit() {
|
function updateActiveOutfit() {
|
||||||
setActiveOutfit(wardrobe.outfit.getOutfit());
|
setActiveOutfit(wardrobe.outfit.getOutfit());
|
||||||
}
|
}
|
||||||
|
|
||||||
wardrobe.outfit.bind('setOutfit', setActiveOutfit);
|
wardrobe.outfit.bind('setOutfit', setActiveOutfit);
|
||||||
wardrobe.outfit.bind('outfitNotFound', setActiveOutfit);
|
wardrobe.outfit.bind('outfitNotFound', setActiveOutfit);
|
||||||
|
|
||||||
wardrobe.user.bind('outfitRenamed', function (outfit) {
|
wardrobe.user.bind('outfitRenamed', function (outfit) {
|
||||||
if(outfit.id == wardrobe.outfit.getId()) {
|
if(outfit.id == wardrobe.outfit.getId()) {
|
||||||
save_current_outfit_name_el.text(outfit.name);
|
save_current_outfit_name_el.text(outfit.name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Saving */
|
/* Saving */
|
||||||
|
|
||||||
save_current_outfit_el.click(function () {
|
save_current_outfit_el.click(function () {
|
||||||
wardrobe.outfit.update();
|
wardrobe.outfit.update();
|
||||||
});
|
});
|
||||||
|
|
||||||
new_outfit_form_el.submit(function (e) {
|
new_outfit_form_el.submit(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
new_outfit_form_el.startLoading();
|
new_outfit_form_el.startLoading();
|
||||||
wardrobe.outfit.create({starred: new_outfit_form_el.hasClass('starred'), name: new_outfit_name_el.val()});
|
wardrobe.outfit.create({starred: new_outfit_form_el.hasClass('starred'), name: new_outfit_name_el.val()});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#share-outfit').click(function () {
|
$('#share-outfit').click(function () {
|
||||||
save_outfit_wrapper_el.startLoading();
|
save_outfit_wrapper_el.startLoading();
|
||||||
wardrobe.outfit.share();
|
wardrobe.outfit.share();
|
||||||
});
|
});
|
||||||
|
|
||||||
new_outfit_form_el.find('div.outfit-star').click(function () {
|
new_outfit_form_el.find('div.outfit-star').click(function () {
|
||||||
new_outfit_form_el.toggleClass('starred');
|
new_outfit_form_el.toggleClass('starred');
|
||||||
});
|
});
|
||||||
|
|
||||||
var SAVE_ERRORS = {
|
var SAVE_ERRORS = {
|
||||||
'item_outfit_relationships': "Item not found. How odd. Pull some items out of your closet and try again.",
|
'item_outfit_relationships': "Item not found. How odd. Pull some items out of your closet and try again.",
|
||||||
'pet_state': "Pet state not found. How odd. Try picking a new Gender/Emotion.",
|
'pet_state': "Pet state not found. How odd. Try picking a new Gender/Emotion.",
|
||||||
'name': true,
|
'name': true,
|
||||||
'user': "You must be logged in to save outfits"
|
'user': "You must be logged in to save outfits"
|
||||||
};
|
};
|
||||||
|
|
||||||
function saveErrorMessage(text) {
|
function saveErrorMessage(text) {
|
||||||
save_error_el.text(text).notify();
|
save_error_el.text(text).notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
wardrobe.outfit.bind('saveSuccess', function (outfit) {
|
wardrobe.outfit.bind('saveSuccess', function (outfit) {
|
||||||
save_success_el.notify();
|
save_success_el.notify();
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.outfit.bind('createSuccess', function (outfit) {
|
wardrobe.outfit.bind('createSuccess', function (outfit) {
|
||||||
wardrobe.user.addOutfit(outfit);
|
wardrobe.user.addOutfit(outfit);
|
||||||
showOutfits();
|
showOutfits();
|
||||||
hideNewOutfitForm();
|
hideNewOutfitForm();
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.outfit.bind('updateSuccess', function (outfit) {
|
wardrobe.outfit.bind('updateSuccess', function (outfit) {
|
||||||
wardrobe.user.updateOutfit(outfit);
|
wardrobe.user.updateOutfit(outfit);
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.outfit.bind('shareSuccess', function (outfit) {
|
wardrobe.outfit.bind('shareSuccess', function (outfit) {
|
||||||
save_outfit_wrapper_el.stopLoading().addClass('shared-outfit');
|
save_outfit_wrapper_el.stopLoading().addClass('shared-outfit');
|
||||||
setOutfitPermalink(outfit);
|
setSharedOutfitPermalink(outfit);
|
||||||
});
|
});
|
||||||
|
|
||||||
function clearSharedOutfit() {
|
function clearSharedOutfit() {
|
||||||
save_outfit_wrapper_el.removeClass('shared-outfit');
|
save_outfit_wrapper_el.removeClass('shared-outfit');
|
||||||
}
|
}
|
||||||
|
|
||||||
wardrobe.outfit.bind('updateClosetItems', clearSharedOutfit);
|
wardrobe.outfit.bind('updateClosetItems', clearSharedOutfit);
|
||||||
wardrobe.outfit.bind('updateWornItems', clearSharedOutfit);
|
wardrobe.outfit.bind('updateWornItems', clearSharedOutfit);
|
||||||
wardrobe.outfit.bind('updatePetState', clearSharedOutfit);
|
wardrobe.outfit.bind('updatePetState', clearSharedOutfit);
|
||||||
|
|
||||||
function saveFailure(outfit, response) {
|
function saveFailure(outfit, response) {
|
||||||
var errors = response.errors;
|
var errors = response.errors;
|
||||||
if(typeof errors == 'undefined') {
|
if(typeof errors == 'undefined') {
|
||||||
|
@ -714,16 +723,16 @@ View.Outfits = function (wardrobe) {
|
||||||
new_outfit_form_el.stopLoading();
|
new_outfit_form_el.stopLoading();
|
||||||
liForOutfit(outfit).stopLoading();
|
liForOutfit(outfit).stopLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
wardrobe.outfit.bind('saveFailure', saveFailure);
|
wardrobe.outfit.bind('saveFailure', saveFailure);
|
||||||
wardrobe.user.bind('saveFailure', saveFailure)
|
wardrobe.user.bind('saveFailure', saveFailure)
|
||||||
wardrobe.outfit.bind('shareFailure', function (outfit, response) {
|
wardrobe.outfit.bind('shareFailure', function (outfit, response) {
|
||||||
save_outfit_wrapper_el.stopLoading();
|
save_outfit_wrapper_el.stopLoading();
|
||||||
saveFailure(outfit, response);
|
saveFailure(outfit, response);
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Error */
|
/* Error */
|
||||||
|
|
||||||
wardrobe.outfit.bind('outfitNotFound', function () {
|
wardrobe.outfit.bind('outfitNotFound', function () {
|
||||||
outfit_not_found_el.notify();
|
outfit_not_found_el.notify();
|
||||||
});
|
});
|
||||||
|
@ -738,14 +747,14 @@ View.PetStateForm = function (wardrobe) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
wardrobe.outfit.setPetStateById(+$(this).data('value'));
|
wardrobe.outfit.setPetStateById(+$(this).data('value'));
|
||||||
});
|
});
|
||||||
|
|
||||||
function updatePetState(pet_state) {
|
function updatePetState(pet_state) {
|
||||||
if(pet_state) {
|
if(pet_state) {
|
||||||
ul.children('li.selected').removeClass('selected');
|
ul.children('li.selected').removeClass('selected');
|
||||||
$(button_query + '[data-value=' + pet_state.id + ']').parent().addClass('selected');
|
$(button_query + '[data-value=' + pet_state.id + ']').parent().addClass('selected');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wardrobe.outfit.bind('petTypeLoaded', function (pet_type) {
|
wardrobe.outfit.bind('petTypeLoaded', function (pet_type) {
|
||||||
var ids = pet_type.pet_state_ids, i, id, li, button, label;
|
var ids = pet_type.pet_state_ids, i, id, li, button, label;
|
||||||
ul.children().remove();
|
ul.children().remove();
|
||||||
|
@ -767,7 +776,7 @@ View.PetStateForm = function (wardrobe) {
|
||||||
updatePetState(wardrobe.outfit.getPetState());
|
updatePetState(wardrobe.outfit.getPetState());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.outfit.bind('updatePetState', updatePetState);
|
wardrobe.outfit.bind('updatePetState', updatePetState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -781,11 +790,11 @@ View.PetTypeForm = function (wardrobe) {
|
||||||
}).children('select').each(function () {
|
}).children('select').each(function () {
|
||||||
dropdowns[this.name] = $(this);
|
dropdowns[this.name] = $(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.initialize = function () {
|
this.initialize = function () {
|
||||||
wardrobe.pet_attributes.load();
|
wardrobe.pet_attributes.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePetType(pet_type) {
|
function updatePetType(pet_type) {
|
||||||
if(loaded && pet_type) {
|
if(loaded && pet_type) {
|
||||||
$.each(dropdowns, function (name) {
|
$.each(dropdowns, function (name) {
|
||||||
|
@ -793,7 +802,7 @@ View.PetTypeForm = function (wardrobe) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wardrobe.pet_attributes.bind('update', function (attributes) {
|
wardrobe.pet_attributes.bind('update', function (attributes) {
|
||||||
$.each(attributes, function (type) {
|
$.each(attributes, function (type) {
|
||||||
var dropdown = dropdowns[type];
|
var dropdown = dropdowns[type];
|
||||||
|
@ -808,9 +817,9 @@ View.PetTypeForm = function (wardrobe) {
|
||||||
loaded = true;
|
loaded = true;
|
||||||
updatePetType(wardrobe.outfit.getPetType());
|
updatePetType(wardrobe.outfit.getPetType());
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.outfit.bind('updatePetType', updatePetType);
|
wardrobe.outfit.bind('updatePetType', updatePetType);
|
||||||
|
|
||||||
wardrobe.outfit.bind('petTypeNotFound', function () {
|
wardrobe.outfit.bind('petTypeNotFound', function () {
|
||||||
$('#pet-type-not-found').show('normal').delay(3000).hide('fast');
|
$('#pet-type-not-found').show('normal').delay(3000).hide('fast');
|
||||||
});
|
});
|
||||||
|
@ -837,21 +846,21 @@ View.Search = function (wardrobe) {
|
||||||
EL_ID: '#preview-search-form-pagination',
|
EL_ID: '#preview-search-form-pagination',
|
||||||
PER_PAGE: 21
|
PER_PAGE: 21
|
||||||
}, object_width = 112, last_request;
|
}, object_width = 112, last_request;
|
||||||
|
|
||||||
PAGINATION.EL = $(PAGINATION.EL_ID);
|
PAGINATION.EL = $(PAGINATION.EL_ID);
|
||||||
PAGINATION.GAP_EL = $('<span/>', {'class': 'gap', html: PAGINATION.GAP_TEXT})
|
PAGINATION.GAP_EL = $('<span/>', {'class': 'gap', html: PAGINATION.GAP_TEXT})
|
||||||
PAGINATION.PREV_EL = $('<a/>', {href: '#', rel: 'prev', html: PAGINATION.PREV_TEXT});
|
PAGINATION.PREV_EL = $('<a/>', {href: '#', rel: 'prev', html: PAGINATION.PREV_TEXT});
|
||||||
PAGINATION.NEXT_EL = $('<a/>', {href: '#', rel: 'next', html: PAGINATION.NEXT_TEXT});
|
PAGINATION.NEXT_EL = $('<a/>', {href: '#', rel: 'next', html: PAGINATION.NEXT_TEXT});
|
||||||
|
|
||||||
$(PAGINATION.EL_ID + ' a').live('click', function (e) {
|
$(PAGINATION.EL_ID + ' a').live('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
loadPage($(this).data('page'));
|
loadPage($(this).data('page'));
|
||||||
});
|
});
|
||||||
|
|
||||||
this.initialize = $.proxy(wardrobe.item_zone_sets, 'load');
|
this.initialize = $.proxy(wardrobe.item_zone_sets, 'load');
|
||||||
|
|
||||||
wardrobe.search.setPerPage(PAGINATION.PER_PAGE);
|
wardrobe.search.setPerPage(PAGINATION.PER_PAGE);
|
||||||
|
|
||||||
function updatePerPage() {
|
function updatePerPage() {
|
||||||
var new_per_page = Math.floor(form.width() / object_width),
|
var new_per_page = Math.floor(form.width() / object_width),
|
||||||
offset, new_page;
|
offset, new_page;
|
||||||
|
@ -866,34 +875,34 @@ View.Search = function (wardrobe) {
|
||||||
}
|
}
|
||||||
$(window).resize(updatePerPage).load(updatePerPage);
|
$(window).resize(updatePerPage).load(updatePerPage);
|
||||||
updatePerPage();
|
updatePerPage();
|
||||||
|
|
||||||
function loadOffset(offset) {
|
function loadOffset(offset) {
|
||||||
wardrobe.search.setItemsByQuery(input_el.val(), {offset: offset});
|
wardrobe.search.setItemsByQuery(input_el.val(), {offset: offset});
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadPage(page) {
|
function loadPage(page) {
|
||||||
wardrobe.search.setItemsByQuery(input_el.val(), {page: page});
|
wardrobe.search.setItemsByQuery(input_el.val(), {page: page});
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopLoading() {
|
function stopLoading() {
|
||||||
loading_el.stop(true, true).hide();
|
loading_el.stop(true, true).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
form.submit(function (e) {
|
form.submit(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
loadPage(1);
|
loadPage(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
clear_el.click(function (e) {
|
clear_el.click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
input_el.val('');
|
input_el.val('');
|
||||||
form.submit();
|
form.submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.search.bind('startRequest', function () {
|
wardrobe.search.bind('startRequest', function () {
|
||||||
loading_el.delay(1000).show('slow');
|
loading_el.delay(1000).show('slow');
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.search.bind('updateItems', function (items) {
|
wardrobe.search.bind('updateItems', function (items) {
|
||||||
var fit = $('#preview').data('fit') || $.noop;
|
var fit = $('#preview').data('fit') || $.noop;
|
||||||
stopLoading();
|
stopLoading();
|
||||||
|
@ -908,7 +917,7 @@ View.Search = function (wardrobe) {
|
||||||
form.toggleClass('has-results', items.length > 0);
|
form.toggleClass('has-results', items.length > 0);
|
||||||
fit();
|
fit();
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.search.bind('updateRequest', function (request) {
|
wardrobe.search.bind('updateRequest', function (request) {
|
||||||
last_request = request;
|
last_request = request;
|
||||||
error_el.hide('fast');
|
error_el.hide('fast');
|
||||||
|
@ -918,37 +927,37 @@ View.Search = function (wardrobe) {
|
||||||
no_results_span.text(request.query);
|
no_results_span.text(request.query);
|
||||||
clear_el.toggle(!!request.query);
|
clear_el.toggle(!!request.query);
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.search.bind('updatePagination', function (current_page, total_pages) {
|
wardrobe.search.bind('updatePagination', function (current_page, total_pages) {
|
||||||
// ported from http://github.com/mislav/will_paginate/blob/master/lib/will_paginate/view_helpers.rb#L274
|
// ported from http://github.com/mislav/will_paginate/blob/master/lib/will_paginate/view_helpers.rb#L274
|
||||||
var window_from = current_page - PAGINATION.INNER_WINDOW,
|
var window_from = current_page - PAGINATION.INNER_WINDOW,
|
||||||
window_to = current_page + PAGINATION.INNER_WINDOW,
|
window_to = current_page + PAGINATION.INNER_WINDOW,
|
||||||
visible = [], left_gap, right_gap, subtract_left, subtract_right,
|
visible = [], left_gap, right_gap, subtract_left, subtract_right,
|
||||||
i = 1;
|
i = 1;
|
||||||
|
|
||||||
if(window_to > total_pages) {
|
if(window_to > total_pages) {
|
||||||
window_from -= window_to - total_pages;
|
window_from -= window_to - total_pages;
|
||||||
window_to = total_pages;
|
window_to = total_pages;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(window_from < 1) {
|
if(window_from < 1) {
|
||||||
window_to += 1 - window_from;
|
window_to += 1 - window_from;
|
||||||
window_from = 1;
|
window_from = 1;
|
||||||
if(window_to > total_pages) window_to = total_pages;
|
if(window_to > total_pages) window_to = total_pages;
|
||||||
}
|
}
|
||||||
|
|
||||||
left_gap = [2 + PAGINATION.OUTER_WINDOW, window_from];
|
left_gap = [2 + PAGINATION.OUTER_WINDOW, window_from];
|
||||||
right_gap = [window_to + 1, total_pages - PAGINATION.OUTER_WINDOW];
|
right_gap = [window_to + 1, total_pages - PAGINATION.OUTER_WINDOW];
|
||||||
|
|
||||||
subtract_left = (left_gap[1] - left_gap[0]) > 1;
|
subtract_left = (left_gap[1] - left_gap[0]) > 1;
|
||||||
subtract_right = (right_gap[1] - right_gap[0]) > 1;
|
subtract_right = (right_gap[1] - right_gap[0]) > 1;
|
||||||
|
|
||||||
PAGINATION.EL.children().remove();
|
PAGINATION.EL.children().remove();
|
||||||
|
|
||||||
if(current_page > 1) {
|
if(current_page > 1) {
|
||||||
PAGINATION.PREV_EL.clone().data('page', current_page - 1).appendTo(PAGINATION.EL);
|
PAGINATION.PREV_EL.clone().data('page', current_page - 1).appendTo(PAGINATION.EL);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(i <= total_pages) {
|
while(i <= total_pages) {
|
||||||
if(subtract_left && i >= left_gap[0] && i < left_gap[1]) {
|
if(subtract_left && i >= left_gap[0] && i < left_gap[1]) {
|
||||||
PAGINATION.GAP_EL.clone().appendTo(PAGINATION.EL);
|
PAGINATION.GAP_EL.clone().appendTo(PAGINATION.EL);
|
||||||
|
@ -965,17 +974,17 @@ View.Search = function (wardrobe) {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(current_page < total_pages) {
|
if(current_page < total_pages) {
|
||||||
PAGINATION.NEXT_EL.clone().data('page', current_page + 1).appendTo(PAGINATION.EL);
|
PAGINATION.NEXT_EL.clone().data('page', current_page + 1).appendTo(PAGINATION.EL);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
wardrobe.search.bind('error', function (error) {
|
wardrobe.search.bind('error', function (error) {
|
||||||
stopLoading();
|
stopLoading();
|
||||||
error_el.text(error).show('normal');
|
error_el.text(error).show('normal');
|
||||||
});
|
});
|
||||||
|
|
||||||
help_el.find('dt').each(function () {
|
help_el.find('dt').each(function () {
|
||||||
var el = $(this);
|
var el = $(this);
|
||||||
if(!el.children().length) {
|
if(!el.children().length) {
|
||||||
|
@ -985,7 +994,7 @@ View.Search = function (wardrobe) {
|
||||||
var el = $(this);
|
var el = $(this);
|
||||||
el.replaceWith($('<a/>', {href: '#', text: el.text()}));
|
el.replaceWith($('<a/>', {href: '#', text: el.text()}));
|
||||||
});
|
});
|
||||||
|
|
||||||
help_el.find('dt a').live('click', function (e) {
|
help_el.find('dt a').live('click', function (e) {
|
||||||
var el = $(this), siblings = el.parent().children(), query;
|
var el = $(this), siblings = el.parent().children(), query;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -1000,12 +1009,12 @@ View.Search = function (wardrobe) {
|
||||||
input_el.val(query);
|
input_el.val(query);
|
||||||
form.submit();
|
form.submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('select.search-helper').live('change', function () {
|
$('select.search-helper').live('change', function () {
|
||||||
var el = $(this), filter = el.attr('data-search-filter');
|
var el = $(this), filter = el.attr('data-search-filter');
|
||||||
$('select.search-helper[data-search-filter=' + filter + ']').val(el.val());
|
$('select.search-helper[data-search-filter=' + filter + ']').val(el.val());
|
||||||
});
|
});
|
||||||
|
|
||||||
function prepBuildHelper(type, getSet) {
|
function prepBuildHelper(type, getSet) {
|
||||||
return function (objs) {
|
return function (objs) {
|
||||||
var select = $('<select/>',
|
var select = $('<select/>',
|
||||||
|
@ -1020,13 +1029,13 @@ View.Search = function (wardrobe) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSpecies(x) { return x.species }
|
function getSpecies(x) { return x.species }
|
||||||
|
|
||||||
wardrobe.item_zone_sets.bind('update', prepBuildHelper('type', function (x) {
|
wardrobe.item_zone_sets.bind('update', prepBuildHelper('type', function (x) {
|
||||||
return x;
|
return x;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
wardrobe.pet_attributes.bind('update', prepBuildHelper('species', getSpecies));
|
wardrobe.pet_attributes.bind('update', prepBuildHelper('species', getSpecies));
|
||||||
//wardrobe.pet_attributes.bind('update', prepBuildHelper('only', getSpecies));
|
//wardrobe.pet_attributes.bind('update', prepBuildHelper('only', getSpecies));
|
||||||
}
|
}
|
||||||
|
@ -1059,3 +1068,4 @@ $.ajaxSetup({
|
||||||
main_wardrobe = new Wardrobe();
|
main_wardrobe = new Wardrobe();
|
||||||
main_wardrobe.registerViews(View);
|
main_wardrobe.registerViews(View);
|
||||||
main_wardrobe.initialize();
|
main_wardrobe.initialize();
|
||||||
|
|
||||||
|
|
|
@ -61,13 +61,13 @@ DeepObject.prototype.deepSet = function () {
|
||||||
|
|
||||||
function Wardrobe() {
|
function Wardrobe() {
|
||||||
var wardrobe = this, BiologyAsset, ItemAsset;
|
var wardrobe = this, BiologyAsset, ItemAsset;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Models
|
* Models
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function determineRestrictedZones() {
|
function determineRestrictedZones() {
|
||||||
var i, zone;
|
var i, zone;
|
||||||
this.restricted_zones = [];
|
this.restricted_zones = [];
|
||||||
|
@ -75,7 +75,7 @@ function Wardrobe() {
|
||||||
this.restricted_zones.push(zone);
|
this.restricted_zones.push(zone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Asset(data) {
|
function Asset(data) {
|
||||||
var asset = this;
|
var asset = this;
|
||||||
for(var key in data) {
|
for(var key in data) {
|
||||||
|
@ -84,37 +84,37 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function BiologyAsset(data) {
|
function BiologyAsset(data) {
|
||||||
Asset.apply(this, [data]);
|
Asset.apply(this, [data]);
|
||||||
determineRestrictedZones.apply(this);
|
determineRestrictedZones.apply(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ItemAsset(data) {
|
function ItemAsset(data) {
|
||||||
Asset.apply(this, [data]);
|
Asset.apply(this, [data]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Item(id) {
|
function Item(id) {
|
||||||
var item = this;
|
var item = this;
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.assets_by_body_id = {};
|
this.assets_by_body_id = {};
|
||||||
this.load_started = false;
|
this.load_started = false;
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
|
|
||||||
this.getAssetsFitting = function (pet_type) {
|
this.getAssetsFitting = function (pet_type) {
|
||||||
return this.assets_by_body_id[pet_type.body_id] || [];
|
return this.assets_by_body_id[pet_type.body_id] || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hasAssetsFitting = function (pet_type) {
|
this.hasAssetsFitting = function (pet_type) {
|
||||||
return typeof item.assets_by_body_id[pet_type.body_id] != 'undefined' &&
|
return typeof item.assets_by_body_id[pet_type.body_id] != 'undefined' &&
|
||||||
item.assets_by_body_id[pet_type.body_id].length > 0;
|
item.assets_by_body_id[pet_type.body_id].length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.couldNotLoadAssetsFitting = function (pet_type) {
|
this.couldNotLoadAssetsFitting = function (pet_type) {
|
||||||
return typeof item.assets_by_body_id[pet_type.body_id] != 'undefined' &&
|
return typeof item.assets_by_body_id[pet_type.body_id] != 'undefined' &&
|
||||||
item.assets_by_body_id[pet_type.body_id].length == 0;
|
item.assets_by_body_id[pet_type.body_id].length == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.update = function (data) {
|
this.update = function (data) {
|
||||||
for(var key in data) {
|
for(var key in data) {
|
||||||
if(data.hasOwnProperty(key) && key != 'id') { // do not replace ID with string
|
if(data.hasOwnProperty(key) && key != 'id') { // do not replace ID with string
|
||||||
|
@ -124,10 +124,10 @@ function Wardrobe() {
|
||||||
determineRestrictedZones.apply(this);
|
determineRestrictedZones.apply(this);
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Item.cache[id] = this;
|
Item.cache[id] = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Item.find = function (id) {
|
Item.find = function (id) {
|
||||||
var item = Item.cache[id];
|
var item = Item.cache[id];
|
||||||
if(!item) {
|
if(!item) {
|
||||||
|
@ -135,9 +135,9 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
var item_load_callbacks = [];
|
var item_load_callbacks = [];
|
||||||
|
|
||||||
Item.loadByIds = function (ids, success) {
|
Item.loadByIds = function (ids, success) {
|
||||||
var ids_to_load = [], ids_not_loaded = [], items = $.map(ids, function (id) {
|
var ids_to_load = [], ids_not_loaded = [], items = $.map(ids, function (id) {
|
||||||
var item = Item.find(id);
|
var item = Item.find(id);
|
||||||
|
@ -180,9 +180,9 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
Item.PER_PAGE = 21;
|
Item.PER_PAGE = 21;
|
||||||
|
|
||||||
Item.loadByQuery = function (query, offset, success, error) {
|
Item.loadByQuery = function (query, offset, success, error) {
|
||||||
var page = Math.round(offset / Item.PER_PAGE) + 1;
|
var page = Math.round(offset / Item.PER_PAGE) + 1;
|
||||||
$.getJSON('/items.json', {q: query, per_page: Item.PER_PAGE, page: page}, function (data) {
|
$.getJSON('/items.json', {q: query, per_page: Item.PER_PAGE, page: page}, function (data) {
|
||||||
|
@ -200,13 +200,13 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Item.cache = {};
|
Item.cache = {};
|
||||||
|
|
||||||
function ItemZoneSet(name) {
|
function ItemZoneSet(name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemZoneSet.loadAll = function (success) {
|
ItemZoneSet.loadAll = function (success) {
|
||||||
$.getJSON('/item_zone_sets.json', function (data) {
|
$.getJSON('/item_zone_sets.json', function (data) {
|
||||||
for(var i = 0, l = data.length; i < l; i++) {
|
for(var i = 0, l = data.length; i < l; i++) {
|
||||||
|
@ -215,19 +215,19 @@ function Wardrobe() {
|
||||||
success(ItemZoneSet.all);
|
success(ItemZoneSet.all);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemZoneSet.all = [];
|
ItemZoneSet.all = [];
|
||||||
|
|
||||||
function Outfit(data) {
|
function Outfit(data) {
|
||||||
var outfit = this, previous_pet_type, worn_item_ids = [],
|
var outfit = this, previous_pet_type, worn_item_ids = [],
|
||||||
closet_item_ids = [], new_record = true;
|
closet_item_ids = [], new_record = true;
|
||||||
|
|
||||||
this.setWornAndUnwornItemIds = function (new_ids) {
|
this.setWornAndUnwornItemIds = function (new_ids) {
|
||||||
this.worn_and_unworn_item_ids = new_ids;
|
this.worn_and_unworn_item_ids = new_ids;
|
||||||
worn_item_ids = new_ids.worn;
|
worn_item_ids = new_ids.worn;
|
||||||
closet_item_ids = new_ids.unworn.concat(new_ids.worn);
|
closet_item_ids = new_ids.unworn.concat(new_ids.worn);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(typeof data != 'undefined') {
|
if(typeof data != 'undefined') {
|
||||||
this.color_id = data.color_id;
|
this.color_id = data.color_id;
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
|
@ -238,27 +238,31 @@ function Wardrobe() {
|
||||||
this.setWornAndUnwornItemIds(data.worn_and_unworn_item_ids);
|
this.setWornAndUnwornItemIds(data.worn_and_unworn_item_ids);
|
||||||
new_record = false;
|
new_record = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.closet_items = [];
|
this.closet_items = [];
|
||||||
this.worn_items = [];
|
this.worn_items = [];
|
||||||
|
|
||||||
|
this.anonymous = false;
|
||||||
|
|
||||||
this.getWornItemIds = function () { // TODO just expose the worn_item_ids
|
this.getWornItemIds = function () { // TODO just expose the worn_item_ids
|
||||||
return worn_item_ids;
|
return worn_item_ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getClosetItemIds = function () { // TODO just expose the closet_item_ids
|
this.getClosetItemIds = function () { // TODO just expose the closet_item_ids
|
||||||
return closet_item_ids;
|
return closet_item_ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAttributes() {
|
function getAttributes() {
|
||||||
var outfit_data = {};
|
var outfit_data = {};
|
||||||
outfit_data.name = outfit.name;
|
outfit_data.name = outfit.name;
|
||||||
outfit_data.starred = outfit.starred;
|
outfit_data.starred = outfit.starred;
|
||||||
outfit_data.worn_and_unworn_item_ids = outfit.getWornAndUnwornItemIds();
|
outfit_data.worn_and_unworn_item_ids = outfit.getWornAndUnwornItemIds();
|
||||||
if(outfit.pet_state) outfit_data.pet_state_id = outfit.pet_state.id;
|
if(outfit.pet_state) outfit_data.pet_state_id = outfit.pet_state.id;
|
||||||
|
outfit_data.anonymous = outfit.anonymous;
|
||||||
|
console.log(outfit.anonymous, outfit_data);
|
||||||
return outfit_data;
|
return outfit_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRestrictedZones() {
|
function getRestrictedZones() {
|
||||||
// note: may contain duplicates - loop through assets, not these, for
|
// note: may contain duplicates - loop through assets, not these, for
|
||||||
// best performance
|
// best performance
|
||||||
|
@ -269,15 +273,15 @@ function Wardrobe() {
|
||||||
});
|
});
|
||||||
return restricted_zones;
|
return restricted_zones;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hasItemInCloset(item) {
|
function hasItemInCloset(item) {
|
||||||
return $.inArray(item, outfit.closet_items) != -1;
|
return $.inArray(item, outfit.closet_items) != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isWearingItem(item) {
|
function isWearingItem(item) {
|
||||||
return $.inArray(item, outfit.worn_items) != -1;
|
return $.inArray(item, outfit.worn_items) != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function itemAssetsOnLoad(added_item, updateItemsCallback, updateItemAssetsCallback) {
|
function itemAssetsOnLoad(added_item, updateItemsCallback, updateItemAssetsCallback) {
|
||||||
var item_zones, item_zones_length, existing_item, existing_item_zones, passed,
|
var item_zones, item_zones_length, existing_item, existing_item_zones, passed,
|
||||||
new_items = [], new_worn_item_ids = [];
|
new_items = [], new_worn_item_ids = [];
|
||||||
|
@ -308,7 +312,7 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
updateItemAssetsCallback();
|
updateItemAssetsCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
function petTypeOnLoad(pet_type, petTypeLoadedCallback, updatePetStateCallback, updateItemsCallback, updateItemAssetsCallback) {
|
function petTypeOnLoad(pet_type, petTypeLoadedCallback, updatePetStateCallback, updateItemsCallback, updateItemAssetsCallback) {
|
||||||
if(!outfit.pet_state || !pet_type.ownsPetState(outfit.pet_state)) {
|
if(!outfit.pet_state || !pet_type.ownsPetState(outfit.pet_state)) {
|
||||||
outfit.setPetStateById(null, updatePetStateCallback);
|
outfit.setPetStateById(null, updatePetStateCallback);
|
||||||
|
@ -316,7 +320,7 @@ function Wardrobe() {
|
||||||
petTypeLoadedCallback(pet_type);
|
petTypeLoadedCallback(pet_type);
|
||||||
updateItemAssets(null, updateItemsCallback, updateItemAssetsCallback);
|
updateItemAssets(null, updateItemsCallback, updateItemAssetsCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateItemAssets(added_item, updateItemsCallback, updateItemAssetsCallback) {
|
function updateItemAssets(added_item, updateItemsCallback, updateItemAssetsCallback) {
|
||||||
if(outfit.pet_type && outfit.pet_type.loaded && worn_item_ids.length) {
|
if(outfit.pet_type && outfit.pet_type.loaded && worn_item_ids.length) {
|
||||||
outfit.pet_type.loadItemAssets(worn_item_ids, function () {
|
outfit.pet_type.loadItemAssets(worn_item_ids, function () {
|
||||||
|
@ -324,7 +328,7 @@ function Wardrobe() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendUpdate(outfit_data, success, failure) {
|
function sendUpdate(outfit_data, success, failure) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/outfits/' + outfit.id,
|
url: '/outfits/' + outfit.id,
|
||||||
|
@ -341,7 +345,7 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.closetItem = function (item, updateClosetItemsCallback) {
|
this.closetItem = function (item, updateClosetItemsCallback) {
|
||||||
if(!hasItemInCloset(item)) {
|
if(!hasItemInCloset(item)) {
|
||||||
this.closet_items.push(item);
|
this.closet_items.push(item);
|
||||||
|
@ -349,14 +353,14 @@ function Wardrobe() {
|
||||||
updateClosetItemsCallback(this.closet_items);
|
updateClosetItemsCallback(this.closet_items);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getPetStateId = function () {
|
this.getPetStateId = function () {
|
||||||
if(typeof outfit.pet_state_id === 'undefined') {
|
if(typeof outfit.pet_state_id === 'undefined') {
|
||||||
outfit.pet_state_id = outfit.pet_state.id;
|
outfit.pet_state_id = outfit.pet_state.id;
|
||||||
}
|
}
|
||||||
return outfit.pet_state_id;
|
return outfit.pet_state_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getVisibleAssets = function () {
|
this.getVisibleAssets = function () {
|
||||||
var assets = this.pet_state.assets, restricted_zones = getRestrictedZones(),
|
var assets = this.pet_state.assets, restricted_zones = getRestrictedZones(),
|
||||||
visible_assets = [];
|
visible_assets = [];
|
||||||
|
@ -370,11 +374,11 @@ function Wardrobe() {
|
||||||
});
|
});
|
||||||
return visible_assets;
|
return visible_assets;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.rename = function (new_name, success, failure) {
|
this.rename = function (new_name, success, failure) {
|
||||||
this.updateAttributes({name: new_name}, success, failure);
|
this.updateAttributes({name: new_name}, success, failure);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setClosetItemsByIds = function (ids, updateItemsCallback) {
|
this.setClosetItemsByIds = function (ids, updateItemsCallback) {
|
||||||
if(ids) closet_item_ids = ids;
|
if(ids) closet_item_ids = ids;
|
||||||
if(ids && ids.length) {
|
if(ids && ids.length) {
|
||||||
|
@ -387,7 +391,7 @@ function Wardrobe() {
|
||||||
updateItemsCallback(this.closet_items);
|
updateItemsCallback(this.closet_items);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setPetStateById = function (id, petStateOnLoad) {
|
this.setPetStateById = function (id, petStateOnLoad) {
|
||||||
if(!id && this.pet_type) {
|
if(!id && this.pet_type) {
|
||||||
id = this.pet_type.pet_state_ids[0];
|
id = this.pet_type.pet_state_ids[0];
|
||||||
|
@ -398,7 +402,7 @@ function Wardrobe() {
|
||||||
this.pet_state.loadAssets(petStateOnLoad);
|
this.pet_state.loadAssets(petStateOnLoad);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setPetTypeByColorAndSpecies = function (color_id, species_id, updatePetTypeCallback, petTypeLoadedCallback, petTypeNotFoundCallback, updatePetStateCallback, updateItemsCallback, updateItemAssetsCallback) {
|
this.setPetTypeByColorAndSpecies = function (color_id, species_id, updatePetTypeCallback, petTypeLoadedCallback, petTypeNotFoundCallback, updatePetStateCallback, updateItemsCallback, updateItemAssetsCallback) {
|
||||||
this.pet_type = PetType.findOrCreateByColorAndSpecies(color_id, species_id);
|
this.pet_type = PetType.findOrCreateByColorAndSpecies(color_id, species_id);
|
||||||
this.color_id = color_id;
|
this.color_id = color_id;
|
||||||
|
@ -406,7 +410,7 @@ function Wardrobe() {
|
||||||
updatePetTypeCallback(this.pet_type);
|
updatePetTypeCallback(this.pet_type);
|
||||||
this.pet_type.load(function (pet_type) { petTypeOnLoad(pet_type, petTypeLoadedCallback, updatePetStateCallback, updateItemsCallback, updateItemAssetsCallback) }, petTypeNotFoundCallback);
|
this.pet_type.load(function (pet_type) { petTypeOnLoad(pet_type, petTypeLoadedCallback, updatePetStateCallback, updateItemsCallback, updateItemAssetsCallback) }, petTypeNotFoundCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setWornItemsByIds = function (ids, updateItemsCallback, updateItemAssetsCallback) {
|
this.setWornItemsByIds = function (ids, updateItemsCallback, updateItemAssetsCallback) {
|
||||||
if(ids) worn_item_ids = ids;
|
if(ids) worn_item_ids = ids;
|
||||||
if(ids && ids.length) {
|
if(ids && ids.length) {
|
||||||
|
@ -417,11 +421,11 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
updateItemAssets(null, updateItemsCallback, updateItemAssetsCallback);
|
updateItemAssets(null, updateItemsCallback, updateItemAssetsCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.toggleStar = function (success) {
|
this.toggleStar = function (success) {
|
||||||
this.updateAttributes({starred: !outfit.starred}, success);
|
this.updateAttributes({starred: !outfit.starred}, success);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.unclosetItem = function (item, updateClosetItemsCallback, updateWornItemsCallback) {
|
this.unclosetItem = function (item, updateClosetItemsCallback, updateWornItemsCallback) {
|
||||||
var i = $.inArray(item, this.closet_items), id_i;
|
var i = $.inArray(item, this.closet_items), id_i;
|
||||||
if(i != -1) {
|
if(i != -1) {
|
||||||
|
@ -432,7 +436,7 @@ function Wardrobe() {
|
||||||
this.unwearItem(item, updateWornItemsCallback);
|
this.unwearItem(item, updateWornItemsCallback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.unwearItem = function (item, updateWornItemsCallback) {
|
this.unwearItem = function (item, updateWornItemsCallback) {
|
||||||
var i = $.inArray(item, this.worn_items), id_i;
|
var i = $.inArray(item, this.worn_items), id_i;
|
||||||
if(i != -1) {
|
if(i != -1) {
|
||||||
|
@ -442,11 +446,11 @@ function Wardrobe() {
|
||||||
updateWornItemsCallback(this.worn_items);
|
updateWornItemsCallback(this.worn_items);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.update = function (success, failure) {
|
this.update = function (success, failure) {
|
||||||
sendUpdate(getAttributes(), success, failure);
|
sendUpdate(getAttributes(), success, failure);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.wearItem = function (item, updateWornItemsCallback, updateClosetItemsCallback, updateItemAssetsCallback) {
|
this.wearItem = function (item, updateWornItemsCallback, updateClosetItemsCallback, updateItemAssetsCallback) {
|
||||||
if(!isWearingItem(item)) {
|
if(!isWearingItem(item)) {
|
||||||
this.worn_items.push(item);
|
this.worn_items.push(item);
|
||||||
|
@ -458,7 +462,7 @@ function Wardrobe() {
|
||||||
updateWornItemsCallback(this.worn_items);
|
updateWornItemsCallback(this.worn_items);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getWornAndUnwornItemIds = function () {
|
this.getWornAndUnwornItemIds = function () {
|
||||||
var unworn_item_ids = [], id;
|
var unworn_item_ids = [], id;
|
||||||
for(var i = 0; i < closet_item_ids.length; i++) {
|
for(var i = 0; i < closet_item_ids.length; i++) {
|
||||||
|
@ -470,7 +474,7 @@ function Wardrobe() {
|
||||||
outfit.worn_and_unworn_item_ids = {worn: worn_item_ids, unworn: unworn_item_ids};
|
outfit.worn_and_unworn_item_ids = {worn: worn_item_ids, unworn: unworn_item_ids};
|
||||||
return outfit.worn_and_unworn_item_ids;
|
return outfit.worn_and_unworn_item_ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clone = function () {
|
this.clone = function () {
|
||||||
var new_outfit = new Outfit;
|
var new_outfit = new Outfit;
|
||||||
new_outfit.cloneAttributesFrom(outfit);
|
new_outfit.cloneAttributesFrom(outfit);
|
||||||
|
@ -479,7 +483,7 @@ function Wardrobe() {
|
||||||
new_outfit.starred = outfit.starred;
|
new_outfit.starred = outfit.starred;
|
||||||
return new_outfit;
|
return new_outfit;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.cloneAttributesFrom = function (base_outfit) {
|
this.cloneAttributesFrom = function (base_outfit) {
|
||||||
var base_ids = base_outfit.getWornAndUnwornItemIds(),
|
var base_ids = base_outfit.getWornAndUnwornItemIds(),
|
||||||
new_ids = {};
|
new_ids = {};
|
||||||
|
@ -494,7 +498,7 @@ function Wardrobe() {
|
||||||
new_ids.unworn = base_ids.unworn.slice(0);
|
new_ids.unworn = base_ids.unworn.slice(0);
|
||||||
outfit.setWornAndUnwornItemIds(new_ids);
|
outfit.setWornAndUnwornItemIds(new_ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.destroy = function (success) {
|
this.destroy = function (success) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/outfits/' + outfit.id + '.json',
|
url: '/outfits/' + outfit.id + '.json',
|
||||||
|
@ -503,7 +507,7 @@ function Wardrobe() {
|
||||||
success: function () { success(outfit) }
|
success: function () { success(outfit) }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.create = function (success, error) {
|
this.create = function (success, error) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/outfits',
|
url: '/outfits',
|
||||||
|
@ -520,7 +524,7 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateAttributes = function (attributes, success, failure) {
|
this.updateAttributes = function (attributes, success, failure) {
|
||||||
var outfit_data = {};
|
var outfit_data = {};
|
||||||
for(var key in attributes) {
|
for(var key in attributes) {
|
||||||
|
@ -531,9 +535,9 @@ function Wardrobe() {
|
||||||
sendUpdate(outfit_data, success, failure);
|
sendUpdate(outfit_data, success, failure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Outfit.cache = {};
|
Outfit.cache = {};
|
||||||
|
|
||||||
Outfit.find = function (id, callback) {
|
Outfit.find = function (id, callback) {
|
||||||
if(typeof Outfit.cache[id] !== 'undefined') {
|
if(typeof Outfit.cache[id] !== 'undefined') {
|
||||||
callback(Outfit.cache[id]);
|
callback(Outfit.cache[id]);
|
||||||
|
@ -551,7 +555,7 @@ function Wardrobe() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Outfit.loadForCurrentUser = function (success) {
|
Outfit.loadForCurrentUser = function (success) {
|
||||||
var outfits = [];
|
var outfits = [];
|
||||||
$.getJSON('/users/current-user/outfits.json', function (data) {
|
$.getJSON('/users/current-user/outfits.json', function (data) {
|
||||||
|
@ -565,21 +569,21 @@ function Wardrobe() {
|
||||||
success(outfits);
|
success(outfits);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function PetAttribute() {}
|
function PetAttribute() {}
|
||||||
|
|
||||||
PetAttribute.loadAll = function (success) {
|
PetAttribute.loadAll = function (success) {
|
||||||
$.getJSON('/pet_attributes.json', function (data) {
|
$.getJSON('/pet_attributes.json', function (data) {
|
||||||
success(data);
|
success(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function PetState(id) {
|
function PetState(id) {
|
||||||
var pet_state = this, loaded = false;
|
var pet_state = this, loaded = false;
|
||||||
|
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.assets = [];
|
this.assets = [];
|
||||||
|
|
||||||
this.loadAssets = function (success) {
|
this.loadAssets = function (success) {
|
||||||
var params;
|
var params;
|
||||||
if(loaded) {
|
if(loaded) {
|
||||||
|
@ -593,10 +597,10 @@ function Wardrobe() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PetState.cache[id] = this;
|
PetState.cache[id] = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
PetState.find = function (id) {
|
PetState.find = function (id) {
|
||||||
var pet_state = PetState.cache[id];
|
var pet_state = PetState.cache[id];
|
||||||
if(!pet_state) {
|
if(!pet_state) {
|
||||||
|
@ -604,12 +608,12 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
return pet_state;
|
return pet_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
PetState.cache = {};
|
PetState.cache = {};
|
||||||
|
|
||||||
function PetType() {
|
function PetType() {
|
||||||
var pet_type = this;
|
var pet_type = this;
|
||||||
|
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
this.pet_states = [];
|
this.pet_states = [];
|
||||||
|
|
||||||
|
@ -642,7 +646,7 @@ function Wardrobe() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loadItemAssets = function (item_ids, success) {
|
this.loadItemAssets = function (item_ids, success) {
|
||||||
var item_ids_needed = [];
|
var item_ids_needed = [];
|
||||||
for(var i = 0; i < item_ids.length; i++) {
|
for(var i = 0; i < item_ids.length; i++) {
|
||||||
|
@ -674,12 +678,12 @@ function Wardrobe() {
|
||||||
success();
|
success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.toString = function () {
|
this.toString = function () {
|
||||||
return 'PetType{color_id: ' + this.color_id + ', species_id: ' +
|
return 'PetType{color_id: ' + this.color_id + ', species_id: ' +
|
||||||
this.species_id + '}';
|
this.species_id + '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ownsPetState = function (pet_state) {
|
this.ownsPetState = function (pet_state) {
|
||||||
for(var i = 0; i < this.pet_states.length; i++) {
|
for(var i = 0; i < this.pet_states.length; i++) {
|
||||||
if(this.pet_states[i] == pet_state) return true;
|
if(this.pet_states[i] == pet_state) return true;
|
||||||
|
@ -687,9 +691,9 @@ function Wardrobe() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PetType.cache_by_color_and_species = new DeepObject();
|
PetType.cache_by_color_and_species = new DeepObject();
|
||||||
|
|
||||||
PetType.findOrCreateByColorAndSpecies = function (color_id, species_id) {
|
PetType.findOrCreateByColorAndSpecies = function (color_id, species_id) {
|
||||||
var pet_type = PetType.cache_by_color_and_species.deepGet(color_id, species_id);
|
var pet_type = PetType.cache_by_color_and_species.deepGet(color_id, species_id);
|
||||||
if(!pet_type) {
|
if(!pet_type) {
|
||||||
|
@ -699,19 +703,19 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
return pet_type;
|
return pet_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SwfAsset() {}
|
function SwfAsset() {}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Controllers
|
* Controllers
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function Controller() {
|
function Controller() {
|
||||||
var controller = this;
|
var controller = this;
|
||||||
this.events = {};
|
this.events = {};
|
||||||
|
|
||||||
function fireEvent(event_name, subarguments) {
|
function fireEvent(event_name, subarguments) {
|
||||||
var events = controller.events[event_name];
|
var events = controller.events[event_name];
|
||||||
if(typeof events !== 'undefined') {
|
if(typeof events !== 'undefined') {
|
||||||
|
@ -720,20 +724,20 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.bind = function (event, callback) {
|
this.bind = function (event, callback) {
|
||||||
if(typeof this.events[event] == 'undefined') {
|
if(typeof this.events[event] == 'undefined') {
|
||||||
this.events[event] = [];
|
this.events[event] = [];
|
||||||
}
|
}
|
||||||
this.events[event].push(callback);
|
this.events[event].push(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.event = function (event_name) {
|
this.event = function (event_name) {
|
||||||
return function () {
|
return function () {
|
||||||
fireEvent(event_name, arguments);
|
fireEvent(event_name, arguments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.events.trigger = function (event_name) {
|
this.events.trigger = function (event_name) {
|
||||||
var subarguments, event;
|
var subarguments, event;
|
||||||
if(controller.events[event_name]) {
|
if(controller.events[event_name]) {
|
||||||
|
@ -742,14 +746,14 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.all = {};
|
Controller.all = {};
|
||||||
|
|
||||||
Controller.all.Outfit = function OutfitController() {
|
Controller.all.Outfit = function OutfitController() {
|
||||||
var controller = this, outfit = new Outfit;
|
var controller = this, outfit = new Outfit;
|
||||||
|
|
||||||
this.in_transaction = false;
|
this.in_transaction = false;
|
||||||
|
|
||||||
function setFullOutfit(new_outfit) {
|
function setFullOutfit(new_outfit) {
|
||||||
outfit = new_outfit;
|
outfit = new_outfit;
|
||||||
controller.in_transaction = true;
|
controller.in_transaction = true;
|
||||||
|
@ -761,57 +765,57 @@ function Wardrobe() {
|
||||||
controller.in_transaction = false;
|
controller.in_transaction = false;
|
||||||
controller.events.trigger('loadOutfit', outfit);
|
controller.events.trigger('loadOutfit', outfit);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setOutfitIdentity(new_outfit) {
|
function setOutfitIdentity(new_outfit) {
|
||||||
new_outfit.cloneAttributesFrom(outfit);
|
new_outfit.cloneAttributesFrom(outfit);
|
||||||
outfit = new_outfit;
|
outfit = new_outfit;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.closetItem = function (item) {
|
this.closetItem = function (item) {
|
||||||
outfit.closetItem(
|
outfit.closetItem(
|
||||||
item,
|
item,
|
||||||
controller.event('updateClosetItems')
|
controller.event('updateClosetItems')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getClosetItems = function () {
|
this.getClosetItems = function () {
|
||||||
return outfit.closet_items;
|
return outfit.closet_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getId = function () {
|
this.getId = function () {
|
||||||
return outfit.id;
|
return outfit.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getOutfit = function () {
|
this.getOutfit = function () {
|
||||||
return outfit;
|
return outfit;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getPetState = function () {
|
this.getPetState = function () {
|
||||||
return outfit.pet_state;
|
return outfit.pet_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getPetType = function () {
|
this.getPetType = function () {
|
||||||
return outfit.pet_type;
|
return outfit.pet_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getVisibleAssets = function () {
|
this.getVisibleAssets = function () {
|
||||||
return outfit.getVisibleAssets();
|
return outfit.getVisibleAssets();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getWornItems = function () {
|
this.getWornItems = function () {
|
||||||
return outfit.worn_items;
|
return outfit.worn_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.load = function (new_outfit_id) {
|
this.load = function (new_outfit_id) {
|
||||||
Outfit.find(new_outfit_id, function (new_outfit) {
|
Outfit.find(new_outfit_id, function (new_outfit) {
|
||||||
setFullOutfit(new_outfit.clone());
|
setFullOutfit(new_outfit.clone());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loadData = function (new_outfit_data) {
|
this.loadData = function (new_outfit_data) {
|
||||||
setFullOutfit(new Outfit(new_outfit_data));
|
setFullOutfit(new Outfit(new_outfit_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.create = function (attributes) {
|
this.create = function (attributes) {
|
||||||
if(attributes) {
|
if(attributes) {
|
||||||
outfit.starred = attributes.starred;
|
outfit.starred = attributes.starred;
|
||||||
|
@ -826,14 +830,14 @@ function Wardrobe() {
|
||||||
controller.event('saveFailure')
|
controller.event('saveFailure')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setClosetItemsByIds = function (item_ids) {
|
this.setClosetItemsByIds = function (item_ids) {
|
||||||
outfit.setClosetItemsByIds(
|
outfit.setClosetItemsByIds(
|
||||||
item_ids,
|
item_ids,
|
||||||
controller.event('updateClosetItems')
|
controller.event('updateClosetItems')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setId = function (outfit_id) {
|
this.setId = function (outfit_id) {
|
||||||
// Note that this does not load the outfit, but only sets the ID of the
|
// Note that this does not load the outfit, but only sets the ID of the
|
||||||
// outfit we're supposedly working with. This allows the hash to contain
|
// outfit we're supposedly working with. This allows the hash to contain
|
||||||
|
@ -852,11 +856,11 @@ function Wardrobe() {
|
||||||
controller.events.trigger('setOutfit', outfit);
|
controller.events.trigger('setOutfit', outfit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setPetStateById = function (pet_state_id) {
|
this.setPetStateById = function (pet_state_id) {
|
||||||
outfit.setPetStateById(pet_state_id, controller.event('updatePetState'));
|
outfit.setPetStateById(pet_state_id, controller.event('updatePetState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setPetTypeByColorAndSpecies = function(color_id, species_id) {
|
this.setPetTypeByColorAndSpecies = function(color_id, species_id) {
|
||||||
outfit.setPetTypeByColorAndSpecies(color_id, species_id,
|
outfit.setPetTypeByColorAndSpecies(color_id, species_id,
|
||||||
controller.event('updatePetType'),
|
controller.event('updatePetType'),
|
||||||
|
@ -867,7 +871,7 @@ function Wardrobe() {
|
||||||
controller.event('updateItemAssets')
|
controller.event('updateItemAssets')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setWornItemsByIds = function (item_ids) {
|
this.setWornItemsByIds = function (item_ids) {
|
||||||
outfit.setWornItemsByIds(
|
outfit.setWornItemsByIds(
|
||||||
item_ids,
|
item_ids,
|
||||||
|
@ -875,15 +879,16 @@ function Wardrobe() {
|
||||||
controller.event('updateItemAssets')
|
controller.event('updateItemAssets')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.share = function () {
|
this.share = function () {
|
||||||
var sharedOutfit = outfit.clone();
|
var sharedOutfit = outfit.clone();
|
||||||
|
sharedOutfit.anonymous = true;
|
||||||
sharedOutfit.create(
|
sharedOutfit.create(
|
||||||
controller.event('shareSuccess'),
|
controller.event('shareSuccess'),
|
||||||
controller.event('shareFailure')
|
controller.event('shareFailure')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.unclosetItem = function (item) {
|
this.unclosetItem = function (item) {
|
||||||
outfit.unclosetItem(
|
outfit.unclosetItem(
|
||||||
item,
|
item,
|
||||||
|
@ -891,11 +896,11 @@ function Wardrobe() {
|
||||||
controller.event('updateWornItems')
|
controller.event('updateWornItems')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.unwearItem = function (item) {
|
this.unwearItem = function (item) {
|
||||||
outfit.unwearItem(item, controller.event('updateWornItems'));
|
outfit.unwearItem(item, controller.event('updateWornItems'));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.update = function () {
|
this.update = function () {
|
||||||
outfit.update(
|
outfit.update(
|
||||||
function (outfit) {
|
function (outfit) {
|
||||||
|
@ -905,7 +910,7 @@ function Wardrobe() {
|
||||||
controller.event('saveFailure')
|
controller.event('saveFailure')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.wearItem = function (item) {
|
this.wearItem = function (item) {
|
||||||
outfit.wearItem(
|
outfit.wearItem(
|
||||||
item,
|
item,
|
||||||
|
@ -915,54 +920,54 @@ function Wardrobe() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.all.BasePet = function BasePetController() {
|
Controller.all.BasePet = function BasePetController() {
|
||||||
var base_pet = this;
|
var base_pet = this;
|
||||||
|
|
||||||
this.setName = function (name) {
|
this.setName = function (name) {
|
||||||
base_pet.name = name;
|
base_pet.name = name;
|
||||||
base_pet.events.trigger('updateName', name);
|
base_pet.events.trigger('updateName', name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.all.PetAttributes = function PetAttributesController() {
|
Controller.all.PetAttributes = function PetAttributesController() {
|
||||||
var pet_attributes = this;
|
var pet_attributes = this;
|
||||||
|
|
||||||
function onLoad(attributes) {
|
function onLoad(attributes) {
|
||||||
pet_attributes.events.trigger('update', attributes);
|
pet_attributes.events.trigger('update', attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.load = function () {
|
this.load = function () {
|
||||||
PetAttribute.loadAll(onLoad);
|
PetAttribute.loadAll(onLoad);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.all.ItemZoneSets = function ItemZoneSetsController() {
|
Controller.all.ItemZoneSets = function ItemZoneSetsController() {
|
||||||
var item_zone_sets = this;
|
var item_zone_sets = this;
|
||||||
|
|
||||||
function onLoad(sets) {
|
function onLoad(sets) {
|
||||||
item_zone_sets.events.trigger('update', sets);
|
item_zone_sets.events.trigger('update', sets);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.load = function () {
|
this.load = function () {
|
||||||
ItemZoneSet.loadAll(onLoad);
|
ItemZoneSet.loadAll(onLoad);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.all.Search = function SearchController() {
|
Controller.all.Search = function SearchController() {
|
||||||
var search = this;
|
var search = this;
|
||||||
|
|
||||||
this.request = {};
|
this.request = {};
|
||||||
|
|
||||||
function itemsOnLoad(items, total_pages, page) {
|
function itemsOnLoad(items, total_pages, page) {
|
||||||
search.events.trigger('updateItems', items);
|
search.events.trigger('updateItems', items);
|
||||||
search.events.trigger('updatePagination', page, total_pages);
|
search.events.trigger('updatePagination', page, total_pages);
|
||||||
}
|
}
|
||||||
|
|
||||||
function itemsOnError(error) {
|
function itemsOnError(error) {
|
||||||
search.events.trigger('error', error);
|
search.events.trigger('error', error);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setItemsByQuery = function (query, where) {
|
this.setItemsByQuery = function (query, where) {
|
||||||
var offset = (typeof where.offset != 'undefined') ? where.offset : (Item.PER_PAGE * (where.page - 1));
|
var offset = (typeof where.offset != 'undefined') ? where.offset : (Item.PER_PAGE * (where.page - 1));
|
||||||
search.request = {
|
search.request = {
|
||||||
|
@ -978,15 +983,15 @@ function Wardrobe() {
|
||||||
search.events.trigger('updatePagination', 0, 0);
|
search.events.trigger('updatePagination', 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setPerPage = function (per_page) {
|
this.setPerPage = function (per_page) {
|
||||||
Item.PER_PAGE = per_page;
|
Item.PER_PAGE = per_page;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.all.User = function UserController() {
|
Controller.all.User = function UserController() {
|
||||||
var controller = this, outfits = [], outfits_loaded = false;
|
var controller = this, outfits = [], outfits_loaded = false;
|
||||||
|
|
||||||
function compareOutfits(a, b) {
|
function compareOutfits(a, b) {
|
||||||
if(a.starred) {
|
if(a.starred) {
|
||||||
if(!b.starred) return -1;
|
if(!b.starred) return -1;
|
||||||
|
@ -997,7 +1002,7 @@ function Wardrobe() {
|
||||||
else if(a.name == b.name) return 0;
|
else if(a.name == b.name) return 0;
|
||||||
else return 1;
|
else return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function insertOutfit(outfit) {
|
function insertOutfit(outfit) {
|
||||||
for(var i = 0; i < outfits.length; i++) {
|
for(var i = 0; i < outfits.length; i++) {
|
||||||
if(compareOutfits(outfit, outfits[i]) < 0) {
|
if(compareOutfits(outfit, outfits[i]) < 0) {
|
||||||
|
@ -1009,11 +1014,11 @@ function Wardrobe() {
|
||||||
controller.events.trigger('addOutfit', outfit, outfits.length);
|
controller.events.trigger('addOutfit', outfit, outfits.length);
|
||||||
outfits.push(outfit);
|
outfits.push(outfit);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sortOutfits(outfits) {
|
function sortOutfits(outfits) {
|
||||||
outfits.sort(compareOutfits);
|
outfits.sort(compareOutfits);
|
||||||
}
|
}
|
||||||
|
|
||||||
function yankOutfit(outfit) {
|
function yankOutfit(outfit) {
|
||||||
var i;
|
var i;
|
||||||
for(i = 0; i < outfits.length; i++) {
|
for(i = 0; i < outfits.length; i++) {
|
||||||
|
@ -1024,15 +1029,15 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
controller.events.trigger('removeOutfit', outfit, i);
|
controller.events.trigger('removeOutfit', outfit, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.addOutfit = insertOutfit;
|
this.addOutfit = insertOutfit;
|
||||||
|
|
||||||
this.destroyOutfit = function (outfit) {
|
this.destroyOutfit = function (outfit) {
|
||||||
outfit.destroy(function () {
|
outfit.destroy(function () {
|
||||||
yankOutfit(outfit);
|
yankOutfit(outfit);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loadOutfits = function () {
|
this.loadOutfits = function () {
|
||||||
if(!outfits_loaded) {
|
if(!outfits_loaded) {
|
||||||
Outfit.loadForCurrentUser(function (new_outfits) {
|
Outfit.loadForCurrentUser(function (new_outfits) {
|
||||||
|
@ -1043,7 +1048,7 @@ function Wardrobe() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.renameOutfit = function (outfit, new_name) {
|
this.renameOutfit = function (outfit, new_name) {
|
||||||
var old_name = outfit.name;
|
var old_name = outfit.name;
|
||||||
outfit.rename(new_name, function () {
|
outfit.rename(new_name, function () {
|
||||||
|
@ -1055,7 +1060,7 @@ function Wardrobe() {
|
||||||
controller.events.trigger('saveFailure', outfit_copy, response);
|
controller.events.trigger('saveFailure', outfit_copy, response);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.toggleOutfitStar = function (outfit) {
|
this.toggleOutfitStar = function (outfit) {
|
||||||
outfit.toggleStar(function () {
|
outfit.toggleStar(function () {
|
||||||
yankOutfit(outfit);
|
yankOutfit(outfit);
|
||||||
|
@ -1063,7 +1068,7 @@ function Wardrobe() {
|
||||||
controller.events.trigger('outfitStarToggled', outfit);
|
controller.events.trigger('outfitStarToggled', outfit);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateOutfit = function (outfit) {
|
this.updateOutfit = function (outfit) {
|
||||||
for(var i = 0; i < outfits.length; i++) {
|
for(var i = 0; i < outfits.length; i++) {
|
||||||
if(outfits[i].id == outfit.id) {
|
if(outfits[i].id == outfit.id) {
|
||||||
|
@ -1086,7 +1091,7 @@ function Wardrobe() {
|
||||||
Controller.apply(wardrobe[underscored_name]);
|
Controller.apply(wardrobe[underscored_name]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initialize = function () {
|
this.initialize = function () {
|
||||||
var view;
|
var view;
|
||||||
for(var name in wardrobe.views) {
|
for(var name in wardrobe.views) {
|
||||||
|
@ -1098,7 +1103,7 @@ function Wardrobe() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.registerViews = function (views) {
|
this.registerViews = function (views) {
|
||||||
wardrobe.views = {};
|
wardrobe.views = {};
|
||||||
$.each(views, function (name) {
|
$.each(views, function (name) {
|
||||||
|
@ -1113,7 +1118,7 @@ Wardrobe.StandardPreview = {
|
||||||
|
|
||||||
Wardrobe.getStandardView = function (options) {
|
Wardrobe.getStandardView = function (options) {
|
||||||
var StandardView = {};
|
var StandardView = {};
|
||||||
|
|
||||||
function requireKeys() {
|
function requireKeys() {
|
||||||
var key, key_stack = [], scope = options;
|
var key, key_stack = [], scope = options;
|
||||||
for(var i = 0; i < arguments.length; i++) {
|
for(var i = 0; i < arguments.length; i++) {
|
||||||
|
@ -1125,21 +1130,21 @@ Wardrobe.getStandardView = function (options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
requireKeys('Preview', 'swf_url');
|
requireKeys('Preview', 'swf_url');
|
||||||
requireKeys('Preview', 'wrapper');
|
requireKeys('Preview', 'wrapper');
|
||||||
requireKeys('Preview', 'placeholder');
|
requireKeys('Preview', 'placeholder');
|
||||||
|
|
||||||
if(document.location.search.substr(0, 6) == '?debug') {
|
if(document.location.search.substr(0, 6) == '?debug') {
|
||||||
StandardView.Console = function (wardrobe) {
|
StandardView.Console = function (wardrobe) {
|
||||||
if(typeof console != 'undefined' && typeof console.log == 'function') {
|
if(typeof console != 'undefined' && typeof console.log == 'function') {
|
||||||
window.log = $.proxy(console, 'log');
|
window.log = $.proxy(console, 'log');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initialize = function () {
|
this.initialize = function () {
|
||||||
log('Welcome to the Wardrobe!');
|
log('Welcome to the Wardrobe!');
|
||||||
}
|
}
|
||||||
|
|
||||||
var outfit_events = ['updateWornItems', 'updateClosetItems', 'updateItemAssets', 'updatePetType', 'updatePetState'];
|
var outfit_events = ['updateWornItems', 'updateClosetItems', 'updateItemAssets', 'updatePetType', 'updatePetState'];
|
||||||
for(var i = 0; i < outfit_events.length; i++) {
|
for(var i = 0; i < outfit_events.length; i++) {
|
||||||
(function (event) {
|
(function (event) {
|
||||||
|
@ -1148,7 +1153,7 @@ Wardrobe.getStandardView = function (options) {
|
||||||
});
|
});
|
||||||
})(outfit_events[i]);
|
})(outfit_events[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
wardrobe.outfit.bind('petTypeNotFound', function (pet_type) {
|
wardrobe.outfit.bind('petTypeNotFound', function (pet_type) {
|
||||||
log(pet_type.toString() + ' not found');
|
log(pet_type.toString() + ' not found');
|
||||||
});
|
});
|
||||||
|
@ -1161,7 +1166,7 @@ Wardrobe.getStandardView = function (options) {
|
||||||
preview_swf_id = preview_swf_placeholder.attr('id'),
|
preview_swf_id = preview_swf_placeholder.attr('id'),
|
||||||
preview_swf,
|
preview_swf,
|
||||||
update_pending_flash = false;
|
update_pending_flash = false;
|
||||||
|
|
||||||
swfobject.embedSWF(
|
swfobject.embedSWF(
|
||||||
options.Preview.swf_url,
|
options.Preview.swf_url,
|
||||||
preview_swf_id,
|
preview_swf_id,
|
||||||
|
@ -1172,9 +1177,9 @@ Wardrobe.getStandardView = function (options) {
|
||||||
{'id': preview_swf_id},
|
{'id': preview_swf_id},
|
||||||
{'wmode': 'transparent'}
|
{'wmode': 'transparent'}
|
||||||
);
|
);
|
||||||
|
|
||||||
Wardrobe.StandardPreview.views_by_swf_id[preview_swf_id] = this;
|
Wardrobe.StandardPreview.views_by_swf_id[preview_swf_id] = this;
|
||||||
|
|
||||||
this.previewSWFIsReady = function () {
|
this.previewSWFIsReady = function () {
|
||||||
preview_swf = document.getElementById(preview_swf_id);
|
preview_swf = document.getElementById(preview_swf_id);
|
||||||
if(update_pending_flash) {
|
if(update_pending_flash) {
|
||||||
|
@ -1182,7 +1187,7 @@ Wardrobe.getStandardView = function (options) {
|
||||||
updateAssets();
|
updateAssets();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateAssets() {
|
function updateAssets() {
|
||||||
var assets, assets_for_swf;
|
var assets, assets_for_swf;
|
||||||
if(update_pending_flash) return false;
|
if(update_pending_flash) return false;
|
||||||
|
@ -1193,15 +1198,16 @@ Wardrobe.getStandardView = function (options) {
|
||||||
update_pending_flash = true;
|
update_pending_flash = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wardrobe.outfit.bind('updateWornItems', updateAssets);
|
wardrobe.outfit.bind('updateWornItems', updateAssets);
|
||||||
wardrobe.outfit.bind('updateItemAssets', updateAssets);
|
wardrobe.outfit.bind('updateItemAssets', updateAssets);
|
||||||
wardrobe.outfit.bind('updatePetState', updateAssets);
|
wardrobe.outfit.bind('updatePetState', updateAssets);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.previewSWFIsReady = function (id) {
|
window.previewSWFIsReady = function (id) {
|
||||||
Wardrobe.StandardPreview.views_by_swf_id[id].previewSWFIsReady();
|
Wardrobe.StandardPreview.views_by_swf_id[id].previewSWFIsReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
return StandardView;
|
return StandardView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -844,42 +844,46 @@ body.outfits-edit #save-outfit-wrapper button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 133, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 133, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
|
body.outfits-edit #save-outfit-wrapper #share-outfit {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
/* line 135, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #save-outfit-wrapper.loading {
|
body.outfits-edit #save-outfit-wrapper.loading {
|
||||||
background-image: url('/images/loading.gif?1296599919');
|
background-image: url('/images/loading.gif?1296599919');
|
||||||
background-position: left center;
|
background-position: left center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
/* line 139, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 141, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #save-outfit, body.outfits-edit #share-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 {
|
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;
|
background: #ff5c00 url('/images/alert-overlay.png?1296599919') repeat-x;
|
||||||
}
|
}
|
||||||
/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */
|
/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */
|
||||||
body.outfits-edit #save-outfit:hover, body.outfits-edit #share-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 {
|
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;
|
background-color: #ee4b00;
|
||||||
}
|
}
|
||||||
/* line 141, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 143, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #current-outfit-permalink {
|
body.outfits-edit #current-outfit-permalink, body.outfits-edit #shared-outfit-permalink {
|
||||||
display: none;
|
display: none;
|
||||||
margin-right: 0.25em;
|
margin-right: 0.25em;
|
||||||
}
|
}
|
||||||
/* line 144, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 146, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #current-outfit-permalink img {
|
body.outfits-edit #current-outfit-permalink img, body.outfits-edit #shared-outfit-permalink img {
|
||||||
bottom: -2px;
|
bottom: -2px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
}
|
}
|
||||||
/* line 146, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 148, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #current-outfit-url {
|
body.outfits-edit #shared-outfit-url {
|
||||||
display: none;
|
display: none;
|
||||||
width: 15em;
|
width: 15em;
|
||||||
}
|
}
|
||||||
/* line 149, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 151, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview {
|
body.outfits-edit #preview {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
/* line 151, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 153, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-swf {
|
body.outfits-edit #preview-swf {
|
||||||
float: left;
|
float: left;
|
||||||
height: 400px;
|
height: 400px;
|
||||||
|
@ -887,7 +891,7 @@ body.outfits-edit #preview-swf {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
/* line 157, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 159, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-swf-overlay {
|
body.outfits-edit #preview-swf-overlay {
|
||||||
-moz-opacity: 0;
|
-moz-opacity: 0;
|
||||||
-webkit-opacity: 0;
|
-webkit-opacity: 0;
|
||||||
|
@ -900,7 +904,7 @@ body.outfits-edit #preview-swf-overlay {
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
/* line 165, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 167, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-sidebar {
|
body.outfits-edit #preview-sidebar {
|
||||||
-moz-border-radius: 10px;
|
-moz-border-radius: 10px;
|
||||||
-webkit-border-radius: 10px;
|
-webkit-border-radius: 10px;
|
||||||
|
@ -912,73 +916,73 @@ body.outfits-edit #preview-sidebar {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
width: 378px;
|
width: 378px;
|
||||||
}
|
}
|
||||||
/* line 175, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 177, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-sidebar.viewing-outfits #preview-closet {
|
body.outfits-edit #preview-sidebar.viewing-outfits #preview-closet {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 177, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 179, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-sidebar.viewing-outfits #preview-outfits {
|
body.outfits-edit #preview-sidebar.viewing-outfits #preview-outfits {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
/* line 179, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 181, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-sidebar.viewing-saving-outfit {
|
body.outfits-edit #preview-sidebar.viewing-saving-outfit {
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
/* line 182, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 184, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-sidebar.viewing-saving-outfit #preview-closet {
|
body.outfits-edit #preview-sidebar.viewing-saving-outfit #preview-closet {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 184, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 186, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-sidebar.viewing-saving-outfit #preview-saving-outfit {
|
body.outfits-edit #preview-sidebar.viewing-saving-outfit #preview-saving-outfit {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
/* line 187, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 189, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-sidebar .sidebar-view h2 {
|
body.outfits-edit #preview-sidebar .sidebar-view h2 {
|
||||||
margin-bottom: 0.25em;
|
margin-bottom: 0.25em;
|
||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
}
|
}
|
||||||
/* line 192, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 194, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-closet h2 {
|
body.outfits-edit #preview-closet h2 {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
/* line 194, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 196, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-closet ul {
|
body.outfits-edit #preview-closet ul {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
/* line 196, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 198, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-closet .object {
|
body.outfits-edit #preview-closet .object {
|
||||||
background: #eeffee;
|
background: #eeffee;
|
||||||
}
|
}
|
||||||
/* line 198, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 200, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-closet .object img {
|
body.outfits-edit #preview-closet .object img {
|
||||||
-moz-opacity: 0.5;
|
-moz-opacity: 0.5;
|
||||||
-webkit-opacity: 0.5;
|
-webkit-opacity: 0.5;
|
||||||
-o-opacity: 0.5;
|
-o-opacity: 0.5;
|
||||||
-khtml-opacity: 0.5;
|
-khtml-opacity: 0.5;
|
||||||
}
|
}
|
||||||
/* line 200, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 202, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-closet .object.worn {
|
body.outfits-edit #preview-closet .object.worn {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
/* line 202, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 204, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-closet .object.worn img {
|
body.outfits-edit #preview-closet .object.worn img {
|
||||||
-moz-opacity: 1;
|
-moz-opacity: 1;
|
||||||
-webkit-opacity: 1;
|
-webkit-opacity: 1;
|
||||||
-o-opacity: 1;
|
-o-opacity: 1;
|
||||||
-khtml-opacity: 1;
|
-khtml-opacity: 1;
|
||||||
}
|
}
|
||||||
/* line 204, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 206, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-closet .object.no-assets {
|
body.outfits-edit #preview-closet .object.no-assets {
|
||||||
background: #fbe3e4;
|
background: #fbe3e4;
|
||||||
color: #8a1f11;
|
color: #8a1f11;
|
||||||
padding-bottom: 1.25em;
|
padding-bottom: 1.25em;
|
||||||
}
|
}
|
||||||
/* line 208, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 210, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-closet .object.no-assets .no-assets-message {
|
body.outfits-edit #preview-closet .object.no-assets .no-assets-message {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
/* line 210, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 212, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .no-assets-message {
|
body.outfits-edit .no-assets-message {
|
||||||
background: #f3dbdc;
|
background: #f3dbdc;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
@ -990,7 +994,7 @@ body.outfits-edit .no-assets-message {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
/* line 220, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 222, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #no-assets-full-message {
|
body.outfits-edit #no-assets-full-message {
|
||||||
-moz-border-radius: 5px;
|
-moz-border-radius: 5px;
|
||||||
-webkit-border-radius: 5px;
|
-webkit-border-radius: 5px;
|
||||||
|
@ -1004,12 +1008,12 @@ body.outfits-edit #no-assets-full-message {
|
||||||
top: -9999px;
|
top: -9999px;
|
||||||
width: 30em;
|
width: 30em;
|
||||||
}
|
}
|
||||||
/* line 231, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 233, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-search-form {
|
body.outfits-edit #preview-search-form {
|
||||||
clear: both;
|
clear: both;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
/* line 234, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 236, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-search-form h2 {
|
body.outfits-edit #preview-search-form h2 {
|
||||||
display: -moz-inline-box;
|
display: -moz-inline-box;
|
||||||
-moz-box-orient: vertical;
|
-moz-box-orient: vertical;
|
||||||
|
@ -1019,7 +1023,7 @@ body.outfits-edit #preview-search-form h2 {
|
||||||
*vertical-align: auto;
|
*vertical-align: auto;
|
||||||
margin: 0 1em 0 0;
|
margin: 0 1em 0 0;
|
||||||
}
|
}
|
||||||
/* line 237, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 239, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-search-form input {
|
body.outfits-edit #preview-search-form input {
|
||||||
display: -moz-inline-box;
|
display: -moz-inline-box;
|
||||||
-moz-box-orient: vertical;
|
-moz-box-orient: vertical;
|
||||||
|
@ -1028,7 +1032,7 @@ body.outfits-edit #preview-search-form input {
|
||||||
*display: inline;
|
*display: inline;
|
||||||
*vertical-align: auto;
|
*vertical-align: auto;
|
||||||
}
|
}
|
||||||
/* line 239, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 241, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-search-form-pagination {
|
body.outfits-edit #preview-search-form-pagination {
|
||||||
display: -moz-inline-box;
|
display: -moz-inline-box;
|
||||||
-moz-box-orient: vertical;
|
-moz-box-orient: vertical;
|
||||||
|
@ -1038,53 +1042,53 @@ body.outfits-edit #preview-search-form-pagination {
|
||||||
*vertical-align: auto;
|
*vertical-align: auto;
|
||||||
margin-left: 2em;
|
margin-left: 2em;
|
||||||
}
|
}
|
||||||
/* line 242, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 244, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-search-form-pagination a, body.outfits-edit #preview-search-form-pagination span {
|
body.outfits-edit #preview-search-form-pagination a, body.outfits-edit #preview-search-form-pagination span {
|
||||||
margin: 0 0.25em;
|
margin: 0 0.25em;
|
||||||
}
|
}
|
||||||
/* line 244, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 246, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-search-form-pagination .current {
|
body.outfits-edit #preview-search-form-pagination .current {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
/* line 246, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 248, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-search-form-clear {
|
body.outfits-edit #preview-search-form-clear {
|
||||||
display: none;
|
display: none;
|
||||||
font-size: 87.5%;
|
font-size: 87.5%;
|
||||||
margin-left: 2em;
|
margin-left: 2em;
|
||||||
}
|
}
|
||||||
/* line 250, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 252, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-search-form-loading {
|
body.outfits-edit #preview-search-form-loading {
|
||||||
display: none;
|
display: none;
|
||||||
font-size: 75%;
|
font-size: 75%;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
margin-left: 2em;
|
margin-left: 2em;
|
||||||
}
|
}
|
||||||
/* line 256, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 258, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-search-form-no-results {
|
body.outfits-edit #preview-search-form-no-results {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 258, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 260, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-search-form-help {
|
body.outfits-edit #preview-search-form-help {
|
||||||
font-size: 87.5%;
|
font-size: 87.5%;
|
||||||
margin-left: 2em;
|
margin-left: 2em;
|
||||||
}
|
}
|
||||||
/* line 261, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 263, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .search-helper {
|
body.outfits-edit .search-helper {
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
/* line 263, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 265, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .possible-error {
|
body.outfits-edit .possible-error {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 266, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 268, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #fullscreen-copyright {
|
body.outfits-edit #fullscreen-copyright {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 268, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 270, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen {
|
body.outfits-edit.fullscreen {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
/* line 271, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 273, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen #container {
|
body.outfits-edit.fullscreen #container {
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
|
@ -1097,19 +1101,19 @@ body.outfits-edit.fullscreen #container {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
/* line 279, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 281, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen h1 {
|
body.outfits-edit.fullscreen h1 {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 281, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 283, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen #short-url-response {
|
body.outfits-edit.fullscreen #short-url-response {
|
||||||
position: static;
|
position: static;
|
||||||
}
|
}
|
||||||
/* line 283, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 285, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen #preview {
|
body.outfits-edit.fullscreen #preview {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
/* line 285, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 287, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen #preview-sidebar {
|
body.outfits-edit.fullscreen #preview-sidebar {
|
||||||
float: right;
|
float: right;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -1117,12 +1121,12 @@ body.outfits-edit.fullscreen #preview-sidebar {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
/* line 291, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 293, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen #preview-sidebar.viewing-saving-outfit {
|
body.outfits-edit.fullscreen #preview-sidebar.viewing-saving-outfit {
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
/* line 294, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 296, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen #preview-search-form {
|
body.outfits-edit.fullscreen #preview-search-form {
|
||||||
bottom: 1.5em;
|
bottom: 1.5em;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -1131,7 +1135,7 @@ body.outfits-edit.fullscreen #preview-search-form {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
/* line 302, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 304, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen #preview-search-form-help div {
|
body.outfits-edit.fullscreen #preview-search-form-help div {
|
||||||
display: -moz-inline-box;
|
display: -moz-inline-box;
|
||||||
-moz-box-orient: vertical;
|
-moz-box-orient: vertical;
|
||||||
|
@ -1141,27 +1145,27 @@ body.outfits-edit.fullscreen #preview-search-form-help div {
|
||||||
*vertical-align: auto;
|
*vertical-align: auto;
|
||||||
width: 48%;
|
width: 48%;
|
||||||
}
|
}
|
||||||
/* line 305, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 307, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen #footer {
|
body.outfits-edit.fullscreen #footer {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
/* line 310, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 312, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen #footer ul, body.outfits-edit.fullscreen #footer p, body.outfits-edit.fullscreen #footer li {
|
body.outfits-edit.fullscreen #footer ul, body.outfits-edit.fullscreen #footer p, body.outfits-edit.fullscreen #footer li {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
/* line 312, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 314, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.fullscreen #footer ul {
|
body.outfits-edit.fullscreen #footer ul {
|
||||||
margin-right: 2em;
|
margin-right: 2em;
|
||||||
}
|
}
|
||||||
/* line 315, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 317, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .object {
|
body.outfits-edit .object {
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
/* line 318, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 320, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .object ul {
|
body.outfits-edit .object ul {
|
||||||
display: none;
|
display: none;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -1169,11 +1173,11 @@ body.outfits-edit .object ul {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
/* line 324, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 326, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .object ul li {
|
body.outfits-edit .object ul li {
|
||||||
margin-bottom: 0.25em;
|
margin-bottom: 0.25em;
|
||||||
}
|
}
|
||||||
/* line 326, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 328, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .object ul li a {
|
body.outfits-edit .object ul li a {
|
||||||
/* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */
|
/* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */
|
||||||
-moz-border-radius: 5px;
|
-moz-border-radius: 5px;
|
||||||
|
@ -1214,11 +1218,11 @@ body.outfits-edit .object ul li a:active {
|
||||||
body.outfits-edit .object ul li a:hover {
|
body.outfits-edit .object ul li a:hover {
|
||||||
background-color: #999999;
|
background-color: #999999;
|
||||||
}
|
}
|
||||||
/* line 332, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 334, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .object:hover ul, body.outfits-edit .object:hover .object-info {
|
body.outfits-edit .object:hover ul, body.outfits-edit .object:hover .object-info {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
/* line 339, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 341, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .nc-icon {
|
body.outfits-edit .nc-icon {
|
||||||
background: url('/images/nc.png?1296599919') no-repeat;
|
background: url('/images/nc.png?1296599919') no-repeat;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
@ -1228,14 +1232,14 @@ body.outfits-edit .nc-icon {
|
||||||
top: 64px;
|
top: 64px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
}
|
}
|
||||||
/* line 347, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 349, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .nc-icon:hover {
|
body.outfits-edit .nc-icon:hover {
|
||||||
-moz-opacity: 0.5;
|
-moz-opacity: 0.5;
|
||||||
-webkit-opacity: 0.5;
|
-webkit-opacity: 0.5;
|
||||||
-o-opacity: 0.5;
|
-o-opacity: 0.5;
|
||||||
-khtml-opacity: 0.5;
|
-khtml-opacity: 0.5;
|
||||||
}
|
}
|
||||||
/* line 350, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 352, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .object-info {
|
body.outfits-edit .object-info {
|
||||||
-moz-border-radius: 12px;
|
-moz-border-radius: 12px;
|
||||||
-webkit-border-radius: 12px;
|
-webkit-border-radius: 12px;
|
||||||
|
@ -1252,26 +1256,26 @@ body.outfits-edit .object-info {
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
}
|
}
|
||||||
/* line 361, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 363, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .object-info span {
|
body.outfits-edit .object-info span {
|
||||||
font-family: "Droid Serif", Georgia, "Times New Roman", Times, serif;
|
font-family: "Droid Serif", Georgia, "Times New Roman", Times, serif;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -2px;
|
top: -2px;
|
||||||
}
|
}
|
||||||
/* line 367, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 369, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .object-info:hover {
|
body.outfits-edit .object-info:hover {
|
||||||
-moz-opacity: 1;
|
-moz-opacity: 1;
|
||||||
-webkit-opacity: 1;
|
-webkit-opacity: 1;
|
||||||
-o-opacity: 1;
|
-o-opacity: 1;
|
||||||
-khtml-opacity: 1;
|
-khtml-opacity: 1;
|
||||||
}
|
}
|
||||||
/* line 370, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 372, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-outfits {
|
body.outfits-edit #preview-outfits {
|
||||||
display: none;
|
display: none;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
/* line 373, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 375, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-outfits > ul {
|
body.outfits-edit #preview-outfits > ul {
|
||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
margin-right: 24px;
|
margin-right: 24px;
|
||||||
|
@ -1282,7 +1286,7 @@ body.outfits-edit #preview-outfits > ul {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
min-height: 16px;
|
min-height: 16px;
|
||||||
}
|
}
|
||||||
/* line 382, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 384, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-outfits > ul > li {
|
body.outfits-edit #preview-outfits > ul > li {
|
||||||
padding: 0.25em 0;
|
padding: 0.25em 0;
|
||||||
}
|
}
|
||||||
|
@ -1461,18 +1465,18 @@ body.outfits-edit #preview-outfits > ul > li.renaming:hover .outfit-rename-butto
|
||||||
body.outfits-edit #preview-outfits > ul > li:hover .outfit-rename-button {
|
body.outfits-edit #preview-outfits > ul > li:hover .outfit-rename-button {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
/* line 384, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 386, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-outfits > ul.loaded {
|
body.outfits-edit #preview-outfits > ul.loaded {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
/* line 387, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 389, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .preview-sidebar-nav {
|
body.outfits-edit .preview-sidebar-nav {
|
||||||
float: right;
|
float: right;
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
margin-right: 24px;
|
margin-right: 24px;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
/* line 394, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 396, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #save-success, body.outfits-edit #save-error, body.outfits-edit #outfit-not-found {
|
body.outfits-edit #save-success, body.outfits-edit #save-error, body.outfits-edit #outfit-not-found {
|
||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
margin-right: 24px;
|
margin-right: 24px;
|
||||||
|
@ -1480,19 +1484,19 @@ body.outfits-edit #save-success, body.outfits-edit #save-error, body.outfits-edi
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
/* line 401, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 403, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #save-success {
|
body.outfits-edit #save-success {
|
||||||
background: #e6efc2;
|
background: #e6efc2;
|
||||||
border: 1px solid #c6d880;
|
border: 1px solid #c6d880;
|
||||||
color: #264409;
|
color: #264409;
|
||||||
}
|
}
|
||||||
/* line 404, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 406, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #save-error, body.outfits-edit #outfit-not-found {
|
body.outfits-edit #save-error, body.outfits-edit #outfit-not-found {
|
||||||
background: #fbe3e4;
|
background: #fbe3e4;
|
||||||
border: 1px solid #fbc2c4;
|
border: 1px solid #fbc2c4;
|
||||||
color: #8a1f11;
|
color: #8a1f11;
|
||||||
}
|
}
|
||||||
/* line 407, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 409, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #userbar-message {
|
body.outfits-edit #userbar-message {
|
||||||
-moz-opacity: 0.5;
|
-moz-opacity: 0.5;
|
||||||
-webkit-opacity: 0.5;
|
-webkit-opacity: 0.5;
|
||||||
|
@ -1500,7 +1504,7 @@ body.outfits-edit #userbar-message {
|
||||||
-khtml-opacity: 0.5;
|
-khtml-opacity: 0.5;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 411, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 413, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #new-outfit {
|
body.outfits-edit #new-outfit {
|
||||||
padding: 0.25em 0;
|
padding: 0.25em 0;
|
||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
|
@ -1682,33 +1686,33 @@ body.outfits-edit #new-outfit.renaming:hover .outfit-rename-button {
|
||||||
body.outfits-edit #new-outfit:hover .outfit-rename-button {
|
body.outfits-edit #new-outfit:hover .outfit-rename-button {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
/* line 415, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 417, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #new-outfit h4 {
|
body.outfits-edit #new-outfit h4 {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
/* line 417, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 419, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #new-outfit h4:hover {
|
body.outfits-edit #new-outfit h4:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
/* line 419, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 421, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #new-outfit .outfit-star {
|
body.outfits-edit #new-outfit .outfit-star {
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
}
|
}
|
||||||
/* line 422, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 424, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #new-outfit-name {
|
body.outfits-edit #new-outfit-name {
|
||||||
font: inherit;
|
font: inherit;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
/* line 426, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 428, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-saving-outfit {
|
body.outfits-edit #preview-saving-outfit {
|
||||||
display: none;
|
display: none;
|
||||||
padding-bottom: 1em;
|
padding-bottom: 1em;
|
||||||
}
|
}
|
||||||
/* line 430, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 432, ../../../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 {
|
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;
|
position: relative;
|
||||||
}
|
}
|
||||||
/* line 433, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 435, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .control-overlay {
|
body.outfits-edit .control-overlay {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -1717,11 +1721,11 @@ body.outfits-edit .control-overlay {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
/* line 441, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 443, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit #preview-sidebar-nav-outfits, body.outfits-edit #save-outfit-signed-in {
|
body.outfits-edit #preview-sidebar-nav-outfits, body.outfits-edit #save-outfit-signed-in {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 444, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 446, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit form#save-outfit-form {
|
body.outfits-edit form#save-outfit-form {
|
||||||
padding: 0.25em 0;
|
padding: 0.25em 0;
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -1903,7 +1907,7 @@ body.outfits-edit form#save-outfit-form.renaming:hover .outfit-rename-button {
|
||||||
body.outfits-edit form#save-outfit-form:hover .outfit-rename-button {
|
body.outfits-edit form#save-outfit-form:hover .outfit-rename-button {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
/* line 450, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 452, ../../../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 {
|
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;
|
display: -moz-inline-box;
|
||||||
-moz-box-orient: vertical;
|
-moz-box-orient: vertical;
|
||||||
|
@ -1914,50 +1918,54 @@ body.outfits-edit form#save-outfit-form .outfit-star, body.outfits-edit form#sav
|
||||||
float: none;
|
float: none;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
/* line 455, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 457, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit form#save-outfit-form .outfit-star {
|
body.outfits-edit form#save-outfit-form .outfit-star {
|
||||||
margin-top: 0.25em;
|
margin-top: 0.25em;
|
||||||
}
|
}
|
||||||
/* line 458, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 460, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit .outfit-url {
|
body.outfits-edit .outfit-url {
|
||||||
font-size: 75%;
|
font-size: 75%;
|
||||||
}
|
}
|
||||||
/* line 462, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 464, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.user-signed-in #preview-sidebar-nav-outfits {
|
body.outfits-edit.user-signed-in #preview-sidebar-nav-outfits {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
/* line 464, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 466, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.user-signed-in #save-outfit {
|
body.outfits-edit.user-signed-in #save-outfit {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
/* line 468, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 470, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.user-signed-in #save-outfit-wrapper.active-outfit #save-outfit {
|
body.outfits-edit.user-signed-in #save-outfit-wrapper.active-outfit #save-outfit {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 470, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 472, ../../../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 {
|
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;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
/* line 472, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 474, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.user-signed-in #save-outfit-wrapper.active-outfit #current-outfit-permalink {
|
body.outfits-edit.user-signed-in #save-outfit-wrapper.active-outfit #current-outfit-permalink {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
/* line 475, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 477, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #save-outfit-form {
|
body.outfits-edit.user-signed-in #save-outfit-wrapper.saving-outfit #save-outfit-form {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
/* line 477, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 479, ../../../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 #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;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 481, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 483, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.user-not-signed-in #share-outfit, body.outfits-edit.user-not-signed-in #save-outfit-not-signed-in {
|
body.outfits-edit.user-not-signed-in #save-outfit-not-signed-in {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
/* line 484, ../../../app/stylesheets/outfits/_edit.sass */
|
/* line 487, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
body.outfits-edit.user-not-signed-in #save-outfit-wrapper.shared-outfit #current-outfit-permalink, body.outfits-edit.user-not-signed-in #save-outfit-wrapper.shared-outfit #current-outfit-url {
|
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;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
/* line 489, ../../../app/stylesheets/outfits/_edit.sass */
|
||||||
|
body.outfits-edit #save-outfit-wrapper.shared-outfit #current-outfit-permalink {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* line 4, ../../../app/stylesheets/outfits/_index.sass */
|
/* line 4, ../../../app/stylesheets/outfits/_index.sass */
|
||||||
body.outfits-index #outfits {
|
body.outfits-index #outfits {
|
||||||
|
|
Loading…
Reference in a new issue