outfit permalink in toolbar

This commit is contained in:
Emi Matchu 2011-02-09 20:29:43 -05:00
parent d1daa6b772
commit ea5908c278
5 changed files with 221 additions and 198 deletions

View file

@ -16,6 +16,12 @@ $outfit-header-padding: 24px
$outfit-content-width: $sidebar-unit-inner-width - $outfit-thumbnail-size - $outfit-thumbnail-margin - 32px
$outfit-content-inner-width: $outfit-content-width - $outfit-header-padding
=icon
bottom: -2px
height: 16px
position: relative
width: 16px
=outfit
//+clearfix
padding: .25em 0
@ -50,20 +56,16 @@ $outfit-content-inner-width: $outfit-content-width - $outfit-header-padding
display: block
padding-left: $outfit-header-padding
.outfit-star
+icon
background:
image: image-url("unstarred.png")
position: left top
repeat: no-repeat
bottom: -2px
/* margin-bottom doesn't work here
cursor: pointer
display: block
float: left
height: 16px
margin-left: -24px
/* makes it not take up inline space
position: relative
width: 16px
&.starred .outfit-star
background-image: image-url("star.png")
&.loading .outfit-star
@ -154,6 +156,11 @@ body.outfits-edit
display: none
#save-outfit, #save-outfit-not-signed-in, #save-current-outfit, #save-outfit-copy, #save-outfit-finish
+loud-awesome-button-color
#current-outfit-permalink
display: none
margin-right: .25em
img
+icon
#preview
clear: both
#preview-swf
@ -472,12 +479,12 @@ body.outfits-edit
&.active-outfit
#save-outfit
display: none
#save-current-outfit, #save-outfit-copy
#current-outfit-permalink, #save-current-outfit, #save-outfit-copy
display: inline-block
&.saving-outfit
#save-outfit-form
display: block
#save-outfit, #save-current-outfit, #save-outfit-copy
#save-outfit, #save-current-outfit, #save-outfit-copy, #current-outfit-permalink
display: none
&.user-not-signed-in

View file

@ -17,6 +17,8 @@
#save-outfit-wrapper
%button#save-outfit Save outfit
%button#save-outfit-not-signed-in Log in to save outfit
%a#current-outfit-permalink{:target => '_blank'}
= image_tag 'link_go.png', :alt => 'Permalink', :title => 'Permalink'
%button#save-current-outfit Save &quot;<span>current outfit</span>&quot;
%button#save-outfit-copy Save a copy
%form#save-outfit-form

BIN
public/images/link_go.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

View file

@ -443,7 +443,7 @@ View.Hash = function (wardrobe) {
}
View.Outfits = function (wardrobe) {
var controls = $('#pet-type-form, #pet-state-form, #preview-swf, #preview-search-form'),
var current_outfit_permalink_el = $('#current-outfit-permalink'),
new_outfit_form_el = $('#save-outfit-form'),
new_outfit_name_el = $('#save-outfit-name'),
outfits_el = $('#preview-outfits'),
@ -608,8 +608,12 @@ View.Outfits = function (wardrobe) {
function setActiveOutfit(outfit) {
outfits_list_el.find('li.active').removeClass('active');
if(outfit.id) {
var url = document.location.protocol + "//" + document.location.host;
if(document.location.port) url += ":" + document.location.port;
url += "/outfits/" + outfit.id;
liForOutfit(outfit).addClass('active');
save_current_outfit_name_el.text(outfit.name);
current_outfit_permalink_el.attr('href', url);
}
save_outfit_wrapper_el.toggleClass('active-outfit', outfit.id ? true : false);
}
@ -685,6 +689,7 @@ View.Outfits = function (wardrobe) {
}
}
}
new_outfit_form_el.stopLoading();
liForOutfit(outfit).stopLoading();
}

File diff suppressed because it is too large Load diff